Project

General

Profile

How to get informed if Record request is being added to TVH

Added by Pila RPi about 8 years ago

How to tap into TVheadend to get informed immediatelly if someone adds a recording? I need TVH to call my script!

My disk is normally unmounted. I need that "add recording" request to first call my script to mount a disk if needed. Particularry if recording should start immediatelly.

Explanation. I use RPi LibreElec as TVHeadend server for Live TV. NAS is mounted as disk for recording. If NAS goes to sleep, LE breaks. LE will hang RPi if OS level mount is or becomes unavailable at any time! No mount command can solve that at LE RPi.

I made a script parsing http://127.0.0.1:9981/status.xml to check TVheadend recordings and wake my server, mount if needed, umount if no recordings are pending. Works perfectly. But, as it is run by cron, I have a gap of 5 minutes before my script can notice a recording is added to the TVH. Even If I run it every 1 minute, it would not help.

If my disk is not mounted, recording will go to the tiny local MicroSD card. Then I (script) must check if something is there and move it to the actual disk after it is mounted. But, multiple chained recording events can stop me from mounting and cause local storage to be insufficent and recordings lost.


Replies (1)

RE: How to get informed if Record request is being added to TVH - Added by Pila RPi about 8 years ago

Funny thing, I expected someone here would know more than I who is using TVheadend just a bit of time. Well, I was wrong.

    (1-1/1)