Hi Frank,
Just to integrate it into my home automation.
Before I used on my Synology LMS as a server and PiCorePlayer for my 5 Raspeberrys.
Now on my Syno Audio Station and Rune Audio (Audio Station because GoogleMusic will disappear)
The concept:
For the ignition of a Rasp: A wireless switch (Zigbee protocol) sends a signal to the Jeedom server which, through a script, switches "On" a SonOff switch (modified in ESP8266)for power "On" which starts the Rasp Player. (This part works, autoplay activated in Rune Audio)
In Jeedom a virtual state to toggle "On" (To know if the Rasp in On or OFF in the script)
In Jeedom possibility to do Play, Stop, Next, Previous, Shuffle, Volume UP and Volume Down in virtual command
For the extinction the same button (wireless switch)
The script check if the Rasp is On or Off
And here i need to post a shutdown command (Hence my question)
A ping request verifies the extinction of the Rasp
Toggle the virtual state to "Off"
After that the script turns off SonOff to cut the power
Thank's for your interest, If you have any question...
Nop