Message Reference

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
m (CURL)
(messagesend)
 
Line 83: Line 83:
 
=== messagesend ===
 
=== messagesend ===
  
Message sending with messagesend command line interface. Examples:
+
Message sending with messagesend command line interface. Here an example to get out the inventory:
 +
/opt/agocontrol/bin/messagesend command=inventory
  
 
==== Switch On Device ====
 
==== Switch On Device ====

Latest revision as of 07:01, 27 November 2015

Contents

[edit] 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

[edit] Device Command Messages

[edit] Device On

Commmand for switching a device on.

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

[edit] Device Off

Commmand for switching a device off.

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

[edit] 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.

[edit] Testing

[edit] Ago Drain

Message sending with agodrain.py with JSON syntax.

[edit] Shell Command

/opt/agocontrol/bin/agodrain.py

[edit] Example JSON Message

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

[edit] messagesend

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

/opt/agocontrol/bin/messagesend command=inventory

[edit] Switch On Device

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

[edit] Switch Off Device

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

[edit] Set Level on Device to 60

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

Personal tools