Coder Social home page Coder Social logo

Comments (6)

marcelrv avatar marcelrv commented on May 25, 2024

You better make this request in the openhab addons repository.
You can rename this to.json(remove the txt) and try it in your OH installation (see binding readme on how to do this). You may need to remove the file that was automatically generated during the testfile creation you attached
dreame.vacuum.p2041-miot.json.txt

from xiaomirobotvacuumprotocol.

mattphat avatar mattphat commented on May 25, 2024

Thanks for sending me the json file. It's about here that my knowledge of any of this dries up quickly. I've followed as best as I can the binding information (it assumes a lot, but that's fine - that's the nature of this Openhab stuff) and I can read information from the vacuum, but haven't managed to send it any commands as yet... I'll keep trying - currently it's telling me the total hours, previous clean time etc. And that's all correct, so some of the communication is working.

I could see in the openhab log that it is using the correct json file, so thanks!

from xiaomirobotvacuumprotocol.

marcelrv avatar marcelrv commented on May 25, 2024

Indeed the fact that you can read the information is a very good sign.

wouldbe good to send the debug log so it is clear which properties provide which response (and which don't)
This can be done with log:set debug org.opehab.binding.miio in the console

Note that only channels that are connected will be refreshed.

There is one channel, ( actions I believe is the name) which should be able to trigger the starting/stopping etc
I expect it shows with a dropdown in the UI. I assume that is what you mean by sending commands.
If you mean sending custom miio commands, (in the 'language the device understands) you need to enable the command channel (marked as advanced, so you need to unhide it in the UI).

from xiaomirobotvacuumprotocol.

mattphat avatar mattphat commented on May 25, 2024

Thanks!! I'll be a while before I can really debug and have a play (this working from home thing, I actually have to work) - I've scrolled through the JSON file and compared to known working ones and I think it's making sense. Will take a bit of trial and error I'm sure.

One thing you might be able to help with right away tho, is I don't have a drop down list in the UI (looking at PaperUI) for actions, it's just an empty box. And in turn, the status updates from the vacuum are just coming through as numbers - not translating to the phrases in the JSON file.

ie: earlier I set it via the MiHome app to vacuum and this is the type of thing I saw in logs :
miio_basic_bd78f7ff_status changed from 6 to 1 (Charging to Sweeping)
miio_basic_bd78f7ff_charging_state changed from 1 to 2 (charging to not charging)

And the UI displays this:

image

Have I configured something wrong?

from xiaomirobotvacuumprotocol.

marcelrv avatar marcelrv commented on May 25, 2024

No, it is not cuz configured wrong, instead it is because of the version used ( I expect version 2.5.x based on the screenie).
In oh3 the action one will behave differently and gives a dropdown.

Likewise, in OH3 it will do the mapping from value to the labels you see in the json file. (if you want to replecate this in OH2 you maybe can make a mapping in the channel config)

The best way to test this is with OH3.1-SNAPSHOT than you know if it works. If you don't run that yet, maybe you can download one just for the trying... than it is clear what is not updating because of the device not responding or what is not there because of the binding version not supporting the features used in the json file. (note, for OH3.0 most of the channels will work as well)

from xiaomirobotvacuumprotocol.

mattphat avatar mattphat commented on May 25, 2024

Thanks for explaining that. I'm behind the times! Sigh. I looked into the transition to v3, and I'd have to edit many of my scripts so I'll be a while.. Thanks, I'm sorry I'm not much more use to confirming this is working with the new vacuum.

from xiaomirobotvacuumprotocol.

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.