OZMO 905 Support#883
Conversation
bcfeaf6 to
ea5b144
Compare
|
Nice 😻👍 |
|
Did you runtime test the
⬆️ fixed by 17d49a0 Edit: And mypy seems unhappy too:
⬆️ fixed This comment is resolved |
I did but turns out sometimes it replies with bytes or bytearray (paho can do that). I've added the decoding to the XML message as well as I did for events altough I'm not sure wheter that decoding should be pushed further up the chain |
🤷♂️ |
4fd891e to
00948d6
Compare
|
TODO List:
|
| ), | ||
| network=CapabilityEvent(NetworkInfoEvent, []), | ||
| play_sound=CapabilityExecute(PlaySound), | ||
| settings=CapabilitySettings( |
There was a problem hiding this comment.
I think the settings key is required:
File "client.py/deebot_client/hardware/deebot/2pv572.py", line 55, in <module>
Capabilities(
~~~~~~~~~~~~^
availability=CapabilityEvent(AvailabilityEvent, []),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<33 lines>...
),
^^
),
^
TypeError: Capabilities.__init__() missing 1 required keyword-only argument: 'settings'
There was a problem hiding this comment.
@flubshi That's correct but we do not support any of those settings yet. In particular the volume seems mandatory.
I'm going to push a "fake volume" command tomorrow so that both HA and the library are happy :)
There was a problem hiding this comment.
(Actually, my bot doesn't support ANY volume configuration at all)
There was a problem hiding this comment.
The XML robot Deebot 900 has also no volume configuration. Maybe we should make it optional in the library instead of a fake module.
|
@flubshi I've added map support as well, feel free to check if it works for you as well |
Wow, yes - it works! Thanks a lot! The map of the bot is now available in Home Assistant :) Most sensors are working as well. |
f6abb2c to
336346f
Compare
|
@flubshi two new features for you to test:
|
edenhaus
left a comment
There was a problem hiding this comment.
Thanks for your contribution :)
This PR is huge and needs to be splitted into multiple PRs.
Please create a PR for any new added command. Similar commands like all map commands can be in one PR.
The last PR should be the PR, where the capabilities files for the new bot is added.
As the capabilities file changes include breaking change, I want that PR as small as possible.
A lot of test are missing for the newly added commands. Please add them
| except ValueError as err: | ||
| msg = f'Could not convert "{value}" of {name} into {type_}' | ||
| raise DeebotError(msg) from err | ||
| if hasattr(type_, "from_xml"): |
There was a problem hiding this comment.
This is xml specific and should be in the XML specific files and not in the general one
| status = State.DOCKED | ||
| case "idle": | ||
| status = State.IDLE | ||
| pass |
There was a problem hiding this comment.
Why are you changing this line?
| elif clean_action == CleanAction.PAUSE: | ||
| event_bus.notify(StateEvent(State.PAUSED)) | ||
| else: | ||
| _LOGGER.debug("Ignored CleanState %s", clean_action) |
There was a problem hiding this comment.
Why are we ignoring this state? If we don't know what this state means, then we should return HandlingResult.analyse() instead
|
|
||
|
|
||
| class XmlSetCommand(ExecuteCommand, SetCommand, ABC): | ||
| class XmlCommandMqttP2P(XmlCommand, CommandMqttP2P, ABC): |
There was a problem hiding this comment.
CommandMqttP2P should only be used for commands, where the bot will not inform us if the command was changed via the app. Newer models are always sending a message if the state has changed and therefore this class is somehow deprecated and only used if the bot really doesn't send any updates
There was a problem hiding this comment.
Indeed I agree, I'll get rid of this as I see no value. We do get notification via messages for most of the changes anyway. The only thing I'm not so sure about is SetOnOff (which I have locally and has no message counterpart, but I'll leave that for another PR)
|
|
||
| amount: WaterAmount | ||
| # None means no data available | ||
| amount: WaterAmount | None = None |
There was a problem hiding this comment.
When is the amount None and another field not?
There was a problem hiding this comment.
XML bots have two commands:
One to tell you if the waterbox is attached (GetWaterBoxInfo), the other to give you the water level (GetWaterPermeability) . So we cannot always publish the water amount
d022c86 to
a6fc2d2
Compare
Co-authored-by: flubshi <4031504+flubshi@users.noreply.github.com>
a6fc2d2 to
b22f593
Compare
|
Sure, I'll have the draft in a few hours
Il Lun 28 Apr 2025, 11:21 Robert Resch ***@***.***> ha
scritto:
… *edenhaus* left a comment (DeebotUniverse/client.py#883)
<#883 (comment)>
Would it be possible to update this PR, so we can merge it before
Wednesday so that the functionality will be in the next HA version. It's
fine if not all commands are supported yet. We can always improve it later
:)
—
Reply to this email directly, view it on GitHub
<#883 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIT3RR7SPHOD6ARNO4TMWD23XXKFAVCNFSM6AAAAAB2RRCUN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMZUGU3TINJUG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|

This PR adds support for the OZMO 900 bot, a legacy XML robot.
The work is rebased on top of #817 and #560