Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for T9 PLUS (um2ywg) #632

Merged
merged 2 commits into from
Dec 10, 2024
Merged

Conversation

marcolino7
Copy link
Contributor

@marcolino7 marcolino7 commented Dec 6, 2024

Here is Pull request to add T9+ um2ywg to supported device.
Set of command are from T8 AIVI.

Summary by CodeRabbit

  • New Features
    • Introduced comprehensive configuration for a robotic vacuum device, enhancing its capabilities including cleaning actions, battery status, fan speed control, and error handling.
    • Added advanced settings for features like carpet auto fan boost and sound playback adjustments.
    • Expanded test coverage by adding a new device identifier and updating expected commands for specific device classes.
  • Improvements
    • Structured approach to managing device functionalities, ensuring better interaction with the vacuum's hardware and software.

Copy link
Contributor

coderabbitai bot commented Dec 6, 2024

Warning

Rate limit exceeded

@edenhaus has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 9 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 3489791 and 09d63f8.

📒 Files selected for processing (1)
  • tests/hardware/test_init.py (1 hunks)

Walkthrough

The changes introduce a new file, x5d34r.py, within the deebot_client framework, which establishes a StaticDeviceInfo instance for a robotic vacuum device. This file details various capabilities of the vacuum, including device type, battery status, cleaning actions, and error handling, among others. The Capabilities class is utilized to structure these functionalities, ensuring that commands and events related to the vacuum's operation are well-defined and accessible. Additionally, modifications to the test suite enhance the coverage and validation of device capabilities.

Changes

File Path Change Summary
deebot_client/hardware/deebot/x5d34r.py New file added that defines a StaticDeviceInfo instance for a vacuum device with various capabilities.
tests/hardware/test_init.py Device identifier "um2ywg" added; expected commands updated for device class "p95mgv" to include new events and lifespan types.

Possibly related PRs

  • Add support for Deebot N8 #613: The changes in this PR involve the introduction of a new file x5d34r.py, which defines a StaticDeviceInfo instance for a robotic vacuum, similar to the main PR's new file x5d34r.py that also encapsulates various capabilities for a vacuum device.
  • Add support for Deebot T10 #618: This PR also introduces a new file jtmf04.py that defines a StaticDeviceInfo instance for a vacuum device, paralleling the structure and purpose of the main PR's new file.
  • Add support for Deebot N8 Pro+ Black #619: Similar to the main PR, this PR introduces a new file x5d34r.py that defines capabilities for a robotic vacuum, indicating a direct relationship in terms of functionality and structure.
  • adding Deebot N30 Omni support (zwkcqc) #622: This PR introduces a new file zwkcqc.py that defines capabilities for a robotic vacuum, which aligns with the main PR's focus on defining a StaticDeviceInfo instance and its capabilities.
  • Add Deebot OZMO T9 AIVI #624: The new file x5d34r.py in this PR also defines a StaticDeviceInfo instance for a vacuum device, which is directly related to the main PR's introduction of similar functionality.
  • Add support for Deebot T9 AIVI (8kwdb4) #630: This PR introduces a new file 8kwdb4.py that defines capabilities for the DEEBOT OZMO T9 AIVI, which is consistent with the main PR's focus on defining a comprehensive configuration for a robotic vacuum device.

Suggested labels

pr: bugfix

Poem

In the realm of dust and cheer,
A vacuum's dance, we hold so dear.
With capabilities vast and bright,
It cleans our homes, a wondrous sight!
So hop along, dear friends, let's play,
For the new features are here to stay! 🐰✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Experiment)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@marcolino7 marcolino7 mentioned this pull request Dec 6, 2024
4 tasks
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
deebot_client/hardware/deebot/um2ywg.py (3)

Line range hint 20-23: Optimize imports by removing unused ones

Review the imported modules to ensure that all are necessary. Unused imports can clutter the code and potentially lead to maintenance issues.


Line range hint 44-57: Avoid duplication of LifeSpan types

The LifeSpan types are duplicated in both the types parameter and within the GetLifeSpan call. To improve maintainability, define the list once and reuse it.

Apply this refactor:

# Define the list once
life_span_types = [
    LifeSpan.BRUSH,
    LifeSpan.FILTER,
    LifeSpan.SIDE_BRUSH,
    LifeSpan.UNIT_CARE,
]

life_span=CapabilityLifeSpan(
    types=life_span_types,
    event=LifeSpanEvent,
    get=[GetLifeSpan(life_span_types)],
    reset=ResetLifeSpan,
),

Line range hint 81-83: Consider adding error handling for network capabilities

When retrieving network information using GetNetInfo(), consider adding error handling to manage potential exceptions if the device is offline or unreachable.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e0fde3d and 3489791.

