AndroidHDMI-for-Channels (ah4c) - FireTV LiveTV capture

Copy that.

I'm a big fan of the channel selection on my Directv Stream and have loaded the channels into the Amazon live guide.

I plan to buy an HDMI encoder soon but have a few questions.

Can multiple channels be recorded at once with a single FireTV and HDMI encoder, or do I need additional sets of both devices if I want to record multiple channels at once?

1 Like

You'll need a multi-port encoder and as many FireSticks as you want virtual tuners. Ethernet for the sticks is a good idea, and you can even do PoE with the right adapter.

I have a reasonably "battle-hardened" set of scripts that uses the DTV app as a source, so you'll want to use those. What we're doing here with the LiveTV guide is more "early days".

Perfect.

Edit: I ran this this morning.
It seems like they were off by 1 following the banner in the guide.
I manually changed (corrected) all the numbers in the device m3u and its working now.

Will pick this up later today when I get home.

That's a good clue, I thought I had that covered, but apparently not. I'll review the logic for handling those banners/ads.

@Anvil_DVR

Amazingly, I have 5 FireStick 4K Max devices and not one of them is showing a banner/ad in the guide anymore. One was, until recently, but it's gone now -- maybe that was the only one where I still had Internet Ads set to "on" in Preferences? I turned it off a few days ago, so maybe it takes time for the guide data containing those ads to work its way through.

Anyway, I'll probably need to rely on logs from you, as you add additional channels to the mix. Portainer-Container logs are quite useful, you just need to either download them or set the number of lines to 10000 and auto-refresh to "off" to be able to scroll back. Logs are accessed via a "Quick Actions" button, just like for exec'ing into a container.

I added more premium channels this AM for testing, and the device-specific M3U was created properly. Here's an updated livetv.m3u that includes HBO, Showtime and Paramount+ -- though I hid all the "junk" Paramount+ channels (just couldn't bring myself to bother with those).

If you want any of those channels, you'll probably need to get call signs and Gracenote IDs using the built-in Channels DVR method I described previously. Also, @chDVRuser created a script to extract those that you might find useful:

#EXTM3U

#EXTINF:-1 channel-id="5MAXHD" tvc-guide-stationid="59961",5StarMAX East
http://{{ .IPADDRESS }}/play/tuner/5MAXHD

#EXTINF:-1 channel-id="ACMAXHD" tvc-guide-stationid="59948",ActionMAX HD East
http://{{ .IPADDRESS }}/play/tuner/ACMAXHD

#EXTINF:-1 channel-id="MAXHD" tvc-guide-stationid="34933",Cinemax HD East
http://{{ .IPADDRESS }}/play/tuner/MAXHD

#EXTINF:-1 channel-id="MAXHDP" tvc-guide-stationid="35975",Cinemax HD West
http://{{ .IPADDRESS }}/play/tuner/MAXHDP

#EXTINF:-1 channel-id="SZEAHD" tvc-guide-stationid="72015",Encore Action HD East
http://{{ .IPADDRESS }}/play/tuner/SZEAHD

#EXTINF:-1 channel-id="STZENHD" tvc-guide-stationid="36225",Encore HD East
http://{{ .IPADDRESS }}/play/tuner/STZENHD

#EXTINF:-1 channel-id="HBOHD" tvc-guide-stationid="19548",HBO
http://{{ .IPADDRESS }}/play/tuner/HBOHD

#EXTINF:-1 channel-id="HBO2HD" tvc-guide-stationid="59368",HBO 2
http://{{ .IPADDRESS }}/play/tuner/HBO2HD

#EXTINF:-1 channel-id="HBOCHD" tvc-guide-stationid="59839",HBO Comedy
http://{{ .IPADDRESS }}/play/tuner/HBOCHD

#EXTINF:-1 channel-id="HBOFHD" tvc-guide-stationid="59357",HBO Family
http://{{ .IPADDRESS }}/play/tuner/HBOFHD

