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

So I got a bit into sniffing my network, made a router tcp dump and found this.
I guess the gateway wants to send data to port 9898, which is blocked by monkeycom.
I’m not quite sure if I’m interpreting this right.
Do we have any wireshark users here?

You probably running wireshark on your computer and not on wifi router. I usually run tcpdump on my wifi router and save output in file. Next I copy output file to my computer and I’m view it by wireshark. If you don’t have possibility to run custom programs on your router, there is a technique called “arp poissoning” BUT BE AWARE this is offensive/aggressive technique. You need to be sure that are you doing and you need to be the owner of local network where you executing this technique (because you can disturb working whole network).

Yes, gateway is trying to do this but its rwhois protocol and probably its some kind of dns operation. I was nothing to do with working with sensor and other xiaomi gateway stuff. As you can see xiaomi gateway uses port 4321, so the gateway port 9898 is still closed. I don’t know if there is point for debuging port 9898. I think they changed protocol and stop using it. If you are interested i thing there is good explanation: http://docs.opencloud.aqara.cn/en/development/gateway-LAN-communication/
but as i said it’s deprecated. Now we need to focus on port 54321, because there is a lot of communication.

lol

  • Yeah I was thinking that too, found some other packages which are indeed running on port 54321 and goes to 8053

Thanks for the hint, I’m of course aware of this and only using my tcpdump on my own network, every person (aka my family) knows this.

Some news:
Iv’e found some sensor data in the TCPdump, and I don’t know why but the protocol “rhwois” actually transfers the Data to Port 9898, so I’m assuming, that port 9898 is STILL responsible for data exchange:
image
And I’ve found a error on the TTL block:


But it’s beeing obviously blocked by monkeycom.

All my sensors worked 2 weeks ago, when I made a Firewallexception for port 9898. They suddenly stopped working, but I don’t think there has been a Gateway update 2 weeks ago or am I wrong?

Very interesting observation. What version of firmware do you have? Because I could sniff that kind of communication.

{ “cmd”: “report”, “model”:… }

I looks like aqara protocol just from documentation. Maybe you have different problem? Can you post picture of your gateway?

fw_ver: 1.4.1_157, mihome Plug-In Vers. 2.61.3

lumi.gateway.v3, this one:
https://www.gearbest.com/living-appliances/pp_344667.html?wid=1433363

Does other Gateways have different protocols?
I quess that’s standard JSON lol

Let me know if you need some other details too!

I have the same version and same issue :frowning:

There are alot of guys having the same issue, Hope we can all unite to find a solution, or at least the problem causing this.

It’s not relevant btw, Gateway sends those packages to the 224.0.0.50 which is a Unicast adress of your network and every Client/Server receives it

I’m not able to capture any of those unicast packages, but i can capture udp packages flying on port 54321… so I assume Gateway changed protocol… of course it is only my suspicion…

Those are packages flying to the own Xiaomi Cloud, I guess.
They go from port 54321 to port 8053 (senomix)
https://www.senomix.com/
Can’t really tell what that is, but I assuming that there goes our data into a Cloud DB.

I’ve forked openhab2 project and applied my patch with very basic support of xiaomi gateway function. There is no sensor reading, only turning off/on led and controlling volumes.

At the end of README.md there is section with examples for (items, thing and sitemap).

If you don’t have maven and java and still want to try use this addon, you can download it from here.

I’m using the Mi IO binding to control my vacuum.
But I’m not going to use it for the smarthome binding, everything worked just absolute fine and It’s way more supported.
I’ve contacted the contributor of the xiaomi smarthome binding.
When there is someone knowing the answer, he’ll be the one.

Lol, If everything works fine for you with mihome, so why are you writing on this thread? Are you troll or something? I didnt touch vacuum code in my fork so i didnt break any currently working functionality.
I didnt post my version only for you @Nico111, the thread is subscribed by few people and also there are many “lurkes” who may want to test it out.

I don’t understand your concern right now. It has been working but since OH Update 2.2 → 2.3 it isn’t anymore.

Any Updates?
I’ve messaged the wrong Contributor of Xioami Binding, he couldnt help.

Nope, i’ve been able to connect by serial port to gateway, but xiaomi disabled in latest update downgrade function (flashing custom firmware). I’ve been in contact with Dennis Giese, he knows a lot about xiaomi devices and how to “mod” them. Maybe he will be able to help us.

In attachment UART schema connection:

1 Like

Good job, why do you want to flash the FW?

…because it’s high possibility that it will restore compatibility with openhab mihome addon and i won’t be forced to re implement all functionality in miio addon.

What is he saying about packages not arraiving openHAB?