Well still can’t get a single “alert” action on cube - any tips?
Ans also instead of swing get the following with chinese lady speaking out of gateway
2017-08-12T22:07:34.034435+03:00 home hass[10638]: #033[32m2017-08-12 22:07:34 INFO (MainThread) [homeassistant.core] Bus:Handling <Event cube_action[L]: entity_id=binary_sensor.cube_15xxx, action_type=iam>#
This (“iam”) is the pairing event. I don’t remember. Does the cube have a pairing button inside? The voice appears if you press the pairing button of an already paired device. This happens on the wireless wall switch sometimes if you press both buttons at the same time, because the device doesn’t have a pairing button and the pairing is bound to this combination.
What’s the firmware version of your gateway? Try to add the device without the mi home app: Press the button of the gateway three times and the pairing button of the device once. If the device was already paired with another gateway (by accident?) press the pairing button for 20 seconds. The device/blue led will blink a few times. Now you can pair the device again: Gateway button 3 times + Pairing button of the device once.
To clarify it: There is a “wifi version” and a “zigbee” version. The zigbee version works fine with the xiaomi component, because it’s zigbee and paired like any other device. The wifi version needs another protocol and must be integrated separately into home assistant. f.e. by the xiaomiplug custom component.There is no official support of the device so far.
Furthermore: The wifi version cannot measure power consumption / load / is used. The zigbee version reports this values. If you want to buy one of these devices: Take the zigbee one.
Did I get it right: It’s possible to create a automation (at the mi home app), which connects a wireless button (or another subdevice) which the arm/disarm function of the gateway? In this case the automation could be triggered by a virtual button event.
I made a pull request for a breaking change of the xiaomi zigbee plug attributes (@nikno, @anon35356645, @davidlamd89)! If you are using some attributes of the xiaomi plug your templates needs to be updated soon:
The attributes can be accessed by “load_power”, “power_consumed” and “in_use” in future.
Hi guys, I used to use the xiaomi_gw to interact with the Xiaomi Gateway.
The HA instalation is HASSio
After seeing this topic I have tried to use this way of integration.
What I have done till now:
replaced
xiaomi:
gateways:
- mac:
key: xyz
with
xiaomi:
gateways:
sid:
key: xyz
created a new directory called custom_components and pasted the archive content:
core-ssh:/config/custom_components# ls -alh
total 48
drwxrwxrwx 7 root root 4.0K Aug 13 11:30 .
drwxr-xr-x 5 root root 4.0K Aug 13 12:08 …
drwxr-xr-x 2 root root 4.0K Aug 13 11:30 pycache
drwxr-xr-x 2 root root 4.0K Aug 13 11:25 binary_sensor
drwxr-xr-x 2 root root 4.0K Aug 13 11:25 light
drwxr-xr-x 2 root root 4.0K Aug 13 11:25 sensor
drwxr-xr-x 2 root root 4.0K Aug 13 11:25 switch
-rwxr–r-- 1 root root 17.8K Jun 25 09:33 xiaomi.py
After rebooting the HA I get some errors:
2017-08-13 11:57:59 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/setup.py”, line 194, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.6/asyncio/futures.py”, line 331, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 244, in _wakeup
future.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/xiaomi.py”, line 60, in setup
sid = gateway[‘sid’]
KeyError: ‘sid’
From were should I start to solve this issue?
Thanks in advance
Please use “find .” instead of “ls -alh” in the custom_component folder. I’m interested in the content of binary_sensor, light, sensor and so on. Please remove all xiaomi.py files. There must be one per folder. The light is another custom_component I think. Please don’t touch it.