RPC

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
(RPC Interface)
(Inventory)
Line 5: Line 5:
 
The following calls are supported:
 
The following calls are supported:
 
== Inventory ==
 
== Inventory ==
The inventory can be fetched with the following command request:
+
The inventory can be fetched as JSON structure with the following command request:
 
  http://x.y.z:8008/command?command=inventory
 
  http://x.y.z:8008/command?command=inventory
 +
 
== Send commands ==
 
== Send commands ==
 
Other commands work the same, e.g. to switch on a lamp:
 
Other commands work the same, e.g. to switch on a lamp:

Revision as of 23:17, 4 December 2012

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
Personal tools