sky201503 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

REST Subscription "binding #350

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 reported on code.google.com by karel.go...@gmail.com on 21 Jun 2013 at 2:56

GoogleCodeExporter commented 8 years ago
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

Original comment by karel.go...@gmail.com on 25 Jul 2013 at 2:02

GoogleCodeExporter commented 8 years ago
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?

Original comment by karel.go...@gmail.com on 17 Aug 2013 at 8:01

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 7 Dec 2013 at 10:15

GoogleCodeExporter commented 8 years ago
has been migrated to https://github.com/openhab/openhab/issues/640

Original comment by teichsta on 10 Dec 2013 at 10:26