core: Sonos switches to polling when port 1400 is unavailable with no warning or fallback to next port

The problem

Sonos volume fetch is happening more frequently or using a different method.

Noticed with py-spy https://github.com/benfred/py-spy

Screen_Shot_2020-05-26_at_10_34_26_PM Screen Shot 2020-05-26 at 10 30 44 PM

https://github.com/amelchio/pysonos/blob/master/pysonos/services.py#L472 Looks like its also not using a requests Session so its got a bit of setup overhead each request.

Environment

  • Home Assistant Core release with the issue:
  • Last working Home Assistant Core release (if known):
  • Operating environment (Home Assistant/Supervised/Docker/venv):
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml


Traceback/Error logs


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

When I have some free cycles, I’ll give 1&2 a shot.