HTTP binding - openHAB 3 version

JSONPATH:$.data[0].rooms[1].Volume use the full path

2 Likes

Iā€™m having problems getting the value of a Rollershutter Item. I have defined my http thing and channels like this:

Thing http:url:garage "Garage" [ baseURL="http://192.168.178.46/", refresh=60, commandMethod="POST", contentType="text/plain"] {
    Channels:
        Type rollershutter : shutter "Shutter" [ stateExtension="get", commandExtension="set"]
}

The items look like this:

Rollershutter GarageRollershutter "Garagentor" (gDoorShutters) { channel="http:url:garage:shutter" }

Whenever a get is performed, my GarageRollershutter becomes UNDEF. There is no further information in the logs as to what the exact problem is:

12:00:32.199 [TRACE] [http.internal.http.RefreshingUrlCache] - Requesting refresh (retry=false) from 'http://192.168.178.46/get' with timeout 3000ms
12:00:32.200 [TRACE] [http.internal.http.RefreshingUrlCache] - Sending to 'http://192.168.178.46/get': Method = {GET}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.20.v20190813}, Content = {null}
12:00:32.386 [TRACE] [tp.internal.http.HttpResponseListener] - Received from 'http://192.168.178.46/get': Code = {200}, Headers = {Content-Type: text/plain, Content-Length: 2, Connection: close}, Content = {50}
12:00:32.389 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'GarageRollershutter' changed from 50 to UNDEF

I have set the the value of the item via REST to 50 before the get, so setting percentage values should work. As there is no transformation involved, I am a little bit puzzled on what else to try.

Does anybody have an idea?

Edit: it does not matter which value is returned by the get call, i tested with 0, 50 and 100.

@moderators can we close this thread? Development is done and I feel that adding every issue and question to this thread might not be the best idea if we want to keep track of questions/solutions.

1 Like