Custom Component: SkyQ Media Player

Hmmm, I’d have to look and see if it is somehow seeing the box online before it is really available. Setting up the unique identifier for the box is handled slightly differently via the UI as opposed to via yaml, and I’m thinking that somehow it is ending up with a different identifier when the box wakes up and therefore generating a second entity.

See how you go with setting up via UI. If that doesn’t work, I might get you to dig further, but we’ll do that via private message.

Ok!
Did it, i’ll let you know.

Thanks again for the support… :+1: :+1: :+1:

Just to add to this, sometimes my entities disappear and are replaced by “_2” entities. It seems to happen when I restart HA but then go back to the normal entities on the next restart. Doesn’t happen often so have never really worried about it.
I also have the integration set up in .yaml as I’ve been using this since more or less when it was released.

Interesting. Let me pursue this with Kata and see if I can figure out what is going on. Do you reboot overnight by any chance? During the 2am-5am (ish) time slot?

Ok, it worked!
It seems that devices are not duplicated, with UI setup.
This morning i found the same entities, all of them available.
This is the log (3AM):

Logger: custom_components.skyq.media_player
Source: custom_components/skyq/media_player.py:185 
Integration: Sky Q (documentation, issues) 
First occurred: 3:00:57 (3 occurrences) 
Last logged: 3:00:57

W0010M - Device is not available: Sky Q - Mini Taverna
W0010M - Device is not available: Sky Q - Mini Camera
W0010M - Device is not available: Sky Q - Platinum

then (5AM)

Logger: homeassistant.helpers.entity
Source: custom_components/skyq/media_player.py:447 
First occurred: 5:02:15 (2 occurrences) 
Last logged: 5:02:22

Update for media_player.sky_q_mini_taverna fails
Update for media_player.sky_q_mini_camera fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 292, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 490, in async_device_update
    raise exc
  File "/config/custom_components/skyq/media_player.py", line 353, in async_update
    await self._async_updateState()
  File "/config/custom_components/skyq/media_player.py", line 447, in _async_updateState
    powerState = await self.hass.async_add_executor_job(self._remote.powerStatus)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 92, in powerStatus
    self._setupRemote()
  File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 486, in _setupRemote
    self._channels = self._getChannels()
  File "/usr/local/lib/python3.8/site-packages/pyskyqremote/skyq_remote.py", line 466, in _getChannels
    return channels["services"]
KeyError: 'services'

followed by

Logger: custom_components.skyq.media_player
Source: custom_components/skyq/media_player.py:586 
Integration: Sky Q (documentation, issues) 
First occurred: 5:02:21 (3 occurrences) 
Last logged: 5:02:34

W0020M - Device is now available: Sky Q - Mini Taverna
W0020M - Device is now available: Sky Q - Mini Camera
W0020M - Device is now available: Sky Q - Platinum

The ‘id codes’ are different (w0010m - w0020M) but there are no ‘duplicates’ and they are available, both in the UI and in the status page.

Do you reboot your HASS instance overnight at 3am by any chance? The only way you should get W0010M (and then W0020M) is at HASS startup.

I have raised a ticket on Github here - [BUG] Device becomes unavailable at night · Issue #53 · RogerSelwyn/Home_Assistant_SkyQ_MediaPlayer · GitHub - I’d appreciate if we can continue problem resolution over there.

I don’t reboot HA, router, any machine unless I have too. I will let you guys do what you need to do. As I said it doesn’t really cause me a problem with anything going offline overnight. If you need any info let me know.

Do you get those W0010M/20M warnings in your logs @Sam1501

Yes this is the last thing about the integration in my logs

E0010M - Device is not available: SkyQ Bedroom
E0010M - Device is not available: SkyQ Living Room

You’ll get that error every night when the Sky Boxes go into deep sleep. More interested if you see the W0010/20 messages when you notice the entities have been duplicated.

Nothing In my logs that I can see, I’ll try to remember to check the logs next time it happens

I don’t see anymore the logo of the app running into SkyQ. The .png files are there but not anymore visible in UI. Did something changed about it?
This is what i have in the frontend:

Schermata 2021-05-17 alle 20.55.57

I cannot install updates remotely and have not released any updates in a few weeks. You would need to query what you have clashed recently.

I am sure I did not changed anything on my config since months… I only installed updates when notified.
I will test other apps and see if the behaviour will change.
EDIT: Other apps logos are displayed. Only Dazn not…

It’s possible Sky have changed the DAZN app name, the png needs match the app name shown in the ui.

It looks to me like DAZN app icon will never have worked (along with MediasetPlay). I’ll push out a fix in the next few days.

Thanks…

Problems whit SKYq After upgrade to core-2021.6.3

Media player SKYq not present anymore

A little bit more to go on would be useful… :wink:

Are there any errors in the logs? Does SkyQ still appear in the list of integrations? What version of SkyQ is installed? Does it still show under HACS? Is the code still present in custom_components folder?

By the way I am using latest version of SkyQ on 2021.6.3 on two different sites, so I am not aware of any specific issue.