Message Reference

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
m (Message Reference)
m (CURL)
Line 81: Line 81:
 
<code>content={u'command': u'on', u'uuid': u'3c30ff03-1282-4cfd-9767-570212df0bff'}</code>
 
<code>content={u'command': u'on', u'uuid': u'3c30ff03-1282-4cfd-9767-570212df0bff'}</code>
  
=== CURL ===
+
=== messagesend ===
  
Message sending with CURL command line interface.
+
Message sending with messagesend command line interface. Examples:
  
 
==== Switch On Device ====
 
==== Switch On Device ====
<code>/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c on</code>
+
<code>/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=on</code>
 
==== Switch Off Device ====
 
==== Switch Off Device ====
<code>/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c off</code>
+
<code>/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=off</code>
 
==== Set Level on Device to 60 ====
 
==== Set Level on Device to 60 ====
<code>/opt/agocontrol/bin/messagesend.py -d 3c30ff03-1282-4cfd-9767-570212df0bdd -c setlevel -p level=60</code>
+
<code>/opt/agocontrol/bin/messagesend uuid=3c30ff03-1282-4cfd-9767-570212df0bdd command=setlevel level=60</code>

Revision as of 23:19, 28 October 2013

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. Examples:

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