Return Current Volume Level with .jim file

darky8

New Member
Hi Folks,

I'm currently writing a .NET class to integrate my two HD-FOX T2's into my home management software. I can get channel status from /cgi-bin/status.jim which is great, but would like my software to be able to tell the volume level too.

Any ideas, is it possible..?

Many Thanks

darky8
 
I think the current volume level is in the setup database so you should be able to retrieve it from there. I'm not at home at the moment so can't check but I can have a look tomorrow.
 
Thank you, that would be good.

I've not worked with .jim files before nor the sort of database structure in use, any hints would be useful.

Regards

darky8
 
Something like this might do:
Code:
#!/mod/bin/jimsh
source /mod/webif/lib/setup
package require sqlite3
httpheader
set db [sqlite3.open "/var/lib/humaxtv/setup.db"]
puts [lindex [lindex [$db query "select itemValue from TBL_USERCONFIG \
  where itemName='VOLUME';"] 0] 1]
$db close
 
Last edited:
Hi,

That's excellent :)

I can modify that to pull out other stuff. It's much better to have two way communication with the device, rather than just firing IR codes at it.

Many Thanks
 
Ok, didn't quite happen for me.

Putting this script into a txt file and simply renaming it .jim and uploading it to cgi-bin, didn't seem to work for me (500 Internal Server Error).

So I chmod it so the permissions are the same, but still the same result.

I'm missing something obvious, but it's the first time I've attempted this and I'm a bit stuck.
 
Have you got DOS (CR/LF) or Unix (LF) line endings? You need the latter.
How big is your file? With an exact copy of what I posted above, mine is 249 bytes with the correct line endings and 257 with the wrong ones.
You can run "dos2unix" on the file in question if it's wrong.

Running it on the command line might be worthwhile as well:
Code:
humax /mnt/hd2/mod/webif/cgi-bin # ls -l vol.jim
-rwx------  1 root  root  249 Dec 14 09:28 vol.jim
humax /mnt/hd2/mod/webif/cgi-bin # jimsh vol.jim
Content-Type: text/html; charset="UTF-8"; no-cache
Expires: -1
Connection: close
Pragma: no-cache
Cache-Control: no-cache

15
 
Last edited:
I managed to get 253! But now it's working and I can modify this to pick out anything I want.

I must say that I'm extremely impressed with the whole Humax project. I got my first HD Fox T2 completely by chance and after wards got myself another one. The custom firmware opens the box up to unlimited possibilities and with excellent support, it's great fun to play with!

Here's my box that's completely remotely controlled, it has a Global Cache Itach to handle the OFF/ON, Touch Control Server for iPhone app integration and lives in the loft.

I'm well impressed and off to have some fun with it! :)
 

Attachments

  • DSC06020.JPG
    DSC06020.JPG
    986.7 KB · Views: 20
Nice. You could do with a rack shelf though :)
I hate bits of kit stuck on top of other bits when mounted in bays like that!
 
If you think the HD-FOX+CF is great fun, get a HDR-FOX and blow your socks off. You can then reallocate the HD-FOXes for use as clients.
 
TBH I don't watch it a lot, and I don't do films. It's hard enough finding anything worth watching, let alone recording. Most of the stuff I watch is online, but I agree, it sounds like fun!
 
Back
Top