#EXTINF:-1 channel-id="HBOSGHD" tvc-guide-stationid="59363",HBO Signature
http://{{ .IPADDRESS }}/play/tuner/HBOSGHD

#EXTINF:-1 channel-id="HBOHDP" tvc-guide-stationid="19566",HBO West
http://{{ .IPADDRESS }}/play/tuner/HBOHDP

#EXTINF:-1 channel-id="HBOZHD" tvc-guide-stationid="59845",HBO Zone
http://{{ .IPADDRESS }}/play/tuner/HBOZHD

#EXTINF:-1 channel-id="MGMHD" tvc-guide-stationid="65669",MGM+
http://{{ .IPADDRESS }}/play/tuner/MGMHD

#EXTINF:-1 channel-id="MGMDRHD" tvc-guide-stationid="103828",MGM+ DRIVE-IN
http://{{ .IPADDRESS }}/play/tuner/MGMDRHD

#EXTINF:-1 channel-id="MGMHTH" tvc-guide-stationid="67929",MGM+ HITS
http://{{ .IPADDRESS }}/play/tuner/MGMHTH

#EXTINF:-1 channel-id="MGMMRHD" tvc-guide-stationid="74073",MGM+ MARQUEE
http://{{ .IPADDRESS }}/play/tuner/MGMMRHD

#EXTINF:-1 channel-id="MOMAXHD" tvc-guide-stationid="59373",MoreMAX HD East
http://{{ .IPADDRESS }}/play/tuner/MOMAXHD

#EXTINF:-1 channel-id="MOVIEHD" tvc-guide-stationid="59963",MovieMAX HD East
http://{{ .IPADDRESS }}/play/tuner/MOVIEHD

#EXTINF:-1 channel-id="OUTMAXHD" tvc-guide-stationid="59952",OuterMAX HD East
http://{{ .IPADDRESS }}/play/tuner/OUTMAXHD

#EXTINF:-1 channel-id="SHOWHD" tvc-guide-stationid="21868",Showtime
http://{{ .IPADDRESS }}/play/tuner/SHOWHD

#EXTINF:-1 channel-id="SHOWHDP" tvc-guide-stationid="22532",Showtime West
http://{{ .IPADDRESS }}/play/tuner/SHOWHDP

#EXTINF:-1 channel-id="STRZCIH" tvc-guide-stationid="67236",Starz Cinema HD East
http://{{ .IPADDRESS }}/play/tuner/STRZCIH

#EXTINF:-1 channel-id="STZCHD" tvc-guide-stationid="57569",Starz Comedy HD East
http://{{ .IPADDRESS }}/play/tuner/STZCHD

#EXTINF:-1 channel-id="STZEHD" tvc-guide-stationid="57573",Starz Edge HD East
http://{{ .IPADDRESS }}/play/tuner/STZEHD

#EXTINF:-1 channel-id="STZHD" tvc-guide-stationid="34941",Starz HD East
http://{{ .IPADDRESS }}/play/tuner/STZHD

#EXTINF:-1 channel-id="STZHDP" tvc-guide-stationid="34949",Starz HD West
http://{{ .IPADDRESS }}/play/tuner/STZHDP

#EXTINF:-1 channel-id="STRZIBH" tvc-guide-stationid="67235",Starz inBlack HD East
http://{{ .IPADDRESS }}/play/tuner/STRZIBH

#EXTINF:-1 channel-id="STZKHD" tvc-guide-stationid="57581",Starz Kids & Family HD East
http://{{ .IPADDRESS }}/play/tuner/STZKHD

#EXTINF:-1 channel-id="THMAXHD" tvc-guide-stationid="59954",ThrillerMAX East
http://{{ .IPADDRESS }}/play/tuner/THMAXHD

BTW, you can also run the createm3us.sh script manually device-by-device, rather than by restarting the container.

Exec into the container and run: ./scripts/firetv/livetv/createm3us.sh followed by a space and then the device name you want to generate the specific M3U for including the port number. In my case that would be: ./scripts/firetv/livetv/createm3us.sh firestick-desk1:5555, but I know you use IP addresses to identify devices on your LAN.

