Custom Component: SkyQ Media Player

I have just release a new version (v2.1.2) of the SkyQ component. The major change is support for Italy.

This release includes an updated version of pyskyqremote which adds support for countries other than the UK. At the moment the only added country is Italy, where support for live programmes and programme images has been added.

To utilise the Italy information add the following to your configuration.yaml for the skyq media player. Also ensure that ‘live_tv’ is removed or set to True.

country: "IT"
2 Likes

Is this correct? It seems the image is too big for the card:

Schermata 2020-04-18 alle 14.12.49

Have you tried setting artwork: full-cover

I am using full-cover…

Please let me know the exact channel name/number you are on, plus time of day. I don’t see any channel information there so not sure if you have encountered a bug. In any case, the integration does not do the image sizing, the Lovelace cards do. The only images I have provided are the application ones, and you can add those yourself if you wish.

It was Sky Atlantic HD number 110 and the time was around 2 p.m.
This is the code i am using for media_player:

media_player:
  - platform: skyq
    name: SkyQ
    host: 192.168.1.41
    live_tv: false
    country: "IT"
    room: salotto
    config_directory: '/config/'
    generate_switches_for_channels: false
    sources:
      Netflix: 'home,down,down,down,down,down,down,down,down,down,down,down,right,select,select,select'
      DAZN: 'home,down,down,down,down,down,down,down,down,down,down,down,right,right,select,select'
      CUP: 'channelup'
      CDOWN: 'channeldown'
      UP: 'up'
      DOWN: 'down'
      LEFT: 'left'
      RIGHT: 'right'
      HOME: 'home'
      OK: 'ok'
      DISMISS: 'dismiss'
      SIDEBAR: 'sidebar'
      INFO: 'i'
      POWER: 'power'
      SKY: 'sky'
      RAIUno: '1,0,1'
      RAIDue: '1,0,2'
      SkySport24: '2,0,0'
      SkySerieA: '2,0,2'
      InterTV: '2,3,2'
      SkyAtlantic: '1,1,0'
      ItaliaUno: '1,0,6'
      Canale5: '1,0,5'
      DirettaSport: '2,5,1'
      SkySportFootball: '2,0,3'
      SkySportArena: '2,0,4'

And in lovelace:

          - type: custom:mini-media-player
            entity: media_player.skyq
#            icon: mdi:remote-tv
            artwork: full-cover
            source: icon
            group: true
#            icon_state: true
            sound_mode: full
            volume_stateless: false
#            info: scroll
            hide:
              info: true
              power_state: false
              power: false
              mute: false
              volume: true
              progress: true
              source: false
              sound_mode: true
            idle_view:
              when_idle: true
              when_paused: true

FYI actually (4:03 p.m.) i am at Sky SerieA channel number 202 and i have this in the card:

Schermata 2020-04-18 alle 16.03.12

I’ve corrected my previous post… :frowning: I should have said ‘live_tv’ needs to be ‘True’ or removed.

The reason one the image looks slightly odd is explained in this post. I can’t say why it doesn’t fit the image to the card, that is handle via MMP.

The image used will be this one for Sky Sport Serie A

1 Like

Schermata 2020-04-18 alle 19.25.17

Yes, now it works !

Got these errors every 4-5 seconds when i am looking at channel outside the ones from Sky:

2020-04-18 19:28:40 ERROR (SyncWorker_11) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 899 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-18 19:28:44 ERROR (SyncWorker_18) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-18 19:28:55 ERROR (SyncWorker_11) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable

The errors disappear as soon i go to see Sky channels…

As before, give me the exact channel name, channel number and time.

Hmmm… i was looking at Canale 5 HD number 105, maybe around 7-8 pm…

Does it do the same now, on the same channel?

Yes, same error:

2020-04-19 16:04:39 ERROR (SyncWorker_8) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-19 16:04:50 ERROR (SyncWorker_8) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-19 16:05:01 ERROR (SyncWorker_6) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-19 16:05:17 ERROR (SyncWorker_9) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable
2020-04-19 16:05:23 ERROR (SyncWorker_6) [pyskyqremote.skyq_remote] X0030 - Error occurred: 192.168.1.41 : 5435 : 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyskyqremote/skyq_remote.py", line 270, in getCurrentLiveTVProgramme
    result.update({"title": programme["title"]})
TypeError: 'NoneType' object is not subscriptable

Same channel…

Please update to v2.1.3. This should remove the error, however the live programme won’t be shown for channels where they aren’t available here:

https://apid.sky.it/gtv/v1/channels?env=DTH

Ok, i’ll test it and let you know…

It works but now i have another serious problem… It seems the media_player.skyq doesn’t respond anymore to the media_player services…
I have many scripts, routines and automations that call the services to activate the media_player.skyq, but now none of them seems to work, just after the latest release.
Also using the media_control card or the MMP card to turn on the media_player both do not work!
Please let me know what happened…
The only way to turn on the decoder now is to use the POWER option in the list of options from the MMP.

EDIT: the media_player.turn_off works as always

I think I spotted an error in power on, I’m just doing a code tidy up to try and avoid this type of issue going forward.

Please try v2.1.4 which is a beta release. Let me know if you don’t know how to enable beta releases for a HACS component.

Yes, it now turn on but i loose again the images of the program i am looking…

As before, what channel name/number and time.