onfoot / homebridge-valetudo-xiaomi-vacuum

A Homebridge plugin for Xiaomi/Roborock vacuum cleaners running Valetudo
MIT License
31 stars 9 forks source link

Fix API usage for Valetudo version >= 0.6.0 #9

Closed mrlitchyb closed 4 years ago

mrlitchyb commented 4 years ago

With Valetudo version 0.6.0 and higher the HTTP API was changed.

Specifically: API changed from /api/current_status to /api/state

mrlitchyb commented 4 years ago

Just noticed that while this makes the whole thing usable, the state is completely broken. I fixed it in my index.js file by hacking around a bit and hardcoding some JSON response expectations... not nice at all but unfortunately don't have the time to make it nice right now :(

Would not feel comfortable creating a PR from my code since it is only fixed in the placed I need it to be and I disabled the features I don't use (mop, find)

onfoot commented 4 years ago

Thanks for trying! You can try the latest plugin which should resolve all the status issues with latest Valetudo.