Custom Component: SkyQ Media Player

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.

All the Sky channels… Just when I wrote the message, some minutes ago…
And also the app images disappeared…

Please can you supply me your configuration. Feel free to PM it. Only from config.yaml, I don’t need Lovelace

Also is there any error in the log?

I have just released v2.1.4 which fixes an issue with not being able to power on the box from the power control. Also a problem with the app image not showing, which was introduced in the 2.1.4 Beta.

1 Like

Great work on this by the way.

Here’s one to tackle…

Explore the ability to launch the apps e.g. Netflix and YouTube etc rather than the down down down down down right right right method, whilst this works, it’s a bit hit and miss at times.

Like when the microphone is used on the remote to call Netflix, it just launches the app.

Not sure how one would approach this but I feel like it’s possible