RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
101 stars 17 forks source link

[BUG] Can't connect to Sky Q IPTV Box (Germany) #124

Closed Shogun1978 closed 1 year ago

Shogun1978 commented 1 year ago

Describe the bug
When trying to setup the integration, I get "Failed to connect to host."

To Reproduce
Steps to reproduce the behavior:

  1. Setting up the integration

Expected behavior
Getting the integration set up and connect to the Sky Q box

Component versions

  1. What version of SkyQ component are you using? Sky Q IPTV box - german model

Your configuration
How have you setup your devices, by UI or YAML? UI

RogerSelwyn commented 1 year ago

Sorry the integration does not support internet only boxes which is stated at the start of the documentation.

RogerSelwyn commented 1 year ago

I should add we have tried quite hard to find the right api calls on Sky Glass and failed. Sky are starting to sell the internet only device in the UK. I don’t plan to get one at this time (I don’t have money to spare) but if someone can lend me one I’d be prepared to investigate further.

Shogun1978 commented 1 year ago

Ok. So it's a question of finding the right API calls. I can offer to test some stuff on my device or maybe set up a remote connection for you. Otherwise I am pretty sure, that my German device will not work in the UK and vice versa. So if I can help somehow, I am happy to support you.

And thanks for the fast response :-)

RogerSelwyn commented 1 year ago

I've worked with some people to try calls against Sky Glass boxes which I would expect to expose the same apis, so I'm not sure I can guide you better than them. We did not get what was needed.

If you can open up my ip to access your Sky box, then I can try to probe it. To be honest whilst I can name the existing ports used, it is quite possible any api may be on other ports. That said, the info that is currently used comes from the upnp capability of the SkyQ box (I believe), but the new Sky Glass/pucks don't support casting (as far as I am aware) so the upnp isn't there. So it's a bit of a random guess. People have run port scans, but haven't managed to get anything useful so far.

The problem is that Sky don't publish any api, and there appears to be no app for these boxes where you could sniff the traffic (and to be honest the apis used don't actually get used by the Sky Go app against Sky Q box).

Or if you have a vm I can VNC into which would then have access to your Sky box, then would mean opening the firewall less.

But of course, this depends how much you want to trust me. From my end it is really about just trying stuff (I have no particular plan in mind apart from potentially using Postman to automate some sort of range of calls). I can be pretty bloody minded in trying to figure things out, but I suspect this may be a challenge too far.

Shogun1978 commented 1 year ago

I will see, what I can set up here. Virtual machine, VPN tunnel, kind of a sandbox. But currently we get our solar panels up and running and I need to rebuild my local NAS. So it might take some time. If there are some tests I can do myself (maybe with Postman or something else) just tell me.

RogerSelwyn commented 1 year ago

No worries. I’m away early December for a couple of weeks, so if not ready until then it will have to be after that.

RogerSelwyn commented 1 year ago

Postman - I’ll need to think on it and look back at previous conversations. It is likely scanning for all open ports and then trying calls based on previous working ones to see if anything can be found. To be honest I’m not holding out an enormous amount of hope.

cyablo commented 1 year ago

I've got one of these boxes. Full nmap scan shows:

PORT STATE SERVICE VERSION 8009/tcp open tcpwrapped |_ajp-methods: Failed to get a valid response for the OPTION request 9081/tcp open http Mongoose httpd |http-title: Site doesn't have a title (application/json). | http-methods: | Supported Methods: GET HEAD POST OPTIONS

Port 9081 shows "status=ok", Port 8009 gives me a HTTP 404. Doesn't look very promising.

RogerSelwyn commented 1 year ago

My understanding is that Sky has been closing down some of the previously open api's on the boxes, including those on 9006. I fear it is a no go. Shame, because it is so closed minded, I don't understand why they wouldn't want people to be able to automate their boxes via a well written api. As it is, it discourages people from using the newer devices. Certainly when my SkyQ boxes come to an end, I'll consider what I replace them with, unlikely to be the new Sky boxes as they stand.

cyablo commented 1 year ago

They're getting very restrictive here in Germany. Card pairing is forced and only certified hardware can be used. They forced Vodafone (who operates most of the coax cable networks here) to change Cards which killed every last Linux/OSCam fun.