[dss-developer] REST-API - Set user defined states

Christian Stüllein | SSE christian.stuellein at sse-engineering.de
Tue Mar 10 19:38:32 CET 2020


Hi,


I have a question according the user defined states. As stated in the
JSON API document it should be possible to set a user defined state (if
that state is not linked to physical outputs or defined by other
states). If I understand this correctly, I can only set the state
"active" or "inactive" using this two strings as value. Is this correct?


I tried this with the state "Kind_zuhause" within the testserver
(https://testrack2.aizo.com:50443) but I get an error, that the given
state is not found.


My requests is:
https://testrack2.aizo.com:58080/json/state/set?addon=system−addon−user−defined−states&name=1494253299&value=inactive&token=55d6d57898cc9fa127f3eeddd751c78f4fc3294f5c549d758488093ec7c02aa6

The Respose is: {"ok":false,"message":"State not found name:1494253299
model/apartment.cpp:912 httpPath:/json/state/set"}


I wonder what's wrong. If I debug the User-Defined-States App in the
webbrowser it seems to work. This app is sending:

https://testrack2.aizo.com:50443/json/state/set?addon=system-addon-user-defined-states&name=1494253299&value=inactive&a=0.40391334838893855&


I also tried to add the a=0.40391334838893855 part (what ever this is)
but without success.


I hope one of you has an idea were my error is.


best regards, Christian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://forum.digitalstrom.org/pipermail/dss-developer/attachments/20200310/6507bd9f/attachment.pgp>


More information about the dss-developer mailing list