Python script to be notified of channel lineup changes

New OliveTin-for-Channels pushed incorporating the latest 3.x version of this excellent script:

1 Like

Thanks much for the new improved script!
Especially the persistent reference files that keep track of channels between runs/restarts.

Have a question regarding this

I don't see the duplicate channels called out, for instance in my Pluto source. Are they supposed to appear? I'm not doing text/email notifications as that's overkill for me. Just looking in the log file.

Using Channels DVR server at: http://192.168.1.4:8489.
Checking for channel lineup changes every 720 minutes.

Visual monitoring only, no email or text will be sent.

Last check    : 2024-02-10 11:10:58
Server version: 2024.02.10.0353

Channels DVR server URL: http://192.168.1.4:8489
Channels DVR version: 2024.02.10.0353

New source with 391 channels: "Pluto"
See file /config/192.168.1.4-8489_data/Pluto.txt for the full lineup.

New source with 523 channels: "HDHomeRun PRIME"
See file /config/192.168.1.4-8489_data/HDHomeRun_PRIME.txt for the full lineup.

Next check: 2024-02-10 23:10:58

Here's what I'm seeing in media-server6-8089_channels_dvr_monitor_channels_latest.log:

Using Channels DVR server at: http://media-server6:8089.
Checking for channel lineup changes every 30 minutes.

An email will be sent to [email protected] when changes are detected.

Last check    : 2024-02-10 09:44:55
Server version: 2024.02.08.0626

Channels DVR server URL: http://media-server6:8089
Channels DVR version: 2024.02.08.0626

--------------------------