1 Like

I will look into those later today time permitting. I ordered another uray box and I found another firetv 4k max. Looks like I will have a bank of Chromecast, and a bank of Firetv depending on what I want to do.

So I added all the channels you listed.
It messed up the channel ID's big time, I think they were all wrong.
I manually corrected them and its working.

This is in the Log:

  • redEcho 'Device specific M3U creation may have been unsuccessful as the starting and ending channel IDs do not match.'
    Device specific M3U creation may have been unsuccessful as the starting and ending channel IDs do not match.
    Recheck that your LiveTV channel guide matches your livetv.m3u, hide unwanted sources and channels in the guide.
  • echo -e '\e[31m Device specific M3U creation may have been unsuccessful as the starting and ending channel IDs do not match. \e[0m'
  • redEcho 'Recheck that your LiveTV channel guide matches your livetv.m3u, hide unwanted sources and channels in the guide.'
  • echo -e '\e[31m Recheck that your LiveTV channel guide matches your livetv.m3u, hide unwanted sources and channels in the guide. \e[0m'

Only they do match.....
The entire log is too big to post here.

Apologies for you being the guinea pig, as far as user testing goes -- I appreciate it though!

The only way that ALL the IDs could be wrong is if the "scan" isn't starting at the top of the LiveTV guide. So far, I've been waking the device and then sending two LIVE_TV keypresses. I'm thinking this works for me because I always put the device to sleep, after I make any changes to it.

It's possible all that's needed here is a HOME keypress after the WAKEUP, as the WAKEUP does nothing if the device is already awake, and the LIVE_TV button may not work from all locations in the FireTV menu system. HOME should always work though, so I'll add that to sequence, which will be:

  • WAKEUP
  • HOME
  • LIVE_TV
  • LIVE_TV

The logs might help, but I guess there's no way to upload a file to this forum. Things would have been a lot easier if these IDs were universal -- but maybe they're not by design. We could always drop trying to generate this device-specific file automatically, and have it be the manual process. But, since it's been working for me, I think it's just a matter of figuring out what the two of us are doing differently.

No problem. Glad I can help.
This is a cool project!

@Anvil_DVR

At some point, I'd like to get some feedback from you on error handling in regular use.

