Well first of all you need to famerliarize yourself with how the API works and create a user:
You also need to familiarize yourself with the individual commands for Lights and Groups and also how to query the API for current color and brightness you’ve selected via a phone app, since you need to send that in the on command in the Lua tab.
After getting your username, you can set up some scenes in the LUA tab with something like this one that turns all lights (group/0) off:
os.execute([[curl -H "Accept: application/json" -X PUT --data '{"on":false}' http://HUB_IP_GOES_HERE/api/USER_NAME_GOES_HERE/groups/0/action/]])
and all lights on (group/0):
os.execute([[curl -H "Accept: application/json" -X PUT --data '{"on":true, "sat":140, "bri":254,"hue":8411}' http://HUB_IP_GOES_HERE/api/USER_NAME_GOES_HERE/groups/0/action/]])
An individual group on (group/2):
os.execute([[curl -H "Accept: application/json" -X PUT --data '{"on":true, "sat":219, "bri":199,"hue":3367}' http://HUB_IP_GOES_HERE/api/USER_NAME_GOES_HERE/groups/2/action/]])
An individual group off (group/2):
os.execute([[curl -H "Accept: application/json" -X PUT --data '{"on":false}' http://HUB_IP_GOES_HERE/api/USER_NAME_GOES_HERE/groups/2/action/]])
An individual light on (light 1):
os.execute([[curl -H "Accept: application/json" -X PUT --data '{"on":true, "sat":140, "bri":254,"hue":8411}' http://HUB_IP_GOES_HERE/api/USER_NAME_GOES_HERE/lights/1/state/]])
If you get stuck I can give more examples or help.
Since doing this, I’ve now tied this to some scene controller buttons as a trigger, and depending on the type used… essentially whether it supports a scene being turned on and off from the same button, or whether the scene controller has only an on command, then in the latter case it takes 3 scenes and a virtual switch to make it work like a normal zwave light being toggled on and off.
Despite the convoluted logic of 3 scenes (one to toggle the virtual switch state upon button press) and then two more to fire off the respective on and off commands (triggered by the state of the Virtual switch, it still works near instantaneously and I’m very happy with it.
Anyway, in general using os.execute like this is a bit frowned upon, since if the Hue Hub doesn’t respond, it will hang up your Vera for a little while and potentially cause your Vera luup engine to restart.