Frndly TV for Channels

Looks like its back up but I can't get the docker channels script to work.
I am able to log onto the website now but frndlytv docker integration still not working.

Ok I wrote an error in the script its working .. My fault.

1 Like

Hello! Channels newbie here. I thought I'd give it a test run this month, along with the Frndly TV docker. But I'm going to try setting it all up in Unraid, and I don't see any previous experiences in this thread. The Frndly docker is not listed in their community app store, so I'll be configuring it manually. Does anyone with experience have any advice or recommendations before I get started?

Hopefully you have Portainer available, and if so here's what your stack should look like:

version: '3.9'
services:
  frndlytv-for-channels:
    image: matthuisman/frndlytv-for-channels
    container_name: frndlytv-for-channels
    environment:
      - IP=${IP} # For Geo-locating FrndlyTV to a different area
      - USERNAME=${USERNAME} # FrndlyTV username (the email you used to sign-up)
      - PASSWORD=${PASSWORD} # FrndlyTV password (the password you chose when you signed-up)
    ports:
      - '8185:80'
    restart: unless-stopped
3 Likes

I have been using Python via terminal on my mac for months and as of today it's not connecting. I am wondering if the upgrade they said they did last night is causing this. Does anyone know?

PS...using Python as the way to get FRNDLY tv into channels.

Look for errors in the terminal output.
I run the docker version, which uses the same python in a container and I look at the docker container log.
Maybe it's not logging you in or throwing some other error.

I do see an error from earlier today that it recovered from.

2023-09-06T22:51:57.309398102Z 172.18.0.1 - - [06/Sep/2023 15:51:57] "GET /playlist.m3u?gracenote=include HTTP/1.1" 200 -
2023-09-06T22:51:57.310767541Z 172.18.0.1 - - [06/Sep/2023 15:51:57] "GET /playlist.m3u?gracenote=include HTTP/1.1" 500 -
2023-09-06T22:51:57.311177721Z ----------------------------------------
2023-09-06T22:51:57.311416424Z Exception happened during processing of request from ('172.18.0.1', 35089)
2023-09-06T22:51:57.312023359Z Traceback (most recent call last):
2023-09-06T22:51:57.312295606Z   File "./app.py", line 53, in do_GET
2023-09-06T22:51:57.312528780Z     routes[func]()
2023-09-06T22:51:57.312713166Z   File "./app.py", line 118, in _playlist
2023-09-06T22:51:57.312894550Z     self.wfile.write(f'#EXTINF:-1 channel-id="{channel_id}" tvg-id="{channel_id}" tvg-logo="{logo}"{gracenote_id}{chno},{name}\n{url}\n'.encode('utf8'))
2023-09-06T22:51:57.313063392Z   File "/usr/local/lib/python3.8/socketserver.py", line 826, in write
2023-09-06T22:51:57.313200405Z     self._sock.sendall(b)
2023-09-06T22:51:57.313299780Z BrokenPipeError: [Errno 32] Broken pipe
2023-09-06T22:51:57.313485836Z 
2023-09-06T22:51:57.313587099Z During handling of the above exception, another exception occurred:
2023-09-06T22:51:57.313865133Z 
2023-09-06T22:51:57.313972677Z Traceback (most recent call last):
2023-09-06T22:51:57.314080808Z   File "/usr/local/lib/python3.8/socketserver.py", line 683, in process_request_thread
2023-09-06T22:51:57.314193236Z     self.finish_request(request, client_address)
2023-09-06T22:51:57.314287785Z   File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
2023-09-06T22:51:57.314445226Z     self.RequestHandlerClass(request, client_address, self)
2023-09-06T22:51:57.314553026Z   File "./app.py", line 25, in __init__
2023-09-06T22:51:57.314651969Z     super().__init__(*args, **kwargs)
2023-09-06T22:51:57.314751022Z   File "/usr/local/lib/python3.8/socketserver.py", line 747, in __init__
2023-09-06T22:51:57.314851514Z     self.handle()
2023-09-06T22:51:57.314939037Z   File "/usr/local/lib/python3.8/http/server.py", line 435, in handle
2023-09-06T22:51:57.315040469Z     self.handle_one_request()
2023-09-06T22:51:57.315132571Z   File "/usr/local/lib/python3.8/http/server.py", line 423, in handle_one_request
2023-09-06T22:51:57.315232514Z     method()
2023-09-06T22:51:57.315319537Z   File "./app.py", line 55, in do_GET
2023-09-06T22:51:57.315444593Z     self._error(e)
2023-09-06T22:51:57.315538390Z   File "./app.py", line 29, in _error
2023-09-06T22:51:57.315642954Z     self.end_headers()
2023-09-06T22:51:57.315736112Z   File "/usr/local/lib/python3.8/http/server.py", line 537, in end_headers
2023-09-06T22:51:57.315838469Z     self.flush_headers()
2023-09-06T22:51:57.315931251Z   File "/usr/local/lib/python3.8/http/server.py", line 541, in flush_headers
2023-09-06T22:51:57.316031368Z     self.wfile.write(b"".join(self._headers_buffer))
2023-09-06T22:51:57.316128545Z   File "/usr/local/lib/python3.8/socketserver.py", line 826, in write
2023-09-06T22:51:57.316226146Z     self._sock.sendall(b)
2023-09-06T22:51:57.316313297Z BrokenPipeError: [Errno 32] Broken pipe
2023-09-06T22:51:57.316453382Z ----------------------------------------
2023-09-06T22:52:53.650749217Z 172.18.0.1 - - [06/Sep/2023 15:52:53] "GET /playlist.m3u?gracenote=include HTTP/1.1" 200 -

