Skip to main content

A Python library to parse Valetudo map data returning a PIL Image object.

Project description

Python-package-valetudo-map-parser


What is it:

❗This is an unofficial project and is not created, maintained, or in any sense linked to valetudo.cloud

A Python library that converts Valetudo vacuum JSON map data into PIL (Python Imaging Library) images. This package is primarily developed for and used in the MQTT Vacuum Camera project.


Features:

  • Processes map data from Valetudo-compatible robot vacuums
  • Supports both Hypfer and Rand256 vacuum data formats
  • Renders comprehensive map visualizations including:
    • Walls and obstacles
    • Robot position and cleaning path
    • Room segments and boundaries
    • Cleaning zones
    • Virtual restrictions
    • LiDAR data
    • Mop mode path rendering (Hypfer only)
  • Provides auto-cropping and dynamic zooming
  • Supports image rotation and aspect ratio management
  • Enables custom color schemes
  • Handles multilingual labels
  • Implements thread-safe data sharing

Installation:

pip install valetudo_map_parser

Requirements:

  • Python 3.13 or higher
  • Dependencies:
    • Pillow (PIL) for image processing
    • NumPy for array operations
    • MvcRender Specific C implementation of drawings

Usage:

The library is configured using a dictionary format. See our sample code for implementation examples.

Key functionalities:

  • Decodes raw data from Rand256 format
  • Processes JSON data from compatible vacuums
  • Returns Pillow PNG images
  • Provides calibration and room property extraction
  • Supports asynchronous operations

Development Status:

Current version: 0.2.4b3

  • Full functionality available in versions >= 0.2.0
  • Actively maintained and enhanced
  • Uses Poetry for dependency management
  • Implements comprehensive testing
  • Enforces code quality through ruff, isort, and pylint (10.00/10)

Recent Updates (v0.2.4):

  • Fixed Critical Calibration Bug: Calibration points now correctly update when map rotation changes
  • Fixed Rotation Change Handling: Prevents errors when changing rotation with saved floor data
  • Multi-Floor Support: Enhanced floor data management with add/update/remove methods
  • Mop Path Customization: Configurable mop path width, color, and transparency (Hypfer vacuums)
  • Dock State Display: Shows dock operations (e.g., "mop cleaning") in status text
  • Improved Compatibility: Python 3.12+ support for Home Assistant integration
  • Performance: Optimized image generation (~450ms average)
  • Code Quality: Refactored for better maintainability and reduced complexity

Contributing:

Contributions are welcome! You can help by:

  • Submitting code improvements
  • Enhancing documentation
  • Reporting issues
  • Suggesting new features

Disclaimer:

This project is provided "as is" without warranty of any kind. Users assume all risks associated with its use.

License:

Apache-2.0


For more information about Valetudo, visit valetudo.cloud Integration with Home Assistant: MQTT Vacuum Camera

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valetudo_map_parser-0.2.5b0.tar.gz (22.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valetudo_map_parser-0.2.5b0-py3-none-any.whl (23.0 MB view details)

Uploaded Python 3

File details

Details for the file valetudo_map_parser-0.2.5b0.tar.gz.

File metadata

  • Download URL: valetudo_map_parser-0.2.5b0.tar.gz
  • Upload date:
  • Size: 22.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for valetudo_map_parser-0.2.5b0.tar.gz
Algorithm Hash digest
SHA256 8204c1de0f8bd68a4a214a4cbfce3ae76fb3bf9832c36397e22af8a4980e57fa
MD5 9a16ffd1f8517fa87115c4302e20a044
BLAKE2b-256 1e80c88b2e1a379567f636c4a5cb3d1de00dbc127b172d2df8ac5dd2594846ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for valetudo_map_parser-0.2.5b0.tar.gz:

Publisher: release.yaml on sca075/Python-package-valetudo-map-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file valetudo_map_parser-0.2.5b0-py3-none-any.whl.

File metadata

File hashes

Hashes for valetudo_map_parser-0.2.5b0-py3-none-any.whl
Algorithm Hash digest
SHA256 2718613ed11a152c7f042dc923e00c7c1416a10c2e5ebaf07015e1e779811a86
MD5 452ead87fa7111a83a7c1820a43569e0
BLAKE2b-256 fd968cf408627b8f76baa82a4a07687d7aceaab3d524dc58120edd006253bd3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for valetudo_map_parser-0.2.5b0-py3-none-any.whl:

Publisher: release.yaml on sca075/Python-package-valetudo-map-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page