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
-
SmartSleep a feature of the Gateway
Feature Requests • 18 Jun 2017, 21:05 • strangeoptics 19 Jun 2017, 10:43 -
Mysensors - Keep alive / LWT (last will, testament)?
General Discussion • 25 Aug 2015, 08:10 • ahhk 25 Aug 2015, 10:41 -
MySensorsTracker - a simple logger for MySensors MQTT messages
My Project • 5 Aug 2021, 08:44 • canyouhearmenow 1 Nov 2021, 15:18 -
💬 MqGateway
OpenHardware.io • 16 Mar 2021, 20:15 • openhardware.io 31 Aug 2022, 20:18 -
Can't get OpenHAB2 to see my MQTT messages
OpenHAB • 9 Apr 2016, 20:01 • micah 2 Jul 2017, 21:42 -
Switching from v1.5 MQTT gateway to ESP8266 MQTT Client gateway
OpenHAB • 1 Feb 2016, 18:41 • mbj 8 Mar 2016, 22:07 -
Gateway or mqtt?
General Discussion • 21 Nov 2016, 03:03 • Michael_K 22 Nov 2016, 09:05