core: Emby doesn't work if the PC starts off
The problem
I have a PC with an Emby server and player. I successfully configured Emby in my HASSIO and it’s working fine.
Sometimes that PC is turned off, and if my HASSIO starts before that PC it’s turned on, then the “emby player” won’t get listed as an entity and an error is thrown.
Once that happens, even if I turn on the PC, the entity won’t appear. The only solution is to restart HASSIO.
If the PC is on, and Emby isn’t open, it won’t get listed either, but no errors will show up. As soon as I open Emby, it gets listed as idle and if I close it, it goes off. And if I turn off the PC, it stills get listed as off.
HASSIO is always turned on, it’s on a RPi 3a, but sometimes I restart it, the power goes off or for whatever reason the above situation occurs.
Environment
- Home Assistant Core release with the issue: 0.108.6
- Last working Home Assistant Core release (if known): Don’t know, I think it never did.
- Operating environment (Home Assistant/Supervised/Docker/venv): Home Assistant in a RPi 3A.
- Integration causing this issue: Emby.
- Link to integration documentation on our website: Emby.
Problem-relevant configuration.yaml
media_player:
- platform: lg_netcast
host: !secret tv_host
access_token: !secret tv_token
- platform: emby
host: !secret emby_host
api_key: !secret emby_key
ssl: true
Traceback/Error logs
Logger: pyemby.server
Source: __main__.py:342
First occurred: 20:38:42 (2 occurrences)
Last logged: 20:38:42
Error fetching Emby data: Cannot connect to host *local-ip:port* ssl:None [Connect call failed ('*local-ip*', *port*)]
Unable to register emby client.
Additional information
I also have a LG TV integration. When it’s off, the WiFi is off so -I assume- HASSIO can’t connect to it either, but nevertheless it appears in the entity list with an off state.
I’m expecting the same behavior with Emby, to always get listed. Is that possible?
Thanks, azeos.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (9 by maintainers)
There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I plan to update the Emby component to the config flow model that will support connection retries after HA has been started, just need to find the time to do it.
Thanks @jjlawren. I’ll take a look at implementing that into the Emby component.
It used to, but Plex now retries on startup: https://github.com/home-assistant/core/pull/32071.
Raising
PlatformNotReadywill use the built-in retry mechanism. Checkandroidtvfor another example.