MQTT integration
To make your robot talk to your MQTT broker and integrate with home automation software, such as but not limited to Home Assistant, openHAB and Node-RED, configure MQTT via Congatudo's web interface (Settings → MQTT).
Autodiscovery
See the specific integration pages for instructions on how to set up autodiscovery for your home automation software platform:
Other home automation software that follows the Homie convention should also be able to automatically discover your Congatudo instance.
Map
Note that, in order to view the map provided over MQTT, you additionally need I Can't Believe It's Not Valetudo to generate PNG maps. You can then configure it to serve the PNG map over HTTP for openHAB and other software, or install the Lovelace Valetudo Card Map for Home Assistant.
Custom integrations
If you're planning to use one of the home automation platforms listed above, this is all you need to know to get started.
If you're instead planning to do something more custom, in this document you will find a reference to all MQTT topics
provided by this software. Values such as <TOPIC PREFIX>
and <IDENTIFIER>
are those configured in the MQTT
settings page.
{% include alert.html type="tip" content="It is recommended to leave Homie autodiscovery enabled, even if you're not planning to use it, if you want to develop custom integrations or access the MQTT topics directly: the Homie protocol is very readable and self-documenting. It will provide additional context and information on how to use specific APIs.
Homie autodiscovery info is best viewed with something like MQTT Explorer. " %}
Table of contents
- Robot
- Capabilities
- Basic control (
BasicControlCapability
) - Operation (
operation
) - Consumables monitoring (
ConsumableMonitoringCapability
) - Consumable (minutes) (
<CONSUMABLE-MINUTES>
) - Consumable (percent) (
<CONSUMABLE-PERCENT>
) - Current Statistics (
CurrentStatisticsCapability
) - Current Statistics Area (
area
) - Current Statistics Time (
time
) - Refresh current statistics (
refresh
) - Fan control (
FanSpeedControlCapability
) - Fan (
preset
) - Go to location (
GoToLocationCapability
) - Go to location (
go
) - Locate (
LocateCapability
) - Locate (
locate
) - Segment cleaning (
MapSegmentationCapability
) - Clean segments (
clean
) - Speaker volume control (
SpeakerVolumeControlCapability
) - Speaker volume (
value
) - Water control (
WaterUsageControlCapability
) - Water (
preset
) - Wi-Fi configuration (
WifiConfigurationCapability
) - Frequency (
frequency
) - IP addresses (
ips
) - Refresh configuration (
refresh
) - Signal (
signal
) - Wireless network (
ssid
) - Zone cleaning (
ZoneCleaningCapability
) - Start zoned cleaning (
start
)
- Basic control (
- Map data
- Status
- Attachment state (
AttachmentStateAttribute
) - Dust bin (
dustbin
) - Mop (
mop
) - Water tank (
watertank
) - Battery state (
BatteryStateAttribute
) - Battery level (
level
) - Battery status (
status
) - Vacuum status (
StatusStateAttribute
) - Error description (
error_description
) - Robot Error (
error
) - Status (
status
) - Status flag (
flag
)
- Attachment state (
State attributes index
- AttachmentStateAttribute
- BatteryStateAttribute
- ConsumableStateAttribute
- PresetSelectionStateAttribute
- StatusStateAttribute
Home Assistant components index
- Battery level (
sensor.mqtt
) - Consumable (minutes) (
sensor.mqtt
) - Consumable (percent) (
sensor.mqtt
) - Current Statistics Area (
sensor.mqtt
) - Current Statistics Time (
sensor.mqtt
) - Dust bin attachment (
binary_sensor.mqtt
) - Error (
sensor.mqtt
) - Map data (
camera.mqtt
) - Map segments (
sensor.mqtt
) - Mop attachment (
binary_sensor.mqtt
) - Speaker volume (
number.mqtt
) - Status Flag (
sensor.mqtt
) - Vacuum (
vacuum.mqtt
) - Water (
select.mqtt
) - Water tank attachment (
binary_sensor.mqtt
) - Wi-Fi configuration (
sensor.mqtt
)
MQTT API reference
Robot
Device
Home Assistant components controlled by this device:
- Vacuum (
vacuum.mqtt
)
Capabilities
Basic control (BasicControlCapability
)
Node, capability: BasicControlCapability
Operation (operation
)
Property, command, not retained
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/BasicControlCapability/operation/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/BasicControlCapability/operation
- Data type: enum (allowed payloads:
START
,STOP
,PAUSE
,HOME
)
Consumables monitoring (ConsumableMonitoringCapability
)
Node, capability: ConsumableMonitoringCapability
{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.
|------+--------| | What | Reason | |------|--------| | Properties | Consumables depend on the robot model. | | Property datatype and units | Some robots send consumables as remaining time, others send them as endurance percent remaining. | |------+--------|
" %}
Status attributes managed by this node:
- ConsumableStateAttribute
Consumable (minutes) (<CONSUMABLE-MINUTES>
)
Property, readable, retained
This handle returns the consumable remaining endurance time as an int representing seconds remaining.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-MINUTES>
- Data type: integer
Sample value:
29520
Home Assistant components controlled by this property:
- Consumable (minutes) (
sensor.mqtt
)
Consumable (percent) (<CONSUMABLE-PERCENT>
)
Property, readable, retained
This handle returns the consumable remaining endurance percentage.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/ConsumableMonitoringCapability/<CONSUMABLE-PERCENT>
- Data type: integer percentage (range: 0 to 100, unit: %)
Sample value:
59
Home Assistant components controlled by this property:
- Consumable (percent) (
sensor.mqtt
)
Current Statistics (CurrentStatisticsCapability
)
Node, capability: CurrentStatisticsCapability
Current Statistics Area (area
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/area
- Data type: integer (unit: cm²)
Sample value:
630000
Home Assistant components controlled by this property:
- Current Statistics Area (
sensor.mqtt
)
Refresh current statistics (refresh
)
Property, command, not retained
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/refresh/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/refresh
- Data type: enum (allowed payloads:
PERFORM
)
Current Statistics Time (time
)
Property, readable, retained
This handle returns the current statistics time in seconds
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/CurrentStatisticsCapability/time
- Data type: integer (unit: seconds)
Sample value:
1440
Home Assistant components controlled by this property:
- Current Statistics Time (
sensor.mqtt
)
Fan control (FanSpeedControlCapability
)
Node, capability: FanSpeedControlCapability
Status attributes managed by this node:
- PresetSelectionStateAttribute
Fan (preset
)
Property, readable, settable, retained
This handle allows setting the fan. It accepts the preset payloads specified in $format
or in the HAss json attributes.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/FanSpeedControlCapability/preset
- Set topic:
<TOPIC PREFIX>/<IDENTIFIER>/FanSpeedControlCapability/preset/set
- Data type: enum (allowed payloads:
off
,min
,low
,medium
,high
,turbo
,max
)
{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.
|------+--------|
| What | Reason |
|------|--------|
| Enum payloads | Different robot models have different fan presets. Always check $format
/json_attributes
during startup. |
|------+--------|
" %}
Sample value:
max
Go to location (GoToLocationCapability
)
Node, capability: GoToLocationCapability
Go to location (go
)
Property, command, not retained
This handle accepts a JSON object identical to the one used by the REST API.
Please refer to the "General Help" section in Valetudo for more information.
Sample payload:
{
"coordinates": {
"x": 50,
"y": 50
}
}
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/GoToLocationCapability/go/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/GoToLocationCapability/go
- Data type: string (format:
same json as the REST interface
)
Locate (LocateCapability
)
Node, capability: LocateCapability
Locate (locate
)
Property, command, not retained
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/LocateCapability/locate/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/LocateCapability/locate
- Data type: enum (allowed payloads:
PERFORM
)
Segment cleaning (MapSegmentationCapability
)
Node, capability: MapSegmentationCapability
Clean segments (clean
)
Property, command, not retained
This handle accepts a JSON object identical to the one used by the REST API.
Please refer to the "General Help" section in Valetudo for more information.
Sample payload:
{
"segment_ids": [
"20",
"18",
"16"
],
"iterations": 2,
"customOrder": true
}
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapSegmentationCapability/clean/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapSegmentationCapability/clean
- Data type: string (format:
same json as the REST interface
)
Speaker volume control (SpeakerVolumeControlCapability
)
Node, capability: SpeakerVolumeControlCapability
Note: This is an optional exposed capability handle and thus will only be available via MQTT if enabled in the Congatudo configuration.
Speaker volume (value
)
Property, readable, settable, retained
This handle returns the current speaker volume
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/SpeakerVolumeControlCapability/value
- Set topic:
<TOPIC PREFIX>/<IDENTIFIER>/SpeakerVolumeControlCapability/value/set
- Data type: integer (range: 0 to 100)
Sample value:
80
Home Assistant components controlled by this property:
- Speaker volume (
number.mqtt
)
Water control (WaterUsageControlCapability
)
Node, capability: WaterUsageControlCapability
Status attributes managed by this node:
- PresetSelectionStateAttribute
Water (preset
)
Property, readable, settable, retained
This handle allows setting the water. It accepts the preset payloads specified in $format
or in the HAss json attributes.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/WaterUsageControlCapability/preset
- Set topic:
<TOPIC PREFIX>/<IDENTIFIER>/WaterUsageControlCapability/preset/set
- Data type: enum (allowed payloads:
off
,min
,low
,medium
,high
,turbo
,max
)
{% include alert.html type="warning" content="Some information contained in this document may not be exactly what is sent or expected by actual robots, since different vendors have different implementations. Refer to the table below.
|------+--------|
| What | Reason |
|------|--------|
| Enum payloads | Different robot models have different water presets. Always check $format
/json_attributes
during startup. |
|------+--------|
" %}
Sample value:
min
Home Assistant components controlled by this property:
- Water (
select.mqtt
)
Wi-Fi configuration (WifiConfigurationCapability
)
Node, capability: WifiConfigurationCapability
Home Assistant components controlled by this node:
- Wi-Fi configuration (
sensor.mqtt
)
Frequency (frequency
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/frequency
- Data type: string
Sample value:
2.4ghz
IP addresses (ips
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/ips
- Data type: string
Sample value:
192.168.100.100,fe80::1ff:fe23:4567:890a,fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
Refresh configuration (refresh
)
Property, command, not retained
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/refresh/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/refresh
- Data type: enum (allowed payloads:
PERFORM
)
Signal (signal
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/signal
- Data type: integer (unit: dBm)
Sample value:
-26
Wireless network (ssid
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/WifiConfigurationCapability/ssid
- Data type: string
Sample value:
Valetudo Wi-Fi
Zone cleaning (ZoneCleaningCapability
)
Node, capability: ZoneCleaningCapability
Start zoned cleaning (start
)
Property, command, not retained
This handle accepts a JSON object identical to the one used by the REST API.
Please refer to the "General Help" section in Valetudo for more information.
Sample payload:
{
"zones": [
{
"points": {
"pA": {
"x": 50,
"y": 50
},
"pB": {
"x": 100,
"y": 50
},
"pC": {
"x": 100,
"y": 100
},
"pD": {
"x": 50,
"y": 100
}
}
}
],
"iterations": 1
}
- Command topic:
<TOPIC PREFIX>/<IDENTIFIER>/ZoneCleaningCapability/start/set
- Command response topic:
<TOPIC PREFIX>/<IDENTIFIER>/ZoneCleaningCapability/start
- Data type: string (format:
same json as the REST interface
)
Map data
Node
This handle groups access to map data. It is only enabled if provideMapData
is enabled in the MQTT config.
Map (map
)
Property, readable, retained
This handle is only enabled if interfaces.homie.addICBINVMapProperty
is enabled in the config. It does not actually provide map data, it only adds a Homie autodiscovery property so that 'I Can't Believe It's Not Valetudo' can publish its map within the robot's topics and be autodetected by clients.
ICBINV should be configured so that it publishes the map to this topic.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapData/map
- Data type: string
Raw map data (map-data
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapData/map-data
- Data type: string
Raw map data for Home Assistant (map-data-hass
)
Property, readable, retained
This handle is added automatically if Home Assistant autodiscovery is enabled. It provides a map embedded in a PNG image that recommends installing the Valetudo Lovelace card.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapData/map-data-hass
- Data type: string
Home Assistant components controlled by this property:
- Map data (
camera.mqtt
)
Map segments (segments
)
Property, readable, retained
This property contains a JSON mapping of segment IDs to segment names.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/MapData/segments
- Data type: string (JSON)
Sample value:
{
"16": "Hallway",
"18": "Bathroom",
"20": "Kitchen"
}
Home Assistant components controlled by this property:
- Map segments (
sensor.mqtt
)
Status
Attachment state (AttachmentStateAttribute
)
Node
Status attributes managed by this node:
- AttachmentStateAttribute
Dust bin (dustbin
)
Property, readable, retained
This handle reports whether the dust bin attachment is installed.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/AttachmentStateAttribute/dustbin
- Data type: boolean
Sample value:
true
Home Assistant components controlled by this property:
- Dust bin attachment (
binary_sensor.mqtt
)
Mop (mop
)
Property, readable, retained
This handle reports whether the mop attachment is installed.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/AttachmentStateAttribute/mop
- Data type: boolean
Sample value:
false
Home Assistant components controlled by this property:
- Mop attachment (
binary_sensor.mqtt
)
Water tank (watertank
)
Property, readable, retained
This handle reports whether the water tank attachment is installed.
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/AttachmentStateAttribute/watertank
- Data type: boolean
Sample value:
true
Home Assistant components controlled by this property:
- Water tank attachment (
binary_sensor.mqtt
)
Battery state (BatteryStateAttribute
)
Node
Status attributes managed by this node:
- BatteryStateAttribute
Battery level (level
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/BatteryStateAttribute/level
- Data type: integer percentage (unit: %)
Sample value:
42
Home Assistant components controlled by this property:
- Battery level (
sensor.mqtt
)
Battery status (status
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/BatteryStateAttribute/status
- Data type: enum (allowed payloads:
none
,charging
,discharging
,charged
)
Sample value:
charging
Vacuum status (StatusStateAttribute
)
Node
Status attributes managed by this node:
- StatusStateAttribute
Home Assistant components controlled by this node:
- Error (
sensor.mqtt
)
Robot Error (error
)
Property, readable, retained
This property contains the current ValetudoRobotError (if any)
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/StatusStateAttribute/error
- Data type: string (JSON)
Sample value:
{
"severity": {
"kind": "none",
"level": "none"
},
"subsystem": "none",
"message": ""
}
Error description (error_description
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/StatusStateAttribute/error_description
- Data type: string
Sample value:
No error
Status flag (flag
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/StatusStateAttribute/flag
- Data type: enum (allowed payloads:
none
,zone
,segment
,spot
,target
,resumable
,mapping
)
Sample value:
segment
Home Assistant components controlled by this property:
- Status Flag (
sensor.mqtt
)
Status (status
)
Property, readable, retained
- Read topic:
<TOPIC PREFIX>/<IDENTIFIER>/StatusStateAttribute/status
- Data type: enum (allowed payloads:
error
,docked
,idle
,returning
,cleaning
,paused
,manual_control
,moving
)
Sample value:
cleaning