Project

General

Profile

DaddyLive, PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex, TVGuide interfaces (appliance)

Added by G Kazaroth almost 4 years ago

Cabernet for (Cable Network) version 0.9.12 (4/13/2023)
TVGuide, DaddyLive, PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex

Provides a configurable interface from providers to TVHeadend.

  • Direct streaming plugins for DaddyLive, PlutoTV, XUMO
  • EPG supplemented using TVGuide.com data
  • M3U Plugin provides channels for: SamsungTVPlus, Plex, PBS, Stirr, and others
  • From: https://i.mjh.nz/
  • Import your own M3U file

https://github.com/cabernetwork/cabernet/releases
Purpose is to get a service that will take the DaddyLive, PlutoTV or XUMO server stream, clean it and feed it into TVHeadend and other DVRs (Also tested on Emby, JellyFin and Plex). Also it runs on Linux, Windows as a service and Docker. Windows has a installer. Once installed, setup is easy with TVHeadend. Also includes a TVGuide.com plugin to obtain TVGuide data.

1) Setup the automatic IPTV network (recommend new URL is http://[host]:6077/PlutoTV/channels.m3u)

Make sure to set the "Maximum # input streams". PlutoTV is set to a max of 4 and tvheadend uses 2 per tuner during initial screening. Doing a force scan will create the mux and service values. Also, turn View level to Advanced and set the Re-fetch period (mins) to a very large number. TVheadend has a tenancy to cause issues when channels change (Changed Services will not be mapped to channels). The Maximum Timeout is used to wait for a reply during a Forced scan. Recommend keep this low, like 15-20 seconds. Some of the channels may fail, but it is faster than having a high setting and waiting for all channels to scan. Just individually rescan those that failed by setting each mux back to PEND from IDLE.
2) Next you can setup the grabber. I use a URL grabber written in Unix bash and is an extremely small file. It can be found in the github repo at
https://github.com/cabernetwork/cabernet/tree/master/lib/tvheadend/service/Unix called tv_grab_url
Place the grabber file in the same location as the other TVHeadend tv_grab* files, change the permissions to executable and restart TVHeadend. This should allow TVHeadend to pickup the new grabber. While in the grabber list, make sure and disable any OTA grabbers. Stations no longer send this information and will only cause TVHeadend to use a tuner for scanning. Displaying the log window by clicking the three ^ in the bottom right is helpful at this time.

Have the grabber run and populate the EPG data into the EPG Grabber Channels tab. The log should show a quantity of channels were detected.
Pop over to the EPG Grabber tab and disable the OTA grabber cron. Also, update/replace the Internal grabber cron schedule using something like below. The example will pull the TV guide at 6:04am and 5:52pm. Add more if you need. It is recommended to use static cron times.

4 6 * * *
52 17 * * *

3) In the Channel view, select Map all channels.

This will tie the services, EPG and channels together, automatically. After this, re-grab the EPG data. This will populate the EPG tab with shows. For TVH version 4.3, the Number column will auto-populate. For TVH 4.2, you will need to manually add channel numbers.
4) Display the TVGUIDE. This appliance has special features which maps the tvheadend genre, giving colors on tvguides. It also has enhanced guide descriptions and optional additional channel notations if you use many streams. Below is the Kodi tvguide using the pvr.hts plugin.

For Kodi, go to the settings for PVR and turn on the General setting "Use channel numbers from backend".


Replies (960)

RE: Locast interface (free version) - Added by ace golfer almost 4 years ago

This is a great project. Curious, what's the file size of 1 hour recording?

RE: Locast interface (free version) - Added by Chris Hubbard almost 4 years ago

I am curious, if I am a "paid" subscriber for the locast system, will your version choke when it does not see the ads, or will it "just work" when someone has donated to locast?

I am using the unmodified locast2plex, and have hacked it into my MythTV system. However I think if I am going to attempt to future-proof things this will likely be the route I head (using the tvheadend software).

RE: Locast interface (free version) - Added by Tony Wagner almost 4 years ago

Thanks for sharing, I just got this working on my Raspberry Pi. Two things of note:

1. Be sure to copy the tvheadend-specific config_example.ini file to the root directory as config.ini, then edit it with your IP and account information:

