Being a novice on anything openHAB related, I may have overlooked something, but I haven’t found any clear (to me) example how to collect smart meter data via a REST-like web interface. All bindings and examples I found seem to assume the reading device is directly connected to the device running openHAB2.
A little background:
I have a Smart Meter installed (DSMR v4.2) and built a simple device to read the serial P1 port and transmit the data in REST format to a (imaginary so far) web service (using an ESP8266 WiFi SoC). That works just fine, it reads the P1 telegrams and - using a little testing webservice - sends its RESTfull data every 10 seconds.
I noticed there is a http binding, but that seems to work the other way around (send data from openHAB). Is it possible like I envisioned, or is it only possible if I reverse the logic and have openHAB query the P1 interface device every 10 seconds?
I need help finding some pointers (articles, links, examples, …) on how to create a binding in openHAB2 to collect that data via a web interface and store it through persistence (I intend to use InfluxDB).
EDIT: Afterthought: Would the preferred way be to use MQTT pub on openHAB2 and have the P1 interface subscribe?