Xiaomi Gateway Integration

Hurry only 35 left in stock :wink:
http://www.gearbest.com/living-appliances/pp_344667.html

1 Like

do they have now European radios?

I doubt it. The gateway still only shows on mainland china section of xiaomi website (probably because of the china/AU only plug option)
I would have thought that if they add international radio they would add the smart home to their international section.
Personally I think Xiaomi are missing a big opportunity here. Their devices are really nice and really well priced and would sell well in EU/USA.

No one can share his file? i need to undestand how to make it :unamused:

What i need to add on entity_id: ? where is the this key?

Also, anyone know how far they can be from the getway?

Right - just put my money where my mouth was - I’ve gone the whole hog!

Bought from https://www.zapals.com/ using PayPal.

Subtotal AU$162.00
Shipping & Handling AU$21.54
Grand Total AU$183.54

2pcs Xiaomi Intelligent Door Window Sensor for MI Smart Home Kit
WP1020390403097 AU$10.59 Ordered: 4
AU$42.36

Xiaomi Mi Wireless Smart Temperature and Humidity Sensor Detector Monitor
WP1020390913125 AU$11.70 Ordered: 4
AU$46.80

XIAOMI Human Body Sensor Smart Home Tool
WP1020390403096 AU$13.24 Ordered: 3
AU$39.72

Xiaomi Smart Wi-Fi Remote Control Multifunctional Gateway Upgrade Version
WP1020390403039 AU$33.12 Ordered: 1
AU$33.12

why do you need Temperature ?

In europe you need tons of certificates, they might be even in process to make them… but that will raise the price as well.

Big house with no way to power sensors in some regions. Why do you ask?

I saw this before, but its not native support by Xiaomi, which is what I meant.
Sorry if I wasnt clear.

This is true.
Never stopped a CE mark being added by some less reputable PRC based companies before thoug :slight_smile:

im ask what you need to use the Xiaomi Mi Wireless Smart Temperature.
:slight_smile:

just to know why user use it…

Hi All, how to create a button to turn on/off Xiaomi Gateway Light?

Thanks

ah ok.

So I have a home theatre that gets a little warm - I’m going to install a quiet extractor fan (behind a noise baffle) and have the extractor turn on when the room is too hot.

I have ducted aircon in one half off the house - I want to turn that on with scripts based on temperature and presence.

I have an entry area that get’s a little hot - I want to log temperature in that area to figure out how to best combat it.

:slight_smile:

Hi I am receiving this warning in the log:
“WARNING (MainThread) [custom_components.binary_sensor.xiaomi] sensor_class is deprecated. Please rename sensor_class to device_class in ‘/home/homeassistant/.homeassistant/custom_components/binary_sensor/xiaomi.py’ to ensure future support.”
Do i have to go and change it manually or there is an update of the component?
Thanks

I use Docker to install the ha, update to 0.39.2 after the error.

17-03-03 02:19:05 ERROR (MainThread) [homeassistant.bootstrap] Error during setup of component xiaomi
Traceback (most recent call last):
File “/usr/src/app/homeassistant/bootstrap.py”, line 153, in _async_setup_component
None, component.setup, hass, config)
File “uvloop/future.pyx”, line 230, in iter (uvloop/loop.c:110600)
File “uvloop/future.pyx”, line 432, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:113980)
File “uvloop/future.pyx”, line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:108900)
File “/usr/local/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/xiaomi.py”, line 77, in setup
PY_XIAOMI_GATEWAY.discover_gateways()
File “/config/custom_components/xiaomi.py”, line 167, in discover_gateways
self.gateways[ip_add] = XiaomiGateway(ip_add, port, sid, gateway_key, self._socket)
File “/config/custom_components/xiaomi.py”, line 262, in init
if self._discover_devices():
File “/config/custom_components/xiaomi.py”, line 271, in _discover_devices
self.update_key(resp[“token”])
File “/config/custom_components/xiaomi.py”, line 370, in update_key
encryptor = AES.new(self.key, AES.MODE_CBC, IV=init_vector)
File “/usr/local/lib/python3.5/site-packages/Crypto/Cipher/AES.py”, line 264, in new
return _create_cipher(sys.modules[name], key, mode, *args, **kwargs)
File “/usr/local/lib/python3.5/site-packages/Crypto/Cipher/init.py”, line 130, in _create_cipher
return modes[mode](factory, **kwargs)
File “/usr/local/lib/python3.5/site-packages/Crypto/Cipher/_mode_cbc.py”, line 232, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File “/usr/local/lib/python3.5/site-packages/Crypto/Cipher/AES.py”, line 131, in _create_base_cipher
expect_byte_string(key)
File “/usr/local/lib/python3.5/site-packages/Crypto/Util/_raw_api.py”, line 175, in expect_byte_string
raise TypeError(“Only byte strings can be passed to C code”)
TypeError: Only byte strings can be passed to C code

I have the same error in the log, but like all works

Mine works fine to, i am having a problem with my lights (limitles led) and looking for errors in the long i so that warning. Was wondering, if others are aware of it and if is a future fix?
Thanks

Guys i need some help, i’m finished to set all what i need with help guys on chat.

How can i make the button switch so show as button on/off via HA? now just see it cannot change it
second, how can i make the windows sensor show as close / open ? now i see it as on/off

Thanks for all the advice!

MP

I would like to know if your code does support also the xiaomi temperature/humidity sensor.

thanks

Latest commit? That’s seems to be an issue when using older version of pycrypto. I’m using 2.6.1