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 MQTT + XML based devices #288

Draft
wants to merge 128 commits into
base: dev
Choose a base branch
from

Conversation

sandervankasteel
Copy link
Contributor

@sandervankasteel sandervankasteel commented Aug 6, 2023

This PR is for laying the ground work for supporting MQTT + XML devices. I've tested this against my own Deebot 900.

Please note, this PR is still very much a WIP.

At least the following things need to be done:

  • Completely implement the following commands
    • Clean
      • Sending
      • Response
    • Charge
      • Sending
      • Response
    • CleanLogs (Completely adheres to JSON-API version 😄)
      • Sending
      • Response
    • ChargeState
      • Sending
      • Response
        • Currently will always report back as being docked
    • BatteryInfo
      • Sending
      • Response
    • LifeSpan
      This has been split up in 3 different commands (GetLifeSpanBrush, GetLifeSpanSideBrush, GetLifeSpanHeap) because the XML based devices does not have 1 endpoint for getting all the statistics on all the consumables.
    • FanSpeed (a.k.a CleanSpeed for the MQTT based devices)
      • Getting
        • Sending
        • Response
      • Setting
        • Sending
        • Response
    • GetError
      • Has been implemented, but might benefit from some scenario testing. Since by default it appears that the GetError returns an empty string in the case of no errors.
  • Implement functionality for throwing exceptions for potentially unsupported commands on the older MQTT + XML devices
  • Add automated testing
  • Error responses
    Apparently the XML based devices use the same error codes as the JSON based devices.

But with this PR, I'd like to ask for a preliminary code review.
Just to get some initial feedback and see if I am on the correct track to get this merged.

@sandervankasteel sandervankasteel changed the title [WIP] - Add support for XML based devices [WIP] - Add support for MQTT + XML based devices Aug 6, 2023
sandervankasteel and others added 20 commits August 7, 2023 23:22
Currently still unsure what 8 means. But I know it has got something to with MQTT + XML not being available
… MQTT + XML and the MQTT + JSON version

With regards to the lifespan of consumables
@sandervankasteel
Copy link
Contributor Author

Hey @edenhaus I was kinda hoping you could give me a tip / some hand with an issue I am having.

Right now I am stuck with implementing this, because it's falls back on the "fall back" model definition and not selects the is1ok3 model definition I made. Any suggestions on how I could debug this ?

@edenhaus
Copy link
Contributor

Right now I am stuck with implementing this, because it's falls back on the "fall back" model definition and not selects the is1ok3 model definition I made. Any suggestions on how I could debug this ?

Can you try now again? Otherwise you need to share me some more details.
Please ignore the test failed of the json commands. I will fix them

@sandervankasteel
Copy link
Contributor Author

@edenhaus Perfect, thank you. This absolutely fixed it. Now I can continue implementing this!

@flubshi
Copy link
Contributor

flubshi commented Aug 26, 2024

@sandervankasteel based on your work, some of the XML commands are already merged in development. Unfortunately, I am very slow implementing the commands. I saw that you implemented of the commands and I also tried to collect information about the HTTP requests in this PR.

Are you interested in implementing some more of the XML commands in separate PRs, to get support of the deebot 900 in client.py?

@dennykorsukewitz
Copy link

@sandervankasteel
...
Are you interested in implementing some more of the XML commands in separate PRs, to get support of the deebot 900 in client.py?

Hi @sandervankasteel,

I really hope that you will respond to @flubshi's request and help us all to get support the 900.

home-assistant/core#110015

@flubshi
Copy link
Contributor

flubshi commented Nov 7, 2024

Looks like everyone is busy atm. Feedback or a review from @edenhaus for my existing PRs would also be very helpful, but it seems he was busy implementing WebRTC, one of the new awesome features of 2024.11.

Maybe @sandervankasteel or @edenhaus find some time next months helping us to implement the XML based bots :)

@edenhaus
Copy link
Contributor

Looks like everyone is busy atm. Feedback or a review from @edenhaus for my existing PRs would also be very helpful, but it seems he was busy implementing WebRTC, one of the new awesome features of 2024.11.

Yes I'm busy at the moment also with private things. But another week and than I hope I have time to review

@sandervankasteel
Copy link
Contributor Author

Hi all, thank you so much for the interest in this PR.

Unfortunately, earlier this year my Deebot 900 died. I've been trying to revive it (it's refusing to charge it's battery, even after multiple battery replacements). But unfortunately I am unable to get my Deebot 900 in a working state again. Which means that don't have the hardware to keep pursuing wrapping up this PR. If somebody wants to resume or build up my work, by all means go ahead. If you need a hand, I am more than happy to help out in any way I can.

If needed, I think I might still have all the API responses from the Ecovacs API somewhere on my hard drive.

I'm sorry to be the bringer of bad news 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants