Python script to be notified of channel lineup changes

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.

2 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)

With this new version, your sources should be reflected accurately. Basically, whatever shows up in ip:port/devices. Even if there are duplicate channels at different numbers. I have not tested with an HDHR since I don't have one so it will be interesting to see what your experience is.

Thank you. Indeed, I use the email method to send a message to a cell phone as you mentioned.

The problem is somewhere in my Python code.
Do you have a piece of code in Python that does this, by chance? :slightly_smiling_face:

The Olivetin function called Create Channels List in CSV Format does this.