JP1 Remotes Forum Index JP1 Remotes

FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

JP1 remote emulator: concept based on RM

Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message

Joined: 24 Oct 2008
Posts: 1187

PostPosted: Wed Jul 22, 2020 2:32 pm    Post subject: JP1 remote emulator: concept based on RM Reply with quote

Some of you may have used the Philips Pronto, an early touchscreen remote. It could be configured with the Windows program ProntoEdit. One of the many nice features was the inclusion of the Pronto Emulator, which created a windows, shaped as the remote, reacting to button presses with the mouse. Assuming that a Pronto remote was connected with a serial cable, pressing a button fired up the associated action in the emulator. In the case this action was the sending of an IR signal, the program sent a command over the serial line to the remote to send the corresponding signal. This way, the remote configuration could be tested and tried (and learned to the user's brain!) without flashing it to the remote's flash memory.

The Pronto has unfortunately been discontinued (2004).
(For more information on the Pronto, see They even have certain versions of ProntoEdit for free download. There is also an open source version, called Tonto. It is used in IrScrutinizer for importing and exporting Pronto (Classic) configuration files.)

We do not have anything similar for JP1. Most importantly, a way to have the remote to send IR-commands is not known to exist. Therefore, we have to use some other IR sender. For this, the library HarcHardware can be used. (It is used in IrScrutinizer for all hardware access.) It supports several different IR hardware senders (for example GlobalCache, Arduino (Girs), IrToy, ...) The supported hardware implements the Java interface, which defines a few functions that implementing classes must implement.

So, somewhat simplified, when a button in the emulator is triggered, we have to compute its IrSignal (org.harctoolbox.ircore.IrSignal). The work to translate the RM executor and its parameters to IRP protocol and corresponding parameters has been done by Graham in the context of "Girr export"; possibly a slight re-organization is necessary to implement something like Function.toIrSignal(). Then this IrSignal object is sent to an IRawIrSender using its sendIR(...) function. Basically, that is it. There is of course locating device, opening, and closing, BUT using the library, the hardware details are encapsulated.

Should not be too much work. The HarcHardware jar must be included; it is presently 267kb. In the first version, just emulate one DeviceUpgrade, and just one brand of hardware (like GlobalCache Flex or Arduino Girs (serial)). In a later version, can do a full multi-device remote (in the sense of RMIR), with device buttons etc, possibly also supporting different hardware.
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Joined: 22 Jul 2008
Posts: 3582
Location: Cambridge, UK

PostPosted: Thu Jul 23, 2020 6:26 am    Post subject: Reply with quote

Barf wrote:
possibly a slight re-organization is necessary to implement something like Function.toIrSignal()

I don't think any re-organization is necessary. For a DeviceUpgrade upgrade and a Function function the steps are essentially

DeviceUpgradeExporter exporter = new DeviceUpgradeExporter( upgrade );
RemoteSet remoteSet = exporter.getRemoteSet();
Remote remote = remoteSet.getRemotes().toArray( new Remote[ 0 ] )[ 0 ];  // there is only one
Map< String, Command > map = remote.getCommands();
Command command = map.get( function.getName() );
IrSignal irSignal = command.toIrSignal();

The first four lines need only be done once in setting the upgrade, the last two generate the IrSignal from the Function.

I am looking forward to this. It seems to me that you will, however, need some sort of API for RMIR to be able to access this code. Let me know what you need me to do, if anything.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Get Smart! the band's official homepage Rockabilly Central