Our sponsor:

Aqara Magic Cube - MFKZQ01LM

Installation with Home Assistant:

The next smart home system with which we will test the cube is Home Assistant. You can run this free open source system on different hardware. We test it with an RPI 4 and a link to the Xiaomi Gateway. If you have a Zigbee stick you can also connect it directly. But we use the gateway to communicate with.

The first step is to link the gateway to HASS. Please note that you need the version 1 gateway for this. We first start the Xiaomi APP on a search here on the key. We need this. You can find this in the following way:

- Open the APP
- Press the Gateway
- Go to the hamburger menu at the top right
- Then go to About and press Wireless communication protocol and turn on the slider on top
- Then remember your key / password

- Now start HASS and go to your YAML configuration and fill in the following:

xiaomi_aqara:
discovery_retry: 5

gateways:
- mac: 79: 12: dc: 99: 93: 16 (letop lower case!)
  host: 192.168.1.7
  key: xxpxdoq65sslh211

- Then restart everything. The gateway will now be found. If this does not work, here are some tips and tricks: https://www.home-assistant.io/integrations/xiaomi_aqara/

Now you add the Cube to the Gateway and you can then use it in HASS.

Devices and configuration:

Flow example:

To trigger something via the cube I use the "all events" node. With this you register all incoming commands. Of course we only want that cube so I use a switch to catch this. Then I use a switch to forward the events (shock, rotate, flip90, etc). And finally I turn on the lamp.

This is of course a fairly simple example, but you can imagine that all your lamps in the living room are switched on or off.

This product is for sale for:


Aqara Magic Cube
€ 27
Buy
Aqara Magic Cube
€ 11
Buy
;
;

Author:
Niels Laan

Founder of this blog and passionate home automation nerd. All articles from Niels