Hi Community,
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: http://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-notifications.html
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!
Hi Marco,
I also have a LaMetric device and also would like to integrate it in OpenHAB. I haven´t started working on it, but let you know if I come further with it. Maybe we could also start creating a own binding.
Hi Florian,
I started now to create a binding and actions. It already supports changing display brightness via a things channel and actions for sending simple text notifications. Once it is a bit more stable I will share it via my github account. I will write here, when it is ready to be tested or extended…
conceptually I struggle a bit on how to expose indicator, button and alarm apps… probably I will also expose them via actions to be called from rules or scripts. Maybe you had some thoughts!?