home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.04k stars 29.11k forks source link

HEOS looping task creation #113177

Open Anto79-ops opened 4 months ago

Anto79-ops commented 4 months ago

The problem

My Home Network received a full reboot and thus IP addresses were changed, even on my wired Denon Receivers, as a result, the HEOS integrating would not initialize so I deleted the integration an added it back again, with the the correct IP address and it auto-detected all 3 of my Denon receivers.

However, shorlty after that, I noticed an increased CPU usage on my RPi4-4GB/HAOS system.

image

Profile services indicate a looping of tasks

image

image

image

with open connection looping:

fl=/usr/local/lib/python3.12/site-packages/pyheos/connection.py
fn=_response_handler
185 962953834
cfl=/usr/local/lib/python3.12/asyncio/streams.py
cfn=readuntil
calls=55587 580
185 1415890472
cfl=/usr/local/lib/python3.12/asyncio/tasks.py
cfn=ensure_future
calls=13896 670
185 709782626
cfl=/usr/local/lib/python3.12/json/__init__.py
cfn=loads
calls=13899 299
185 560786784
cfl=/usr/local/lib/python3.12/site-packages/pyheos/connection.py
cfn=<genexpr>
calls=13892 216
185 32880970
cfl=/usr/local/lib/python3.12/site-packages/pyheos/connection.py
cfn=set
calls=13898 346
185 440603819
cfl=/usr/local/lib/python3.12/site-packages/pyheos/response.py
cfn=__init__
calls=13898 11
185 202169189
cfl=/usr/local/lib/python3.12/site-packages/pyheos/response.py
cfn=is_under_process
calls=13898 40
185 19364709
cfl=/usr/local/lib/python3.12/site-packages/pyheos/response.py
cfn=is_event
calls=13898 45
185 69130362
cfl=/usr/local/lib/python3.12/site-packages/pyheos/response.py
cfn=command
calls=13898 50
185 5702410
cfl=/usr/local/lib/python3.12/site-packages/pyheos/response.py
cfn=get_message
calls=13898 65
185 33339635
cfl=~

thanks for your efforts.

CC: @bdraco

What version of Home Assistant Core has the issue?

2024.3.0

What was the last working version of Home Assistant Core?

not sure, first time finding this

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Denon HEOS

Link to integration documentation on our website

https://www.home-assistant.io/integrations/heos/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @andrewsayre, mind taking a look at this issue as it has been labeled with an integration (heos) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `heos` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign heos` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


heos documentation heos source (message by IssueLinks)

Anto79-ops commented 4 months ago

wanted to mention that I ended up unplugging and plugging the receivers and the CPU usage issue resolved itself. Its possible the reciever was in a weird state, but while it was in this state, I was able to control the devices via home assistant Denon and HEOS integrations, and the AVR app.

ReinhardScherp commented 2 months ago

Good morning, I've been trying to integrate my HEOS 1 - Heos 3 or Heos home theater into HomeAssistant for days and just can't get any further. I have set the logging (configuration.yaml) to see where the error is. Unfortunately I can't get a LOG. Unfortunately, I also don't know how to create a service with the login data for the Denon Heos account under services. I am still new and unfortunately I can't get any further. Therefore my request for help.

"Logger: homeassistant.helpers.script.websocket_api_script Source: helpers/script.py:1934 First occurrence: May 11, 2024 at 11:05:36 (1 occurrences) Last logged: May 11, 2024 at 11:05:36

websocket_api script: Error executing script. Service not found for call_service at pos 1: Service heos.sign_in not found" I would be happy if someone can help me.

Greetings Reinhard

Translated with DeepL.com (free version)