Xiaomi Vacuum with Valetudo RE: How to MAP, Zoned Cleaning and Notifications with Home Assistant?

Hello,

I have a Xiaomi Vacuum Gen 1 with running Valetudo. It works fine via IP / App control and now I would like to integrate it with HA. Question: how?

As I see it there are several topics on this community with hours to read, some are outdated, some require advanced knowledge that I lack.

What I figured is it would be best to install Mosquito add-on and to somehow connect it with the vacuum. I did not manage that.

Can somebody guide me on how to do that?

Second, I would like to know how to send commands to the new mqtt-vacuum and how to read the status to get me notified.

Thank you!

EDIT 01:
I managed (with help of @komadori1) to get the live map working. I wrote down the steps I took here: Post21

EDIT 02:
I will add my configuration for Notifications and Automations within the next days.

I am using the Gen2 vacuum, so not really sure how much is applicable to your Gen1, but there was no difference on how to integrate the vacuum to HA, whether Valetudo was installed on it or not.

As described here, that is all that is needed. Since you have Valetudo, getting the token should be a breeze as well.

While I have mqtt enabled, I only use it to display the map. Did not know you can control it with it, but I also figured why? There are services that control the vacuum and give state feedbacks in the link that work perfectly fine for me

1 Like

You are right. Thank you! Works like a charm.
Which guide did you use to get the live map?
Did you manage to get HA to report when the vacuum encounters an error? I read one has to implement a custom sensor…?!

Glad this worked so flawlessly!

I am using valetudo map card installed from HACS. For this to work you have to enable MQTT. It is already installed, you “simply” have to configure it.
I assume you followed the instructions for rooting the vacuum and created ssh keys, so

  1. install something like filezilla and connect to your vacuum
  2. Host: Vacuum IP
  3. Username: root
  4. Password: empty (since you have the ssh keys)
  5. Port: 22
  6. navigate to /mnt/data/valetudo
  7. copy config.json to your workspace
  8. edit the file

mine looks like this

{
  "spots": [],
  "areas": [],
  "mqtt": {
    "enabled": true,
    "identifier": "roborock",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.0.7",
    "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 2,
      "scale": 4
    }
  },
  "dummycloud": {
    "spoofedIP": "203.0.113.1",
    "bindIP": "127.0.0.1"
  },
  "httpAuth": {
    "enabled": false,
    "username": "valetudo",
    "password": "valetudo"
  },
  "allowSSHKeyUpload": true,
  "map_upload_host": "http://127.0.0.1"
}
  1. overwrite the config.json (by pushing it back with filezilla onto the robot)
  2. create the sensor in your configuration.yaml

mine looks like this, note the identifier and topic prefix

  - platform: mqtt
    state_topic: "valetudo/roborock/map_data"
    json_attributes_topic: "valetudo/roborock/map_data"
    name: xiaomi_map
    value_template: 'OK'
    scan_interval: 5
  1. and as noted in the github link provided - exclude it from the recorder
recorder:
  exclude:
    entities:
      - sensor.xiaomi_map

and then it is just to include the map as described as a card

  1. include the resource in your lovelace
resources:
  - type: module
    url: /community_plugin/lovelace-valetudo-map-card/valetudo-map-card.js
  1. add the card
type: 'custom:valetudo-map-card'
entity: sensor.xiaomi_map
rotate: 0
crop:
  top: 0
  bottom: 0
  left: 0
  right: 0
min_height: 0

you can get the state of the vacuum like docked, cleaning and more, including error from the attrbute
states.vacuum.xiaomi_vacuum_cleaner.attributes["status"]

so techincally you could get a sensor, or if you are only interested in the error, get an automation going that asks for the state being error

2 Likes

Thank you for all your help. I finally found time to try to get this working.
I installed HACS and thanks to you I have a nice looking Custom card for my vacuum but the live map is still a struggle.

I added to my configuration.yaml:

sensor:
  - platform: mqtt
    state_topic: "valetudo/tachikoma/state"
    json_attributes_topic: "valetudo/tachikoma/map_data"
    name: tachikoma_map
    value_template: 'OK'
    scan_interval: 5

recorder:
  exclude:
    entities:
      - sensor.tachikoma_map

I installed the valetudo map card via HACS and added it to my resources. Then I placed it a card in one of my sheets but it keeps saying
image
my code behind this card is

type: 'custom:valetudo-map-card'
entity: sensor.tachikoma_map
rotate: 0
crop:
  top: 0
  bottom: 0
  left: 0
  right: 0
