[SOLVED] Openhab2 - Xiaomi Mi Gateway - does not respond

So. I´m back. I managed to get the xiaomi gatway v3 connected to openhab. I know it´s solved already, but I found it hard to follow as an absolute beginner. That´s why I will explain it again so that maybe more beginners are confident to try.

Beginner to Beginner: How to connect xiaomi gateway to openhab

You need:

  • A special bit to open the housing of the gateway. Picture 1. It´s called “security bit” I went to local “Würth” dealer in Germany where they had one and opened it for me. Then replace by normal screws of similar size.
  • UART to USB tool. I used this one.
  • Maybe the driver to run it. I needed this one for windows.
  • PuTTY. A software to send commands via UART to the gateway. Also to communicate to openhab if desired.
  • nmap / zenmap. This software is used to scan the network.
  • Soldering equipment

Steps

  1. UART and gateway power off.
  2. Get your gatway running with the xiaomi app (I used Ios/Iphone). Click on the gateway, top right “…” will bring you to settings. Click “About”. Click 5 times on the white area until the secret menu/developer mode pops up. Looks like picture 2. Enable the switch and note or screenshot your password. Picture 3.
  3. Start soldering like picture 4. Connect the blue cable to"GND" on the UART. Connect the brown cable to “RXD” (Receiver) on the UART.
  4. Connect UART to Computer.
  5. Check the device on your device list to find the COM. If your device doesn´t show the COM number you might need the driver. See above. Picture 5.
  6. Open PuTTY. Select serial and your COM port of the UART. Set Speed 115200. Don´t open yet.
  7. Turn on the gateway / connect to power. I recommend to put it in a power plug with flip switch for the time.
  8. Press open in PuTTY. A Window opens. You will see the messages of the gateway. Wait until the gateway finnished booting.
  9. Connect the red cable to “TXD” (transmitter) of the UART. Now you are able to send commands to the gateway.
  10. Send command: psm-set network.open_pf 3 send it a few times to be sure.
  11. Check for success with command psm-get network.open_pf. It will say something like networkopen = 3
  12. Turn gateway off. Wait. Turn it on again.
  13. Open nmap. Picture 6. Put nmap -sU -p 9898 -Pn 192.168.178.48 in the action line and execute. You have to take your gateways IP adress. You should see that the port is open. If not, try again.

Video. You may find these two videos usefull. Video 1. Video 2.

This is not my knowledge. I just try to describe it with other words like it would have made it easier for me as non-tekkie. Thanks to all of you for sharing your knowledge.

3 Likes