Thanks for the help so far. I was able to make the item display the correct state but I just can’t successfully send a command. I’ve reviewed the documentation and the entirety of this post but there must be something I am just not understanding:
I’m not sure what I’m doing wrong but would very much appreciate help from anyone knowledgeable with the HTTP binding. If I need to add extra information to help others help me I am happy to do that - just let me know.
This is how the channel is configured currently:
UID: http:url:actron
label: HTTP Actron Webserver
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
headers:
- Accept=application/json
baseURL: http://actron.ninja.is
password: xxx
refresh: 10
commandMethod: PUT
contentType: application/json
timeout: 3000
username: xxx
channels:
- id: power
channelTypeUID: http:switch
label: Power
description: ""
configuration:
onValue: "true"
commandTransformation: JSONPATH:$.data.last_data.DA.amOn
offValue: "false"
stateExtension: /rest/v0/device/xxxx?user_access_token=yyyy
commandExtension: /rest/v0/device/xxxx?user_access_token=yyyy
stateTransformation: JSONPATH:$.data.last_data.DA.amOn
And this is the error in the log when I flick the switch:
23:17:03.919 [WARN ] [l.transform.SingleValueTransformation] - Executing transformation ChannelStateTransformation{pattern='$.data.last_data.DA.amOn', serviceName='JSONPATH'} failed: Invalid path '$.data.last_data.DA.amOn' in 'false'
The thing is if I change the onValue or offValue the Item goes into UNDEF.
With regards to the way the item is set up it’s just a switch with no profile currently, but I’ve tried lots of various combinations so there’s not much point in posting it - i’m just down to trying random stuff now hoping to see some different behaviour.