• The forum software that supports hummy.tv has been upgraded to XenForo 2.3!

    Please bear with us as we continue to tweak things, and feel free to post any questions, issues or suggestions in the upgrade thread.

[tunefix] Automatic channel organisation and maintenance

I tried adding the following to /mod/etc/smb.conf (do-able using the diagnostics file editor), and now I have a mount point called [Root] showing up as an entry under the Humax network share in DOpus (and presumably Windows Explorer) which gives me file manager access to the whole file system:
Code:
[Root]
   comment = Root
   path = /
   public = yes
   writable = yes
   browsable = yes
   create mask = 0644
   directory mask = 0755
   hide dot files = no

I don't know whether all the parameters are necessary, I just copied them from the example.

That's brilliant - it will save a lot of FTP work.
Of course when using Windows editting tools on linux files it is important to avoid introducing windows line end conventions (CR/LF) into files which can cause breakages
 
Notepad++ it recognises the files current line-ending type and maintains it for any new line endings.
Just remember, if you create a new file you have to set the line ending to the type you want.
 
Last edited:
Well, that all looked good, but I rebooted and still have channels in the 201 range, 790 range, 800s and 1000s
Latest channel.db attached.
Thanks for the files. I agree, the debugging looks right, but the database hasn't changed. I've added more to 1.0.3 (and re-enabled the Preferred Region stuff) so could you try again please?
The really irritating thing is that it all works perfectly on my box.
 
if tunefix bins the 800s before reorder runs, it seems that the HD channels will get lost????
Tunefix does NOT bin anything just because it's >= 800 (unless you tell it to of course). It will only bin things from the 'wrong' region (if you tell it to), which may or may not include things >= 800.

Might I suggest that you bin reorder and just force the LCNs using tunefix instead (if it's actually working at all for you)? I think it ought to work - I hadn't previously thought of that since I don't use reorder.
 
Okey Cokey. Thanks for the info. HWMBO has commandeered the TV for the night, so that's blown trying it out tonight out of the water. I'll bin reorder and channeldel, install tunefix and give it a full retune in the morning.
 
Installed 1.0.3 and rebooted... no apparent difference, channel.db unchanged.
Ran the command-lines again
Code:
humax# cat /mod/boot/tunefix.conf
REGION:West
LCN:201-299,790-799
FORCE:1:BBC ONE West
FORCE:2:BBC TWO
FORCE:3:ITV
FORCE:4:Channel 4
FORCE:719:BBC Bristol
humax# /mod/boot/xinit.d/tunefix
Tunefix V1.0.3 (c) 2015 prpr
drop table if exists temp.LCN;
0 rows
create temp table LCN as select usLcn,szSvcName from TBL_SVC join TBL_TS on TBL_SVC.tsIdx = TBL_TS.tsIdx join TBL_NET on TBL_TS.netIdx = TBL_NET.netIdx where TBL_NET.szNetName != 'i7West' and usLcn < 800;
0 rows
delete from TBL_NET where szNetName != 'i7West';
2 rows
update TBL_SVC set usLcn = (select usLcn from temp.LCN where temp.LCN.szSvcName = TBL_SVC.szSvcName) where szSvcName in (select szSvcName from temp.LCN) and tsIdx in (select tsIdx from TBL_TS where netIdx in (select netIdx from TBL_NET where szNetName = 'i7West')) and usLcn >= 800;
0 rows
drop table temp.LCN;
0 rows
delete from TBL_SVC where usLcn between 201 and 299;
27 rows
delete from TBL_SVC where usLcn between 790 and 799;
1 row
update TBL_SVC set usLcn = 1 where szSvcName = 'BBC ONE West' and usLcn != 1;
0 rows
update TBL_SVC set usLcn = 2 where szSvcName = 'BBC TWO' and usLcn != 2;
0 rows
update TBL_SVC set usLcn = 3 where szSvcName = 'ITV' and usLcn != 3;
0 rows
update TBL_SVC set usLcn = 4 where szSvcName = 'Channel 4' and usLcn != 4;
0 rows
update TBL_SVC set usLcn = 719 where szSvcName = 'BBC Bristol' and usLcn != 719;
0 rows
humax#

The tunefix settings page and the channel info page and the channels.db now all seem to be correct.
So what changed?
 
I don't quite understand what you mean by "channel.db unchanged" then "channel.db now seems to be correct".
Has tunefix worked properly now? Have you rebooted since it apparently did?
You can't really run tunefix with the Humax software running as it will overwrite any changes at some point. That's why it has to be done at boot time.
 
This is what I did...
First I installed 1.0.3 and then rebooted, after which the result seemed to be as previously, nothing had changed. Hence my first statement; channel.db unchanged.

That having failed, I ran the command lines shown. After this the WebIf pages seemed to indicate that the changes had been applied correctly (appropriate channels and multiplexes now removed) and the channel.db also had the changes in it.
I then rebooted and the changes have persisted, so all seems well. Hence my second statement that it now seems correct.

Hope that helps.

This is my new channel.db
 

Attachments

After reboot, HD channels were at 1, 2, 3 etc. OK but the 201-299 and 790-799 are still there.
The double entries in the SUI have gone now.
 

Attachments

Last edited:
Back to first principles of software development and test properly on more than one box...
1.0.4 should have fixed it.
 
Back to first principles of software development and test properly on more than one box...
Its good to have guinea pigs! (if I hadn't wanted to be one, I wouldn't have tried the package so early).

I will install 1.0.4 and do a retune to see if it will go through the whole process correctly; not sure if I will get the time this evening, it may have to be tomorrow morning.
 
Well, guinea pig #2 can report that it all worked just as expected. (well, I suppose expected is possibly the wrong word, perhaps I should have used the phrase 'as it is supposed to' :))
Left it as default and it deleted all the channels that it should have. Then added the rest of the adult section and radio, rebooted, all gone. HD channels correctly located at 1, 2 etc. with SD at 101 etc..:):)
Damn fine work prpr, thanks. What was wrong?
 
