iCalendar plus AVMFritz

Hey there,

I’m using the iCalendar to set the temperatures for the radiators. The radiators connect via the AVMFritz bindung.
I want to do it, because then it is easy to connect it to my Iphone and I can handle it from anywhere.

In the comments of my iCalendar I set it up like this:
Perhaps there is something wrong?

BEGIN:Thermostat_Wohnzimmer_sollTemperatur:21
BEGIN:Thermostat_Badezimmer_sollTemperatur:21
BEGIN:Thermostat_Flur_sollTemperatur:21
BEGIN:Thermostat_Kueche_sollTemperatur:21
END:Thermostat_Wohnzimmer_sollTemperatur:16
END:Thermostat_Badezimmer_sollTemperatur:16
END:Thermostat_Flur_sollTemperatur:16
END:Thermostat_Kueche_sollTemperatur:16
BEGIN:Thermostat_Status_caldav:COMFORT
END:Thermostat_Status_caldav:ECO

The problem is since OH 2.5.11 (now i’m using OH 3.0). I got this error in the logs:

An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.avmfritz.internal.handler.AVMFritzHeatingDeviceHandler@2369f5b2': null
java.lang.NullPointerException: null
	at org.openhab.binding.avmfritz.internal.handler.AVMFritzBaseThingHandler.handleCommand(AVMFritzBaseThingHandler.java:348) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
	at com.sun.proxy.$Proxy1266.handleCommand(Unknown Source) [?:?]
	at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
	at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

I have no idea how to fix it. It would be nice if anybody has some hint or some advice.

Thank you very much.

Get a debug log to figure out what command is failing to be handled…

Ok,
how can I get a debug log or where can I find it?

Thank you in advance.

Best,
Max

I found this in the events.log:

2020-12-30 05:30:00.444 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Thermostat_Wohnzimmer_sollTemperatur' received command 21
2020-12-30 05:30:00.451 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Thermostat_Badezimmer_sollTemperatur' received command 21
2020-12-30 05:30:00.459 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Thermostat_Flur_sollTemperatur' received command 21
2020-12-30 05:30:00.462 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Thermostat_Kueche_sollTemperatur' received command 21
2020-12-30 05:30:00.463 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Thermostat_Status_caldav' received command COMFORT
2020-12-30 05:30:00.463 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Thermostat_Wohnzimmer_sollTemperatur' predicted to become 21
2020-12-30 05:30:00.468 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Thermostat_Badezimmer_sollTemperatur' predicted to become 21
2020-12-30 05:30:00.480 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Thermostat_Flur_sollTemperatur' predicted to become 21
2020-12-30 05:30:00.483 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Thermostat_Kueche_sollTemperatur' predicted to become 21
2020-12-30 05:30:00.486 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Thermostat_Status_caldav' changed from ECO to COMFORT

And this looks right.

Thranks.

Is that helpful:

2020-12-30 12:38:20.501 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:119600974928' with device model: [ain=11960 0974928,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=16,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Wohnzimmer,battery=90,batterylow=0,null,null,[tist=44,tsoll=42,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=90,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=22.0,offset=0.0],null,[],null]
2020-12-30 12:38:20.510 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:119610273336' with device model: [ain=11961 0273336,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=20,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Arbeitszimmer,battery=90,batterylow=0,null,null,[tist=43,tsoll=42,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=90,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=21.5,offset=0.0],null,[],null]
2020-12-30 12:38:20.517 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:119610275664' with device model: [ain=11961 0275664,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=17,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Badezimmer,battery=80,batterylow=0,null,null,[tist=44,tsoll=42,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=80,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=22.0,offset=0.0],null,[],null]
2020-12-30 12:38:20.525 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:133560165408' with device model: [ain=13356 0165408,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=22,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Flur,battery=60,batterylow=0,null,null,[tist=44,tsoll=42,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=60,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=22.0,offset=0.0],null,[],null]
2020-12-30 12:38:20.533 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:119610272616' with device model: [ain=11961 0272616,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=18,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Küche,battery=90,batterylow=0,null,null,[tist=44,tsoll=42,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=90,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=22.0,offset=0.0],null,[],null]
2020-12-30 12:38:20.542 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Update thing 'avmfritz:Comet_DECT:cable6490:119610272480' with device model: [ain=11961 0272480,bitmask=320,isHANFUNDevice=false,isHANFUNButton=false,isHANFUNAlarmSensor=false,isButton=false,isSwitchableOutlet=false,isTempSensor=true,isPowermeter=false,isDectRepeater=false,isHeatingThermostat=true,isMicrophone=false,isHANFUNUnit=false,id=19,manufacturer=AVM,productname=Comet DECT,fwversion=03.54,present=1,name=Thermostat Schlafzimmer,battery=90,batterylow=0,null,null,[tist=34,tsoll=253,absenk=34,komfort=42,lock=0,devicelock=0,errorcode=0,batterylow=0,windowopenactiv=0,windowopenactiveendtime=0,boostactive=0,boostactiveendtime=0,battery=90,nextchange=[endperiod=0,tchange=42],summeractive=0,holidayactive=0],[celsius=17.0,offset=0.0],null,[],null]

