valetudo-map-parser 0.1.9b40__tar.gz → 0.1.9b42__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- valetudo_map_parser-0.1.9b42/PKG-INFO +92 -0
- valetudo_map_parser-0.1.9b42/README.md +71 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/__init__.py +6 -3
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/auto_crop.py +1 -1
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/drawable.py +155 -200
- valetudo_map_parser-0.1.9b42/SCR/valetudo_map_parser/config/drawable_elements.py +312 -0
- valetudo_map_parser-0.1.9b42/SCR/valetudo_map_parser/config/enhanced_drawable.py +447 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/shared.py +29 -1
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/types.py +15 -7
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/utils.py +410 -1
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/hypfer_draw.py +195 -61
- valetudo_map_parser-0.1.9b42/SCR/valetudo_map_parser/hypfer_handler.py +593 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/rand25_handler.py +223 -38
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/pyproject.toml +2 -2
- valetudo_map_parser-0.1.9b40/PKG-INFO +0 -23
- valetudo_map_parser-0.1.9b40/README.md +0 -2
- valetudo_map_parser-0.1.9b40/SCR/valetudo_map_parser/hypfer_handler.py +0 -289
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/LICENSE +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/NOTICE.txt +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/__init__.py +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/colors.py +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/colors_man.py +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/config/rand25_parser.py +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/map_data.py +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/py.typed +0 -0
- {valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/reimg_draw.py +0 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
Metadata-Version: 2.3
|
2
|
+
Name: valetudo-map-parser
|
3
|
+
Version: 0.1.9b42
|
4
|
+
Summary: A Python library to parse Valetudo map data returning a PIL Image object.
|
5
|
+
License: Apache-2.0
|
6
|
+
Author: Sandro Cantarella
|
7
|
+
Author-email: gsca075@gmail.com
|
8
|
+
Requires-Python: >=3.12
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
13
|
+
Requires-Dist: Pillow (>=10.3.0)
|
14
|
+
Requires-Dist: numpy (>=1.26.4)
|
15
|
+
Project-URL: Bug Tracker, https://github.com/sca075/Python-package-valetudo-map-parser/issues
|
16
|
+
Project-URL: Changelog, https://github.com/sca075/Python-package-valetudo-map-parser/releases
|
17
|
+
Project-URL: Homepage, https://github.com/sca075/Python-package-valetudo-map-parser
|
18
|
+
Project-URL: Repository, https://github.com/sca075/Python-package-valetudo-map-parser
|
19
|
+
Description-Content-Type: text/markdown
|
20
|
+
|
21
|
+
# Python-package-valetudo-map-parser
|
22
|
+
|
23
|
+
---
|
24
|
+
### What is it:
|
25
|
+
❗This is an _unofficial_ project and is not created, maintained, or in any sense linked to [valetudo.cloud](https://valetudo.cloud)
|
26
|
+
|
27
|
+
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](https://github.com/sca075/mqtt_vacuum_camera) project.
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
### Features:
|
32
|
+
- Processes map data from Valetudo-compatible robot vacuums
|
33
|
+
- Supports both Hypfer and Rand256 vacuum data formats
|
34
|
+
- Renders comprehensive map visualizations including:
|
35
|
+
- Walls and obstacles
|
36
|
+
- Robot position and cleaning path
|
37
|
+
- Room segments and boundaries
|
38
|
+
- Cleaning zones
|
39
|
+
- Virtual restrictions
|
40
|
+
- LiDAR data
|
41
|
+
- Provides auto-cropping and dynamic zooming
|
42
|
+
- Supports image rotation and aspect ratio management
|
43
|
+
- Enables custom color schemes
|
44
|
+
- Handles multilingual labels
|
45
|
+
- Implements thread-safe data sharing
|
46
|
+
|
47
|
+
### Installation:
|
48
|
+
```bash
|
49
|
+
pip install valetudo_map_parser
|
50
|
+
```
|
51
|
+
|
52
|
+
### Requirements:
|
53
|
+
- Python 3.12 or higher
|
54
|
+
- Dependencies:
|
55
|
+
- Pillow (PIL) for image processing
|
56
|
+
- NumPy for array operations
|
57
|
+
|
58
|
+
### Usage:
|
59
|
+
The library is configured using a dictionary format. See our [sample code](https://github.com/sca075/Python-package-valetudo-map-parser/blob/main/tests/test.py) for implementation examples.
|
60
|
+
|
61
|
+
Key functionalities:
|
62
|
+
- Decodes raw data from Rand256 format
|
63
|
+
- Processes JSON data from compatible vacuums
|
64
|
+
- Returns Pillow PNG images
|
65
|
+
- Provides calibration and room property extraction
|
66
|
+
- Supports asynchronous operations
|
67
|
+
|
68
|
+
### Development Status:
|
69
|
+
Current version: 0.1.9.b41
|
70
|
+
- Full functionality available in versions >= 0.1.9
|
71
|
+
- Actively maintained and enhanced
|
72
|
+
- Uses Poetry for dependency management
|
73
|
+
- Implements comprehensive testing
|
74
|
+
- Enforces code quality through ruff, isort, and pylint
|
75
|
+
|
76
|
+
### Contributing:
|
77
|
+
Contributions are welcome! You can help by:
|
78
|
+
- Submitting code improvements
|
79
|
+
- Enhancing documentation
|
80
|
+
- Reporting issues
|
81
|
+
- Suggesting new features
|
82
|
+
|
83
|
+
### Disclaimer:
|
84
|
+
This project is provided "as is" without warranty of any kind. Users assume all risks associated with its use.
|
85
|
+
|
86
|
+
### License:
|
87
|
+
Apache-2.0
|
88
|
+
|
89
|
+
---
|
90
|
+
For more information about Valetudo, visit [valetudo.cloud](https://valetudo.cloud)
|
91
|
+
Integration with Home Assistant: [MQTT Vacuum Camera](https://github.com/sca075/mqtt_vacuum_camera)
|
92
|
+
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Python-package-valetudo-map-parser
|
2
|
+
|
3
|
+
---
|
4
|
+
### What is it:
|
5
|
+
❗This is an _unofficial_ project and is not created, maintained, or in any sense linked to [valetudo.cloud](https://valetudo.cloud)
|
6
|
+
|
7
|
+
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](https://github.com/sca075/mqtt_vacuum_camera) project.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
### Features:
|
12
|
+
- Processes map data from Valetudo-compatible robot vacuums
|
13
|
+
- Supports both Hypfer and Rand256 vacuum data formats
|
14
|
+
- Renders comprehensive map visualizations including:
|
15
|
+
- Walls and obstacles
|
16
|
+
- Robot position and cleaning path
|
17
|
+
- Room segments and boundaries
|
18
|
+
- Cleaning zones
|
19
|
+
- Virtual restrictions
|
20
|
+
- LiDAR data
|
21
|
+
- Provides auto-cropping and dynamic zooming
|
22
|
+
- Supports image rotation and aspect ratio management
|
23
|
+
- Enables custom color schemes
|
24
|
+
- Handles multilingual labels
|
25
|
+
- Implements thread-safe data sharing
|
26
|
+
|
27
|
+
### Installation:
|
28
|
+
```bash
|
29
|
+
pip install valetudo_map_parser
|
30
|
+
```
|
31
|
+
|
32
|
+
### Requirements:
|
33
|
+
- Python 3.12 or higher
|
34
|
+
- Dependencies:
|
35
|
+
- Pillow (PIL) for image processing
|
36
|
+
- NumPy for array operations
|
37
|
+
|
38
|
+
### Usage:
|
39
|
+
The library is configured using a dictionary format. See our [sample code](https://github.com/sca075/Python-package-valetudo-map-parser/blob/main/tests/test.py) for implementation examples.
|
40
|
+
|
41
|
+
Key functionalities:
|
42
|
+
- Decodes raw data from Rand256 format
|
43
|
+
- Processes JSON data from compatible vacuums
|
44
|
+
- Returns Pillow PNG images
|
45
|
+
- Provides calibration and room property extraction
|
46
|
+
- Supports asynchronous operations
|
47
|
+
|
48
|
+
### Development Status:
|
49
|
+
Current version: 0.1.9.b41
|
50
|
+
- Full functionality available in versions >= 0.1.9
|
51
|
+
- Actively maintained and enhanced
|
52
|
+
- Uses Poetry for dependency management
|
53
|
+
- Implements comprehensive testing
|
54
|
+
- Enforces code quality through ruff, isort, and pylint
|
55
|
+
|
56
|
+
### Contributing:
|
57
|
+
Contributions are welcome! You can help by:
|
58
|
+
- Submitting code improvements
|
59
|
+
- Enhancing documentation
|
60
|
+
- Reporting issues
|
61
|
+
- Suggesting new features
|
62
|
+
|
63
|
+
### Disclaimer:
|
64
|
+
This project is provided "as is" without warranty of any kind. Users assume all risks associated with its use.
|
65
|
+
|
66
|
+
### License:
|
67
|
+
Apache-2.0
|
68
|
+
|
69
|
+
---
|
70
|
+
For more information about Valetudo, visit [valetudo.cloud](https://valetudo.cloud)
|
71
|
+
Integration with Home Assistant: [MQTT Vacuum Camera](https://github.com/sca075/mqtt_vacuum_camera)
|
{valetudo_map_parser-0.1.9b40 → valetudo_map_parser-0.1.9b42}/SCR/valetudo_map_parser/__init__.py
RENAMED
@@ -1,8 +1,10 @@
|
|
1
1
|
"""Valetudo map parser.
|
2
|
-
Version: 0.1.
|
2
|
+
Version: 0.1.9"""
|
3
3
|
|
4
4
|
from .config.colors import ColorsManagment
|
5
5
|
from .config.drawable import Drawable
|
6
|
+
from .config.drawable_elements import DrawableElement, DrawingConfig
|
7
|
+
from .config.enhanced_drawable import EnhancedDrawable
|
6
8
|
from .config.rand25_parser import RRMapParser
|
7
9
|
from .config.shared import CameraShared, CameraSharedManager
|
8
10
|
from .config.types import (
|
@@ -25,10 +27,11 @@ __all__ = [
|
|
25
27
|
"CameraSharedManager",
|
26
28
|
"ColorsManagment",
|
27
29
|
"Drawable",
|
30
|
+
"DrawableElement",
|
31
|
+
"DrawingConfig",
|
32
|
+
"EnhancedDrawable",
|
28
33
|
"SnapshotStore",
|
29
34
|
"UserLanguageStore",
|
30
|
-
"UserLanguageStore",
|
31
|
-
"SnapshotStore",
|
32
35
|
"RoomStore",
|
33
36
|
"RoomsProperties",
|
34
37
|
"TrimCropData",
|
@@ -118,7 +118,7 @@ class AutoCrop:
|
|
118
118
|
"""Initialize the auto crop data."""
|
119
119
|
_LOGGER.debug("Auto Crop Init data: %s", str(self.auto_crop))
|
120
120
|
_LOGGER.debug(
|
121
|
-
"Auto Crop Init trims data: %
|
121
|
+
"Auto Crop Init trims data: %r", self.handler.shared.trims.to_dict()
|
122
122
|
)
|
123
123
|
if not self.auto_crop: # and self.handler.shared.vacuum_state == "docked":
|
124
124
|
self.auto_crop = await self._async_auto_crop_data(self.handler.shared.trims)
|