Valetudo - Xiaomi Vacuum Dustcloud alternative, Live Maps

I finally have the map working using this code in docker,

although I had some problems mapping the configuration file in the container.
(Probably something wrong with my mapping command)
I was using this

docker container run -it --rm p 3000:3000 -v $PWD/config.json:app mapclient

and I kept getting

invalid configuration file, using default configuration…

Instead I entered my mqtt info in the default configuration before building the image. (/lib/configuration.js)
And then ran
docker container run -it --rm p 3000:3000 mapclient

Now that it’s working, I get a new entity in HA called camera.rockrobo_map.

Could you pleasedescripe how you built the docker fileI cloned it and made docker build . -t mapclient`

yes i used docker image build -t mapclient
but before that i modified configuration.js with my mqtt info.
then ran docker container run …

Because I get this:

hass@home-assistant:~/Docker/valetudo$ docker container run -it --rm -p 6000:3000 -v $PWD/config.json:app mapclient
docker: Error response from daemon: invalid volume specification: '/home/hass/Docker/valetudo/config.json:app': invalid mount config for type "bind": invalid mount path: 'app' mount path must be absolute.
See 'docker run --help'.

Just for Dummies like me… COuld you write down the exact procedure… I’ll make a pull rewuest for th github wike then :slight_smile:

try this docker container run -it --rm p 3000:3000 mapclient

I will try mapping the config file later when i have time (proper way).

I will write the procedures once I figure it out.

Zoned cleaning is working with this in scripts.yaml:

 vacuum_guest_room:
     alias: "vacuum guest room"
     sequence:
       - service: vacuum.send_command
         data:
           entity_id: 'vacuum.rockrobo'
           command: 'zoned_cleanup'
           params:
             'zone_ids': ['guest room']

The zone ‘guest room’ was already defined in Valetudo.

Multiple zones are possible:

            'zone_ids': ["guest room","study room","bed room","living room"]
1 Like

Thanks a lot. For the moment i still did no upgrade to 0.3.1 so t is not urgent

1 Like

Hi Thundergreen,
here are the steps required to install the map companion for Valetudo version 0.3.1 using Docker.

Download the companion.
git clone https://github.com/Hypfer/ICantBelieveItsNotValetudo.git

Change directory to your working directory.
cd ICantBelieveItsNotValetudo

create a file named config.json
nano config.json

copy this and edit with your mqtt info inside config.json

{
        "mqtt" : {
            "identifier": "rockrobo",
            "topicPrefix": "valetudo",
            "autoconfPrefix": "homeassistant",
            "broker_url": "mqtt://user:[email protected]",
            "caPath": "",
            "mapSettings": {
                "drawPath": true,
                "drawCharger": true,
                "drawRobot": true,
                "border": 2,
                "scale": 4
            },
            "mapDataTopic": "valetudo/rockrobo/map_data",
            "minMillisecondsBetweenMapUpdates": 10000,
            "publishMapImage": true
        },
        "webserver": {
            "enabled": true,
            "port": 3000
        }
}

create a file named docker-compose.yml
nano docker-compose.yml

copy this to it.

    icantbelieveitsnotvaletudo:
           build: .
           container_name: "mapcompanion"
           ports:
                 - 3000:3000
           restart: always
           volumes:
                 - /root/Docker/ICantBelieveItsNotValetudo/config.json:/app/config.json

Edit the last line with the absolute path of your config.json location (before colon only).

run docker compose

docker-compose up

That’s it.
Let me know if you have problems.

Thanks to Hypfer for this great app.

Hi @Sebastien_Couture,

Thanks for your tips !
I believe that in the docker file, you must specify restart and not restartS

Should the compose file start with version and services as well ? Like so:

version: "3.6"
services:
  icantbelieveitsnotvaletudo:
    build: .
    container_name: "icantbelieveitsnotvaletudo"
    ports:
      - 3000:3000
    restart: always
    volumes:
      - /opt/config/ICantBelieveItsNotValetudo/config.json:/app/config.json

I’ve tried running the service and ithe logs look ok:

Loading configuration file: /app/config.json
Connecting to MQTT Broker
Connected to MQTT Broker

However I get an access denied when trying to reach http://host:port/api/map/image
image

Guess I have to figure what’s going on here as well ^^.

edit: Just me being me: I did not enabled webserver in config.json. Now everything works fine !

Hi @Vlavonvidden,
you are right, it should be
restart: always
Thanks for the correction. I will change my previous post.

About version number being at the top, I’m not exactly sure if it’s required as I’m fairly new to docker.

Can anyone provide a working link to download the firmware to go through the Valetudo Install process? All of the links they mention (as well as the ones on dustcloud) are not working for me.

https://cdn.awsde0.fds.api.mi-img.com/updpkg/v11_003468.fullos.pkg

Is this working for you? It works for me ( in italy)

1 Like

YES! Thank you!

:slight_smile: No problem!

By the way, I’m uninstalling Valetudo (also ICantBelieveItsNotValetudo) because there is no point in the zoned cleaning thingie if my map gets rotated randomly through the week :confused: Any tip ?

I’m gonna stay stock

I’m not sure that will help you much. I’ve been running stock for 6 months or so now and my map gets screwed up from time to time too. :confused:

Doh, I have the robot since 4 days :confused:

Even with Xiaomi App and latest firmware? :pensive:

Yup. Mi Home app and the latest firmware that the Mi Home will install for me. It didn’t do this before, though. So, perhaps an older firmware would work better?

Alternately, you could install the FloleVac app and see if a newer firmware (newer than Xiaomi provides va firmware update) would fix this? I think, in doing so, you lose root/valetudo though. So you’d have to go through that process again if you wanted valetudo back.

Yep, that’s what I’m trying to do. But now can’t see the vacuum on FloleVac :confused:
I want to reset to stock but Wifi reset+ home button hold is not working for me

are you still able to control the vac with HASS and/or Mi Home?