Turn on a relay, previously configured, if Kodi starts to play a multimedia file.
It has care about not to check the relay status every time that something is playing.
Example (only an idea):
When start the device -> set the assigned relay state OFF, and save that state.
When the relay turns on -> set the assigned relay state ON, and save that state.
When the device starts to play -> check the 'relay status variable' and turn on the relay if wasn't already ON and save the state.
You can use this variables to control when is Kodi playing.
Turn on a relay, previously configured, if Kodi starts to play a multimedia file.
It has care about not to check the relay status every time that something is playing.
Example (only an idea):
When start the device -> set the assigned relay state OFF, and save that state.
When the relay turns on -> set the assigned relay state ON, and save that state.
When the device starts to play -> check the 'relay status variable' and turn on the relay if wasn't already ON and save the state.
You can use this variables to control when is Kodi playing.