Test Shelly H&T

A hygrometer and a thermometer that go into a ball !

I really appreciate Shelly products because I find them accurate, easy to use, not expensive and they integrate very well into a home automation solution such as Apple HomeKit or other…

And especially that Shelly products offer open API’s.

I was looking for (without realizing it myself) a module to follow the temperature and hygrometry of a room, a wine cellar . But to find an accurate one, with usable data and not expensive, it’s even better, so I looked at what Shelly proposed : The H&T Module

H&T Module

The Shelly H&T comes in a small 6.5 x 6.5 x 4.5 cm cardboard package in a cool white and blue glossy print. Highlighted are: Wi-Fi operation, SSL connectivity, cloud service… and a cool pun with MAKE IoT SIMPLE….

Made of white plastic, the quality isn’t crazy but it’s not a product that will be handled. Let’s just say it looks like it was 3D printed at home. It unclips to allow access to the battery compartment but also to a button that you will use for installation. There is also a small LED that will give the status of the set.

You will need a Lithium battery type CR123A to operate this module but I strongly recommend the optional USB power module, you will understand later (for my tests I had this module)

Installation and use

Allterco Robotics has developed the Shelly application (download on your store linked to your smartphone) to control all its products and provide them with a single ecosystem. I might as well tell you right now, it has its advantages, but the installation system for the H&T module is simply lousy ….. 😬

It is first necessary to create an account under the application. In order to proceed with the installation, it is also necessary to create one or several rooms. Indeed, the installed products must be associated with a zone in order to be usable. To create these rooms, select “Add room” and let yourself be guided. You can put the photo you like, name it…

At the same time, put the module in pairing mode. To do this, press the black push button for a few seconds. A red LED will light up and should blink slowly. This LED will have different status:

  • Fast blinking: AP pairing mode
  • Slow blinking : STA mode (without cloud)
  • Fixed: connected to the cloud (STA)
  • Once connected, fast blinking: update

Once this is done, in the application, press “Add Device”, select and enter your Wi-Fi settings and leave it alone. Once the module is detected, select it and add it. You will be returned to the home screen and you will have to wait for a message announcing that the product is available and attached to your Wi-Fi network.

Attention, there is a subtlety. In order to proceed, you will have to turn the module back on by pressing the inner button again, as the latter has gone into standby mode. A simple press is enough.

The problem is there !!! is that this sensor goes into standby and is no longer accessible it is no longer seen in the application and is no longer accessible by its IP address. and especially their slogan for this product: make ioT SIMPLE …. Is not really true …(Temperature and humidity data cannot be accessed in real time) Now everything depends on the use you want to have such a sensor.

After looking carefully at the API for this module, it is specified: The H&T module is not accessible in sleep mode. It wakes up to report data once every 12 hours on battery and once every 10 minutes on USB (that’s why I recommend the USB power module).

A statement every 12 hours seems to me little for a precise use a management of temperature and hygrometry, every hour would be better … I opened a case to Shelly support(they are really very reactive), I was told that the fact that the module wakes up every 12 hours on battery is for a better autonomy of this one for my use it advises me to use the USB power module.

To continue my tests I simulated that I had the USB power module.I configured the module via the API. I set the external_power input to 1 with the following command :

$ curl http://ip_addr_module/settings?external_power=1**

In my Home automation environment I have an MQTT server that I use and an InfluxDB database.I will configure my H&T module to send Temperature and Humidity data to my MQTT server which will be queried by my Telegraf agent who will save the temperature values in my InfluxDB database.

The first thing to do is to disable Cloud registration and configure access to the MQTT server.I will not detail in this post the installation of a MQTT Server, but it is very simple (I use a Raspberry PI with a Mosquitto MQTT server). To disable the cloud you can do it through the application or a simple API command :

$ curl http://X.X.X.X/settings?cloud_enabled=false
$ curl http://X.X.X.X/settings?mqtt_id=shellyht-chambre3&mqtt_enable=true&mqtt_server=Y.Y.Y.Y:1883&mqtt_retain=true
  • The first command disables the cloud service
  • The second command setup the access to the MQTT server, In case authentication is required dor your MQTT server , mqtt_user and mqtt_pass must also be set. In certain scenarios, it may be desirable to set mqtt_max_qos and mqtt_retain to prevent loss of data.

X.X.X.X : IP Address of the H&T module

Y.Y.Y.Y : IP Address of the MQTT server

As MQTT client I use MQTT Explorer, which I find very nice.

The entry in my Telegraf configuration file is as follows:

# # Read metrics from MQTT topic(s)
 [[inputs.mqtt_consumer]]
  servers = ["tcp://127.0.0.1:1883"]
  topics = [
     "shellies/shellyht-chambre3/sensor/temperature/#"
  ]
  topic_tag = "HT"
  data_format = "value"
  data_type = "float"

About every 10 minutes I have a message sent to the MQTT server and my Telegraf agent takes a reading every 10s and stores it in the InfluxDB database.

This query gives me the last temperature value stored in the InfluxDB database and displays the result in my dashboard :

SELECT last("value") AS "mean_value" FROM "homekit"."thirty_days"."mqtt_consumer" WHERE time > :dashboardTime: AND time < :upperDashboardTime: AND "HT"='shellies/shellyht-chambre3/sensor/temperature'

Conclusion

In conclusion,although the installation is calamitous the H&T Shelly WiFi thermometer is a real success. Its precise data (but quite important EMT) will delight people who want to have a follow-up of the humidity and the temperature in a room, a closed space or other. But you’ll have to order the USB power module, because a reading every 12 hours seems to me not very appropriate for a temperature and humidity monitoring use.

This small connected ball is an effective hygrometer and thermometer for Apple HomeKit (through HomeBridge) Amazon Alexa and Google Assistant, but also and especially for those looking for Wi-Fi devices working locally for a home automation box. Its price is accessible (about 35 euros with the USB power module)

Resources :

Shelly API

Shelly H&T Documentation

MQTT Explorer

Thank You grommet, grommet