Hi there,
I guess I am doing something wrong. I linked the HTTP binding to an API that can control my roller shutter. It does work, the roller shutter moves, no errors on that bridge. But I have a warning in the logs, that is bugging me (and sends me telegraf-messages)…
22:33:25.844 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'WCRollladen_Steuerung' received command STOP
22:33:25.848 [TRACE] [inding.http.internal.HttpThingHandler] - Sending to 'http://172.16.10.11/api/devices/145/action/stop': Method = {POST}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.20.v20190813, Content-Type: application/json}, Content = {stop}
22:33:25.901 [TRACE] [tp.internal.http.HttpResponseListener] - Received from 'http://172.16.10.11/api/devices/145/action/stop': Code = {202}, Headers = {Server: nginx/1.8.0, Date: Sat, 27 Feb 2021 22:04:13 GMT, Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Connection: keep-alive, Cache-Control: no-cache, no-store}, Content = {{"id":0,"jsonrpc":"2.0","result":{"result":0}}}
22:33:25.902 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting 'http://172.16.10.11/api/devices/145/action/stop' (method='POST', content='org.eclipse.jetty.client.util.StringContentProvider@44c72449') failed: 202 Accepted
22
That last line … it seems as if code 202, although that means “accepted” brings the session to a failed state
UID: http:url:HomeCenterLight
label: HomeCenterLight via REST-API
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://172.16.10.11/api/devices
password: ****
refresh: 1200
commandMethod: POST
contentType: application/json
timeout: 3000
username: ****
bufferSize: 2048
channels:
- id: 145_Steuerung
channelTypeUID: http:rollershutter
label: Steuerung
description: null
configuration:
mode: READWRITE
commandExtension: /145/action/%2$s
stateTransformation: JSONPATH:$.[?(@.id==145)].properties.value
downValue: close
stopValue: stop
upValue: open
Any ideas what I am doing wrong?
Thanks!
PhiL
Update: I am using OH3.0.1