Home assistant e Shelly

Good morning, I have installed home assistant and have integrated 28 shelly, I would like to ask for advice. Should I set a static IP for the Shellys? It happens from time to time when I restart the modem that many shellys remain offline on homeassistant because the new IP address is not recognised. Other times, home assistant automatically recognizes new IPs. advice ?

Standard practice is to either assign static IP’s for any WiFi devices HA wants to talk to, or apply a static IP on the device.

I assign a static IP to the devicew on my router and the device. I still had the issue of them sometimes not being available until I also did this, and afterward they were ALL conected rock solid all the time!

On Gen2+ devices, log into the ip on the device in a browser, then under Settings/Enable Outbound Websockets:
Connection type:
Default TLS
Server:
ws://IP Address of your HA:8123/api/shelly/ws

On older devices, log into the ip on the device, then under Internet & Security/Advanced Developer Settings, enable CoIoT:
CoIoT peer:
IP Address of your HA:5683

But only if they are battery operated Shellys
and the ws://……. Is not complete
See

Is also not complete

I have a handful of Shellys but I’ve never given them static IPs. I occasionally see what you’re describing, but I believe a reload of the device/integration solves it.

I was using “<” and “>” around the “your HA IP Address” so it was evidently hidden so I fixed that. And not just for battery powered!

Extract:
Generation 2 and 3 devices use the RPC protocol to communicate with the integration. Battery-operated devices (even if USB connected) may need manual outbound WebSocket configuration if Home Assistant cannot correctly determine your instance’s internal URL or the outbound WebSocket was previously configured for a different Home Assistant instance.

There have already been problems here, when this was set on other Shelly Gen2/3 devices

But OK

I stand corrected, thank you for that I did not realize. However, I wonder why my disconnect issues on the Gen 2 devices went away when I set up outbound websickets. (?) Possibly an issue with my network configuration hampering RPC?