i just created a pull request https://github.com/openhab/openhab/pull/3110 for a new binding containing the connection to RESOL devices using the VBUS. RESOL devices are mainly used for solar heating systems and sometimes together with the heating system and then rebranded (e.g. by Viessmann).
And I get this in the logs. It looks like he reads the device ID in the Binding but not in the LANReceiver? What’s the difference?
2015-10-28 08:20:22.004 [INFO ] [.b.r.internal.ResolVBUSBinding] - ResolVBUS Binding activated
2015-10-28 08:20:22.004 [INFO ] [.b.r.internal.ResolVBUSBinding] - Using deviceID: 4278
2015-10-28 08:20:29.832 [ERROR] [o.o.b.r.i.ResolVBUSLANReceiver] - Error while initializing LAN interface)
2015-10-28 08:20:29.832 [INFO ] [.b.r.internal.ResolVBUSBinding] - Device ID was null, reading from openhab.cfg
2015-10-28 08:20:30.096 [INFO ] [.service.AbstractActiveService] - ResolVBUS Refresh Service has been started
I can view the stats in the Resol software itself and I used to read the stats with this module successfully in the past: https://www.npmjs.com/package/resol-vbus
Hi Laurens,
On the first look it seems that something with the IP configuration is incorrect. Are you sure your LAN controller listens on port 80?
Can you try it with leaving the value to standard(e.g. Commenting it out in the openhab.cfg)
Thanks,
Michael
Yes, that was the trick! I saw a webpage and the terminal reacted on port 80 (of course it was the webserver ) and so I went for port 80. Working perfectly now with port 7053!
For documentation, I’m using these items:
Number Resol_state "Pomp [MAP(onoff.map):%s]" {resolvbus="Status"}
Number Resol_pannels "Temperatuur panelen [%.1f °C]" {resolvbus="Temperatur sensor 1"}
Number Resol_barrel "Temperatuur vat [%.1f °C]" {resolvbus="Temperatur sensor 2"}
Number Resol_hours "Aantal draaiuren [%.0f u]" {resolvbus="Betriebsstunden Relais 1"}
Tested with a citrin Solar cs1.2 (which is a deltasol bs) together with a resol USB converter. It works fine with the same item config as the post above.
The German item names are a bit strange though and the English ones don’t seem to work.
Just a suggestion would be to use English item names without spaces and to have a link to the XML files in the wiki.
Thanks, nikoraes. Good to hear. The German item names come from the XML-files where the datapoints are defined. I agree that this is a bit strange for non-German people.
There are English names, too. Unfortunately not for every datapoint. So for keeping the binding as simple and for maintenance reasons I decided to use the German ones.
So I could think about improving the next version:
-Where english names are available, use english names, if not, use german ones
And even “deleting” the spaces would be additional effort especially for documentation(WIKI), which is by far not complete for now.
(see discussion on https://github.com/openhab/openhab/pull/3110)
Yes, sure. There are plans for OH2. At the moment a RESOL guy is helping us by developing some core classes to provide everything around data extraction and conversion for all controller types. That was a major issue with the current version.
So stay tuned. As soon as he has finished his work, I’ll start enhancing the OH1 binding and starting with OH2 one.
Of course you can start with the OH2 one if you like. The current status of the RESOL classes are here:
Hi Thomas,
I’m not sure if this will work. If the binding recognizes the ID, it will look for data fields defined in XML files. If not, you have to define a XML-File. That could work.
But if you can get a JSON String why not use the HTTP-Binding and then transform the input via a transform file:
e.g. I’m getting the diesel prices via HTTP and a “diesel.js”:
Number diesel1 "Diesel Aral [%.2f Euro]" { http="<[https://creativecommons.tankerkoenig.de/json/detail.php?id=6f2391a3-1c74-46b5-bdf0-e00467eca0ab&apikey=myapi-key:JS(diesel.js)]" }
just tried to add the xml file. but looks like the binding is only finding the one device:
[o.o.b.r.i.ResolVBUSLANReceiver] - Device identified: 7821 <-- cosmo Multi.
Maybe I’ll go for the http workaround… could not any device connect via json?
dl2 url: dl2.fritz.box//dlx/download/live
I just tried this binding on my Raspberry pi with Vbus connected to the GPIO uart. It works perfect with a Python script, but the binding can not find the serial port /dev/ttyAMA0.
20:29:35.729 [INFO ] [.b.r.internal.ResolVBUSBinding:107 ] - ResolVBUS Binding activated
20:29:35.817 [DEBUG] [.b.r.internal.ResolVBUSBinding:181 ] - Starting ResolVBUS Serial Receiver
20:29:35.825 [DEBUG] [.b.r.i.ResolVBUSSerialReceiver:181 ] - Looking for serialport null
20:29:36.175 [DEBUG] [.b.r.i.ResolVBUSSerialReceiver:192 ] - Serialport not found /dev/ttyAMA0
20:29:36.181 [INFO ] [.b.r.internal.ResolVBUSBinding:299 ] - Device ID was null, reading from openhab.cfg
20:29:36.186 [DEBUG] [.b.r.internal.ResolVBUSBinding:304 ] - Loading XML-Config for device ID: null
root:/opt/openhab# ll /dev/ttyAMA0
crw-rw---T 1 root dialout 204, 64 Jan 1 1970 /dev/ttyAMA0
I am starting openhab as root …
I have seen that it might be a problem of the gnu.io RXTXcomm driver, but I am not sure how to solve it.
After googled for ttyAMA0 and found a hint, that openhab should be startet with -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0
but it did not fully help. I now get
RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyAMA0
19:46:51.926 [INFO ] [.b.r.internal.ResolVBUSBinding:107 ] - ResolVBUS Binding activated
19:46:52.029 [DEBUG] [.b.r.internal.ResolVBUSBinding:181 ] - Starting ResolVBUS Serial Receiver
19:46:52.041 [DEBUG] [.b.r.i.ResolVBUSSerialReceiver:181 ] - Looking for serialport null
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyAMA0: Die Datei existiert bereits. It is mine
testRead() Lock file failed
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyAMA0: Die Datei existiert bereits. It is mine
??3?/ttyAMA0 testRead() Lock file failed
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyAMA0: Die Datei existiert bereits. It is mine
??3?/ttyAMA0 testRead() Lock file failed
19:46:52.299 [DEBUG] [.b.r.i.ResolVBUSSerialReceiver:192 ] - Serialport not found /dev/ttyAMA0
19:46:52.305 [INFO ] [.b.r.internal.ResolVBUSBinding:299 ] - Device ID was null, reading from openhab.cfg
19:46:52.323 [DEBUG] [.b.r.internal.ResolVBUSBinding:304 ] - Loading XML-Config for device ID: null
The lock file did not exist before starting openhab.
Any hints?
Regards Holger