Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Shelly mqtt adapter slows down iobroker with a million protocol entries #956

Open
3 tasks done
jenbenn opened this issue Feb 28, 2024 · 8 comments
Open
3 tasks done
Assignees

Comments

@jenbenn
Copy link

jenbenn commented Feb 28, 2024

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (use the search!)
  • 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:

Protocol

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

Copy link

Thanks for reporting a new issue @jenbenn!

  1. Please make sure your topic is not covered in the documentation
  2. Ensure that you use the latest beta version (not the current stable version): 6.8.0
  3. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  4. Search for the issue topic in other/closed issues to avoid duplicates!

Otherwise this issue will be closed.

@Apollon77
Copy link
Member

@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?

@jenbenn
Copy link
Author

jenbenn commented Feb 28, 2024

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

@jenbenn
Copy link
Author

jenbenn commented Feb 28, 2024

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.

@jenbenn
Copy link
Author

jenbenn commented Feb 28, 2024

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! -- | -- | -- | --

@Apollon77
Copy link
Member

"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

@jenbenn
Copy link
Author

jenbenn commented Feb 28, 2024

Ok thanks! Does anybody have an idea what causes these "Client close" issues?

@JuniperChris929
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants