Skip to content

Commit

Permalink
Merge pull request #286 from PiotrMachowski/dev
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
PiotrMachowski authored May 23, 2022
2 parents 7bc8682 + 2764b3f commit dd5cb2e
Show file tree
Hide file tree
Showing 32 changed files with 1,145 additions and 357 deletions.
100 changes: 100 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Report an issue with Xiaomi Cloud Map Extractor
description: Report an issue with Xiaomi Cloud Map Extractor.
labels: bug
assignees: 'PiotrMachowski'
body:
- type: markdown
attributes:
value: |
This issue form is for reporting bugs only!
If you have a question, feature or enhancement request, please use the dedicated form.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have updated the integration to the latest version available
required: true
- label: I have checked if the problem is already reported
required: true
- type: textarea
validations:
required: true
attributes:
label: The problem
description: >-
Describe the issue you are experiencing here.
- type: markdown
attributes:
value: |
## Environment
- type: input
id: bug-version
validations:
required: true
attributes:
label: What version of am integration has described problem?
placeholder: vX.X.X
- type: input
id: last-working-version
validations:
required: false
attributes:
label: What was the last working version of an integration?
placeholder: vX.X.X
description: >
If known, otherwise leave blank.
- type: input
id: vacuum-model
validations:
required: true
attributes:
label: What vacuum model do you have problems with?
placeholder: roborock.vacuum.s5e
- type: input
id: ha-version
validations:
required: true
attributes:
label: What version of Home Assistant do you use?
placeholder: core-
description: >
Can be found in: [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/).
[![Open your Home Assistant instance and show your Home Assistant version information.](https://my.home-assistant.io/badges/info.svg)](https://my.home-assistant.io/redirect/info/)
- type: dropdown
validations:
required: true
attributes:
label: What type of installation are you running?
description: >
Can be found in: [Configuration panel -> Info](https://my.home-assistant.io/redirect/info/).
[![Open your Home Assistant instance and show your Home Assistant version information.](https://my.home-assistant.io/badges/info.svg)](https://my.home-assistant.io/redirect/info/)
options:
- Home Assistant OS
- Home Assistant Container
- Home Assistant Supervised
- Home Assistant Core
- type: markdown
attributes:
value: |
# Details
- type: textarea
validations:
required: true
attributes:
label: Camera's configuration
description: |
Please provide camera's YAML configuration to help with problem reproduction.
render: yaml
- type: textarea
attributes:
label: Errors shown in the HA logs (if applicable)
render: shell
- type: textarea
attributes:
label: Additional information
description: >
If you have any additional information, use the field below.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question/open a discussion
url: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/discussions
about: To ask a question or open a discussion please use a dedicated section.
- name: Report a bug in the map card (Lovelace Vacuum Map card)
url: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/issues
about: This is the issue tracker for the Map Extractor. Please report issues with the card in its repository.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Request a feature in Xiaomi Cloud Map Extractor
description: Request a feature in Xiaomi Cloud Map Extractor
labels: enhancement
assignees: 'PiotrMachowski'
body:
- type: markdown
attributes:
value: |
This issue form is for feature requests or enhancements only!
If you have a bug or a question, please use the dedicated form.
- type: textarea
validations:
required: true
attributes:
label: Description
description: >-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Solution
description: >-
A clear and concise description of what you want to happen.
- type: textarea
validations:
required: false
attributes:
label: Alternatives
description: >-
A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
validations:
required: false
attributes:
label: Context
description: >-
Add any other context about the feature request here.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/new_platform_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Request support for a new vacuum/platform
description: Request support for a new vacuum/platform
labels:
- new platform
- enhancement
assignees: 'PiotrMachowski'
body:
- type: markdown
attributes:
value: |
Using this form you can create a request for a new supported vacuum/platform.
- type: checkboxes
id: checklist
attributes:
label: Checklist
options:
- label: I have updated the integration to the latest version available
required: true
- label: I have checked if the vacuum/platform is already requested
required: true
- label: I have sent raw map file to `piotr.machowski.dev [at] gmail.com` ([Retrieving map](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#retrieving-map); please provide your GitHub username in the email)
required: false
- type: input
id: vacuum-model
validations:
required: true
attributes:
label: What vacuum model do you want to be supported?
placeholder: roborock.vacuum.s5e
- type: input
id: vacuum-model
validations:
required: true
attributes:
label: What is its name?
placeholder: Roborock S5 Max
- type: checkboxes
id: available-apis
attributes:
label: Available APIs
description: >-
Please check if map appears when you use following APIs in `force_api` config
options:
- label: `xiaomi`
- label: `viomi`
- label: `roidmi`
- label: `dreame`
- type: textarea
attributes:
label: Errors shown in the HA logs (if applicable)
render: shell
- type: textarea
attributes:
label: Other info
8 changes: 4 additions & 4 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
- run: pip install --upgrade pip wheel
- run: pip install bandit black codespell flake8 flake8-2020 flake8-bugbear
flake8-comprehensions isort mypy pytest pyupgrade safety
- run: bandit --recursive --skip B105,B108,B303,B304,B311,B413 .
- run: bandit --recursive --skip B105,B108,B303,B304,B324,B311,B413,B506 .
- run: black --check . || true
- run: codespell --ignore-words-list="hass"
- run: flake8 . --count --ignore=B001,E241,E265,E302,E722,E731,F403,F405,F841,W504
- run: flake8 custom_components --count --ignore=B001,E241,E265,E302,E722,E731,F403,F405,F841,W504
--max-complexity=21 --max-line-length=184 --show-source --statistics
- run: isort --check-only --profile black . || true
- run: isort --check-only --profile black custom_components || true
- run: pip install -r requirements.txt || pip install --editable . || true
- run: mkdir --parents --verbose .mypy_cache
- run: mypy --ignore-missing-imports --install-types --non-interactive . || true
- run: mypy --ignore-missing-imports --install-types --non-interactive custom_components || true
- run: pytest . || true
- run: pytest --doctest-modules . || true
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
Expand Down
33 changes: 25 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Xiaomi Cloud Map Extractor

This custom integration provides a way to present a live view of a map for Xiaomi, Roborock, Viomi and Roidmi vacuums.
This custom integration provides a way to present a live view of a map for Xiaomi, Roborock, Viomi, Roidmi and Dreame vacuums.
([Supported devices](#supported-devices))

<img src="https://raw.githubusercontent.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/master/images/map_no_rooms.png" width=48%> <img src="https://raw.githubusercontent.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/master/images/map_rooms.png" width=48%>
Expand Down Expand Up @@ -191,6 +191,7 @@ camera:
sizes:
charger_radius: 4
vacuum_radius: 6.5
path_width: 1
obstacle_radius: 3
ignored_obstacle_radius: 3
obstacle_with_photo_radius: 3
Expand Down Expand Up @@ -253,7 +254,7 @@ camera:
| `store_map_raw` | boolean | false | default: `false` | Enables storing raw map data in `store_map_path` directory ([more info](#retrieving-map)). Xiaomi map can be opened with [RoboMapViewer](https://github.com/marcelrv/XiaomiRobotVacuumProtocol/tree/master/RRMapFile). |
| `store_map_image` | boolean | false | default: `false` | Enables storing map image in `store_map_path` path with name `map_image_<device_model>.png` |
| `store_map_path` | string | false | default: `/tmp` | Storing map data directory |
| `force_api` | string | false | One of: `xiaomi`, `viomi`, `roidmi` | Forces usage of specific API. |
| `force_api` | string | false | One of: `xiaomi`, `viomi`, `roidmi`, `dreame` | Forces usage of specific API. |

#### Colors configuration

Expand All @@ -264,8 +265,9 @@ camera:

| Color name | Description |
| --- | --- |
| `color_charger` | Charger position |
| `color_cleaned_area` | Fill of area that already has been cleaned (Viomi) |
| `color_charger` | Charger fill |
| `color_charger_outline` | Charger outline |
| `color_cleaned_area` | Fill of area that already has been cleaned |
| `color_goto_path` | Path for goto mode |
| `color_grey_wall` | Obstacles (e.g. chairs, table legs) |
| `color_ignored_obstacle_with_photo` | Ignored obstacle with photo mark on a map |
Expand All @@ -274,7 +276,7 @@ camera:
| `color_map_outside` | Map outside |
| `color_map_wall_v2` | Walls (for software with rooms support) |
| `color_map_wall` | Walls (for software without rooms support) |
| `color_new_discovered_area` | Newly discovered areas (Viomi) |
| `color_new_discovered_area` | Newly discovered areas |
| `color_no_go_zones_outline` | Outline of no-go zones |
| `color_no_go_zones` | Fill of no-go zones |
| `color_no_mop_zones_outline` | Outline of no-mopping zones |
Expand All @@ -283,7 +285,8 @@ camera:
| `color_obstacle` | Obstacle mark on a map |
| `color_path` | Path of a vacuum |
| `color_predicted_path` | Predicted path to a point in goto mode |
| `color_robo` | Vacuum position |
| `color_robo` | Vacuum fill |
| `color_robo_outline` | Vacuum outline |
| `color_room_names` | Room names (if available) |
| `color_scan` | Areas not assigned to any room (for software with rooms support) |
| `color_unknown` | Other areas |
Expand Down Expand Up @@ -349,12 +352,13 @@ fc-list | grep ttf | sed "s/.*\///"| sed "s/ttf.*/ttf/"

| Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| `charger_radius` | float | false | 4 | Radius of a charger circle. |
| `vacuum_radius` | float | false | 4 | Radius of a vacuum circle. |
| `charger_radius` | float | false | 6 | Radius of a charger circle. |
| `vacuum_radius` | float | false | 6 | Radius of a vacuum semi-circle. |
| `obstacle_radius` | float | false | 3 | Radius of an obstacle circle. |
| `ignored_obstacle_radius` | float | false | 3 | Radius of an ignored obstacle circle circle. |
| `obstacle_with_photo_radius` | float | false | 3 | Radius of an obstacle with photo circle. |
| `ignored_obstacle_with_photo_radius` | float | false | 3 | Radius of an ignored obstacle with photo circle. |
| `path_width` | float | false | 1 | Width of path line. |

#### Attributes configuration

Expand Down Expand Up @@ -414,6 +418,7 @@ This integration was tested on following vacuums:
- `roborock.vacuum.a08` (Roborock S6 Pure)
- `roborock.vacuum.a10` (Roborock S6 MaxV)
- `roborock.vacuum.a15` (Roborock S7)
- `roborock.vacuum.a27` (Roborock S7 MaxV)
- Viomi map format:
- `viomi.vacuum.v6` (Viomi Vacuum V2 Pro, Xiaomi Mijia STYJ02YM, Mi Robot Vacuum Mop Pro)
- `viomi.vacuum.v7` (Mi Robot Vacuum-Mop Pro)
Expand All @@ -422,6 +427,18 @@ This integration was tested on following vacuums:
- Roidmi map format:
- `roidmi.vacuum.v60` (Roidmi EVE Plus)
- `viomi.vacuum.v18` (Viomi S9)
- `zhimi.vacuum.xa1` (Lydsto R1)
- Dreame map format:
- `dreame.vacuum.mc1808` (Xiaomi Mi Mop/Xiaomi Mijia 1C)
- `dreame.vacuum.p2008` (Dreame F9)
- `dreame.vacuum.p2009` (Dreame D9)
- `dreame.vacuum.p2028` (Dreame Z10 Pro)
- `dreame.vacuum.p2029` (Dreame L10 Pro)
- `dreame.vacuum.p2036` (Trouver LDS Cleaner)
- `dreame.vacuum.p2041o` (Xiaomi Mop 2 Pro+)
- `dreame.vacuum.p2140` (Mijia Robot Vacuum-Mop 2C)
- `dreame.vacuum.p2157` (MOVA L600)
- `dreame.vacuum.p2259` (Dreame D9 Max)

## Unsupported devices

Expand Down
Loading

0 comments on commit dd5cb2e

Please sign in to comment.