MySensors 2.0: can't get openhab item definition
-
Hi,
I'm running openhab 1.8.3 and a mys-mqtt gatway (Version1.5). Everything works fine, but I want to upgrade to MySensors 2.0.
I built the raspberry mys-mqtt gateway version 2.0, which seems to work fine, as it finds some of my sensors. At the moment I'm not sure, why it doesn't see all sensors, might be because of the small antenna.
The question is: how do the openhab items have to be defined.
The gateway shows this output for my pressure sensor:mysGateway: Sending message on topic: MyMQTT/0/255/0/0/18 mysGateway: TSF:MSG:READ,27-27-0,s=5,c=1,t=4,pt=7,l=5,sg=0:1026 mysGateway: Sending message on topic: MyMQTT/27/5/1/0/4 mysGateway: Message arrived on topic: MyMQTT/27/5/1/0/4 mysGateway: TSF:MSG:SEND,0-0-27-27,s=5,c=1,t=4,pt=0,l=4,sg=0,ft=0,st=OK:1026
The mosquitto shows me:
MyMQTT/27/5/1/0/4 1026
The corrsponding openhab item (which works for my mqtt gateway version 1.5) looks like:
Number node27_pressure "Luftdruck [%.1f hPa]" <sensor> (gMySensors,gInfluxDB) {mqtt="<[mysensor:MyMQTT/27/5/V_PRESSURE:state:default]"}
I fear, this old item definition isn't compatible with mysensors 2.0 any more, right?
Regarding to the documentation and the mqtt message I think the mqtt-part in the items definition needs to be changed. Is there already a documentation available?My assumption is for MyMQTT/27/5/1/0/4
27= nodeID (obvious)
5 = sensorID (obvious, too)
1 = message-type (set), when do I need req?
0 = ack (no idea, what this is for)
4 = variable definition (4=V_PRESSURE)Provided, my assumtion is correct: when do I need to use set and req (message-type). Which value do I need for ack?
I also have items, which send commands from openhab to actuator, likeSwitch node24_sw0 "Schalter Ringleitung" <socket> (gMySensors,gInfluxDB,gAbstellkammer) {mqtt=">[mysensor:MyMQTT/24/0/V_LIGHT:command:ON:1],>[mysensor:MyMQTT/24/0/V_LIGHT:command:OFF:0]"}
How do I need to set the mqtt part than?
Thanks for every tipp!
-
Is nobody using openhab 1 in combination with MySensors2.0?
-
You need to change the MQTT topics in the OpenHab MQTT config.
MYS 2.0 is publishing data to this topic.
MyMQTT/27/5/1/0/4
However openhab is subscribing to this topic.
MyMQTT/27/5/V_PRESSURE
Hope this helps.
Suggested Topics
-
Boxes and Enclosures
Enclosures / 3D Printing • 29 Mar 2014, 21:02 • PITP2 31 Aug 2014, 19:27 -
openHAB 4 MySensors Binding
OpenHAB • 1 Aug 2023, 22:19 • ben999 7 Feb 2024, 14:25 -
openHAB 2.2 binding
OpenHAB • 18 Jul 2017, 12:49 • TimO 23 Dec 2020, 14:32 -
OH3 - MySensors Binding
OpenHAB • 17 Dec 2020, 16:35 • Peter Loeffler 3 Dec 2023, 09:37 -
OH3, RPi3, GPIO-NRF24 gateway. MySensors binding (ETH or MQTT?)
OpenHAB • 30 Sept 2021, 10:24 • perIpI 1 Oct 2021, 09:19 -
OH2.5.9 / ethernet gateway / autodiscovery?
OpenHAB • 20 Oct 2020, 15:31 • Stefferd 22 Oct 2020, 13:38