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
-
RFM69 MQTT gateway radio send loop
Troubleshooting • 31 Oct 2019, 11:40 • alexelite 1 Nov 2019, 22:00 -
Switching from v1.5 MQTT gateway to ESP8266 MQTT Client gateway
OpenHAB • 1 Feb 2016, 18:41 • mbj 8 Mar 2016, 22:07 -
Boxes and Enclosures
Enclosures / 3D Printing • 29 Mar 2014, 21:02 • PITP2 31 Aug 2014, 19:27 -
PiDome Domotica/Home Automation
PiDome • 2 Sept 2014, 20:50 • John 13 Jan 2016, 22:53 -
Need help with Turning a LED On/Off with OpenHab and MQTT.
Troubleshooting • 24 Mar 2015, 19:19 • kunall 29 Mar 2016, 14:33 -
OpenHab mqtt binding only one topic
OpenHAB • 27 Jan 2015, 17:46 • mothpaul 28 Jan 2015, 15:37 -
Adding sensors and relays to serial gateway
Development • 8 Dec 2015, 16:09 • Tino 9 Dec 2015, 16:19 -
MySensors MQTT 'dialect' optionally Homie
General Discussion • 5 May 2021, 13:46 • Peter Loeffler 18 May 2021, 13:36