I really like openhab and version 2 looks promising. So far I was mainly using it with the zwave binding having excelent support in case of troubles and some UIs. Now I would like to add LaMetric as a notification sink into the system. So I have a silly question regarding integrating openhab with 3rd party services providing a REST API. Most of these APIs follow a simple pattern following the RESTful API design and requrire some Authentication (Usually OAuth or API Key)… So I was surprised to not find any binding or action to support the second most simple thing… POST a notification to a URL while also sending an HTTP Authentication Header.
Concrete this simple API:
So far I found 2 options:
a) HTTP Action in a script/rule => Does not work as it does not allow to send HTTP Headers (according to the documentation)
b) HTTP Binding => No possibility to send a Body (OK, workaround via exec plugin and curl mentioned, but really, this in the last days of 2016!?)
c) I have to write my own Action / Binding
So my questions are:
- Is the documentation incomplete and a) and/or b) is not true.
- Is there another option which I simply miss?
- Could I use low level Java Code like URLConnections in rules/scripts directly?
- Is somebody already integrating LaMetric or has an unoffical binding?
Thank you for all your input and the great work you did!