min_height: 0
show_dock: true
show_vacuum: true
show_path: true
map_scale: 1
icon_scale: 1

Before that I edited the config.json on my robot to

  "mqtt": {
    "enabled": true,
    "identifier": "tachikoma",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.188.45",
    "provideMapData": true,
    "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 2,
      "scale": 4
    },
    "caPath": ""
  },
  "dummycloud": {
    "spoofedIP": "203.0.113.1",
    "bindIP": "127.0.0.1"
  },
  "httpAuth": {
    "enabled": false,
    "username": "valetudo",
    "password": "valetudo"
  },
  "allowSSHKeyUpload": true,
  "map_upload_host": "http://127.0.0.1"
}

and rebooted the robot.

Is there anything I am missing with this setup?

Another thing I might wonder:
I first installed valetudo following the official installation guide. After that I stumbled upon valetudo RE and installed it via copying the .deb package onto the robot. It rebooted and it showed “Valetudo RE” at the software info screen. For a few days now it only says “Valetudo” so I am not even sure which version is installed on my robot. I say this because the guide to Valetudo map card states, if one was running valetudo RE they should install valetudo-mapper but I don’t know how to do that.
Any help appreciated!

I’ve never tried RE, but you could give RRCC a try, there is a button to check the valetudo version, might tell you if its RE - or if you do not care for RE, install valetudo through it
But again, never tried RE so try reading up if this wont break anything for you if you decide to install valetudo over valetudo RE

there are a few things you can do (probably before overwriting valetudo)

  1. go to home assistant -> developer tools -> MQTT -> listen to a topic -> valetudo/# (the # is important) and see if the vacuum is sending messages, especially the sensor
  2. check the logs /var/log/upstart/valetudo.log

and just to be sure, the card editor in HA shows me this source code for the card:

crop:
  bottom: 0
  left: 30
  right: 0
  top: 0
entity: sensor.xiaomi_map
min_height: 0
rotate: 0
type: 'custom:valetudo-map-card'
1 Like

btw - can you go to your robot IP and maybe check there? I have a version field that tells me it is 0.4.0 under settings -> info -> valetudo version

and another thing that comes to mind -do you see the sensor in the developer tools -> states section?

  1. If I listed to the mqtt topic valetudo/’ it says:
Message 3 received on valetudo/tachikoma/attributes at 4:16 PM:
{
    "cleanTime": "168.9",
    "cleanArea": "8763.3",
    "cleanCount": 495,
    "last_run_stats": {
        "startTime": 1582292877000,
        "endTime": 1582292886000,
        "duration": 0,
        "area": "0.0",
        "errorCode": 0,
        "errorDescription": "No error",
        "finishedFlag": false
    },
    "mainBrush": "131.1",
    "sideBrush": "31.1",
    "filter": "144.8",
    "sensor": "28.3",
    "state": "docked",
    "valetudo_state": {
        "id": 8,
        "name": "Charging"
    }
}
QoS: 0 - Retain: false
Message 2 received on valetudo/tachikoma/attributes at 4:16 PM:
{
    "cleanTime": "168.9",
    "cleanArea": "8763.3",
    "cleanCount": 495,
    "last_run_stats": {
        "startTime": 1582292877000,
        "endTime": 1582292886000,
        "duration": 0,
        "area": "0.0",
        "errorCode": 0,
        "errorDescription": "No error",
        "finishedFlag": false
    },
    "mainBrush": "131.1",
    "sideBrush": "31.1",
    "filter": "144.8",
    "sensor": "28.3",
    "state": "docked",
    "valetudo_state": {
        "id": 8,
        "name": "Charging"
    }
}
QoS: 0 - Retain: false
Message 1 received on valetudo/tachikoma/state at 4:15 PM:
{
    "state": "docked",
    "battery_level": 100,
    "fan_speed": "max"
}
QoS: 0 - Retain: true
Message 0 received on valetudo/tachikoma/attributes at 4:15 PM:
{
    "cleanTime": "168.9",
    "cleanArea": "8763.3",
    "cleanCount": 495,
    "last_run_stats": {
        "startTime": 1582292877000,
        "endTime": 1582292886000,
        "duration": 0,
        "area": "0.0",
        "errorCode": 0,
        "errorDescription": "No error",
        "finishedFlag": false
    },
    "mainBrush": "131.1",
    "sideBrush": "31.1",
    "filter": "144.8",
    "sensor": "28.3",
    "state": "docked",
    "valetudo_state": {
        "id": 8,
        "name": "Charging"
    }
}
QoS: 0 - Retain: true
  1. When I got to my robot IP and check the software version it says

