Shelly device keeps going unavailable and disconnected

Hi
I’ve been using some Shelly 1 devices for a few months and have all been fine, in fact great but I’ve recently added a router to my ISP router/modem and all that is great. The wifi signal is slightly better but that’s not why I bought it.

I’m using a Pi4 4GB with the HA image and the Shelly integration.

Anyways, since then both devices keep dropping out and becoming ‘unavailable’ or ‘disconnected’ but work via that hardwired switch. They only come back online when I cycle the power. If they last 24hours online, I’m doing well. One Shelly is with 2 meters of the router and the other is upstairs. No other device on my network is doing this. I have various Pi’s in the house and garden.

I’ve not changed any settings but looking through them I can’t see anything to change which would help. I have tried using the Shelly Cloud and not but it makes no difference. Now I’m going to try MQTT and see if that makes a difference.

Any ideas? I’m not a network or IT guy, so not sure if this could be a setting on the new router but it is odd nothing else is behaving the same.

Thanks

2 Likes

Why are you using cloud? Shelly works without it.

It seems one had the cloud still active and one didn’t. You’re correct, I do not need it but still, they drop out and I have to toggle the breaker to reset them.

I have a number of Shelly 1 devices and they are very stable using the core Shelly integration. There are a couple of settings you have to make in each device though. A lot of people miss this part:

3 Likes

Thanks for the info! I did just try that but porting into 5683 did not work. Just failed to connect.

3 Likes

Ah I see. I’ve implemented that and so far, so good. Will monitor the situation and see how it fairs. Thank you for the help

1 Like

Well it seemed to work for a while but they still keep dropping out. They last a min of 3 days and no longer than a week. Have to power cycle the breaker from the consumer unit. Not great. Will try MQTT

2 Likes

I have lots of Shelly’s and have observed this behaviour in the past. In this past experience it was never the stock Shelly integration. So I doubt MQTT will do much. But I am all ears!

It was always poor signal strength, wifi firmware, and/or interference. Don’t just focus on one, because all matter on their own. Performing an in-depth wifi survey is not something most people do, but matters a lot.

In my case, installing an AP closer to the Shelly was needed. And repositioning the Shelly.

You may be right and it is my concern, due to being a new router but it is only affecting the shelly’s and some times esp8266 devices. One of the Shellys’s is maybe 2 meters away, with no walls in between, so I physically can not get it closer or reposition. I’ve got a RPi in the garden which never drops a signal and I’ve got two Pi’s upstairs where the other shelly is, which they never drop the signal but the Shelly does. What I don’t understand is, even though the shelly drops out, HA can see the position of the light switch but unable to control the light.
If I was reading this post I’d fully agree with you and I’m not saying you’re wrong but the behaviour is too strange, which is affecting other devices at the same location and when I say same location, that’s right next to each other. Maybe it could be the age of the esp8266 doesn’t like some setting on the modern router

1 Like

Making apples to oranges comparisons between devices offers little value. ESP devices have notoriously weak wifi stacks, from firmware to antennas.

Being in the same room a short distance away doesn’t change interference from outside influences. Grab a wifi scanning app. Pick a channel with the least interference. Follow router firmware development threads to pick the most robust firmware. Ensure settings like DTIM are suited to the devices you have deployed. Make sure other settings like min RSSI aren’t the cause.

Just making comparisons without making changes isn’t going to help much, so start being methotical. Record what you’ve tried. These devices can work well. Holding out on sanity until you get there… …that’s the challenge!

2 Likes

Yes, you’ve led me down another path there. I’ve never worked on networks or used a different router other than the one provided by the ISP. I’d already changed a couple of settings within the Shelly app and the router, which has improved things but not fully. Still they’re dropping out.
Looking farther into the routers settings, even though I’d turned off rssi (I think it’s called that) roaming, there’s more details regarding smart connect. It appears that it’ll change between 2.4 and 5GHz depending on the strength. This may be the issue i didn’t want to split 2.4 and 5 GHz but I may have to. Nor turn off the smart switching between both but that may be causing the drop outs.
It appears that greater than -62dB it’ll roam but it can sometimes go as low as -75dB.
I’ll monitor the network as you say and slowly change settings. May split the channels and have separate SSID’s and see how that goes.
Thanks for the advice


1 Like

Splitting the bands is an option. I have done so as all my 2.4 devices are IOT only. While RSSI settings have a time and place, its job is literally to cause a disconnect. So disabling for troubleshooting is helpful to understand if that is a contributing factor.

I had a 1PM connected at -78db for months and it was pretty solid. At -80db it would drop once a week or two. At -76db it was very solid. That’s why I added a second AP. Now they are all better than -68 and I haven’t had a problem since.

Checkout the app Wifiman as well. It is very helpful to determine channel overlap and interference. On Android at least.

how to do this??

This will be a setting on your router or access point.

Unifi has made this a default setting for IOT networks. Instructions will be specific to your router/AP’s.

I have UniFI, I never seen this DTIM settings. ANd how to set it for the Shelly??

It isn’t for just the Shelly, it is a per SSID setting. If you are using the latest Unifi controller, it is now the default for 2.4 networks.

Ok, I do need to change it or not? I can create a new SSID with particular setting and make Shelly only connect to this SSID, but which special settings to use DTIM to 1?

Well, I trialled various settings and monitored the devices but they dropped out sooner or later. Nothing really helped and as the isp router never had an issue with them, I almost gave up with the asus.
But I picked up a second router from ebay for £8. A gamble as spares and repairs. Well, it set up with aimesh and all seems to be working. For now.

Good to hear!