In the debug log they radiators show that the tist (actual temperatur) is 42 it looks like it is multiplied with 2, could it possible that I’m out of range with my commands in the iCalendar?

I tried additionally with the sitemap and this happens if i’m turn it to 21.0°C:

2020-12-30 13:00:48.541 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Handle command '21.5 °C' for channel set_temp
2020-12-30 13:00:48.987 [DEBUG] [nal.handler.AVMFritzBaseThingHandler] - Handle command '21 °C' for channel set_temp
2020-12-30 13:00:49.132 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200
2020-12-30 13:00:49.133 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200
2020-12-30 13:00:49.133 [DEBUG] [nal.hardware.FritzAhaContentExchange] - response complete: 43

2020-12-30 13:00:49.133 [DEBUG] [ritzAhaSetHeatingTemperatureCallback] - Received response '43
' for item '119610273336'
2020-12-30 13:00:49.769 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200
2020-12-30 13:00:49.770 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200
2020-12-30 13:00:49.770 [DEBUG] [nal.hardware.FritzAhaContentExchange] - response complete: 42

2020-12-30 13:00:49.770 [DEBUG] [ritzAhaSetHeatingTemperatureCallback] - Received response '42
' for item '119610273336'
2020-12-30 13:00:49.969 [DEBUG] [al.handler.AVMFritzBaseBridgeHandler] - Poll FRITZ!Box for updates avmfritz:fritzbox:cable6490
2020-12-30 13:00:50.543 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200
2020-12-30 13:00:50.543 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response: 200

It works with normal Celsius values but I don’t know if I’m using it with commands that something is wrong with the values?

Best,
Max

This could be a hardware support thing. The docs claim support for these for the set_temp channel. Based on your logs, I assume you’re using the Comet DECT?

FRITZ!DECT 301, FRITZ!DECT 300, Comet DECT

When the binding receives a command for the set_temp channel, the temperature received gets multiplied by 2:

fritzBox.setSetTemp(ain, fromCelsius(temperature));
* Converts a celsius value to a FRITZ!Box value.
     * Valid celsius values: 8 to 28 °C > 16 to 56
     * 16 <= 8°C, 17 = 8.5°C...... 56 >= 28°C, 254 = ON, 253 = OFF

return BIG_DECIMAL_TWO.multiply(celsiusValue);

Yes I’m usin the CometDECT.

Yeah ok that what I see but what is it meaining for my commands in the iCalendar or should I change something else?

Thanks for your help.

The docs example for the set_point channel looks like this:

Number:Temperature COMETDECTSetTemperature "Thermostat temperature set point [%.1f %unit%]" { channel="avmfritz:Comet_DECT:1:aaaaaabbbbbb:set_temp" }

So it would appear that the binding expects the user to know what the valid range is (16-56) and only use those values.

Ok,
that means I should use 40 instestad of 20°C.

Or is it possible to use the different modes?

Like:

BEGIN:Thermostat_Wohnzimmer_Modus:COMFORT 

or

BEGIN:Thermostat_Wohnzimmer_Modus:"COMFORT"

Thanks.
But I think I will try both.

Both are still not working and it is still the ThingHandler and I have no idea how to fix it.

Is somebody using the iCalendar-binding to control the radiators?

Config:

Bridge icalendar:calendar:heizung "Heizungskalender" @ "iCloud" [ url="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", refreshTime=60]
{
    
    Thing  icalendar:eventfilter:commentRadiator "Heizungsbefehle" (icalendar:calendar:heizung) [ maxEvents=10, textEventField="COMMENT" ] }

The radiators are working if I control them via my PaperUI or via my Sitemap and they are Online.

This is the commands that I put in the calendar comments:

BEGIN:Thermostat_Wohnzimmer_sollTemperatur:21
BEGIN:Thermostat_Badezimmer_sollTemperatur:21
BEGIN:Thermostat_Flur_sollTemperatur:21
BEGIN:Thermostat_Kueche_sollTemperatur:21
END:Thermostat_Wohnzimmer_sollTemperatur:16
END:Thermostat_Badezimmer_sollTemperatur:16
END:Thermostat_Flur_sollTemperatur:16
END:Thermostat_Kueche_sollTemperatur:16
BEGIN:Thermostat_Status_caldav:COMFORT
END:Thermostat_Status_caldav:ECO

Thanks for helping.

Best,
Max

:rofl:
I solved it.

I forgot to use the unit °C in the comments.

Now it is working.

Thanks for the help.