oweitman / ioBroker.squeezeboxrpc

This is an alternative Adapter that uses the JSON/RPC-Protokoll to get data and send commands to the Logitech Media Server.
MIT License
17 stars 8 forks source link

utilizes CPU to max #18

Closed c-roe closed 4 years ago

c-roe commented 4 years ago

Describe the bug
After connecting to LMS data is received but CPU gets utilized more and more until hardware freezes.

To Reproduce
Steps to reproduce the behavior: Install, maintain settings for LMS and start on ioBroker.

Expected behavior
The CPU util. should stay on normal level.

Screenshots & Logfiles
nope

Versions:

Additional context
When I browse the objects Favorites start flickering. I tried to change the Favorites interval and Telnet setting - not solving it.

I have 3 squeezelite devices. 2 are in sync.

Thanks a lot in advance - looking forward to use this adapter.

oweitman commented 4 years ago

Actually I have an issue the setstates in Iobroker =>3.0 After I fixed that, please upgrade to js comtroller >= 3 and retest. Iobroker is actually untested with node>12

c-roe commented 4 years ago

I've downgraded to node 12.16 (stable) - same issue - but I am running iobroker 2.2.9. Do you mean <= 3.0?

issue with states seems to fit here - after installing and running for 5min a lot of states have to be removed. image

oweitman commented 4 years ago

ups 12000 states that seems the cause of the high cpu usage. do you have many favorites? the number of states for each player is fixed. the only variable number ist the number of favorites, saved in the LMS.

now you can retest. i fixed an issue caused by the new js-controller >= 3.0 new version is v1.0.1 available in the latest repository or direct update from github. others and me didnt have an issue with high cpu usage. on my raspi 3b+ the adapter uses only 3% cpu (measured with top)

my actual configuration on the test-machine is: raspberry 3b+ with raspian 10 buster js-controller: 3.0.18 admin: 4.0.9 web: 3.0.2 socketio: 3.0.5

connected to Logitech Media Server Version: 7.9.3 - 1582867832 @ Sat Feb 29 05:28:22 CET 2020 on a different server

if you want to see the actions of the adapter in detail you can switch the log level to silly. but this produce many many log entries. each creation and setting of a state is reported.

c-roe commented 4 years ago

I have ~20 favorites - mostly streams. LMS is 7.9.2 (different server, too)

I will try with the new version the next days.

oweitman commented 4 years ago

please check what kind of states the adapter will create. normaly it shouldnt create so much states

oweitman commented 4 years ago

did you have the time to test again

c-roe commented 4 years ago

thanks for the reminder

just tested it with the new stable js-controller@3.1.4 - same behavior - it created >8k states of favorites just in seconds

can I disable the favorite feature? dont need that at all

oweitman commented 4 years ago

a new version is in the iobroker latest repository available, there you can disable the favorites in the performance settings.

please can you provide some information about the created states, that i can fix or avoid such a problem. is there a pattern in the creation of so many favorites? maybe you can provide me with the favorites.opml file from the lms server configuration for testing by myself.

c-roe commented 4 years ago

will check out the new version soon. here my favorites - replaced the private keys.

there are state dirs created like 7-dd-dd (d for digit) and in every dir the usual ones, I guess

c-roe commented 4 years ago

installed 1.1.0 now - cant find the fav. setting in the perfomance tab

c-roe commented 4 years ago

image have issues starting it

oweitman commented 4 years ago

will check out the new version soon. here my favorites - replaced the private keys.

there are state dirs created like 7-dd-dd (d for digit) and in every dir the usual ones, I guess

favorites.opml.txt

i checked the file. maybe the last line produce a circular reference <outline URL="http://www.mysqueezebox.com/public/opml/<private_key>/favorites.opml" icon="html/images/favorites.png" text="On mysqueezebox.com" />

oweitman commented 4 years ago

image have issues starting it

new version 1.2.1 is in produktion. after finish testing i publish it to the latest repository

oweitman commented 4 years ago

installed 1.1.0 now - cant find the fav. setting in the perfomance tab

if you dont find the setting, please change in iobroker the adapter tab to expert mode and click the upload icon on the right side of the squeezeboxrpc adapter row

c-roe commented 4 years ago

will check out the new version soon. here my favorites - replaced the private keys. there are state dirs created like 7-dd-dd (d for digit) and in every dir the usual ones, I guess favorites.opml.txt

i checked the file. maybe the last line produce a circular reference <outline URL="http://www.mysqueezebox.com/public/opml/<private_key>/favorites.opml" icon="html/images/favorites.png" text="On mysqueezebox.com" />

removed it - will check with 1.2.1

c-roe commented 4 years ago

just saw that it is available - disabled the favs anyway - works like a charm

thanks a lot!

oweitman commented 4 years ago

With the Removed circular reference in your Favorites it should work aswell With enabled favaorites setting