Hi,
I flashed my xiaomi vacuum robot (1.Gen) with Valetudo. And it will work great! But how do I connect the robot with Home Assistant?
I try it with the MQTT Vacuum integration.
My config in configuration.yaml:
vacuum:
- platform: mqtt
name: "Staubi"
supported_features:
- turn_on
- turn_off
- pause
- stop
- return_home
- battery
- status
- locate
- clean_spot
- fan_speed
- send_command
command_topic: "vacuum/command"
battery_level_topic: "vacuum/state"
battery_level_template: "{{ value_json.battery_level }}"
charging_topic: "vacuum/state"
charging_template: "{{ value_json.charging }}"
cleaning_topic: "vacuum/state"
cleaning_template: "{{ value_json.cleaning }}"
docked_topic: "vacuum/state"
docked_template: "{{ value_json.docked }}"
error_topic: "vacuum/state"
error_template: "{{ value_json.error }}"
fan_speed_topic: "vacuum/state"
fan_speed_template: "{{ value_json.fan_speed }}"
set_fan_speed_topic: "vacuum/set_fan_speed"
fan_speed_list:
- min
- medium
- high
- max
send_command_topic: 'vacuum/send_command'
So I installed the Mosquitto broker AddOn with this config:
{
"logins": [{"username": "local-user", "password": "mypw"}],
"anonymous": false,
"quiet_logs": true,
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
Then I adapt the config.json file on the robot like this:
{
"spots": [],
"areas": [],
"mqtt": {
"enabled": false,
"identifier": "rockrobo",
"topicPrefix": "valetudo",
"autoconfPrefix": "homeassistant",
"broker_url": "mqtt://local-user:[email protected]",
"mapSettings": {
"drawPath": true,
"drawCharger": true,
"drawRobot": true,
"border": 2,
"scale": 4
}
},
"dummycloud": {
"spoofedIP": "203.0.113.1",
"bindIP": "127.0.0.1"
},
"map_upload_host": "http://127.0.0.1"
}
After that, I reboot the robot and home asstant and the vacuum entity appears in Home Assistant- but it doesn’t work. I can’t start the robot or anything else.
What do I wrong? Has anyone a working solution?
I’m using Hass.io on a Raspberry Pi3
Thanks for your help!