Hi there, trying to use the integration "Xiaomi Miio ".
The integration "Xiaomi Miio" automatically discovers my Gateway BUT there is NO support for any of my sensors (limited support in general).
Sensors are not discovered at all, but are connected and working in the "Mi Home" App.
Tried to re-add them while having the Gateway discovered on HA but no luck.
Can you please add support for more hardware/sensors?
Of course if i can help, i would be more than happy to contribute to the solution.
After an extensive search on forums ive found out that many many people have the same issue.
Sensors:
Mi motion sensor (Model: lumi.sensor_motion.v2)
Mi Door/Window Sensor (Model: lumi.sensor_magnet.v2)
Mi Wireless button (Model: lumi.sensor_switch.v2)
Gateway:
lumi.gateway.v3-MW300
by Xiaomi
Firmware: 1.4.1_176 (Latest)
@rytilahti @syssi @starkillerOG
configuration.yaml
No custom .yaml, all in UI
Hey there @rytilahti, @syssi, @starkillerog, mind taking a look at this issue as its been labeled with an integration (xiaomi_miio
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
@manosioa please have a look at the newly updated documentation: https://www.home-assistant.io/integrations/xiaomi_miio/#supported-subdevices
There you can see that currently only the gateway alarm feature and temperature/humidity/pressure sensors are supported.
The gateway part of xiaomi_miio is a brand new integration that is still in development.
This PR will add light and illumination support for the gateway: https://github.com/home-assistant/core/pull/37959
This PR will make it possible to easilly add support for all switches/plugs/wall outlets and all light bulbs: https://github.com/rytilahti/python-miio/pull/782
Door/window sensors, motion sensors, wireless buttons/remotes will take some more effort to get implemented and are a bit further away since those devices do not allow you to get the status of the device directly from the gateway API. Those work on event basis so to get those working we need to implement a more complicated subscription like system in which those events are instantly pushed to HomeAssistant instead of polling for the state.
Basically this PR needs to be finished in order for that to work: https://github.com/rytilahti/python-miio/pull/709
That PR is still in a crude state and still needs substantial work to make it ready for merging.
@manosioa if you have python skills it would be greath if you could pick up that PR and see if you can improve it such that it can be merged (see all comments and discussions in that PR).
@starkillerOG Thank you for the fast reply.
Unfortunatelly I do not know python. I would like to learn cause it is widelly used and i could help and contribute.
If i could help with testing and evaluation, i would be happy to.
I will let you know if there is something to test.
Mostly the problem is that I do not own switches plugs etc, so it is hard to develop code for them because I cannot test with the hardware....
I test on 0.114.0b3 all works fine, I have wall plugs, motion sensors, window door, cube and temperature all things are available in home assistant
That's the xiaomi aqara integration, not the Xiaomi miio
I test on 0.114.0b3 all works fine, I have wall plugs, motion sensors, window door, cube and temperature all things are available in home assistant
Hi there @VDigitall,
How did you manage to connect your Xiaomi gateway with Xiaomi Aqara integration?
Cause I couldn't.
You may give some insight and help
See here Xiaomi Gateway (Aqara) integration fails to discover Gateway
Thanks :)
Mostly the problem is that I do not own switches plugs etc, so it is hard to develop code for them because I cannot test with the hardware....
I'm open to give any help you need.
Thanks ;)
I have Mijia Gateway v2 and it works via xiaomi_aqara
integration, sorry for confusion.
I plan look at code of xiaomi_miio integration and buy gateway v3 and help with tests.
That would be awesome.
If you need anything from me I'd be glad to help!
@VDigitall it schould also work with gateway v2, have you tested it?
@starkillerOG yes
Interesting my gateway is the same if believe xiaomi_mio
integration page
@VDigitall the model is obtained from the device, so I guess you also have a gateway.v3
Are you absolutely sure you have a gateway.v2?
@starkillerOG no more
@starkillerOG no more
so you have a lumi gateway .v3.
Cool.
Hi there @VDigitall,
How did you manage to connect your Xiaomi gateway with Xiaomi Aqara integration?
Cause I couldn't.
You may give some insight and help
See here Xiaomi Gateway (Aqara) integration fails to discover GatewayThanks :)
@manosioa you can use xiaomi_aqara
integration if you switch your gateway in developer mode and have gateway key. I use xiaomi_miio integration only for alarm control which is available in the gateway.
@VDigitall I tried but it fails to discover my gateway.
Check on the link that I posted for you to check the issue on the Xiaomi aqara integration.
Maybe you have some insight.
I test on 0.114.0b3 all works fine, I have wall plugs, motion sensors, window door, cube and temperature all things are available in home assistant
But for me xiaomi_aqara
integration start works from 0.114.0b2, thanks @starkillerOG for fixes.
Before works up to 0.111 in 0.112 stop works
I use Supervised environment and temporary join to the beta channel
Cool. I took your advise and upgraded to the latest beta.
Now im on this step.
I manually type the IP address oin the 2nd field and the MAC address on the 3rd but it gives me the error you see.
What should i type on the first field instead of "any"?
And what should i type in the 2nd field instead of just the IP address of the Gateway and with what format? @VDigitall
I test on 0.114.0b3 all works fine, I have wall plugs, motion sensors, window door, cube and temperature all things are available in home assistant
But for me
xiaomi_aqara
integration start works from 0.114.0b2, thanks @starkillerOG for fixes.
Before works up to 0.111 in 0.112 stop works
BTW @starkillerOG are you related to the Xiaomi Aqara integration? Cause I did not see you there
@manosioa
When I start config integration
I leave interface any
and press Submit
On this step ask me gateway key without IP and MAC
Try to cancel current integration setup, if it will available in integrations, remove it and reboot home assistant and try one more
On the first step, leave interface as any
and press Submit
On the second step must appear window with ask gateway key.
I wrote the Config Flow for the xiaomi_aqara integration, but I am not a code owner of xiaomi_aqara
@starkillerOG
May I ask if I can use the European version of the Xiaomi Gateway with the Miio integration?
Is there a way to get the token from that?
@manosioa, yes there is a way to use the European version of the Xiaomi Gateway with the Miio integration, but it is still in active devolepment, you can read about it here:
https://github.com/rytilahti/python-miio/issues/728#issuecomment-687189227
basically this branch will make the EU xiaomi gateway work: https://github.com/starkillerOG/python-miio/tree/EU_gateway, but the code for HomeAssistant is not written yet to supply the nessesary cloud credentials (to get the token to use local control).
The underlying python-miio code has been tested and confirmed to work with the European version of the Xiaomi Gateway