NEW DRIVER AVAILABLE FOR GEN1 BATTERY POWER DEVICES
It has become clear that the majority of the Shelly devices that are battery powered do not stay awake to listen to wifi. Therefore the devices cannot be asynchronously awoken with HTTP commands or initialization requests. As such, my Gen1 driver, which uses HTTP, is not suitable for supporting them.
The exceptions to this rule are the Motion sensors (both original and Motion 2), which, although are battery powered, DO stay awake on the network and work fine with my existing driver.
** EDIT:** This may no longer be the case; please let me know if you use the motion devices and what your experience is. I will be adding support for motion devices to this driver.
Instead of using HTTP to communicate with the ‘sleepy’ battery powered devices, a more suitable approach is to use MQTT. And so I have developed a new driver that supports the Flood, Smoke, Button, Humidity&Temp, and Door&Window devices using MQTT.
10/18/23 EDIT: Now also supports Shelly Motion 1 and Motion 2 devices.
This requires an MQTT broker running on your network, which I know is not feasible for many of you, but unfortunately it is really the only way to integrate these devices.
The new driver is called Shelly Gen1 MQTT V1 and is now available on my test channel. I hope to get it moved to my regular shared channel soon, but want a couple weeks of user testing first. I also haven’t created a github repository for this yet.
If anyone is in a position to test these, I look forward to your feedback.
Instructions for Use
First, you will have to use the Shelly app to enable MQTT for the devices you want to integrate. This is done in the device settings menus.
All shelly devices publish their messages on an MQTT topic that begins with ‘shellies/’, therefore if you want to test to confirm your device is publishing updates to MQTT, you can subscribe to that top-level topic using a command like this (if using Mosquitto):
mosquitto_sub -v -h <ip address of broker or 'localhost' if on same computer> -t "shellies/#" -u <userid> -P <password>
Omit the userid & password parameters if not needed.
Once the Edge driver is available on your hub, do an Add device / Scan for nearby devices and a device called ‘Shelly MQTT Master’ will be created, and you will need to go into device settings and configure your broker information. Back on the Controls screen, you should see a status of “Connected to Broker”. Once you complete this, you can start onboarding your devices.
Since these battery-powered devices have to be woken up during discovery, you will physically have to go to the device and press its ‘wake’ button, but first initiate an Add device / Scan for nearby devices in the SmartThings app. Then press the button on the device. The supported devices listed above will be discovered and added as new devices.
That’s really all there is to it. There are no commands to be issued to these devices, only display of state data on the SmartThings device Controls screen, which is sent out by the device whenever it chooses to wake up. Of course all device states are available for automation routines.