Inhibit suspend while Chrome is active, suspend via HID device bluetooth Harmony Hub

  • I'm looking for ways to more completely control my Intel based LibreELEC PC. Ideally I want to use my harmony hub companion remote to initiate suspend when the off button is pressed. I've been searching around the internet and I haven't found much information about suspending LibreELEC via HID device. This is probably easier to accomplish with an IR remote or a remote with a dedicated sleep button. If anyone has gone down this particular rabbit hole, I'm interested in knowing what you found.

    Mainly, LibreELEC works great for me. My only real issue stems from the fact that Kodi will trigger idle functions while I have Chrome active. I read the wiki and I see there's a script to inhibit Kodi's idle functions while SSH, NFS, or Samba connections are active. Is there a way to modify the script to monitor for active Chrome instances to similarly inhibit idle functions? I've copied the script from the wiki. Unfortunately, I have no experience scripting to know where to begin. Can anyone offer advice?

  • Untested:

  • Thank you very much. That seems to work for inhibiting idle shutdown.

    For anyone's future reference, this does not inhibit idle display sleep in System Settings --> Power Saving. I don't see a similar function for inhibiting display sleep in the Kodi functions wiki, so I disabled this setting in LibreELEC.