I have successfully install Lightshow pi on Raspberry pi 3 and through ssh using below command I can run the music successfully :
sudo python /home/pi/lightshowpi/py/synchronized_lights.py -file=/home/pi/lightshowpi/music/sample/closer.mp3
But I want the music should start from browser for that I have used php to execute the SSH command like below :
exec("sudo python /home/pi/lightshowpi/py/synchronized_lights.py --file=/home/pi/lightshowpi/music/sample/closer.mp3");
I am getting below error :
Need to setup SYNCHRONIZED_LIGHTS_HOME environment variable, see readme.
What I have missed during installation or any changes I have to make in the code to run it from browser?
I have managed to start the music using below code :
putenv was the function to set the environment variable in PHP for lightshowpi