Closed aebgit closed 4 years ago
Sorry for the delay - thanks for letting me know - I need to update my vacuum to latest valetudo and fix that. Shame they'd change it like that without any fallback.
@onfoot That's because the REST-Interface was never supported in the first place.
Granted, I apparently didn't note that anywhere, however the fact that there was no documentation on it whatsoever should've at least somewhat pointed to that.
Furthermore, the fact that the current version number is 0.6.1
and not 1.0
should give away that there aren't any stable APIs to be expected just yet. I am of course working towards that goal, mind you.
Still, there's no point in providing backward-compatibility for a completely broken interface which was never supported in the first place, just so that other integrations that I don't use or even have heard of can keep working.
Since there do seem some common misconceptions regarding Valetudo, I've added an "expectation management" section to the frontpage of the docs: https://valetudo.cloud/
Btw also check out the release notes for 0.6.0 https://github.com/Hypfer/Valetudo/releases/tag/0.6.0
This change is also of course a breaking change. Make sure to update any dependant applications/integrations/etc. as well.
Hey! Sorry if I sounded demanding or entitled. It's totally understandable that the API is a moving target at this stage. My plugin was slapped together by looking at what the REST interface was returning and it seemed to work most of the time, with some tweaks done occasionally.
I haven't been tracking Valetudo's recent developments due to time constraints and didn't catch the 0.6.0 change. I'll try to get with the program as soon as possible. ;)
Keep up the great work!
By the way - when I started working on this plugin, I had in mind that running a jailbroken vacuum with a piece of open source software is a niche in itself. Then running one's own Homebridge server at home and adding a plugin there for the vacuum is even more of a niche thing someone would do, but still there's a lot of interest in it, which is very surprising. And on top of that I'm running I can't Believe It's Not Valetudo on my server to expose vacuum's map as a camera, so there's that. 😃
I created a PR ;) https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum/pull/9
Thanks @mrlitchyb! There was an attempt. ;)
Anyway, I just published 0.1.4 in yolo mode, since I didn't want to wake my family with cleaning. Testing finding the vacuum was loud enough!
Hopefully everything's working. I'll do some additional testing a little later.
Thank you for the update - works like a charm again!
Just updated to Valetudo 0.6.1 and suddenly the plugin is no longer working. At a first glance, the status-update seems to be broken. The URL has changed from
/api/current_state
to/api/state
and I assume the message has changed as well, because there are now parsing-issues. (I have modified the URL in index.js for testing) Valetudo returns now something like:[{"__class":"StatusStateAttribute","metaData":{},"value":"cleaning","flag":"none"},{"__class":"FanSpeedStateAttribute","metaData":{},"value":"max"},{"__class":"BatteryStateAttribute","metaData":{},"level":97,"flag":"discharging"},{"__class":"PersistentMapSettingStateAttribute","metaData":{},"value":"enabled"},{"__class":"LatestCleanupStatisticsAttribute","metaData":{},"type":"area","value":2550},{"__class":"LatestCleanupStatisticsAttribute","metaData":{},"type":"duration","value":21}]
(I guess the whole class-thing is new)Best, Andreas