Hi
Having just upgraded my Bedroom music player, I’m trying to duplicate some of the functionality that I had previously.
I have written a script (really simple) which is a series of curl commands to the REST API of the player
Essentially:
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=9”
curl “192.168.70.52/api/v1/commands/?cmd=play”
sleep 600
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=12”
sleep 900
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=15”
sleep 1800
curl “192.168.70.52/api/v1/commands/?cmd=stop”
root@MiOS_50103066:/# cat BedroomWakeup
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=9”
curl “192.168.70.52/api/v1/commands/?cmd=play”
sleep 600
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=12”
sleep 900
curl “192.168.70.52/api/v1/commands/?cmd=volume&volume=15”
sleep 1800
curl “192.168.70.52/api/v1/commands/?cmd=stop”
(Yeah, I know script is perhaps overstating the case)
Anyway, executing this from the Vera CLI works every time.
Creating a scene in Vera that runs this script by:
os.execute (“/BedroomWakeup”)
Also works
Once.
If I try to run it again, no dice. Vera reports scen failed. Lua log has the
JobHandler_LuaUPnP::Run scene 26 Weekend_Alarm room 3 <0x77691320>
But not the
Scene::RunScene running 26 Weekend_Alarm <0x72f39520>
My guess is that Vera is not liking the long sleep periods. Is this likely / sensible. Is there anything I can do about it?
os.execute (“/BedroomWakeup&”) for example
TIA
C