📒 Files selected for processing (1)
  • deebot_client/hardware/deebot/um2ywg.py (1 hunks)
🔇 Additional comments (4)
deebot_client/hardware/deebot/um2ywg.py (4)

Line range hint 59-75: Verify the empty command list in MapChangedEvent

The map.changed capability has an empty list of commands:

changed=CapabilityEvent(MapChangedEvent, []),

Ensure that this is intentional and that no commands are required to trigger the MapChangedEvent.


Line range hint 87-99: Ensure consistency in CapabilitySetEnable usage

In the settings capabilities, verify that all CapabilitySetEnable instances correctly implement both the get and set methods. For example, advanced_mode, carpet_auto_fan_boost, and true_detect should consistently handle enabling and disabling features.


Line range hint 105-114: Confirm all WaterAmount levels are supported

The water capability includes various WaterAmount levels. Verify that the device supports all specified levels, especially WaterAmount.ULTRAHIGH, to prevent unsupported setting errors.


1-1: ⚠️ Potential issue

Remove unintended code on line 1

Line 1 contains x5d34r.py, which appears to be unintended and could cause a syntax error. If this was meant to be a comment, please prefix it with #, or remove the line if it's unnecessary.

Apply this diff to fix the issue:

- x5d34r.py

Likely invalid or redundant comment.

@edenhaus edenhaus linked an issue Dec 6, 2024 that may be closed by this pull request
4 tasks
@sh00t2kill
Copy link

FWIW confirmed this works

@marcolino7
Copy link
Contributor Author

FWIW confirmed this works

Hi, thanks for feedback. I don't know because merge failed

@edenhaus edenhaus added the pr: new-feature PR, which adds a new feature label Dec 10, 2024
@edenhaus edenhaus changed the title Added support for T9 PLUS um2ywg symlinking T8 AIVI Added support for T9 PLUS (um2ywg) Dec 10, 2024
Copy link
Contributor

@edenhaus edenhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marcolino7 👍

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.68%. Comparing base (e0fde3d) to head (09d63f8).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #632   +/-   ##
=======================================
  Coverage   86.68%   86.68%           
=======================================
  Files          90       90           
  Lines        3365     3365           
  Branches      298      298           
=======================================
  Hits         2917     2917           
  Misses        394      394           
  Partials       54       54           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edenhaus edenhaus merged commit 6c19271 into DeebotUniverse:dev Dec 10, 2024
8 of 9 checks passed
@edenhaus edenhaus changed the title Added support for T9 PLUS (um2ywg) Add support for T9 PLUS (um2ywg) Dec 10, 2024
@Joey291
Copy link

Joey291 commented Dec 11, 2024

I just Updates to HA 2024.12.2
With 9.3 Deebot Bit my T9+ still don't work


Logger: homeassistant.components.ecovacs.controller
Quelle: components/ecovacs/controller.py:100
Integration: Ecovacs (Dokumentation, Probleme)
Erstmals aufgetreten: 06:58:29 (1 Vorkommnisse)
Zuletzt protokolliert: 06:58:29

Device "DEEBOT T9+" not supported. More information at https://github.com/DeebotUniverse/client.py/issues/612: {'did': 'def7761d...', 'name': 'E03N007....', 'class': 'lhbd50', 'resource': 'eG7s', 'company': 'eco-ng', 'bindTs': 16980437..., 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-eu.ww.ecouser.net'}, 'deviceName': 'DEEBOT T9+', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/603f51243b03f50007b6c2ca', 'ota': True, 'UILogicId': 'T9_PRO_G', 'materialNo': '110-2...', 'pid': '5f88195e6cf8de...', 'product_category': 'DEEBOT', 'model': 'DEEBOT_OZMO_T9PLUS', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'nick': 'Schrotti', 'homeId': '626ba63b63a68e...', 'homeSort': 9999, 'status': 1, 'offmap': True, 'otaUpgrade': {}}

@marcolino7
Copy link
Contributor Author

I just Updates to HA 2024.12.2 With 9.3 Deebot Bit my T9+ still don't work


Logger: homeassistant.components.ecovacs.controller
Quelle: components/ecovacs/controller.py:100
Integration: Ecovacs (Dokumentation, Probleme)
Erstmals aufgetreten: 06:58:29 (1 Vorkommnisse)
Zuletzt protokolliert: 06:58:29

