2018-03-06, 09:49
Hello,
I need some help with creating a smart script for put the HTPC into sleep mode.
The problem: There is an x86 PC with latest Libreelec controlled by an unbranded MCE IR remote. The default action at pushing power button on remote is sleep mode.
The HTPC goes to sleep mode and wakes up very fast when the power button is pressed. It is so fast that after wake up it still receives the signal form the remote and the system goes to sleep again. It is because the remote sends multiple IR pulses.
As a solution I would like to replace the xbmc shutdown action assigned to power button with a script which checks if the box was just woken up and prevents immediate sleep loop. This is where I need help
- Is there a smart way to find out programatically if the box just woke up?
- I could use the sleep.d script option which runs after wake up. What is the most simple way to share information between two scripts? (Set a flag by sleep.d script and check by the shutdown script)
I need some help with creating a smart script for put the HTPC into sleep mode.
The problem: There is an x86 PC with latest Libreelec controlled by an unbranded MCE IR remote. The default action at pushing power button on remote is sleep mode.
The HTPC goes to sleep mode and wakes up very fast when the power button is pressed. It is so fast that after wake up it still receives the signal form the remote and the system goes to sleep again. It is because the remote sends multiple IR pulses.
As a solution I would like to replace the xbmc shutdown action assigned to power button with a script which checks if the box was just woken up and prevents immediate sleep loop. This is where I need help
- Is there a smart way to find out programatically if the box just woke up?
- I could use the sleep.d script option which runs after wake up. What is the most simple way to share information between two scripts? (Set a flag by sleep.d script and check by the shutdown script)