1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restart Recording after power loss / cycle

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by rodp, Oct 27, 2017.

  1. rodp

    rodp Member

    Hi All,

    Is there a way to ensure that if the humax has been recording a program and power is lost for a short time, that the humax will pick up where it left off (once it know's what time it is!) and continue to record the rest of the program it was recording before the power cut?

    Thanks in advance

  2. Black Hole

    Black Hole Theloniuos Abbot

  3. rodp

    rodp Member

    :( booooo
  4. Wallace

    Wallace Slightly Pickled

    If you suffer from brown-outs, you might want to consider getting a UPS and powering your Humax via that.
  5. MymsMan

    MymsMan Well-Known Member

    Potentially it is something that could be added to the start up phase of the customized firmware but it is not something that the standard humax software does.
  6. rodp

    rodp Member

    It's not necessarily brown outs, but when there is a crash / hang you would normally power cycle the unit, but if it's recording at that time, it's that scenario that you then lose what you're recording and you also lose the info in the schedule as to what it should have been rcording. It if was possible to set this up via the CF that would be excellent.


  7. grahamlthompson

    grahamlthompson Well-Known Member

    If the programme is no longer in the epg then where would the data to record it come from ? Only way I can think of is if the part recorded sidecar files are still available.
  8. Black Hole

    Black Hole Theloniuos Abbot

    I can't think how that could be (reliably) achieved.
  9. MymsMan

    MymsMan Well-Known Member

    My idea that a start up script could check for a recording that should be active in the schedule DB and then use real time scheduling to add a new recording entry for the remaining period of the recording
        set now [clock seconds]
        set events [rsv list tbl_reservation \
            " where ersvtype = 3 and nsttime  < $now and nsttime + nduration > $now "]
        if {[llength $events]} {
                    foreach event $events {
                            log [concat \
                                "Recording '[$event name]' " \
                                "on [$event channel_name] at " \
                                "[clock format [$event get nsttime] -format {%H:%M}]" \
                                " duration [clock format [$event get nduration] -format {%H:%M}]" \
                            ]  2
                          # Code to reschedule recording
        } else      {log "No recordings found" 2}
    This would only detect scheduled recordings and wouldn't help for manual recordings using the Record button - I don't know if they can be detected
  10. Black Hole

    Black Hole Theloniuos Abbot

    All very well, but as far as I can see if a scheduled one-off recording is interrupted by a power cycle, the recording event is no longer in the schedule database when the system reboots.

    The power loss event is logged in the .hmt file for a recording, so maybe a scan at boot time could look for such .hmt's and recommence recording if the event is still current, or (better) reschedule a recording if a matching CRID can be found in the EPG (eg on a +1 service).

    But, I'm tempted to say, it's only telly.
    Last edited: Oct 29, 2017
  11. af123

    af123 Administrator Staff Member

    Exactly - it isn't rocket science. I take pull requests on github or patches via any other reasonable means : )
  12. MikeSh

    MikeSh Well-Known Member

    There are a lot of failure permutations to cover though. Once you cover one circumstance people will ask for all the others and before you know it you'll be wrestling an octopus :)
    Black Hole likes this.