Right now after one full pass through guide (which includes two attempts at getting a channel's ID number if missed), the search stops. Similarly, after whatever number you specify in $LIVETV_ATTEMPTS (of steps through the guide) is reached, the search also stops.

I'd like to make these more robust, but strike a balance between how long one is willing to wait when wanting to watch live, versus the desire to have a near-zero failure rate on recordings. I'm leaning towards a second pass through the guide if no matches are found, as this should address occasional situations where there's a miss on the first pass.

I just did a scan and on the second pass, it stops one short from bottom.
I did this after putting the device to sleep.
At the banner, it re-used the last number on the channel following the banner. all the channels after that were off by one and it skipped the last channel.

Could you post the log line that's output when you're sitting on the banner? Maybe it's different from what I've seen.

Its part of the problem, there may be other things going on, I added a channel and it messed up in a couple of spots.

It generally works pretty well. I have seen it go by the channel once or twice. I set the counter to double the number of channels presumably so it will go around twice. Once it picked the wrong channel, but got it right on the next try. It's not speedy, but I don't think there is any way around that. The main issue for me is that I need to manually set the ID for each channel because it's having problems getting those right.

@Anvil_DVR

I messed around with different FireSticks today until I found one that was behaving very similarly to what you've described. I banged my head against it for some time -- trying to figure out what was up, and why it was different. In the end, it was the most obvious of all issues -- it needed a reboot. :crazy_face: I'm also suspicious that responses to logcat queries may get very slow after awhile, or after lots of experimentation -- like we're doing atm.

We'll see where this leads us -- perhaps some sort of scheduled reboot. But, in the meantime, I've improved the resilience of the device-specific M3U creation. If you use the CREATE_M3US=true option, your specified devices will be rebooted before the guide channel scan starts. If you use the ./scripts/firetv/livetv/createm3u.sh your_streaming_device_hostname_or_IP:5555 approach, the device's adb logs will be flushed before scanning begins (no reboot).

It's best to be able to monitor the reboot and M3U creation process to confirm the scan starts, and ends, at the beginning of the guide. If it doesn't, there IS an issue. I had it happen on one test, and it was because of a LiveTV Guide channels (the ones that aren't hidden) to livetv.m3u mismatch.

Also, be sure to check the Portainer-Container log to confirm there are no errors there. Here's an example of a successful container start including M3U creation for two devices:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.29.0.2	ah4c2
192.168.110.41 firestick-rack3
192.168.110.162 firestick-rack4
192.168.110.130 encoder_48007
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
connected to firestick-rack3:5555
connected to firestick-rack4:5555
Existing ./scripts/onn/youtubetv/prebmitune.sh found, and will be preserved
Existing ./scripts/firetv/livetv/prebmitune.sh found, and will be preserved
Existing ./scripts/onn/youtubetv/bmitune.sh found, and will be preserved
Existing ./scripts/firetv/livetv/bmitune.sh found, and will be preserved
Existing ./scripts/onn/youtubetv/stopbmitune.sh found, and will be preserved
Existing ./scripts/firetv/livetv/stopbmitune.sh found, and will be preserved
Existing ./scripts/firetv/livetv/createm3u.sh found, and will be preserved
Existing directv.m3u found, and will be preserved
Existing foo-fighters.m3u found, and will be preserved
Existing hulu.m3u found, and will be preserved
Existing youtubetv.m3u found, and will be preserved
Existing sling.m3u found, and will be preserved
Existing fubo.m3u found, and will be preserved
Existing dtvstream.m3u found, and will be preserved
Existing livetv.m3u found, and will be preserved
 Waking firestick-rack3... 
 Sorting livetv.m3u alphabetically to match FireTV LiveTV Guide... 
 Reading firestick-rack3.m3u and updating it with device specific channelID... 
Starting channelID is 3881
assigned to M3U channel name: 24/7 Laughs 
Current channelID is 3491
assigned to M3U channel name: 5StarMAX East 
Current channelID is 3494
assigned to M3U channel name: ActionMAX HD East 
Current channelID is 3491
assigned to M3U channel name: Cinemax HD East 
Current channelID is 3489
assigned to M3U channel name: Cinemax HD West 
Current channelID is 3846
assigned to M3U channel name: Encore Action HD East 
Current channelID is 3849
assigned to M3U channel name: Encore HD East 
Current channelID is 3856
assigned to M3U channel name: HBO 
Current channelID is 3851
assigned to M3U channel name: HBO 2 
Current channelID is 3856
assigned to M3U channel name: HBO Comedy 
Current channelID is 3857
assigned to M3U channel name: HBO Family 
Current channelID is 3852
assigned to M3U channel name: HBO Signature 
Current channelID is 3853
assigned to M3U channel name: HBO West 
Current channelID is 3854
assigned to M3U channel name: HBO Zone 
Current channelID is 3484
assigned to M3U channel name: MGM+ 
Current channelID is 3487
assigned to M3U channel name: MGM+ DRIVE-IN 
Current channelID is 3485
assigned to M3U channel name: MGM+ HITS 
Current channelID is 3486
assigned to M3U channel name: MGM+ MARQUEE 
Current channelID is 3490
assigned to M3U channel name: MoreMAX HD East 
Current channelID is 3493
assigned to M3U channel name: MovieMAX HD East 
Current channelID is 3496
assigned to M3U channel name: OuterMAX HD East 
Current channelID is 3490
assigned to M3U channel name: Showtime 
Current channelID is 3874
assigned to M3U channel name: Showtime West 
Current channelID is 3842
assigned to M3U channel name: Starz Cinema HD East 
Current channelID is 3844
assigned to M3U channel name: Starz Comedy HD East 
Current channelID is 3841
assigned to M3U channel name: Starz Edge HD East 
 EPG ad detected, skipping... 
Current channelID is 3843
assigned to M3U channel name: Starz HD East 
Current channelID is 3845
assigned to M3U channel name: Starz HD West 
Current channelID is 3847
assigned to M3U channel name: Starz inBlack HD East 
Current channelID is 3848
assigned to M3U channel name: Starz Kids AND Family HD East 
Current channelID is 3488
assigned to M3U channel name: ThrillerMAX East 
Current channelID is 3881
 Initial pass through the guide completed 
 Beginning second pass to confirm play/tuner values... 
Confirming a guideID 3881 is present
assigned to M3U channel name: 24/7 Laughs 
Confirming a guideID 3491 is present
assigned to M3U channel name: 5StarMAX East 
Confirming a guideID 3494 is present
assigned to M3U channel name: ActionMAX HD East 
Confirming a guideID 3491 is present
assigned to M3U channel name: Cinemax HD East 
Confirming a guideID 3489 is present
assigned to M3U channel name: Cinemax HD West 
Confirming a guideID 3846 is present
assigned to M3U channel name: Encore Action HD East 
Confirming a guideID 3849 is present
assigned to M3U channel name: Encore HD East 
Confirming a guideID 3856 is present
assigned to M3U channel name: HBO 
Confirming a guideID 3851 is present
assigned to M3U channel name: HBO 2 
Confirming a guideID 3856 is present
assigned to M3U channel name: HBO Comedy 
Confirming a guideID 3857 is present
assigned to M3U channel name: HBO Family 
Confirming a guideID 3852 is present
assigned to M3U channel name: HBO Signature 
Confirming a guideID 3853 is present
assigned to M3U channel name: HBO West 
Confirming a guideID 3854 is present
assigned to M3U channel name: HBO Zone 
Confirming a guideID 3484 is present
assigned to M3U channel name: MGM+ 
Confirming a guideID 3487 is present
assigned to M3U channel name: MGM+ DRIVE-IN 
Confirming a guideID 3485 is present
assigned to M3U channel name: MGM+ HITS 
Confirming a guideID 3486 is present
assigned to M3U channel name: MGM+ MARQUEE 
Confirming a guideID 3490 is present
assigned to M3U channel name: MoreMAX HD East 
Confirming a guideID 3493 is present
assigned to M3U channel name: MovieMAX HD East 
Confirming a guideID 3496 is present
assigned to M3U channel name: OuterMAX HD East 
Confirming a guideID 3490 is present
assigned to M3U channel name: Showtime 
Confirming a guideID 3874 is present
assigned to M3U channel name: Showtime West 
Confirming a guideID 3842 is present
assigned to M3U channel name: Starz Cinema HD East 
Confirming a guideID 3844 is present
assigned to M3U channel name: Starz Comedy HD East 
Confirming a guideID 3841 is present
assigned to M3U channel name: Starz Edge HD East 
Confirming a guideID 3843 is present
assigned to M3U channel name: Starz HD East 
Confirming a guideID 3845 is present
assigned to M3U channel name: Starz HD West 
Confirming a guideID 3847 is present
assigned to M3U channel name: Starz inBlack HD East 
Confirming a guideID 3848 is present
assigned to M3U channel name: Starz Kids AND Family HD East 
Confirming a guideID 3488 is present
assigned to M3U channel name: ThrillerMAX East 
 Device specific M3U creation appears successful as the starting and ending channel IDs match. 
 It's recommended NOT to leave CREATE_M3US set to true. Create new device specific M3Us only as needed. 
 Final format of new firestick-rack3.m3u... 
 Waking firestick-rack4... 
 Sorting livetv.m3u alphabetically to match FireTV LiveTV Guide... 
 Reading firestick-rack4.m3u and updating it with device specific channelID... 
Starting channelID is 3658
assigned to M3U channel name: 24/7 Laughs 
Current channelID is 2404
assigned to M3U channel name: 5StarMAX East 
Current channelID is 2407
assigned to M3U channel name: ActionMAX HD East 
Current channelID is 2405
assigned to M3U channel name: Cinemax HD East 
Current channelID is 2402
assigned to M3U channel name: Cinemax HD West 
Current channelID is 3205
assigned to M3U channel name: Encore Action HD East 
Current channelID is 3208
assigned to M3U channel name: Encore HD East 
Current channelID is 3635
assigned to M3U channel name: HBO 
Current channelID is 3630
assigned to M3U channel name: HBO 2 
Current channelID is 3634
assigned to M3U channel name: HBO Comedy 
Current channelID is 3636
assigned to M3U channel name: HBO Family 
Current channelID is 3631
assigned to M3U channel name: HBO Signature 
Current channelID is 3632
assigned to M3U channel name: HBO West 
Current channelID is 3633
assigned to M3U channel name: HBO Zone 
Current channelID is 2399
assigned to M3U channel name: MGM+ 
Current channelID is 2398
assigned to M3U channel name: MGM+ DRIVE-IN 
Current channelID is 2400
assigned to M3U channel name: MGM+ HITS 
Current channelID is 2397
assigned to M3U channel name: MGM+ MARQUEE 
Current channelID is 2403
assigned to M3U channel name: MoreMAX HD East 
Current channelID is 2406
assigned to M3U channel name: MovieMAX HD East 
Current channelID is 2409
assigned to M3U channel name: OuterMAX HD East 
Current channelID is 3656
assigned to M3U channel name: Showtime 
Current channelID is 3651
assigned to M3U channel name: Showtime West 
Current channelID is 3201
assigned to M3U channel name: Starz Cinema HD East 
Current channelID is 3203
assigned to M3U channel name: Starz Comedy HD East 
Current channelID is 3209
assigned to M3U channel name: Starz Edge HD East 
Current channelID is 3202
assigned to M3U channel name: Starz HD East 
Current channelID is 3204
assigned to M3U channel name: Starz HD West 
Current channelID is 3206
assigned to M3U channel name: Starz inBlack HD East 
Current channelID is 3207
assigned to M3U channel name: Starz Kids AND Family HD East 
Current channelID is 2401
assigned to M3U channel name: ThrillerMAX East 
Current channelID is 3658
 Initial pass through the guide completed 
 Beginning second pass to confirm play/tuner values... 
Confirming a guideID 3658 is present
assigned to M3U channel name: 24/7 Laughs 
Confirming a guideID 2404 is present
assigned to M3U channel name: 5StarMAX East 
Confirming a guideID 2407 is present
assigned to M3U channel name: ActionMAX HD East 
Confirming a guideID 2405 is present
assigned to M3U channel name: Cinemax HD East 
Confirming a guideID 2402 is present
assigned to M3U channel name: Cinemax HD West 
Confirming a guideID 3205 is present
assigned to M3U channel name: Encore Action HD East 
Confirming a guideID 3208 is present
assigned to M3U channel name: Encore HD East 
Confirming a guideID 3635 is present
assigned to M3U channel name: HBO 
Confirming a guideID 3630 is present
assigned to M3U channel name: HBO 2 
Confirming a guideID 3634 is present
assigned to M3U channel name: HBO Comedy 
Confirming a guideID 3636 is present
assigned to M3U channel name: HBO Family 
Confirming a guideID 3631 is present
assigned to M3U channel name: HBO Signature 
Confirming a guideID 3632 is present
assigned to M3U channel name: HBO West 
Confirming a guideID 3633 is present
assigned to M3U channel name: HBO Zone 
Confirming a guideID 2399 is present
assigned to M3U channel name: MGM+ 
Confirming a guideID 2398 is present
assigned to M3U channel name: MGM+ DRIVE-IN 
Confirming a guideID 2400 is present
assigned to M3U channel name: MGM+ HITS 
Confirming a guideID 2397 is present
assigned to M3U channel name: MGM+ MARQUEE 
Confirming a guideID 2403 is present
assigned to M3U channel name: MoreMAX HD East 
Confirming a guideID 2406 is present
assigned to M3U channel name: MovieMAX HD East 
Confirming a guideID 2409 is present
assigned to M3U channel name: OuterMAX HD East 
Confirming a guideID 3656 is present
assigned to M3U channel name: Showtime 
Confirming a guideID 3651 is present
assigned to M3U channel name: Showtime West 
Confirming a guideID 3201 is present
assigned to M3U channel name: Starz Cinema HD East 
Confirming a guideID 3203 is present
assigned to M3U channel name: Starz Comedy HD East 
Confirming a guideID 3209 is present
assigned to M3U channel name: Starz Edge HD East 
Confirming a guideID 3202 is present
assigned to M3U channel name: Starz HD East 
Confirming a guideID 3204 is present
assigned to M3U channel name: Starz HD West 
Confirming a guideID 3206 is present
assigned to M3U channel name: Starz inBlack HD East 
Confirming a guideID 3207 is present
assigned to M3U channel name: Starz Kids AND Family HD East 
Confirming a guideID 2401 is present
assigned to M3U channel name: ThrillerMAX East 
 Device specific M3U creation appears successful as the starting and ending channel IDs match. 
 It's recommended NOT to leave CREATE_M3US set to true. Create new device specific M3Us only as needed. 
 Final format of new firestick-rack4.m3u... 
[START] androidhdmi-for-channels is starting
[ENV] Not loading env
[ENV] IPADDRESS                  htpc6:7664
[ENV] ALERT_SMTP_SERVER          
[ENV] ALERT_AUTH_SERVER          
[ENV] ALERT_EMAIL_FROM           
[ENV] ALERT_EMAIL_PASS           
[ENV] ALERT_EMAIL_TO             
[ENV] ALERT_WEBHOOK_URL          
[ENV] ALLOW_DEBUG_VIDEO_PREVIEW  
[ENV] Creating tuner             1
[ENV] ENCODER1_URL               http://encoder_48007/8.ts
[ENV] TUNER1_IP                  firestick-rack3:5555
[ENV] CMD1                       
[ENV] TEECMD1                    
[ENV] PRE SCRIPT                 ./scripts/firetv/livetv/prebmitune.sh
[ENV] START SCRIPT               ./scripts/firetv/livetv/bmitune.sh
[ENV] STOP SCRIPT                ./scripts/firetv/livetv/stopbmitune.sh
[ENV] REBOOT SCRIPT              ./scripts/firetv/livetv/reboot.sh
[ENV] Creating tuner             2
[ENV] ENCODER2_URL               http://encoder_48007/12.ts
[ENV] TUNER2_IP                  firestick-rack4:5555
[ENV] CMD2                       
[ENV] TEECMD2                    
[ENV] PRE SCRIPT                 ./scripts/firetv/livetv/prebmitune.sh
[ENV] START SCRIPT               ./scripts/firetv/livetv/bmitune.sh
[ENV] STOP SCRIPT                ./scripts/firetv/livetv/stopbmitune.sh
[ENV] REBOOT SCRIPT              ./scripts/firetv/livetv/reboot.sh
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET    /favicon.ico              --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
[GIN-debug] HEAD   /favicon.ico              --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
[GIN-debug] Loaded HTML Templates (11): 
      
	- m3us.html
	- routes.html
	- status.html
	- stream.html
	- config.html
	- index.html
      
	- logs.html
	- status_and_logs.html
	- 
      
	- edit.html
	- editm3u.html
[GIN-debug] GET    /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
[GIN-debug] HEAD   /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
[GIN-debug] GET    /                         --> main.run.func1 (2 handlers)
[GIN-debug] GET    /routes                   --> main.run.func2 (2 handlers)
[GIN-debug] GET    /play/tuner:tuner/:channel --> main.run.func3 (2 handlers)
[GIN-debug] GET    /m3u/:channel             --> main.run.func4 (2 handlers)
[GIN-debug] GET    /env                      --> main.run.func5 (2 handlers)
[GIN-debug] GET    /logs/text                --> main.run.func6 (2 handlers)
[GIN-debug] GET    /logs                     --> main.run.func7 (2 handlers)
[GIN-debug] GET    /status/andlogs           --> main.run.func8 (2 handlers)
[GIN-debug] GET    /logs/json                --> main.run.func9 (2 handlers)
[GIN-debug] GET    /video                    --> main.run.func10 (2 handlers)
[GIN-debug] GET    /status                   --> main.statusPageHandler (2 handlers)
[GIN-debug] GET    /api/status               --> main.apiStatusHandler (2 handlers)
[GIN-debug] GET    /stream                   --> main.run.func11 (2 handlers)
[GIN-debug] GET    /test/webhook             --> main.run.func12 (2 handlers)
[GIN-debug] GET    /test/email               --> main.run.func13 (2 handlers)
[GIN-debug] GET    /status/channelsactivity  --> main.run.func14 (2 handlers)
[GIN-debug] GET    /edit                     --> main.run.func15 (2 handlers)
[GIN-debug] POST   /save                     --> main.run.func16 (2 handlers)
[GIN-debug] POST   /m3usave/:file            --> main.run.func17 (2 handlers)
[GIN-debug] GET    /m3us                     --> main.run.func18 (2 handlers)
[GIN-debug] GET    /editm3u/:file            --> main.run.func19 (2 handlers)
[GIN-debug] GET    /config                   --> main.run.func20 (2 handlers)
[GIN-debug] POST   /configsave               --> main.run.func21 (2 handlers)
[START] androidhdmi-for-channels is ready
[GIN-debug] Listening and serving HTTP on :7654
> [email protected] start
> node ./index.js
Listening on:
	http://ah4c2:8000 http://localhost:8000
	http://127.0.0.1:8000 http://172.29.0.2:8000

Go ahead and re-pull and redeploy the bnhf/ah4c:prime image with UPDATE_SCRIPTS=true, and this will reboot your device and reinitiate a scan. Let me know how it goes.

It worked!
Now I'm gonna working on getting a second FireTV going.

Awesome work here!

Edit: Have it working with 2 FireTV Sticks.
Oddly the first one still is showing a banner in the guide, the one I just added does not.
Once in a while when hunting for the channel, it will go past the banner, then backup to the banner and then go forward again. Once I saw it back up to the banner and just sit there.

Everything re-scanned perfectly for both FireTV's, so that part seems to be fixed.

I'm glad to hear the M3U creation portion is holding. I'll shift my attention to adding more error handling to the tuning portion next. I'd like to include "Thursday Night Football" to the scheme as well, and ultimately combine this with what I've done with DirecTV, so one set of v-tuners can handle all.

Thanks for keeping me in-the-loop on results from your end.

My pleasure.

I just saw it move a couple of channels and then just stop searching. Maybe it's just something with the device though. Usually works ok.
I'll be in the market for a new streaming service. I've given up on Hulu. They have a fetish with authentication that is annoying. Perhaps DirecTV Stream.

Today's build has what I hope are a couple of improvements, both in logic and error handling:

  • Searching through the guide will no longer terminate when the current guide channel is the same as the starting guide channel. Searching will only terminate after the number of attempts specified in LIVETV_ATTEMPTS. Never set this lower than about 2/3 of the number of channels you have -- up to about a 2x maximum.

  • Since starting from the top of the guide is crucial, I've added a better function to confirm that -- with a maximum of 5 attempts, after which we'll just have to assume we're there. You'll see a move to the bottom of the guide, followed by a move all the way to the top again, attempting to get the guide ID. Usually no more than 1 retry max should be required.

  • One bit that's unchanged, is that for any channel ID's that are missed when stepping through the guide, there will be one attempt to read it again. This means moving down one channel, and then up again in the guide for a second try at getting the ID. I'll probably make this an environment variable at some point, as those who mostly record are going to care more about certainty than speed.

Now that you have your device-specific M3Us built, I'd suggest setting CREATE_M3US=false, unless you've changed livetv.m3u and want new ones created. Also, be sure you have UPDATE_SCRIPTS=true to get the changes outlined above.