Xiaomi Gateway Integration

Great if someone can help out with the documentation. Maybe we can include a link to each product too?

Maybe a noob question but where is the documentation? I’m willing to help and prepare the table…

Hello, contratulations for the great project!!
I tried the version on Github, but i have some problem with the discovery of the gateway.
My Home Assistant installation is on one VM on VirtualBox connected in bridged mode, the host is a OS X.
I think that the VM not receives or not send the multicast packet to the LAN.
If ping the ip of the xiaomi home gateway from VM i receives the reply but in the Hass log i see “No gateway found”.
Is possible to specify an ip instead of mac address.

Thanks
Mattia

1 Like

I see, but I reconsider buying it. I am not convinced about the Bluetooth connectivity. I prefer wifi

The Kettle is a wifi device.

A IP address won’t help. The communication is/are mutlicast/udp broadcasts. If the discovery doesn’t work the message protocol won’t work either.

You sure?

no, the kettle is bluetooth based. i am using one :slight_smile: Can control it with the mi app, but not remotely. Very nice kettle thou, all stainless steel internals, no plastic part ever touches the water.

Ooooh, you are right. Craaap!! But a good use-case for a RPi3. I use BLE for the mi flora sensors an the mi scale already.

2017-07-21 21:46:53 DEBUG (Thread-9) [homeassistant.components.xiaomi] PUSH >> <Entity Door Window Sensor_158d00019f308a: on>: {'status': 'open', 'voltage': 3065}
2017-07-21 21:46:53 DEBUG (Thread-12) [homeassistant.components.xiaomi] PUSH >> <Entity Door Window Sensor_158d00019daecd: on>: {'status': 'open', 'voltage': 3105}
2017-07-21 21:47:06 DEBUG (Thread-9) [homeassistant.components.xiaomi] PUSH >> <Entity Cube_158d000119f77c: off>: {'status': 'alert'}
2017-07-21 21:47:06 DEBUG (Thread-6) [homeassistant.components.xiaomi] PUSH >> <Entity Cube_158d000119f77c: off>: {'status': 'flip90'}
2017-07-21 21:47:08 DEBUG (Thread-7) [homeassistant.components.xiaomi] PUSH >> <Entity Cube_158d000119f77c: off>: {'status': 'flip90'}
2017-07-21 21:47:12 DEBUG (Thread-12) [homeassistant.components.xiaomi] PUSH >> <Entity Cube_158d000119f77c: off>: {'status': 'flip90'}

I somehow only get PUSH. I guess this is not enough? I installes dev branch and added gateway like this:

#### XIAOMI ##

xiaomi:
  gateways:
    - mac: 34CE0088AB64
      key: 8yj8b2jvye5829nm

Can the kettle be turned on and off throught ble ?

The measurements of my flowers and my body weight can be accessed easily of my neighbours. I hope the kettle is a bit more secured.

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?