RUT241 : RUT2M_R_00.07.22 set DOUT1 time attribute.
Hi I am trying to implement the new API features upgrading from the old http get/post where I pulse dout1 for short period with a single call. This feature I believe hasv been availbale since 7.18
before coding it - I am trying to test it.
to get the status this works ok:
curl -k -u “admin:password” https://192.168.1.1:8443/api/io/dout1
BUt reading api doc, I can’t work out the syntax how to set dout1 and include time:value?
any assistance appreciated
Greetings,
If you are testing using the Windows Command Prompt, the request should look like this:
curl -k -u "admin:password" -X POST "https://192.168.1.1:8433/api/io/dout1/actions/change_state" ^
-H "Content-Type: application/json" ^
-d "{\"data\": {\"value\": \"1\", \"time\": \"5000\"}}"
On other terminals, you will need to use a different line-continuation character instead of “^”
The time value is specified in milliseconds, so the state is set to high and then reverts after 5 seconds.
Best Regards,
Justinas