mod: Remote Scheduling of Recordings

af123

Administrator
Staff member
Let's start investigating and discussing the possibility being able to schedule recordings remotely, either via the custom web interface or via some sort of subscription service on the Internet.

There has been some investigation done previously by wiliam which I'll quote in the next post for reference.

The epg package gives full access to the freeview EPG data which is cached on the box and is used by the webif package to display EPG data. It can give us the data we need to add entries to the scheduled recording table so we just need to address the problems that william found.
 
william said:
Did some crude testing...

- Adding entry to table doesn't appear on schedule as we knew. Waited over an hour to ensure the box doesn't auto-refresh.
- Adding a dummy entry on remote makes new entry show up on schedule, though not while recording.
- Putting box to sleep and waking it up makes the new entry show up on schedule, though not while recording (box stays awake while recording).
- Manually added schedules don't seem to wake box from sleep automatically.
- Adding an entry in table with different parameters (like name) work at first, but get overwritten with original values after a while, didn't notice when.
- Added an entry in the past, and after a soft reboot it kept the entry but pushed the recording forward to a late-night showing of that programme.
- Adding or deleting schedules with remote have immediate effects on table

I suspect it keeps a temporary store of it's schedule until it is flagged for an update. During an update it seems not just to load the table, but also cross-reference the programme info with the epg and update everything accordingly. While recording it only seems works from its temporary schedule.

Needs more investigation.
 
The latest custom firmware provides hooks to allows the humaxtv process to be restarted without doing a full reboot of the operating system. It might be necessary to force this kind of soft reboot so that the humaxtv software picks up any scheduled recordings which have been added. With appropriate checks to make sure that nothing is being watched/recorded or about to be recorded this should be safe enough.

I'm working on backup/restore of the scheduled recordings (and channel favourites) at the moment and then I will move onto the scheduling side so that more detailed testing can be done.
 
You are aware that a new firmware is going ota early next month for both the HD and HDR boxes ?

Yes. The latest custom firmware is based on 1.02.20 which is that OTA version, and also the one to which I have added the restart hooks.
 
I've just successfully recorded something via remote scheduling :D

I'm going to release a new version of the web interface later which has this feature in, although turned off by default as it isn't completely tested yet. Hopefully some of you can volunteer to experiment with it and we can work out a way of making it practical.
 
I've just successfully recorded something via remote scheduling :D

I'm going to release a new version of the web interface later which has this feature in, although turned off by default as it isn't completely tested yet. Hopefully some of you can volunteer to experiment with it and we can work out a way of making it practical.

Wow! Excellent! Will volunteer to give this a go.

af123, is that through the webif interface?
 
Ok, webif 0.6.1 has been uploaded which has support for remote scheduling. To enable it you need to create a file on the Humax disk called /mod/.schedule.testing. Without that file the interface will work but when you try and schedule a recording then it will fail with an error message saying 'Disabled during testing'.

There are quite a few caveats with this and a lot more testing is needed.
  • No conflict checking is done at all - I have no idea yet what will happen if you schedule conflicting events;
  • Once a new entry has been added to the recording schedule, the Humax must be rebooted. Otherwise after a while the entry is removed by the running humaxtv process. Just restarting that works too but in that case the TSR buffer stops working. The web interface starts indicating that a reboot is required and provides a 'restart now' button. The button will not appear if the box is busy accessing something on the media filesystem (recording, playing back, copying);
  • The Humax won't wake itself up to record something added to the schedule this way unless another scheduled event has already occured. Once a scheduled event occurs, humaxtv appears to rescan the table to find the 'next event' and set the hardware timer appropriately.
So, this is progress but not yet perfect by any means. However, I did manage to set a recording timer today from work by a convenient set of events:
  • My Humax is configured with a wake up timer at 3pm and a sleep timer at 3:15pm;
  • I can access my home network via a VPN from my iPhone;
  • Just after 3pm, I used the web interface to schedule recording of a 5 minute programme at 3:40pm and then I rebooted the box (again through the web interface);
  • At 3:15pm, the box turned itself off (sleep timer);
  • At 3:30pm the box turned itself on (wahay!);
  • The recording was successful and the box turned itself off afterwards.
The fact that it woke up ready to do the recording a 3:30 indicates that it successfully configured the hardware timer and I'm supposing that this is as a result of the 3:15 power down event being triggered.

I've got some ideas about how to make this more workable long term but for the moment, please play with it and see if we can gain some more insight into what's happening. I've added a new column to the end of the scheduled events list as well which is just a * if the event has been accepted by the Humax. This usually appears a couple of minutes after the reboot.
 
af123, re-read first post and saw it is available through the web interface.

Have upgraded to 0.6.1 of webif, and wow again! Works for me.

Looked at recording an episode through the EPG and it goes through all the steps until it gives me the "Disabled during testing" message.

I guess we need the firmware update to do the soft reboot?

AAARRRRGGGGHHHH. You just beat me to it with a post! OK, I'll read it and give it a go...
 
I'm hoping that by the end of the week the new remote scheduling system will be ready for beta testing so I'm looking for willing volunteers.

At this stage, I'm only looking for a few people who are happy working on the command line and able to install a new mod version (1.11) which will be released in the next day or two.
If you're interested in being a guinea pig, please PM me the MAC address of your Humax's ethernet interface.
 
I would love to help but I am not too confident at the command line. I have/do use PuTTy, but usually just copy commands in.
If you simply want me to type commands 'verbatim' then I am OK with that.
 
If you simply want me to type commands 'verbatim' then I am OK with that.

That would be fine - it shouldn't require too much command line work, just the initial setup which isn't yet web driven and the odd bit of troubleshooting as required.
 
That would be fine - it shouldn't require too much command line work, just the initial setup which isn't yet web driven and the odd bit of troubleshooting as required.

Does this need VPN or anything like that? I would like to do my bit to help but I can't access my Hummy remotely as I don't leave a PC on at home to run VPN on.
 
Does this need VPN or anything like that? I would like to do my bit to help but I can't access my Hummy remotely as I don't leave a PC on at home to run VPN on.

No, it doesn't need a VPN. As long as your Humax is connected to the Internet in some way that's enough.
 
Count me in! I'll grab my MAC address when i'm home...

Looking forward to seeing how this works.
 
Sorry. I won't be able to give you the MAC address until tomorrow as I am not at home at the moment.
 
Erm sorry if this is obvious but how do I PM you with my mac address?:confused:
Use the conversation feature. One way is to click on a members name alongside a post, and a pop up box will appear. There is an option to start a conversation.:)
 
Back
Top