Device "DEEBOT T9+" not supported. More information at https://github.com/DeebotUniverse/client.py/issues/612: {'did': 'def7761d...', 'name': 'E03N007....', 'class': 'lhbd50', 'resource': 'eG7s', 'company': 'eco-ng', 'bindTs': 16980437..., 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-eu.ww.ecouser.net'}, 'deviceName': 'DEEBOT T9+', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/603f51243b03f50007b6c2ca', 'ota': True, 'UILogicId': 'T9_PRO_G', 'materialNo': '110-2...', 'pid': '5f88195e6cf8de...', 'product_category': 'DEEBOT', 'model': 'DEEBOT_OZMO_T9PLUS', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'nick': 'Schrotti', 'homeId': '626ba63b63a68e...', 'homeSort': 9999, 'status': 1, 'offmap': True, 'otaUpgrade': {}}

Hi,
mine is working. What is your deviceID?

Marco

@Joey291
Copy link

Joey291 commented Dec 12, 2024

I just Updates to HA 2024.12.2 With 9.3 Deebot Bit my T9+ still don't work

Logger: homeassistant.components.ecovacs.controller

Quelle: components/ecovacs/controller.py:100

Integration: Ecovacs (Dokumentation, Probleme)

Erstmals aufgetreten: 06:58:29 (1 Vorkommnisse)

Zuletzt protokolliert: 06:58:29

Device "DEEBOT T9+" not supported. More information at #612: {'did': 'def7761d...', 'name': 'E03N007....', 'class': 'lhbd50', 'resource': 'eG7s', 'company': 'eco-ng', 'bindTs': 16980437..., 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-eu.ww.ecouser.net'}, 'deviceName': 'DEEBOT T9+', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/603f51243b03f50007b6c2ca', 'ota': True, 'UILogicId': 'T9_PRO_G', 'materialNo': '110-2...', 'pid': '5f88195e6cf8de...', 'product_category': 'DEEBOT', 'model': 'DEEBOT_OZMO_T9PLUS', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'nick': 'Schrotti', 'homeId': '626ba63b63a68e...', 'homeSort': 9999, 'status': 1, 'offmap': True, 'otaUpgrade': {}}

Hi,

mine is working. What is your deviceID?

Marco

Hey
Thanks for replying
I Hope These 6 letters are the deviceid.

DEEBOT T9+ (lhbd50)
von Ecovacs
Firmware: 1.4.8
Seriennummer: E03N00724C09..

@marcolino7
Copy link
Contributor Author

I just Updates to HA 2024.12.2 With 9.3 Deebot Bit my T9+ still don't work

Logger: homeassistant.components.ecovacs.controller

Quelle: components/ecovacs/controller.py:100

Integration: Ecovacs (Dokumentation, Probleme)

Erstmals aufgetreten: 06:58:29 (1 Vorkommnisse)

Zuletzt protokolliert: 06:58:29

Device "DEEBOT T9+" not supported. More information at #612: {'did': 'def7761d...', 'name': 'E03N007....', 'class': 'lhbd50', 'resource': 'eG7s', 'company': 'eco-ng', 'bindTs': 16980437..., 'service': {'jmq': 'jmq-ngiot-eu.dc.ww.ecouser.net', 'mqs': 'api-ngiot.dc-eu.ww.ecouser.net'}, 'deviceName': 'DEEBOT T9+', 'icon': 'https://portal-ww.ecouser.net/api/pim/file/get/603f51243b03f50007b6c2ca', 'ota': True, 'UILogicId': 'T9_PRO_G', 'materialNo': '110-2...', 'pid': '5f88195e6cf8de...', 'product_category': 'DEEBOT', 'model': 'DEEBOT_OZMO_T9PLUS', 'updateInfo': {'needUpdate': False, 'changeLog': ''}, 'nick': 'Schrotti', 'homeId': '626ba63b63a68e...', 'homeSort': 9999, 'status': 1, 'offmap': True, 'otaUpgrade': {}}

Hi,
mine is working. What is your deviceID?
Marco

Hey Thanks for replying I Hope These 6 letters are the deviceid.

DEEBOT T9+ (lhbd50) von Ecovacs Firmware: 1.4.8 Seriennummer: E03N00724C09..

Hi device Id is different from mine T9+ that is um2ywg
Perhaps yours work fine with T8 template as mine. You can Symlink the T8 file x5d34r.py to your lhbd50.py and create a pull request in order to add. You can also quick test with this command in Home Assistant Console:

from HA console type login, when you got shell type this commands
docker ps | grep homeassistant
docker exec -it <CONTAINERID> sh (retrived with previus command)
cd /usr/local/lib/python3.13/site-packages/deebot_client/hardware/deebot
ln -svfT x5d34r.py lhbd50.py 

restart home assistant

This create a symlink to your robot using the T8 set of commands. Please perform a backup o a snapshot of your HA installation, you use these commands at your own risk.

Marco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: new-feature PR, which adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for T9+
4 participants