Custom Component: SkyQ Media Player

Perfect thanks.

I have noticed an error in my logs too, doesnt seem to impact anything but not sure if you’ve seen it before:

Logger: homeassistant.components.homekit.type_media_players
Source: components/homekit/type_media_players.py:408
Integration: HomeKit (documentation, issues)
First occurred: 4:13:40 PM (6 occurrences)
Last logged: 4:24:23 PM

media_player.skyq_living_room: Sources out of sync. Restart Home Assistant

Actually, ignore me, in pasting it I can see its homekit related not skyq related as such!

Over the last 10 days or so, I’ve made some quite substantial changes to the SkyQ component. Hopefully many of the changes make it more stable, but some of them are to do with bringing it more in line with current design practices for HA.

On the outside that has little visible impact. Along the way I’ve fixed a few bugs as well. Also some enhancements, such as the removal of the need to provide country in the config for non-UK countries since it now picks this up from the SkyQ box (GBR and ITA only at the moment).

If you get a chance and are willing, I’d appreciate people to take a look at the latest beta (currently beta6), and let me know if you have any problems. If you do encounter problems then the following information is helpful:

  • What were you doing at the time ?
  • What channel are you on ?
  • What time did the problem occur (because then I can go back and look at EPGs) ?
  • Provide a copy of any errors in the logs from the skyq custom component, or pyskyqremote.
  • Anything else you think might be useful

If you can post the info on GitHub, that would help, rather than doing debugging on this thread.

1 Like

Hi Roger, I’ve dropped a bug/issue into GitHub just now.
Turns out the component worked fine with country code IRL too for Irish SkyQ boxes but now with the 2.1.6beta6 version it’s no longer working (citing invalid country code, which I suppose is pretty much by design for now but hopefully can be added back in)
Hopefully have enough info in GitHub for you…shout if not :+1:

FYI for anyone not aware, this can be done in HACS by going into the integration and clicking the ellipsis in the top right and clicking show beta, it will then reload and have the beta6 available to download in HACS

I have just released v2.1.6. This comes with some minor enhancements including removing the need for a country parameter when you are not in the UK. It detects country from the SkyQ box at startup. The release also fixes a number of bugs, plus aligns more to HA standards such that the integration should now appear on the Developer/Info page and hopefully with a SkyQ icon when that passes through caching at Cloudflare.

I’m slowly moving this forward to being something I can submit to core at HA, but that is still some way off since I need to add a gui based config flow. So there will be yet more change ahead, but I’ll try not to break things.

1 Like

And very soon after I have released v2.1.7. I had an idea as I was looking through documentation to see if there was a way to tidy up the mess of sources that where configured on Mini Media Player, and it seems that it is possible to send a command for something like Channel Up without having to configure s source.

So with v2.1.7, you can now configure a button as below, no need to add the matching source in your config.

shortcuts:
  buttons:
    - icon: 'mdi:chevron-up'
      id: channelup
      type: skyq

Supported ‘button commands’ are these:

  • sky, power, tvguide or home, boxoffice, search, sidebar, up, down, left, right, select, channelup, channeldown, i, dismiss, text, help,
  • play, pause, rewind, fastforward, stop, record
  • red, green, yellow, blue
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
1 Like

You deserve nothing but good things in life.

1 Like

I’m just about to change the release slightly, bit of an oops. It should be ‘skyq’ instead of ‘command’. If you have already installed v2.1.7, just re-install the same release. It will support ‘command’ for a couple of releases, and give a warning in the logs to change to ‘skyq’.

And thank you @dankitchen :slight_smile:

1 Like

Really pleased to see this component getting some work. It’s great and I use it every day !
Just changing it to link my buttons to the new play_media method. Works really well.
To fit with other things, shouldn’t they really be done on a remote.skyq type setup?
or is that a big job to split into a media_player and a remote ?
Thanks again !

That’s an interesting idea. This is all new to me, so I’d have to look at what a remote offers over media player. Not sure how it would work with MMP which it seems many people use.

I’ve done a bit of looking at this, I’m just wondering what extra value a remote would bring. I suspect it may need some sort of custom Lovelace card to make value, and then you would have two cards in Lovelace rather than one.

Any thoughts welcome :slight_smile:

I have built myself a kind of quick remote using a harmony hub to send the buttons presses to the sky box, I would guess having the sky q controls on a remote would allow these buttons to be sent over IP rather than ir like I’m doing now, it would be more reliable and require less hardware.

The way it is now could you use the control functions outside of MMP? For example could you call the service in an automation? If it was in a remote then you could use it outside of MMP.

To be honest I think you could almost build that in MMP using the buttons. I suspect that the rewind/pause-play/fast forward aren’t available as what I have called ‘button commands’, but they would be easy to add, and are available as other services on the entity.

So I guess the question is, what is the front-end to remote and what can it consume? So, SkyQ creates a media player entity, which is consumed by MMP or the standard media control. If I create a remote entity, what will consume it?

Yes you can call the service. The service is ‘media_player.play_media’. Parameters:

entity_id: media_player.sky_q_mini
media_content_id: channelup
media_content_type: skyq

Available services are:

  • play_media - Button commands
  • media_previous_track - Rewind
  • media_next_track - Fast forward
  • media_pause Pause
  • media_play - Play
  • turn_off - off
  • turn_on - on
  • select_source - Select source you have specified in your config

I would use a remote entity from the buttons on my home assistant screen.

At the moment, I use this code…

                  - entity: media_player.lounge_skytv
                    hold_action:
                      action: call-service
                      haptic: success
                      repeat: 250
                      service: media_player.play_media
                      service_data:
                        entity_id: media_player.lounge_skyq
                        media_content_id: up
                        media_content_type: skyq
                    icon: 'mdi:arrow-up'
                    show_icon: true
                    show_name: false
                    styles:
                      action: call-service
                      card:
                        - height: 90px
                      haptic: success
                    tap_action:
                      action: call-service
                      haptic: success
                      service: media_player.play_media
                      service_data:
                        entity_id: media_player.lounge_skyq
                        media_content_id: up
                        media_content_type: skyq
                    type: 'custom:button-card'

I would change this to remote.send_command or similar.
Obviously to some degree it makes no difference, it just feels like “the right way”.

It may be my imagination, but the buttons feel more responsive working like this, than they did going through a fake source.

Thanks again !

Very soon, I’m expecting a Yio Remote to arrive.
Then I will be able to link all my home assistant stuff into a physical remote control.

https://www.yio-remote.com/

I think this is the key point. I’d rather not have more code to maintain for no clear benefit.

If this requires a remote entity, then I can look at it. I note that there seems very little documentation on HA with regards Remote, and there is specific information against media_player on doing exactly what I have done.

If media_player is happy with how you have done it.
Then that’s all good !

I guess conventions only become important if you try and get the component accepted into the core home assistant release (which would be amazing!)
And as you say if it’s documented to do what you did, they you would hope it is right !

I don’t think my physical remote control requires anything specific like it being a remote. type device.
I think I’ll be able to make it work.

I just assumed that remote. existed for a reason. But I guess there are always several ways to achieve something.

Anyway, once again, Thank you very much. I love this component and I’m really pleased to see you working on it. I hope I didn’t come across negative !

Regards,
Bruce.

1 Like

I’ve tried some time ago to put the icon on the channel name but i can’t find the right dimension for it. What’s yours?

yio remote looks interesting… How it works? I mean, how can you use it with HA? (i know this is a little bit offtopic)