openHAB 2.0 binding
-
@TimO , I just noticed a weird behavior - I've changed configuration for another binding and restarted it from the console but that killed mysensors binding:
2017-03-04 13:07:19.110 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.things'
2017-03-04 13:07:19.123 [ERROR] [col.serial.MySensorsSerialConnection] - Interrupted reset time wait
2017-03-04 13:07:19.124 [WARN ] [col.serial.MySensorsSerialConnection] - Skipping I_VERSION connection test, not recommended...
2017-03-04 13:07:19.125 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
2017-03-04 13:07:19.125 [WARN ] [col.serial.MySensorsSerialConnection] - Network Sanity Checker thread disabled from bridge configuration2017-03-04 13:07:21.141 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
2017-03-04 13:07:21.149 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
2017-03-04 13:07:33.161 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
2017-03-04 13:07:33.163 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:1)Complete stop/start of OH is the only solution so far.
-
@TimO , I just noticed a weird behavior - I've changed configuration for another binding and restarted it from the console but that killed mysensors binding:
2017-03-04 13:07:19.110 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'demo.things'
2017-03-04 13:07:19.123 [ERROR] [col.serial.MySensorsSerialConnection] - Interrupted reset time wait
2017-03-04 13:07:19.124 [WARN ] [col.serial.MySensorsSerialConnection] - Skipping I_VERSION connection test, not recommended...
2017-03-04 13:07:19.125 [INFO ] [col.serial.MySensorsSerialConnection] - Successfully connected to MySensors Bridge.
2017-03-04 13:07:19.125 [WARN ] [col.serial.MySensorsSerialConnection] - Network Sanity Checker thread disabled from bridge configuration2017-03-04 13:07:21.141 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
2017-03-04 13:07:21.149 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
2017-03-04 13:07:33.161 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port?
2017-03-04 13:07:33.163 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:1)Complete stop/start of OH is the only solution so far.
-
@andreacioni thank you
Yes, it was a change in the .things file, but it was related to another binding. -
@andreacioni thank you
Yes, it was a change in the .things file, but it was related to another binding.@AndrewZ things file update trigger a reload of all binding declared inside it, nothing strange. ;) Follow the above link to keep track of the status of this issue.
-
I just tried to get the openhab 2 binding up and running. I have a serial gateway and domoticz + openhab running on a pi. I stopped the domoticz service and installed the serial and mysensors addons for openhab like mentioned in the github readme (bundle:list showed them both). I also added the openhab user to the dialout group.
I then created a demo.things file in config/things withBridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200 ] { /** define things connected to that bridge here */ }The log of openhab shows these errors though:
2017-03-19 00:03:59.855 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 2017-03-19 00:03:59.897 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:46)Any idea why? This works just fine:
cat /dev/ttyUSB0 -
I just tried to get the openhab 2 binding up and running. I have a serial gateway and domoticz + openhab running on a pi. I stopped the domoticz service and installed the serial and mysensors addons for openhab like mentioned in the github readme (bundle:list showed them both). I also added the openhab user to the dialout group.
I then created a demo.things file in config/things withBridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyUSB0", sendDelay=200 ] { /** define things connected to that bridge here */ }The log of openhab shows these errors though:
2017-03-19 00:03:59.855 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 2017-03-19 00:03:59.897 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:46)Any idea why? This works just fine:
cat /dev/ttyUSB0 -
Thank you, that helped! Should anyone ever face the same problem: after changing the EXTRA_JAVA_OPTS I also needed to restart openhab (more likely the java vm).
-
So openhab is running now and discovers my sensors when I restart them while scanning. My RGBW controller nodes pop up as RGBW sensors though. The on/off switch works, but what do I have to do to actually control the colors?
I tried editing the 4 variables but that doesn't seem to change the lights.
-
@LastSamurai : What does your sketch expect? One ASCII formated RGB code like described here: https://www.mysensors.org/download/serial_api_20 or a value between 0 and 100% per color (r,g,b,w)? I see different implementations (in openhab and in mysensors) and maybe we have to adjust the binding.
-
@TimO Right, I guess thats the problem. I have written my sketch against domoticz, so it expects either a 6 bit hex string (rgb = e.g. ff00ff) or a 9 bit (idk why) rgbw hex string (e.g. #ff00ff00).
According to the mysensors docu "ff00ff00" would be right, I guess. -
Just noticed in the log:
[WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manuallyIs that normal or any additional configuration is needed?
Thanks! -
@TimO Right, I guess thats the problem. I have written my sketch against domoticz, so it expects either a 6 bit hex string (rgb = e.g. ff00ff) or a 9 bit (idk why) rgbw hex string (e.g. #ff00ff00).
According to the mysensors docu "ff00ff00" would be right, I guess.@LastSamurai I'm working on a solution! RGB seems easy, but I haven't looked at RGBW. The Colopicker in OpenHAB only sends RGB.
-
@AndrewZ hmmmm, a child that represents itself with an id of 255 shouldn't exist. 255 is used for battery status for example. What's the message that comes in before that?
@TimO here is the output:
2017-03-23 20:51:32.531 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin 2017-03-23 20:51:33.754 [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually 2017-03-23 20:51:33.772 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge. -
@TimO here is the output:
2017-03-23 20:51:32.531 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin 2017-03-23 20:51:33.754 [WARN ] [.discovery.MySensorsDiscoveryService] - Cannot automatic discover thing node: 0, child: 255 please insert it manually 2017-03-23 20:51:33.772 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.@AndrewZ the message occurs right after startup and before the bridge gets connected?! Just ignore the message if everything else is working fine. :D
I'll release the refactored version soon. It's already available via the new IoT marketplace. -
@AndrewZ the message occurs right after startup and before the bridge gets connected?! Just ignore the message if everything else is working fine. :D
I'll release the refactored version soon. It's already available via the new IoT marketplace. -
@TimO yes, message occurs on startup and I'm already using version from marketplace, I see it as
market:binding-3328323 - 1.0 -
@LastSamurai I'm working on a solution! RGB seems easy, but I haven't looked at RGBW. The Colopicker in OpenHAB only sends RGB.
@TimO Cool, I'll test it once you are done. Domoticz only allows to either use the white channel or a RGB value (without the white) at the moment. Perhaps it can be done similarly in openhab.
-
@TimO Cool, I'll test it once you are done. Domoticz only allows to either use the white channel or a RGB value (without the white) at the moment. Perhaps it can be done similarly in openhab.
@LastSamurai Could you please take a look at this: https://github.com/tobof/openhab2-addons/issues/76 ?
I've added the RGB & RGBW channels and because I'm not that confident about the RGBW implementation I'm kindly asking you to test the implementation and give me some feedback. :-)
The conversion from HSB, which is used by OpenHAB2 internally, to RGBW left me pretty confused. ;-) -
I'll test it. Might take some days to get to it though ;)