RPC

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
(Receive Events)
(Receive Events)
Line 17: Line 17:
  
 
== Receive Events ==
 
== Receive Events ==
http://x.y.z:8008/update
+
http://x.y.z:8008/update

Revision as of 21:45, 16 December 2012

Contents

RPC Interface

ago control provides a RPC interface. It is implemented in the agorpc daemon. It is written in C++ and uses the mongoose embedded web server to provide an HTTP interface on port 8008. Be sure that the RPC service is running else start it:

systemctl start agorpc.service

The following calls are supported:

Inventory

The inventory can be fetched as JSON structure with the following command request:

http://x.y.z:8008/command?command=inventory

Send commands

Other commands work the same, e.g. to switch on a lamp:

http://x.y.z:8008/command?command=on&uuid=91926587-03c6-4cfa-898c-4d5ad75fc494

Set level for a dimmer:

http://x.y.z:8008/command?command=setlevel&uuid=c2467e36-817e-4b63-a274-0cc23e550965&level=50

Fetch the electronic program guide from a Dreambox/Engima2:

http://x.y.z:8008/command?command=getepg&uuid=4a79ce72-7cfe-4b12-bfc5-dfd30bb297f4

Receive Events

http://x.y.z:8008/update
Personal tools