Hello ,
Iam trying to connect shelly H/T with hubitat and i have found a driver using MQTT .
I have no background about the MQTT .
Any ideas for the shelly server ( default 192.168.33.3:1883 ) , device iP is known .
Hubitat driver i have to fill (MQTT Broker Address&port&IP).
any ideas ?
1 Like
I'm also trying to integrate a H&T sensor to hubitat for the first time and I know nothing about MQTT. I've followed the really helpful directions here to add the driver code from Githhub and add the device. I'm now stuck on the step of entering the data in the fields that are marked with a * on the device page, namely: MQTT Broker Address, MQTT Broker Port, Your Shelly Device ID
Any help would be much appreciated.
Any thoughts/advice anyone?
I'm a novice myself regarding MQTT, but firstly you need an MQTT Broker. This is software that you will have running on an always on computer. I use Mosquitto as a broker and I have this loaded on a Raspberry PI that sits on my local network (I use the same Raspberry PI for a few things - Mosquitto, Homebridge and MotionEye). I just got the Raspberry Pi and copied instructions online to load Mosquitto on it.
The MQTT broker (Mosquitto) is effectively, the man in the middle. You configure your device to publish updates to the Mosquitto broker and these are stored as topics. Hubitat, using an MQTT integration can then be set to subscribe to these topics and use that information.
In my use case I have an alarm system that can send out zone status for all of its detectors via MQTT. The alarm comms module is configured with the IP address of my Raspberry PI (192.168.0.110) running Mosquitto and the port on which the software listens (1883). The Hubitat app I use can then subscribe to those individual topics. I have created virtual devices in Hubitat for my alarm system detectors and I can then use those virtual devices in dashboards or automations. It has been quite handy as I can use the alarm PIRs as well as door contacts for motion lighting etc.
Another handy bit of free software is MQTT explorer. That can be on any PC/Mac and you can use that to connect to your Mosquitto broker and see the topics being updated in real time, so that you know messages are being received from your device and you know the full path of the topic to subscribe to. A screenshot from MQTT Explorer is shown below:
So in short you need to first load Moquitto onto any always on device. The Broker IP address will then be the IP address of that device and the Port will usually be 1883 by default. What I did was to just run Mosquitto on my Mac temporarily so that I could see it up and running. Once I'd proven it would work, I bought the Raspberry PI and loaded Mosquitto on that instead - I just needed to update that Broker IP from the Mac to the PI.
1 Like
This is really helpful, thank you so much.
So do the Shelly devices which are on the list of hubitat officially compatible devices also require a MQTT broker to be setup?