But hass is still giving me errors about a invalid config, I can also see the hub when I connect to it with the mi home app (it is needed to set it up)
Also here:
but I have nothing left in the config file that is mentioning anything about that hub
And in the log I see this:
2020-04-26 14:42:06 ERROR (SyncWorker_13) [homeassistant.components.xiaomi_aqara] No gateway discovered 2020-04-26 14:42:06 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Integration failed to initialize.
there still something in your configuration that call
xiaomi_aqara:
because with
discovery:
you are normally just prompt to enter the key xxx-xx-xxx for the new device discovered…
so…i think, you have to take a snapshot for the moment before you add “xiaomi_aqara:” in your config (hope you make a snapshot)
or…restart from sratch…and wipe and restor a snapshot before the “xiaomi_aqara:” in configuration.yaml, who was not the good way for your gateway to make it work…
I got success, the issue was that it was connected to an other device. In my case it was homekit “home” that was set up on an Iphone.
I did all the time with an Iphone (don’t ask me why ) but I managed to delete the “home” and I tried once more set it up on my android device.
This time it linked to my phone and hass was able to discover the device and I could use the code that was provided on the box in the format xxx-xx-xxx
So for the people:
use a fixed IP
make sure it is not connected to an other apple smart aplication, it needs to be connected only to the mi home app
make sure discovery: is in your config file
restart hass and it should be able to discover yoyr hub
if you have a V1 use the code in format xxx-xx-xxx
Update:
after a reboot it also includes the sensors attached to this hub
BTW how fast are the sensor regarding state transitions ?
Usually states are update between 2 and 10 secondes…but it depends on your hassio installation and the system that are running hassio/HA : a raspberry4 is faster than a 3 but a PC or NUC can be more faster than a raspberry…so its difficult to apply a rule…
For my experience, when my Rpi4 4Gb is Idle, its 5-6% of CPU use and the states are update at the average of 2-3 seconds…
but i dont use Mi Home at all…just to upgrade the gateways…
My 2 Aqara hub are plugin version 1.0.64, have you upgrade to the latest firmware your gateway in Mi Home APP?
At the beginning i was afraid to upgrade the firmware but it seems to be more and more stable with latest…so you can try without fear, i have the latest installed
the last one is 1.6.8_003 for the ZHWG11LM
Thank you mate, unfortunately it is not in HA - one thing I can think of based on your previous posts is that my port is not open - as my MAC is starting with your example…
Any workaround with maybe port forwarding instead of soldering?
I have aqara hub (zhwg11lm as I understand this means that this is v1 (is it so?)) And a great desire to bind it to HA. After researching the Internet on this topic, I lost hope (on this site, in the “// Xiaomi Gateway (Aqara)” section, the following is written: Unsupported Devices - Xiaomi Aqara Gateway (lumi.gateway.aqhm01), as it is not possible to activate dev mode in the Mi Home App.), but I found this thread. I read all your messages in which you write that you managed to connect exactly the zhwg11lm model.
I will describe my actions in detail:
I registered my Aqara hub in the home WiFi network through the Aqara home application, in which I also updated the hub to the proposed firmware. The device has also been added to HomeKit.
In configuration.yaml I add to the very beginning, with the FIRST line: dyscovery:
save, reload HA.
3.1. I go to HA
3.2. I click the Settings tab, then the integrations, then I click + in the lower right corner, here I tried to add both Aqara hub and HomeKit Device.
Here, as I understood from your posts, a new device will be installed and a password request will appear, but nothing happens. What am I doing wrong?
Help please, I really don’t want to get the soldering iron.)
Your gateway need to be on the same network of your HomeAssistant server.
You have to be set to China mainland in the app and have a Chinese version, not a European one, or perhaps a Russian one? What is yours? Where did you bought it? what language is write on?
Now there is an integration in HA so you dont have to deal with yaml config anymore.
And i mean, the integrations for the Xiaomi gateway are automaticaly discovered.
Hi Olivier. Thanks for your help. i succefuly added my v3 mija gateway (automaticaly discovered and added - listed as Accessoire HomeKit - Mi Smart Home Hub-1791) to HomeAssistant. nevertheless i cannot see my mija Bluetooth température sensor in homeassistant (nothing is appearing). In MiHome app everything is working fine and i can see them and they are well connected to the gateway. What do i miss ?
Hi all, a small update for the
DGNWG05LM users (the one you get in EU when buying the Xiaomi Mi Sensor Set). I got lost in all the threads and it might be useful for those which have it.
You have to use the Xiaomi Miio integration. You can recover the key using the “backup method”, ie install Xiomi app versiopn 5.0.19, see https://python-miio.readthedocs.io/en/latest/discovery.html#tokens-from-backups and extract the backup)?
To get the token, there is now an easier way ! pip3 install micloud && micloud. It will use the mi cloud to get your token, much easier!
Then you’ll have the gateway in HA and be able to arm the device, and disarm it. You can also control the color. There is no support for subdevices yet (all sensors) but it seems it’s coming, looking at https://github.com/rytilahti/python-miio/issues/728 there is significant progress.