cp lib/tvheadend/config_example.ini config.ini

2. After that, the program would start for me but quickly broke with this error:

Traceback (most recent call last):
File "tvh_main.py", line 11, in <module>
main.main(script_dir)
File "/home/piuser/locast/lib/tvheadend/main.py", line 130, in main
epg2xml.generate_epg_file(config, location_info.location)
File "/home/piuser/locast/lib/tvheadend/epg2xml.py", line 122, in generate_epg_file
channel_number = str(dma_channels[sid]['channel'])
KeyError: '1595365120185'

Somehow the program was looking for an id (1595365120185) that didn't exist in my dma_channels list. I got around this by editing lib/tvheadend/epg2xml.py and adding a quick check if the channel exists at line 122, as follows:

sid = str(channel_item['id'])
channel = dma_channels.get(sid)
if not channel:
continue
channel_number = str(dma_channels[sid]['channel'])

RE: Locast interface (free version) - Added by Tony Wagner almost 4 years ago

Thanks! I just updated and the EPG error is now gone. And yes, my Pi is running Raspbian, based on Debian.

One more issue: if I leave the IP address set to 0.0.0.0, the stream URLs in channels.m3u and lineup.json all point to 127.0.0.1 no matter what computer makes the request. Not a problem for TVHeadend on the same machine, but those stream URLs obviously won't play on other computers on the network unless I change the IP.

Can channels.m3u and lineup.json just return relative stream URLs? Or if they have to be absolute, they could get the IP/domain specified in the request, as use that to build the stream URLs.

RE: Locast interface (appliance) - Added by Alistair Ruckus almost 4 years ago

this works perfectly. i'm a paid subscriber of locast and was looking for something exactly like this to get locast into tvh.

thank you for your hard work!

RE: Locast interface (appliance) - Added by Tony Wagner over 3 years ago

I just had a chance to try your updates on my Raspberry Pi.

First off, if there are comments on the same line as a variable in the config.ini file, it includes the comment in the variable value, and thus the script fails as soon as it tries to use that value somewhere:

ValueError: invalid literal for int() with base 10: '5004  # streaming port'

That's an easy fix -- just remove the comments from config.ini, or at least move them to their own line.

Unfortunately, even after doing that, starting the latest version of the script still fails around the "get_fcc_stations" function call in lib/tvheadend/stations.py:

$ python3 tvh_main.py
/home/pi/locast/tvheadend-locast-main/config/config.ini
/home/pi/locast/tvheadend-locast-main/config.ini
Loading Configuration File: /home/pi/locast/tvheadend-locast-main/config.ini
Tuner count set to 3
Server is set to run on  0.0.0.0:5004
UUID set to: 6B1437AC-8737-11EB-A3A7-DCA6324EAF1D...
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/locast/tvheadend-locast-main/lib/tvheadend/stations.py", line 36, in stations_process
    stations.refresh_dma_stations_and_channels()
  File "/home/pi/locast/tvheadend-locast-main/lib/tvheadend/stations.py", line 55, in refresh_dma_stations_and_channels
    fcc_stations = get_fcc_stations(config)
NameError: name 'get_fcc_stations' is not defined

And nothing beyond the web interface home page will load after that, since it apparently can't get any station data.

If I jump back one commit, to 29352c3f1c99e141d879c2688f0edea208e841f5, and remove the comment from the lib/tvheadend/config_example.ini file before using it, all works as expected.

I'm using Python 3.7.3, which is the latest version from the default Raspian Buster armv7l apt repository. Let me know if you need me to do any further troubleshooting or testing.

RE: Locast interface (appliance) - Added by C Island over 3 years ago

I also ran into the same problems. I fixed them as best I could and submitted a PR. It works for me but hopefully it works for others as well.

Here are my notes on my changes:

Updated lib/tvheadend/stations.py to fully qualify variables and function names in the Stations class. The unqualified names were causing exceptions.

Updated lib/tvheadend/tuner_interface.py and lib/web_admin.py to use plex_accessable_port instead of bind_port. This was to fix failure to bind to port errors.
Updated lib/tvheadend/web_admin.py to use web_admin_port instead of bind_port. This was to fix failure to bind to port errors.

