Edge Shelly drivers for Gen1 and Gen2 Devices

Hi @TAustin, I am using around 15 shelly 1 and 4 shelly 1L devices and I have integrated them into Smartthings through their great edge drivers. They have worked well for me, however, randomly, during the day several of them appear “offline” on ST, and when I see them in the Shelly App they are connected without problem, after a few minutes they are “online” again line" in ST, but others go to “offline” status.
I have all of them with static IP. Any suggestions on this problem? Thank you.

I experience the same issues with mine devices (1, 1PM, 2.5).
When i toogle device in Shelly app then Smartthings instantly updates from offline.

@cljara80 @dusanhauko

This is probably happening because the devices aren’t responding during a periodic connection check. If this happens pretty regularly, then we should get some driver logs to see what exactly is going on. You’ll need the SmartThings CLI (Windows install file link) running on a computer on your LAN.

If you can get it installed, I can guide you through getting the logs. DM me when you are ready.

Hi @TAustin, sorry for the delay, it was difficult for me to install the CLI, but I managed it.
This weekend I captured logs from shelly devices that randomly show up offline.
I’ll send them to you by direct message
Thank you for your excellent work.

Thanks- replying to your direct message.

Hello. Do you need more log files about this offline issue or is fix around the corner? :grin:

More log output would always be helpful. I’ve not yet pinpointed the cause of the problem - just that it surfaces in @cljara80’s log as a timeout error occurring with the device. Subsequent retries clear it up, but in the meantime the device is offline.

There is a downside to using the SmartThings offline state when communication fails, because it prevents you from interacting at all with the device until the driver recovers. In the case of these Shelly Gen1 devices, it’s possible that a simple tap of the refresh button might clear things up, but of course that takes manual intervention.

Feel free to DM me logs or email them to me at rpi.smartthings@gmail.com. It’s best if you let it run for a while - more than 5 minutes so I can see the full context and you let it go through a 5 minute re-connection cycle.

How are you seeing this path? I’m running HA Yellow and don’t see it using the File Editor add-on.

Jimmy,

/etc/mosquitto/mosquitto.conf is on the machine or device that you installed mosquitto broker on.

In my case, I installed mosquitto broker on the raspberry pi that has PiHole and openVPN.

To fix it, I added the following to /etc/mosquitto/mosquitto.conf,
and restarted mosquitto by, sudo systemctl restart mosquitto.service

allow_anonymous true
listener 1883

pi@raspberrypi:~ $ sudo systemctl restart mosquitto.service
pi@raspberrypi:~ $ cat /etc/mosquitto/mosquitto.conf

Place your local configuration in /etc/mosquitto/conf.d/

Hi, I started using these drivers (thanks!!!).
To use the Shelly 1PM I have to create an R1L (it works and I see the input status), if instead I create an R 1PM (which would be the correct one) I don’t see the input status and it doesn’t work correctly, it doesn’t update the status etc.
With the device set to R1L I’m happy

Hi @TAustin , does your driver support Gen3 devices? I have just bought and installed 2 Shelly PM Mini Gen3 to monitor power usage on my furnaces. I got them to connect to Shelly Cloud but when I try to link Shelly Cloud to Smartthings it finds zero registered devices.

I found this thread and would love to use this driver to connect the devices directly to Smartthings.

Thanks,
Bill

The Shelly PM Mini Gen3 looks like a nice device, so I am also wondering the same thing.

Gen 3 is fairly recent and haven’t really looked at it yet. I’ll check their developer site to see what info I can gather on them. Don’t know if they’ve changed the local interface from Gen2 - I hope not…

Well if I can support you adding support for Gen3, I’d love to do so. I bought the Gen3 sunce Shelly said it supported smartthings, but after spending 3 weeks going round and around with their support team, they realized since it doesnt have relays that it doesnt support smartthings (which doesnt make any sense to me)

So now I have monitoring devices that cant do any automation w smartthings which is why I bought it in the first place…

Oops. Not even the standard Shelly cloud integration works with them?

Regarding Shelly Gen3 devices (@William_Kaper, @Paul_Oliver,). I’ve done some initial digging and it looks like the interface is pretty consistent with the Gen2, so this shouldn’t be a problem creating a Gen 3 driver.

As I don’t have any of these devices, I’ll be reliant on the community for testing. I’ll post back here when I have an initial driver ready, which should be in about a week or two.

FOLLOW-UP:

For anyone with Gen3 Shelly devices, please do me a favor and use a browser to plug in the IP address of the device followed by ‘/shelly’. So for example, if your device is at IP address 192.168.1.99:

192.168.1.99/shelly

This will return info on the device. I need to collect the id fields for each Gen3 model type. Don’t worry, there is no private information there, but if you prefer, you can DM me the results. Let me know also the device type as you know it, in case it’s not obvious in the data.

Thanks!

@TAustin, I have 2 of these Gen3 Mini Device, each connected to a furnace/air handler. They are both Shelly PM Mini Gen3: https://a.co/d/bzPnXYE

{
“name”: null,
“id”: “shellypmminig3-ecda3bc5e9a0”,
“mac”: “ECDA3BC5E9A0”,
“slot”: 0,
“model”: “S3PM-001PCEU16”,
“gen”: 3,
“fw_id”: “20240223-141904/1.2.2-g7c39781”,
“ver”: “1.2.2”,
“app”: “MiniPMG3”,
“auth_en”: false,
“auth_domain”: null
}

{
“name”: null,
“id”: “shellypmminig3-ecda3bc5e7f4”,
“mac”: “ECDA3BC5E7F4”,
“slot”: 0,
“model”: “S3PM-001PCEU16”,
“gen”: 3,
“fw_id”: “20240223-141904/1.2.2-g7c39781”,
“ver”: “1.2.2”,
“app”: “MiniPMG3”,
“auth_en”: false,
“auth_domain”: null
}

I’m happy to test and provide feedback realtime at your convenience. Im also happy to grant you access to my Shelly account to make it easier for you. Just DM me if that would help.

-Bill

Correct @Automated_House. Here was Shelly’s response:

Dear William Kaper,

The problem comes from the fact that the device doesn’t have relay and hence the integrations like Alexa/Google Home/Smart-Things are not supporting it.

We’re gonna get in touch with the marketing team to remove all false information regarding the integration connectivity.

Once again we apologies for the inconvenience.

Best Regards,
Shelly Support Team
93569:2620926

The mini pm Gen 3 is an odd device: energy monitoring only, no on/off/dim functionality.

*This is a power meter only. There is no relay built in. The world’s smallest electricity meter for precise electricity monitoring. Automate your lighting or electrical appliances in less than 10 minutes and monitor their power consumption from anywhere.

I don’t know how they can say. “automate your lighting“ when it doesn’t actually control the lighting. Definitely confusing product description. It looks like they just cut and pasted one of the existing relay product descriptions, and then added a few lines, but didn’t take away anything.

This, for example, is on the Gen 3 PM mini page, but absolutely does not describe it accurately.

these mini relays have all the capabilities of standard switches

Note that the Shelly 1 PM gen 3 mini does have a relay and can turn a light on and off. And costs almost the same. :thinking:

https://www.amazon.com/Shelly-Bluetooth-Measurement-Automation-Compatible/dp/B0CRRT6HCB/

So, just be prepared for future questions from people wondering why they can’t turn the light on and off with the first one.

Its perfect for me since I only want/need power monitoring so I can control other automations based on what my furnace is doing. It makes no sense why they cant make it work with smartthings through their 3rd party integration when plenty of temperature sensors do basically the same thing.

PS the 1 PM Mini is only 8 amps where the Gen3 PM Mini is 16amps