Binding Request : Buderus web gateway

Hi,
Well with the App I get exactly what you are reporting. The setting in OH2 is also visible in the App and vice-versa. But the control RC35 on the boiler does not change. Maybe the problem is already in the App. I will contact Buderus help in order to fix this.
I’ll keep you informed about the status. Thanks a lot for the support!!!
KR,
Christof

Hi,
in my RC35 it changes.
If you open the small flap on the RC35 there is a temperature button (next to the calender button), If you press it then it shown the actual set temperature and the measured temperature.
If I change the value in OH then a short time later the value changes there too . Without to close and open it again…
Greetings
Markus

Hello Markus,
just shut down OH, replace the binding in addons, cleared the cache with openhab-cli, restarted OH.

Result is a before, the log file shows that the values are more or less alternating between single fraction precision to unlimited and back.

I have no specific test script, the log shows the behavior:

2019-11-25 12:26:03.827 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 59.70000076293945 to 60.099998474121094

2019-11-25 12:26:28.126 [vent.ItemStateChangedEvent] - km200_gateway_817210159_gateway_DateTime changed from 2019-11-25T12:25:36 to 2019-11-25T12:26:08

2019-11-25 12:26:29.505 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 60.099998474121094 to 60.0

2019-11-25 12:27:02.725 [vent.ItemStateChangedEvent] - km200_gateway_817210159_gateway_DateTime changed from 2019-11-25T12:26:08 to 2019-11-25T12:26:42

2019-11-25 12:27:04.105 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 60.0 to 59.900001525878906

2019-11-25 12:27:37.345 [vent.ItemStateChangedEvent] - km200_gateway_817210159_gateway_DateTime changed from 2019-11-25T12:26:42 to 2019-11-25T12:27:16

2019-11-25 12:27:38.725 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 59.900001525878906 to 60.0

Regards
Thomas

Hi,
ok, I created a new version with some output, you can download it here.
I would be great if you could test it, I’m testing a new OH service and cannot this myself.
Greetings

Hello Markus,

from what I see in the log on level DEBUG the JSON contains valid data.
The Float-value logged after parsing shows to many fractions.
Below there is such an example:

2019-11-26 10:08:00.623 [DEBUG] [hab.binding.km200.internal.KM200Comm] - Starting receive connection...

2019-11-26 10:08:00.751 [DEBUG] [00.internal.handler.KM200DataHandler] - parseJSONData service: /heatSources/applianceSupplyTemperature, data: {"id":"/heatSources/applianceSupplyTemperature","type":"floatValue","writeable":0,"recordable":0,"value":58.9,"unitOfMeasure":"C","state":[{"open":-3276.8},{"short":3276.7}]}

2019-11-26 10:08:00.751 [INFO ] [00.internal.handler.KM200DataHandler] - state of type float value: {"id":"/heatSources/applianceSupplyTemperature","type":"floatValue","writeable":0,"recordable":0,"value":58.9,"unitOfMeasure":"C","state":[{"open":-3276.8},{"short":3276.7}]}

2019-11-26 10:08:00.751 [INFO ] [00.internal.handler.KM200DataHandler] - Float: 58.900001525878906

Regards
Thomas

Hi,
ok, I changed the data structures. Try this please.
Greetings
Markus

I have problems with the binding, it does not start up properly.
Log shows a conversion error right in the beginning:

2019-11-26 20:07:56.381 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.km200.internal.handler.KM200GatewayHandler@13815d9': java.math.BigDecimal cannot be cast to java.lang.Integer

java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.Integer

	at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.getConfiguration(KM200GatewayHandler.java:211) ~[?:?]

	at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.initialize(KM200GatewayHandler.java:111) ~[?:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]

Cleaning the cahce and multiple restarts did not help, seems like this version is broken.
Or do I have to drop all things and recreate them ?

Shit, a small mistake, sorry.
This should works now…
I cannot test it myself… :frowning:

Hello Markus,

this did the trick, the values have now a proper format (Single fraction). Thanks for fixing it !

d.

2019-11-27 21:08:09.494 [.ItemChannelLinkAddedEvent] - Link 'HeatSources_ActualSupplyTemperature-km200:heatSource:817210159:heatSources:actualSupplyTemperature' has been added.

2019-11-27 21:11:36.165 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from NULL to 53.1

2019-11-27 21:12:08.924 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 53.1 to 57.4

2019-11-27 21:12:41.704 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 57.4 to 59.5

2019-11-27 21:13:14.494 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 59.5 to 60.4

2019-11-27 21:14:20.054 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 60.4 to 59.9

2019-11-27 21:14:52.825 [vent.ItemStateChangedEvent] - km200_appliance_817210159_appliance_actualSupplyTemperature changed from 59.9 to 58.4

What I see now are some exceptions during the startup phase of the binding:

2019-11-27 21:09:50.530 [hingStatusInfoChangedEvent] - 'km200:kmdevice:817210159' changed from ONLINE to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==

2019-11-27 21:09:50.532 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.km200.internal.handler.KM200GatewayHandler@de616d': hexString needs to have an even length: 

