MQTT Interface Description
for HAUS Gatekeeper Home Premium
These metrics are published by Gatekeeper without querying them. These are published regularly (temperature is published ~once a minute) or on-change as retained values, which means, you'll always see the last known values for these metrics.
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/status |
offline |
Device is offline, published by MQTT broker as the last will message set by the device. |
|
|
online |
Device is online. |
|
|
online, upgrading |
Firmware upgrade (initiated via MQTT) is in progress. |
|
|
online, upgrade failed |
Firmware upgrade (initiated via MQTT) failed (e.g. could not fetch binary from URI), device remains functional with firmware unchanged. |
|
|
online, upgraded |
Firmware upgrade (initiated via MQTT) completed successfully (in practice it is never shown as the device resets itself automatically after a successful upgrade). |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/temperature |
<value measured by the connected temperature sensor in °C> |
The device is able to handle several sensors, chained on the OneWire bus, however currently only one sensor is supported. In this topic the value of the sensor with index #0 is published. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/light |
on |
Light is on. |
|
|
off |
Light is off. |
|
|
auto |
Light is on and going to be turned off by ALC, when the active timer counts down. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/gate/state |
open |
Gate is open. |
|
|
closed |
Gate is closed. |
|
|
moving |
Not implemented, yet. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/doorbell |
<random integer> |
A random event ID to be processed by the doorbell client (part of the upcoming mobile app). |
Gatekeeper can be controlled by publishing commands in a <devicename>/command/… MQTT topic.
Most of the commands are silently executed, but some of them respond in an MQTT topic as mentioned in Explanation column.
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/light |
on |
Turn light on. |
|
|
off |
Turn light off. |
|
|
auto |
Turn light on for a certain time, controlled by the value of AutoLightControl Timer 2. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/gate |
trigger+<device master password> |
Triggering the gate by activating the momentary Relay 1 for a short time. |
|
|
open+<device master password> |
Opening the gate, if closed and no concurrent open or close command. |
|
|
close+<device master password> |
Closing the gate, if open and no concurrent open or close command. |
|
|
cancel+<device master password> |
Cancel OwnTracks region event triggered automatic gate opening (within 5 seconds after enter event). |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/door |
trigger+<device master password> |
Triggering the door by activating the momentary Relay 2 for a short time. |
|
|
open+<device master password> |
Triggering the door by activating the momentary Relay 2 for a short time. |
|
|
close+<device master password> |
Triggering the door by activating the momentary Relay 2 for a short time. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
reboot+<device master password> |
Rebooting the device. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
upgrade+<device master password>+<URL to fw image> |
Fetching the firmware image from the specified URL, then applying it. Upon successful upgrade the device is rebooted automatically. <devicename>/status topic is updated accordingly. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
info |
Publishes the hardware and firmware name and version in <devicename>/sysinfo topic. |
|
|
uptime |
Publishes the current uptime in <devicename>/uptime topic. |
|
|
prodinfo |
Publishes the full hardware information in <devicename>/prodinfo topic. |
|
|
wifiinfo |
Publishes local IP, MAC address, channel and RSSI in <devicename>/wifiinfo topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
saveconfig+<device master password> |
Saves device configuration to non-volatile memory. |
|
|
saveremotes+<device master password> |
Saves configured remote controllers to non-volatile memory. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
factoryreset+<device master password> |
Erases all configured data and restores factory default configuration. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/command/system |
forcewifireconnect+<device master password> |
Forces Wifi reconnection. Intended to be used after reconfiguring SSID/Password or device name. |
|
|
forcemqttreconnect+<device master password> |
Forces MQTT reconnection. Intended to be used after reconfiguring MQTT connection parameters. |
|
|
restartwifiap+<device master password> |
Restarts Wifi AP, provided by this device. Intended to be used after reconfiguring Wifi AP parameters. |
Gatekeeper can be configured by publishing in a <devicename>/config/… MQTT topic. Parameters are set silently (if the value is valid).
If a value is not provided, Gatekeeper responds the value in an MQTT topic as mentioned in Explanation column.
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/baseconfig |
<device master password>+<key>[=<value>] |
Set <key> to <value> if both are given. Publishes the currently set value in <devicename>/baseconfig topic if value is omitted. For possible keys please see Basic parameters table in Parameter Description document. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/tempsense/enable |
true |
Enables TempSense functionality. |
|
|
false |
Disables TempSense functionality. |
|
|
<empty> |
Publishes the currently set value in <devicename>/tempsense/enable topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/alc/enable |
true |
Enables AutoLightControl functionality. |
|
|
false |
Disables AutoLightControl functionality. |
|
|
<empty> |
Publishes the currently set value in <devicename>/alc/enable topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/alc/timer1 |
<N> |
Sets the timer value to <N> seconds if no unit is appended. Factory default value is 300 seconds. |
|
|
<N[hms]> |
[h]our, [m]inute and [s]econd units may also be used. |
|
|
<empty> |
Publishes the currently set value in <devicename>/alc/timer1 topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/alc/timer2 |
<N> |
Sets the timer value to <N> seconds if no unit is appended. Factory default value is 1800 seconds. |
|
|
<N[hms]> |
[h]our, [m]inute and [s]econd units may also be used. |
|
|
<empty> |
Publishes the currently set value in <devicename>/alc/timer2 topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/gate/sensemode |
0 |
Gate state sensor disabled. |
|
|
1 |
Normal mode: sensor low level = gate open, high level = gate closed |
|
|
2 |
Inverted mode: sensor low level = gate closed, high level = gate open |
|
|
<empty> |
Publishes the currently set value in <devicename>/gate/sensemode. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/gate/guardtimer |
<N> |
Sets the timer value to <N> seconds. Factory default value is 30 seconds. |
|
|
<empty> |
Publishes the currently set value in <devicename>/gate/guardtimer topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/gate/canceltimer |
<N> |
Sets the timer value to <N> seconds. Factory default value is 5 seconds. |
|
|
<empty> |
Publishes the currently set value in <devicename>/gate/canceltimer topic. |
|
MQTT topic |
Possible values |
Explanation |
|
<devicename>/config/beacons/list |
<empty> |
Publishes the Beacon IDs in <devicename>/beacons topic. |
|
<devicename>/config/beacons/details |
<beacon id> |
Publishes configured attributes of beacon in <devicename>/beacons/<beacon id> topic. |
|
<devicename>/config/beacons/add |
<beacon id>[,<type>][,<mac addr>][,<rssi>] |
Adds a new beacon with given Beacon ID and following optional parameters: Type (0 = Disabled, 1 = OwnTracks region events, 2 = OwnTracks location updates, 3 = Beacon connects to the Wi-fi AP provided by this device) MAC address (hexa with semicolons) RSSI (threshold on beacon's Wi-Fi signal strength) |
|
<devicename>/config/beacons/delete |
<beacon id> |
Deletes the beacon permanently and unsubscribes from its MQTT messages. |
|
<devicename>/config/beacons/set |
<beacon id>:<bcid|type|mac|rssi|away>=<value> |
Modifies the given attribute of the beacon with given Beacon ID. Type (0 = Disabled, 1 = OwnTracks region events, 2 = OwnTracks location updates, 3 = Beacon connects to the Wi-fi AP provided by this device) MAC address (hexa with semicolons) RSSI: Wi-fi signal strength trigger threshold Away: <1|true> = true, <anything else> = false |
The maximum MQTT payload length supported by HAUS IoT controllers is 252 bytes. This means that topic name length + message length for a single MQTT message cannot exceed this limit. Bigger messages are discarded, however this limit is not a concern in typical applications. (Publishing the MQTT Dash config is an exception: the controller is able to publish giant MQTT messages in that case.)
MQTT Dash configuration can be publised from the Remote controllers menu of WebUI in JSON format.
Default MQTT topic for publishing the config is metrics/exchange, which is the default topic set in MQTT Dash. You may use any other topic, if it is set on both ends. This is useful, if a topic prefix is mandatory on a special MQTT broker.
Currently there are 2 modes of handling OwnTracks provided location information:
Relying on OwnTracks region handling: OwnTracks sends MQTT messages on entering and leaving regions defined in the app.
Relying on OwnTracks provided location information: OwnTracks sends location updates in MQTT messages, and Gatekeeper evaluates whether the beacon is within Gatekeeper's own defined region.
If a mobile handset running OwnTracks enters or leaves a Region, defined in OwnTracks Regions, it will publish an MQTT message in below topic.
The topic contains the username, OwnTracks uses to authenticate to the MQTT broker, also it contains the Device ID set in OwnTracks Preferences.
In the payload message the event (enter/leave) and the subject Region (e.g. Home) is named.
OwnTracks topic prefix is empty by default, but can be configured if needed (e.g. for MaQiaTTo cloud MQTT broker).
MQTT topic: <owntracks topic prefix>owntracks/<mqtt username>/<owntracks device id>/event
Message on entering:
{"_type":"transition","acc":15.705,"desc":"<region>","event":"enter","lat":47.0,"lon":19.0,"t":"l","tid":"t7","tst":1579172959,"wtst":1575640789}
Message on leaving:
{"_type":"transition","acc":15.705,"desc":"<region>","event":"leave","lat":47.0,"lon":19.0,"t":"l","tid":"t7","tst":1579174295,"wtst":1575640789}
Mobile handset periodically sends location updates, which is received and processed byGatekeeper, if this mode is selected.
MQTT topic: <owntracks topic prefix>owntracks/<mqtt username>/<owntracks device id>
Message:
{"_type":"location","acc":3,”alt”:”105”,"lat":47.0,"lon":19.0,"t":"u","tid":"S2","tst":1579172959,"vac":0,”vel”:18}
For further information please see OwnTracks Integration Guide.