Python script to be notified of channel lineup changes

Ah, I see. This is a situation that I didn't think about when I wrote this script. :man_facepalming:

On the first run, it will make a list of the current sources and will just monitor those. If a source is added in the same run of the script, it will be ignored.

Definitely a bug. Good catch! :+1:

Added to my bug list. Thanks for reporting this!

1 Like

OK, no problem now that I know that.
I was trying to force a change to see if it works. I'll try it on my play-test DVR.

Not sure what's causing this, but your script to list channels to a csv file is missing channels.
Same thing with your script for channel change notifications.

My Pluto source has 384 channels, both of your scripts say it has 367 channels.
They both miss these channels for some reason.
9000 TV Land Drama
9041 Star Trek
9042 More Star Trek
9043 Pluto TV Sci-Fi
9044 Stargate
9058 CBS News Sacramento
9059 CBS News New York
9060 CBS News Los Angeles
9061 CBS News Chicago
9249 TokuSHOUTsu
9267 Vevo Latino
9268 Vevo Reggaeton & Trap
9392 MTV Flow Latino
9393 Vevo Íconos Latinos
9394 Vevo Regional Mexicano
9403 Godzilla
9404 The Asylum

And it's way off on my HDHR source. Would take me quite awhile to figure out what's different there.

When I designed this script, I purposely chose to ignore channel numbers and only look at channel names.
The main reason being that I noticed that some channels are duplicated within the same source.

As a matter of fact, I first noticed it with Pluto TV.
These 17 channels probably appear twice each.

For the other issue, I don't have a HDHR, unfortunately.
What I could do is create a test version of this script for the purpose of logging more information when it processes a HDHR source.
Would you be willing to test it if I did that?

OK, took a look and it appears you're pulling guide data channels and not the actual channels.
With an HDHR Prime and Xfinity, many channels are duplicated below 700, then 700-900 and again above 1000. Appears your program is looking at the channels I have enabled and pulling the channel number they are mapped to for guide info.

i.e. you don't report me having channel 703, but report the channel 1003 that the guide is mapped to.

2 Likes

Thank you for this analysis.

This gets me thinking now how I can improve it.

The more I'm thinking about it, the more I'm thinking this script could report when channels are renumbered/moved around in a source.

Maybe this is one thing you were expecting, @chDVRuser ?

In its current design, since it only looks at channel names, it only reports when channels are either removed or added in a source.

Bingo!
You are absolutely correct and I never noticed that.
In fact it appears the same program is airing on each duplicate channel.

1 Like

As far as channel change notifications...
I don't care if the channel number changes.
The only thing I'm doing now is checking which channels are added or removed from each DVR.
Would also be nice if the channel name changed that it reports the original name removed and the new name added. That's what I'm currently doing.

For a channel listing, I expect it to accurately reflect my channels. Including duplicates. I do this now with a curl/jq script.

Here's an example from my HDHR Prime source.


Channel 6 is SD and the HD version is on channel 706.
Channel 706 is what I have enabled and favorited. It's also on channel 1006, which I have disabled.
Channel 7 is SD (which I have disabled) and is also on channels 386 (enabled) and 1154 (disabled).
The far right column OliveTin is what your script identified as my channels.

1 Like

Thank you for these details.

I think this is out of scope for this script and better suited for Python script: channel list -> CSV file to easily see where channels are available.

I'll keep this in mind to improve that script.

How does your script handle changes in a channel name?

Wondering why it didn't pickup the Pluto channel name change
from Newsmax [newsmax-tv]
to Newsmax2 [newsmax2]

Mine
2023-11-12- 9382 Big Brother Camera 1 [big-brother-camera-1]
2023-11-12- 9071 Newsmax [newsmax-tv]
2023-11-12+ 9437 Newsmax2 [newsmax2]

Yours
Last check : 2023-11-12 11:05:50
Server version : 2023.11.12.0146
added channels : {}
removed channels: {'Pluto': {'Big Brother Camera 1': '9382'}}
Pluto channel count: 372 (-1)
Next check : 2023-11-12 23:05:50

Strange. It should have caught this change the same way as your script.
Another bug to fix. Thank you for this report.

