Hi,
currently I’m migrating OH 2.5 to 3.0.
Most of the things work fine, but I’m in trouble with the new HTTP-Binding.
I’m trying to connect to an ETH008, which is accessed via http://xxx.xxx.xxx.xxx/io.cgi
The call returns something like relays 10000000 representing of each relay.
I’m trying to transfer the state with the following transformation:
REGEX:relays (\d)\d*∩MAP:binarySwitch.map
(The first transfarmation extracts the right number, the second maps it to on or off)
This works fine for a string, but not for a switch. Here I got UNDEF…
This is my configuration:
UID: http:url:b8943d8d7e
label: WRL02
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://xxx.xxx.xxx.xxx/io.cgi
password: "ImAPassword"
refresh: 1
commandMethod: POST
timeout: 3000
bufferSize: 2048
username: admin
location: Arbeiten
channels:
- id: WRL02_RelaysInfo
channelTypeUID: http:string
label: RelaysInfo
description: ""
configuration:
mode: READONLY
- id: WRL02_StateRelay1
channelTypeUID: http:string
label: StateRelay1
description: ""
configuration:
mode: READONLY
stateTransformation: REGEX:relays (\d)\d*∩MAP:binarySwitch.map
- id: WRL02_RL02_CMD
channelTypeUID: http:switch
label: WRL02_RL02_CMD
description: ""
configuration:
mode: READONLY
stateTransformation: REGEX:relays (\d)\d*∩MAP:binarySwitch.map
Hope someone could help