And after looking further, it appears to be a bug in Channels DVR that caused this after updating to the latest pre-release version.

No issues with FrndlyTV here, using the Docker container. BTW, there's really no functional difference using a Python application like this running in a Docker container vs running it from the command line.

The idea with a Docker container, is to minimize issues with dependencies, and to isolate the application from the host OS to reduce attack vectors and the like. It also makes testing substantially easier for developers, as you only need to test for the OS environment that exists inside the container.

I see from your post history in this thread that you moved from Docker to running the application directly on the Mac OS. If you continue to have issues, you may want to consider moving back to Docker for the above stated reasons.

1 Like

I also confirm that the docker is working for me.

It wasn’t logging me in at first…it was just stuck on “logging in….”….now it’s logged in but I get the error below?

Funny, I think I upgraded to the latest pre-release earlier today….but not sure why I agetting the error above.

What error are you getting?
Confusing as you quoted my post twice and then show a screenshot showing a directory is read-only

Disk full?

Frndly docker is working just fine for me too,

The FRNDLY docker is working here perfectly.

1 Like

There does seem to be an intermittent issue with the FrndlyTV for Channels docker logging in.
Maybe something to do with backend changes at FrndlyTV.

2023-09-07T16:26:00.428990864Z 401
2023-09-07T16:26:00.429750885Z Unauthorized access
2023-09-07T16:26:00.429905001Z logging in....
2023-09-07T16:26:03.279861066Z Logged in!
2023-09-07T16:26:03.631548762Z 401
2023-09-07T16:26:03.631771365Z Unauthorized access
2023-09-07T16:26:03.631986268Z 172.18.0.1 - - [07/Sep/2023 09:26:03] "GET /playlist.m3u?gracenote=include HTTP/1.1" 500 -
2023-09-07T16:26:03.632539414Z ----------------------------------------
2023-09-07T16:26:03.632787260Z Exception happened during processing of request from ('172.18.0.1', 35273)
2023-09-07T16:26:03.637665756Z Traceback (most recent call last):
2023-09-07T16:26:03.641247818Z   File "/usr/local/lib/python3.8/socketserver.py", line 683, in process_request_thread
2023-09-07T16:26:03.641621871Z     self.finish_request(request, client_address)
2023-09-07T16:26:03.644457754Z   File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
2023-09-07T16:26:03.644680492Z     self.RequestHandlerClass(request, client_address, self)
2023-09-07T16:26:03.644795429Z   File "./app.py", line 25, in __init__
2023-09-07T16:26:03.644898381Z     super().__init__(*args, **kwargs)
2023-09-07T16:26:03.644997405Z   File "/usr/local/lib/python3.8/socketserver.py", line 747, in __init__
2023-09-07T16:26:03.645099286Z     self.handle()
2023-09-07T16:26:03.645191460Z   File "/usr/local/lib/python3.8/http/server.py", line 435, in handle
2023-09-07T16:26:03.645297431Z     self.handle_one_request()
2023-09-07T16:26:03.645466663Z   File "/usr/local/lib/python3.8/http/server.py", line 423, in handle_one_request
2023-09-07T16:26:03.645585795Z     method()
2023-09-07T16:26:03.645681304Z   File "./app.py", line 55, in do_GET
2023-09-07T16:26:03.645798906Z     self._error(e)
2023-09-07T16:26:03.645899572Z   File "./app.py", line 53, in do_GET
2023-09-07T16:26:03.645994044Z     routes[func]()
2023-09-07T16:26:03.646088139Z   File "./app.py", line 71, in _playlist
2023-09-07T16:26:03.646184775Z     channels = frndly.channels()
2023-09-07T16:26:03.646278010Z   File "/usr/src/app/frndly.py", line 150, in channels
2023-09-07T16:26:03.646409029Z     rows = self._request('https://frndlytv-api.revlet.net/service/api/v1/tvguide/channels?skip_tabs=0')['data']
2023-09-07T16:26:03.646546048Z   File "/usr/src/app/frndly.py", line 133, in _request
2023-09-07T16:26:03.646648214Z     return self._request(url, params=params, login_on_failure=False)
2023-09-07T16:26:03.646753245Z   File "/usr/src/app/frndly.py", line 136, in _request
2023-09-07T16:26:03.646850562Z     raise Exception(data['error']['message'])
2023-09-07T16:26:03.646948954Z Exception: Unauthorized access
2023-09-07T16:26:03.647044846Z ----------------------------------------
2023-09-07T16:26:03.977775285Z 401
2023-09-07T16:26:03.978019568Z Unauthorized access
2023-09-07T16:26:03.978140565Z logging in....
2023-09-07T16:26:06.751732346Z Logged in!

