Message Reference

From ago control wiki
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'}

messagesend

Message sending with messagesend command line interface. Here an example to get out the inventory:

/opt/agocontrol/bin/messagesend command=inventory

Switch On Device

/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=on

Switch Off Device

/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=off

Set Level on Device to 60

/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=setlevel level=60

Personal tools