I have several Arduinos scattered around my apartment to do various things. They each have a webserver where I can navigate to “http://192.168.1.2/lighton” to turn on my lights or “http://192.168.1.2/lightoff” to turn off my lights. That’s easy to make work with openHAB.
I also have some status webpages which are plain text, no HTML headers, 1.1 200 OK, nothing. If I navigate to “http://192.168.1.2/temperature” then I see the temperature from my DHT22 in plaintext. If I navigate to “http://192.168.1.2/doorstatus” I see “open” or “closed” in plaintext. If I navigate to “http://192.168.1.2/lightstatus” I can see if my light is on or off.
The problem comes with getting that info into openHAB. The HTTP Binding always returns “error invalid response received” when I try and get data from those URLs. I can even see my data in the log if I configure the Arduino a certain way. It will say something like “72.30 is not a valid HTTP identifier”. Of course not, that is my temperature.
Can I bypass all that HTTP header and response crap and just receive the strings in to openHAB? My web browser can do it.
I could implement MQTT, but that means redoing my Arduinos, several of which are low on memory and I have to use HTTP for my amazon echo’s bridge to work. Adding a whole another library, bad news.