Skip to content

kuhlivisj/valetudo-mapper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

{
        "mqtt" : {
            "identifier": "rockrobo",
            "topicPrefix": "valetudo",
            "autoconfPrefix": "homeassistant",
            "broker_url": "mqtt://user:[email protected]:port",
            "caPath": "",
            "mapSettings": {
                "drawPath": true,
                "drawCharger": true,
                "drawRobot": true,
                "drawForbiddenZones": true,
                "drawVirtualWalls": true,
                "border": 2,
                "scale": 4,
                "gradientBackground": true,
                "crop_x1": 30,
                "crop_y1": 70,
                "crop_x2": 440,
                "crop_y2": 440
            },
            "mapDataTopic": "valetudo/rockrobo/map_data",
            "minMillisecondsBetweenMapUpdates": 10000,
            "publishMapImage": true,
            "publishMapData": false
        },
        "webserver": {
            "enabled": false,
            "port": 3000
        }
}

Guessed crop values allow to get rid of empty spaces at the edges of the image.

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

TheLastProject/lovelace-valetudo-map-card

To make Valetudo RE compatible with lovelace-valetudo-map-card project, enable publishMapData option and set map sensor source in HA to topicPrefix/identifier/map_data_parsed (i.e. valetudo/rockrobo/map_data_parsed).

About

Valetudo companion service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.7%
  • Dockerfile 0.3%