Jump to content


Photo

Power settings


  • Please log in to reply
40 replies to this topic

#1 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 16 May 2016 - 07:02

The power-settings (functionality for short and long power) are in a settings menu.

However: there is also an option for power settings under 'Hotkey'.

Since the latter is meant for all buttons (in Infobar) it seems logical to have the power settings only there. And besides: having the same setting on two places can introduces mistakes/misunderstandings.

And best of all: two settings less without decreasing functionality, which is after all the holy grail.



Re: Power settings #2 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 16 May 2016 - 09:44

Hotkey intends to overrule the settings in the configs when you are at infobar level...

 

The power button also functions when you're in a menu...

 

Confusing it is... but to make it clean and general it is not a that easy patch... (you need to 'transfer' the hotkey functionality to everywhere the power button is used)...

 

And basically it was not planned to add the powerkey to the hotkey at all... that was more a user request...

 

But you have a point to think off... ;)


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #3 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 16 May 2016 - 09:55

In mytest.py you need to change the configs and arrange that Hotkey is called....


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #4 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 16 May 2016 - 12:00

FYI

 

https://github.com/O...22412443a243ae5


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #5 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 16 May 2016 - 13:46

Thanks: much better IMHO (will see the actual result after the next build).



Re: Power settings #6 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 17 May 2016 - 12:41

Much better indeed!



Re: Power settings #7 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 17 May 2016 - 15:07

But as you an see not an easy fix...

 

And in between I also removed a bug which was there for ever.... The let's say long key detection break ignore did not work at all.... ;)


Edited by littlesat, 17 May 2016 - 15:07.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #8 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 17 May 2016 - 17:28

But as you an see not an easy fix...

Nobody says you have an easy job, or should have one  :)



Re: Power settings #9 ColinB

  • Senior Member
  • 743 posts

+28
Good

Posted 18 May 2016 - 09:50

 

But as you an see not an easy fix...

Nobody says you have an easy job, or should have one  :)

 

:)


Xtrend et8000 7.1-Release

2 x 8/1 DiSEqC  30w 13e 19e 23e 28e   

Astrometa USB Tuner Working DVB-T2 now on Kernel 4.10+  ;)

WD10EARX 1TB

Sandisk 32GB USB for AFB, EPG, Picons & Timeshift

 

ZGemma Star S 7.0-Release

4/1 DiSEqC  30w 13e 19e 28e

Sandisk 8GB USB for AFB, EPG, Picons & Timeshift

 

LG 49UH610V UHD-HDR

UHF/Cable/Sat

 

E-Channelizer

 

 

 


Re: Power settings #10 socks

  • Senior Member
  • 54 posts

+3
Neutral

Posted 18 May 2016 - 23:09

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.



Re: Power settings #11 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 19 May 2016 - 03:49

Very interesting solution!

Just to be sure: you found "discrete_on" to be working reliable on VU's & Xtrends?


Edited by Rob van der Does, 19 May 2016 - 03:50.


Re: Power settings #12 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 19 May 2016 - 07:00

The hotkey manipulates the toggle on off and does not effect the discrete on and discrete off... I do not think we should add the discretes to hotkey..

Just a recommendation. I also use harmony and I switch only off thr tv and send the standby command to my e2 box via hdmi-cec.... And to turn on the tv I turn on the e2 box which turns on the tv...

Edited by littlesat, 19 May 2016 - 07:04.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #13 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 19 May 2016 - 07:16

HDMI-CEC is not reliable, especially not in an advanced setup. Discrete power commands is the way to go.



Re: Power settings #14 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 19 May 2016 - 07:24

@Socks: 'home' & 'end' are being used by VU to jump to a previous/next marker during playback.



Re: Power settings #15 Rob van der Does

  • Senior Member
  • 7,766 posts

+184
Excellent

Posted 19 May 2016 - 07:35

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".

You could also switch the box on via 'End'--> 'Powertoggle'.

'End' as discrete power-off makes sure the box is off, whether it was on or off, and the powertoggle wakes the box as normal.



Re: Power settings #16 WanWizard

  • PLi® Core member
  • 69,937 posts

+1,788
Excellent

Posted 19 May 2016 - 10:03

HDMI-CEC is not reliable, especially not in an advanced setup. Discrete power commands is the way to go.

 

+1.

 

I have resorted to a script that manipulates the keymap after updates, to get the discretes back. I would prefer a more permanent solution.

 

Besides that, there are plenty of situations where you would want the box to go to standby, but not the TV, for example if you want to switch from STB to DVD (or another video source).


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Power settings #17 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 19 May 2016 - 10:07

I just checked the code...

 

discrete_off was never touched by the patch... The same for descrete_on. In addition in the past they were also not configurable at all... So here there should be no changes at all.... As they are untouched... also by hotkey... they should stil respond as before...

 

Only the toggleON/OFF is touched.... 

 

 


HDMI-CEC is not reliable, especially not in an advanced setup. Discrete power commands is the way to go.

 

 

I'm using it without any issues with my LG TV and a surround set in between... There was on tiny think I recently fixed (or better worked-a-round)

 

And it is hard to find the setting in the Harmony to arrange your box to switch ON and the TV to switch OFF...

 

And note only the DMM drivers know the discrete_on/off commands.... And DMM we do not support actively....
 


Edited by littlesat, 19 May 2016 - 10:13.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #18 WanWizard

  • PLi® Core member
  • 69,937 posts

+1,788
Excellent

Posted 19 May 2016 - 10:10

The problem with the discrete codes is that you have to modify the keymap, and that gets overwritten with every setup, so a more permanent solution is needed.

 

It was implemented a long time ago for the DM8000, but not for others...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: Power settings #19 littlesat

  • PLi® Core member
  • 56,970 posts

+697
Excellent

Posted 19 May 2016 - 10:25

What does he actually want with the discrete codes... They are untouched so OFF is OFF and ON is ON.... and actually there exist no button at all...


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Power settings #20 WanWizard

  • PLi® Core member
  • 69,937 posts

+1,788
Excellent

Posted 19 May 2016 - 10:35

See post #10. You want to avoid having to send crazy key sequences to have a reliable on or off, you just want to send "on" or "off".

 

But if there are no discrete on and off keys in the keymap, and they can't be mapped to a key using the hotkey. If the discrete functions are in the hotkey list, it can be worked around using not-used keys, like "F1" => "discrete_on", "F2" => "discrete_off". But not every remote has two spare keys...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.



4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users