OK
- did a full retune (leaving me with excess channels as expected)
- then rebooted after which autoschedule did its automatic schedule restore and reboot.
end result is that the channels appear to be exactly as expected.
That looks great (although I haven't used channel removal by name yet). It will certainly make dealing with retunes a lot easier.
Thanks prpr, nice job.
 
Last edited:
Well, guinea pig #2 can report that it all worked just as expected. (well, I suppose expected is possibly the wrong word, perhaps I should have used the phrase 'as it is supposed to' :))
Left it as default and it deleted all the channels that it should have. Then added the rest of the adult section and radio, rebooted, all gone. HD channels correctly located at 1, 2 etc. with SD at 101 etc..:):)
Excellent.
Damn fine work prpr, thanks. What was wrong?
It's too embarrassing really...
I changed some path names as a test (/mod/boot instead of /var/lib/humaxtv/mod, which point to the same thing when the box is up and running but not at boot time) and forgot to put them back. Then I didn't test the boot time operation since I added the install time processing (to generate the initial config. file) even though the former hadn't changed. The boot time operation calls programs with a command line parameter of "start" which confused tunefix as it wasn't expecting it since adding the install time processing (previously it ignored command line parameters altogether).
Startup of this box is quite complicated and there ain't no documentation (apart from reading the code and picking af123's brain!). The simplest thing can catch you out, and it did. There is no substitute for print statements and testing, but startup testing is time consuming; retune testing even more so.
Er, I hope all that makes some sort of sense...
 
but startup testing is time consuming; retune testing even more so.
Tell me about it. Especially when you are trying to work around what HWMBO is watching and the adverts between same.
Er, I hope all that makes some sort of sense...
Er, sort of.:). Anyway, as HM said, Nice job, thanks.
 
I would like to add my thanks too.

I have just installed it on my 'daily use' HDRs and it worked a treat on both of them.

Thanks again.
 
Back
Top