Hello,
I want to access an API using the HTTP binding, but I can’t get the thing ONLINE. The log is unremarkable.
OpenHAB: 4.2.1 in Docker-Container
2024-09-21 10:41:27.673 [INFO ] [nding.http.internal.HttpThingHandler] - Using the secure client for thing 'http:url:9c0101b480'.
2024-09-21 10:41:27.674 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'http:url:9c0101b480' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-09-21 10:41:27.674 [DEBUG] [nding.http.internal.HttpThingHandler] - No authentication configured for thing 'http:url:9c0101b480'
2024-09-21 10:41:27.675 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'http:url:9c0101b480' changed from INITIALIZING to UNKNOWN
This may be because the key is already available from the provider URL-Encrypted and I don’t have to pass it encrypted as described in the binding documentation.
I’ve attached my configuration below, but I can’t figure out what’s wrong.
Any ideas?
Calling it directly in the browser with the original key works. This API is only describing my Weatherstation, but the problem for the data API is the same.
Original API key: xxxxxxx%2Bxxxxxxxxx%2Bxxxx%2Fxxxxxxxxxxxx%2Fxxxxxxxxxxxxx%2Bxxxx%3D%3D
decrypted key: xxxxxxx+xxxxxxxxx+xxxx/xxxxxxxxxx/xxxxxxxxxxxx+xxxx==
The configuration for the thing is
UID: http:url:9c0101b480
label: HTTP AWEKAS Station
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: https://api.awekas.at/station.php?key=xxxxxxxx+xxxxxxxxx+xxxx/xxxxxxxxxx/xxxxxxxxxxxxx+xxxx==
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: {}
I was able to solve the problem so that the Thing went ONLINE.
After I created my own channel in addition to the automatically created channels “last-failure” and “last-success”, the problem was solved.
Unfortunately, I couldn’t find any reference to this in the documentation.