I wanted to use cryptography and docker so I created Dockerfiles that include cryptography.

Dockerfile_tvh_crypt.slim-buster (my preferred: debian does not require full build of cryptography and is same size as alpine)
Dockerfile_tvh_crypt.alpine (in case you like alpine: alpine requires the full build/compile of cyrptography)

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

I just came across this project and am confused by a couple of things. First, I see that people are using this in Ubuntu and even on a Raspberry Pi, but in searching through this thread and the project page I cannot for the life of me find any clear instructions for installation. For example, when you install Tvheadend on Ubuntu you can go to https://tvheadend.org/projects/tvheadend/wiki/AptRepositories and it more or less walks you through the process of installing Tvheadend. Is there anything similar for this software? Because right now I'm totally clueless as to how you install and configure it. I see in the top post how you configure Tvheadend once you have it installed , but I am not clear on how you get it installed in the first place.

Second, assuming that one can get this software installed, is there a way to test it with a demo account (one you have not donated for) - that would be important to me because I have no confidence in my ability to get this working, but I would have no interest at all in Locast if I can't PVR shows to watch later (which I think is the whole point of using it with Tvheadend in the first place - if all you ever wanted to do is watch live, you could do that on a Roku). So I would not want to donate unless and until I am absolutely certain that I can get the software installed and configured to the point that the channels would be viewable in Tvheadend. If it stops after 15 minutes or whatever with a demo account that's fine, I would not be doing any extended watching or recording on a demo account. But on the other hand if I just can't make it work at all, there is no point in donating, and unless there are some installation instructions that I'm just not seeing then there is probably not much hope of me getting it to work.

RE: Locast interface (appliance) - Added by Alistair Ruckus over 3 years ago

i love this, i'm using it with tvheadend server with kodi (coreelec) client.

It does have it's issues though, it sometimes goes out of sync or freezes on various channels but I do understand this is a work-in-progress.

thank you for your hard work.

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

Thanks, got it working in Ubuntu Server following the Debian instructions (already had this Ubuntu Server instance running for another project), but when I start it from the command line the first thing I see is this:

python3 tvh_main.py
Unable to load cryptography module, will not encrypt passwords
Unable to load pip module to install upgrades
Unable to load cryptography module, will not encrypt passwords

It still works, but does that mean there is something else that needs to be installed?

RE: Locast interface (appliance) - Added by C Island over 3 years ago

K Shea,

If you want to remove that warning message you can install the pip and cryptography modules. I think they are only needed if you want to tvheadend-locast to encrypt your clear text password in the config.ini file

I think the way to install pip and cryptography for Python 3 on Ubuntu 20.04 is to run the following commands as root or sudo user in your terminal:

   $ sudo apt update
   $ sudo apt install python3-pip
   $ pip3 install cryptography

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

Well I followed your instructions and got it working with no problems that I can see. I do see issues with certain specific channels but I'm sure that's Locast's problems in getting good reception on all area channels. So anyway I just wanted to say thank you for the program and for the very complete instructions!

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

C Island wrote:

K Shea,

If you want to remove that warning message you can install the pip and cryptography modules. I think they are only needed if you want to tvheadend-locast to encrypt your clear text password in the config.ini file

I think the way to install pip and cryptography for Python 3 on Ubuntu 20.04 is to run the following commands as root or sudo user in your terminal:

[...]

Thanks for the explanation. No, I don't really care if the password is encrypted on my local system. I nevertheless thought about installing python3-pip, until I saw how many additional packages it wanted to install. It seems to me that installing pip gives a rogue script or program another avenue to install additional software you might not want on your system, so the security implications are about equal either way, and I have a good firewall.

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

First of all I want to say that this is a great piece of software. Many many many thanks to the author!!!!!

EDIT: For the benefit of anyone just coming across this thread, everything that follows in this post is now irrelevant. Since the release of version 0.8.4b, which includes the new channel editor, I do not need to do any of what I have described below.