My copy of this script is currently in an unfinished state and not functional yet. I started making code changes a little while back and never got to finish it.

I spend all my spare time now working on my new house and I think this is going to be this way probably until Christmas.

You have a pretty robust script, @chDVRuser. :slightly_smiling_face:
Maybe @bnhf should consider using it in OliveTin instead of mine. That will make no difference to me. What matters in the end is to have a reliable product with code that works properly.

Mine is much more manual work than yours :slightly_frowning_face:
I use a curl/jq script to list the channels to a file.
When there's a change I run the script again and output to a second file.
I then use Notepad++ and the ComparePlus plugin to find the changes which I manually copy to the third file that lists all the changes since I started doing this.

That's why I was running your script :smile:

Indeed, I can see why you would want to use a script. :wink:

How do you know that there is a change? Is it just based on announcements online?

To be honest, I always thought that you had your own script, @chDVRuser, and I didn't think that my script would really be used by many people.
Now that I know you are using it, that's kind of a big deal to me so that's more pressure for me to hurry and fix it. :sweat_smile:

I will do my best to make some time to fix my script within 2 or 3 weeks.

I appreciate all the bug reports. :+1:

When the number of channels changes. Not 100% reliable.

1 Like

Thanks. No rush.
I understand everyone has their priorities, and channel changes are much lower on most peoples list, including mine.

1 Like

@bnhf and @chDVRuser
I'm very close to releasing a new version of my script that should take care of all the issues that have been reported. I've been running it for a couple of days and I am pleased with the results.
I have run tests with it by manually making changes to sources, even while the script was not running, and the results are good.

However, there is just one thing that is left to be fixed and that is the text/SMS notification that seems to be broken, at least with Yahoo! Mail as the provider. Email notifications are fine, it's just sending to a cell phone that is not working.
As soon as I get this sorted out, I will upload the new version to GitHub.
Unless you want to give it a try now to see if the text notification works if you use Gmail as the provider.
I don't think I have made any changes that would have broken this feature so I'm not sure if it's a change on Yahoo's side that caused it.

3 Likes

Thanks.
I'll wait until bnhf adds it to OliveTin to check it out.
What I really need is something to list my channels and what sources they come from.
Your current one lists my HDHR Prime channels (which now appears on all my servers, even though I didn't assign a provider to it). It never appeared when I was running docker with bridged networking.

Not sure how you're using SMS but I found I while back that SMS messages can be "emailed". Maybe it will help you.

#
# Common email addresses for texting.
#

# AT&T: [email protected] (SMS), [email protected] (MMS)
# Boost Mobile: [email protected] (SMS), [email protected] (MMS)
# C-Spire: [email protected]
# Consumer Cellular: [email protected]
# Cricket: [email protected] (SMS), [email protected] (MMS)
# Google Fi (Project Fi): [email protected] (SMS & MMS)
# H2O Wireless: [email protected] (SMS), [email protected] (MMS)
# Metro by T-Mobile: [email protected] (SMS & MMS)
# Mint Mobile: [email protected] (SMS)
# Page Plus: [email protected] (SMS), [email protected] (MMS)
# Red Pocket: Red Pocket uses AT&T or T-Mobile (for GSM SIMs) & Verizon for CDMA. See info. for those carriers.
# Republic Wireless: [email protected] (SMS)
# Simple Mobile: [email protected] (SMS)
# Sprint: [email protected] (SMS), [email protected] (MMS)
# T-Mobile: [email protected] (SMS & MMS)
# Ting: [email protected] (SMS for CDMA), [email protected] (SMS for GSM)
# Tracfone: [email protected] (MMS)
# Ultra Mobile: [email protected]
# U.S. Cellular: [email protected] (SMS), [email protected] (MMS)
# U.S. Mobile: [email protected] (SMS), [email protected] (MMS)
# Verizon: [email protected] (SMS), [email protected] (MMS)
# Virgin Mobile: [email protected] (SMS), [email protected] (MMS)
# Visible: [email protected] (SMS), [email protected] (MMS)
# Xfinity Mobile: [email protected] (SMS), [email protected] (MMS)