Giter VIP home page Giter VIP logo

icantbelieveitsnotvaletudo's Introduction

valetudo

I can't believe it's not Valetudo

This repository is archived

Head over to https://github.com/erkexzcx/valetudopng for its successor

Prior readme

ICBINV is a companion service for Valetudo that renders ValetudoMap map data to raster graphics.

Incoming ValetudoMap Data is received via MQTT. Rendered map images are published to MQTT and can optionally also be requested via HTTP (if enabled)

Please note that this service is only maintained on a very basic level.

Why would I need this?

If you're using Home Assistant, you probably don't as the custom valetudo lovelace map card does a much better job than ICBINV while also being way easier to install, update and use.

If you however use FHEM, OpenHAB or similar, this might be the only way to view the map data using your home automation system.

Installation

The recommended install method for ICBINV is to clone the repo and then use the provided Dockerfile.

With docker-compose, it would look something like this:

  icantbelieveitsnotvaletudo:
    build:
      context: ./ICantBelieveItsNotValetudo/
      dockerfile: Dockerfile
    container_name: "ICantBelieveItsNotValetudo"
    restart: always
    volumes:
      - /opt/docker_containers/ICantBelieveItsNotValetudo/config.json:/app/config.json

If you have multiple robots, simply deploy multiple instances of ICBINV.

If you don't want to use docker, you will need to install a recent nodejs version + npm installed on your host.

First, install the dependencies with npm ci. Then, you can start the application by running npm run start.

Configuration

To configure I can't believe it's not Valetudo, create a file called config.json in the working directory. You can also run npm start to automatically create a default configuration file.

If you are running in docker, map the configuration file to /app/config.json .

Integration with FHEM, ioBroker, openHAB etc

Enabling the webserver in the configuration file will allow you to fetch the latest rendered map image via http://host:port/api/map/image.
The map will also be available as base64-encoded string at http://host:port/api/map/base64.

By default, the image data is published via MQTT to mqtt.topicPrefix/mqtt.identifier/MapData/map as a raw binary image.
If mqtt.publishAsBase64 is set to true, the image data will instead be published as base64-encoded string, which can be useful for OpenHAB.

icantbelieveitsnotvaletudo's People

Contributors

alexkn avatar antlarr avatar bschneppe avatar depau avatar hypfer avatar ingoschi avatar jackgruber avatar jerome-labidurie avatar kaffeefritze avatar klada avatar mikispag avatar poeschl avatar romanreibnagel avatar svenfestersen avatar timbru31 avatar tinkerdudeno1 avatar trancefam avatar xorob0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icantbelieveitsnotvaletudo's Issues

crop and color doesn't have effects

hello,

i have an issue, the crop parameters don't have any effect on the image. the drawRobot, scale and other parameters are working fine.
if i write the mapSettings outside the "mqtt": { } all the parameters don't work.

here's my app/config.json , my map is 1430x1200 by default :

{ "mqtt": { "identifier": "rockrobo", "topicPrefix": "valetudo", "autoconfPrefix": "homeassistant", "broker_url": "mqtt://XXXXXXXXXXXX", "caPath": "", "mapSettings": { "crop_x1": 350, "crop_y1": 400, "crop_x2": 1100, "crop_y2": 900, "drawPath": true, "drawCharger": true, "drawRobot": true, "border": 2, "scale": 2 }, "mapDataTopic": "valetudo/rockrobo/map_data", "minMillisecondsBetweenMapUpdates": 10000, "publishMapImage": true }, "webserver": { "enabled": true, "port": 3000 } }

anyone having the same problem ? any solution ?

Can' t install via npm

Hi!
I am not a very experienced programmer but try since hours to install this package via npm.

This is what I did:

  1. sudo mkdir /opt/ICantBelieveItsNotValetudo
  2. sudo git clone https://github.com/Hypfer/ICantBelieveItsNotValetudo.git /opt/ICantBelieveItsNotValetudo
  3. cd /opt/ICantBelieveItsNotValetudo
  4. sudo npm install

This is the result:
npm ERR! code 1
npm ERR! path /opt/ICantBelieveItsNotValetudo/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | arm
npm ERR! node-pre-gyp info check checked for "/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release/canvas.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-linux-glibc-arm.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-linux-glibc-arm.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v93 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v93-linux-glibc-arm.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/gregor/.cache/node-gyp/16.13.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/gregor/.cache/node-gyp/16.13.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/gregor/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/ICantBelieveItsNotValetudo/node_modules/canvas',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! Package pixman-1 was not found in the pkg-config search path.
npm ERR! Perhaps you should add the directory containing pixman-1.pc' npm ERR! to the PKG_CONFIG_PATH environment variable npm ERR! No package 'pixman-1' found npm ERR! gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.63-v7+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
npm ERR! gyp ERR! cwd /opt/ICantBelieveItsNotValetudo/node_modules/canvas
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.3.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/ICantBelieveItsNotValetudo/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/opt/ICantBelieveItsNotValetudo/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.10.63-v7+
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/opt/ICantBelieveItsNotValetudo/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /opt/ICantBelieveItsNotValetudo/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v16.13.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.7
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/gregor/.npm/_logs/2022-01-11T09_44_44_783Z-debug.log

I don’t know how to handle that can anybody help please?

crop pixels outside map

On my map a few pixels are generated outside my apartment.
Probably because the laser is reflected somewhere.
Is there a way to crop the map to certain coordinates?

Use robot to build wifi heatmap

This is to suggest an enhancement. Please let me know if you would be able to work on it.
I was wondering if we could use the robot to capture wifi information (RSSI, noise, RX/TX rate) while hoovering.
We could then push this data over MQTT and build a very accurate wifi heat map.
This would be very good to have to place the access points in the right location.
image

Don't know how to install

Hallo everyone,

I was trying to install ICantBelieveItsNotValetudo but couldn't get it to work.

In the documentation is written, that you need to clone it from git and usw npm install. I tried it, but couldn't get it done. Can someone help me with this?

grafik

Howto Debug during Setup

Hi, I'm Dario from Germany,

I hope this is the right place to ask.

I found this nice Project and I tried to set it up but I run into problems,
thus I have a question regarding the logLevel, which I think I'm not able to change,

What I did:

icantbelieveitsnotvaletudo:
    build:
      context: ./ICantBelieveItsNotValetudo/
      dockerfile: Dockerfile
    container_name: "iot-ICantBelieveItsNotValetudo"
    restart: unless-stopped
    user: "1000:1000"   
    networks:
      - proxy      
    ports:
      - "3000:3000"
    volumes:
      - ./ICantBelieveItsNotValetudo/config.json:/app/config.json

Then i created an empty file
touch ./ICantBelieveItsNotValetudo/config.json
And fired up the Container.
docker-compose up icantbelieveitsnotvaletudo
A default config.json is generated and I edited it to my needs and everything seems OK (I get no Errors in the Log)
But nothing happens, The Webserver returns Not Found when requesting http://[IP]:3000/api/map/image
and I don't see any messages published by icantbelieveitsnotvaletudo

Here is my Question:

To enable more Debugging-Output i changed logLevel in config.json to
"logLevel": "trace"
But it seems to have no effect.

What am I doing wrong?

How to install it via Docker

I followed the instruction:

  1. Can not find the docker package with docker pull.
  2. docker compose do not work with the provided script.

Honestly.. really not well explained the how to.. install and use this package.

error while starting

I tried to start it with npm start then this was the output: Any adivce?
Installation did went well but starting...

/root/Icantbelieveitsnotvaletudo/lib/MqttClient.js:30
        this.caPath = options.caPath ?? "";
                                      ^

SyntaxError: Unexpected token ?
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/root/Icantbelieveitsnotvaletudo/app.js:3:20)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1

High cpu usage on valetudo 0.6.1

Every since upgrading to valetudo 0.6.1, the mapper consumes about a full core on a i7-7700T
The config beeing

{
  "mapsettings": {
    "drawCharger": true,
    "drawPath": true,
    "drawRobot": true,
    "scale": 4
  },
  "mqtt": {
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://mosquitto.homeassistant",
    "identifier": "Roborock",
    "mapDataTopic": "valetudo/Roborock/map_data",
    "minMillisecondsBetweenMapUpdates": 5000,
    "publishMapImage": true,
    "topicPrefix": "valetudo"
  },
  "webserver": {
    "enabled": false,
    "port": 3000
  }
}

