How to eliminate duplicating channel numbers between sources

This sounds like some really useful information, especially in terms of helping me understand how things work. Is there a more comprehensive description covering information like this for all of the 4-digit channel numbers? For example, I recently added some security camera RTSP feeds to a custom channels m3u file. I thought I was using apparently unused channel numbers like 8001 - 8007. They worked for a while but later my EPG showed some actual shows for some of those channels in the EPG, even though the RTSP feeds were still showing the cameras. I switched the channel numbers to 8101 - 8108 and the guide cleaned up.

Simple answer is to allow Channels DVR to assign the channel numbers, instead of assigning them yourself.

If you choose to assign any of your own channel numbers in any custom source, it is up to you to ensure the numbers are not duplicated across sources.

I like to assign my own channel numbers so that they match the numbers used by my TV service provider on the streaming boxes they provide. I know how to make sure the channel numbers are not duplicated in m3u files I extract from Channels and use as custom channels or in other streaming apps.

I'm looking for general educational information. The OP says "Each TVE channel (those between 6000 and 6700) has to be re-authenticated periodically (every so many days)." Are these the only numbers used for TVE channels? I also have Pluto and Stirr m3u playlists using URLs set up in Channels and I notice that Channels assigns them numbers in the 9000 range. What are the "rules" Channels uses when assigning various ranges of 4-digit channel numbers?

I suspect post-editing of channel numbers in the m3u is causing mismatches between channel numbers used for playback versus channel numbers used in the EPG, which I think is coming from ~/devices/ANY/guide/xmltv?duration=86400. Is that what is happening?

Is this what you're asking?
OTA channels are 2-69.
Cable channels are 1-whatever maximum number your cable provider gives you. Mine go to 1995.
TVE channel number range is the same for all users.
TVE channels start at 6000 and the Free channels start at 6700.
Custom M3U channels default to starting at 9000 if you let Channels DVR assign them.
If you have multiple Custom M3U sources, Channels DVR will number them so there's no overlap.

If you want to use your own channel numbers, it's up to you to ensure there is no conflict between sources.