openHAB 2.0 binding
-
Thanks for making this binding! :)
One question, is there a specific reason motion (tripped) sensors have to be Contact items?
In OH2 all the Z-wave motion sensors are Switches (AFAIK) so it would be nice if the mysensor PIR's could also be Switches so I can just add these to my existing motion sensor groups and rules.(I tried setting a triggered channel as Switch but it didn't work)
@Alpoy check this discussion on GitHub. The question is still open.
@antonholmstedt reconnection is currently implemented in binding (look here). Feel free to open an issue if you experience reconnection fails in your environment :smiley:
-
@Alpoy check this discussion on GitHub. The question is still open.
@antonholmstedt reconnection is currently implemented in binding (look here). Feel free to open an issue if you experience reconnection fails in your environment :smiley:
@antonholmstedt reconnection is currently implemented in binding (look here). Feel free to open an issue if you experience reconnection fails in your environment :smiley:
Yes I have reconnection problems right now, so will open an issue :)
-
I was checking back on this bindning and it really has matured!
On GitHub I see that there are some updates referring to MqTT protocol.
Are they available in the JAR that is posted here?
http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jarKudos on the great work!
-
I was checking back on this bindning and it really has matured!
On GitHub I see that there are some updates referring to MqTT protocol.
Are they available in the JAR that is posted here?
http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.0.0-SNAPSHOT.jarKudos on the great work!
@Nicklas-Starkel Well no, MQTT Gateway is not yet supported. :-(
I got distracted by my current hardware project and need to catch up on the binding. First tests of the MQTT addition to the binding look very promising and I'll include it soon.The current release is this one: http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar
While preparing the code to be included in OpenHAB2 I'm currently changing some things that will break the current configuration / things files. But I will give some information about that with the release of the next version.
-
Hi @TimO, @andreacioni.
I am doing some "expert mode" rules where I need to get the NodeId of a specific sensors, or at least, to get all the configured Nodes Ids. Is that possible?
I would like to cron a rule where every X minutes, heartbeat request message is sent to all configured nodes, so as to see wether they are alive or not.
Thanks, regards.
-
Hi @TimO, @andreacioni.
I am doing some "expert mode" rules where I need to get the NodeId of a specific sensors, or at least, to get all the configured Nodes Ids. Is that possible?
I would like to cron a rule where every X minutes, heartbeat request message is sent to all configured nodes, so as to see wether they are alive or not.
Thanks, regards.
Hi @gonzalonal :smiley:
In the new version of binding we have implemented a (beta-)function that allows you to send heartbeat message at certain interval without the need to write your own rules.
Please take a lock at this gateway-parameter (you must have set enableNetworkSanCheck=true and sanityCheckerInterval).
With sanCheckSendHeartbeat parameter set you could also use this node-parameter to put your nodes offline after a certain number of failure.
I hope this function will help you!
-
Hi @gonzalonal :smiley:
In the new version of binding we have implemented a (beta-)function that allows you to send heartbeat message at certain interval without the need to write your own rules.
Please take a lock at this gateway-parameter (you must have set enableNetworkSanCheck=true and sanityCheckerInterval).
With sanCheckSendHeartbeat parameter set you could also use this node-parameter to put your nodes offline after a certain number of failure.
I hope this function will help you!
Hi @andreacioni . Thats a great feature.
But for the moment, I think I prefer doing it manually, by rules, because of the way in which I can show my offline nodes in my sitemap and configure custom notifications for them.For each node, I have a datetime item showing the time of last heartbeat response received. If more than 25' have passed (5 heartbeats request, 1 heartbeat request each 5 mins) without response, I fire up a notification telling that that specific node has gone offline.
So, back to my original question. Is there any way to get Node Ids at the rules engine?
Do you believe we can customize this kind of behavior with the beta feature proposed?
Thanks, regards.
-
@gonzalonal I have no clue! Could be possible, but better ask at the OH2 community because the node Id is something that is specified in the thing description (xml) and maybe it is possible to access this information in rules.
-
Does this happen to support MQTT gateways? You mention serial or ethernet, but openhab doesn't support ethernet so i'm assuming you mean ethernet as the mqtt ethernet gateway?
-
@Nicklas-Starkel Well no, MQTT Gateway is not yet supported. :-(
I got distracted by my current hardware project and need to catch up on the binding. First tests of the MQTT addition to the binding look very promising and I'll include it soon.The current release is this one: http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar
While preparing the code to be included in OpenHAB2 I'm currently changing some things that will break the current configuration / things files. But I will give some information about that with the release of the next version.
Just few posts before 😉
@TimO said in openHAB 2.0 binding:
@Nicklas-Starkel Well no, MQTT Gateway is not yet supported. :-(
I got distracted by my current hardware project and need to catch up on the binding. First tests of the MQTT addition to the binding look very promising and I'll include it soon.The current release is this one: http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.1.0-SNAPSHOT.jar
While preparing the code to be included in OpenHAB2 I'm currently changing some things that will break the current configuration / things files. But I will give some information about that with the release of the next version.
-
I'm sorry, I ran a ctrl+f search and it either didn't show or i completely missed it, thank you for the prompt reply though.
In this case then i will have to wait for this release then as i can't achieve what i need to do with rules. Do we have any idea when the release will be?
-
Hi, did anyone hit the problem when it seems that all works fine
and then mysensors plugin start to think that it failed connecting to bridge (even if it doesnt actually)Should I find newer version (last jar I found is since 2017-01-18)
I put message from node every 1 second, and in log you will see "0;255;3;0;9;TSF:MSG:READ...." every second
but every 10 second it recconects saying "Failed connecting to bridge...next retry in 10 seconds (Retry No.:31).... Shutting down serial connection!...17:40:21.656 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:468 17:40:21.657 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;468 17:40:22.421 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 17:40:22.424 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:31) 17:40:22.425 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection! 17:40:22.842 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:486 17:40:22.844 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;486 17:40:24.029 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:470 17:40:24.032 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;470 17:40:25.218 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:474 17:40:25.222 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;474 17:40:26.406 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:486 17:40:26.407 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;486 17:40:27.591 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:466 17:40:27.592 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;466 17:40:28.783 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:483 17:40:28.786 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;483 17:40:29.967 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:483 17:40:29.972 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;483 17:40:31.158 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:463 17:40:31.163 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;463 17:40:32.344 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:487 17:40:32.346 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;487 17:40:32.431 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB0 [baudRate:115200] 17:40:32.435 [DEBUG] [col.serial.MySensorsSerialConnection] - Final port list: /dev/ttyUSB0 17:40:33.530 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:470 17:40:33.533 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;470 17:40:34.438 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 17:40:34.440 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:32) 17:40:34.441 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection! 17:40:34.720 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:472 -
Hi, did anyone hit the problem when it seems that all works fine
and then mysensors plugin start to think that it failed connecting to bridge (even if it doesnt actually)Should I find newer version (last jar I found is since 2017-01-18)
I put message from node every 1 second, and in log you will see "0;255;3;0;9;TSF:MSG:READ...." every second
but every 10 second it recconects saying "Failed connecting to bridge...next retry in 10 seconds (Retry No.:31).... Shutting down serial connection!...17:40:21.656 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:468 17:40:21.657 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;468 17:40:22.421 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 17:40:22.424 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:31) 17:40:22.425 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection! 17:40:22.842 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:486 17:40:22.844 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;486 17:40:24.029 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:470 17:40:24.032 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;470 17:40:25.218 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:474 17:40:25.222 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;474 17:40:26.406 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:486 17:40:26.407 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;486 17:40:27.591 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:466 17:40:27.592 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;466 17:40:28.783 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:483 17:40:28.786 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;483 17:40:29.967 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:483 17:40:29.972 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;483 17:40:31.158 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:463 17:40:31.163 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;463 17:40:32.344 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:487 17:40:32.346 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;487 17:40:32.431 [DEBUG] [col.serial.MySensorsSerialConnection] - Connecting to /dev/ttyUSB0 [baudRate:115200] 17:40:32.435 [DEBUG] [col.serial.MySensorsSerialConnection] - Final port list: /dev/ttyUSB0 17:40:33.530 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:470 17:40:33.533 [DEBUG] [rs.internal.protocol.MySensorsReader] - 202;1;1;0;37;470 17:40:34.438 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 17:40:34.440 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:32) 17:40:34.441 [DEBUG] [col.serial.MySensorsSerialConnection] - Shutting down serial connection! 17:40:34.720 [DEBUG] [rs.internal.protocol.MySensorsReader] - 0;255;3;0;9;TSF:MSG:READ,202-202-0,s=1,c=1,t=37,pt=2,l=2,sg=0:472@Igor-Antolić huh,... my mistake, just installed 2.1.0 instead of 2.0.0. It seems it is from 2017-03-07.
I dont have a good way to find last version of lib. Any suggestion how to check if last stabile version of mysensors java lib?
-
@Igor-Antolić huh,... my mistake, just installed 2.1.0 instead of 2.0.0. It seems it is from 2017-03-07.
I dont have a good way to find last version of lib. Any suggestion how to check if last stabile version of mysensors java lib?
@Igor-Antolić I'm glad it worked after the update!
It currently is not possible to automatically update (or check) for the most recent version. There are currently two sources for the binding:
- the IoT Marketplace
- The link in the wiki on github
The most convenient way is the integration in the official openhab2-plugins repository and I'm working on it, but I still have a lot of homework to do.
Maybe the IoT Marketplace will soon support such mechanisms, there are a few extensions planned.
-
I'm sorry, I ran a ctrl+f search and it either didn't show or i completely missed it, thank you for the prompt reply though.
In this case then i will have to wait for this release then as i can't achieve what i need to do with rules. Do we have any idea when the release will be?
@Samuel235 said in openHAB 2.0 binding:
In this case then i will have to wait for this release then as i can't achieve what i need to do with rules. Do we have any idea when the release will be?
What is it, what you want to achieve? I'm running MQTT too, as a connection between OpenHAB2 and nodered (50% of my rules are now nodered based). My gateways are serial or ethernet based.
serial / ethernet gateway
<->
OpenHAB2 binding
<->
MQTT Event bus
<->
nodered@Samuel235 Are you willing and have the ability to test the MQTT implementation of the binding? Any help is really appreciated!
-
Guys,
I am getting this in Karaf :
16:20:33.171 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP PUT request at 'items/MySensorsDevice21_Lock' with an invalid item type 'Status'.and this in PaperUI
"ERROR : undefined - undefined" "some error occured"when trying to link "Lock status" of an rfid node to an item in PaperUI...
Is that anything to do with the binding ? Or shall i ask eslewhere ?
Thanks a lot for your help (in general as well ;) )
-
@Samuel235 said in openHAB 2.0 binding:
In this case then i will have to wait for this release then as i can't achieve what i need to do with rules. Do we have any idea when the release will be?
What is it, what you want to achieve? I'm running MQTT too, as a connection between OpenHAB2 and nodered (50% of my rules are now nodered based). My gateways are serial or ethernet based.
serial / ethernet gateway
<->
OpenHAB2 binding
<->
MQTT Event bus
<->
nodered@Samuel235 Are you willing and have the ability to test the MQTT implementation of the binding? Any help is really appreciated!
@TimO - I have implemented a work-around for the issue that i was facing. OpenHAB just can't handle a empty MQTT message, so there is a fix for the pulse sensor to work with OpenHAB by changing the message that it send over to the MQTT server.
If you're interested in how this is done, please refer to: https://forum.mysensors.org/topic/3088/pulse-power-meter-with-openhab/4
I will be documenting this in possibly better to read steps for people when I get chance to finish the documentation to my new hardware node for the Pulse Sensor.
-
@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
Hello, i'am trying to connect a RGBW node by the serial gateway, is there already a solution for the hexstring format in the bindings or do we need to handle the rgbw items separatly ?
kind regards
Roger -
@LastSamurai
Hello, i'am trying to connect a RGBW node by the serial gateway, is there already a solution for the hexstring format in the bindings or do we need to handle the rgbw items separatly ?
kind regards
Roger@RVMRVM could you give this one a try?
https://github.com/tobof/openhab2-addons/issues/76
It is not yet integrated into the main branch. If you could test it and give me some feedback I would be very grateful. :)
-
@RVMRVM Sorry I haven't had the time to test anything yet (was working on another project). Might take me a while to get to.