Thanks to the developers for this OS! I've been using OE/LE since 2011, and now can finally say I have an endgame system for my family's use case.
83" OLED with HDR, 5.1.4 in-wall/ceiling surround sound, dual DIY subwoofers, all controlled with a simple RF (OSMC) remote through CEC (Pulse-Eight Adapter).
So I did have a few minor issues I still wanted to tackle.
1. For my OSMC remote, on the homepage I have the home button activate the shutdown menu. Is there a way to have this always focus on the "Suspend" option? I tried ActivateWindowAndFocus(shutdownmenu,9000,2,9000,0) but it is not working as expected. I tried reading through the Estuary Skin DialogButtons.xml, but can't figure out which IDs I need where.
2. When my LE system suspends it usually shuts down my Receiver and TV using CEC, but maybe half the time it doesn't. And I think those times, when I wake the system it send the CEC command then. So I am thinking there is a race condition, sometimes LE suspends itself before the CEC adapter can send out the command. Adding a 'sleep 3' to a sleep.d script fixes this issue, but maybe there is a more elegant solution to this problem?
I could do a while loop in the sleep.d script, or maybe LE or Kodi can change suspend logic to wait until CEC jobs are completed?