Custom Component: SkyQ Media Player

The files in the images folder go into /config/www/community/skyq

Everything else goes where it did before /config/custom_components/skyq

This works perfectly, both the time fix and the app images

Thank you very much to everyone that had contributed to this, I imagine this would do well on HACS but could be a pain to maintain as sky can change things as they wish.

Sorry i am confused. What i must download to get the latest? From dev or master branch?
Looking at the dates the latest seems the one in the dev branch and i downloaded it which includes sky_remote.py and media_player.py also with the images folder.

Latest dev will work as well. Try taking that configuration variable out so the site loads properly, then put it back in. Restart each time.

Sorry i did it, before with that flag, restarted, then put off, restarted, put on, restarted and i get the same error… Maybe put False in place of false?

EDIT: Got these erros:

2020-04-04 17:35:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.skyq fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/skyq/media_player.py", line 216, in update
    self._updateCurrentProgramme()
  File "/config/custom_components/skyq/media_player.py", line 260, in _updateCurrentProgramme
    if self._title.casefold() in SkyRemote.APP_LOGOS:
AttributeError: 'NoneType' object has no attribute 'casefold'
2020-04-04 17:35:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.skyq fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/skyq/media_player.py", line 216, in update
    self._updateCurrentProgramme()
  File "/config/custom_components/skyq/media_player.py", line 260, in _updateCurrentProgramme
    if self._title.casefold() in SkyRemote.APP_LOGOS:
AttributeError: 'NoneType' object has no attribute 'casefold'
2020-04-04 17:36:00 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.skyq fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/skyq/media_player.py", line 216, in update
    self._updateCurrentProgramme()
  File "/config/custom_components/skyq/media_player.py", line 260, in _updateCurrentProgramme
    if self._title.casefold() in SkyRemote.APP_LOGOS:
AttributeError: 'NoneType' object has no attribute 'casefold'
2020-04-04 17:36:11 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.skyq fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/skyq/media_player.py", line 216, in update
    self._updateCurrentProgramme()
  File "/config/custom_components/skyq/media_player.py", line 260, in _updateCurrentProgramme
    if self._title.casefold() in SkyRemote.APP_LOGOS:
AttributeError: 'NoneType' object has no attribute 'casefold'

OK, I’ll take a look

Ok

  1. extract the contents of the latest dev zip

  2. Put all the files and folders in your /config/custom_components/skyq folder, exactly as you did before

  3. Move the whole /config/custom_components/skyq/images folder to /config/www/community

  4. Rename the images folder to skyq

  5. Restart home assistant and your done

1 Like

Yes done! But got the errors i reported in my previous message…

Sorry, was probably replying while you edited your post

Oh, no problems… every help is well done !

OK, posted a new version. Not tested all the way through but got the Virtual Grand National to watch.

Absolutely brilliant just updated to latest dev and now app images working aswell as everything else :ok_hand:

Ive left custom components folder as it was other than updating the files needed and then made a skyq folder in /config/www/community/ and then put all images in that folder.

Testing it right now… it seems no more errors… finger crossing…

I get this:

Apr 04 18:42:59 hassbian hass[20175]: 2020-04-04 18:42:59 ERROR (SyncWorker_2) [custom_components.skyq.skyq.sky_remote] X0030 - Error occurred:
Apr 04 18:42:59 hassbian hass[20175]: Traceback (most recent call last):
Apr 04 18:42:59 hassbian hass[20175]:   File "/home/homeassistant/.homeassistant/custom_components/skyq/skyq/sky_remote.py", line 291, in _getCurrentLiveTVProgramme
Apr 04 18:42:59 hassbian hass[20175]:     for p in self.epgData["events"]
Apr 04 18:42:59 hassbian hass[20175]: StopIteration

on every 10 secs

You must use get_live_tv to false as it seems here in Italy we cannot get live tv programs informations

Thanks a lot!! :+1:

I’ve added a warning when the programme information isn’t found, that you may need to use get_live_tv = false

Any change to get the updates through HACS?

Not at the moment

Just so you know, I’ve taken a look at HACS, it looks like there is no way to deploy the app images. So if I were to publish on HACS, app icons would have to be installed manually and therefore it would need to be optional to use them (which to be honest it probably should be anyway).

Wouldn’t it become optional by design?
If the images are in the correct folder it will show and if there missing it won’t show any background images