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:1026The mosquitto shows me:
MyMQTT/27/5/1/0/4 1026The 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!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login