Pluto TV: 390 channels (-1)
(http://htpc6:8183/playlist.m3u)

<--- Lineup changes (starting at 0) --->
! 2480 : NFL Channel (was Hot Bench)
- 2800 : NFL Channel

<--- Channel changes --->
- Hot Bench (2480)

<--- Duplicated channels --->
AspireTV Life: 262, 3220
BET Her: 2050, 258
BET Pluto TV: 2040, 256
Black Cinema: 130, 250
Black Classics: 254, 530
Black Throwbacks: 252, 320
CBS News Chicago: 2570, 5120
CBS News Colorado: 2540, 5130
CBS News Los Angeles: 2560, 5150
CBS News New York: 2550, 5180
Love & Hip Hop: 1690, 264
Vevo R&B: 266, 4730
XITE Gospel: 268, 4800

Sending email to [email protected]...
Message sent successfully!

Next check: 2024-02-10 10:14:55

Last check    : 2024-02-10 10:14:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 10:44:56

Last check    : 2024-02-10 10:44:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 11:14:56

Last check    : 2024-02-10 11:14:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 11:44:56

Last check    : 2024-02-10 11:44:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 12:14:56

Last check    : 2024-02-10 12:14:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 12:44:56

Last check    : 2024-02-10 12:44:56
Server version: 2024.02.08.0626
No changes found in any source.
Next check: 2024-02-10 13:14:56

Checking every 30 minutes atm for "stress testing". I'm not doing PERSISTENT_LOGS though, so I'm not sure what my first run looked like anymore. @chDVRuser maybe shorten your interval for testing purposes, and see if the next run shows the dups?

Nope. Changed it to a 5 minute interval


Using Channels DVR server at: http://192.168.1.4:8489.
Checking for channel lineup changes every 720 minutes.

Visual monitoring only, no email or text will be sent.

Last check    : 2024-02-10 11:10:58
Server version: 2024.02.10.0353

Channels DVR server URL: http://192.168.1.4:8489
Channels DVR version: 2024.02.10.0353

New source with 391 channels: "Pluto"
See file /config/192.168.1.4-8489_data/Pluto.txt for the full lineup.

New source with 523 channels: "HDHomeRun PRIME"
See file /config/192.168.1.4-8489_data/HDHomeRun_PRIME.txt for the full lineup.

Next check: 2024-02-10 23:10:58


Using Channels DVR server at: http://192.168.1.4:8489.
Checking for channel lineup changes every 5 minutes.

Visual monitoring only, no email or text will be sent.

Last check    : 2024-02-10 12:26:22
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:31:22

Last check    : 2024-02-10 12:31:23
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:36:23

Last check    : 2024-02-10 12:36:23
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:41:23

Last check    : 2024-02-10 12:41:23
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:46:23

Last check    : 2024-02-10 12:46:24
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:51:24

Last check    : 2024-02-10 12:51:24
Server version: 2024.02.10.0353
No changes found in any source.
Next check: 2024-02-10 12:56:24

@chDVRuser in the case where a new source is found, the script doesn't check the lineup itself, it just reports the new source and the number of channels

That's one thing I didn't think of.

Duplicated channels get reported only if a lineup has changed.

I can add it.

Ahh, thanks for the explanation.
No need to add it as I just wanted to make sure the log file contained the same detailed message that would be emailed. I'm over-notified of too many things and don't need text msgs/email that channel lineups have changed!

Text msg says check your email
Email says check a wesbite
Website says Check your secure messages
I had already logged in the Website and read the Secure message

Yes. Unless I made a mistake in the code, the contents of the log file and the email should be the same. :slightly_smiling_face:

Is this from OliveTin? That's not from my script. :thinking:

No. Just in general. Over Notified.

I see. Got it. :wink:

@bnhf and @chDVRuser
I got a change in my Pluto TV source today. I'm expecting that you should get it too.
I'm curious to get your feedback about the reported changes that you will see.

Looking good. :+1:
Picked up changes on two of my servers.

Channels DVR version: 2024.02.11.0311

--------------------------

Fubo bridge: 236 channels (-1)
(http://192.168.1.3:7777/fubo/playlist-hls.m3u)

<--- Lineup changes (starting at 9000) --->
- 9238 : CBS 4K

<--- Channel changes --->
- CBS 4K (9238)

<--- Duplicated channels --->
Big Ten Network Alternate: 9022, 9023, 9024

Channels DVR version: 2024.02.11.0311

--------------------------

Pluto: 393 channels (+2)
(http://192.168.1.3:8080/playlist.m3u)

<--- Lineup changes (starting at 9001) --->
+ 9476 : Little House on the Prairie
+ 9477 : She Wrote

<--- Channel changes --->
+ Little House on the Prairie (9476)
+ She Wrote (9477)

<--- Duplicated channels --->
AspireTV Life: 9363, 9454
BET Her: 9047, 9452
BET Pluto TV: 9046, 9451
Black Cinema: 9013, 9448
Black Classics: 9164, 9450
Black Throwbacks: 9149, 9449
CBS News Chicago: 9061, 9342
CBS News Los Angeles: 9060, 9345
CBS News New York: 9059, 9348
CBS News Sacramento: 9058, 9352
Love & Hip Hop: 9108, 9455
Vevo R&B: 9260, 9456
XITE Gospel: 9358, 9457
1 Like

Great, @chDVRuser! :smiley:

I'm curious about Big Ten Network Alternate on Fubo. Is that right that it appears 3 times on 3 consecutive channel numbers? :hushed: Are they different versions?

Also, it looks like the two examples that you posted came from the same server machine at 192.168.1.3.
How can it be that Fubo starts at 9000 and Pluto at 9001? That's not a bug in my script?
I can see that they are from two different dockers so maybe they are used by different Channels DVR servers?

I have everything on one machine so it was strange at first for me to wrap my head around your configuration. I'm guessing you have something like this:

The Big Ten alternates are different feeds, but typically only show different games during football season.

1 Like

Here's mine copied from the e-mail notification:

Channels DVR server URL: http://media-server6:8089
Channels DVR version: 2024.02.11.0311

--------------------------

Pluto TV: 392 channels (+2)
(http://htpc6:8183/playlist.m3u)

<--- Lineup changes (starting at 0) --->
+ 640 : Little House on the Prairie
+ 690 : She Wrote

<--- Channel changes --->
+ Little House on the Prairie (640)
+ She Wrote (690)

<--- Duplicated channels --->
AspireTV Life: 262, 3220
BET Her: 2050, 258
BET Pluto TV: 2040, 256
Black Cinema: 130, 250
Black Classics: 254, 530
Black Throwbacks: 252, 320
CBS News Chicago: 2570, 5120
CBS News Colorado: 2540, 5130
CBS News Los Angeles: 2560, 5150
CBS News New York: 2550, 5180
Love & Hip Hop: 1690, 264
Vevo R&B: 266, 4730
XITE Gospel: 268, 4800

--------------------------

Samsung TV Plus: 330 channels (+1)
(http://htpc6:8182/playlist.m3u)

<--- Lineup changes (starting at 1002) --->
- 1001 : Heartland
! 1002 : LOL! Network (was Ebony TV by Lionsgate)
! 1003 : Bring It! (was 60 Days In by A&E)
+ 1054 : EBONY TV by Lionsgate
+ 1058 : Heartland
+ 1122 : 60 Days In by A&E
+ 1207 : PBS Antiques Roadshow
- 1247 : Bring It!
! 1284 : FreeTV Estelar (was Tu Cine)
- 1325 : LOL! Network

<--- Channel changes --->
+ EBONY TV by Lionsgate (1054)
- Ebony TV by Lionsgate (1002)
+ FreeTV Estelar (1284)
+ PBS Antiques Roadshow (1207)
- Tu Cine (1284)

--------------------------

FrndlyTV-noEPG: 6 channels (+1)

<--- Lineup changes (starting at 9657) --->
+ 9807 : Bounce

<--- Channel changes --->
+ Bounce (9807)
1 Like

Nice! So you got an email. That's good. :slightly_smiling_face:

All the channel numbers (including starting numbers) are reported correctly?

192.168.1.3 is my old NAS which runs my docker sources like Pluto, Frndly, PBS, Fubo and some utility dockers.

192.168.1.4 is my new NAS that runs multiple Channels DVR servers in docker containers and one using the Synology package.

For all my m3u custom channel setups, I let Channels DVR assign the channel numbers.

@mjitkop
Why do your channel numbers change when a channel is added or removed?

Not sure.
Could it be because of my source options?

I'm guessing it's Prefer channel-number from M3U, mine are set to Ignore channel-number from M3U
Guess it doesn't matter if you don't have passes preferring or ignoring channel numbers.

Thanks. I will change it and see if it makes a difference.