Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Execute python on Play,Stop,ffw,...
#1
I build a small chest with with Raspberry, amplifer with speakers and LEDs. If I use a remote control or a GPIO-button to start PLAY or any other command so I can start a python-script additionally - so my LEDs blink or are enlightened in a special way to the command. 
But if I use just the website this is not possible to add any additional command.  Where or in which file could I enable or add the commands?
Reply
#2
Do you just want to trap play/pause/next/previous?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
play/pause/next/previous/stop and vol up/down

example 

http://landing.a-chor.de/2020-04-22_15_43_36.gif

http://landing.a-chor.de/2020-04-22_16_03_14.gif
Reply
#4
For play/pause/next/previous/stop
/var/www/command/index.php

For volume
/var/www/command/moode.php

Note that the UI only sends the new volume level to the back-end. It does not also send the UI event the changed the volume for example +/- or tap the volume slider.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
got the command, but I don't know how to integrate......

echo(exec('python /home/pi/stop.py 2>&1'));
echo(exec('python /home/pi/play.py 2>&1'));
Reply


Forum Jump: