<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi. I found the problem.</p>
<p>The String "system−addon−user−defined−states" (copied from the
dss-json.pdf) contains "false" '−' characters. With the standard
minus '-' everything works as expected.</p>
<p><br>
</p>
<p>I wish everyone a nice weekend and stay healthy!<br>
</p>
<pre class="moz-signature" cols="72">
Mit freundlichen Grüßen
______________________________________________________________
Christian Stüllein
SSE - Stüllein Software Engineering
Friedrich-Hartung-Str. 16
64560 Riedstadt
Mobil: +49 (0)170 / 294 61 67
Tel: +49 (0)6158 / 828 7707
Fax: +49 (0)6158 / 828 7708
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:christian.stuellein@sse-engineering.de">christian.stuellein@sse-engineering.de</a>
Web: <a class="moz-txt-link-abbreviated" href="http://www.sse-engineering.de">www.sse-engineering.de</a></pre>
<div class="moz-cite-prefix">Am 3/10/2020 um 7:38 PM schrieb
Christian Stüllein | SSE:<br>
</div>
<blockquote type="cite"
cite="mid:1031848a-11e3-09c4-832c-08614eda18b0@sse-engineering.de">
<pre class="moz-quote-pre" wrap="">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
(<a class="moz-txt-link-freetext" href="https://testrack2.aizo.com:50443">https://testrack2.aizo.com:50443</a>) but I get an error, that the given
state is not found.
My requests is:
<a class="moz-txt-link-freetext" href="https://testrack2.aizo.com:58080/json/state/set?addon=system−addon−user−defined−states&name=1494253299&value=inactive&token=55d6d57898cc9fa127f3eeddd751c78f4fc3294f5c549d758488093ec7c02aa6">https://testrack2.aizo.com:58080/json/state/set?addon=system−addon−user−defined−states&name=1494253299&value=inactive&token=55d6d57898cc9fa127f3eeddd751c78f4fc3294f5c549d758488093ec7c02aa6</a>
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:
<a class="moz-txt-link-freetext" href="https://testrack2.aizo.com:50443/json/state/set?addon=system-addon-user-defined-states&name=1494253299&value=inactive&a=0.40391334838893855&">https://testrack2.aizo.com:50443/json/state/set?addon=system-addon-user-defined-states&name=1494253299&value=inactive&a=0.40391334838893855&</a>
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
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
dss-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dss-developer@forum.digitalstrom.org">dss-developer@forum.digitalstrom.org</a>
<a class="moz-txt-link-freetext" href="http://forum.digitalstrom.org/cgi-bin/mailman/listinfo/dss-developer">http://forum.digitalstrom.org/cgi-bin/mailman/listinfo/dss-developer</a>
</pre>
</blockquote>
</body>
</html>