Hello everyone,
I am trying to read data with the HTTP binding
e.g. in case everything is ok I get
{
“status": ‘starting up’,
“timestamp": ”2025-04-23T07:42:14.629570+02:00”
}
and in case of an error
{
“error": ‘Request timed out - trying again with next run’,
“timestamp": ”2025-04-23T08:42:14.629570+02:00”
}
This means there are sometimes status sometimes error in the JSON data.
How can I handle this, is there a mechanism for this in the binding?
Below is my configuration
UID: http:url:eosConnectRespone
label: EOS Connect Respone HTTP
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://192.168.10.40:8081/json/optimize_response.json
delay: 0
stateMethod: GET
refresh: 30
commandMethod: GET
contentType: application/json
timeout: 3000
bufferSize: 2048
channels:
- id: last-failure
channelTypeUID: http:request-date-time
label: Last Failure
configuration: {}
- id: last-success
channelTypeUID: http:request-date-time
label: Last Success
configuration: {}
- id: error
channelTypeUID: http:string
label: Error
configuration:
mode: READONLY
stateTransformation:
- JSONPATH:$.error
- id: status
channelTypeUID: http:string
label: Status
configuration:
mode: READONLY
stateTransformation:
- JSONPATH:$.status