Hello,
i’m using http binding for control my power strips. here are a config example which i’m using:
UID: http:url:PowerStrip3
label: PowerStrip3
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://192.168.0.3/?cmd=511
delay: 0
stateMethod: GET
refresh: 5
commandMethod: GET
timeout: 3000
bufferSize: 2048
channels:
- id: PowerStrip_3_Socket_1_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_1_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[0]
- id: PowerStrip_3_Socket_2_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_2_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[1]
- id: PowerStrip_3_Socket_3_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_3_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[2]
- id: PowerStrip_3_Socket_4_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_4_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[3]
- id: PowerStrip_3_Socket_5_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_5_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[4]
- id: PowerStrip_3_Socket_6_Status
channelTypeUID: http:number
label: PowerStrip_3_Socket_6_Status
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.switch[5]
- id: PowerStrip_3_Socket_1_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_1_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[0]
- id: PowerStrip_3_Socket_2_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_2_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[1]
- id: PowerStrip_3_Socket_3_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_3_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[2]
- id: PowerStrip_3_Socket_4_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_4_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[4]
- id: PowerStrip_3_Socket_5_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_5_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[4]
- id: PowerStrip_3_Socket_6_Watt_Org
channelTypeUID: http:number
label: PowerStrip_3_Socket_6_Watt_Org
description: null
configuration:
mode: READONLY
stateTransformation: JSONPATH:$.data.watt[5]
Sometimes this powerstrip don’t react on requests and it will showing up an error in openhab logs like this:
2023-10-03 19:25:16.133 [WARN ] [p.internal.http.HttpResponseListener] - Requesting ‘http://192.168.0.3/?cmd=511’ (method=‘GET’, content=‘null’) failed: java.util.concurrent.TimeoutException: Total timeout 3000 ms elapsed
Is there an option to handle this timeout? I want to use the the request result as an item