[LIVE] TVHeadend and suspend control while recording
#1
Hi there,

I'm looking at migrating from a dedicated 2 machine (myth backend/xbmc frontend) setup, to a single machine (tvheadend/xbmc frontend).

I'm using the xbmcfreak distro, as there appear to be many ion330 specific tweaks that are already applied in this release. It also coems with tvheadend installed.

I've got it all working (on a test USB drive), but my question relates to the ability to pause shutdown of the system when tvheadend is recording a program.

On my current mythtv backend, i utilise mythwelcome, which basically controls the "ontime" of the machine to be "awake" whenever the mythbackend needs to record a program.

To make the tvheadend/xbmc single machine work, i have to have something equivalent to mythwelcome.

Now, I've googled around a fair bit, and nothing much seems to match. Although, i'd be surprised if i was the first to think of this combination.

The closet I have come is
1) changing the selected skin to execute a custom script on shutdown, or
2) shutdown timers

Neither are very elegant for my requirement.

My poorly documented requirements are, something like this
* Will wake to record (using tvheadend). I know enough about ACPI (from mythwelcome) to get this to work.
* If XBMC idle, and no recording now, or recording scheduled, shutdown
* Will not shutdown the system if there is something to record
* Will not shutdown if there is a recording scheduled in the next 10 mins
* Integrates into the XBMC gui (python script, addon?)

I was thinking to start looking at a python addon, but would appreciate any pointers as to where to start.

Cheers,

Nathan
Reply
#2
(I've resurrected this thread now that I've made my MythTV script available)

Nathan,

I've written a script that does the sort of thing you're after but for my MythTV backend/XBMC frontend system.

It checks status of the MythTV backend (i.e. if it's recording/transcoding/etc), checks if xbmc is active (i.e. listening to music/watching videos) and checks if there are any active sessions (e.g. SSH) - if all tests are passed it grabs the time of the next scheduled recording, sets the ACPI wake alarm and suspends the machine.

Shouldn't be too big a job to get this working on TVHeadend: we'd need the ability to grab the recording data and get the backend status.

I've never used TVHeadend so I don't know whether it has anything like "mythshutdown -s" which gives the backend status. If not, we'd need to find a way to determine whether the backend was recording (i.e. if start time is before now and finish time is later...)

Happy to discuss if you want more info.

el_P
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply
#3
There's a script on this page which has a test for checking whether TVHeadend is recording.

Should be easy enough to work a solution into my script if you needed to.

EDIT: I see you've already tried a solution here.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply

Logout Mark Read Team Forum Stats Members Help
[LIVE] TVHeadend and suspend control while recording0