Raspberry Pi 4 Model B Rev 1.1 / 4GB
openHAB 3.1.0.M4
I am looking at using the HTTP Binding to be able to receive data from another device on the network and have read through the HTTP Binding docs and various posts but I’m not getting it. Is there a simple example of how Openhab would receive data from an HTTP Request that I could parse in a script (likely python) ? I have myopenhab.org configured as well.
You have the purpose of the binding backwards. The HTTP binding requests data from other devices, it doesn’t handle requests from other devices. openHAB is initiating the HTTP call.
Put another way, the HTTP binding doesn’t create a new web server with new URLs that other devices can use send HTTP requests to.
If your other device wants to request data from openHAB, it must use openHAB’s REST API. Under Developer Tools there is an interactive set of documents that will show you everything you need to know to get an Item’s state in openHAB from another device.
Ok thanks Rich … yes I have been playing around with the REST API and can get and set existing items in openhab (using curl) but obviously I’ve been going down the wrong path thinking the HTTP binding would help.
Ok … so its obvious … I just look for the Item to change just like always … answered my own question after falling into a rabbit hole thanks for setting me straight.