GatewayW5100MQTTClient - Setup Best Practice



  • Hi There,

    I have been getting up and running with OpenHAB and mysensors over last few months and I just wanted to check with more experienced people my setup, as I have a few questions about connecting to openHAB. I've already spent a quite a few hours trawling through other posts on the forum and not found the answers to my questions.

    My setup is as follows:
    I have OpenHAB running nicely on a raspberrypi2
    I have two mysenors measureing temp and humidity working nicely
    I have Mosquitto up and running on the pi2 which is getting messages from my sensor nodes quite nicely too
    I have setup the mqtt binding with OpenHAB and I have been able to get my temp and humidity data into OpenHAB, which is great.

    My questions relate to topics and subscribing in OpenHAB? When I uploaded the GatewayW5100MQTTClient sketch I left everything as default but I see that it's possible to change publish and subscribe prefixes,

    1. What prefixes do people recommend to use??
    2. If I have added MQTT items in my items file Do I also still need to setup my binding configuration in the openhah.cfg file??

    Having read carefully through the MQTT binding wiki, I'm still a little unclear about these??

    #######################################################################################
    #####                        Binding configurations                               #####
    #######################################################################################
    mqtt-eventbus:broker=tcp://localhost:1883
    mqtt-eventbus:stateSubscribeTopic=/mygateway1-out/${item}/state
    
    

    I'm not even sure if these bindings are correct??

    When I loaded up the humidity sketch I defined the node ID as 3 and I get the following as my default topic mygateway1-out/3/0/1/0/1 for that node

    This isn't that meaningful and I was wondering how I make them more meaningful???

    Any guidance on the best practice for all of these setting would be very much appreciated.


Log in to reply
 

Suggested Topics

  • 22
  • 19
  • 132
  • 5
  • 3
  • 2

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts