Linux/Mac instructions

Help us document DRM encryption of emergency alerts
Post Reply
amyl
Silicondust
Posts: 4
Joined: Tue Nov 10, 2026 2:19 pm
x 1

Linux/Mac instructions

Post by amyl »

Added Linux script (php)

Requires php 8.1+ and php curl support.

Ubuntu 26.04: apt install php8.5-cli php8.5-curl

SpiceWare
Posts: 59
Joined: Thu Nov 16, 2017 5:04 pm
x 19

Re: Linux instructions

Post by SpiceWare »

This appears to work on Mac as well. I have brew installed on my Mac Studio so installed PHP by using this command in a Terminal session:

Code: Select all

brew install php
After the installation finished I did this to start PHP:

Code: Select all

brew services start php
I ran the Linux version of the script by entering the command:

Code: Select all

php eacapture.php
It found my HDHomeRun devices and reported a successful check-in:

Code: Select all

darrellspice@Mac-Studio SiliconDust % php eacapture.php 
2026-11-12 21:40:21  First launch
2026-11-12 21:40:22  Found: HDHomeRun FLEX 4K 10A2EFDD
2026-11-12 21:40:22  Found: HDHomeRun CONNECT 4K 10803AF0
2026-11-12 21:40:22  Chosen: 10A2EFDD
2026-11-12 21:40:22  Check-in succeeded.
2026-11-12 21:40:22      Clock delta: -0.5 sec
2026-11-12 21:40:22  Next capture to run at 2026-11-12 23:10:29
screenshot of terminal

Directory ~/eacapture was created and contains 2 files:
  • checkin_state.json
  • eacapture.lock

nickk
Silicondust
Posts: 21223
Joined: Tue Jan 13, 2004 9:39 am
x 441

Re: Linux instructions

Post by nickk »

Woot!

SpiceWare
Posts: 59
Joined: Thu Nov 16, 2017 5:04 pm
x 19

Re: Linux instructions

Post by SpiceWare »

Looks like it did an upload from my Mac:

Code: Select all

2026-11-12 23:10:28  Capturing http://192.168.4.33:5004/auto/ch593000000p0p1?format=dbg&duration=15 to ead2e9f045a873f48ac9379632e3fa8d.tmp
2026-11-12 23:10:44  Upload to run at 2026-11-12 23:11:11
2026-11-12 23:11:46  Uploading ead2e9f045a873f48ac9379632e3fa8d.tmp
2026-11-12 23:11:47  Next capture to run at 2026-11-13 05:16:42
A new Captures directory showed up in ~/eacapture, though it's empty. I'm not very familiar with PHP though I see finishUpload() does an unlink which would explain the empty directory.

AKADAP
Posts: 49
Joined: Tue Jun 16, 2009 10:31 pm

Re: Linux/Mac instructions

Post by AKADAP »

For Linux Mint. I had to install php8.3curl before the script would run (php8.3-cli was already installed)

Got:
2026-11-14 21:38:38 ERROR: No ATSC 3.0 channels detected
2026-11-14 21:38:38 ERROR: Please run a new channel scan in the HDHomeRun app: Settings menu, Channels

I'm not sure what is meant by "HDHomeRun app" I'm not aware of any app like that on Linux

I went to the HDHomeRun Main Menu on the HDHomeRun CONNECT 4K using FireFox (accessed via the tuners IP address) and re-scanned , found six ATSC 3 channels
script re-tried 10 minutes later and got "Check-in succeeded".

I hope this script does not interfere with MythTV, or it will be paused for Sunday Night Football.

Also, it would be really helpful if the channel listing would also show the channel ID (The old analog channel number) for each of the listed channels.

billbillw
Posts: 3
Joined: Mon Dec 29, 2014 4:58 am

Re: Linux instructions

Post by billbillw »

SpiceWare wrote: Thu Nov 12, 2026 2:51 pm This appears to work on Mac as well. I have brew installed on my Mac Studio so installed PHP by using this command in a Terminal session:

Code: Select all

brew install php
After the installation finished I did this to start PHP:

Code: Select all

brew services start php
I ran the Linux version of the script by entering the command:

Code: Select all

php eacapture.php
It found my HDHomeRun devices and reported a successful check-in:

Code: Select all

darrellspice@Mac-Studio SiliconDust % php eacapture.php 
2026-11-12 21:40:21  First launch
2026-11-12 21:40:22  Found: HDHomeRun FLEX 4K 10A2EFDD
2026-11-12 21:40:22  Found: HDHomeRun CONNECT 4K 10803AF0
2026-11-12 21:40:22  Chosen: 10A2EFDD
2026-11-12 21:40:22  Check-in succeeded.
2026-11-12 21:40:22      Clock delta: -0.5 sec
2026-11-12 21:40:22  Next capture to run at 2026-11-12 23:10:29
screenshot of terminal

Directory ~/eacapture was created and contains 2 files:
  • checkin_state.json
  • eacapture.lock
I'm trying to get this up and running on my Mac. Pretend I know nothing. I used Windows for 30 year and just switched to MacOS last year. I have Homebrew and PHP already installed and running. Does a downloaded file for the php script need to be saved locally before running the php command to run it? if so, where should it be saved?
I keep getting this error:
billx2@Mac-mini ~ % php eacapture.php
Could not open input file: eacapture.php

Bassman
Posts: 5
Joined: Tue Jan 10, 2012 5:25 pm

Re: Linux/Mac instructions

Post by Bassman »

Would this work with a Raspberry Pi 5 with 8 gigs of ram?

Post Reply