MQTT gateway - Openhab & Mosquitto
-
Hi guys, I am running 1.4 version of mqtt gateway with some sensors.
What I found that in my case if I subscribe to MQTT gateway directly using mosquitto ( to check sensors communication ) , it will disconnect OpenHab client and will never reconnect until I restart Openhab mqtt bundle or the gateway. I wonder if there any workaround to this .. or is it maybe possible to somehow subscribe to mqtt using mosquitto and forward these under different topic to openhab ? That would make it easier instead of configuring 2 different brokers in Openhab.
Appreciate any suggestions.....
-
set the mysensor gw to connect to mosquito, then Openhab to Mosquito
-
Do you know what would I need to configure for this to work automatically ?
Does mosquitto automatically re publish topics its subscribed to ?
-
@alexeinz figured it out, apparently had to add experimental and get latest mosquitto for the conf file to work correctly , now the bridge is working perfectly
--- broker.conf file in /etc/mosquitto/conf.d
the topics coming from gw will appear under sensor/# on mosquittoconnection MMQTTtoSensor
address 192.168.1.234 <-gw ip
clientid MyMQTT
cleansession true
notifications true
topic # in 2 sensor/ MyMQTT/
Suggested Topics
-
HomeGenie via MQTT
HomeGenie • 22 Feb 2015, 19:47 • Cpt Jack 26 Sept 2015, 16:31 -
Openhab 2 Mysensors smart chicken coop
My Project • 1 Mar 2017, 02:08 • Ticupolu 8 Mar 2017, 15:48 -
Watchdog on 2.0
General Discussion • 11 Sept 2016, 16:10 • CrankyCoder 7 Jan 2017, 11:57 -
WizNet5100 ethernet module chip temperature
Troubleshooting • 21 Jan 2015, 17:08 • bomber 25 Jan 2015, 22:13 -
ESP8266MQTTClientGateway
Bug Reports • 30 Jan 2016, 10:26 • mbj 30 Jan 2016, 14:16 -
MQTT Client Gateway / Node Controller / OTA
Hardware • 19 Jul 2016, 15:01 • CrankyCoder 26 Jul 2017, 13:32 -
NRF51822
General Discussion • 1 Apr 2020, 12:18 • Puneit Thukral 3 Apr 2020, 11:07 -
Can't get OpenHAB2 to see my MQTT messages
OpenHAB • 9 Apr 2016, 20:01 • micah 2 Jul 2017, 21:42