From ago control wiki
Revision as of 23:19, 2 January 2013 by Hari (Talk | contribs)

Jump to: navigation, search


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 by default. Be sure that the RPC service is running else start it:

systemctl start agorpc.service

JSON-RPC interface

agorpc also implements a JSON-RPC interface. The JSON parsing is done with jsoncpp. You can find more information regarding JSON-RPC here: Specification

The interface is accessible via HTTP transport. The path is "/jsonrpc". Please be aware that batches don't work yet.


The following methods are implemented:


The message method will send an AMQP message to ago control with "content" as content. This example will switch off a specific uuid:

{"jsonrpc" : "2.0", "method" : "message", "params" : {"content":{"command":"off", "uuid":"0962f27e-99ce-43a4-872b-97d75d61f464"}}, "id":1 }

This call will fetch the inventory from the Resolver:

{"jsonrpc" : "2.0", "method" : "message", "params" : {"content":{"command":"inventory"}}, "id":2 }

To send an event also add a "subject" parameter to "params".


This will create a subscription and provide a uuid for it. You can use the getevent call afterwards to fetch any events that did occur.

    "method": "subscribe",
    "id": 1,
    "jsonrpc": "2.0"
    "jsonrpc": "2.0",
    "result": "2d28cb85-5be0-4ccb-bc21-33bf94ed04ec",
    "id": 1

HTTP GET requests (OBSOLETE! This might be removed in future versions)

The following calls are supported:


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


Send commands

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


Set level for a dimmer:


Fetch the electronic program guide from a Dreambox/Engima2:


Receive Events

This GET request will stay open and stream any incoming event:

Personal tools