Can't configure Xiaomi gateway

damn, I guess only solution will be to open it up and send those commands :confused:

I have the same issue with a second hub I bought to add additional devices - I updated the firmware before enabling the dev mode, which now has no effect.

I’ll be watching with interest to see if a method becomes available that doesn’t involve the open heart surgery on the hub :slight_smile: but huge respect to those who have done that!

For what it’s worth, there may be more to this story of Xiaomi gateways not working.
Background: Not my gateway, but I know it was upgraded to fw 1.4.1_167 before unlocking LAN mode (via iPhone). It ended up being used under openhab which would quickly stop communicating because port 9898 would close. Tested for a couple of weeks, couldn’t get it to work.
Moved it to my network. Joined (using Android) as secondary gateway to my own MiHome setup running under HAss 0.90.1. It showed up as already unlocked so I used same API key and it was discovered by HAss … and this is what’s I’ve been seeing for the past two days probing randomly:

sudo nmap -sU 192.168.x.y -p 9898,4321

Starting Nmap 7.60 ( https://nmap.org ) at 2019-04-12 17:01 EDT
Nmap scan report for lumi-gateway-v3_miio9428xxxx.lan (192.168.x.y)
Host is up (0.014s latency).

PORT     STATE         SERVICE
4321/udp open|filtered rwhois
9898/udp open          monkeycom
MAC Address: 7C:49:EB:xx:xx:xx (Unknown)

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

It’s been working. Also, tested via toggling gateway light and that works every time too.

So the moral of the story is … I’m confused. Does this have anything to do with the ID used? MiHome server/region? Android vs iOS? Does HAss do something special in the newer version? It’s supposed to not work … but somehow it does.
Next step - we’re moving it back to original network and ID to see if problem reoccurs…

I helped a friend set up home Assistant yesterday and was surprised to find that I was able to get his Xiaomi gateway up and running easily.

The gateway was on the latest firmware (he had already done an update when setting it up on the Mi Home app on IOS the day before). I followed the documented procedure and the 16 character key that was given worked successfully in home Assistant, giving full control of all connected devices.

2 Likes

Completely unhelpful, latest is NOT a version!

Unfortunately, I am not at my friends house, so I can’t check that, but I did say he did the update from the app a couple of days ago. Next time I go round I’ll have a look.

I was so stupid to do the update and now i have a not working gateway in HA.
Version of gateway is 1.4.1_167.0158.

Is there a downgrade methode.

Can you ask your friend where did he bought his? (exact link to the product if possible)
I am trying to find one that does not require the soldering route

I finally got round to my friends and this is the exact model he purchased:

Xiaomi Gateway

The gateway is running firmware 1.4.1_167.0158 and this is the underside for identification purposes:

1 Like

Hi everyone, does anyone have experience with latest firmware version? Do i have any options at all, on how to open ports and connect it to hass.io?

PORT STATE SERVICE
4321/udp closed rwhois
9898/udp closed monkeycom

firmware version: 1.4.1_170.0158

1 Like

Hey. Did you buy it on 170 or updated by yourself? Just interested.

I updated it from the mi home app, before getting home assistant for my home :slight_smile:

Hi. Does firmware 170 works with hassio ? I’ve 150 and works great. Thanks

1 Like

If your gateway is working now do not upgrade the firmware.

Why not update to 170?

Because it may close the ports required by HA to communicate with the gateway. Read the above posts.