I have a bit of a technical question. In the first post in this thread it shows how to use a channels.m3u file as the source, but that brings in all the channels. In my case, I only wanted to import certain selected channels, not every single crap and low-quality channel. I wonder how hard it would be to have a page that lets you see all the channels available and enable or disable each one, and then it would build a custom_channels.m3u file or something like that, with only the channels you want. Also, I store high quality channel icons for use by Kodi, so I don't need the channel logo image links.

Right now the only way I have found to specify individual channels is to create a separate mux for each channel I want, and in the Mux name field put the channel name as I want it to display in Kodi, and in the URL field use something like this:

pipe:///usr/local/bin/ffmpeg -loglevel fatal -i http://192.168.1.130:5004/watch/[channel_identifier] -c copy -strict -2 -metadata service_provider=Channel_Name -metadata service_name=Channel_Name -f mpegts pipe:1

The http link is taken from the channels.m3u file. This gives me a lot more control over how it appears in Kodi but what I don't understand is why it only works if I pipe it through ffmpeg. I did not create the above "recipe" for bringing in a single stream as a mux - it is something I found posted online many years ago and originally used it to bring some streaming channels into Tvheadend, but unfortunately such services tend to change URLs from time to time so it has become rather useless for that. It has always seemed to me that there should be a way to bring in a single stream into Tvheadend without involving ffmpeg, but if there is I don't know about it. Doing it this way works quite well, but seems overly complicated.

If I could build a custom m3u file, what I'd really want to be able to specify, in addition to which channels appear, is the channel name to use (I like to have both the network name and the station call letters appear in Kodi) and possibly the channel number so it doesn't conflict with existing channels on my system, although the latter can be changed manually in Tvheadend's Channels tab. And I'd definitely omit the links that pull in channel icons from an online source, since those sometimes tend to be lower quality icons, and I prefer to store them locally anyway.

This would not be such a big deal if I were not using it on an existing system that already has channels ordered in a certain specific way. If I was creating a new Tvheadend from scratch I'd probably simply use the channels.m3u file and then disable the channels I don't want in the Channels tab and be done with it. Still, I really feel like I am making things overly complicated by doing it this way, and especially by piping the stream through ffmpeg. Am I missing something obvious?

But anyway it is working and for now I have the channels I want coming in, so thank your again for all your effort on this!

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

Thanks, I do understand that this is a work in progress. The main functionality seems to be working great and that is what is important. I can live with the method I am using now indefinitely, ffmpeg in copy mode is so fast that there's no discernible impact on performance.

If I were really into it I suppose I could download the m3u file, edit it manually, and load it into Tvheadend using a file:/// link rather than a http:// link. But since I don't fully understand the structure of those .m3u files I'd be likely to screw something up and make it unreadable by Tvheadend. The ffmpeg pipe is something I have used it the past so it was my go-to solution to get the channels I wanted working quickly, it may not be the best way but for now it's fine, and I'm happy with the way it's working. So no rush at all on any of the changes I suggested, I appreciate what you have done so far and would rather see improvements that benefit stability come first anyway. Thanks again!

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

Just for the sake of completeness, I wanted to note that while reading a Reddit thread I stumbled across what appears to be a somewhat similar project at https://pypi.org/project/locast2dvr/ and while it is not intended specifically for use with Tvheadend, because it does pretty much the same thing as this tvheadend-locast (and I think both are actually rewrites or forks of locast2plex) I suspect it might also work. I haven't tried it because tvheadend-locast is working fine for what I need but it appears that that one is slightly different and MIGHT offer some additional functionality, though I haven't done a feature-by-feature comparison so can't be certain. The source code is at https://github.com/wouterdebie/locast2dvr so that might be something you'd want to look over.

If anybody tries this software (tvheadend-locast) and also that one (the one linked to in the above paragraph) I'd be interested to know what the differences are, if any. Hopefully anything significant and actually useful could be added to tvheadend-locast, unless there is some reason not to.

P.S. There is also another project I ran across called fHDHR which apparently sort of emulates a HDHomeRun device (but is not in any way connected with Silicon Dust) which I suspect means that Tvheadend would see it as a HDHomeRun device on the network and use it as a source. It uses plugins to obtain "channels" from various sources, and there is a Locast plugin but there are also plugins for a few other services that stream "channels". This holds very little interest for me because it seems much too complicated to install and use, and if you just want to have Locast then there's really no advantage that I can see to using it over tvheadend-locast, but again I just mention that it exists.

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