So i figure this is the common valetudo non-RE version.

  1. this is what my card editor says, guess it’s just a different order from yours but basically the same:
type: 'custom:valetudo-map-card'
entity: sensor.tachikoma_map
rotate: 0
crop:
  top: 0
  bottom: 0
  left: 0
  right: 0
min_height: 0
show_dock: true
show_vacuum: true
show_path: true
map_scale: 1
icon_scale: 1
  1. When I go to my entities from Configuration -> Entities it does not show the sensor.tachikoma_map but when I add a new card “entities” to my home screen and type sensor, the sensor.tachikoma_map gets suggested like any other sensor. Look:

everything looking good, except I do not see the sensor sending. I am missing the map message:

Message 2 received on valetudo/rockrobo/map_data at 3:56 PM:

{
    "header_length": 20,
    "data_length": 50012,
    "version": {
        "major": 1,
        "minor": 0
    },
    "map_index": 1107,
    "map_sequence": 5561,
    "image": {
        "position": {
            "top": 284,
            "left": 218
        },
        "dimensions": {
            "height": 344,
            "width": 491
        },
        "pixels": {
            "floor": [
                [
                    151,
                    271
                ],
                [
                    152,
                    271
                ],
..

two more things:

  1. Have you perhaps installed pi-hole and are blocking some xiaomi dns requests?
  2. Have you started a full clean-up and had it run from start to finish without interrupting it?
  1. yes pihole is installed and probably blocking some external xiaomi sites. since valetudo is installed that should not use the xiaomi cloud I thought this would be no problem?
  2. I have started a full cleanup since I enabled mqtt on the robot but only for a few seconds to check if it was creating the map. nothing happened and I send it back to the dock.

this is my config.json code on the robot:

"mqtt": {
    "enabled": true,
    "identifier": "tachikoma",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.188.45",
    "provideMapData": true,
    "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 2,
      "scale": 4
    },
    "caPath": ""
  },
...

Is there something wrong with mapsettings or needs “caPath” to be filled in?

EDIT: valetudo.log on the robot is saying:

No configuration file present. Creating one at: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.clean_complete","params":[0],"id":1125715478}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Invalid configuration file!
Writing new file using defaults
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1036616996}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":840822976}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.clean_complete","params":[0],"id":264016014}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":2050962999}
No response for message: {"method":"event.zoned_clean_succ","params":[0],"id":798805724}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1752999744}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1326773088}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":585980527}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected

<--- Last few GCs --->
 G[1118:0x19b36a0] 62582668 ms: Mark-sweep 32.7 (36.6) -> 32.7 (36.6) MB, 168.6 / 0.0 ms  (+ 3.4 ms in 1 steps since start of marking, biggest step 3.4 ms, walltime since start of marking 217 ms) (average mu = 0.245, current mu = 0.212) allocation failure G[1118:0x19b36a0] 62582882 ms: Mark-sweep 32.7 (36.6) -> 32.7 (36.6) MB, 171.2 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 214 ms) (average mu = 0.226, current mu = 0.202) allocation failure G

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.clean_complete","params":[0],"id":921288631}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":856837921}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":2021248356}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1604186642}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1585559753}
No response for message: {"method":"event.zoned_clean_partial_done","params":[0],"id":1341378886}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
No response for message: {"method":"event.zoned_clean_succ","params":[0],"id":996670084}
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Robot connected
Loading configuration file: /mnt/data/valetudo/config.json
Dummycloud is spoofing 203.0.113.1:8053 on 127.0.0.1:8053
Webserver running on port 80
Connected successfully to mqtt server
Robot connected
Connected successfully to mqtt server
Robot connected
Robot connected
Robot connected

So as I see it apparently there is something wrong with the config on the robot itself?

Do you see the map when you go to the IP? From my understanding, valetudo is just rerouting the cloud messages to itself instead of phoning home, and thus many people did not see a map at all

no your settings look alright

Can you show me boot.log?

check if the config.json is really reset - I don’t think so since you still get MQTT messages and connect to the server

Fun fact however: roborock restarts every day at around 3:30 to 4am and if it encounters errors on boot, a counter is being increased - if the counter is high enough, it resets its firmware

