I used xTeve in the first place, but could not get it to working as I was missing an auth before starting the stream (I needed Bearer token auth and xTeVe only supports username+password auth passed directly in URL AFAIK), so I checked the API xTeVe uses and mimicked it in my own tuner.
My whole project runs on a different port (4000) but I must have done something wrong to cause 500 status code in PMS (as seen in original logs).
So my question is: what am I doing wrong/missing in order to get this running just like xTeVe would? Itâs a shame PLEX does not support adding .m3u files directly. IPTV is the reason I bought plexpass for and I hope I will be able to use the extra features I paid for.
These are my responses to various calls.
GET /discover.json
{
"BaseURL": "http://mydomain",
"LineupURL":"http://mydomain/lineup.json",
"DeviceAuth": "tmobiletv",
"DeviceID":"2020-13-RN23-18B5KE",
"FirmwareName":"bin_1.0.0",
"FirmwareVersion":"1.0.0",
"FriendlyName":"TMobileTV",
"Manufacturer":"fifisvk",
"ModelNumber":"1.0.0",
"TunerCount":1
}
GET /device.xml OR GET /capability OR any unmatched call:
(equivalent to https://github.com/xteve-project/xTeVe/blob/71dfe912722f3aa7cf10a3764bcd86867ee32fa4/src/webserver.go#L101 )
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<URLBase>http://mydomain</URLBase>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>TMobileTV</friendlyName>
<manufacturer>Silicondust</manufacturer>
<modelName>HDTC-2US</modelName>
<modelNumber>HDTC-2US</modelNumber>
<serialNumber/>
<UDN>uuid:2020-13-RN23-18B5KE</UDN>
</device>
</root>
GET /lineup_status.json
{"ScanInProgress":0,"ScanPossible":1,"Source":"Cable","SourceList":["Cable"]}
These are called during adding of tuner and I believe they are correct (copy+paste from xTeVe), because tuner appears in Plex and can be added.
The interesting part is this:
GET /lineup.json (redacted, there are 99 channels in total)
[{"GuideName":"ĂĆT1 HD","GuideNumber":6054,"URL":"http://mydomain/stream/6054"},{"GuideName":"ĂĆT2 HD","GuideNumber":6053,"URL":"http://mydomain/stream/6053"},{"GuideName":"Nova HD","GuideNumber":4451,"URL":"http://mydomain/stream/4451"},{"GuideName":"Prima HD","GuideNumber":4452,"URL":"http://mydomain/stream/4452"},{"GuideName":"Prima LOVE HD","GuideNumber":6031,"URL":"http://mydomain/stream/6031"},{"GuideName":"Prima Cool HD","GuideNumber":6032,"URL":"http://mydomain/stream/6032"},{"GuideName":"Nova 2 HD","GuideNumber":4453,"URL":"http://mydomain/stream/4453"},{"GuideName":"Nova Gold HD","GuideNumber":4454,"URL":"http://mydomain/stream/4454"},{"GuideName":"Nova Action HD","GuideNumber":4455,"URL":"http://mydomain/stream/4455"},{"GuideName":"Barrandov TV HD","GuideNumber":4456,"URL":"http://mydomain/stream/4456"},{"GuideName":"Barrandov Krimi","GuideNumber":6066,"URL":"http://mydomain/stream/6066"},{"GuideName":"Prima Krimi","GuideNumber":4338,"URL":"http://mydomain/stream/4338"},{"GuideName":"ĂĆT3 HD","GuideNumber":4522,"URL":"http://mydomain/stream/4522"},{"GuideName":"ĂĆT24 HD","GuideNumber":6024,"URL":"http://mydomain/stream/6024"},{"GuideName":"CNN Prima News HD","GuideNumber":6115,"URL":"http://mydomain/stream/6115"}]
GET /stream/channelId
makes an authorized call to fetch stream URL for given channel id, returning 302 redirect to said URL. When I try this locally by pasting my URL into VLC, I am able to get the stream and watch it.
The following two calls were never used as I am stuck on that error message from my original post, but I am including these just to be complete:
GET /playlist.m3u (redacted, there are 99 channels in total)
#EXTM3U
#EXTINF:-1 tvg-id="6054" tvg-logo="https://files.cdn.magio.tv/tv_logos/ct1-hd.png",ÄT1 HD
http://mydomain/stream/6054
#EXTINF:-1 tvg-id="6053" tvg-logo="https://files.cdn.magio.tv/tv_logos/ct2-hd.png",ÄT2 HD
http://mydomain/stream/6053
#EXTINF:-1 tvg-id="4451" tvg-logo="https://files.cdn.magio.tv/tv_logos/nova-hd.png",Nova HD
http://mydomain/stream/4451
#EXTINF:-1 tvg-id="4452" tvg-logo="https://files.cdn.magio.tv/tv_logos/prima-hd.png",Prima HD
http://mydomain/stream/4452
#EXTINF:-1 tvg-id="6031" tvg-logo="https://files.cdn.magio.tv/tv_logos/prima-love-hd.png",Prima LOVE HD
http://mydomain/stream/6031
#EXTINF:-1 tvg-id="6032" tvg-logo="https://files.cdn.magio.tv/tv_logos/prima-cool-hd.png",Prima Cool HD
http://mydomain/stream/6032
#EXTINF:-1 tvg-id="4453" tvg-logo="https://files.cdn.magio.tv/tv_logos/nova-2-hd.png",Nova 2 HD
http://mydomain/stream/4453
#EXTINF:-1 tvg-id="4454" tvg-logo="https://files.cdn.magio.tv/tv_logos/nova-gold-hd.png",Nova Gold HD
http://mydomain/stream/4454
#EXTINF:-1 tvg-id="4455" tvg-logo="https://files.cdn.magio.tv/tv_logos/nova-action-hd.png",Nova Action HD
http://mydomain/stream/4455
#EXTINF:-1 tvg-id="4456" tvg-logo="https://files.cdn.magio.tv/tv_logos/barrandov-tv-hd.png",Barrandov TV HD
http://mydomain/stream/4456
#EXTINF:-1 tvg-id="6066" tvg-logo="https://files.cdn.magio.tv/tv_logos/barrandov-krimi.png",Barrandov Krimi
http://mydomain/stream/6066
#EXTINF:-1 tvg-id="4338" tvg-logo="https://files.cdn.magio.tv/tv_logos/prima-krimi.png",Prima Krimi
http://mydomain/stream/4338
#EXTINF:-1 tvg-id="4522" tvg-logo="https://files.cdn.magio.tv/tv_logos/ct3-hd.png",ÄT3 HD
http://mydomain/stream/4522
#EXTINF:-1 tvg-id="6024" tvg-logo="https://files.cdn.magio.tv/tv_logos/ct24-hd.png",ÄT24 HD
http://mydomain/stream/6024
GET guide.xml (heavily redacted, 20k lines in total)
<?xml version="1.0"?>
<tv generator-info-name="fifisvk-tmobiletv">
<channel id="6054">
<display-name lang="cs">ÄT1 HD</display-name>
<url>http://mydomain/stream/6054</url>
</channel>
<programme channel="6054" start="20201222001500 +2000" stop="20201222005500 +2000">
<title lang="cs">BanĂĄnovĂ© rybiÄky</title>
</programme>
<programme channel="6054" start="20201222005500 +2000" stop="20201222012500 +2000">
<title lang="cs">ToulavĂĄ kamera</title>
</programme>
<programme channel="6054" start="20201222012500 +2000" stop="20201222015000 +2000">
<title lang="cs">Z metropole</title>
</programme>
<programme channel="6054" start="20201222015000 +2000" stop="20201222020500 +2000">
<title lang="cs">KalendĂĄrium</title>
</programme>
</tv>