WebIf Tweaks: Button to reset the EPG when incomplete

Matthew

Active Member
Every now and then you boot the machine only to find the EPG is incomplete, apparently this should eventually resolve itself but if your impatient you can fix it by issuing service epg restart in the cli. But that's a hassle to get to so the following adds a button to the EPG (grid mode) to do it for you.


Changes modied, see https://hummy.tv/forum/posts/131984 for latest revision


There may be a better way/place to do this, but it works and I`m still new to jim/tcl

If anyone has any suggestions for improvements please post

4015

edit: modified following @af123 suggestions
 
Last edited:
...cli. But that's a hassle to get to...
You can also restart it in the web interface from the Service Management screen (available from the main menu), but I was not aware that it is sometimes necessary to do this. The epg service checks the EPG database that the Humax software manages every 15 minutes, and whenever the timestamp changes it re-generates the database used by the webif. It would be possible to make it more reactive to changes if this is a common problem.

In terms of the code, you can just call the existing /cgi-bin/service.jim?action=restart&service=epg - this is what the service management screen uses, see https://github.com/hummypkg/webif/blob/master/webif/html/services/index.jim
 
Is this addressing the problem that I have occasionally, whereby some LCNs are completely missing from the WebIF EPG, or it addressing 'gaps' in the programmes listed within the LCN timeline?
 
You can also restart it in the web interface from the Service Management screen (available from the main menu), but I was not aware that it is sometimes necessary to do this. The epg service checks the EPG database that the Humax software manages every 15 minutes, and whenever the timestamp changes it re-generates the database used by the webif. It would be possible to make it more reactive to changes if this is a common problem.

In terms of the code, you can just call the existing /cgi-bin/service.jim?action=restart&service=epg - this is what the service management screen uses, see https://github.com/hummypkg/webif/blob/master/webif/html/services/index.jim

Thanks, didn't look at the Service Management as an option :oops:

The problem comes up about once every week or so, having a 2TB drive slows the startup so perhaps that's related.

@Black Hole as I understand it the command does rebuild the EPG database

@Trev its addressing 'gaps' in the programmes listed issue.
 
Ah, thanks. I don't seem to get any of those missing programmes, just completely missing LCNs form time to time. Like the EPG starts at ITV (Ch 3) and 'misses out' BBC1 and BBC2.
 
@af123

Strangely changing the code in script.js to:

Code:
$('#resetEPG').button().click(function() {
          var url = '/cgi-bin/service.jim?action=restart&service=epg';
          $('#results').load(url, function() {
               window.location.href = window.location.href;
        });
});

requires the button to be clicked twice before the load performs, cant see why!
 
The epg service checks the EPG database that the Humax software manages every 15 minutes
Are you interested in my portability fixes for this, similar to those I did for hmt? (Although I don't think I've quite finished them yet.)
 
Is this addressing the problem that I have occasionally, whereby some LCNs are completely missing from the WebIF EPG
That problem is one step back - the Humax software stops writing all the EPG data to its disk cache, so the epg service can't read what isn't there to create the WebIf's database. You need to change channel or reboot, and then wait for it all to catch up.
Installing the epgfix utility seems to help (as it does a channel change in the wee small hours of the morning, assuming your box is on 24/7 - if it isn't then it won't help).
 
That's strange you should say that about the box EPG, as whenever I have had missing LCNs on the WI, they have all been present and correct on the box. But I suspect this finding is a simple case of me not understanding how 'it works'.
Depends what you call 'on 24/7'. I put mine to standby when not in use, but it has mains 24/7.
 
Depends what you call 'on 24/7'.
24/7 ON (fully awake, not in standby)

I put mine to standby when not in use, but it has mains 24/7.
Are you being deliberately obtuse? As a PVR it wouldn't fulfill its primary function if it spent a significant proportion of its time with no power.

Shops have an electricity supply 24/7, but a 24/7 shop is open for walk-in business (without having to knock up the storekeeper) all day every day. Analogously, a 24/7 HDR-FOX is awake and available without delay (while waking up out of standby) at all times (as mine are), crashes or automated power-cycle reboots notwithstanding.

24/7 Advantages:
  • Instant availability for normal TV use (no boot delay)
  • Instant availability for network access to CF (use of WebIF)
  • Instant availability as network media server
  • No more than 10 minutes delay collecting new instructions from RS
  • Less heat, mechanical, and voltage cycling stresses potentially resulting in longer life
24/7 Disadvantages:
  • Greater chance of "unattended crashes" ceasing service until manual (or timeswitch) reboot
  • Measures required to prevent stale EPG
  • Costs £37 per annum (per HDR-FOX, assuming 28W @ 15p/kWh)
Timeswitch-Interrupted 24/7 Advantages:
  • Instant availability (except during interruption) for normal TV use (no boot delay)
  • Instant availability (except during interruption) for network access to CF (use of WebIF)
  • Instant availability (except during interruption) as network media server
  • No more than 10 minutes delay (except during interruption) collecting new instructions from RS
  • No measures required to prevent stale EPG
  • Maximum duration of inoperable state (due to crash) limited to 24 hours
Timeswitch-Interrupted 24/7 Disdvantages:
  • Brief period of unavailability (not good for insomniacs)
  • Potentially reduced life due to heat, mechanical, and voltage cycling stress
  • Costs £37 per annum (nearly)
Non-24/7 Advantages (system in standby when not in active use, or standby induced by internal timer):
  • Reduced probability of crashes, no unattended crashes (therefore immediate intervention)
  • No measures required to prevent stale EPG
  • Electricity costs proportional to usage (£37 PA max)
Non-24/7 Disadvantages:
  • Inconvenience of start-up delay
  • Inconvenience of manual start-up for network access to CF
  • Inconvenience of manual start-up for network access to media server
  • Collection of new instructions from RS limited to ON periods – no unplanned remote scheduling
  • Potentially reduced life due to heat, mechanical, and voltage cycling stress
  • Internal timers unable to clear crash state
Take your pick.

Unless you regard the electricity consumption as significant (and you have to balance that against the cost of decreased life and the environmental issues of disposal), it seems to me the choice is between the 24/7 plan and the interrupted 24/7 plan (but keep the interruption to an absolute minimum to minimise the thermal cycling). What could be even better is some kind of device which detects a crash and quickly cycles the power (only when there is a crash rather than daily) – but I've had that on the back burner for quite a while now. Make it able to respond to network on/off commands and it could also provide the remote control needed by Non-24/7 stalwarts!
 
24/7 ON (fully awake, not in standby)
Thank you.

I put mine to standby when not in use, but it has mains 24/7.
Are you being deliberately obtuse?
Christ BH, how difficult is it to understand that the 'it' being referred to is the box. That was the only subject of my post, so it should have been blatantly obvious what the 'it' was.
Take your pick.
I did already. And it is the "Non-24/7 Advantages (system in standby when not in active use, or standby induced by internal timer): " option. My Mrs. seems to think that the orange light on all the time is a 'waste of lecky and £37/year just would not cut it.:p
 
Christ BH, how difficult is it to understand that the 'it' being referred to is the box. That was the only subject of my post, so it should have been blatantly obvious what the 'it' was.
And the reason I decided you must be being obtuse (deliberately, possibly for comedic effect that escaped me) was because I found it hard to believe you wouldn't realise that 24/7 doesn't mean just having an electricity supply connected. So there.
 
So..... do I need to look at making epg more responsive to on-disk database changes?
 
So..... do I need to look at making epg more responsive to on-disk database changes?
Possibly, I would like the system to be more responsive to late changes to the programme schedule when sports events etc overrun
I often see the changed schedule is visible in the on screen display but the webif has yet to catchup (and RS never does) which means the webif cant be used to record the changed schedule.
I have suggested in the past it might be possible to automate updating the recording schedule to cope with such changes but that would not be possible without up to date EPG data
 
That's strange you should say that about the box EPG, as whenever I have had missing LCNs on the WI, they have all been present and correct on the box.
I didn't say or imply that the Humax UI wasn't correct in terms of EPG. I said the disk copy of it stops being updated. Usually the file gets written every couple of minutes or so, but sometimes, for reasons unknown, it seems to stop doing so, or only does it very sporadically. Rebooting always fixes it (until the next time, who knows when) and changing channels mostly fixes it (for a variable amount of time).
 
Ah, I see, thanks. I didn't realise there was the EPG and a disc copy of it. Not sure what I assumed, but my assumption was obviously wrong.:frantic:
 
Back
Top