[ir] Web-based Remote Control

Here is a 'temporary fix' to disable the keyboard mapping:
Code:
sed -i -e '/keydown/,/^}/s/^/\/\//' /mod/webif/plugin/ir/script.js
 
Presumably the database file can be edited with the sqlite3 command line tool or a GUI tool running on a networked PC, such (Linux) Sqliteman. Some assemblySQL required.
 
Hello, and many thanks for ir. I am the OP of the typing bug.

If you can also test that a macro called root is indeed executed on start it would be great. I created the following macro called root, which navigates to a first USB drive attached to the HDR-Fox T2:

DELAY30 MEDIA (0x6f) BLUE (0x1e) RIGHT (0x14) OK (0x13) DELAY5 DOWN (0x15) OK (0x13) DELAY5 EXIT (0x16)

When I click on the macro on the WebIF, it does what I want it to do. But it does not look like it is called on restart. Or maybe it is called before the USB drive is mounted and fails? The 30 sec delay at the start was not successful.

I will understand if this is too complicated to run at start-up, just wanted to check that the root mechanism works.
 
If you can also test that a macro called root is indeed executed on start it would be great
Try calling it "boot". There is an error in the wiki:
Macros
  • record a sequence of key strokes, to be replayed with a single 'click'
  • A Macro named root will automatically be run when the Humax is taken out of standby
  • Macro sequences are stored here :- /mod/etc/webif.db, macros can be transferred to another unit by copying this file
Selecting Record a New Macro will display a Name Box and some delay keys to create a pause in the sequence
Whereas:
If you create macro called boot then it will be played upon boot. I added it but have never really done any experimentation (nor apparently announced it as available).
Obvious really, but I didn't spot it :oops:
 
Thanks for the suggestion. If one spells "root" with a 'b', as in "boot" (🤣), then the following sequence indeed sets Media to point to the USB drive next time it is pressed:

DELAY30 MEDIA (0x6f) BLUE (0x1e) RIGHT (0x14) OK (0x13) DELAY5 DOWN (0x15) OK (0x13) DELAY5 EXIT (0x16)

I believe that there is a race condition, as the initial delay is needed (I am not going to play with numbers other than to increase it if I have to, empirically). But I am sorted in the first instance; thanks!
 
I don't have that problem; my machines stay on 24/7 so they remember where they are (until I have to reboot).
 
I've spotted a problem with channel short-cuts on WebIF >> Remote. If the screensaver has kicked in, as it might well do with a radio service, it's necessary to exit the screensaver before any IR commands are responded to (virtual or real). The channel short-cut macros therefore need to prefix the actual channel change (number string plus OK) with something like EXIT, and maybe even a short delay. I'm not sure whether adding such a prefix to all the channel macros will exceed the memory space.
 
If some genius (probably a user ID ending in 123) were able to locate and hook the screensaver code in the settop program so that we could detect when the screensaver is active, the IR code could automatically detect it and prepend EXIT. Similarly for this: https://hummy.tv/forum/threads/radio-ss-off-disable-screensaver-on-radio-channels.8804/.

Generally there isn't a safe IR code that can always be sent to defeat the screensaver, if it's not known whether the saver is active.
 
When it comes to it, it's not safe to inject button presses at any time - there might be some actions in progress. I don't think that objection is valid. What's wrong with EXIT? "0" might do, presuming there are no four-digit services.
 
When it comes to it, it's not safe to inject button presses at any time - there might be some actions in progress. I don't think that objection is valid. What's wrong with EXIT? "0" might do, presuming there are no four-digit services.
prepending a 0 to the channel shortcut macros should be safe and would also bring the humax out of standby if needed
 
I still don't know what's unsafe about EXIT. It can take several EXITs to back out of some menu levels, but if another user is busy with the physical handset all bets are off anyway.
 
Another bug that has been fixed is where you have two (or more) boxes in the same room. The last activity indicator on the WebIf would trigger whenever either of the remotes was used. There was no check for correct mode - there is now.
 
  • Using the LG remote (since it doesn't cause repeats) I only see the first key of a macro sequence is executed, I have in my ir3.map
    Code:
    1a:5,f1,5,13:YELLOW
    1d:3,4,13:GREEN
    • Pressing Yellow switches to channel 3 instead of 33
    • Pressing Green switches to 1 and not 13
      Code:
      MACRO
      Real IR code: 0x00000000 0xfa051000 (1a) [foreign=0]
      MACRO
      Real IR code: 0x00000000 0xfc031000 (1d) [foreign=0]
  • Using the Humax remote the macro is invoked for the initial button press and all of the repeat flagged entries which causes an immediate crash and automatic restart :(
This is multiple key entries in ir3.map rather than the macro recorder

Code:
1a:5,f1,5,13:YELLOW
1d:3,4,13:GREEN
See https://hummy.tv/forum/threads/ir-web-based-remote-control.2437/post-143460 for more details
 
I read it, but didn't really understand it. This is not what I call a reproduction scenario, as you haven't explained anything, nor detailed any of the settings in ir3.conf or irmode which will interact in some way. Nor have you stated explicity which version you are using (I presume 1.21 or 1.22).
Take it back to first principles and assume little knowledge on the part of the reader (and you wouldn't be far wrong). I don't really want to read the whole thread to pick up all the significant facts.

What is "f1"?
3,4,13 generates "1 2 OK" not "1 3 OK" so would attempt to select channel 12, not 13 as described.

It would be useful to know what you are doing and why i.e. what keys you are pressing and for how long, what you expect to happen, what does happen etc.
And forget describing anything that happens with anything apart from the standard RM-F04 remote (not the RM-F104 as you called it), as I don't have anything but.

I see some sort of linked list in the C code, pertaining to something called foreign codes, but I have no idea what that actually means. The config item line seems to have to start with a 0x. The linked list code appears to be deficient though. How should this be tested?

And to answer an old question, the size of the ir3.map file is limited to 4096 bytes!
 
Back
Top