Custom Component: SkyQ Media Player

I don’t believe there is an api for that I’m afraid, but I’ll look

I’ve had another look round the api resources I’ve identified (because there is nothing published from Sky), and I don’t see anything for triggering an App. There maybe something, but it isn’t discoverable.

Aaah okay never mind!

I have released v2.1.5 which fixes an issue where errors were generated during advert breaks between programmes when set to Italian TV.

Also with 2.1.5 i get the urllib3 error for the box that is in standby:

`2020-04-25 02:19:49 WARNING (SyncWorker_19) [pyskyqremote.skyq_remote] W0020 - Control URL not accessible: 192.168.1.242 : http://192.168.1.242:49153/description34.xml
2020-04-25 02:19:50 ERROR (SyncWorker_19) [pyskyqremote.skyq_remote] X0070 - Connection error: 192.168.1.242 : HTTPConnectionPool(host='192.168.1.242', port=49153): Max retries exceeded with url: /description35.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f636bc31160>: Failed to establish a new connection: [Errno 113] No route to host'))
Traceback (most recent call last):
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
    raise err
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1224, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.7/http/client.py", line 1016, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.7/http/client.py", line 956, in send
    self.connect()
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect
    conn = self._new_conn()
  File "/home/pi/hassmar20/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f636bc31160>: Failed to establish a new connection: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

There’s a way to handle that? I’ve read a previous post from @MadmanMonty but can’t find how to implement that solution on @RogTP updated version.

Anyway, thanks for that

Does you HA get rebooted during the night? I’m pretty sure that error can only occur during startup. I’ll have a look why it got a warning and an exception. Pretty sure I haven’t changed that logic recently.

Yes, once a week. It seems to occur only during startup and only from the box that is in standby (2 others works well). Didn’t know about previous version, I’ve updated yesterday from the first 4n0nD3v3l0p3r version (that has the similiar issue) to Your v2.1.5.

With that error the media_player entity (for that box) is not created at all.

I’ve done a fairly substantial re-working of the previous versions, plus adding new features, so any ‘fix’ for versions before v2 will not apply here.

I’ll PM you details of a test version, when I’ve worked it through.

How do you get that scrolling channel bit below your media player? Love that!!!

That’s created using the swiper card

The above post has some great examples to work with…I’m just using a call-service with the tap_action.

Happy to share my config

1 Like

Thanks Dan! Are you using a custom button card with image for your PS4 games or a picture element?

Cannot work out how to use custom button with an image that fills the button.

Do you mind sharing your config?

Sorry I forgot that part, it’s picture-entity

 - type: custom:swipe-card
        card_width: '185px'
        start_card: 2
        parameters:
          effect: 'coverflow'
          grabCursor: true
          centeredSlides: true
          slidesPerView: 'auto'
          coverflowEffect:
            rotate: 50
            stretch: 0
            depth: 100
            modifier: 1
            slideShadows : true
          pagination:
            type: 'bullets'
        cards:
          - type: picture-entity
			entity: media_player.skyq
			image: /local/skyq/images/bbc.png
			tap_action:
			  action: call-service
			  service: media_player.select_source
			  service_data: BBCOne

Good job! It works great. thank you very much

1 Like

My pleasure.

Could this be submitted to official HA Integrations? thanks

At the moment no. This is because it does not support configuration via the ui, it can only be configured by YAML. This is something I intend to get to, but I’m trying t get it properly stable first. So I’m ‘improving’ the code and structure, and I’ve added Italy support (which is a real challenge, because I don’t have an Italian sky box to gets against, but I’ve had some very tolerant helpers).

So still quite a lot to do first.

1 Like

Where did you find all the sky channels images?

Just a google image search

Can I just say I love this app now! the live pictures etc are great!

Is there a way I can change my background image so that if I am watching Netflix it has the netflix logo?

I have an image for when the box is off, and your images for when its on and watching a channel but one for when its on Netflix would be great, even if I need to add this somehow to the mini media code?

If you have a look at my GitHub site, you will see some instructions on what to do for that. Basically put some images in <config directory>/www/community/skyq/. I have some, including Netflix on the Github.