Closed openhab-bot closed 9 years ago
-- karel.goderis
Let me rephrase this:
implement a REST client binding using for example JAX-RS Client API, and expose the REST server variables into the item definitions, so that for some servers the development of a specific binding is not necessary anymore.
For example, Tesla exposes a REST interface which allows you to query the parameters of your Tesla EV. /vehicles/{id}/command/charge_state return for example the state of charge in the vehicule's battery. The path to this REST variable could be defined in the Item's configuration, together with a polling interval, or alternatively the binding should implement a long-polling client. The binding is responsible for parsing the returned JSON data and use the (mapped) data to update the Item
-- karel.goderis
Mmhh... since there is little reaction, there might not be a lot of interest in such a binding, or I might have goofed up completely in the sense that maybe this kind of functionality is possible in a script (doing http requests with a time-based event trigger, with some Regex on the JSON string returned)?
Anyways, processing JSON or XML, dealing with polling or http streaming etc, ... IMHO is more appropriate in a separate binding, no?
closed due to inactivity (TESLA binding has been implemented already for OH2). In the near future there will be a proposal for a new HTTP binding (OH2) which provides some of your mentioned features.
Reported by karel.goderis, Jun 21, 2013 Add a binding that acts as a REST interface subscription client
There are now other servers (for example Asterisk,..) that expose REST interfaces. Goal is to subscribe to the REST interface of another server in order to read out variables, values,... OH would in essence be a REST client, and not only a REST server which it is already today.
the current HTTP binding could be used, but it is a "polling" binding. a REST binding however, would have its values updated by the REST server as soon as a value has changed.
Original issue: http://code.google.com/p/openhab/issues/detail?id=350