MySensors 2.0 MQTT Gateway not receiving from OpenHab 1.8.3



  • Everything was working for the past year, mysensors 1.5.4 and openhab 1.8.3(Rasbian, Jessie), using MQTTGateway(arduino with W5100) and RPI2 with mosquito. I was having issues with the relay sensors not working after about 2 weeks, but a restart on the RPI and gateway would fix that for another 2 weeks. So I decided to upgrade to mysensors 2.0. Nothing I do allows me to receive or send info from openhab. In the startup in the openhab.log file I see this.0_1479435695549_openhab.log.PNG

    I have searched but have found nothing like it on the web. I can tell the messages are getting received from the MQTT Gateway from the NRF sensors with the serial out of the Gateway with the arduino IDE0_1479435830820_serial out of arduino gateway.PNG
    I can then see they get to the mosquitto on the RPI with MQTT-spy0_1479435876860_mqtt-spy.PNG
    Here is the openhab.cfg for the MQTT0_1479435928404_openhab.cfg.PNG
    here is the arduino GatewayW5100MQTTClient code, only changed ClientID, My_IP_Address, MY_GATEWAY_ADDRESS, MY_IP_SUBNET_ADDRESS and MY_CONTROLLER_IP_ADDRESS0_1479436025243_arduino gateway code.PNG
    Here is the default.items file in openhab, from what I can tell they are correct0_1479436071188_mqtt default.items.PNG
    So from what I can tell everything is working good except between the mosquitto and OpenHab which are both on the RPI. I have tried building a Test Openhab server on a second RPI2 and get the same thing. Not sure if this matters but Java on RPI2 is 1.8.0_65 and Mosquitto is 1.4.10
    When I updated to mysensors 2.0 I also updated the RPI and mosquitto, maybe an issue with the newest updates for these.



  • @typhoonss92
    OK I have figured out the issue and get it to connect to open hab now.
    For anyone having this issue, I was not totally understanding how this worked which is my fault but again it is not really explained very well. in previous mysensors1.5.4 if using MQTT Gateway sketch you told Openhab to connect to your mysensors gateway(Arduino + W5100) but going forward with mysensors 2.0 you tell Openhab to connect to Mosquito so you use your Openhab IP or loaclhost with the port. While it still grabs most sensor data from the 1.5.4 library I need to go thru and update all the sensors to the new mysensors 2.0 code.
    I hope all the screenshots help anyone trying to get this to work.


  • Mod

    Hi, I am trying to make a project like yours. Do you mind sharing some code? So far I was only able to install OpenHab2 and create the MQTT gateway, but sensor node can't talk to gateway over NFR24


Log in to reply
 

Suggested Topics

  • 22
  • 2
  • 3
  • 7
  • 132
  • 4

71
Online

11.4k
Users

11.1k
Topics

112.7k
Posts