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.
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.
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!
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:
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.
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
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.
@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.
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.
I have not comand psm-set. I don’t know were is it. Yes i’m stuck as you ). I found on openhab.org (rothm):
At this time, I don’t plan to spend a lot of time on it. My aim is/was just to integrate the gateway with my setup. (that’s why I post as much information as possible here, for someone to pick up)
It looks like issuing a MIIO command (using the token provided in a debug version of the MiHome App for instance) to the gateway would allow a customized OTA package to be processed. The package is just a “tar file” with a script and binaries to apply on top of the current firmware. So, if this is possible, then:
either add a script to /etc/rc.local to replace miio_client on startup*
or turn the gateway into a HomeKit one*
enable SSH access by launching “/etc/init.d/dropbear start” and setting a default password*
-> If someone is willing to test it with his own gateway (and possibly brick it) I can send the files needed (“rc.local” file to patch and the .bin / OTA package) or I can try to create such a custom OTA*
As it looks like it is possible to run the HomeKit client on the mieu01 (binaries are present on the gateway), it might be a simpler way to go.
Concerning the current MQTT implementation, it has been running for the last 5 days without any issue. It’s fast. You can arm/unarm the gateway, turn on/off the light, get events from sensors, … To me, it looks like it would be a good way to go as it uses the “internal protocol” used by Xiaomi to talk between “miio_client” (which then talk to the Xiaomi cloud) and an agent (“gw” binary is an agent). So developing a binding would be useful for other Mi products. But it would take more time than going directly for HomeKit.
So finally, I might put my stuff on github in a few days. But for it to be valuable, someone would have to create a custom OTA package (because going through soldering takes time…)
-> So it looks like getting a custom OTA package to root the gateway is the most important task
I will try it