Error parsing maps
See original GitHub issueDescribe the bug
Saving maps in valetudo seems to be failing. I can see completed map after the first cleanup though. However there are two issues: It never persist over two cleanups or reboot and I cannot see the zones created by the robot, althoug they are in the png file saved in the robot…
Strange is that he is trying to save the map even after device reboot - apparently the map from previous cleanup stays in the robot but it doesn’t get to the Valetudo.
To Reproduce
Screenshots

Vacuum Model
Xiaomi branded viomi v7? Model STYTJ02YM
/etc/sysconf/device.conf:model=viomi.vacuum.v7
Valetudo Version
2022.02.0
Expected behavior
Map is saved including the zones and it persist between the cleanups
Additional context
Logs
valetudo.log
Full log file attached, this is just a snippet of the error part.
[2022-02-16T04:08:26.009Z] [DEBUG] Map upload started with: {
query: {
ts: '1867295070766',
suffix: 'urls',
Expires: '1644985154',
index: '0',
method: '_sync.gen_tmp_presigned_url'
},
params: { filename: undefined }
}
[2022-02-16T04:08:26.089Z] [ERROR] Error parsing map. Dump saved in /tmp/mapdata34
[2022-02-16T04:08:26.091Z] [ERROR] unhandledRejection {
reason: Error: Invalid pixels array
at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)
at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)
at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)
at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)
at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5),
stack: 'Error: Invalid pixels array\n' +
' at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)\n' +
' at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)\n' +
' at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)\n' +
' at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)\n' +
' at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)',
promise: Promise {
<rejected> Error: Invalid pixels array
at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)
at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)
at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)
at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)
at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
}
}
[2022-02-16T04:08:26.096Z] [DEBUG] <<< cloud: {"result":["ok"],"id":43}
[2022-02-16T04:08:26.097Z] [DEBUG] << cloud: ignoring response for non-pending request {"result":["ok"],"id":43}
[2022-02-16T04:08:26.098Z] [WARN] Error while saving unparsable map null
Map PNG I got from the robot filesystem
Map as it looks like during the cleaning in the Valetudo:
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Port 8053 is the mocked miio cloud provided by valetudo Port 8079 is the mocked fds http server for map uploads provided by valetudo
Basically you have commands, status data etc which is done via miio and large blobs which are uploaded via http to something that is just some blob storage similar to aws s3. In Valetudo, said mock blob storage does not store the blobs but directly processes them, parsing the map into valetudo-specific data structures and then discarding the raw data.
Every n seconds, Valetudo is sending the poll map miio command which in turn makes the robot upload the latest map data to that mock fds endpoint on port 8079 https://github.com/Hypfer/Valetudo/blob/635d7f91c6fd679d0326bb64efb048626fe07f38/backend/lib/robots/viomi/ViomiValetudoRobot.js#L473-L476
Seems like this has been magically solved by resetting the map and disabling and enabling again the persistent maps in Valetudo… it now just works