Did you try ogging into the app or website?
Check the config file to ensure there are no $* type stuff.
The docker can only take numbers and letters.

Sounds like either you don't use it or are unfamiliar with it.
There is no config file. It gets the config info from Environment variables in a docker container and from command line arguments when run as a python script.
See https://github.com/matthuisman/frndlytv-for-channels/blob/master/app.py for reference.

I have no issues as it's been working for me for over a year.
Just stating that the FrndlyTV server seems to be having issues lately.
Normally once the docker logs in to the FrndlyTV service, it stays logged in for about 6 hours.
The logs I shared above show it logged in and immediately after gives the 401 unauthorized access error, which means FrndlyTV forgot it just logged in less than 0.5 seconds ago. It then logs in again and everything is back to normal.

1 Like

Hey guys. Thanks for the feedback and you won’t believe what the issue ended up being…and I am wondering if any of you are MAC users….I upgraded my OS on my MAC mini, which is the machine I run channels off of. Apparently the latest OS does not include free software for NTSF external drives…what the heck…..so I had to buy a NTSF for Mac program to be able to use the external drive..and I apparently have to keep that app running constantly. Once I opened it and had it running, the error I received went away….so crazy…I didn’t mean to waste anyone’s time yesterday….but good lord that was a trip I wasn’t expecting.

Thanks for letting us know.
Last time my docker couldn't log me in i had to go over to the site and reset my password and restart the docker with the new details.
glad it all got worked out.

1 Like

Hi @matthuisman on your FrndlyTV page you say this can also work for other IPTV services...which ones have you tried and how would I set that up?