java.lang.IllegalArgumentException: hexString needs to have an even length: 

	at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:105) ~[bundleFile:?]

	at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:119) ~[bundleFile:?]

	at org.openhab.binding.km200.internal.KM200Device.setCryptKeyPriv(KM200Device.java:151) ~[?:?]

	at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.dispose(KM200GatewayHandler.java:145) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

2019-11-27 21:09:50.536 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while disposing handler of thing 'km200:kmdevice:817210159': hexString needs to have an even length: 

java.lang.IllegalArgumentException: hexString needs to have an even length: 

	at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:105) ~[bundleFile:?]

	at org.eclipse.smarthome.core.util.HexUtils.hexToBytes(HexUtils.java:119) ~[bundleFile:?]

	at org.openhab.binding.km200.internal.KM200Device.setCryptKeyPriv(KM200Device.java:151) ~[?:?]

	at org.openhab.binding.km200.internal.handler.KM200GatewayHandler.dispose(KM200GatewayHandler.java:145) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

After some time these do vanish and the binding is running fine.
I remember someone having the same message with the hex String, might be a formatting- or trimming-related issue.

But again: Thanks for fixing the precision topic !
Regards
Thomas

I see the the same exception with the same error code on 2.5.0-RC1 " … hexString needs to have an even length: … and binding seems not to be active …

Hi @Markinus and @Oggerschummer,

I today migrated my OpenHAB docker environment from OH 2.5.0 - Milestone 3 to OH 2.5.0 - Release Candidate 1. During this change I experienced the first time that the my Buderus web gateway KM200 has been frozen by the binding. I read through this thread and found the “russian method” of powering off and on the gateway to re-establish the communication!

I just wanted to let you know that your 2.5.0-RC1 version of the binding is still so unstable to freeze the gateway.

After rebooting the gateway the communication currently works and I have the workaround now when the gateway freezes again.

You may let me know if you want some logs for making the binding more stable and I will let you know if I experience further issues with the latest binding level.

Try using the latest version of the binding (link some posts above)
For me this is working very stable since weeks.

Hi Oggerschummer,
thx for answering on the holidays!!! I am running:

229 │ Active │  80 │ 2.5.0.RC1               │ openHAB Add-ons :: Bundles :: KM200 Binding


Logging in as openhab
Password:  

                          __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.5.0.RC1
                               Milestone Build   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

I have now issues changing any parameters … I am collecting the data but you need not looking into that today …

Ok … during my tests with the binding I changed the id => km200:kmdevice:d2736590 <= that I defined in the things file:

Bridge km200:kmdevice:d2736590 "KMDevice" @ "Witchhill" [ privateKey= "MY_PRIVATE_KEY", readDelay=100, refreshInterval=10, maxNbrRepeats=20, ip4Address="WWW.XXX.YYY.ZZZ" ]
{
  heatingCircuit  hc1 "WitchhillHK1"
  heatingCircuit  hc1-switchprogram "WitchhillSP1"
  notification    notifications "WitchhillNOT"
  dhwCircuit      dhw1 "WitchhillDHW"
  appliance       appliance "WitchhillAPL"
  gateway         gateway "WitchhillGWY"
	sensor          temperatures "WitchhillSEN"
  system          system "WitchhillSYS"
}

changing it back to d2736590 solved the changing issue. I can now change items again!!!

But one question remains:

Even though my things file above has other values:

readDelay=100
refreshInterval=10
maxNbrRepeats=20

The binding uses the default values (see console output below):

17:47:38.224 [DEBUG] [.internal.handler.KM200GatewayHandler] - Update KM50/100/200 gateway configuration, it takes a minute....
17:47:38.225 [DEBUG] [.internal.handler.KM200GatewayHandler] - initialize Key: privateKey Value: MY_PRIVATE_KEY
17:47:38.225 [DEBUG] [.internal.handler.KM200GatewayHandler] - initialize Key: readDelay Value: 100
17:47:38.226 [DEBUG] [.internal.handler.KM200GatewayHandler] - Set read delay to: 100 seconds.
17:47:38.226 [DEBUG] [.internal.handler.KM200GatewayHandler] - initialize Key: refreshInterval Value: 30
17:47:38.226 [DEBUG] [.internal.handler.KM200GatewayHandler] - Set refresh interval to: 30 seconds.
17:47:38.227 [DEBUG] [.internal.handler.KM200GatewayHandler] - initialize Key: maxNbrRepeats Value: 10
17:47:38.227 [DEBUG] [.internal.handler.KM200GatewayHandler] - Set max. number of repeats to: 10 seconds.
17:47:38.227 [DEBUG] [.internal.handler.KM200GatewayHandler] - initialize Key: ip4Address Value: WWW.XXX.YYY.ZZZ
17:47:38.228 [DEBUG] [nhab.binding.km200.internal.KM200Comm] - Starting receive connection...
17:47:38.350 [DEBUG] [.internal.handler.KM200GatewayHandler] - Test of the communication to the gateway was successful..
17:47:38.351 [DEBUG] [.internal.handler.KM200GatewayHandler] - read Capabilities..
17:47:38.351 [DEBUG] [.internal.handler.KM200GatewayHandler] - Rootpath: /gateway
17:47:38.351 [DEBUG] [nhab.binding.km200.internal.KM200Comm] - Starting receive connection...

