valetudo-mapper

valetudo-mapper

Docker app from c4artz' Repository

Overview

Valetudo-RE companion service for generating PNG maps. This is a simple companion service for valetudo which does all the heavy lifting. Since both CPU and Memory are limited on the robot, PNG generation for third-party components has been moved here. [b]Make sure you have already created the needed config file! Follow this example https://github.com/rand256/valetudo-mapper[b]
valetudo

valetudo mapper

ex. I can't belive it's not Valetudo

This is a simple companion service for valetudo which does all the heavy lifting.

Since both CPU and Memory are limited on the robot, PNG generation for third-party components has been moved here.

Just run this via npm start on a host with enough resources. There's also a dockerfile and automated builds available on Docker Hub.

To override the configuration inside the docker container, map it to /app/config.json. It may look like this:

{
        "mqtt" : {
            "identifier": "rockrobo",
            "topicPrefix": "valetudo",
            "autoconfPrefix": "homeassistant",
            "broker_url": "mqtt://user:pass@example.com:port",
            "caPath": "",
            "mapDataTopic": "valetudo/rockrobo/map_data",
            "minMillisecondsBetweenMapUpdates": 10000,
            "publishMapImage": true,
            "publishMapData": false
        },
        "mapSettings": {
            "colors": {
                "background": "#33a1f5",
                "background2": "#046cd4",
                "floor": "#56affc",
                "obstacle_strong": "#a1dbff",
                "path": "white",
                "forbidden_marker": "red",
                "forbidden_zone": "rgba(255, 0, 0, 0.38)",
                "cleaned_marker": "rgba(53, 125, 46, 1.0)",
                "cleaned_zone": "rgba(107, 244, 66, 0.3)",
                "cleaned_block": "rgba(107, 244, 36, 0.34)"
            },
            "drawPath": true,
            "drawCharger": true,
            "drawRobot": true,
            "drawCurrentlyCleanedZones": false,
            "drawCurrentlyCleanedBlocks": false,
            "drawForbiddenZones": true,
            "drawVirtualWalls": true,
            "scale": 4,
            "gradientBackground": true,
            "autoCrop": 20,
            "crop_x1": 30,
            "crop_y1": 70,
            "crop_x2": 440,
            "crop_y2": 440,
            "rotate": 90
        },
        "webserver": {
            "enabled": false,
            "port": 3000
        }
}

Most options are self-explanatory. Autocrop allows to get rid of empty spaces at the edges of the image, its value determines how much pixels to keep at the border. Specifying manual crop values you can cut out mirrored artifacts outside of the actual rooms on the map.

You can also run a multiple instances of a single valetudo mapper with different configuration files. For this start the instance with ./node app.js -f /path/to/config.json. You may also need to add the -c key to generate a new custom config file if it doesn't exist.

Map PNG example in HA

map

Static raster image looks worse than browser generated via HTML Canvas but will do when JS is unavailable.

FHEM, ioBroker, etc

If you set webserver.enabled to true, the map PNG will be available at http://host:port/api/map/image

Install valetudo-mapper on Unraid in a few clicks.

Find valetudo-mapper in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for valetudo-mapper Review the template variables and paths Click Install

Download Statistics

1,442,124
Total Downloads
695
This Month
786
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Explore more like this

Explore all

Details

Repository
rand256/valetudo-mapper
Last Updated2023-09-15
First Seen2021-02-16

Runtime arguments

Network
bridge
Privileged
false

Template configuration

Config filePathrw

Path to your config.json file. Follow the example here https://github.com/rand256/valetudo-mapper

Target
/app/config.json
Default
/mnt/user/appdata/valetudo-mapper/config.json
Value
/mnt/user/appdata/valetudo-mapper/config.json