RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
101 stars 17 forks source link

[BUG] SkyQ integration doesn't work from version 2.8.7 or above #101

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug
Starting from version 2.8.7 SkyQ integration doesn't work. I tried with different Home Assistant version (now I have version 2022.4.7), but the problem seems not to be related to HA version.

Using version 2.8.6 everything works fine, with HA 2022.4.7 and below.

To Reproduce
Steps to reproduce the behavior:

  1. What were you doing/watching at the time? Install version 2.8.7 or above
  2. What time did the problem occur? It occurred for the first time with 2.8.7 version, but reproduced again with 2.8.8 and 2.8.9 versions
  3. Where are you (bear in mind component supports GBR/ITA at the moment)? ITA

Expected behavior
SkyQ should be detected, and available to interact with.

Screenshots
Using 2.8.9 version

SkyQ sensor

Using 2.8.6 version

SkyQ media player - 2 8 6

Component versions

  1. What version of SkyQ component are you using? 2.8.7 and above
  2. What was the last version where the problem was not shown? 2.8.6

Your configuration
How have you setup your devices, by UI or YAML? By YAML

Your configuration.yaml

 Sky Q
media_player:
 - platform:  skyq
   name: SkyQ
   host: 192.168.1.160
   live_tv: true
   generate_switches_for_channels: false
   room: Salotto
   country: ITA
   sources:
      SkyTG24: '1,0,0'
      SkyUno: '1,0,8'
      SkyCinemaUno: '3,0,1'

Output of HA logs

2022-04-27 11:24:18 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /home/homeassistant/.homeassistant/configuration.yaml contains duplicate key "switch". Check lines 77 and 93
2022-04-27 11:24:18 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nodered which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:18 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration govee which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:18 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration skyq which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:18 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:18 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration google_fit which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:18 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration circadian_lighting which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-27 11:24:25 WARNING (MainThread) [custom_components.govee] API is back online.
2022-04-27 11:24:27 WARNING (MainThread) [homeassistant.config_entries] Config entry 'NOW TV Smart Stick - YD0009628823' for roku integration not ready yet: Invalid response from API: Error occurred while communicating with device; Retrying in background
2022-04-27 11:24:27 WARNING (MainThread) [homeassistant.config_entries] Config entry 'EPSON XP-4100 Series' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background

2022-04-27 11:24:28 ERROR (MainThread) [homeassistant.components.google_assistant.http] No configuration for request_sync available

Additional context
My SkyQ has fixed IP address, the one set in configuration.yaml file.

No issue seems to be tracked via Home Assistant Logs.

By reverting version to 2.8.6 everything works fine.

RogerSelwyn commented 2 years ago

Please try turning on debug logging to see if anything is shown.

logger:
  custom_components.skyq: debug

Under developer tools, are there any duplicate media_player entities? There shouldn't be, but just wondering if it has created a new entity. You can also see what the entity name is by going via the integration configuration view, and clicking on entities.

ghost commented 2 years ago

With 2.8.9 I get:

2022-04-27 12:22:27 INFO (MainThread) [custom_components.skyq.media_player] I0020 - Device is now available after startup: SkyQ

Actually I noticed that a duplicated SkyQ entity is created:

Duplicated SkyQ entities
RogerSelwyn commented 2 years ago

I suspect for some reason the unique identifier has changed. If you want to, check in /config/.storage/core.entity_registry and check the uniqueid for the two entities you will find in there. Or at least I think you will, I never use the yaml setup these days. If in doubt delete from yaml, reboot, delete any entities that are unavailable, then reset via gui. You get more capabilities via gui (such as device info, storage sensor and diagnostics info) and could rename the entities if you wanted to.

ghost commented 2 years ago

I tried to remove manual configuration from configuration.yaml file, and I get two entities:

SkyQ entities - 2 8 9

On dashboard, I get media player correctly populated.

SkyQ media Player - 2 8 9

Thank a lot!