Edge Shelly drivers for Gen1 and Gen2 Devices

Hi Todd, after a long time I got around to testing other SHELLY devices. I came across one anomaly with SHELLY 1 PM, this device also measures consumption, I compared the total consumption data displayed by the SHELLY app and what smarthings shows and there is a big difference of 1000wh. You don’t know what the problem could be? I compared other things like temperature, humidity, voltage in both apps and they are completely accurate. only total consumption. shely calculates it based on the performance and how much time was consumed, I assume that smarthings should only read from SHELLY the calculated final value, am I wrong?

Interesting finding. I don’t know why they would be different. What is received from the device is in units of watt-minutes and that is converted to watt-hours by the driver by dividing by 60 and then what you see displayed on the control panel is kW-hours so then divided by 1000.

I’ll try it with my 2.5 and see if I see a similar misalignment.

UPDATE: I’m running a small heater on a Shelly Plug device and I’ve already noticed that the SmartThings device shows a total power consumption value, but the graph in the app isn’t even registering anything yet. Is it possible what you are seeing is a lag in the data being tracked and reported via the cloud vs. the realtime data being reported by the device?

well thank you,

I’ve only had it running for two days, I’ll keep an eye on whether it keeps growing differently or if the difference fluctuates randomly. it’s really weird. Maybe Shelly, when it interprets the total consumption, updates it in the total sum with a delay after the end of the day, or today’s consumption can be displayed exactly tomorrow. I will try to write down the value in SmartThings in the evening when there is no more consumption and then compare it with Shelly by lunchtime tomorrow

1 Like

the problem is clarified, it is as you wrote. in the app shell, the total balance is loaded with a delay, there is no “hourly statistics”, that is, only after whole days is the total consumption calculated, when you look at it during the day, the values ​​are different compared to smarthings, where the current values ​​are already interpreted. it cannot be fully tracked because when there is a lot of consumption, smarthing records it, but Shelly does not add it to the total balance yet. just turn off the subscription and wait 24 hours and compare how the consumption remained after turning off the cloud in smarthing and how it is then shown in the app shells.
thanks Todd for the tip.

1 Like

I was thinking of doing a project were I add a dumb outdoor pir motion sensor to a shelly 1 wifi relay and I was wondering would this edge driver be able to read the binary sensor for the SW input from my pir sensor? would that be open and closed or something? and also be able to read the o input to turn the light on and off?
like this

Yes - There is an input field that reflects the state of the device input (‘on’ or ‘off’), which you can use in automations.

Is there a way to show the negative values on the EM3? I have solar production and it won’t show when I’m exporting electricity.

Does the EM3 device itself and the Shelly app support negative values?

Unfortunately the SmartThings energyMeter capability doesn’t support displaying negative numbers. Perhaps this need to be a feature request to SmartThings.

However, I see nothing in the base capability definition that prevents the energy attribute from being negative, so it’s possible that it could technically hold a negative number. We’d have to run some experiments to see.


Latest Version is now: 2023-02-08T00:25:35.332549364

I’ve pushed out a minor update that includes two changes:

  1. Addition of 2 input fields to the 2.5 device (relay mode only) (@alexo91) to allow automations to trigger based on the SW inputs. You will have to create a new device if you want to use these new fields.

  2. Fix to Uni device input updates


Yes it does.

After installing the latest Gen2 driver i am only seeing one Shelly device, PM 1 1.

What other devices do you have?

Are they all configured as discoverable in the Shelly app?

I assume you scanned for devices multiple times?

So after much consternation I unenrolled from your channel, rebooted the hub, reenrolled, and rescanned. Most of the devices showed up!!! Had one Plus 1 that did not but manually installing worked on that device. The I4 discovered by itself, and 3 other Plus 1’s

Thanks for the response!!!

1 Like

Glad you made progress. Although I need to warn you that the manual device creation is not really supposed to be used, and although you can initiate things FROM SmartThings for that device, you may not be getting updates from the device itself.

The manual creator is included right now for testing purposes but I wanted to remove it as long as the auto discovery was working, which it should be; so I’m wondering why that one device is not being discovered. :thinking: Let me know if it ever pops up in future device scans (I assume it is enabled for discovery in the Shelly app?). If it does, use that device and delete your manually created one.

If manual device creation turns out to be needed in some cases, I’ve got to make some updates to the driver to make those devices fully functional.

Where do I make sure it’s discoverable at?

You’d have to see if there is anything in the Settings to turn it on or off. It may not be there for GEN2 devices; I don’t remember for sure.

@TAustin would your Edge Drivers support the Wired LAN Shelly products like this: Shelly Pro 1 v.1

Yes- see the GEN2 driver info posted earlier: Edge Shelly device support discussion - #559 by TAustin

1 Like

Awesome, thank you!!!

Forgive me for not reading through the full thread, but this topic has a lot of code/logs, which makes it difficult to skim with a voice reader.

Does this edge driver support the sensor “Shelly Plus Add-On” for the Shelly plus? It’s a device which allows you to add up to five DS18B20 probe sensors to a shelly plus.

Shelly Plus Add-On + 1xDS18B20 - Shelly Plus Add-On - All Products - Products - Shelly

1 Like