custom action on CEC TV power on?

  • Hi,

    Pretty new to LibreElec, moved to a Raspberry Pi 5 recently to solve a very specific audio issue and it's working wonderfully.

    On previous hardware/kodi installs the device would power on & off with the TV via CEC.

    From my reading here that's not possible(to power on at least) with the Pi, it needs to remain on? Which is fine, but as I run a shared network database between multiple devices locally - what I'd like to happen is when the tv powers up, to run the ReloadSkin() function so that any database updates & recently added files are reflected, which would usually happen when a deviced boots up along with the TV.

    Does anyone know is such a thing possible?

    Appreciate any info/pointers, before looking to external automation solutions.

    Thanks

  • Adding a power button to your RPi is the easiest solution:

    Foxbiker
    August 16, 2019 at 10:23 PM
  • You will have to create some script yourself listening for power status and running skin refresh...it's possible but you probably won't find anything ready..

    To give you some ideas about how you check for cec power status

    cec-ctl --device 0 -S | grep 'Power Status'

    and to refresh skin

    kodi-send --action="ReloadSkin()"