You are not logged in.

Dear visitor, welcome to Dreamboard. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, July 25th 2011, 10:24pm

help with standby

hello
i'd like to execute a command when enigma2 goes to standby, and another when it leave the standby mode:
any suggestions?
i thinked about verify the powestate: i found a way using the webinterface but looks not so good (is there a file that contains the running powerstate?)
or to edit something and add that command before or after the stanby "command" (which file shoud contains that)?

thanks to all

2

Tuesday, July 26th 2011, 10:34am

You can monitor the config- variable config.misc.standbyCounter that is set as soon as the box is sent to standby. I did it like this in KiddyTimer- Plugin (you can find the sourcecode here:

To attach yourself to the Standby- Event you do something like this:

Source code

1
config.misc.standbyCounter.addNotifier(self.enterStandby, initial_call = False)


And then in the function enterStandby you can monitor, when it comes back by using the Standby- class:

Source code

1
2
3
from Screens import Standby
def enterStandby(self,configElement):
    Standby.inStandby.onClose.append(self.endStandby)


HTH
Tode

3

Tuesday, July 26th 2011, 8:23pm

many thanks for the reply
but unlucky i cannot "speak" py :( but many thanks the same for the suggestions, i have already downloaded the source and i'll try to understand something: but at this moment look as china language for me

there is not any file that stores the standby or working state (or system variable, so i can access to it with a simple sh script)? verify that values (if it is present) every xxx seconds is enough for me
thanks again
regards

4

Sunday, July 31st 2011, 5:06pm

...If you just want to find out the power state you could use this "dirty trick"... ;)

Issue the following command:

cat /proc/stb/avs/0/input

In Standby the result will be: aux

In Power On mode you get: encoder

...hope this helps... ;)

5

Thursday, August 4th 2011, 11:15pm

was exactly what's i'm looking for
thanks!