openHAB 2.0 binding
-
@andreacioni The difference is that I never get a response from the board for some reason. Connecting using screen works without issues. I think the still might be an issue with the serial lock, but given that we actually receive some data at all this might not be the case after all.
Edit: I have rebooted the board by unplugging it and reconnecting it.
@kolaf Could you try link the serial port to another name (ln -s /dev/mysensorsUSB /dev/ttyS80)
-
I just tried disconnecting and reconnecting the board and restarting OH2 again, and this time it seems to have initialised correctly :-). I'm not sure why it didn't work the first two times, though.
-
I just tried disconnecting and reconnecting the board and restarting OH2 again, and this time it seems to have initialised correctly :-). I'm not sure why it didn't work the first two times, though.
@kolaf Perfect! ;)
-
Now that things seem to be working on all levels, I have a very small request. Could someone please update the "baro" thing definition to include "V_PRESSURE" as well as "V_FORECAST"? My arduino is not big enough to calculate the forecast without running out of memory, so I can only send the actual barometric pressure.
Edit: Perhaps it is better to replace forecast with pressure for baro and create a new channel for the forecast?
What would also have been great, but this is a longer shot, would be to have some standardised way of getting received signal strength for the (at least directly connected) sensors. At least the RFM69 has an easy way of reporting RSSI, so just need a standard way of reporting this to the binding. Currently I'm reporting it as a generic debug message like this: 0;255;3;0;9;Received RSSI: -32
The reason I want to keep track of this is to keep an eye on the RF environments around my sensors. Things may change for many reasons (appliances, foliage, et cetera) and this will allow me to pre-emptively correct any problems in the future :-)
-
Hi @undee
Can you post your node firmware version and log of OH2? It's very important for us to troubleshoot your problem.
Thanks!Here is the output generated after restarting the TimeAwareSensor sketch from the MySensors examples.
You can see that the I_TIME (3;0;1) message is received by the gateway several times, but it never sends a response to the node.
Do you need anything else?
12:20:59.677 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0-beta) 12:20:59.683 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Radio init successful. 12:20:59.683 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;14;Gateway startup complete. 12:20:59.683 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;Init complete, id=0, parent=0, distance=0 12:20:59.683 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'mysensors:bridge-ser:2dc775c4' changed from INITIALIZING to ONLINE 12:20:59.776 [DEBUG] [g.mysensors.protocol.MySensorsWriter] - Sending to MySensors: 0;0;3;0;2; 12:20:59.782 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;2;2.0.0-beta 12:20:59.782 [DEBUG] [s.internal.MySensorsBridgeConnection] - Good,Gateway is up and running! (Ver:2.0.0-beta) 12:21:01.067 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=1,pt=0,l=0,sg=0: 12:21:01.071 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;1; 12:21:01.076 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=15,pt=0,l=2,sg=0: 12:21:01.119 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;send: 0-0-167-167 s=255,c=3,t=15,pt=0,l=2,sg=0,st=fail: 12:21:01.125 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=0,t=17,pt=0,l=10,sg=0:2.0.0-beta 12:21:01.128 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;0;0;17;2.0.0-beta 12:21:01.131 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=6,pt=1,l=1,sg=0:0 12:21:01.134 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;6;0 12:21:03.135 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=11,pt=0,l=5,sg=0:Clock 12:21:03.138 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;11;Clock 12:21:03.144 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=12,pt=0,l=3,sg=0:1.0 12:21:03.146 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;12;1.0 12:21:11.059 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=1,pt=0,l=0,sg=0: 12:21:11.061 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;1; 12:21:21.061 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=1,pt=0,l=0,sg=0: 12:21:21.063 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 167;255;3;0;1; 12:21:31.063 [DEBUG] [g.mysensors.protocol.MySensorsReader] - 0;255;3;0;9;read: 167-167-0 s=255,c=3,t=1,pt=0,l=0,sg=0: -
New version of the binding available!
- A requestTime from a node is now answered by the controller. Is anyone able to test it? (@undee )
- The controller will answer a request for "imperial or metric" like temperature sensors might ask. We need to test that too.
Big thanks @andreacioni for the implementation and @Francois for testing/reporting!
I've added an example page in the wiki: https://github.com/tobof/openhab2-addons/wiki/Examples
These are the type of things I'm currently using. (SensebenderMicro, Humidity, Temperature, Cover, Motion, Light ...)Has anyone additional examples yet?
-
Hey @andreacioni & @undee , thanks for the test & fix!
I've merged the PR. -
Hey @andreacioni & @undee , thanks for the test & fix!
I've merged the PR.Hi @TimO ! I want to tell you an idea for the OH2 binding. What do you think about adding a date time channel to every thing that hold the last communication of the thing with the gateway? For example, it will be useful if you want to notify user that some sensors have become unavailable. Tell me what do you think! :)
-
Hi @TimO ! I want to tell you an idea for the OH2 binding. What do you think about adding a date time channel to every thing that hold the last communication of the thing with the gateway? For example, it will be useful if you want to notify user that some sensors have become unavailable. Tell me what do you think! :)
@andreacioni This can be easily done with a periodic rule that checks the latest update of the value assuming you have some persistence like rrd configured.
-
@andreacioni This can be easily done with a periodic rule that checks the latest update of the value assuming you have some persistence like rrd configured.
Hi @kolaf, yes this is how to do it. But my idea is to integrate the datetime channel into the binding in order to automatically update that value when updates are received. I think is better than have to do rules into OH config for each devices. What do you think?
-
Hi @kolaf, yes this is how to do it. But my idea is to integrate the datetime channel into the binding in order to automatically update that value when updates are received. I think is better than have to do rules into OH config for each devices. What do you think?
@andreacioni Sure, getting automatically configured alerts both for silent sensors and low battery for free would be great ☺️.
-
Hi @kolaf, yes this is how to do it. But my idea is to integrate the datetime channel into the binding in order to automatically update that value when updates are received. I think is better than have to do rules into OH config for each devices. What do you think?
@andreacioni i support your idea to implementing this in the bindning.
-
Hi @andreacioni !
I can't decide if I like the idea or not. :-)
For sure, the result is needed. I currently have a rule that does store the last update from a sensor. In fact, I have a few rules, for all my battery powered sensors, so a reduction in the number of rules would be great.
BUT I suppose implementing this in the binding is not the OpenHAB-way, because the binding is only the interface to the hardware and should be lightweight. -
Open query.
I think it is a bit boring that when you give the sensor a new adress that you have to power cycle the device to get it added. I can see that the sensor is starting to transmitt with the new address but The binding is not finding it as a new device. I can see that this happens becouse the sonsor dont present it self to the binding. how ever what about implementing a feature that asks the sensor for data when it just gave out a new address. I have also asked for mySensor to add the feature that when the node gets a new adress that it should present it self.Which way do you see as best? Or is it nothing that can be one?
-
Does the ack signaling work in the binding? I have a sensor that will request an ack from the gateway. Does anyone know if this is working?
-
Does the ack signaling work in the binding? I have a sensor that will request an ack from the gateway. Does anyone know if this is working?
@Denke yes acknowledge is actually implemented in binding :)
-
@Denke yes acknowledge is actually implemented in binding :)
@andreacioni
Hi I have trouble finding out how to get my node to request ack, do you know how. I think i have figured out how to handle incoming message to check that the ack is received ant that is through message.isAck().But how do i get the node to send a request for ack?