And the usage looks like this
Screenshot 2020-08-04 at 12 49 46

Cannot find a docker with rotate option?

Hello

I cannot find a dockerfile that uses the newer option of rotate. Can you point me in the right direction please? As you don't have a docker for it?

Cheers
Mark

App crashes after a while

I tested it on 2 different Raspberry Pi 3b+ with the same result.
After about 40 seconds the app crashes:

[2021-04-07T09:51:19.144Z] [INFO] Map drawn in 1284.388783 ms
[2021-04-07T09:51:27.856Z] [INFO] Drawing map...
Segmentation fault
npm ERR! code ELIFECYCLE
npm ERR! errno 139
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 139
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-04-07T09_51_28_503Z-debug.log

2021-04-07T09_51_28_503Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/home/pi/.nvm/versions/node/v14.16.0/bin/node',
1 verbose cli   '/home/pi/.nvm/versions/node/v14.16.0/bin/npm',
1 verbose cli   'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /home/pi/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/Icantbelieveitsnotvaletudo/node_modules/.bin:/home/pi/.nvm/versions/node/v14.16.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
9 verbose lifecycle [email protected]~start: CWD: /home/pi/Icantbelieveitsnotvaletudo
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node app.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 139  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node app.js`
13 verbose stack Exit status 139
13 verbose stack     at EventEmitter.<anonymous> (/home/pi/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:315:20)
13 verbose stack     at ChildProcess.<anonymous> (/home/pi/.nvm/versions/node/v14.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:315:20)
13 verbose stack     at maybeClose (internal/child_process.js:1048:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/pi/Icantbelieveitsnotvaletudo
16 verbose Linux 5.4.51-v7+
17 verbose argv "/home/pi/.nvm/versions/node/v14.16.0/bin/node" "/home/pi/.nvm/versions/node/v14.16.0/bin/npm" "start"
18 verbose node v14.16.0
19 verbose npm  v6.14.11
20 error code ELIFECYCLE
21 error errno 139
22 error [email protected] start: `node app.js`
22 error Exit status 139
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 139, true ]

config.json:

{
  "mapSettings": {
    "drawPath": true,
    "drawCharger": true,
    "drawRobot": true,
    "scale": 4
  },
  "mqtt": {
    "identifier": "rockrobo",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "fhem",
    "broker_url": "mqtt://xxx:xxx@xxx",
    "caPath": "",
    "mapDataTopic": "valetudo/rockrobo/map_data",
    "minMillisecondsBetweenMapUpdates": 10000,
    "publishMapImage": false
  },
  "webserver": {
    "enabled": true,
    "port": 3002
  }
}

Can't launch Valetudo Floorplan

Hi, i've installed valetudo's addon in Hassio on pi3. I have rockrobo s50 with firmware 1910 with valetudo. After start of the addon i have "not found" in hassio.
{ "identifier": "rockrobo", "topicPrefix": "valetudo", "autoconfPrefix": "homeassistant", "broker_url": "mqtt://user:[email protected]:1883", "caPath": "", "mapSettings": { "drawPath": true, "drawCharger": true, "drawRobot": true, "border": 2, "scale": 4 }, "mapDataTopic": "valetudo/rockrobo/map_data", "minMillisecondsBetweenMapUpdates": 10000, "publishMapImage": true }

No map data in MQTT

Hi,

With this config file on the robot:

{ "spots": [], "areas": [], "mqtt": { "enabled": true, "identifier": "rockrobo", "topicPrefix": "valetudo", "autoconfPrefix": "homeassistant", "broker_url": "mqtt://192.168.0.9:1883", "provideMapData": true }, "dummycloud": { "spoofedIP": "203.0.113.1", "bindIP": "127.0.0.1" }, "map_upload_host": "http://127.0.0.1" }

I see data being posted to my MQTT broker on /valetudo/rockrobo/attributes and /homeassistant/vacuum/valetudo_rockrobo/config. However, when I start cleaning, no map data appears. How long does it take before map data should appear in the MQTT broker? What could be wrong?

Valetudo 0.3.1 running

Reorganize configuration

While working on the documentation I realized that the configuration object does not have a logical structure: the map settings are a child of the MQTT configuration and also contain an unused option ("border"). I would like to refactor the configuration:

  • move mqtt.mapSettings to the top level
  • remove mapSettings.border
  • and while I'm on it: address issue #11 and make the Configuration object write config.json only if it does not exist

Since this is a breaking change for existing configurations, I would like to know if there are any objections to this plan?

Map drawing error after updating Valetudo to 0.6.1

After updating Valetudo to 0.6.1 ICantBelieveItsNotValetudo (is running in docker) drops an error.
I have logs from Portainer here:

> [email protected] start /app
> node app.js
Loading configuration file: /app/config.json
Connecting to MQTT Broker
Webserver running on port 3000
Connected to MQTT Broker
TypeError: Cannot read property 'dimensions' of undefined
    at Object.DRAW_MAP_PNG (/app/lib/Tools.js:69:72)
    at MqttClient.updateMapTopic (/app/lib/MqttClient.js:97:19)
    at MqttClient.client.on (/app/lib/MqttClient.js:80:22)
    at emitThree (events.js:136:13)
    at MqttClient.emit (events.js:217:7)
    at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:987:12)
    at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:336:12)
    at work (/app/node_modules/mqtt/lib/client.js:292:12)
    at Writable.writable._write (/app/node_modules/mqtt/lib/client.js:302:5)
    at doWrite (/app/node_modules/readable-stream/lib/_stream_writable.js:428:64)

And this error TypeError: ... appears every 5 seconds.
Valetudo works, displays picture in Valetudo interface, updates map_data in Mqtt correctly (I think).
But ICantBelieveItsNotValetudo doesn't update map image in Mqtt.

Any suggestions?

Error when running docker on armhf architecture

Hello,
I tried to build and run the docker container on my Rasberry Pi 4 with armhf architecture, I used the latest tagged version 2022.05.0. When running the container, an error occurs. I also tried it with the penultimate tagged version 2021.12.0 and it is running without problems.

The container output is as follows:

[email protected] start
node app.js

/app/node_modules/@napi-rs/canvas/js-binding.js:193
    throw loadError
    ^

Error: Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by /app/node_modules/@napi-rs/canvas-linux-arm-gnueabihf/skia.linux-arm-gnueabihf.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/app/node_modules/@napi-rs/canvas/js-binding.js:177:29)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12) {
  code: 'ERR_DLOPEN_FAILED'
}

hosting the underlay image

I was trying to setup the underlay image by hosting it inside the container, at /app/assets/img.

But it's not working. Is it supposed to be hosted outside of the container somehow?

{
  "mqtt": {
    "identifier": "rockrobo",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.XX.XX",
    "caPath": "",
    "mapSettings": {
      "drawPath": true,
      "drawCharger": true,
      "drawRobot": true,
      "border": 2,
      "scale": 4,
      "underlay_path": "/app/assets/img/home_2d_reverse.png",
      "underlay_scale": 2,
      "underlay_x": 0,
      "underlay_y": 0
    },
    "mapDataTopic": "valetudo/rockrobo/map_data",
    "minMillisecondsBetweenMapUpdates": 250,
    "publishMapImage": true
  },
  "webserver": {
    "enabled": true,
    "port": 3030
  }
}

Addon does not working after HA update

Hello,

Unfortunately I have updated HomeAssistant to the latest 0.105.3 version and the addon does not working (it was working before the update !!!).

The problem is that the picture does not shown on the URL (http://192.168.XXX.XXX:3000/api/map/image and the port 3000 is not open on my Pi.

This is my config:

identifier: rockrobo
topicPrefix: valetudo
autoconfPrefix: homeassistant
broker_url: 'mqtt://XXX:[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

My log:

[23:12:08] INFO: Setup config
[23:12:08] INFO: Start ICantVelieveItsNotValetudo
> [email protected] start /app
> node app.js
Loading configuration file: /app/config.json
Connecting to MQTT Broker
Webserver running on port 3000
Connected to MQTT Broker

The vacuum (Roborock S50, 1886 fimware, 0.4.0 valetudo) is successfully connected to the MQTT broker:

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

System log:
20-02-14 23:50:42 WARNING (MainThread) [hassio.addons.validate] Unknown options webserver.enabled

Could you help me with this issue?
I have checked the host (rpi 4, hass.io) and the port 3000 is not open.

Two instances

Hey,

I have two robots, I've configured ICantBeliveItsNotValetudo for the secondary instance to run on port 3001, but I believe that the robot has problems with connecting to it?

Anyone else running two instances for two robots?
How did you configure it?

Memmory pressure error

Same issue as in #50 (but is closed).
#50

INFO:
Manufacturer: Roborock
Model: V1
Valetudo Implementation: RoborockV1ValetudoRobot
Release: 2022.01.0
Commit: 4055f65e50cf2c789df4f1810781f03d74405de4

ERROR:

[2022-02-15T10:13:09.607Z] [INFO] Loading configuration file: /app/config.json
[2022-02-15T10:13:09.654Z] [INFO] Connecting to MQTT broker...
[2022-02-15T10:13:09.663Z] [INFO] Webserver running on port 3003
[2022-02-15T10:13:09.686Z] [INFO] Connected to MQTT broker.
[2022-02-15T10:13:19.657Z] [INFO] Drawing map...

<--- Last few GCs --->

[19:0x5045a90]    10315 ms: Mark-sweep (reduce) 12.6 (16.0) -> 12.4 (15.8) MB, 20.3 / 0.0 ms  (average mu = 0.993, current mu = 0.003) external memory pressure GC in old space requested
[19:0x5045a90]    10334 ms: Mark-sweep (reduce) 12.4 (14.8) -> 12.3 (15.3) MB, 18.9 / 0.0 ms  (average mu = 0.986, current mu = 0.002) external memory pressure GC in old space requested


<--- JS stacktrace --->

FATAL ERROR: v8::ArrayBuffer::New Allocation failed - process out of memory
 1: 0xa24ed0 node::Abort() [node]
 2: 0x966115 node::FatalError(char const*, char const*) [node]
 3: 0xb9acde v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb9b057 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xb9b13b  [node]
 6: 0xbb770d v8::ArrayBuffer::New(v8::Isolate*, unsigned long) [node]
 7: 0x7fdc904e94f5 Context2d::CreateImageData(Nan::FunctionCallbackInfo<v8::Value> const&) [/app/node_modules/canvas/build/Release/canvas.node]
 8: 0x7fdc904e1dc8  [/app/node_modules/canvas/build/Release/canvas.node]
 9: 0xc06acb  [node]
10: 0xc08076  [node]
11: 0xc086f6 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x1427179  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 134
�

Some help please

Could we get some description about this new setup? For instance, I have 2 roborocks running in my house, how to configure this using the separate project? Also how does this new service get info from the roborocks? Through MQTT?

Help needed with portainer on Hass.io

Hi,

I tried running a docker container with portainer inside Home Assistant (Hass.io).
Unfortunately I cannot get it running because I cannot implement my customized config.json at all.
I'm a very beginner though and despite the official docs how to do this are pretty confusing and/or do not help me at all unfortunately.
I would really appreciate a (maybe step by step?) help so I could contribute a further detailed instruction for the beginners that struggled like me.
Thanks in advance.

help with configuration

Hi there,

i am trying to find some information about how to config, but without any luck. i think i am having wrong informations in the config - maybe someone could point me in the right direction what i am doing wrong here?
this is the config:

{
  "mapSettings": {
    "drawPath": true,
    "drawCharger": true,
    "drawRobot": true,
    "scale": 2,
    "rotate": 0,
    "colors": {
      "floor": "#0076ff",
      "obstacle": "#52aeff",
      "path": "#ffffff"
    }
  },
  "mqtt": {
    "identifier": "saubStauger,
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.1.173:1883",
    "caPath": "",
    "mapDataTopic": "valetudo/saubStauger/MapData/map-data",
    "minMillisecondsBetweenMapUpdates": 10000,
    "publishMapImage": true,
    "publishAsBase64": false
  },
  "webserver": {
    "enabled": true,
    "port": 3000
  },
  "logLevel": "debug"
}

and this is mqtt:
Bildschirm­foto 2023-02-10 um 14 26 57

the problem is that i dont get an image on http://192.168.1.173:3000/api/map/image it just returns "not found" -> so server is up and running, but not finding any image?

Cheers and thanks a lot!

Automatically crop whitespace

As foretold by the docs, I have huge blobs of whitespace on my map. Would it be possible to create a feature that automatically crops this, by removing all-white rows and columns of pixels?

image

[Feature Request] Add calibration points

Hi!

Thank you for your effort put into this project.

Would it be possible to add calibration points to MQTT API? I suppose it should be easily doable by evaluating translateCoordinatesToPixels function for 3 points (possibly hardcoded as they don't even have to be within map boundary).

Adding this feature would make it much easier to use Valetudo with my Vacuum Map Card, especially since it will support Valetudo out of the box since v2.10.0.

Required schema:

[
  {
    "vacuum": {
      "x": 25500,
      "y": 25500
    },
    "map": {
      "x": 466,
      "y": 1889
    }
  },
  {
    "vacuum": {
      "x": 26500,
      "y": 26500
    },
    "map": {
      "x": 730,
      "y": 1625
    }
  },
  {
    "vacuum": {
      "x": 25500,
      "y": 26500
    },
    "map": {
      "x": 466,
      "y": 1625
    }
  }
]

webserver option removed?

Hi,

iam using ...

  "webserver": {
    "enabled": true,
    "port": 3456 }

in my config to provige a image file within the URL http://IP:PORT/api/map/image.

Today i made a update to the actual version and it seems that there is no webserver running.

Within the log there is no info about the webserver...

> [email protected] start
> node app.js

Loading configuration file: /root/valetudomap/ICantBelieveItsNotValetudo/config.json
Connecting to MQTT broker...
Connected to MQTT broker.
Drawing map...
drawMap: 335.118ms
Map drawn.
Map published.
Skipping map generation as it has not changed.

did you remove the webserver component?

How could i provide the png or svg file at my visualisation server?

Thanks and BR

corrupted double-linked list

I updated today to the newest Version and switched to nodejs v14.17.0
Now after starting ICantBelieveItsNotValetudo, a few minutes or seconds later it crashes with "corrupted double-linked list". But map drawing works a few times:
May 24 10:30:03 homesrv01 node[21196]: [2021-05-24T08:30:03.029Z] [INFO] Drawing map...
May 24 10:30:03 homesrv01 node[21196]: [2021-05-24T08:30:03.801Z] [INFO] Map drawn in 770.955856 ms
May 24 10:30:03 homesrv01 node[21196]: [2021-05-24T08:30:03.803Z] [INFO] Map published.
May 24 10:30:13 homesrv01 node[21196]: [2021-05-24T08:30:13.004Z] [INFO] Drawing map...
May 24 10:30:13 homesrv01 node[21196]: [2021-05-24T08:30:13.719Z] [INFO] Map drawn in 714.423341 ms
May 24 10:30:13 homesrv01 node[21196]: [2021-05-24T08:30:13.721Z] [INFO] Map published.
May 24 10:30:23 homesrv01 node[21196]: [2021-05-24T08:30:23.009Z] [INFO] Drawing map...
May 24 10:30:23 homesrv01 node[21196]: [2021-05-24T08:30:23.663Z] [INFO] Map drawn in 652.773113 ms
May 24 10:30:23 homesrv01 node[21196]: [2021-05-24T08:30:23.665Z] [INFO] Map published.
May 24 10:30:33 homesrv01 node[21196]: [2021-05-24T08:30:33.011Z] [INFO] Drawing map...

Memmory pressure error

I'm getting this error when trying to generate the map

Connecting to MQTT broker...
Connected to MQTT broker.
Drawing map...
<--- Last few GCs --->
[261:0x75ff5780]    12801 ms: Mark-sweep (reduce) 6.3 (8.8) -> 6.1 (8.3) MB, 125.9 / 0.1 ms  (average mu = 0.747, current mu = 0.001) external memory pressure GC in old space requested
[261:0x75ff5780]    12887 ms: Mark-sweep (reduce) 6.1 (7.8) -> 6.1 (8.0) MB, 86.1 / 0.0 ms  (average mu = 0.603, current mu = 0.001) external memory pressure GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: v8::ArrayBuffer::New Allocation failed - process out of memory

Latest docker image fails with npm error

Hello,

The last update seemed to have broken something with icantbelieveitsnotvaletudo. Here's the error I'm getting on a clean docker start:

docker logs
docker logs icantbelieveitsnotvaletudo

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_12_48_629Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_12_53_772Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_12_54_834Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_00_089Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_02_541Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_05_997Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_11_353Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_26_231Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_13_39_869Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_14_06_282Z-debug.log

> [email protected] start /app
> node app.js

internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module 'canvas'
Require stack:
- /app/lib/MapDrawer.js
- /app/lib/MqttClient.js
- /app/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/app/lib/MapDrawer.js:4:16)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/lib/MapDrawer.js', '/app/lib/MqttClient.js', '/app/app.js' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-14T14_14_58_316Z-debug.log

Let me know if you need any additional information.

TypeError: mapData.layers.flatMap is not a function

After a new install of ICantBelieveItsNotValetudo i´ve got this error:

npm start                                                                                                                                                                          
> [email protected] start
> node app.js

[2021-06-29T12:36:08.133Z] [INFO] Loading configuration file: /home/raspberrypi/valetudomap/ICantBelieveItsNotValetudo/config.json
[2021-06-29T12:36:08.409Z] [INFO] Connecting to MQTT broker...
[2021-06-29T12:36:08.484Z] [INFO] Webserver running on port 3003
[2021-06-29T12:36:08.518Z] [INFO] Connected to MQTT broker.
/home/raspberrypi/valetudomap/ICantBelieveItsNotValetudo/lib/MapDrawer.js:49
            x1: Math.min(...mapData.layers.flatMap(layer => layer.dimensions.x.min)),
                                           ^

TypeError: mapData.layers.flatMap is not a function
    at MapDrawer.updateMap (/home/raspberrypi/valetudomap/ICantBelieveItsNotValetudo/lib/MapDrawer.js:49:44)
    at Timeout.MqttClient.setInterval [as _onTimeout] (/home/raspberrypi/valetudomap/ICantBelieveItsNotValetudo/lib/MqttClient.js:90:28)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)

Is there a solution for this problem?
It is installed on a Raspberry Pi 3B. The Pi is allso used for Openhab, Grafana, Influxdb and Pihole. I hope the problem is not related to the other software.

Roborock S5
Valetudo 2021.04.0

Publish Docker image

The repo does not publish own docker images and images of others are outdated.

README "published to mqtt.mapDataTopic"?

https://github.com/Hypfer/ICantBelieveItsNotValetudo/blob/master/README.md#integration-with-fhem-iobroker-etc
"By default, the image data is published via MQTT to the topic set in mqtt.mapDataTopic."

Isn't this wrong?

Valetudo publishes raw map data to MapData/map-data and optionally adds a Homie autodiscovery property for MapData/map so that it can be used by ICBINV
"ICBINV should be configured so that it publishes the map to this topic."

ICBINV's default configuration is
"mqtt": {
"identifier": "rockrobo",
"topicPrefix": "valetudo",
"autoconfPrefix": "homeassistant",
"broker_url": "mqtt://user:[email protected]",
"caPath": "",
"mapDataTopic": "valetudo/robot/MapData/map-data",
"minMillisecondsBetweenMapUpdates": 10000,
"publishMapImage": true
}

MqttClient subscribes to mqtt.mapDataTopic and publishes optionally to mqtt.topicPrefix + "/" + mqtt.identifier + "/MapData/map".

How to rotate the map?

Fist of all.. Amazing work! Thanks a lot. I am using two mapper instances for my two roborock s2 on each floor, but sadly one map isn't rotated correctly...

There doesn't seem to be an option to rotate map in valetudo RE, nor in home assistant. Is there an option to rotate the map?

Failed to start: Unexpected token  in JSON at position 0

hello!
Im using this package with hass.io (docker container on Synology).
When i try to start package, im getting error: "SyntaxError: Unexpected token � in JSON at position 0"

My config:
mapSettings:
drawPath: true
drawCharger: true
drawRobot: true
scale: 4
rotate: 0
mapColors:
floor: '#0076ff'
obstacle_weak: '#6699ff'
obstacle_strong: '#52aeff'
path: '#ffffff'
mqtt:
identifier: rockrobo
topicPrefix: valetudo
autoconfPrefix: homeassistant
broker_url: 'mqtt://--:[email protected]'
caPath: ''
mapDataTopic: valetudo/rockrobo/map_data
minMillisecondsBetweenMapUpdates: 10000
publishMapImage: true

My log:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] setup-config: executing...
[14:05:48] INFO: Setup config
[cont-init.d] setup-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:05:48] INFO: Start ICantBelieveItsNotValetudo

[email protected] start /app
node app.js

Loading configuration file: /app/config.json
Connecting to MQTT Broker
Webserver running on port 3000
Connected to MQTT Broker
SyntaxError: Unexpected token � in JSON at position 0
at JSON.parse ()
at MqttClient. (/app/lib/MqttClient.js:85:42)
at MqttClient.emit (events.js:315:20)
at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:987:12)
at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:336:12)
at work (/app/node_modules/mqtt/lib/client.js:292:12)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
SyntaxError: Unexpected token � in JSON at position 0
at JSON.parse ()
at MqttClient. (/app/lib/MqttClient.js:85:42)
at MqttClient.emit (events.js:315:20)
at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:987:12)
at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:336:12)
at work (/app/node_modules/mqtt/lib/client.js:292:12)
at Writable.writable._write (/app/node_modules/mqtt/lib/client.js:302:5)
at doWrite (/app/node_modules/readable-stream/lib/_stream_writable.js:428:64)
at writeOrBuffer (/app/node_modules/readable-stream/lib/_stream_writable.js:417:5)
at Writable.write (/app/node_modules/readable-stream/lib/_stream_writable.js:334:11)

Feature Request: create jpg not png

Hi!
Great addition to valetudo. If this thing would not output png but jpg it would be easily be possible to integrate it as a "webcam" in p.e. Pocketcontrol and other situations where jpg is not possible. Could jpg support be added? I'm not really into this image stuff and node, so I cant really help myself here...

Not longer working with Valetudo 2021.01.1

It doesn't seem to be working with the new Valetudo version 2021.01.1.

image

SyntaxError: Unexpected token e in JSON at position 0
    at JSON.parse (<anonymous>)
    at MqttClient.<anonymous> (/app/lib/MqttClient.js:86:42)
    at MqttClient.emit (events.js:315:20)
    at MqttClient._handlePublish (/app/node_modules/mqtt/lib/client.js:1277:12)
    at MqttClient._handlePacket (/app/node_modules/mqtt/lib/client.js:410:12)
    at work (/app/node_modules/mqtt/lib/client.js:321:12)
    at Writable.writable._write (/app/node_modules/mqtt/lib/client.js:335:5)
    at doWrite (/app/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139)
    at writeOrBuffer (/app/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5)
    at Writable.write (/app/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:307:11)

Unfortunatly I removed my old topic, but I guess the map_data was previously in JSON as it tries to parse it as JSON.

Rotation not working / color setting forbidden zones

@Hypfer First of all thank you for your work. Some time ago I had it running to overlay a floor-plan just showing the robot and its path.
Now coming back to it after many months the progress in Valetudo seem to have broke my use-case.
Like mentioned in the topic the rotation feature is not working correctly. It does not rotate the map which seems to be in a different layer.
Additionally I didn't find a option to set the color for the forbidden zones.

High CPU Usage 2.8.0

ICantBelieveItsNotValetudo 2.8.0 High CPU usage on Hassio core-2021.2.3
Raspberry Pi 3B+

Option to disable config.json writes

Hey there, great stuff 🤓

I tried to run the docker image in a Kubernetes Cluster and mapped the configuration file to the container using a ConfigMap. ConfigMaps, however, are not writable by design. I tried to use a volume mount that maps directly to the /app/config.js file through the rancher UI but I'm either stupid or it just doesn't work. Since the application tries to write the configuration to disk in a couple of places it fails to start and the container is shut down as well.

To get around this I cloned this repo and slightly modified the Configuration.prototype.persist() method to catch any exception that may happen during write.

The question for me is:
Does ICantBelieveItsNotValetudo actually need to write the configuration at any point in time?

I mean there is no web interface or anything and the configuration can only be changed manually by editing the file on disk anyway, right? Or did I break something by just "disabling" configuration file writes altogether? (I didn't test the map generation yet, but at least it starts up fine so I assume it is working)

map/image not found

I think I am missing a piece of the puzzle and hope you guys can help me:

My Roborock Gen2 sports FW v11_001748 with Valetudo Beta 0.3.0 which works as expected.

I run ICantBelieveItsNotValetudo in a docker container which reports:

Webserver running on port 3000
connected to MQTT broker

my config.json is as follows:

{
  "mqtt": {
    "identifier": "rockrobo",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://192.168.39.31",
    "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
  }
}

When I open the URL http://192.168.39.24:3000/api/map/image in a browser I get:

Not found
When I try to open http://192.168.39.24:3000 i get:

Cannot GET /

Are there any further confiuration steps I missed so that ICantBelieveItsNotValetudo can display the map images? What is caPath? Or how do i get the images so that I can display them in HomeAssistant?

In the past I had the following setup in HomeAssistant and the map displayed just fine.

  - platform: rest
    resource: http://192.168.39.51/api/remote/map
    name: lisamap
    value_template: '{{ value_json.mapsrc }}'
camera:
  - platform: generic
    name: Vacuum Map
    still_image_url: http://192.168.39.51{{states.sensor.lisamap.state | string }}
    content_type: image/png
    framerate: 1

I really would appreciate some guidance thanks in advacne for your support!

Issue after starting SyntaxError: Unexpected token

Hi! After starting app, i see this log:

npm[12949]: > [email protected] start /opt/ICantBelieveItsNotValetudo
May  3 18:16:38 raspberrypi npm[12949]: > node app.js
May  3 18:16:40 raspberrypi npm[12949]: [2021-05-03T15:16:40.726Z] [INFO] Loading configuration file: /opt/ICantBelieveItsNotValetudo/config.json
May  3 18:16:40 raspberrypi npm[12949]: [2021-05-03T15:16:40.948Z] [INFO] Connecting to MQTT broker...
May  3 18:16:41 raspberrypi npm[12949]: [2021-05-03T15:16:41.006Z] [INFO] Webserver running on port 3000
May  3 18:16:41 raspberrypi npm[12949]: [2021-05-03T15:16:41.110Z] [INFO] Connected to MQTT broker.
May  3 18:16:41 raspberrypi npm[12949]: [2021-05-03T15:16:41.224Z] [ERROR] SyntaxError: Unexpected token пїЅ in JSON at position 0

So didn't have the map http://192.168.ХХ.ХХ:3000/api/map/image
Not Found

Viomi V7
Valetudo 2021.04.0
ICantBelieveItsNotValetudo 2021.4.0
node 14.16.1

crashes during "Drawing map..."

When I lauch the programm via npm start i get this output. It has worked before but since a few days I get this error message:

[2022-05-07T11:53:17.810Z] [INFO] Loading configuration file: /root/Icantbelieveitsnotvaletudo/config.json
[2022-05-07T11:53:17.869Z] [INFO] Connecting to MQTT broker...
[2022-05-07T11:53:17.874Z] [INFO] Webserver running on port 3000
[2022-05-07T11:53:17.878Z] [INFO] Connected to MQTT broker.
[2022-05-07T11:53:27.881Z] [INFO] Drawing map...
/root/Icantbelieveitsnotvaletudo/lib/MapDrawer.js:169
                    drawLayer(layer.pixels[i], layer.pixels[i + 1], color.r, color.g, color.b, color.a);
                                                                          ^

TypeError: Cannot read property 'r' of undefined
    at /root/Icantbelieveitsnotvaletudo/lib/MapDrawer.js:169:75
    at Array.forEach (<anonymous>)
    at MapDrawer.draw (/root/Icantbelieveitsnotvaletudo/lib/MapDrawer.js:153:33)
    at Timeout._onTimeout (/root/Icantbelieveitsnotvaletudo/lib/MqttClient.js:104:42)
    at listOnTimeout (internal/timers.js:557:17)
    at processTimers (internal/timers.js:500:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1

Configuration is read incorrectly and rewritten wrong when starting ICantBelieveItsNotValetudo

When starting ICantBelieveItsNotValetudo, the message Schema changes were applied to the configuration file at... was
logged and the configuration in config.json is not used at all. Upon inspection of the changes applied to the config file, I noticed it was rewritten with the default settings and the original configuration was rewritten as a map between the character position and each character of the original config file. Leaving the config.json file like:

{
  "0": "{",
  "1": "\n",
  "2": " ",
  "3": " ",
  "4": "\"",
  "5": "m",
  "6": "a",
  "7": "p",
  "8": "S",
  "9": "e",
  "10": "t",
  "11": "t",
  "12": "i",
  "13": "n",
  "14": "g",
  "15": "s",
  "16": "\"",
  "17": ":",
  "18": " ",
  "19": "{",
  "20": "\n",
  "21": " ",
  "22": " ",
  "23": " ",
  "24": " ",
  "25": "\"",
  "26": "d",
  "27": "r",
  "28": "a",
  "29": "w",
  "30": "P",
  "31": "a",
  "32": "t",
  "33": "h",
[...]
  "700": "l",
  "701": "o",
  "702": "g",
  "703": "L",
  "704": "e",
  "705": "v",
  "706": "e",
  "707": "l",
  "708": "\"",
  "709": ":",
  "710": " ",
  "711": "\"",
  "712": "i",
  "713": "n",
  "714": "f",
  "715": "o",
  "716": "\"",
  "717": "\n",
  "718": "}",
  "mapSettings": {
    "drawPath": true,
    "drawCharger": true,
    "drawRobot": true,
    "scale": 2,
    "rotate": 0,
    "colors": {
      "floor": "#0076ff",
      "obstacle": "#52aeff",
      "path": "#ffffff"
    }
  },
  "mqtt": {
    "identifier": "rockrobo",
    "topicPrefix": "valetudo",
    "autoconfPrefix": "homeassistant",
    "broker_url": "mqtt://user:[email protected]",
    "caPath": "",
    "mapDataTopic": "valetudo/robot/MapData/map-data",
    "minMillisecondsBetweenMapUpdates": 10000,
    "publishMapImage": true,
    "publishAsBase64": false
  },
  "webserver": {
    "enabled": false,
    "port": 3000
  },
  "logLevel": "info"
}

Error on pixel drawing with Valetudo 0.5.2

When the robot sends new map data the application crashes. Didn't occurs on firmware 0.5.1

I installed a clean firmware with valetudo 0.5.2 and configured MQTT.
The version of ICantBelieveItsNotValetudo is 3cf4f8a

Full log:

> [email protected] start /app
> node app.js
Loading configuration file: /app/config.json
Connecting to MQTT Broker
Webserver running on port 3000
Connected to MQTT Broker
/app/node_modules/@jimp/utils/dist/index.js:42
  throw error;
  ^
Error: hex, x and y must be numbers
    at Jimp.throwError (/app/node_modules/@jimp/utils/dist/index.js:35:13)
    at Jimp.setPixelColor (/app/node_modules/@jimp/core/dist/index.js:903:111)
    at drawPixel (/app/lib/Tools.js:83:35)
    at Array.forEach (<anonymous>)
    at /app/lib/Tools.js:81:61
    at Array.forEach (<anonymous>)
    at Jimp.<anonymous> (/app/lib/Tools.js:78:65)
    at Timeout._onTimeout (/app/node_modules/@jimp/core/dist/index.js:354:25)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node app.js`
