Remote auto-retune

prpr

Well-Known Member
Can anyone suggest a way to kick off a remote auto-retune on the HDR please?
 
diag force-retune assuming firmware new enough to default to yes on the pop-up dialogue, otherwise you'll have to be quick getting onto the box and doing ir RIGHT OK or whatever it is!
 
Testing on my spare box and just observing, this works nicely and will eventually answer all its own prompts.
The trouble is, I get duplicate regions and the "wrong" region is always selected on the proper LCNs. These muxes are easy enough to get rid of with a single sqlite command, but the difficult bit is then restoring the LCNs from where they got put at 800+.
As has been mentioned elsewhere, the usOrgLcn field in the database always contains 0, which is a real pity. Anyone got any bright ideas about how to solve this?
 
Before retune:
Code:
humax# cd /var/lib/humaxtv
humax# sqlite3 channel.db
SQLite version 3.8.7.4 2014-12-09 01:34:36
Enter ".help" for usage hints.
sqlite> attach 'lcnmap.db' as lcnmap;
sqlite> create table lcnmap.x as select uslcn, szsvcname from TBL_SVC;

and after retune

Code:
humax# cd /var/lib/humaxtv
humax# sqlite3 channel.db
SQLite version 3.8.7.4 2014-12-09 01:34:36
Enter ".help" for usage hints.
sqlite> attach 'lcnmap.db' as lcnmap;
sqlite> update TBL_SVC set uslcn = (select uslcn from lcnmap.x where TBL_SVC.szsvcname = lcnmap.x.szsvcname);
 
Nice! Should have thought about that myself.
I tweaked it a little bit though:
Code:
sqlite> update TBL_SVC set uslcn = (select uslcn from lcnmap.x where TBL_SVC.szsvcname = lcnmap.x.szsvcname) where uslcn >= 800;
as otherwise it'd put back LCNs which do change deliberately and are wanted e.g. CBS Action moving from 70 to 64.
Now, how can this be incorporated into the WebIf? :)

Seriously, I think it would be very useful if there could be some way to do an auto-schedule-restore backup, a channel database backup and kick off an automated retune.
Then when it's done, have anything that's not in your 'preferred' region (which you set beforehand) deleted from the channel database (check in TBL_NET szNetName having stripped off the prefix junk), restore any 800+ LCNs to what they were before and delete the backed-up channel database.
 
It is a real shame that the usOrgLcn field isn't populated.. The renumber package does stash the original LCN in there when moving a channel but it would be nice if the Humax software did too.
I wonder if it's possible to extract it from the broadcast stream in some way?
 
Well obviously the broadcast stream contains the LCN (in the NIT which is PID 16), but the .ts files recorded by the Humax have already stripped this PID out, so where did you envisage getting it from?
 
Just done all this on the remote box and the unwanted region got allocated most of the wanted LCNs, including 602 and 603. I deleted these and renumbered everything, but that left the wanted RB2 and RB3 channels with no LCN set in the database at all, which is a bit weird. A side effect of this was that the Remote Control page complained there were no channels at all to select.
I guess trying to renumber something above 800 that wasn't there in the lcnmap.db database was the cause of this. Not sure how best to modify the above SQL to cope with this though. Need some sort of "if not null" type of thing...
 
diag force-retune assuming firmware new enough to default to yes on the pop-up dialogue, otherwise you'll have to be quick getting onto the box and doing ir RIGHT OK or whatever it is!
I wanted to use this on an HD box and it wasn't doing anything. Eventually after staring at the dump of /var/lib/humaxtv/setup.db, I worked out what the problem was. fdso has a statement:
Code:
update TBL_USERCONFIG set itemValue = 1 where itemName = 'ASO_NOTIFY_FLAG'
but that table has no row with such an itemName.
I checked on another (recently acquired!) HDR as well, and that was the same, so I'm unsure what actually creates this entry.
So, it would seem the diagnostic needs to "insert or replace into" rather than "update". But what value to use for itemIdx? The entries are not consistent for several items in this table between my boxes.

(Posts 4-9 now obsoleted by tunefix :) )
 
Back
Top