Kayo for Channels

On the contrary we should be preparing for Widevine

2 Likes

fixed then?

2 Likes

yep! was an issue with server IP

Kayo container has stopped working for me. Conatiner runs, but playlist only loads 2 channels and nothing will play.

Temporary issue i hope?

Working normal for me on Mac

2 Likes

I tried it on a windows machine and it worked. I went back to my NAS and removed the container and image and set it up from scratch and it worked.

No idea what happened, but bloody glad its not gone

ha! I live in constant fear that this integration will stop working one day and I will be forced to use their app again.

2 Likes

as long as they dont switch the streams to Widevine - i should be able to keep it going :slight_smile:

2 Likes

Forced to use Foxtel
lol biggest Aussie fear

1 Like

I've just discovered this wonderful setup! I got it running last night and at first it worked fine. But about 1 hour later it started failing. I thought it was an issue with my DNS server, so I rebooted it, and it started working again.

However this morning it is failing again, I've confirmed that DNS is working correctly. I assume the container uses the same DNS settings as my windows host? My password does have an "!" in it, so I've added the escape character (although it worked without it as well).

Any help would be appreciated!

EDIT: I've done a bit more digging, and as the errors below seem to suggest, the connection is timing out. I've run a network capture and I can see that it is going to the correct IP address, but it is having connection issues, the 3-way tcp handshake completes but then I'm seeing retransmits and Dup Acks - I'm not sure why it's being so flaky.

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f8748fe96d0>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8748fe96d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/kayo.py", line 41, in _oauth_token
    token_data = self._session.post('https://auth.streamotion.com.au/oauth/token', json=data, headers={'User-Agent': 'okhttp/3.10.0'}).json()
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8748fe96d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
logging in....
logging in....

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./app.py", line 116, in <module>
    kayo.login(USERNAME, PASSWORD)
  File "/usr/src/app/kayo.py", line 138, in login
    self._oauth_token(payload)
  File "/usr/src/app/kayo.py", line 43, in _oauth_token
    raise Exception('Unable to fetch token. Check your location is in Australia.')
Exception: Unable to fetch token. Check your location is in Australia.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
    raise err
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f9d55c4b6d0>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9d55c4b6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/kayo.py", line 41, in _oauth_token
    token_data = self._session.post('https://auth.streamotion.com.au/oauth/token', json=data, headers={'User-Agent': 'okhttp/3.10.0'}).json()
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 590, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='auth.streamotion.com.au', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9d55c4b6d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./app.py", line 116, in <module>
    kayo.login(USERNAME, PASSWORD)
  File "/usr/src/app/kayo.py", line 138, in login
    self._oauth_token(payload)
  File "/usr/src/app/kayo.py", line 43, in _oauth_token
    raise Exception('Unable to fetch token. Check your location is in Australia.')
Exception: Unable to fetch token. Check your location is in Australia.

ive just pushed a new container that removes the usage of requests.session()
i have sometimes seen these cause issues with long running code due to socket caching I suspect or something like that.

Give the latest container a try and fingers crossed it helps

1 Like

Thanks very much Matt, sadly it doesn't seem to have made any difference.


1 Like

I wondered if it's a docker issue, I tried to restart docker, and it failed to start back up. So I rebooted the host, after a reboot it's working fine, fingers crossed it was just docker doing something odd. I have a total of 6 containers running and plenty of free RAM, so I don't think I'm hitting any kind of limit. I'll continue to monitor, thanks for your help.

Hey Matt, I occasionally run into an issue where the stream displays an internal error or that the link is not resolvable.

When I check the docker logs, it usually asks me to check the location. I run a smartdns on the machine but have ensured that kayo is not effected in the regional settings for the kayo service. I am not sure if this is as reliable as we would like.

Can I set a dns specific for the kayo container so that it doesnt inherit the machines dns using something like this Container networking | Docker Documentation

Want to ensure that it's not going break anything. Thanks

1 Like

give it a go :slight_smile: you can always revert.
Think --dns to the container should be fine

Is the end near ?
Saw this pop up in the channel scan today: DRM FSA505

hmm, i cant see anywhere where I check for DRM in the code... so not sure where that message coming from.

UPDATE:
Oh I see - it's a new channel named that and yes - thats drm protected. So they are testing.

UPDATE 2:
Latest github code and docker container updated to skip any drm channels

Guide data seems to be missing as of last few days?

Or is it just me?

@matthuisman - just wondering if anyone else is having issues with kayo for channels lately? It has been failing for me for the last couple of weeks.

The guide loads ok, it just fails when I try to play something. It seems that the .m3u8 that gets downloaded might have some funky stuff in it?

EDIT: I can watch Kayo fine through the official app - so everything else is fine. And I can see in the docker logs that it's getting a token without issue.

Looks like this for one of my channels:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=2261600,AVERAGE-BANDWIDTH=393518,RESOLUTION=852x480,FRAME-RATE=25.000,CODECS="avc1.64001E,mp4a.40.2",AUDIO="audio_0"
dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_1.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=9987234,AVERAGE-BANDWIDTH=875592,RESOLUTION=1920x1080,FRAME-RATE=25.000,CODECS="avc1.640028,mp4a.40.2",AUDIO="audio_0"
dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_2.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=7292265,AVERAGE-BANDWIDTH=592677,RESOLUTION=1280x720,FRAME-RATE=25.000,CODECS="avc1.64001F,mp4a.40.2",AUDIO="audio_0"
dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_3.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=4597234,AVERAGE-BANDWIDTH=415289,RESOLUTION=960x540,FRAME-RATE=25.000,CODECS="avc1.64001F,mp4a.40.2",AUDIO="audio_0"
dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_4.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1183600,AVERAGE-BANDWIDTH=345494,RESOLUTION=640x360,FRAME-RATE=25.000,CODECS="avc1.4D401E,mp4a.40.2",AUDIO="audio_0"
dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_5.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio_0",CHANNELS="2",NAME="English AAC",LANGUAGE="eng",DEFAULT=YES,AUTOSELECT=YES,URI="dfd4ea6481e34e02bd7dc9832c5d6406/aff4153b7048472d82d0094d932c24a5/index_6_0.m3u8"

Awesome work Matt. Can't believe I hadn't seen this before after using many of your other add-ons for years. This setup works nicely in Emby too, so a very happy camper.

2 Likes