npm ERR! Exit status 1

The mqtt data from my robot (its cut after 20000 chars):

{"header_length":20,"data_length":136728,"version":{"major":1,"minor":1},"map_index":981,"map_sequence":66,"image":{"segments":{"count":6},"pixels":{"floor":[[147,259],[148,259],[149,259],[150,259],[151,259],[152,259],[153,259],[154,259],[147,258],[148,258],[149,258],[150,258],[151,258],[152,258],[153,258],[154,258],[181,258],[182,258],[183,258],[184,258],[185,258],[186,258],[187,258],[188,258],[189,258],[147,257],[148,257],[149,257],[150,257],[151,257],[152,257],[153,257],[154,257],[183,257],[185,257],[186,257],[187,257],[188,257],[189,257],[147,256],[148,256],[149,256],[150,256],[151,256],[152,256],[153,256],[154,256],[185,256],[186,256],[187,256],[188,256],[189,256],[147,255],[148,255],[149,255],[150,255],[151,255],[152,255],[153,255],[154,255],[155,255],[156,255],[157,255],[158,255],[159,255],[160,255],[161,255],[162,255],[163,255],[164,255],[165,255],[166,255],[167,255],[168,255],[169,255],[170,255],[171,255],[181,255],[182,255],[183,255],[184,255],[185,255],[186,255],[187,255],[188,255],[189,255],[147,254],[148,254],[149,254],[150,254],[151,254],[152,254],[153,254],[154,254],[155,254],[156,254],[157,254],[158,254],[159,254],[160,254],[161,254],[162,254],[163,254],[164,254],[165,254],[166,254],[167,254],[168,254],[169,254],[170,254],[171,254],[172,254],[173,254],[174,254],[175,254],[176,254],[177,254],[178,254],[179,254],[180,254],[181,254],[182,254],[183,254],[184,254],[185,254],[186,254],[187,254],[188,254],[189,254],[190,254],[191,254],[192,254],[193,254],[194,254],[195,254],[196,254],[197,254],[198,254],[199,254],[200,254],[201,254],[202,254],[203,254],[204,254],[205,254],[206,254],[207,254],[208,254],[209,254],[210,254],[211,254],[212,254],[213,254],[214,254],[146,253],[147,253],[148,253],[149,253],[150,253],[151,253],[152,253],[153,253],[154,253],[155,253],[156,253],[157,253],[158,253],[159,253],[160,253],[161,253],[162,253],[163,253],[164,253],[165,253],[166,253],[167,253],[168,253],[169,253],[170,253],[171,253],[172,253],[173,253],[174,253],[175,253],[176,253],[177,253],[178,253],[179,253],[180,253],[181,253],[182,253],[183,253],[184,253],[185,253],[186,253],[187,253],[188,253],[189,253],[190,253],[191,253],[192,253],[193,253],[194,253],[195,253],[196,253],[197,253],[198,253],[199,253],[200,253],[201,253],[202,253],[203,253],[204,253],[205,253],[206,253],[207,253],[208,253],[209,253],[210,253],[211,253],[212,253],[213,253],[214,253],[215,253],[216,253],[217,253],[218,253],[219,253],[142,252],[143,252],[144,252],[145,252],[146,252],[147,252],[148,252],[149,252],[150,252],[151,252],[152,252],[153,252],[154,252],[155,252],[156,252],[157,252],[158,252],[159,252],[160,252],[161,252],[162,252],[163,252],[164,252],[165,252],[166,252],[167,252],[168,252],[169,252],[170,252],[171,252],[172,252],[173,252],[174,252],[178,252],[179,252],[180,252],[181,252],[182,252],[183,252],[184,252],[185,252],[186,252],[187,252],[188,252],[189,252],[190,252],[191,252],[192,252],[193,252],[194,252],[195,252],[196,252],[197,252],[198,252],[199,252],[200,252],[201,252],[202,252],[203,252],[204,252],[205,252],[206,252],[207,252],[208,252],[209,252],[210,252],[211,252],[212,252],[213,252],[214,252],[215,252],[216,252],[217,252],[218,252],[219,252],[142,251],[143,251],[144,251],[145,251],[146,251],[147,251],[148,251],[149,251],[150,251],[151,251],[152,251],[153,251],[154,251],[155,251],[156,251],[157,251],[158,251],[159,251],[160,251],[161,251],[162,251],[163,251],[164,251],[165,251],[166,251],[167,251],[168,251],[169,251],[170,251],[171,251],[172,251],[173,251],[174,251],[178,251],[179,251],[180,251],[181,251],[182,251],[183,251],[184,251],[185,251],[186,251],[187,251],[188,251],[189,251],[190,251],[191,251],[196,251],[197,251],[198,251],[199,251],[200,251],[201,251],[202,251],[203,251],[204,251],[205,251],[206,251],[207,251],[208,251],[209,251],[210,251],[211,251],[212,251],[213,251],[214,251],[215,251],[216,251],[217,251],[218,251],[219,251],[142,250],[143,250],[144,250],[145,250],[146,250],[147,250],[148,250],[149,250],[150,250],[151,250],[152,250],[153,250],[154,250],[155,250],[156,250],[157,250],[158,250],[159,250],[160,250],[161,250],[162,250],[163,250],[164,250],[165,250],[166,250],[167,250],[168,250],[169,250],[170,250],[171,250],[172,250],[173,250],[174,250],[178,250],[179,250],[180,250],[181,250],[182,250],[183,250],[184,250],[185,250],[186,250],[187,250],[188,250],[189,250],[190,250],[191,250],[196,250],[197,250],[198,250],[199,250],[200,250],[201,250],[202,250],[203,250],[204,250],[205,250],[206,250],[207,250],[208,250],[209,250],[210,250],[211,250],[212,250],[213,250],[214,250],[215,250],[216,250],[217,250],[218,250],[219,250],[142,249],[143,249],[144,249],[145,249],[146,249],[147,249],[148,249],[149,249],[150,249],[151,249],[152,249],[153,249],[154,249],[155,249],[156,249],[157,249],[158,249],[159,249],[160,249],[161,249],[162,249],[163,249],[164,249],[165,249],[166,249],[167,249],[168,249],[169,249],[170,249],[171,249],[172,249],[173,249],[174,249],[175,249],[178,249],[179,249],[180,249],[181,249],[182,249],[183,249],[184,249],[185,249],[186,249],[187,249],[188,249],[189,249],[190,249],[191,249],[196,249],[197,249],[198,249],[199,249],[200,249],[201,249],[202,249],[203,249],[204,249],[205,249],[206,249],[207,249],[208,249],[209,249],[210,249],[211,249],[212,249],[213,249],[214,249],[215,249],[216,249],[217,249],[218,249],[219,249],[142,248],[143,248],[144,248],[145,248],[146,248],[147,248],[148,248],[149,248],[150,248],[151,248],[152,248],[153,248],[154,248],[155,248],[156,248],[157,248],[158,248],[159,248],[160,248],[161,248],[162,248],[163,248],[164,248],[165,248],[166,248],[167,248],[168,248],[169,248],[170,248],[171,248],[172,248],[173,248],[174,248],[175,248],[176,248],[177,248],[178,248],[179,248],[180,248],[181,248],[182,248],[183,248],[184,248],[185,248],[186,248],[187,248],[188,248],[189,248],[190,248],[191,248],[192,248],[193,248],[194,248],[195,248],[196,248],[197,248],[198,248],[199,248],[200,248],[201,248],[202,248],[203,248],[204,248],[205,248],[206,248],[207,248],[208,248],[209,248],[210,248],[211,248],[212,248],[213,248],[214,248],[215,248],[216,248],[217,248],[218,248],[219,248],[142,247],[143,247],[144,247],[145,247],[146,247],[147,247],[148,247],[149,247],[150,247],[151,247],[152,247],[153,247],[154,247],[155,247],[156,247],[157,247],[158,247],[159,247],[160,247],[161,247],[162,247],[163,247],[164,247],[165,247],[166,247],[167,247],[168,247],[169,247],[170,247],[171,247],[172,247],[173,247],[174,247],[175,247],[176,247],[177,247],[178,247],[179,247],[180,247],[181,247],[182,247],[183,247],[184,247],[185,247],[186,247],[187,247],[188,247],[189,247],[190,247],[191,247],[192,247],[193,247],[194,247],[195,247],[196,247],[197,247],[198,247],[199,247],[200,247],[201,247],[202,247],[203,247],[204,247],[205,247],[206,247],[207,247],[208,247],[209,247],[210,247],[211,247],[212,247],[213,247],[214,247],[215,247],[216,247],[217,247],[218,247],[219,247],[142,246],[143,246],[144,246],[145,246],[146,246],[147,246],[148,246],[149,246],[150,246],[151,246],[152,246],[153,246],[154,246],[155,246],[156,246],[157,246],[158,246],[159,246],[160,246],[161,246],[162,246],[163,246],[164,246],[165,246],[166,246],[167,246],[168,246],[169,246],[170,246],[171,246],[172,246],[173,246],[174,246],[175,246],[176,246],[177,246],[178,246],[179,246],[180,246],[181,246],[182,246],[183,246],[184,246],[185,246],[186,246],[187,246],[188,246],[189,246],[190,246],[191,246],[192,246],[193,246],[194,246],[195,246],[196,246],[197,246],[198,246],[199,246],[200,246],[201,246],[202,246],[203,246],[204,246],[205,246],[206,246],[207,246],[208,246],[209,246],[210,246],[211,246],[212,246],[213,246],[214,246],[215,246],[216,246],[217,246],[218,246],[219,246],[142,245],[143,245],[144,245],[145,245],[146,245],[147,245],[148,245],[149,245],[150,245],[151,245],[152,245],[153,245],[154,245],[155,245],[156,245],[157,245],[158,245],[159,245],[160,245],[161,245],[162,245],[163,245],[164,245],[165,245],[166,245],[167,245],[168,245],[169,245],[170,245],[171,245],[172,245],[173,245],[174,245],[175,245],[176,245],[177,245],[178,245],[179,245],[180,245],[181,245],[182,245],[183,245],[184,245],[185,245],[186,245],[187,245],[188,245],[189,245],[190,245],[191,245],[192,245],[193,245],[194,245],[195,245],[196,245],[197,245],[198,245],[199,245],[200,245],[201,245],[202,245],[203,245],[204,245],[205,245],[206,245],[207,245],[208,245],[209,245],[210,245],[142,244],[143,244],[144,244],[145,244],[146,244],[147,244],[148,244],[149,244],[150,244],[151,244],[152,244],[153,244],[154,244],[155,244],[156,244],[157,244],[158,244],[159,244],[160,244],[161,244],[162,244],[163,244],[164,244],[165,244],[166,244],[167,244],[168,244],[169,244],[170,244],[171,244],[172,244],[173,244],[174,244],[175,244],[176,244],[177,244],[178,244],[179,244],[180,244],[181,244],[182,244],[183,244],[184,244],[185,244],[186,244],[187,244],[188,244],[194,244],[195,244],[196,244],[197,244],[198,244],[199,244],[200,244],[201,244],[202,244],[203,244],[204,244],[205,244],[206,244],[207,244],[208,244],[209,244],[210,244],[142,243],[143,243],[144,243],[145,243],[146,243],[147,243],[148,243],[149,243],[150,243],[151,243],[152,243],[153,243],[154,243],[155,243],[156,243],[157,243],[158,243],[159,243],[160,243],[161,243],[162,243],[163,243],[164,243],[165,243],[166,243],[167,243],[168,243],[169,243],[170,243],[171,243],[172,243],[173,243],[174,243],[175,243],[176,243],[177,243],[178,243],[179,243],[180,243],[181,243],[182,243],[183,243],[184,243],[185,243],[186,243],[187,243],[188,243],[190,243],[191,243],[198,243],[199,243],[200,243],[201,243],[202,243],[203,243],[204,243],[205,243],[206,243],[207,243],[208,243],[209,243],[210,243],[213,243],[214,243],[142,242],[143,242],[144,242],[145,242],[146,242],[147,242],[148,242],[149,242],[150,242],[151,242],[152,242],[153,242],[154,242],[155,242],[156,242],[157,242],[158,242],[159,242],[160,242],[161,242],[162,242],[163,242],[164,242],[165,242],[166,242],[167,242],[168,242],[169,242],[170,242],[171,242],[172,242],[173,242],[174,242],[175,242],[176,242],[177,242],[178,242],[179,242],[180,242],[181,242],[182,242],[183,242],[184,242],[185,242],[186,242],[187,242],[188,242],[189,242],[190,242],[191,242],[192,242],[193,242],[194,242],[195,242],[198,242],[199,242],[200,242],[201,242],[202,242],[203,242],[204,242],[205,242],[206,242],[207,242],[208,242],[209,242],[210,242],[212,242],[213,242],[142,241],[143,241],[144,241],[145,241],[146,241],[147,241],[148,241],[149,241],[150,241],[151,241],[152,241],[153,241],[154,241],[155,241],[156,241],[157,241],[158,241],[159,241],[160,241],[161,241],[162,241],[163,241],[164,241],[165,241],[166,241],[167,241],[168,241],[170,241],[171,241],[172,241],[173,241],[178,241],[179,241],[180,241],[181,241],[182,241],[183,241],[184,241],[185,241],[186,241],[187,241],[188,241],[189,241],[190,241],[191,241],[192,241],[193,241],[194,241],[195,241],[196,241],[197,241],[198,241],[199,241],[200,241],[201,241],[202,241],[203,241],[204,241],[205,241],[206,241],[207,241],[208,241],[209,241],[210,241],[212,241],[213,241],[142,240],[143,240],[144,240],[145,240],[146,240],[147,240],[148,240],[149,240],[150,240],[151,240],[152,240],[153,240],[154,240],[155,240],[156,240],[157,240],[158,240],[159,240],[160,240],[161,240],[162,240],[163,240],[164,240],[165,240],[166,240],[167,240],[178,240],[179,240],[180,240],[181,240],[182,240],[183,240],[184,240],[185,240],[186,240],[187,240],[188,240],[189,240],[190,240],[191,240],[192,240],[193,240],[194,240],[195,240],[196,240],[197,240],[198,240],[199,240],[200,240],[201,240],[202,240],[203,240],[204,240],[205,240],[206,240],[207,240],[208,240],[209,240],[210,240],[212,240],[213,240],[142,239],[143,239],[144,239],[145,239],[146,239],[147,239],[148,239],[149,239],[150,239],[151,239],[152,239],[153,239],[154,239],[155,239],[156,239],[157,239],[158,239],[159,239],[160,239],[161,239],[162,239],[163,239],[164,239],[165,239],[166,239],[167,239],[168,239],[169,239],[170,239],[171,239],[172,239],[173,239],[174,239],[175,239],[176,239],[177,239],[178,239],[179,239],[180,239],[181,239],[182,239],[183,239],[184,239],[185,239],[186,239],[187,239],[188,239],[189,239],[190,239],[191,239],[192,239],[193,239],[194,239],[195,239],[196,239],[197,239],[198,239],[199,239],[200,239],[201,239],[202,239],[203,239],[204,239],[205,239],[206,239],[207,239],[208,239],[209,239],[210,239],[142,238],[143,238],[144,238],[145,238],[146,238],[147,238],[148,238],[149,238],[150,238],[151,238],[152,238],[153,238],[154,238],[155,238],[156,238],[157,238],[158,238],[159,238],[160,238],[161,238],[162,238],[163,238],[164,238],[165,238],[166,238],[167,238],[168,238],[169,238],[170,238],[171,238],[172,238],[173,238],[174,238],[175,238],[176,238],[177,238],[178,238],[179,238],[180,238],[181,238],[182,238],[183,238],[184,238],[185,238],[186,238],[187,238],[188,238],[189,238],[190,238],[191,238],[192,238],[193,238],[194,238],[195,238],[196,238],[197,238],[198,238],[199,238],[200,238],[201,238],[202,238],[203,238],[204,238],[205,238],[206,238],[207,238],[208,238],[209,238],[210,238],[142,237],[143,237],[144,237],[145,237],[146,237],[147,237],[148,237],[149,237],[150,237],[151,237],[152,237],[153,237],[154,237],[155,237],[156,237],[157,237],[158,237],[159,237],[160,237],[161,237],[162,237],[163,237],[164,237],[165,237],[166,237],[167,237],[168,237],[169,237],[170,237],[171,237],[172,237],[173,237],[174,237],[175,237],[176,237],[177,237],[178,237],[179,237],[180,237],[181,237],[182,237],[183,237],[184,237],[185,237],[186,237],[187,237],[198,237],[199,237],[200,237],[201,237],[202,237],[203,237],[204,237],[205,237],[206,237],[207,237],[208,237],[209,237],[210,237],[142,236],[143,236],[144,236],[145,236],[146,236],[147,236],[148,236],[149,236],[150,236],[151,236],[152,236],[153,236],[154,236],[155,236],[156,236],[157,236],[158,236],[159,236],[160,236],[161,236],[162,236],[163,236],[164,236],[165,236],[166,236],[167,236],[168,236],[169,236],[170,236],[171,236],[172,236],[173,236],[174,236],[175,236],[176,236],[177,236],[178,236],[179,236],[180,236],[181,236],[182,236],[183,236],[184,236],[185,236],[186,236],[187,236],[198,236],[199,236],[200,236],[201,236],[202,236],[203,236],[204,236],[205,236],[206,236],[207,236],[208,236],[209,236],[210,236],[142,235],[143,235],[144,235],[145,235],[146,235],[147,235],[148,235],[149,235],[150,235],[151,235],[152,235],[153,235],[154,235],[155,235],[156,235],[157,235],[158,235],[159,235],[160,235],[161,235],[162,235],[163,235],[164,235],[165,235],[166,235],[167,235],[168,235],[169,235],[170,235],[171,235],[172,235],[173,235],[174,235],[175,235],[176,235],[177,235],[178,235],[179,235],[180,235],[181,235],[182,235],[183,235],[184,235],[185,235],[186,235],[187,235],[188,235],[189,235],[190,235],[191,235],[192,235],[193,235],[194,235],[195,235],[196,235],[197,235],[198,235],[199,235],[200,235],[201,235],[202,235],[203,235],[204,235],[205,235],[206,235],[207,235],[208,235],[209,235],[210,235],[142,234],[143,234],[144,234],[145,234],[146,234],[147,234],[148,234],[149,234],[150,234],[151,234],[152,234],[153,234],[154,234],[155,234],[156,234],[157,234],[158,234],[159,234],[160,234],[161,234],[162,234],[163,234],[164,234],[165,234],[166,234],[167,234],[174,234],[175,234],[176,234],[177,234],[178,234],[179,234],[180,234],[181,234],[182,234],[183,234],[184,234],[185,234],[186,234],[187,234],[188,234],[189,234],[190,234],[191,234],[192,234],[193,234],[194,234],[195,234],[196,234],[197,234],[198,234],[199,234],[200,234],[201,234],[202,234],[203,234],[204,234],[205,234],[206,234],[207,234],[208,234],[209,234],[210,234],[142,233],[143,233],[144,233],[145,233],[146,233],[147,233],[148,233],[149,233],[150,233],[151,233],[152,233],[153,233],[154,233],[155,233],[156,233],[157,233],[158,233],[159,233],[160,233],[161,233],[162,233],[163,233],[164,233],[165,233],[166,233],[167,233],[178,233],[179,233],[180,233],[181,233],[182,233],[183,233],[184,233],[185,233],[186,233],[187,233],[188,233],[189,233],[190,233],[191,233],[192,233],[193,233],[194,233],[195,233],[196,233],[197,233],[198,233],[199,233],[200,233],[201,233],[202,233],[203,233],[204,233],[205,233],[206,233],[207,233],[208,233],[209,233],[210,233],[142,232],[143,232],[144,232],[145,232],[146,232],[147,232],[148,232],[149,232],[150,232],[151,232],[152,232],[153,232],[154,232],[155,232],[156,232],[157,232],[158,232],[159,232],[160,232],[161,232],[162,232],[163,232],[164,232],[165,232],[166,232],[167,232],[168,232],[169,232],[170,232],[171,232],[172,232],[173,232],[174,232],[175,232],[177,232],[178,232],[179,232],[180,232],[181,232],[182,232],[183,232],[184,232],[185,232],[186,232],[187,232],[188,232],[189,232],[190,232],[191,232],[192,232],[193,232],[194,232],[195,232],[196,232],[197,232],[198,232],[199,232],[200,232],[201,232],[202,232],[203,232],[204,232],[205,232],[206,232],[207,232],[208,232],[209,232],[210,232],[142,231],[143,231],[144,231],[145,231],[146,231],[147,231],[148,231],[149,231],[150,231],[151,231],[152,231],[153,231],[154,231],[155,231],[156,231],[157,231],[158,231],[159,231],[160,231],[161,231],[162,231],[163,231],[164,231],[165,231],[166,231],[167,231],[168,231],[169,231],[170,231],[171,231],[172,231],[173,231],[174,231],[175,231],[176,231],[177,231],[178,231],[179,231],[180,231],[181,231],[182,231],[183,231],[184,231],[185,231],[186,231],[187,231],[188,231],[189,231],[190,231],[191,231],[192,231],[193,231],[194,231],[195,231],[196,231],[197,231],[198,231],[199,231],[200,231],[201,231],[202,231],[203,231],[204,231],[205,231],[206,231],[207,231],[208,231],[209,231],[210,231],[142,230],[143,230],[144,230],[145,230],[146,230],[147,230],[148,230],[149,230],[150,230],[151,230],[152,230],[153,230],[154,230],[155,230],[156,230],[157,230],[158,230],[159,230],[160,230],[161,230],[162,230],[163,230],[164,230],[165,230],[166,230],[167,230],[168,230],[169,230],[170,230],[171,230],[172,230],[173,230],[174,230],[175,230],[176,230],[177,230],[178,230],[179,230],[180,230],[181,230],[182,230],[183,230],[184,230],[185,230],[186,230],[187,230],[188,230],[189,230],[190,230],[191,230],[192,230],[193,230],[194,230],[195,230],[196,230],[197,230],[198,230],[199,230],[200,230],[201,230],[202,230],[203,230],[204,230],[205,230],[206,230],[207,230],[208,230],[209,230],[210,230],[142,229],[143,229],[144,229],[145,229],[146,229],[147,229],[148,229],[149,229],[150,229],[151,229],[152,229],[153,229],[154,229],[155,229],[156,229],[157,229],[158,229],[159,229],[160,229],[161,229],[162,229],[163,229],[164,229],[165,229],[166,229],[167,229],[168,229],[169,229],[170,229],[171,229],[172,229],[173,229],[174,229],[177,229],[178,229],[179,229],[180,229],[181,229],[182,229],[183,229],[184,229],[185,229],[186,229],[187,229],[194,229],[198,229],[199,229],[200,229],[201,229],[202,229],[203,229],[204,229],[205,229],[206,229],[207,229],[208,229],[209,229],[210,229],[142,228],[143,228],[144,228],[145,228],[146,228],[147,228],[148,228],[149,228],[150,228],[151,228],[152,228],[153,228],[154,228],[155,228],[156,228],[157,228],[158,228],[159,228],[160,228],[161,228],[162,228],[163,228],[164,228],[165,228],[166,228],[167,228],[168,228],[169,228],[170,228],[171,228],[177,228],[178,228],[179,228],[180,228],[181,228],[182,228],[183,228],[184,228],[185,228],[186,228],[187,228],[198,228],[199,228],[200,228],[201,228],[202,228],[203,228],[204,228],[205,228],[206,228],[207,228],[208,228],[209,228],[210,228],[142,227],[143,227],[144,227],[145,227],[146,227],[147,227],[148,227],[149,227],[150,227],[151,227],[152,227],[153,227],[154,227],[155,227],[156,227],[157,227],[158,227],[159,227],[160,227],[161,227],[162,227],[163,227],[164,227],[165,227],[166,227],[167,227],[173,227],[174,227],[175,227],[176,227],[177,227],[178,227],[179,227],[180,227],[181,227],[182,227],[183,227],[184,227],[185,227],[186,227],[187,227],[188,227],[189,227],[190,227],[191,227],[192,227],[193,227],[194,227],[195,227],[196,227],[197,227],[198,227],[199,227],[200,227],[201,227],[202,227],[203,227],[204,227],[205,227],[206,227],[207,227],[208,227],[209,227],[210,227],[249,227],[250,227],[251,227],[252,227],[253,227],[254,227],[255,227],[142,226],[143,226],[144,226],[145,226],[1

mapping config

Hi,
im trying to map the config file to /app/config.json in docker.
it doesn't work for me.
i always get " invalid configuration file...using default configuration.

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

Could you write an example for the proper way to map this file?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.