Cool, thanks for the explanation. I did look at fHDHR and while I was a bit attracted to the fact that it could also use channels from a few other services, it seemed way too complicated to me. If you are going to support plugins then that is great, I am in no big hurry for them - it's not like I am running short of things to watch - but on the other hand that is something that could be really useful down the road, especially as those free streaming services start to add more content.

I also agree that it is really important that it works with a free Locast account; you really need to be able to test the service for a week or two to see if the quality is sufficient for your needs. If the channel you want to watch constantly cuts out or has audio sync issues or something like that, then it may not be worth it to donate.

As for the guide data I have been using zap2xml to get that; the reason I can't use the Locast data as is, is because I also have a couple of actual HDHomeRun devices connected to an antenna that predate Locast and I can use them to get channels that Locast doesn't carry. As an example if you live in certain places within the Detroit DMA then you can get Canadian channels that Locast doesn't carry, and depending on what part of the DMA you are in you may also be able to get channels from the Flint/Saginaw DMA or the Toledo, Ohio DMA (and maybe the Lansing/Jackson DMA if you are far enough east, not sure about that one). I'm not exactly sure why Locast doesn't carry the Canadian channels; the Canadians are always swiping our channels to put on their cable systems (and I don't think they are subject to retransmission fees either) and several Michigan cable systems carry Canadian channels, but for some reason Locast completely ignores them, which I'm sure doesn't set well among the users who really want to watch Hockey Night in Canada! I don't know where their antennas are so maybe it's just a problem of not being able to get a reliable signal from the Canadian stations but if so that is probably something they really should look into because there are people who would probably donate just to see the hockey games, also the CBC has a lot of original programming. Not that there is anything you or I can do about that, but just saying it's something you might not realize if you couldn't use the free Locast account, and it's also a reason to keep using an antenna even if you do use Locast.

In fact there are several places where people who live near a DMA boundary can receive signals from both places. For example there are plenty of places in southeastern Wisconsin where you can receive both the Milwaukee and Chicago stations, particularly if you are near the Lake Michigan shoreline since TV signals travel great over all that nice flat water, so in places like that people might want to use a HDHomeRun to get one group of channels and Locast for the other. I've even heard of places where people can receive channels from three different DMA's. Anyway in such situations just having only the guide data from Locast isn't really helpful. Again this is not something you can do anything about, just explaining why someone would use zap2xml over the Locast-provided guide data.

Thanks again for all the work you put into this, I still think your software is the easiest to install and get operating, and I do appreciate that you are actively maintaining it!

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

G Kazaroth wrote:

The category_filter.pl is the magic that turns the xmltv.xml into a tvheadend version. I am assuming you are using the zap2xml.pl from awardspace that is no longer available. I have the last version from their archive. You can try the installer, but if you have been doing this for years, then take a look at zap2xml.sh to see how the category_filter.pl is plugged in.

