Skip to content

MQTT_Messages

SMerrony edited this page May 4, 2022 · 3 revisions

We assume throughout this guide that you have set the base_topic to "daikin2mqtt".

MQTT Topics

There are three main types of message topic:

  1. Device status updates and responses to requests are published to daikin2mqtt/FRIENDLY_NAME/<type>
  2. Requests for inverter state via daikin2mqtt/FRIENDLY_NAME/get
  3. Commands you send to inverters via daikin2mqtt/FRIENDLY_NAME/set

On start-up, the simple string "Started" is sent to the daikin2mqtt/status topic.

Currently, daikin2mqtt does not store live data internally - each time a get request is received the appropriate unit is queried for the data.

Get Subtopics

The subtopics for get are basic, controls, [online ??? - tbd], and sensors

Eg. daikin2mqtt/Steves_Room/get/sensors

Set Subtopics

The only subtopic currently defined for set is controls, you must supply a control message.

Eg. daikin2mqtt/Spare_Bedroom/set/controls

  • The JSON-formatted control message may contain any number of the fields shown below
  • Setting the timestamp is meaningless and will be ignored
  • You can set just one, several, or all of the controls
  • Unset controls will be left as-is

In order to simplify use with dashboards (eg. Node-Red), after a successful set, daikin2mqtt will automatically requery the inverter controls and publish a controls message.

MQTT Messages

Messages (payloads) are all in JSON format. As per normal, whitespace is not significant in the JSON messages - it is used below just for clarity.

Basic

{
    "firmware_version": "<string>",
    "power":            true|false,
    "error":            <integer>,
    "adaptor_led":      true|false,
    "holiday_mode":     true|false,
    "group_mode":       true|false,
    "group_name":       "<string>",
    "timestamp":        "<HH:MM:SS>"
}

The timestamp records when the data were collected from the unit.

Controls

Published to subtopic /controls

{
    "power":            true|false,
    "mode":             "<mode-string>",
    "set_temp":         <integer>,
    "set_humidity":     <integer>,
    "fan_rate":         "<fan-rate-string>",
    "fan_sweep":        "<fan-sweep-string>",
    "timestamp":        "<HH:MM:SS>"
}   

Where:

<mode-string> is one of "AUTO", "AUTO 1", "DEHUMIDIFY", "COOL", "HEAT", "MODE 5", "FAN", "AUTO 2"

<fan-rate-string> is one of "AUTO", "SILENT", "LEVEL_1", ... "LEVEL_5"

<fan-sweep-string> is one of "OFF", "VERTICAL", "HORIZONTAL", "BOTH"

In dehumidify mode, some units return a set temperature of "M", daikin2mqtt will return 0 in this case.

In some modes, set temperature and set humidity are reported as "--", daikin2mqtt will return 0 in these cases.

The timestamp records when the data were collected from the unit. Do not include the timestamp field in a set/controls request.

Sensors

Published to subtopic /sensors

{
    "unit_temp":        <float, 1 d.p.>,
    "unit_humidity":    <integer>,
    "ext_temp":         <float, 1 d.p.>,
    "error":            <integer>,
    "timestamp":        "<HH:MM:SS>"
}

Not all units return external temperatures (some only when powered on), daikin2mqtt will return a dummy value of -99.0 when no temperature is reported.

Likewise, not all units report humidity, daikin2mqtt will return a value of 0 if none is reported.

The timestamp records when the data were collected from the unit.