- Platform information:
- Hardware: ARM
- OS: Linux
- Java Runtime Environment: Openjdk Zulu 17.0.9
- openHAB version: 4.0.4
- Issue of the topic: I have been working with Openhab since a while now but still can’t figure out how to connect from the documentation to how I configure it in the UI: As examples in the documentation of bindings they always talk about how it has to look in the demo.things-file, but as it is recommended for OH4 I only configure inside the UI in Settings->Things where I would for example see the channels or get access to the Code in YAML. Why is there no documentation instead of how the demo.things-file should look like but how the Code should look like in YAML? What am I missing here?
My recent example:
To connect to my APSolar inverter I installed the http-binding. The Inverter responds with a GET to http://<inverter’s IP>:8050/getOutputData with
{
"data": {
"p1": 5,
"e1": 0.23740,
"te1": 9.96658,
"p2": 7,
"e2": 0.24420,
"te2": 10.09439
},
"message": "SUCCESS",
"deviceId": "E07000027183"
}
No I tried to setup a Thing like
UID: http:url:0ef228b5b1
label: APSolar GetOutputData
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: <inverter's IP>:8050
delay: 0
stateMethod: GET
refresh: 30
commandMethod: GET
timeout: 3000
bufferSize: 2048
channels:
- id: Solar
channelTypeUID: http:number
label: Number
description: null
configuration:
mode: READONLY
stateExtension: /getOutputData
stateTransformation: JSONPATH:$.data.e1
This was accomplished by copying from a youtube video screen, but I do not get how the documentation like
Thing http:url:foo "Foo" [
baseURL="https://example.com/api/v1/metadata-api/web/metadata",
headers="key1=value1", "key2=value2", "key3=value3",
refresh=15] {
Channels:
Type string : text "Text" [ stateTransformation="JSONPATH:$.metadata.data" ]
}
can be transferred to this…
Sidenote: my Thing appears online, but I get “NULL” as a value for it in the model…