Message Reference

From ago control wiki
Revision as of 22:18, 28 October 2013 by Hari (Talk | contribs)

Jump to: navigation, search

Contents

Message Reference

This page describes the QPID map messages with which different system components communicate with each other.

Complete message schema can be found from ago admin:

http://127.0.0.1:8008/?inventoryView

Device Command Messages

Device On

Commmand for switching a device on.

Key Example Description
command on Command to execute.
uuid 3c30ff03-1282-4cfd-9767-570212df0bff Device UUID.

Device Off

Commmand for switching a device off.

Key Example Description
command off Command to execute.
uuid 3c30ff03-1282-4cfd-9767-570212df0bff Device UUID.

Set Level

Command for setting device level like lamp dimming or thermometer target temperature.

Key Example Description
command setlevel Command to execute.
uuid 3c30ff03-1282-4cfd-9767-570212df0bff Device UUID.
level 45 The level.

Testing

Ago Drain

Message sending with agodrain.py with JSON syntax.

Shell Command

/opt/agocontrol/bin/agodrain.py

Example JSON Message

content={u'command': u'on', u'uuid': u'3c30ff03-1282-4cfd-9767-570212df0bff'}

CURL

Message sending with CURL command line interface.

Switch On Device

/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c on

Switch Off Device

/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c off

Set Level on Device to 60

/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c setlevel -p level=60

Personal tools