Open swissboy22 opened 2 years ago
Since version 5.1.19 we support user scripts. The scripts can be executed by SmartButtons events. You will find examples on the scripts webpage. Maybe this will help you.
Thanks for answer.. but where exactly I can find this examples how to do my own scripts and add it as an action to be executed by smartbuttons? Did find nothing in the public normal api section.
Sorry for the "schäbig" explanation!
By the way... as soon as we find time we will document everything on Github
I just had another idea...
Maybe there is another way for your use case.
Call GET api/jobs
. One of these jobs is your scene. You can use GET api/jobs/<id>/run
to find out which one it is.
Now create a systemflag with POST /api/system/flags { "symbol": "lights_off", "value": true, "name":"Lampe us"}
.
If you call now PATCH api/system/flags {"value": false}
and after PATCH api/system/flags {"value": true}
and so on... you can see every time a message on the websocket connection.
Now you can append with PATCH api/jobs/<id> {"flag_values": [{"flag": <id>,"value": true}]}
the systemflag to your job.
You should get a websocket message every time if you run the job and the system flag changes to true.
Use this link to play efficiently with the API 😉
Hello
Thanks very much the Wiser Api ist perfect and very useful. I have please one question. Till now i dont know how to solve..
We have a button with a special scene.. lets say all off and you press before you leave the house
How is it possible to receive the event that this scene or button was pressed? Websocket delivers only information about on of dimm states i dont see one for pressing button.
Thanks very much