Habe mal wieder etwas Luft um danach zu schauen. Ich habe also in meinem Thing einen Schalter-Channel erstellt.
Code: Alles auswählen
- id: ETA_HeizKreisOnOff
channelTypeUID: http:switch
label: ETA Heizkreis
description: null
configuration:
onValue: "1803"
offValue: "1802"
stateExtension: 120/10101/0/0/12080
commandExtension: 120/10101/0/0/12080
commandMethod: PUT
stateTransformation: XSLT:eta_numeric.xsl
Nun wäre ich bei Type Siwtch, Commandextension und onValue offValue als gegebene Werte davon ausgegangen, dass das direkt läuft, aber das scheint nicht so zu sein.
Hier der Teil aus dem log (Ich versuche von On nach Off zu schalten):
Code: Alles auswählen
2022-07-25 11:32:46.343 [TRACE] [.HttpDynamicStateDescriptionProvider] - returning new stateDescription for http:url:ETA_PC25:ETA_HeizKreisOnOff
2022-07-25 11:32:46.349 [TRACE] [nding.http.internal.HttpThingHandler] - Sending to 'http://192.168.178.148:8080/user/var/120/10101/0/0/12080': Method = {GET}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.43.v20210629}, Content = {null}
2022-07-25 11:32:46.358 [TRACE] [p.internal.http.HttpResponseListener] - Received from 'http://192.168.178.148:8080/user/var/120/10101/0/0/12080': Code = {200}, Headers = {Date: Mon, 25 Jul 2022 11:33:42 GMT, Connection: keep-alive, Content-Type: application/xml, Cache-Control: no-cache, Content-Length: 234}, Content = {<?xml version="1.0" encoding="utf-8"?>
<eta version="1.0" xmlns="http://www.eta.co.at/rest/v1">
<value advTextOffset="1802" unit="" uri="/user/var/120/10101/0/0/12080" strValue="Ein" scaleFactor="1" decPlaces="0">1803</value>
</eta>
}
Das spricht die Dokumentation der API dazu:
Code: Alles auswählen
4.2 HTTP POST
Using HTTP POST you can set a variable to a certain value. Note, that you have to
provide the the variable’s raw value (without scaling)! If a variable with time interval
datatype should be set, value, begin and end parameters must be provided. The begin
and end time are integral multiples of 15 minutes since midnight. This implies a valid
range of [0, 96] for begin and end.
Note: The feature of setting the time slots requires an API version of 1.1 or
higher (available since system software version 1.25.0/2.25.0 or higher).
Attribute Description
uri This is the requested URI.
strValue The variable’s value as formatted string.
unit The variable’s unit as string.
decPlaces The number of decimal places.
scaleFactor The scale factor for processing the raw value.
advTextOffset The offset of text variables. If you read a text variable (e.g.
the ash removal key) you can subtract this value from the
variable’s raw value in order to get a value from [0, max] for
e.g. boolean evaluations.
Table 1: Description of XML attributes of element <value>.
Example 1 Set the deash key to On.
i
HTTP Request
POST /user/var/112/10021/0/0/12112 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
value=1803
HTTP Response
HTTP/1.1 200 OK
Content-Encoding: utf-8
Content-Type: application/xml
<?xml version="1.0" encoding="utf-8"?>
<eta version="1.0" xmlns="http://www.eta.co.at/rest/v1">
<success uri="/user/var/112/10021/0/0/12112"/>
</eta>
Example 2 Set monday’s time slot 1 of the hot water tank’s charging times to 00:00-
12:00, 40 degrees: i
HTTP Request
POST /user/var/112/10111/12130/0/1082 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
value=400&begin=0&end=48
HTTP Response
HTTP/1.1 200 OK
Content-Encoding: utf-8
Resource Description
/user/vars Get a list of all defined variable sets.
/user/vars/{Varset} Read all variables from the specified variable set
Varset.
Table 2: Description of resources under /user/vars.
Content-Type: application/xml
<?xml version="1.0" encoding="utf-8"?>
<eta version="1.0" xmlns="http://www.eta.co.at/rest/v1">
<success uri="/user/var/112/10111/12130/0/1082"/>
</eta>