-
-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add generic miot support #1581
Add generic miot support #1581
Conversation
Maybe I can't help as a developper, I have this vaccum. One question, I've tried your command and get |
I must warn you that it is not yet ready for end users, but if you really want to test this, you need to clone and install this PR. I suppose the simplest way is to install the github client (https://cli.github.com/) and then do something like this:
|
Hi, just drop by to say thanks and it's a great work! 👍
Only thing I wanted to try but cannot find a way was the map thing but figured it might not be with the robot itself but the cloud. |
Thanks for giving it a try and reporting back, @znut! I'm really glad to hear that it's working on real devices, too :-) Would you mind letting me know what the output looks like, either here or via email? I have a single brightness-only bulb (and the simulator), so I'm just curious what the property values are to gain a better understanding of how these work.
Some of the map handling is most likely done in the cloud, but there are also several parametrized actions and write-only properties (if you search "skipped" in the console output, you will see them at least for the ijai vacuum) that are not yet supported at all. I will figure out a way to support those in some future PR after implementing standardized names, icons, etc. for homeassistant to use. |
@rytilahti sure, these are from
|
BTW, I just commented out all the warning debug log because it flooded my console every time lol |
This is from the dreame
|
Guys, after installing this PR and running this command: 'miiocli -d devtools miot-simulator --model zhimi.heater.nb1' it gives me error:
|
@xcraftster ah, sorry for that. This depends on Squachen/micloud#11 being installed, I'll remove the latest commit from this PR and create a separate PR for that. edit: moved to #1610 |
4e9771c
to
9abeac1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1581 +/- ##
==========================================
- Coverage 80.69% 80.10% -0.59%
==========================================
Files 157 159 +2
Lines 15417 15651 +234
Branches 3427 3476 +49
==========================================
+ Hits 12441 12538 +97
- Misses 2724 2859 +135
- Partials 252 254 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I'm going to merge this now to make it easier to test and to continue developing it further. Thanks for your input @znut, it's great to have some real-world testing done :-) |
I tried the latest master (after this being merged) with model
I also tried with my
Not sure if there's any other useful insights I can provide. I also own a |
Hi @pplucky and thanks for testing!
Would you mind opening a new issue and checking with
When #1618 gets done, it could be useful to introduce metadata files for the namespaces (like |
Here it is |
Hi there, I tried to implement the commands of p2140p into the file, but it is not recognized. Any help for integration of the p2140p? |
Hi, if you install the git version, you can use the generic miot instead of If you are having problems with it, please open new, separate issues for them :-) |
Hi there That´s what I tried before: Error: No such command 'genericmiot'. same with Error: No such command 'genericmiot'. Any ideas? I just cloned the git like So I don´t have an idea why it´s not working... |
You need to install it, too, if you didn't do that already. The simplest way is to install it directly using pip (the second command for the development version at https://github.com/rytilahti/python-miio#installation) or running But please create either a new issue or a discussion in the discussions forum (https://github.com/rytilahti/python-miio/discussions) as this is not directly related to this pull request :-) |
Foreword
miiocli
tool or the library to control your devices: it would be appreciated if you could test if this is working fine for you.Description
This PR adds a new integration,
genericmiot
, that uses the miotspec files to provide support for all miot devices that can be controlled over local network.The basic functionality is implemented and has been tested to work on a Mi Smart LED Bulb (Warm White) (
yeelink.light.mono6
) light and on different simulated devices.This PR does not implement sending commands over the cloud interface, which may be necessary on some devices to function.
If you want to test or help with this, please read read further :-)
Current functionality
status
command)settings
,set
commands)actions
,call_action
commands)TODO
Instructions to test
You can either test against a simulator or a real device:
Export the address and token to avoid repeating
--ip
and--token
for every command. The examples below are after doing these two exports:[S]
are settings (also accessible usingmiiocli genericmiot settings
) that can be changed:Homeassistant support
The homeassistant support is currently very rudimentary, and implements only the base platforms (switch, button, select, sensor, binary_sensor, number, ..), but that will hopefully change in the near future. Here's how it is looking currently:
Help needed!
If you are a developer and want to help, please feel free to contact me per e-mail or via discord.
The current code is living in the
entities_from_upstream
branch: https://github.com/rytilahti/home-assistant/tree/xiaomi_miio/feat/entities_from_upstream) – any help is welcome!Below only links to close related issues and pull requests.
List of related issues and pull requests
Closes #1394
Closes #1550
Closes #1571
Closes #1300
Closes #870
Closes #1563
Closes #1217
Closes #1397
Closes #1434
Closes #1553
Closes #1544
Closes #1541
Closes #1418
Closes #1271
Closes #778
Closes #1513
Closes #1512
Closes #1330
Closes #1319
Closes #1273
Closes #1485
Closes #1455
Closes #1447
Closes #1441
Closes #1133
Closes #1428
Closes #1412
Closes #1375
Closes #1400
Closes #839
Closes #1182
Closes #1338
Closes #812
Closes #1326
Closes #844
Closes #1162
Closes #1267
Closes #1218
Closes #1283
Closes #913
Closes #1209
Closes #1001
Closes #1061
Closes #835
Closes #974
Closes #896
Closes #889
Closes #837
Closes #618
Closes #901
Obsoletes and closes #672
Obsoletes and closes #1254
Obsoletes and closes #1029
Obsoletes and closes #1019