This works Ok in OH3.0.0 with http binding updated to 3.1.0.snapshot. I am able to switch the device on and off. What I can’t do is to access the device status. For this I need to access the response to the POST request.
To obtain the status from the device I need to send a POST request with this body idOperacion=1002 and have access to the result, that comes like this (if I use CURL):
Ideally this POST request should be sent periodically (equivalent to a status), but the HTTP binding only supports GET requests for status. Would it be possible to enhance it to allow POST requests for status ?
pick the POST response. This would be a string that can be parsed by a transformation. Currently the binding does not allow to process a POST response
In my own case all status requests should be handled using POST. But I can’t grant that this is a general case. Currently you have (in thing definitions) commandMethod: POST and contentType: text/plain. Adding statusMethod: POST and statuscontentType: text/plain would work in my case
Awesome. It works, although not exactly as I would like. The following section appears in Thing tab and it should be in the Channels tab instead because body content depends on the channel.
It works as it is now, but I need to define several things for the same device instead of several channels for the same thing, as I would like.