Binding Request : Buderus web gateway

Hi @NCO ,
my personal opinion is that the binding is far away from being stable in OH2.
Checking the openhab.log I see HTTP500 errors after running the binding for a few minutes requiring a reboot of the KM device (It seems that polling data takes place to often and the device is not capable of handling many requests at the same time) and the Thing / Item creation is not reliable (as you noticed).
Some things may be caused by the fact that OH2.1 is work in progress, where sometimes the new builds have issues that are being fixed again later.

In principle the decoding of the data coming from the KM device is working fine, but it needs fine tuning on the interfacing side as well as on the OH2 part.
I highly appreciate the work done by @Markinus, I seriously doubt if it could have been done by me any better, but I would not use this in a productive environment (yet).

Maybe Markus will find some time to address the open points, currently I assume he´s busy with something else.

Nevertheless if you have the skillset required and the time you could fork and improve it. Guess he would be glad to find someone helping him.
Regards,
Oggerschummer

Hi @Oggerschummer,

thanks for your response.
I am very greateful that Markus is putting so much effort into this binding and I am actually pretty happy with it.

In my previous setup (openhabian with OH2 stable) the same binding file mentioned above was running flawlessly - so I assume it root cause is within OH2 (which is now the snapshot build),
Or it could be, that I still don’t get the point about using addons.cfg properly.

If my problem(s) mentioed above are not a known issue (or my fault of using it incorrectly) than I will probably switch back the the last sd-card image.

After boot up time of nearly 50 min the km200 binding is active in the karaf console.
in PaperUI the things are uninitialized though…

It took me a while to get the “illegal key size” error fixed on OpenHABian distro. If other have the same problems as me, here is what I did to get it fixed (I’m also putting this here for my own future reference :slight_smile: )

The apt-get solution didn’t work for me, I got this error:

Unable to locate package "oracle-java8-unlimited-jce-policy"

So I downloaded the unlimited jce from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

Copied it to my RPI and unzipped (if you’re a linux noob like me: just use the ‘unzip’ command).

Then I copied the 2 jar files from the zip to:

/usr/lib/jvm/zulu-embedded-8-armhf/jre/bin

(I made a backup first of the old files)

Restarted OpenHAB and then the binding started flawlessly!

Hello,

i have problem with OH2.1. binding found gateway, in console get information from server, but no actualizations data.

Hello @teaserr,
I would not recommend to mix Oracle VM files with Zulu.
Just a few posts above I mentioned there is support for this directly in Zulu, I´d suggest you take those instead of grabbing the Oracle ones.
Regards,
Oggerschummer

Hello,

today i test new openhabian with OH 2.1. Binding not working correctly. Search for things find gateway after configure gateway with IP and privat key find other things. After restart binding not start update. When i go again to Search for things in console show me ,[scovery.KM200GatewayDiscoveryService] - Gateway not configured, scanning postponed.,. Go to things and readd key. But some things show me ,UNINITIALIZED - BRIDGE_UNINITIALIZED,

I try test offline mode:

OH2.0 test ok after restart binding update data
OH2.1 same problem as OH2.1 online install with openhabian

used 178 | Active | 80 | 2.1.0.201702051357 | KM200 Binding for all instance

thanks

Late reply, I know :slight_smile: But thanks for this recommendation.
I actually experienced some issues using the Oracle files. From time to time, my Pi would freeze up, and I couldn’t find anything in the logging to cause this.
After I downloaded the files for Zulu, this problem went away. So I’m pretty sure this was the cause.

Is this binding stable now? I was thinking of buying a KM200 gateway, and I would like OpenHAB can interact with it.

Good question. I have not heard from @Markinus for months, up to now it was not stable enough to rely on it in a productive OH2.x environment. My impression is, that he´s no longer maintaining it, which is really a pity as it is a very good approach. Maybe contact him directly to see what the current status is on his side. Judging from his Github account he is offline since early 2017, no contributions since then. But statistics on github seem to be wrong, last commit to OH2 was September 2017.

Hi!

I’m still working on this binding. The last version is working very nice and it looks like it could be merged in next time. Here is the last version:
–link removed–

1 Like

Great.
Good to hear everything is fine on your side. I will give the new version of the binding a try in the next days.

Would be Great. If someone has problems with this binding then write it here. In my settings it’s running for months without and troubles. Openhab 2.1/Cometvisu and RasPi 2.

Thanks!

