Shelly H&T

Good morning everyone. New user here and I'm hoping for some assistance in getting the Shelly H&T working with HE via MQTT.

I'm new to mqtt but after reading various posts and guides I have the following:
mosquitto running on my raspberry pi as a mqtt broker.
enabled mqtt on the Shelly and pointed it towards the broker on the rpi.
installed @Evilborg driver for the ShellyH&T, and added it to HE.
installed Kevin's mqtt driver and app for HE. My understanding is that this turns HE into an mqtt client which allows it to communicate with the Shelly over mqtt via the broker on my rpi.

After all this, the only variable returned by the Shelly H&T device in HE is "MQTTconnected : true", but nothing about the temperature or humidity!

Any advice on what to try next would be much appreciated.

I spent quite a bit of time trying to get these working reliably. I finally gave up and am offering a couple of these and one DW2 (Door / Window contact sensor) for free with $10 shipping for all.

Anyway, I had to go back and forth between the app and the browser version to configure it. Only way to get the MQTT settings was via the web. It was sort of hidden in the menu settings. I forget exactly where, as I have removed them from the app and reset them. Sorry I'm not very helpful.

Recently I was testing out several MQTT drivers on Hubitat and the only one that I got to work reliability and consistently was called "YAMA MQTT Driver". I have it accessing my MQTT Broker (Mosquitto MQTT running on a Raspberry Pi).

Thanks to both for your replies! I have installed YAMA instead of the previous driver that I was trying (it seems a lot more basic which is what I need).

I've managed to make some progress:
Using mqtt explorer app on my laptop I can see what information is being published to the mqtt broker. Using the "initialize" command on the shellyH&T device in HE makes the shelly publish its sensor data to the broker under the topic "shellies/shellyht-******/sensor/", so that's a start!
Unfortunately this still leaves two problems:

  1. The YAMA app doesn't look here to retrieve the information, it looks under the topic "hubitat/hubname/Shelly HT 1/attributes"
  2. The shelly only seems publish this information when I press initialise, as opposed to every time it wakes up.

Any further advice on how to solve these problems would be much appreciated!

TLDR: uppercase/lowercase mismatch meant that the shellyH&T driver wasn't picking up the MQTT events published by the shellyH&T device.

So after trawling through much code and learning a fair bit of about both groovy and MQTT, I've discovered a couple of things.

  1. You don't need the YAMA app or driver to work with the shelly driver, it will read out all the necessary information from the MQTT broker by subscribing to the relevant topics published by the shelly H&T device.
  2. The problem was in the code of the shellyH&T driver: it subscribes to a MQTT topic which is partially defined the by shelly device's 6 digit (hexadecimal, I think) ID number. The ID number for my shelly device had a "d" character in which was represented in lowercase in the shelly H&T driver, but uppercase in the MQTT topic published by the shelly device.

This was a relatively simple fix in the shelly driver, which I have done and so its now working. I will also be messaging the author to see if he will update the driver on github. In the meantime if anyone wants more details, just drop me a PM and I'll try to explain it.

edit: I have also noticed that this happened because when I input the shelly ID (in the preferences section when editing the HE device), I used lowercase.

If anyone happens to be using the Shelly Plus H&T, here is a driver that I found works really well: https://github.com/ShellyUSA/Hubitat-Drivers/blob/master/PLUS/Shelly-Plus-ht.groovy