I have a device that turns a switch on opening this URL in a browser :
http://schakelaar8x1.andege.local/FF0101 (and closing with http://schakelaar8x1.andege.local/FF0100).
In OH2.5.1 this is the http.items file :
Switch SchakelaarBuiten "Schakelaar Buiten" { http=">[OFF:POST:http://schakelaar8x1.andege.local/FF0100] >[ON:POST:http://schakelaar8x1.andege.local/FF0101]" }
and works fine.
IN OH3.1.0 this is the code for the thing :
UID: http:url:381c2339be
label: Schakelaar Buiten
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://schakelaar8x1.andege.local
delay: 0
stateMethod: POST
refresh: 30
commandMethod: POST
contentType: text/plain
timeout: 3000
bufferSize: 2048
channels:
- id: Schakelaar8x1Buiten
channelTypeUID: http:switch
label: Schakelaar8x1 Buiten
description: ""
configuration:
onValue: FF0101
offValue: FF0100
In the (tcpdump)capture, I see this :
Hypertext Transfer Protocol
POST / HTTP/1.1\r\n
Accept-Encoding: gzip\r\n
User-Agent: Jetty/9.4.40.v20210413\r\n
Content-Type: text/html\r\n
Host: schakelaar8x1.andege.local\r\n
Content-Length: 6\r\n
\r\n
[Full request URI: http://schakelaar8x1.andege.local/]
[HTTP request 1/1]
[Response in frame: 45]
File Data: 6 bytes
Line-based text data: text/html (1 lines)
FF0101
What I am doing wrong (or is the URI wrongly concatenated), as it does not work with the OH3 http binding ?