Maybe I’m gonna buy this gateway, I only think it’s quite expensive (eg https://www.heizungsdiscount24.de/regelungstechnik/buderus-web-km200-zur-bedienung-der-heizungsanlage-ueber-smartphone.html)

I have setup following item:

Number  HeatRoomManulaSP  	"KM200 Room Manual Setpoint [%.1f ]" 	<temperature> (g_Heating) { channel="km200:heatingCircuit:hc1:manualRoomSetpoint"} 

Inside the sitemap

		Setpoint item=HeatRoomManulaSP minValue=10 maxValue=26 step=1

The set value jumps always to the previouse value.

here the log file

2017-12-05 17:11:44.425 [ItemStateChangedEvent     ] - HeatRoomManulaSP changed from 14.0 to 15
2017-12-05 17:11:45.226 [ItemStateChangedEvent     ] - HeatRoomManulaSP changed from 15 to 14.0
2

no other log file entries
This values should be writable, mode is set to manual (km200:heatingCircuit:hc1:operationMode).

what am I doing wrong?
It seems that manualRoomSetpoint is not writable. Can anybody check that on his installation?

Hi Markinus,

any idea when this could be available in the official OH2 Bindings?

I try to use it. But it does not find my KM200 and if I add it manually it shows it offline

Hi,

show me the configuration-list from the log file. (channel list).

Hi,

this is all I get
2017-12-08 13:09:30.961 [INFO ] [ng.km200.handler.KM200GatewayHandler] - Update KM50/100/200 gateway configuration, it takes a minute…
2017-12-08 13:09:31.298 [INFO ] [ng.km200.handler.KM200GatewayHandler] - Received data…

2017-12-09 12:32:47.340 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:53488233’ changed from OFFLINE to UNINITIALIZED
2017-12-09 12:32:47.345 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:53488233’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-12-09 12:32:47.915 [ThingRemovedEvent ] - Thing ‘km200:kmdevice:53488233’ has been removed.
2017-12-09 12:34:11.546 [ThingAddedEvent ] - Thing ‘km200:kmdevice:53488233’ has been added.
2017-12-09 12:34:20.015 [INFO ] [ng.km200.handler.KM200GatewayHandler] - Update KM50/100/200 gateway configuration, it takes a minute…
2017-12-09 12:34:20.387 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:53488233’ changed from UNINITIALIZED (CONFIGURATION_PENDING) to INITIALIZING
2017-12-09 12:34:20.511 [INFO ] [ng.km200.handler.KM200GatewayHandler] - Received data…
2017-12-09 12:34:22.853 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:53488233’ changed from INITIALIZING to UNKNOWN
2017-12-09 12:34:22.857 [hingStatusInfoChangedEvent] - ‘km200:kmdevice:53488233’ changed from UNKNOWN to OFFLINE

Hello Markus,
sorry for getting back late, but Q4 is always busy within my company.

I´ve setup the binding in a freshly installed OH2.1 stable, gateway firmware version is 04.02.02, hardware version iCom_Low_NSC_v1.

These are my findings so far:

  • The binding is not stable yet , it´s crashing the km200 after a few minutes - gateway simply does not respond anymore. It is very likely that it´s not responsive anymore before, what I call “Running the Russian Solution” Poweronoff.
2017-12-02 12:26:39.054 [WARN ] [hab.binding.km200.internal.KM200Comm] - HTTP GET failed: 500, internal server error, repeating.. 
2017-12-02 12:26:41.057 [WARN ] [hab.binding.km200.internal.KM200Comm] - Get empty reply
==> /var/log/openhab2/events.log <==
2017-12-02 12:26:43.040 [ItemStateChangedEvent     ] - km200_system_system_hs1_actualPower changed from 10.5600004196167 to 10.800000190734863
2017-12-02 12:26:43.466 [ItemStateChangedEvent     ] - km200_system_system_hs1_actualModulation changed from 44.0 to 45.0
==> /var/log/openhab2/openhab.log <==
2017-12-02 12:26:52.054 [WARN ] [hab.binding.km200.internal.KM200Comm] - HTTP GET failed: 500, internal server error, repeating.. 

The HTTP500 repeats multiple times. Sometimes it happens that, after this happened, still some readings get updated from the device. (As you see above).

I had to drop the gateway once in OH, after this it was working. Don´t know why, see next point.

  • When setting up the binding one needs to be patient. It takes roughly 4-5 minutes until all Things are available. this should be considered, otherwise one may thing its not working.
  • when changing a value I always get a warning in the log that the command takes to long:
2017-12-02 12:00:22.507 [ItemStateChangedEvent     ] - km200_heatingCircuit_hc1_temperatureLevels_eco changed from 18.0 to 19
==> /var/log/openhab2/openhab.log <==
2017-12-02 12:00:27.506 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.core.thing.internal.ThingManager@de7947' takes more than 5000ms.
==> /var/log/openhab2/events.log <==
2017-12-02 12:00:27.508 [ItemCommandEvent          ] - Item 'km200_heatingCircuit_hc1_temperatureLevels_eco' received command 19
  • I was not yet really successfull in changing a value in a reliable way, most of the time the item changes back to the old value.

  • There are some entries in the log about missing services:

2017-11-30 15:32:21.917 [WARN ] [hab.binding.km200.internal.KM200Comm] - Service is not in the determined device service list: /dhwCircuits/dhw1/switchPrograms/__current__/weekday
2017-11-30 15:32:22.480 [WARN ] [hab.binding.km200.internal.KM200Comm] - Service is not in the determined device service list: /dhwCircuits/dhw1/switchPrograms/__current__/nbrCycles
2017-11-30 15:32:22.484 [WARN ] [hab.binding.km200.internal.KM200Comm] - Service is not in the determined device service list: /dhwCircuits/dhw1/switchPrograms/__current__/cycle
2017-11-30 15:32:22.487 [WARN ] [hab.binding.km200.internal.KM200Comm] - Service is not in the determined device service list: /dhwCircuits/dhw1/switchPrograms/__current__/high
2017-11-30 15:32:22.491 [WARN ] [hab.binding.km200.internal.KM200Comm] - Service is not in the determined device service list: /dhwCircuits/dhw1/switchPrograms/__current__/off

Greetings,
Thomas

Thank you for this information. We have to look where the problem is.
It looks like in some configurations the internel server error appairs but I have in the moment no Idea why it happens.
What is your hardware (where OH2 is running on)?

Markus