Cannot connect Xiaomi Gateway (lumi.gateway.v3) to HA

Hi folks,

Unfortunately also have this problem with lummi gateway v3, HA doesn’t discover any of my 2 gateways supporting Xiaomi sensors.

Any solution yet to solve this?

I also had problems connecting the gateway. Ended up giving up and buying a Conbee stick, it works with most Xiaomi devices. Now I’m wondering why I didn’t get one long ago, it works very well. It also has a hassio add on for easy integration https://phoscon.de/en/conbee2

I have the same problem with my lumi.gateway.v3 unit.


nmap -sU -Pn 192.168.0.32 -p 9898,4321,54321,5353

Starting Nmap 7.60 ( https://nmap.org ) at 2020-01-06 08:47 GMT
Nmap scan report for 192.168.0.32
Host is up (0.081s latency).

PORT      STATE         SERVICE
4321/udp  closed        rwhois
5353/udp  open|filtered zeroconf
9898/udp  closed        monkeycom
54321/udp open|filtered bo2k
MAC Address: 04:CF:8C:B8:87:43 (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 2.41 seconds

I noticed port 9898 shows closed most of the time but on occasions shows as “open|filtered”. Strangely, it appears only to show this “open|filtered” state when polling just that port and when it has not been polled for a while.

The section in my config file:

xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - host: 192.168.0.32
      mac: 04CF8CB88743
      key: bul2jnxxxxxxxxxx

I’m not sure if this is the correct use of the “host: IP” parameter. Until I added this, HA could not find the HW. HA appears to search for the GW 6 times then stops reporting errors. Nothing more in the logs and no references to the GW or the attached sensors.

Any help greatly appreciated!

Sorry to bump this old thread - but I too was eager and let the FW update before getting it in to HA. DO you have the link to the straight forward tutorial? All I can find are these pretty complicated options of opening the hub up and soldering stuff - which is likely beyond my capability. Thanks!

First, please show us the output of the nmap command.

Hi all,

Despite being a complete noob, I actually managed to succeed in this, with the aid of one of my friends. These were the approximate steps on a Window 10 pc, as per the description in the very bottom of this page (and some other pages for the steps we were too dumb to understand). Hopefully they can inspire or help some of you:

  1. Open the gateway using a special “fork” screwdriver bit. Fortunately I had one in my “special bit set” from fixing the kids’ Nintendo DS, but I think you can use a pair of needle nose pliers instead.
  2. Solder the wires on the terminals (yes, I’m very embarassed about my soldering skills and I considered using a picture from the internet instead). Don’t connect the wires yet
  3. Get a USB-UART module. My friend had one like this laying around WAVGAT FT232RL FTDI USB 3.3V 5.5V to TTL Serial Adapter Module
  4. Connect the USB-UART module and find the COM-port that it uses (Find COM port in Win10). Open “Device Manager”. Click on “View” in the menu bar and select “Show hidden devices”. Locate “Ports (COM & LPT)” in the list. Check for the COM ports by expanding the list. You can disconnect and reconnect the module find the right one.
  5. Download, install and run PuTTY (putty.org). This page describes the steps really well Setting up a Serial Terminal. Set baudrate to 115200.
  6. Power up the gateway (without being electrocuted) and wait a few seconds for it to start.
  7. Connect the wires. Rembember that Tx connects to Rx and Rx to Tx (Transmit to Receive). Hopefully you will be seeing data flowing in the PuTTY window.
  8. Press enter to stop the flow of data. Type psm-get network open_pf and press enter to see if the port is actually closed (red box).
  9. Type psm-set network open_pf 3 to open the port (blue arrow).
  10. Type psm-get network open_pf and press enter to see if the port has been opened (green box). Xiaomi gateway reprogramming

Good luck!

/Dan

3 Likes

Hi Swaq,

Thank you for sharing how you solved the problem.

I am stuck in your description at “psm-get network open_pf”.
At that point I am getting “-sh: psm-set: command not found”.

Could you tell me where is located the “psm-set” command on your system ?
“find . -name psm” should return the answer.

Thanks.

@hmargera;
I don’t know where psm-set is stored. I cannot check it, as the pins have been desoldered and the gateway is reassembled and in operation. My best bet would be asking in some of the posts where the command was originally posted.

Sorry,
Dan

Why can’t you run that?

I have no idea why I can’t run the psm-set command.
The command is just not part of gateway software.
“find . -name psm” doesn’t return an answer.

I searched on internet for hours. I only found a person on a german forum having the same issue. Asked him and waiting for an aswer.

@Swaq

When you have time, may be can you try to ssh to your gateway and send these commands :
cd /
find . -name psm

You can’t ssh into the gateway. Pay attention :wink:

It seems that this command has been removed in the latest gateway software update.
That’s what’s I’ve read in a French forum

@makai

Could you point me to the french forum where you have read this ?

Also, if you have the psm-set and psm-get on your gateway, could you send them to me so I can try them on my gateway ?

Thanks.

Looks like time to stop suporting xiaomi by spending money on their gateways. Use deconz/z2m.

I’m on Deconz since I know what xiaomi is doing! And it’s way better

Hello hmargera. Are you find french forum or psm-set and psm-get files. If you hav it, give me please.

Unfortunately I couldn’t find any topic on french or other forums related to psm-set.
I have created a new entry here dedicated to this problem and haven’t got any answer.
I don’t know if anybody don’t have the psm files or don’t care or don’t understand the question.

I’m sorry. I did everything according to the instructions of the Cadavre. I have access to the controller operating system. But I do not know what to do next. There is a similar topic on community.openhab.org (https://community.openhab.org/t/solved-openhab2-xiaomi-mi-gateway-does-not-respond/52963/188) and the next steps are there, but I’m not particularly good at it. Maybe someone can write instructions on how to connect the necessary ports in the controller.

Do you have access to the psm-set command ?
If not you are stuck as I am.
If yes you just have to type “psm-set network open_pf 3” to open the port that will give access to the gateway.