When I go to the robot IP the map works very fine. I see everything, I can draw zones and move to commands. Everything works.
This is what boot.log on my robot shows:

 * Starting Mount filesystems on boote[74G[ OK ]
 * Starting Signal sysvinit that the rootfs is mountede[74G[ OK ]
 * Starting Populate /dev filesysteme[74G[ OK ]
 * Stopping Populate /dev filesysteme[74G[ OK ]
 * Starting Clean /tmp directorye[74G[ OK ]
 * Stopping Clean /tmp directorye[74G[ OK ]
 * Starting Populate and link to /run filesysteme[74G[ OK ]
 * Stopping Populate and link to /run filesysteme[74G[ OK ]
 * Stopping Track if upstart is running in a containere[74G[ OK ]
 * Starting Initialize or finalize resolvconfe[74G[ OK ]
 * Starting set console keymape[74G[ OK ]
 * Starting Signal sysvinit that virtual filesystems are mountede[74G[ OK ]
 * Starting Signal sysvinit that virtual filesystems are mountede[74G[ OK ]
 * Stopping set console keymape[74G[ OK ]
 * Starting Bridge udev events into upstarte[74G[ OK ]
 * Starting Signal sysvinit that remote filesystems are mountede[74G[ OK ]
 * Starting device node and kernel event managere[74G[ OK ]
 * Starting load modules from /etc/modulese[74G[ OK ]
 * Starting cold plug devicese[74G[ OK ]
 * Starting rockrobo play bootring servicee[74G[ OK ]
 * Starting log initial device creatione[74G[ OK ]
 * Stopping rockrobo play bootring servicee[74G[ OK ]
 * Starting configure network device securitye[74G[ OK ]
 * Stopping load modules from /etc/modulese[74G[ OK ]
 * Starting Mount network filesystemse[74G[ OK ]
 * Stopping cold plug devicese[74G[ OK ]
 * Starting set console fonte[74G[ OK ]
 * Stopping log initial device creatione[74G[ OK ]
 * Stopping set console fonte[74G[ OK ]
 * Starting userspace bootsplashe[74G[ OK ]
 * Stopping userspace bootsplashe[74G[ OK ]
 * Starting Send an event to indicate plymouth is upe[74G[ OK ]
 * Stopping Read required files in advance (for other mountpoints)e[74G[ OK ]
 * Stopping Send an event to indicate plymouth is upe[74G[ OK ]
 * Starting configure network devicee[74G[ OK ]
 * Stopping Mount network filesystemse[74G[ OK ]
 * Starting Signal sysvinit that local filesystems are mountede[74G[ OK ]
 * Starting configure network device securitye[74G[ OK ]
 * Starting flush early job output to logse[74G[ OK ]
 * Starting adb daemone[74G[ OK ]
 * Stopping Failsafe Boot Delaye[74G[ OK ]
 * Starting System V initialisation compatibilitye[74G[ OK ]
 * Stopping flush early job output to logse[74G[ OK ]
 * Starting configure virtual network devicese[74G[ OK ]
 * Stopping System V initialisation compatibilitye[74G[ OK ]
 * Starting system logging daemone[74G[ OK ]
 * Starting System V runlevel compatibilitye[74G[ OK ]
 * Starting logrotate 5s check daemone[74G[ OK ]
 * Starting save kernel messagese[74G[ OK ]
 * Starting OpenSSH servere[74G[ OK ]

dnsmasq: unknown interface wlan0
 * Starting regular background program processing daemone[74G[ OK ]
 * Stopping save kernel messagese[74G[ OK ]
 * Starting DNS forwarder and DHCP server dnsmasq       e[80G 
e[74G[e[31mfaile[39;49m]
 * Starting rrwatchdoge daemone[74G[ OK ]
 * Starting Bridge file events into upstarte[74G[ OK ]
 * Stopping System V runlevel compatibilitye[74G[ OK ]

As you suggest, the config.json is not reset. I just checked, my zones and all mqtt settings are perfectly in place.
Funfact: is this a valetudo or a xiaomi setting? Actually I don’t think it has a booting problem. I can reboot the robot via ssh without any problems anytime. Comes right back up after a minute or so.

EDIT:

you said to put into configuration.yaml the following:

state_topic: "valetudo/roborock/map_data"

but the official guide says

state_topic: "valetudo/rockrobo/state"

Is this important?

this used to give me troubles before, but is unrelated to the issue at hand, you can fix it by changing the line in /etc/dnsmasq.conf from bind-interfaces to bind-dynamic

The fun fact is a xiaomi thing, nothing valetudo can do about it

I am still wondering if you have valetudo RE installed and it just does not show you in the version that it is RE?

reading up on this, it seems this was a firmware reset which got you back to valetudo, so you should be fine

Here is another topic on github that had the same issue as you - you might try RRCC from the previous post and install valetudo from there (save the config.json first)

no, this was a copy paste error on my side

1 Like

OK new evening new try.

what you said earlier, that you think there is still valetudo RE installed but the interface just showed me a different version induced me to reinstall valetudo again.
I copied the .deb file from here to my vacuum using filezilla, logged into the robot via ssh and installed it with dpkg -i filename.deb. Now the IP of my vacuum shows the following software information:

this used to give me troubles before, but is unrelated to the issue at hand, you can fix it by changing the line in /etc/dnsmasq.conf from bind-interfaces to bind-dynamic

I fixed this, just to be sure. Thanks for the hint.

Now, robot is running fine, my config.json on my valetudo re enabled robot looks like this:

  "mqtt": {
    "enabled": true,
    "identifier": "tachikoma",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.188.45",
    "provideMapData": true,
    "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 2,
      "scale": 4
    },
    "caPath": ""
  },
  "dummycloud": {
    "spoofedIP": "203.0.113.1",
    "bindIP": "127.0.0.1"
  },
  "webInterface": {
    "localization": "en",
    "hideMapReload": true,
    "style": ""
  },
  "httpAuth": {
    "enabled": false,
    "username": "valetudo",
    "password": "valetudo"
  },
  "telegramBot": {
    "enabled": false,
    "token": "",
    "password": "",
    "host": "",
    "proxy": "",
    "clients": [],
    "sendConsumables": true,
    "sendConsumablesEvery": false
  },
  "allowSSHKeyUpload": true,
  "map_upload_host": "http://127.0.0.1"
}

If I listen to mqtt topic valetudo/# in home assistant I can see:

Message 8 received on valetudo/tachikoma/attributes at 8:21 PM:
{
    "cleanTime": "169.5",
    "cleanArea": "8805.5",
    "cleanCount": 501,
    "last_run_stats": {
        "startTime": 1582372097000,
        "endTime": 1582373128000,
        "duration": 968,
        "area": "15.0",
        "errorCode": 0,
        "errorDescription": "No error",
        "finishedFlag": true
    },
    "currentCleanTime": "16.1",
    "currentCleanArea": "15.0",
    "mainBrush": "130.5",
    "sideBrush": "30.5",
    "filter": "144.2",
    "sensor": "27.7",
    "state": "docked",
    "valetudo_state": {
        "id": 8,
        "name": "Charging"
    }
}

No map data shows up. Don’t know where to go from here?
The link you provided suggest I should reinstall valetudo again from scratch right? Don’t know if I am in for that honestly…

Since you are now on valetudo RE, the best choice is now to go for valetudo-mapper :slight_smile: I have never tried it, but from my understanding:

If you are running home assistant (formerly known hassio), there should be an add-on
If you are running home assistant core (formerly known home assistant) in a docker then use the dockerfile and map the config
Or simply just run it with npm start as described

My only guess at this point is (and it is really just a guess), that you had a firmware reset from valetudo RE to valetudo 0.4.0 but some files from RE were still there.

That’s why I love RRCC, once it is rooted and you have your ssh pair, you can connect to it with a nice gui and 1 click install valetudo. Saved me a ton of work when the robot had its firmware reset before.
But then again, I have never tried valetudo RE and do not know if you can simply override it. I’d give the mapper a try first, does not seem too difficult

You are absolutely right. I used RRCC after I retrieved the token to install valetudo in the first place. It was almost plug’n’play, very nice.
I just managed to get valetudo-mapper running on my laptop but this was more of a test. Where did you find this add-on for HA? Searched everywhere did not find it. And when I just want to create it as a docker container I cant seem to figure out how to bind mount /data/config.json as mentioned in the instructions. Because this is a file it always tells me config.json is a directory…

I don’t use home assistant (formerly hassio), so I am not sure how addons are integrated, I kinda just know they are there and when doing some research I found repositories like:
this one or this one

Are you using docker-compose or docker? Can you share your commands?

You might have used a trailing “/”

I just tried it myself, the log looks fine for me

commandline:

Creating valetudo-mapper-master_mapper ... done
Attaching to valetudo-mapper-master_mapper
mapper  | 
mapper  | > [email protected] start /app
mapper | > node app.js
mapper  | 
mapper  | Loading configuration file: /app/config.json
mapper  | Connecting to MQTT Broker

container log (from portainer):

[email protected] start /app
node app.js
Loading configuration file: /app/config.json
Connecting to MQTT Broker

This is the docker-compose I was using:

version: '3'
services:
  mapper:
    build: .
    ports:
     - "3000:3000"
    volumes:
     - $dockerdir/valetudo-mapper-master/config.json:/app/config.json

I got it up and running, but since I do not have valetudo RE i could not test it working

1 Like