Repository navigation
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When using a Kodi client (HTSP) to watch live channels, Tvheadend correctly logs an unsubscribe event at the subscription layer. However, the tvhdhomerun module fails to issue a corresponding tuner release command to the HDHomeRun hardware.
Although the physical tuner LED continues blinking indefinitely, the tuner still functions correctly for subsequent requests. I am not sure which release this started happening in, as I only recently noticed the LEDs remaining active after watching or recording live TV.
Expected Behavior
Tvheadend should issue a tuner release command to the HDHomeRun device immediately after the last subscription unsubscribes. Following this command, the HDHomeRun LED should stop blinking, indicating the tuner is idle. For context, I have observed this correct behavior when using the Plex client, which successfully releases the tuner and causes the HDHomeRun LEDs to stop blinking once the stream ends.
Steps To Reproduce
- Open a live channel in Kodi via HTSP
- Watch for a few seconds
- Stop playback in Kodi
- Observe HDHomeRun device LED — continues blinking indefinitely
- Check TVH logs — no tvhdhomerun release/stop event appears
Environment
TVH version: 4.3-2695~g30a549ed5 (Docker, linuxserver image)
Host OS: Debian 12 (LXC container on Proxmox)
Docker installation: [e.g., Docker Engine via official apt repo / Docker Compose]
Network mode: Host
Tuner: HDHomeRun (ATSC-T OTA)
HTSP client: Kodi Media Center (HTSPv35)CPU architecture
x86-64
Docker creation
Docker Engine (via official apt repository)Container logs
2026-07-01 10:33:31.479 [INFO] htsp: Got connection from 192.168.1.72
2026-07-01 10:33:31.491 [INFO] htsp: 192.168.1.72: Welcomed client software: Kodi Media Center (HTSPv35)
2026-07-01 10:33:31.495 [INFO] htsp: 192.168.1.72 [ Kodi Media Center ]: Identified as user ''
2026-07-01 10:33:43.426 [INFO] mpegts: 599.028MHz in HDHomeRun - tuning on HDHomeRun ATSC-T Tuner #0 (192.168.1.119)
2026-07-01 10:33:43.426 [INFO] tvhdhomerun: tuning to auto6t:599028615
2026-07-01 10:33:43.552 [INFO] subscription: 000A: "Kodi" subscribing on channel "WNBC", weight: 100, adapter: "HDHomeRun ATSC-T Tuner #0", mux: "599.028MHz", profile="htsp"
2026-07-01 10:33:43.554 [INFO] subscription: 000B: "Kodi" subscribing on channel "COZI-TV", weight: 40, adapter: "HDHomeRun ATSC-T Tuner #0", mux: "599.028MHz", profile="htsp"
2026-07-01 10:33:56.018 [INFO] subscription: 000B: "Kodi" unsubscribing from "COZI-TV"
2026-07-01 10:34:05.503 [INFO] subscription: 000A: "Kodi" unsubscribing from "WNBC"
2026-07-01 10:34:05.508 [INFO] htsp: 192.168.1.72 [ Kodi Media Center ]: Disconnected
*** NOTE: No tvhdhomerun stop/release event follows. ***
*** Tuner continues streaming. HDHomeRun LED keeps blinking. ***
Additional Notes
- Tested on both LXC and VM deployments — same result in both cases.
- Plex (HTTP/M3U interface to TVH) releases the tuner cleanly every time.
- Kodi sends two subscriptions on connect (main channel weight 100 +
background mux prefetch weight 40). Both unsubscribe cleanly but
neither triggers a tvhdhomerun release.
- Tuner is not functionally locked — new clients can grab it normally.
The symptom is purely the tuner continuing to stream after all
subscribers have disconnected.
- Similar reports seen on tvheadend.org forums starting ~Dec 2023
around version 4.3-2187.Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
github-actions commentedon Jul 1, 2026
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
j0nnymoe commentedon Jul 1, 2026
This would need to be pushed upstream, we package what they release. This is unlikely to be related to the container itself.
James62370 commentedon Jul 1, 2026
Thank you, I will repost here https://github.com/tvheadend/tvheadend/issues
LinuxServer-CI commentedon Jul 31, 2026
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.
James62370 commentedon Jul 31, 2026
This workaround addresses the "blinking LED" issue on HDHomeRun tuners caused by a Tvheadend regression. It uses a watchdog script to identify "stuck" idle tuners and release them without interrupting active streams.
Prerequisites
You need the hdhomerun_config utility installed. On Debian/Ubuntu-based systems, run:
Bash
sudo apt-get update
sudo apt-get install -y hdhomerun-config
Create the Script
Create a new file for the script:
Bash
nano /usr/local/bin/tuner_cleanup.sh
Paste the following code into the editor. Update the DEVICES list with your own 8-character Device IDs.
Bash
#!/bin/bash
List your HDHomeRun Device IDs here
DEVICES=("ID_HERE_1" "ID_HERE_2" "ID_HERE_3")
for ID in "${DEVICES[@]}"; do
Check both tuners (0 and 1) for each device
for TUNER in 0 1; do
Get tuner status
STATUS=$(hdhomerun_config $ID get /tuner$TUNER/status)
done
done
Save and exit (Press Ctrl+O, Enter, then Ctrl+X).
Set Permissions
Make the script executable so the system can run it:
Bash
sudo chmod +x /usr/local/bin/tuner_cleanup.sh
3. Schedule with Cron
Set the script to run every 5 minutes automatically:
Open the crontab editor:
Bash
crontab -e
Add this line to the bottom of the file:
Plaintext
*/5 * * * * /usr/local/bin/tuner_cleanup.sh > /dev/null 2>&1
Save and exit.
How it works
Safety: The script checks the pps (packets per second) value for every tuner. It only issues a reset command (channel none) if pps is 0, meaning the tuner is genuinely idle.
Non-destructive: If a tuner is actively streaming, pps will be greater than 0, and the script will ignore it.
Precision: This targets only the "stuck" state, ensuring your active recordings or live TV sessions are never interrupted.
LinuxServer-CI commentedon Aug 31, 2026
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.