ioBroker.shelly
ioBroker.shelly copied to clipboard
[Bug]: Shelly mqtt adapter slows down iobroker with a million protocol entries
I'm sure that
- [X] This issue is still present in the current beta version of this adapter
- [X] There is no other (open) issue with the same topic (use the search!)
- [X] This issue is not described in the adapter documentation / FAQ (read the docs!)
Shelly device
all gen2 mqtt devices
Shelly firmware version
1.2.2
Protocol
MQTT
The problem
Hello, I have an iobroker installtion running on raspberry pi 4, 8gb. I have two instances of the shelly adapter installed : one for coap (shelly.0) and one for mqtt (shelly.1). Suddenty the mqtt instance (shelly.1) continuously creates dozens of protocol entries per second and slows down the iobroker considerably. At the same time, In the object menu the mqtt shelly devices change randomely from online to offline to online again. When I stop the mqtt-instances cpu usage of the rsp pi is around 6-10%. When I start the instance it goes to 85% or above, sometimes staying at 113% for minutes. The user interface of iobroker then becomes so slow that it is completely unusable.
Here is an image of the protocol entries continuesly created:
Can somebody help`?
iobroker.current.log (in debug mode!)
No response
Version of nodejs
18.19.1
Version of ioBroker js-controller
5.019
Version of adapter
6.6.1
Thanks for reporting a new issue @jenbenn!
- Please make sure your topic is not covered in the documentation
- Ensure that you use the latest beta version (not the current stable version): 6.8.0
- Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
- Search for the issue topic in other/closed issues to avoid duplicates!
Otherwise this issue will be closed.
@jenbenn When I see the log (graphic is soooo hard to read BTW) Then there aseem to be some connection issues with soem devices ... So you can increaase the loglevel to "warn" of the instance to not have logged all these "info " logs. Alternatively find the reason fort these issues ... maybe bas Wifi reachabiloty of the shelly devies?
Thank you but wifi connection is not the problem. all devices have pretty much perfect connection as indicated in the shelly app. All devices have also worked properly in iobroker for more than a year. issue started in the alst couple of week.s
The procol is also not the cause. Even when I stop the protocol, the cpu usage still rocks up to 100% or more once I start the Shelly.1 instance.
I have now installed the beta version 6.8 of the adapter: Unfortunately no change. Shelly devices go offline and then come back online in iobroker on completely random basis. cpu usage rests at around 100%. In the shelly app and on the web interface all devices have a stable and good connection and function as they should. It is only in iobroker where they create trouble.
Here is a typical report form the protocol. Apparetnyl all Shelly gen2 devices randomly perform a "Client close" and the reconnect. One after the other sometimes all at the same time. sometimes all 30+ shell decices go offline in iobroker for minutes at the same time her are the protocol reports
shelly.1 | 2024-02-28 13:40:24.560 | info | [MQTT] Client Close: (shellyplusi4 / shellyplusi4-083af20117f4 / shellyplusi4#083af20117f4#1) (false) -- | -- | -- | -- lly.1 | 2024-02-28 13:40:19.197 | info | [MQTT] Device with client id "shellyplus2pm-a8032ab66128" connected! -- | -- | -- | --
"client close" means from my knowledge that the device closeds the connected and then connects again ... thats why it shpuld be originated on the devie or in the network
Ok thanks! Does anybody have an idea what causes these "Client close" issues?
My guess would be wireless problems in your home network. The shelly app is extremely slow when is comes to recognizing the "down" part of your shellys and tolerates way more small "hiccups" than any Home automation system - but the ioBroker does - ultimately it comes down to an issue in your home-network with 99.9% certainty. Some of us run over 200 Shellys and never had issues.