Hello,
as there is a problematic standby functionality on Homatics/Dune boxes Running CoreELEC, I was thinking about a workaround for this feature to
- use short script that would check if kodi is up/down, then either stop/start it
- map execution of this script on specific key on Homatics BT remote
This should reduce CPU temperature when Kodi is up and not being used (e.g. during nights), but should keep CorELEC up und running for whatever purposes (TV Headend server, socks proxy or other services that you want keep running).
- This is simple standby.sh script that solves 1st step:
#!/bin/sh
run=$(ps -ef | grep -v grep | grep kodi.bin | wc -l)
if [[ $run == "0" ]]; then
systemctl start kodi
else
systemctl stop kodi
fi
- I could catch BT code for the power off button on B25 remote:
Testing ... (interrupt to exit)
Event: time 1700334739.583423, type 4 (EV_MSC), code 4 (MSC_SCAN), value c0030
Then I mapped it to f7 function in homatics.hwdb:
KEYBOARD_KEY_c0030=f7 #standby
and added this function into gen.xml into global section of BT remote controller
<keymap>
<global>
<keyboard>
<f7>System.Exec(/storage/.config/standby.sh)</f7>
</keyboard>
</global>
Now I can stop kodi using power off button on Homatics remote, that will shut down kodi and TV via hdmi-cec.
And here comes the problem and my question. Since Kodi is down, I am not able to start it anymore by pressing BT remote as it no longer catches any signal from its BT remote. I can of course run the script manually, but that’s not intention.
Is there a way how to launch standby.sh/any script using the remote controller different way than I originally intended?