openHAB binding
-
After reinstalling OpenHAB, the binding works fine, thank you!
Just a question, don't know if you can help.I mapped my serial gateway to /dev/MSgw because ttyUSBx tends to change when unplugging / replugging multiple USB devices into the computer (raspberry pi in my case).
I've also got a 433MHz gateway attached and when debugging have to unplug it sometimes.
When trying to start OpenHAB with /dev/MSgw as gateway address I get this:2016-02-14 10:58:33.418 [DEBUG] [.b.m.internal.MySensorsBinding] - activate RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB1 2016-02-14 10:58:34.048 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/MSgw'Do you know how/if I can still you my own custom paths to the gateway?
Now I changed it to ttyUSB1, but that port might change after rebooting. -
After reinstalling OpenHAB, the binding works fine, thank you!
Just a question, don't know if you can help.I mapped my serial gateway to /dev/MSgw because ttyUSBx tends to change when unplugging / replugging multiple USB devices into the computer (raspberry pi in my case).
I've also got a 433MHz gateway attached and when debugging have to unplug it sometimes.
When trying to start OpenHAB with /dev/MSgw as gateway address I get this:2016-02-14 10:58:33.418 [DEBUG] [.b.m.internal.MySensorsBinding] - activate RXTX Warning: Removing stale lock file. /var/lock/LCK..ttyUSB1 2016-02-14 10:58:34.048 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/MSgw'Do you know how/if I can still you my own custom paths to the gateway?
Now I changed it to ttyUSB1, but that port might change after rebooting.https://github.com/openhab/openhab/wiki/Serial-Binding
Note2: If you are using non standard serial ports you have to adapt start.sh to have the serial port included. the java command line should then include the following parameters:
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0
whereas ttyAMA0 is the path to your serial port. Please be aware to change all scripts you might use for startup (debug, automatic start in linux,...) -
@bkl Great work, much better than using rules. For me it worked on the first try. I will be very happy to test what I can.
Just one question, can we only read sensors, or can we interact, as in a relay switch? I tried to use V_LIGHT to add a light switch and got this log "Binding configuration of type 'mysensors' of item ‘Relay‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Invalid Type: V_LIGHT"Thanks
-
@bkl Great work, much better than using rules. For me it worked on the first try. I will be very happy to test what I can.
Just one question, can we only read sensors, or can we interact, as in a relay switch? I tried to use V_LIGHT to add a light switch and got this log "Binding configuration of type 'mysensors' of item ‘Relay‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Invalid Type: V_LIGHT"Thanks
@andredts said:
@bkl Great work, much better than using rules. For me it worked on the first try. I will be very happy to test what I can.
Just one question, can we only read sensors, or can we interact, as in a relay switch? I tried to use V_LIGHT to add a light switch and got this log "Binding configuration of type 'mysensors' of item ‘Relay‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Invalid Type: V_LIGHT"Thanks
Hi, made some more test, and saw that bidding suggests that I use V_STATUS, so I did. Now I can see the change in the relay status and I can even turn it OFF by the OH inteface, but I can´t turn it ON. Maybe I can´t turn it on because I use inverted logic, where High is OFF, does any off that makes sense?
Thanks
-
@andredts said:
@bkl Great work, much better than using rules. For me it worked on the first try. I will be very happy to test what I can.
Just one question, can we only read sensors, or can we interact, as in a relay switch? I tried to use V_LIGHT to add a light switch and got this log "Binding configuration of type 'mysensors' of item ‘Relay‘ could not be parsed correctly.
org.openhab.model.item.binding.BindingConfigParseException: Invalid Type: V_LIGHT"Thanks
Hi, made some more test, and saw that bidding suggests that I use V_STATUS, so I did. Now I can see the change in the relay status and I can even turn it OFF by the OH inteface, but I can´t turn it ON. Maybe I can´t turn it on because I use inverted logic, where High is OFF, does any off that makes sense?
Thanks
-
@andredts
Can you try and post the sketch you are using? Or are you using the RelayWithButtonActuator Example?I don't thing that the inverted logic should have anything to do with it.
@bkl
Hi, I´m using the MultiRelayButton 0.9b sketch, that I found here in the forum:0_1456141716367_Bot_es_relays.ino
If you like I can try RelayWithButtonActuator Example, but I like the other better because it works when the server is down, no aka from server to make the state change.
-
@bkl
Hi, I´m using the MultiRelayButton 0.9b sketch, that I found here in the forum:0_1456141716367_Bot_es_relays.ino
If you like I can try RelayWithButtonActuator Example, but I like the other better because it works when the server is down, no aka from server to make the state change.
-
@bkl
Working beautifully. I have three relay and three switches on the arduino, and no matter how fast I press them I got no miss command. ThanksI got one bug, but I think it is Openhab's, when I changed the item file with Openhab running and the switch in the user interface got inverted ON-OFF and OFF-ON.
-
Hi,
Today I was testing Motion and Door sensors. Motion worked as expected, but the door sensor only works if it's set in OH as a "switch" item(on and off feedback), if you set it as a "contact"(open/closed) item you get the log: " No item configured for "5;1;V_TRIPPED". I have used the example sketch for the sensor
-
Hi,
Today I was testing Motion and Door sensors. Motion worked as expected, but the door sensor only works if it's set in OH as a "switch" item(on and off feedback), if you set it as a "contact"(open/closed) item you get the log: " No item configured for "5;1;V_TRIPPED". I have used the example sketch for the sensor
-
Hi,
Today I was testing Motion and Door sensors. Motion worked as expected, but the door sensor only works if it's set in OH as a "switch" item(on and off feedback), if you set it as a "contact"(open/closed) item you get the log: " No item configured for "5;1;V_TRIPPED". I have used the example sketch for the sensor
-
@bkl
Thank you for your great work. Happy to help with what I can.Already tested and fully abandoned rules for setting up OpenHab with Mysensors.
Next I will try a analogic read, based on the dust sensor.
-
Hi.
I just added your binding and I am very happy for it because I have spent quite some time to figure out, how do I integrate mySensors in to Openhab.My setup
RPI2
did apt-get update && apt-get upgrade
OpenHab (openHAB runtime has been started (v1.8.1))
I have NRF24L01+ connected directly to RPI using SPI.
I am running PiGatewaySerial service and Iam able to see communication when i dosudo cat /dev/ttyMySensorsGatewayfor example
7;255;3;0;15;0 7;255;0;0;17;1.5.4 7;255;3;0;6;0 7;255;3;0;11;Humidity 7;255;3;0;12;1.0 7;0;0;0;7; 7;1;0;0;6;My problem is that openHab is unable to access /dev/ttyMySensorsGateway
I see error in my logs2016-03-11 23:30:11.288 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/ttyMySensorsGateway' java.lang.NullPointerException: null at org.openhab.binding.mysensors.internal.gateway.Serial.write(Serial.java:82) ~[na:na] at org.openhab.binding.mysensors.internal.MySensorsBinding.execute(MySensorsBinding.java:178) ~[na:na] at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) ~[na:na] at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) ~[na:na]I found @BastienVH post and modified /etc/init.d/openhab JAVA_ARGS_DEFAULT section and added at the end of defintion
-Dgnu.io.rxtx.SerialPorts=/dev/ttyMySensorsGateway"and restarted service
Sadly, there was no change.
Please can you help?Thank you.
-
Hi.
I just added your binding and I am very happy for it because I have spent quite some time to figure out, how do I integrate mySensors in to Openhab.My setup
RPI2
did apt-get update && apt-get upgrade
OpenHab (openHAB runtime has been started (v1.8.1))
I have NRF24L01+ connected directly to RPI using SPI.
I am running PiGatewaySerial service and Iam able to see communication when i dosudo cat /dev/ttyMySensorsGatewayfor example
7;255;3;0;15;0 7;255;0;0;17;1.5.4 7;255;3;0;6;0 7;255;3;0;11;Humidity 7;255;3;0;12;1.0 7;0;0;0;7; 7;1;0;0;6;My problem is that openHab is unable to access /dev/ttyMySensorsGateway
I see error in my logs2016-03-11 23:30:11.288 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/ttyMySensorsGateway' java.lang.NullPointerException: null at org.openhab.binding.mysensors.internal.gateway.Serial.write(Serial.java:82) ~[na:na] at org.openhab.binding.mysensors.internal.MySensorsBinding.execute(MySensorsBinding.java:178) ~[na:na] at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) ~[na:na] at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) ~[na:na]I found @BastienVH post and modified /etc/init.d/openhab JAVA_ARGS_DEFAULT section and added at the end of defintion
-Dgnu.io.rxtx.SerialPorts=/dev/ttyMySensorsGateway"and restarted service
Sadly, there was no change.
Please can you help?Thank you.
I use RP2 with internal serial connected directly to ATmega328 chip. So it is also a unconventional serial. And for that to work I had to put the line " -Dgnu.io.rxtx.SerialPorts=/dev/ttyMySensorsGateway" on my start.sh file, before the line that has ".jar"
Hope it helps
-
Hi.
I just added your binding and I am very happy for it because I have spent quite some time to figure out, how do I integrate mySensors in to Openhab.My setup
RPI2
did apt-get update && apt-get upgrade
OpenHab (openHAB runtime has been started (v1.8.1))
I have NRF24L01+ connected directly to RPI using SPI.
I am running PiGatewaySerial service and Iam able to see communication when i dosudo cat /dev/ttyMySensorsGatewayfor example
7;255;3;0;15;0 7;255;0;0;17;1.5.4 7;255;3;0;6;0 7;255;3;0;11;Humidity 7;255;3;0;12;1.0 7;0;0;0;7; 7;1;0;0;6;My problem is that openHab is unable to access /dev/ttyMySensorsGateway
I see error in my logs2016-03-11 23:30:11.288 [ERROR] [.o.b.m.internal.gateway.Serial] - Unable to find Serial port '/dev/ttyMySensorsGateway' java.lang.NullPointerException: null at org.openhab.binding.mysensors.internal.gateway.Serial.write(Serial.java:82) ~[na:na] at org.openhab.binding.mysensors.internal.MySensorsBinding.execute(MySensorsBinding.java:178) ~[na:na] at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) ~[na:na] at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) ~[na:na]I found @BastienVH post and modified /etc/init.d/openhab JAVA_ARGS_DEFAULT section and added at the end of defintion
-Dgnu.io.rxtx.SerialPorts=/dev/ttyMySensorsGateway"and restarted service
Sadly, there was no change.
Please can you help?Thank you.
On my last post I miss lid you, copping your own line, but actually to use raspberry internal serial you have to add to Openhab's start.sh "-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 " before the line with the ".jar" because the serial got to start before you run the biddings.
Hope it helps.
-
Hi thank you.
I solved my issue, but when I wanted to update my post, the thread was locked.Here in this post its said that I should create link to virtual port like this
sudo ln -s /dev/ttyMySensorsGateway /dev/ttyUSB20Pointing OpenHab binding to this port solved my problem.
I did try to add command line parameter to /init.d script for OpenHab but that did not work.
Cheers.
Pavel -
Hi I am new to openHAB how do you configure a relay node? I do see the node in the logs but the relay don't what to switch on or off. I have my temp and humidity sensors working already.
18:38:50.450 [INFO ] [.b.m.internal.MySensorsBinding:257 ] - New MySensor sensor found (Dimmable device of some kind): node-id=95, sensor-id=0 with type S_DIMMER * Example item: 95;0;V_STATUS - Binary status. (on/off) * Example item: 95;0;V_PERCENTAGE - Percentage value. 0-100 (%) * Example item: 95;0;V_WATT - Watt value for power metersRegards
Francois