I'm afraid this patch breaks my on/off logic
I'm using a Logitech Harmony remote which automatically switches my devices on or off depending on the activity I choose.
Unfortunately on most Enigma2 remotes there is only a power toggle button. This is not reliable because the Harmony does not really know if the device is already on or off.
With Dreamboxes this was not a problem because there were discrete IR codes available for "Power On" and "Power Off".
When I switched to other vendors like VU+ or Xtrend I always had the problem that there are no such discrete codes.
So I searched for a reliable solution and found one in the hotkey functionality.
Most remotes have keys that are not used in any way (F1/F2/F3 for Xtrend or Home/End for VU+).
In hotkey I defined the "End" key to put the box to standby for example.
When I want to switch off the box I send the sequence "Exit -> Exit -> Exit -> End".
The three times "Exit" is just to make sure there is no menu open which would prevent the box from going to standby.
When I want to switch on the box I send the sequence "Exit -> Exit -> Exit -> Help -> PowerToggle -> Exit".
If the box is off it would switch on. All other keys except PowerToggle are ignored.
If the box is already on this would open the Help menu and then send PowerToggle. Because of the open Help menu PowerToggle is ignored.
I know this is a very complicated way to achieve a simple thing but it works and is reliable.
Changing the file /usr/share/enigma2/keymap.xml accordingly works great but it gets overwritten when I update the box.
<map context="GlobalActions">
<key id="KEY_VOLUMEUP" mapto="volumeUp" flags="mr"/>
<key id="KEY_VOLUMEDOWN" mapto="volumeDown" flags="mr"/>
<key id="KEY_MUTE" mapto="volumeMute" flags="mr"/>
<key id="KEY_POWER" mapto="power_long" flags="l"/>
<key id="KEY_POWER" mapto="power_down" flags="m"/>
<key id="KEY_POWER" mapto="power_up" flags="b"/>
<key id="KEY_KP0" mapto="discrete_off" flags="m"/>
<device name="dreambox front panel">
<key id="KEY_POWER" mapto="deepstandby" flags="l"/>
</device>
</map>
<map context="StandbyActions">
<key id="KEY_POWER" mapto="power" flags="m"/>
<key id="KEY_KP1" mapto="discrete_on" flags="m"/>
</map>
Is it possible to add two additional power events to hotkey for "discrete on" and "discrete off" to override the ones in keymap.xml?
This really would safe me a lot of hassle.