semvec/pypi-packages huggingface dataset:
vacuum-map-parser-ijai 0.1.1
Functionalities for Ijai vacuum map parsing
License: Apache-2.0
Requires Python: <4.0,>=3.11

[![GitHub Latest Release][releases_shield]][latest_release] 
[![PyPI][pypi_releases_shield]][pypi_latest_release]
[![PyPI - Downloads][pypi_downloads_shield]][pypi_downloads]

[latest_release]: https://github.com/maksp86/Python-package-vacuum-map-parser-ijai/releases/latest
[releases_shield]: https://img.shields.io/github/v/release/maksp86/Python-package-vacuum-map-parser-ijai

[pypi_latest_release]: https://pypi.org/project/vacuum-map-parser-ijai/
[pypi_releases_shield]: https://img.shields.io/pypi/v/vacuum-map-parser-ijai

[pypi_downloads]: https://pepy.tech/project/vacuum-map-parser-ijai
[pypi_downloads_shield]: https://static.pepy.tech/badge/vacuum-map-parser-ijai

# Vacuum map parser - Ijai

Map data parser that can be used to parse maps generated by Ijai vacuums (based on map data parser for Viomi by Piotr Machowski).

## Installation

```shell
pip install vacuum-map-parser-ijai
```

## Usage

```python
from vacuum_map_parser_base.config.color import ColorsPalette
from vacuum_map_parser_base.config.drawable import Drawable
from vacuum_map_parser_base.config.image_config import ImageConfig
from vacuum_map_parser_base.config.size import Sizes
from vacuum_map_parser_base.config.text import Text
from vacuum_map_parser_ijai.map_data_parser import IjaiMapDataParser

palette: ColorsPalette = ColorsPalette()
sizes: Sizes = Sizes()
drawables: list[Drawable] = [Drawable.PATH, Drawable.CHARGER]
image_config: ImageConfig = ImageConfig()
texts: list[Text] = []
raw_map: bytes = b''

parser = IjaiMapDataParser(palette, sizes, drawables, image_config, texts)

unpacked_map = parser.unpack_map(raw_map, 
                                 wifi_sn='******SD**********', 
                                 owner_id='**********', 
                                 device_id='**********', 
                                 model='ijai.vacuum.***', 
                                 device_mac='**:**:**:**:**:**')
parsed_map = parser.parse(unpacked_map)
```
  
## Supported vacuums:
- ijai.vacuum.* (at least v1, v2, v3, v10, v13, v18, v19)
- xiaomi.vacuum.c103
- xiaomi.vacuum.c104
- xiaomi.vacuum.b106eu
*If you got another vacuum to work, please tell us*

## Special thanks

The code of this library was initially created by [@halfbakery](https://github.com/halfbakery) as a part of [Xiaomi Cloud Map Extractor](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor).