Controllare/monitorare appliances via REST/RPC JSON API

54 views
Skip to first unread message

Laurent-Walter Goix

unread,
Feb 13, 2014, 4:43:24 AM2/13/14
to jemma-...@googlegroups.com
Buongiorno a tutti,

sarei interessato ad un API di alto livello esposta via HTTP REST/RPC che consenta facilmente di richiedere/ricevere dati di consumo delle appliance piuttosto che controllarle. Al momento mi risultano API apparentemente simili ma che di fatto si mappano molto su zigbee (e ne richiedono la conoscenza)...

Esiste già una tale API o è prevista? Come interagisce al momento la GUI web energy@home con la piattaforma?

Grazie
Walter

Riccardo Tomasi

unread,
Feb 17, 2014, 3:35:36 PM2/17/14
to jemma-...@googlegroups.com, laurentwa...@gmail.com
Ciao Walter,

E' corretto: JEMMA espone un certo numero di API via JSON-RPC (ad esempio GreenAtHomeApplianceService) che sono "chiamate" dalle GUI web-based.
Abbiamo anche in roadmap un'attività di refactoring e documentazione delle API principali che speriamo di inserire in una della prossime milestone (0.2 o 0.3) in base alla disponibilità dei collaboratori al progetto.

Alcune informazioni più dettagliate di seguito (mi scuso per l'inglese ma è un cut & paste di una mail di un collaboratore che non parla italiano)

A JSON-RPC interface is exposed over HTTP by [jemma.osgi.ah.web.energyathome.demo] bundle.
In particular, at the EnergyAtHome class, it registers into a jabsorb JSONBridge an instance of ServiceRegistryProxy.
Hence, The JSONBridge will export all the instance methods (bind, close, find and unbind) under the key "OSGi".
Finally, in the Web GUI there is also a javascript library json-rpc (jsonrpc.js) which is used as josn-rpc client.
Similarly, the class StaticJSONServiceTracker(from the same bundle) exposes over json-rpc all the service instances of GreenAtHomeApplianceService 
from [jemma.osgi.ah.greenathome] bundle with Property (bind.protocol=json-rpc) under the key value of property("service.id"). 
However, at execution, property("service.id") value will be an integer number like (100, 97, ...).


PS. Se puoi farci qualche esempio di "chiamata" che ti interessa con i suoi parametri  possiamo provare a indirizzarti verso la funzione giusta (se esiste già).

A presto,

R.

---
Riccardo Tomasi
Head of Research Unit: Internet of Things Service Management (IoT-SM)
Pervasive Technologies (PerT) Area
Istituto Superiore Mario Boella (ISMB)
skype: riccardo1981 [My calendar] [Linkedin] [Disclaimer]

--
JEMMA - Java Energy ManageMent Application framework - http://jemma.energy-home.org
---
You received this message because you are subscribed to the Google Groups "JEMMA General Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jemma-genera...@googlegroups.com.
To post to this group, send email to jemma-...@googlegroups.com.
Visit this group at http://groups.google.com/group/jemma-general.
To view this discussion on the web visit https://groups.google.com/d/msgid/jemma-general/4fdcb2aa-05d3-4633-a27f-61332bcbcb3d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages