Send signal to OS/socket when Play/Pause

  • Hey libreelec folks,
    I have a Libreelec instance on a RPi running.


    The RPi has the possibility to switch on/off 433MHz remote power plug switches.
    I have the very cool idea to switch on/off a lamp, when I pause/play Kodi.


    Therefore Kodi had to communicate with another script running on the RPi in Libreelec.


    My Question: Is it possible that Kodi send signals to the OS on certain actions?
    If yes: What would be the best way to implement this? Maybe over an Addon?


    Any suggestions are very welcome, thank you.

    Edited once, last by menace_one ().

  • these two links are exactly what I'm looking for, thank you very much.


    For using the GPIO ports you need root privileges, kodi isn't running as root or not?


    So I need a extra service as root and have to communicate via kodi_Callback with this service.