Can't configure Xiaomi gateway

Can you ping this IP?
What is your server’s IP? Is it RPi or Linux or what?
Looks like a network problem. Or you specified a wrong key. Try to regenerate it - it won’t hurt.

Hey and thank you for your reply ,
my server is hassio that run on RP,and I can get ping .
I will try to regenerate the key

i tried to change the key but i get the same error log…

any other suggestions?

Are you sure the gateway IP and Mac are correct? Is the gateway configured with a static IP? Perhaps you can remove the ‘host’ line and only rely on the mac config.

Can you check the screen where you generate the password in the mi home app and make sure the Lan control option is set to on?

The log seems to indicate a network problem or that the gateway is blocking external requests.

Did the gateway work before firmware update F.W=1.4.1_164.0158 ?

I had the same issue . I had to disassemble the gateway and connect a serial connection and issue the following command

psm-set network.open_pf 3

see

managed to make the connections without soldering . Need steady hands and the ability to type one handed :slight_smile:

3 Likes

it’s a new one, so I didn’t use it with the older firmware.

This is almost certainly your problem. Port 9898 is closed. From what I read before I ugraded, was if the hub was in developer mode before upgrading all should be OK. Not for me :slight_smile:

My logs were exactly the same as yours adding mac address and IP to the configuration yaml made no difference.

I used the following kit to solve the issue

An old screwdriver . You will need to file a notch in it to open the tamper proof screws

USB UART TTL 3.3V Converter/Programmer

https://www.amazon.co.uk/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=+USB+UART+TTL+3.3V+Converter%2FProgrammer

I used some breadboard pins to make the connections . I would recommend you solder the wires in place. Touching a live circuit board with it on is not recommended.

1 Like

I’m no expert, but I do know that this works with my config, so … give it a go :slight_smile:

No Mac, no IP

xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - key: !secret xiaomi_key

Thank you :slight_smile:
no other simple solution?

The config you used is wrong. You have no indentation.

image

1 Like

Please see the instructions at the top of each forum page for how to post your code.

2 Likes

hi @orcool, try tu put MAC, KEY and HOST in this order, it solved me

Best

1 Like

Prove the port is closed. Try the following on the Hass.io ssh console

ping x.x.x.x (ip of gateway) to prove the Hub is on network

nmap -Su -v -p 9898 x.x.x.x if this port is closed that’s the problem !

Confirm the the Key and the wireless communication protocol are on. If they are unfortunately you need the fix

1 Like

Is this an Aqara Hub with Apple home-kit support ? If so I don’t think this hub is supported in HA . The above fix only work for v2 hubs see

I have this one:
https://www.gearbest.com/living-appliances/pp_344667.html?lkid=12972004

thank you all,
I will try your suggestions and I will update tomorrow

That model is fine. Same as mine, should work fine with HA

We haven’t seen the result of the nmap test yet. Please provide.