# Mi Homey

**URL:** <https://community.homey.app/t/mi-homey/19816>\
**Category:** Apps\
**Tags:** app\
**Created:** [October 27, 2019, 7:38pm UTC](https://community.homey.app/t/mi-homey/19816 "2019-10-27T19:38:40Z")\
**Posts on this page:** 1\
**Showing post:** 155

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [May 1, 2020, 9:58am UTC](https://community.homey.app/t/mi-homey/19816/155 "2020-05-01T09:58:40Z")

</div>

I have been struggling to connect my Xiaomi Gateway to Homey. And failed…  
Om the Home Assistant forum I found the reason (my gateway’s MAC is mentioned…)

Source: [https://www.home-assistant.io/integrations/xiaomi\_aqara](https://www.home-assistant.io/integrations/xiaomi_aqara)

If your gateway’s MAC address starts with `04:CF:8C` or `7C:49:EB` , there is a good chance that the required port `9898` is closed on your gateway (you can check it with the Nmap utility, using the command `sudo nmap -sU {gateway_ip} -p 9898` ). To fix that issue, you need to do these steps:

- Find a specific screw bit (like a fork) to open the gateway case.
- Find a USB-UART cable/module and connect it to your computer.
- Solder 3 wires - RX, TX and GND like [here](https://cs5-3.4pda.to/14176168/IMG_20181020_201150.jpg).
- Turn on the gateway (220V).
- Open a serial terminal application (e.g., PuTTY) and connect to the serial port assigned to the USB-UART module (baudrate: 115200).
- Wait until the gateway is booted up, connect the RX, TX and GND wires to the UART module (don’t connect the Vcc (power) wire!).
- You will see all the messages from the gateway.
- Send the command `psm-set network open_pf 3` (the command has to end with a `CR` newline character).
- Check your settings executing the command `psm-get network open_pf` to be sure it’s OK.
- Restart the gateway.

---

_[View the full topic](https://community.homey.app/t/mi-homey/19816)._
