Xiaomi Gateway Integration

Thanks for reply, i have solved connected the xiaomi gateway to the same router of the host.
Now the xiaomi gateway is dicovered and on home Assistant i see all devices, but i have another litle problem, all the binary sensors (motion and door/window) have the state “unknown” and not update (if open the sensor state not change)

The value of LOAD_POWER changed with the new gateway firmware. It’s a float instead an integer now. Just update line 98 of

custom_components/switch/xiaomi.py

from

self._load_power = int(data[LOAD_POWER])

to

self._load_power = float(data[LOAD_POWER])

1 Like

Which codebase do you use? It’s a recently fixed bug.

Thank you syssi, worked like a champ :slight_smile:

I have download the zip files on 27 July from this github https://github.com/Danielhiversen/homeassistant with homeassistant version 0.49

Same here also switches don’t work no more. I git pull Daniels repo on every reboot.

~Cheers

I’ve merged the official component which will be part of th next release of HA (0.50):

https://github.com/Danielhiversen/homeassistant

It includes a bugfix. Please switch to the official component with HA 0.50.

Hey, guys. I am organizing one sheet containing all Xiaomi smart home devices and support information for both HA and Homebridge. The sheet came out with both Chinese and English version. I am struggling with official English name of devices, plz leave a comment if you know it. Also, the support information need to be updated. Here’s the link to sheet.

I think you should add a column for the device’s self identifying “model” i.e. the new aqara motion sensor is “sensor_motion.aq2”, xiaomi weather sensor is “sensor_ht” etc

I can, but do you know where to get these information?

i can fill the zigbee ones for you. also, you can use the gearbest’s translation for now i guess.
like aqara wireless button.

Thanks a lot~ Already moving on.:grinning:

Has anyone done any work on getting this xiaomi security camera working in Home Assistant.

I know it is not strictly part of the gateway but it does show up in the Mi Home Application

Is there any flashing light api call available? I have built some script which turns on and off the light which spams my logbook with messages.

Is there a ringtone loop api call available? I have also implemented some script. The problem here is that the alarm sound stops for a second before it is playing again.

Unfortunately, no two times.

Would you be able to share it? I’d be interested in, as I’m also building an alarm system with Xiaomi sensors+gateway.

For the ringtone, I’m currently playing around with automation based on this idea, which seems to work. Just not sure yet if the delay may need to be different depending on the length of the ringtone being played…

Thanks in advance.

Feel free to check this out:

1 Like

Many thanks, i have dawnloaded the latest components and copied on HA 0.49, Now everything works perfectly.

Thanks

Very much thank you, great info, this info should be pinned or better put into the documentation so others can read it and not ask same question as me. Preferably keep the list up-to date with new devices.

Hi, All! I’m using Danielhiversen plug-in for Xiaomi Home Gateway (https://github.com/Danielhiversen/homeassistant). I have 8 motion sensors. All work well but somethimes the motion sensors change state from off to on (like has detected someone) without anyone walked in the room with the sensor. I reed someone that call this thing “ghost” but i didn’t found in the forum a way to solve the problem. Can you please help me? (i’m using HA 0.49 and the last firmware for the Xiaomi home gateway) Thanks a lot.