MQTT

From ago control wiki
Revision as of 14:59, 25 March 2015 by Hari (Talk | contribs)

Jump to: navigation, search

Contents

MQTT

Agocontrol supports MQTT. You can specify a topic in the config file. Agocontrol will subscribe to that topic and tries to match the strings "temperature", "humidity" and "pressure" for respective sensor values. Values are assumed to be SI units of type float.

Config settings

conf.d/mqtt.conf:

[mqtt]
broker = 127.0.0.1
port =  1883
topic = sensors/#

Example trace output

2015-03-25 13:47:19,032 AgoMQTT    DEBUG Paho log: 16 Received PUBLISH (d0, q0, r0, m0, 'sensors/ESP8266-10202889/temperature', ...  (4 bytes)
2015-03-25 13:47:19,033 AgoMQTT    INFO  Received MQTT message on topic sensors/ESP8266-10202889/temperature: 24.9
2015-03-25 13:47:19,033 AgoConnection TRACE Sending message [sub=event.device.announce]: {'instance': 'mqtt', 'handled-by': 'mqtt', 'devicetype': 'temperaturesensor', 'uuid': 'b7a94873-4656-4572-b337-284a871f8056', 'internalid': 'sensors/ESP8266-10202889/temperature'}

Further plans

  • Add support for more device types
  • Implement regular expression matching for topic and value
Personal tools