Giter Site home page Giter Site logo

Comments (9)

rytilahti avatar rytilahti commented on August 28, 2024

Thanks for your report and you are welcome. The error codes I'm using are from the official documentation (vacuum_cleaner-EN.pdf), and from the looks of it there exists only 19 of them (the enumeration in that link is not just about the error codes but other error situations too). Have you seen more of them in practice?

Thansk for the list of states, a couple of those were still missing and I will add them at some point.

from python-miio.

SelmaUrban avatar SelmaUrban commented on August 28, 2024

The PDF is outdated / written before firmware 3.3.9.xxx. I have only read about them (20-24).
No error jet on my robot :)

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

Ah, that may indeed be the case, I just overlooked and was misled as the format in that list was not the same as for earlier (they are not explicitly talking about error codes).

from python-miio.

SelmaUrban avatar SelmaUrban commented on August 28, 2024

Is it possible to have a "def status_raw..." that gives the numbers only (with true/false for dnd, is_leaning,..)?
My pi kivy touchscreen needs it's on textstrings, button on/off info

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

There are state_code and error_code in VacuumStatus which return the raw numbers, is that enough for your usecase? The raw data itself is also available through the data property of that object (if you want to read dnd_enabled, which is the only one besides msg_ver which is not exposed. I did not do that as its value was not during my tests the same as the one reported by dnd call, but it may have been a glitch..

from python-miio.

SelmaUrban avatar SelmaUrban commented on August 28, 2024

I will test it. Thx

from python-miio.

SelmaUrban avatar SelmaUrban commented on August 28, 2024

You're right state_code and error_code is what i searched for! And dnd and in_cleaning do not work.
But instead of in_cleaning i can ask for state_code = 5 || 11

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

Nice to hear you got it working. Indeed, there's is_on already which checks for the code 5, maybe it should be extended to cover also the spot cleaning and manual mode. For DND it will get updated to the status reports at some point, but the logic itself is not clear to me. There is a separate dnd command for getting a more precise dnd information.

from python-miio.

rytilahti avatar rytilahti commented on August 28, 2024

My earlier comment fixes this and makes state and error not to crash if a definition is missing. Thanks!

from python-miio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.