Yes I am using the zap2xml.pl from awardspace that is no longer available (except via the Wayback Machine at https://web.archive.org/web/20200426004001/http://zap2xml.awardspace.info/), but I found out that it's pointless for me to use category filters because the Kodi skin I prefer doesn't support colorization of the guide data, which as far as I can tell is the only real benefit of running the category filters. I'm still using the previous version of Kodi anyway until more Kodi addons have been converted to use Python 3, so I'm in no big hurry to mess with that.

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

G Kazaroth wrote:

Just a note. I have made some changes that now require python 3.7. If you do not have 3.7, let me know; the changes help plugin capability. I am aware that Ubuntu 18 runs python 3.6 and upgrading to Ubuntu 20 will upgrade to python 3.8. Not sure about running RPI.

I have Python 3.7.3 so no problem there.

Just a few other thoughts:

I don't know what kind of plugins you are planning on supporting but if you haven't decided yet, I would suggest you don't put much effort into Pluto TV because it is rather useless without a usable guide, and by usable I mean one that has listings that go out more than a few hours. The whole point of something like Tvheadend is to be able to schedule programs in advance and record them, and you can't do that with a provider that only tells you what is on currently or next. In my opinion it would be better to start with something like Sling TV because their guide goes out a week, even though they have fewer streaming channels. If there was any way to get schedule data for Pluto that lasts more than a short time then that would probably be a better choice because of the sheer number of channels they have, but apparently they have made an idiotic decision to not let their viewers know what will be coming on tomorrow, let alone a week from now. Don't get me wrong, Pluto is great for on demand stuff, it's their streaming channels that are useless in my opinion due to the short guide duration, and I know some others would disagree but personally I don't do mindless channel surfing anymore.

And speaking of guide data, there are two things that frustrate me about the XML files that your software produces. One is that there are almost no line breaks. Compare the XML file produced by your software to one produced by something like zap2xml and you will see that the one produced by zap2xml has plenty of linefeeds in logical places where yours doesn't. Besides making the XML file more readable if you are trying to figure out an issue, it also makes it possible to use something like sed to remove all links to image files. The fact that those image file links are even included is the second thing. I do not want Tvheadend downloading image files, ever. If the XML file contains links to image files for every channel and every program in that channel, Tvheadend will happily download them and store them forever , even if you never watch a particular program, unless you know how to manually clean the image cache and remember to do so from time to time. After it has a few gigabytes of icons stored then it will not restart without making you wait for it to go through all those icons (not sure exactly what it is doing, but it's doing something with them), so after a reboot you are sitting there thinking there is something wrong with Tvheadend because it doesn't appear to be restarted (see the article at https://twosortoftechguys.wordpress.com/2018/08/26/how-to-fix-tvheadend-being-slow-to-start-after-a-system-reboot/ for more information on this problem). Plus those icons are usually low quality, and not all software will display them anyway - in Kodi I believe some skins will and some won't.

You may say that zap2xml also downloads them, well not in the version I run it doesn't - I found the lines that cause Tvheadend to download those infernal things (as mentioned in the article linked in the previous paragraph) and commented them out!

