writing to user varianble
Posted: Monday 21 October 2019 9:08
I have some bash scripts which are time-triggered to launch some scenes on Hue or Nanoleaf via their API's
example script:
The trigger for the script is: script:///home/pi/domoticz/scripts/bash/nanoscene.sh "scene 1", where "scene 1" is the name of the scene in the Nanoleaf. By changing the name in the API call I can call different scenes.
This is working perfectly, but I would also like to write the name of the scene to a user variable, so I can use this in another scripting to see which scene is running. How can I do this?
example script:
Code: Select all
#!/bin/bash
curl -v -X PUT \
--url http://192.168.X.xx:16021/api/v1/***apikey***/effects/\
--header 'content-type: application/json' \
--data '{"select":"'"$1"'"}';
This is working perfectly, but I would also like to write the name of the scene to a user variable, so I can use this in another scripting to see which scene is running. How can I do this?