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
-
openhab controlling rc switch on raspberry pi
OpenHAB • 4 Sept 2015, 16:55 • siod 5 Sept 2015, 11:01 -
💬 Sonoff relay using MySensors ESP8266 wifi or mqtt gateway
OpenHardware.io • 20 Jan 2017, 16:20 • openhardware.io 29 Oct 2018, 08:03 -
serial, Ethernet to MQTT
MyController.org • 14 Jun 2021, 09:38 • jkandasa 14 Jun 2021, 16:56 -
Yet another MQTT gateway for MySensors :)
Development • 11 Aug 2014, 20:52 • scurb 16 Aug 2014, 20:59 -
testing with different controllers (mqtt brokers)
Controllers • 4 Jan 2023, 16:48 • OldSurferDude 5 Jan 2023, 07:26 -
Is MQTT Necessary? or, Use Case for MQTT?
Controllers • 28 Mar 2016, 01:12 • TRS-80 9 Jan 2020, 09:01 -
My final setup to get MySensors and OpenHab communicating via MQTT
OpenHAB • 28 Jul 2016, 04:10 • Eric Buhring 21 Jun 2017, 20:06 -
Can't get message from OpenHab to MySensor
OpenHAB • 26 Jul 2016, 05:30 • A Former User 27 Jul 2016, 04:58