(EDIT: I finally did find a way to add linefeeds and remove those icon links, you just have to download the xmltv.xml file and do this:

xmllint --format xmltv.xml | sed '/<icon src=/d' > new.xml

However this assumes that you have the xmllint command available on your system - if not it can be installed using sudo apt update && sudo apt install libxml2-utils

But now that I have figured that out, I can see that the listings from Locast only go out for less than a week, plus there is no way to specify which channels you want a.k.a. "favorite" channels, so I'd still use zap2xml. End edit.)

Also, if you plan to write any plugins that scrape guide data, my wish would be for one that works with https://www.tvtv.us/ and https://www.tvtv.ca/ - they seem to be more up to date on certain channel listings, and zap2xml doesn't work with them (nor does it appear to work with TV Guide anymore, so that might be another good choice if you can figure out how to do it). For most channels zap2xml works fine for me, but whenever a new subchannel is added or a channel changes the arrangements of their subchannels, it always takes a while for them to catch up. Actually, the best free guide out there in my opinion is TitanTV because it is fully configurable and you can add channels from any locale to a single account (which is helpful if you have a C-band satellite dish!), but apparently scraping from them is difficult to impossible. So, TVTV, Zap2it, and TV Guide all provide good listing data for the USA and Canada, but I suspect the first two might be the easiest to implement in a plugin (maybe - I have no clue how difficult it really is).

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

G Kazaroth wrote:

Sean Sean Micklem
Since the config interface is a plugin, it was easy to add flags for the locast provider to disable channel and program icons in the xml file if you want. Modded the xml generator to make the output pretty print. Thanks for letting me know what version of python you have, but would have like to know the hardware and OS in use.

Still working on making the channel list, plugin capable. Once that is complete, will push out the next update to github.

Thanks. The OS is Debian 10 (Buster) but I can't really tell you anything about the hardware because I didn't build the system myself, I only installed the operating system and software, and that was several months ago.

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

When you say "Here is what is in this update", what update are you talking about? When I go to https://github.com/rocky4546/tvheadend-locast/releases the last release I see is 0.7.5c from 29 days ago.

I see you are still working on it so maybe you are referring to a beta version? I'm happy to wait for the next full release and am looking forward to it, but just trying to understand what you mean here. Glad to see that you are making progress in any case!

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

G Kazaroth wrote:

It is very possible Locast may not like both running at the same time, so you are on your own if you use multiple sites. I did it to get the instance software working.

Many thanks for your work on this. I haven't got around to trying it yet, have been busy today, but I do have one question about the above. What if you made two Locast accounts and used a different one for each city? In other words, instead of

[locast]
login-username =
login-password = MyFinePassword

Could you do

[locast_dallas]
login-username =
login-password = MyFinePassword
label = Locast Dallas

[locast_denver]
login-username =
login-password = AnotherFinePassword
label = Locast Denver

Or would that not work?

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

G Kazaroth wrote:

0.8.1 published with the ability as defined above for locast authentication.

Well I gave it a quick test this morning but when I sent the m3u list to VLC it could not tune any channels and I got errors like this on the display when running it using "python3 tvh_main.py":

Exception happened during processing of request from (redacted)
Traceback (most recent call last):
  File "/usr/lib/python3.7/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python3.7/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/test/tvheadend-locast/lib/clients/web_tuner.py", line 168, in __init__
    super(CustomHttpHandler, self).__init__(*args, **kwargs)
  File "/home/test/tvheadend-locast/lib/clients/web_tuner.py", line 55, in __init__
    super().__init__(*args)
  File "/usr/lib/python3.7/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/lib/python3.7/http/server.py", line 426, in handle
    self.handle_one_request()
  File "/usr/lib/python3.7/http/server.py", line 414, in handle_one_request
    method()
  File "/home/test/tvheadend-locast/lib/clients/web_tuner.py", line 79, in do_GET
    self.do_tuning(sid, query_data['name'], query_data['instance'])
  File "/home/test/tvheadend-locast/lib/clients/web_tuner.py", line 131, in do_tuning
    self.internal_proxy.stream_direct(station_list[sid], self.wfile)
  File "/home/test/tvheadend-locast/lib/streams/internal_proxy.py", line 57, in stream_direct
    stream_uri = self.get_stream_uri(_channel_dict)
  File "/home/test/tvheadend-locast/lib/streams/stream.py", line 62, in get_stream_uri
    .plugin_obj.get_channel_uri(_channel_dict['uid'], _channel_dict['instance'])
  File "/home/test/tvheadend-locast/plugins/provider_video_locast/lib/locast.py", line 56, in get_channel_uri
    return self.locast_instances[_instance].get_channel_uri(sid)
  File "/home/test/tvheadend-locast/plugins/provider_video_locast/lib/locast_instance.py", line 69, in get_channel_uri
    return self.channels.get_channel_uri(sid)
  File "/home/test/tvheadend-locast/lib/common/decorators.py", line 44, in wrapper_func
    return f(self, *args, **kwargs)
  File "/home/test/tvheadend-locast/lib/common/decorators.py", line 29, in wrapper_func
    return f(self, *args, **kwargs)
  File "/home/test/tvheadend-locast/plugins/provider_video_locast/lib/channels.py", line 128, in get_channel_uri
    'authorization': 'Bearer ' + self.locast.auth.token,
TypeError: can only concatenate str (not "NoneType") to str

This is what my config.ini looks like, I have replaced the city name with "city" and anything else that might be unique to my system I xxx'd out, I just wanted you to see the general format I have in case I removed something I shouldn't have:

[locast_city]
login-username = [email protected]
login-password = xxx
label = Locast city
overrides-zipcode = XXXXX
dma = XXX
city = city
m3u-group_hdtv = Locast city HDTV
m3u-group_sdtv = Locast city SDTV
epg-suffix = X

[epg]
epg_suffix = X
epg_channel_icon = False
epg_program_icon = False

[loggers]
keys = root

[logger_root]
level = WARNING
handlers = loghandler

[handlers]
keys = loghandler

[formatters]
keys = extend,simple

[handler_loghandler]
class = StreamHandler
formatter = extend
args = (sys.stdout,)

[formatter_extend]
format = %(asctime)s-%(levelname)s:%(module)s %(message)s

[formatter_simple]
format = %(levelname)s:%(module)s %(message)s

[main]
uuid = xxx

[hdhomerun]
hdhr_id = xxx

That's about all I can do with it for right now but just wanted to let you know about the errors.

EDIT: P.S. Don't know if this has anything to do with it but the m3u file still has tvg-logo links in it. Also my suspicion is that the link in the m3u file may be wrong, the format it is in now is http://ipaddress:port/Locast/watch/channelid, that /Locast was not in previous versions but anyway I am wondering if the instance name should be in there somewhere or something??? Anyway there is no video stream there, apparently, and VLC tried several channels (when one failed it would go to the next) and none worked.

P.P.S. Also wasn't paying attention before but when I first start it up it shows a bunch of warnings (data redacted same as above):

2021-05-09 12:33:53,041-WARNING:user_config DEFN None for section:locast_city key:login-username value:
2021-05-09 12:33:53,042-WARNING:user_config DEFN None for section:locast_city key:login-password value:xxx
2021-05-09 12:33:53,042-WARNING:user_config DEFN None for section:locast_city key:label value:Locast city
2021-05-09 12:33:53,042-WARNING:user_config DEFN None for section:locast_city key:overrides-zipcode value:XXXXX
2021-05-09 12:33:53,043-WARNING:user_config DEFN None for section:locast_city key:dma value:XXX
2021-05-09 12:33:53,043-WARNING:user_config DEFN None for section:locast_city key:city value:city
2021-05-09 12:33:53,043-WARNING:user_config DEFN None for section:locast_city key:m3u-group_hdtv value:Locast city HDTV
2021-05-09 12:33:53,044-WARNING:user_config DEFN None for section:locast_city key:m3u-group_sdtv value:Locast city SDTV
2021-05-09 12:33:53,044-WARNING:user_config DEFN None for section:locast_city key:epg-suffix value:X
2021-05-09 12:33:53,044-WARNING:user_config DEFN None for section:epg key:epg_suffix value:X
2021-05-09 12:33:53,045-WARNING:user_config DEFN None for section:locast key:enabled value:False

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

Thank you! I downloaded 0.8.1b and it is working now with one instance, VLC plays all the channels I tried with no problems. I will try to do some more tests tonight or tomorrow but so far so good. I did remove that second epg-suffix line, thanks for the heads up on that!

EDIT: Added another instance today (May 10); it seems to be working great. Thanks much! I assume (hope) you are working on the channel editor now; that's the one more thing I'd really like to see is the ability to exclude unwanted channels. However what you have accomplished so far is very impressive!

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

Well first of all it really does look great, I especially enjoy the springtime theme you have chosen. I tend not to say much about appearance anymore because many years ago I was talking about a piece of software and said that the interface was well designed, well it turned out that was the one part of the software that the main author hadn't written and he got a little bent out of shape because that was the first thing I'd mentioned, and not how well it worked. So since then, commenting on appearance is typically something I tend to leave for others. Anyway just wanted to say that I updated to 0.8.3 and it works fine, then I tried adding a third instance and that worked until I clicked on the link for the xmltv.xml file in my browser, then I saw this in the terminal window

2021-05-11 17:21:54,679-WARNING:web_handler [127.0.0.1] "GET /pages/channels.html?area=general HTTP/1.1" 404 -
2021-05-11 17:21:56,710-WARNING:web_handler [127.0.0.1] "GET /pages/channels.html?area=general HTTP/1.1" 404 -
2021-05-11 17:25:36,287-WARNING:web_handler [127.0.0.1] "GET /web/index.html HTTP/1.1" 404 -

And then the system froze up and I had to reboot! Went back down to two instances and then it worked again, so my suspicion is that it is a memory issue of some kind. Normally I would never need three instances anyway so just was testing it, but I am wondering if creating that combined xmltv.xml file uses quite a bit of memory. I do realize that I could get the xmltv.xml file for each instance separately (which I assume would take less memory) so this is really not a big deal. Anyway as long as I stick to two instances everything I have tried seems to work, so thanks for the update!

By the way I likely won't have time to test anything else until the end of the week, but I should be able to do more this weekend, hopefully.

(1-25/960)