Seems to be ok.
But I just get “Method failed: HTTP/1.1 400 Bad Request”
Here the debug message from the binding:
2018-09-23 18:45:16.414 [DEBUG] [.o.b.http.internal.HttpBinding] - Executing url ‘http://etaboilderurl:8080/user/var/120/10101/0/0/12080’ via method POST, with body content ‘value=1803’
2018-09-23 18:45:16.423 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 400 Bad Request
The missing bit was the content type “application/x-www-form-urlencoded”.
By using the action sendHttpPostRequest with this content type, the request was accepted and executed correctly.
val String url = "http://eta_pu_11:8080/user/var/40/10021/0/0/12080"
val String typ = "application/x-www-form-urlencoded"
val int timeout = 5000 // ms
val wert = "value=1802"
val result = sendHttpPostRequest (url, typ, wert, timeout)
if (!result.contains("success")
{
...
}
This works for me in most cases, but sometimes, I get:
Method failed: HTTP/1.1 400 Bad Request
<?xml version="1.0" encoding="utf-8"?>
<eta version="1.0" xmlns="http://www.eta.co.at/rest/v1">
<error>Parameter 'value' is missing for this request</error>
</eta>
I couldn’t find out, why. I will turn to curl, if this happens a lot, although curl does not allow the result to be analyzed, does it?
Has anyone had success to set it like H102 mentioned inside the item definition without any rule?
I tried but nothing happens, also no log entry that it was not successful?
Hi i just checked the exec binding, but i do not see how this would help ?
Do you have any example you could kindly post so its easier to dig into this material.
My intention is to not require to setup rules,…if its possible it would be great within a switch item to set states of the ETA heater.