Hi guys,
I´m facing a problem with HTTP Binding and a web relay (http://www.controlbyweb.com/webrelay-quad/)
The web relay offers a html page and an xml file for relay states. Because of data traffic reasons i would like to read the XML State file which looks like this:
<?xml version="1.0" encoding="UTF-8"?> <datavalues> <relay1state>0</relay1state> <relay2state>0</relay2state> <relay3state>0</relay3state> <relay4state>0</relay4state> </datavalues>
But it seems that the http binding does not like this response, because it is not a well formed http response. I´m always getting:
2016-03-29 14:08:58.155 [DEBUG] [.o.b.http.internal.HttpBinding] - item 'RelayStatus' is fetched from cache 2016-03-29 14:08:58.157 [DEBUG] [.o.b.http.internal.HttpBinding] - updating cache for 'webRelayCache' ('http://X.X.X.X/state.xml') 2016-03-29 14:08:58.165 [DEBUG] [g.openhab.io.net.http.HttpUtil] - About to execute 'http://X.X.X.X/state.xml' 2016-03-29 14:08:58.179 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal protocol violation: org.apache.commons.httpclient.ProtocolException: The server X.X.X.X failed to respond with a valid HTTP response 2016-03-29 14:08:58.181 [ERROR] [.o.b.http.internal.HttpBinding] - No response received from 'webRelayCache'
Of course i could use the html user interface and parse the status out of a valid html table structure but i don´t like this solution that much.
So, isn´t it possible to retrieve the XML (not valid HTTP) response and transform it via XSLT?
Best regards,
Artur