Why is the binding using the default values instead of the ones given in my things file?

Dear community, i installed the KM Binding today. Works like describe.
I miss two things, I set the heating temp and also the hot water temp direct on the display of the heating appliance. Now I try to access this value and also to change them.
I set heating temp to 31 and heating temp for hot water to 55.

A closer look to all parameters shows the value /system/sensors/temperatures/supply_t1_setpoint = 31. Unfortunaetly this item is not writeable.

I do not find any item with the 55 in it. I think it should be /system/sensors/temperatures/hotWater_t2_setpoint, but it is not there.

For information: there is a
/system/sensors/temperatures/supply_t1 with the current temp value, so I think the /system/sensors/temperatures/supply_t1_setpoint is the set entry

and there is also the /system/sensors/temperatures/hotWater_t2 as the current hot water temp, setpoint is missing.

Any ideas?

Hello Helmut,

welcome to the community. Buderus does not expose all parameters to the gateway. I have an list of the old version of the binding which shows all the parameters that can be retreived by the binding:

In the output below you see the confirmation that the parameters that you found are not writeable (“0” in the second column)

...
12:09:26.641 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/hotWater_t1;-3276.8;;;
12:09:26.641 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/hotWater_t2;63.2;;;
...
12:09:26.651 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/dhwCircuits/dhw1/actualTemp;62.8;;;
12:09:26.548 [INFO ] [b.binding.km200.internal.KM200Device] - 1;1;1;0;floatValue;/dhwCircuits/dhw1/setTemperature;60.0;;30.0;80.0
...
12:09:26.595 [INFO ] [b.binding.km200.internal.KM200Device] - 1;1;1;0;floatValue;/dhwCircuits/dhw1/temperatureLevels/on;60.0;;30.0;80.0
...

To manipulate the values of the hot water circuit you would need to look at the parameters in the dhwCircuits appliance (see also above in the output. To set the temperature you may want to try the setTemperature parameter which is writeable as you can see at the “1” in the second column …

The parameters for the hot water circuit are organized in a separate appliance … Hope this gives you a new perspective for searching the right parameters for your plans …

Hi, thanks for the fast reply. Unfortunately it doesn’t help. Yes for sure, there is a hot water circuit in the system - but that is not the one I want to set. Reason behind that, I have the heating system, this runs completely decoupled from the hot water circuit. The heating systems heats up a big buffer water tank. The tank is separated in two zones, one for heating the rooms and one for the hot water. Both are separated and set on the front panel of the system. The temperatures are measure supply_t1 (for the heating) and hotWater_t2 for the hot water.

That’s the reason, why I talked about the supply_t1_setpoint at the system branch not at the hotwater circuit. So I need to manipulate these values.

Thanks in advance

Hi,
do you see both heating systems in the Buderus app?
Greetings

Hi Markus, thanks for the reply. I don’t see any of the temperatures, which I have set on the front panel of the heating system on the Buderus App, this is not nice.

Hi Helmut,

the values given by the sensor appliance:

are all not writeable! The writeable corresponding values are in the other appliances:

appliance dhwCircuits/dhw# (where # = 1 and 2):

12:09:26.548 [INFO ] [b.binding.km200.internal.KM200Device] - 1;1;1;0;floatValue;/dhwCircuits/dhw1/setTemperature;60.0;;30.0;80.0

to set the hotwater temperature

and

appliance heatingCircuits/hc# (where # = 1 to 4):

12:09:26.626 [INFO ] [b.binding.km200.internal.KM200Device] - 1;1;1;0;floatValue;/heatingCircuits/hc1/temperatureLevels/day;23.0;;6.0;30.0
12:09:26.626 [INFO ] [b.binding.km200.internal.KM200Device] - 1;1;1;0;floatValue;/heatingCircuits/hc1/temperatureLevels/night;19.0;;5.0;29.0

to set the hotwater temperature.

With the new binding it should be temperatureLevels_night instead of temperatureLevels/night
and respectively temperatureLevels_day instead of temperatureLevels/day

I have also not setpoint parameter for the second hotwater sensor _t2_

...
12:09:26.577 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/supply_t1;73.7;;;
12:09:26.624 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/supply_t1_setpoint;7.0;;5.0;90.0
12:09:26.641 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/hotWater_t1;-3276.8;;;

...
12:09:26.641 [INFO ] [b.binding.km200.internal.KM200Device] - 1;0;1;0;floatValue;/system/sensors/temperatures/hotWater_t2;63.2;;;
...

You have also to distinguish between hotWater and supply !!!

As you can see in the syntax of the old binding list all sensor parameters are not writeable: 1;0;1:0; … (the second “0” indicates writeable = 0 => means not writeable)

You can collect the same full list for the current binding when setting the output level of the binding to DEBUG

> log: set DEBUG org.openhab.binding.km200

when you now run log:display in the karaf console you will see all the parameters and their attributes …