Xiaomi Gateway Integration

That’s a breaking change. Right now, it’s just a warning which means HA is giving the developer time to fix it. Don’t worry too much. It will be updated in the next update

1 Like

It’s does. Just go to the repo and read the Readme.md. There’s a list of supported and non supported devices

thanks for your reply.
I asked because it was not mentioned in the README.md

regards

Oh no, how can i miss that

Thanks Rave keep up the grate work.
Thanks again

Can you also try to help me?

Can toy tell me where do you add it?
configuration ? customize? groups? after i add it to configuration the ha did not run…
Thanks for your help.

Use a template binary sensor:

Unfortunately
Update or reload, my problems are not resolved.
I tried to return to the previous version of 0.37.1 is still wrong.
I don’t know if there’s anything I can do to save my docker.
Is it because I am using docker on Synology?

The following errors have been logged this session:

17-03-03 13:06:02 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

Thanks Daniel (דניאל in hebrew) :slight_smile:

that work but just get icon…
i’m ask how can i change it to close open title as for now i have on/ off.

Big Thanks!
`

thank you(谢谢!)

Is this this, posted by @stewface?:

value_template: ‘{% if states.binary_sensor.door_window_sensor_158d000118xxxx.state == “on”%} Open {%- else -%} Closed {%- endif -%}’

Hi All, can you help me to configure a Gateway light ? Thanks @rave

Hi,

What do you want config exacly?

For the last two days I have constant false positives (ghost open/motion). No new insights about this? I urge everyone to report to Xiaomi (trough the feedback screen on the app). Please mention that this happens using the local developer api.

i be happy to get some help here :blush:

To make the door/window sensor say open/closed instead of on/off you need to use a template.

Many Thanks Nick.

i try to use template, i just get a Circle with on off.

i want to get like here for the motion sensors…

and like here for door close / open.

i do not find how to make it, i try to ask Rave but he did not replay.

Many Thanks!

Mp

You have to put the relevant sensors in a group and integrate it in your default view.

Wow Thanks Thorbeen!

So i need to put
value_template: ‘{% if states.binary_sensor.door_window_sensor_158d000118xxxx.state == “on”%} Open {%- else -%} Closed {%- endif -%}’

under the group ?
i’m a new on HA, can you help me with tip about it?

Many Many Thanks!