Xiaomi Gateway Integration

yes, and you can change the temperature it maintains during it’s keep warm period(up to 12 hrs changeable via mi home app).

hello iam very new to this
i was trying to setup xiaomi wifi plug to without saccess but my problem is that i lost zigbee version from HA.
can you help me to this please?
sorry for my english. thanks!!

Hi, sorry if this question has been asked already. Where can i find a list of the devices that work and what kind of gateway i need for it to work? I don’t have any xiaomi devices and i don’t know where to start.

Thank you. It is not mentionned anywhere that you can switch on and off. Just that you can select the temperature for maintain.

It’s much more interesting with this feature… even if bluetooth is not the best protocol for iot.

oops… just try it out again… and you CAN’T turn it on or off… there are a bunch of settings there. but you can’t make it start or stop boiling the water.

Hi @donnib,

at first you need the Xiaomi Gateway (Link) - the one in the link is just an example, you can get a whole “starter kit” that includes the gateway - like this.

The following components are supported so far:

  • Xiaomi Motion Sensor (old) Link
  • Aqara Motion Sensor (new) Link
  • Xiaomi Temperature and Humidity Sensor (old) Link
  • Aqara Temperature and Humidity Sensor (new) Link
  • Xiaomi Door and Window Sensor (old) Link
  • Aqara Door and Window Sensor (new) Link
  • Xiaomi Smart Wireless Switch (old) Link
  • Aqara Smart Wireless Switch (new) Link
  • Xiaomi Smart Socket Link
  • Xiaomi Smart Wall Socket Link
  • Aqara Wall Switch (Single) Link
  • Aqara Wall Switch (Double) Link
  • Aqara Wireless Switch (Single) Link
  • Aqara Wireless Switch (Double) Link
  • Aqara Wall Switch LN (Single) Link
  • Aqara Wall Switch LN (Double) Link
  • Xiaomi Cube Link
  • Xiaomi Mija Honeywell Gas Leak Detector Link
  • Xiaomi Mija Honeywell Smoke Detector Link
  • Xiaomi Aqara Smart Curtain Motor Link

The links are of course just examples :slight_smile: Just check out AliExpress or GearBest (or other stores) to find the best deals.

9 Likes

Hi all,

I have been using Xiaomi components for along time now, I (ofc) the gateway with radio one PIR sensor the cube, wireless switch and the smart plug with power consumption.

I think one or two days ago I updated something on MiApp (didnt noticed what…) and today I noticed the smart plug is not working. On Hass.io logs I have the following error:

Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File “/usr/lib/python3.6/asyncio/tasks.py”, line 352, in wait_for
return fut.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 244, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/switch/xiaomi.py”, line 31, in setup_platform
devices.append(XiaomiGenericSwitch(device, “Plug”, ‘status’, gateway))
File “/config/custom_components/switch/xiaomi.py”, line 50, in init
XiaomiDevice.init(self, device, name, xiaomi_hub)
File “/config/custom_components/xiaomi.py”, line 446, in init
self.parse_data(device[‘data’])
File “/config/custom_components/switch/xiaomi.py”, line 98, in parse_data
self._load_power = int(data[LOAD_POWER])
ValueError: invalid literal for int() with base 10: ‘37.00’

Did anyone else smartplug stop working recently? Any idea/tips on what might be wrong?

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