Custom Component: SkyQ Media Player

It sounds like you are using ‘media_play’ rather than ‘play_media’. ‘media_play’ is the reverse of ‘media_stop’ and ‘media_pause’.

Edit: I should add, when I call the service in my example it works fine. I tested on HASS 0.119.dev0. Note that, the error you are reporting is not generated by the SkyQ integration, it is generated by the HASS Media Player validation.

Here is a working automation based on an an input_boolean:

automation:
  id: testsky
  trigger:
    platform: state
    entity_id: input_boolean.testsky
    from: 'off'
    to: 'on'
  action:
    - service: media_player.turn_on
      entity_id: media_player.sky_q_mini
    - delay: 00:00:25
    - service: media_player.play_media
      entity_id: media_player.sky_q_mini
      data:
        media_content_id: 'channelup'
        media_content_type: skyq

or you could use:

    - service: media_player.select_source
      entity_id: media_player.sky_q_mini
      data:
        source: BBC1HD
1 Like

Excellent, Roger, thank you for your help.

Hi

I’m new to HA but having good go at setting up sonoff, tuya, hive and now sky q

I installed sky q function to work with my sky q 2tb box and it worked perfectly when testing. I only set up the basic example with sky q and bbc news to make sure it worked before putting more time into setting it up.

I was very please untill I stopped testing and chilled out for the night to watch some TV via sky using the normal remote and left HA project and forgot about it.

However now I’m having issues with my sky box. Every hour ( no specific time just about every 45-60min ) the box freezes. When I say freezes the tv shows no incoming hdmi signal from the sky box. The led on the front of the sky box continues to show as if its working (I’m currently watching recorded TV, so the blue ring keep turning, and the green led is on) if I press any button on remote nothing happens. (At this point I opened HA on phone and sky was showing offlin) the only way to get it working again is to pull power and restart box. (Done 3 times tonight in 3 hours and never done before)

I’ve Google and can’t see anyone else with the issue. (I have seen some box freezing historical but doesn’t seem to match my issue) it may be coincidence that it happens the same day I install sky q on HA so I have removed the info from my HA configuration file to see if it shops.

Any thoughts please.

Hi

I’m using the hacs version and installing through the integration installer, I’m trying to create buttons for the channels mainly so I can link homekit and also to link to a physical aqara button to play a specific channel.

Do I need to install via Yaml integration to achieve this?

It makes no difference how you install it, it works the same via ui or yaml.

I’m not sure how to link to homekit. I was trying to figure it out the other day because I see the Sony Bravia integration I use supports homekit, but I don’t understand by what means. I don’t use homekit much myself, so haven’t look too hard.

To link to a button I would guess you would want to use an automation to be triggered by the button push that will run a media_player.select_source action as shown in a post a few back.

Same with me.
I installed it a couple of days ago and have had some issues with my box freezing mainly during playback.
It a shame as it’s a great integration from @RogTPi noticed from reading these comments that the freezing has been occurring for a few months I guess it’s tricky finding out what’s causing it.
I have 2 instances of HA running at the moment for testing things so I initially set it up on one then put it on my main one I don’t think I removed the first one so that won’t be helping me :joy:

Thanks for your comment.
Glad I’m not alone. Means it’s less lily to be my setup.

It does seem like a good function if it doesn’t freeze

I can only comment that I did some work some time ago, to reduce the number of calls to the box. I think at the time I had a couple of freezes, since then I’ve had no freezes at all.

As ever, without being able to replicate the issue and identify where the cause is, it is nigh on impossible to resolve. This is exacerbated by the fact that use of the ‘api’ is not supported by Sky at all. I’ve had to use other peoples documentation on the internet along with some intelligence.

I can create a debug version of the module that does the box calls, ‘pyskyqremote’, if someone wants to run it to see which call it fails on. I suspect you will get big logs…

1 Like

I am very happy to help. But I must advise im very new to HA and am still learning the set process accetra.

If you give a debug version with the instruction on how to test and what logs you need from where I will follow them and update you with required info.

I have had the feature turn off since I reported the issue and no more freezes. Fyi

I’ll see what I can do over the Christmas period to set something up.

Silly question as this is more of a media player but I see that there was the ability to see the remote control battery level and storage space of the box (via upnp I believe), will these be considered in the future for sensors that can be exposed as part of this integration or is it no longer possible?

If you can point me at some information on how that info can be retrieved via api from the sky box, I’ll take a look.

Thanks @RogTP, like i said old implementation but was still active alongside the websocket api when it first released.

Only mention of it I can find now is a blog post.

Sky Q UPnP, REST and WebSocket API interfaces – Liam Gladdy

Under the Activity Monitoring heading he mentions the battery status.

Something that’s a little more concerning is that Sky log virtually every thing you do on the box, by POSTing data to bd01.sky.com, unencrypted.

That data includes some potentially sensitive information, like what you’re viewing, your box serial number and even things like your remote control battery level and serial number. That probably should at least have TLS protection

Ahh, yep I’ve looked at that post loads but not really looked at the activity monitoring piece. Given that it is a post out of the box to a remote location, I suspect you need to do something more so the network level to intercept the traffic. Outside the capabilities of the integration I think :worried:

thought as much, was worth an ask :smiley:

hi
Am getting this error

Invalid config for [media_player.skyq]: expected a dictionary for dictionary value @ data[‘sources’]. Got None. (See ?, line ?).
Component error: SkyNews - Integration ‘SkyNews’ not found.
Component error: SkyOne - Integration ‘SkyOne’ not found.

config

media_player:

- platform: skyq
  name: SkyQ Living Room
  host: 192.168.0.26
  room: Living Room
  config_directory: '/config/'
  generate_switches_for_channels: true
  sources:
SkyOne: '1,0,6'
SkyNews: '5,0,1'

Spacing.
Before “Sky…” you need 4 spaces in both lines.

As @IK0ADR says, indentation is important. It needs to look as below. “config_directory” is not a valid option anymore.

media_player:
 - platform:  skyq
   name: SkyQ Living Room
   host: 192.168.0.10
   sources:
      SkyOne: '1,0,6'
      SkyNews: '5,0,1'

Thank you that has sorted it…now its working my next question is…the pause button works but there is no play button