Edge Shelly drivers for Gen1 and Gen2 Devices

Shelly Gen2 Driver Update Notice

Name: Shelly Gen2 Device Driver V1.5
Driver ID: f3258c1d-b6e9-424d-8b3f-b1e8fe51c4ca
Version: 2023-09-25T18:57:32.621319938


In this update I have improved detection of when the Shelly device has gone offline due to something like a sudden power loss or being intentionally disconnected.

Previously, the driver may not be aware the device is no longer connected, and may not re-connect with the device when it was back online. The symptoms you may have experienced in this case are that updates were no longer being reflected in the SmartThings device, or attempting to control the device from SmartThings was no longer working.

This driver update implements a periodic monitor to check that the device is still connected, and if not, it will be shown as offline in the Smartthings app and reconnection attempts will be started and run every 15 seconds. The monitor checks status every 2 minutes, so any device that has been disconnected should be detected within 2 minutes.

I want to thank @BobR for highlighting this issue and helping me test the fix.


This update also includes code to support password authentication, however it is currently implemented only for plug-type devices, pending further testing. If anyone wants to try this out, you will have to use the web page interface to the Shelly plug device in order to enable authentication and set a password. That password then needs to be configured in the SmartThings Shelly plug device Settings screen. Once this new feature has been further tested I will expand it to all device types.


Still reading this? Here is extra credit work:

Run logs for the Gen2 driver and report back to me the frequency your device is sending these ‘ping’ notices:

2023-09-26T16:48:06.229401372+00:00 DEBUG Shelly Gen2 Device Driver V1.5  Plus PlugUS 1 received opcode=9.0, c=nil, d=nil, err=nil
2023-09-26T16:48:12.324596208+00:00 DEBUG Shelly Gen2 Device Driver V1.5  Plus PlugUS 1 received opcode=9.0, c=nil, d=nil, err=nil

I’d like to collect more data on what frequency each device type is using because I’ve found that it varies by device type. For example, in the above example, the US Plug device sends them every 6 seconds. This data will help me ensure optimal online monitoring frequency that works well for all devices.