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

Tags: #<Tag:0x00007faed6930738> #<Tag:0x00007faed69305d0> #<Tag:0x00007faed6930490>

Try execute command:
echo on
and then
psm-set network.open_pf 3
and paste result. MacOs have different end-of-line character and maybe it can be a problem(?).

I´ve tasted with putty in windows and screen, the result is identical

echo on

Enable echo

psm-set network.open_pf 3

psm-set network.open_pf 3

psm-set network.open_pf 3

psm-set network.open_pf

[psm] Usage: psm-set
[psm] Error: invalid number of arguments

Nobody an idea?

Hi,

@vernichter04 : I think the error you get is just normal : the psm-set command needs 2 arguments : a param name and a value. In this case it should be :

psm-set network.open_pf 3

if you omit the value and input :
psm-set network.open_pf

you’ll have the above error : [psm] Error: invalid number of arguments

I guess you’re mixing with the other command to check the stored value : psm-get which requires only a param name :
psm-get network.open_pf

which should return ‘3’ here… but anyway if you got here, chances are that everything is ok for you, have you tried to scan the 9898/4321 ports with nmap ?

Yes, ok, that was my mistake. the command to control is psm-get, not psm-set. :slight_smile:

psm-get say:

psm-get network.open_pf

network.open_pf = 3 (1 bytes)

is this ok?

nmap say:

Starting Nmap 7.70 ( https://nmap.org ) at 2019-01-22 21:41 CET
Nmap scan report for lumi-gateway-v3_miio131872349 (192.168.5.127)
Host is up (0.074s latency).

PORT STATE SERVICE
9898/udp open monkeycom
MAC Address: 04:CF:8C:8F:A5:8B (Unknown)

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

i think, the port is open?

i need the port for the plugin homebridge-mi-aqara and homebridge say: [2019-1-22 21:47:51] [MiAqaraPlatform] [WARN][Revc]{“cmd”:“read_ack”,“model”:“gateway”,“sid”:“4cf8c8fa58b”,“short_id”:0,“data”:"{“rgb”:0,“illumination”:1292,“proto_version”:“1.1.2”}"}

not connection to gateway

All, there is no need for soldering or staying on all firmware when you install a new gateway as long as during installation you enable LAN access first before upgrading.

I installed a new one with round text, new hardware yesterday. Did it without upgrading firmware, opened LAN access and configured it in Openhab and added a smoke detector.

I was planning to leave it on the old firmware as I don’t feel like soldering but I saw a post this morning on another forum claiming it’s fine to upgrade after enabling developer mode and the post encouraged me to give it a try.

Upgraded firmware this morning and it’s still working fine, the gateway as well as the smoke detector.

So it is fine to upgrade as long as you enable LAN mode first before upgrading. Also I’m using latest IOS version of Mi home app, so nothing special there.

Hope this helps some people who are less keen on soldering like myself :slight_smile:

Is it confirmed that upgrade to fw 1.4.1_164.0158 does not breaking the gateway v2 and connection to OH ? Currently i have 1.4.1_155.0143 and everything is working but thinking about upgrade…

Yes, that’s what I said in previous post. I upgraded without any problem both a square and round text one to the latest firmware.

New Xiaomi Firmware Update 1.4.1_167.0158

Has anyone dared the update?

Jan

Hi,
I updated to 1.4.1_167.01588 and can confirm that is still working. I updated because the bridge connection to openhab is pretty unstable. It works for several hours and than goes offline. The only thing / quick fix is to delete and reattach it in PaperUI. I’m trying to find a way to automate this process…

I did update. Have 2 gateways, one old (square text) working with OH and one new (round text) that does not (upgraded before opening to network) and the situation remains the same. The one that was working still is, and the one that wasn’t, still isn’t…

After update to 1.4.1_167.01588 i noticed that the mi bridge has more stable connection to openhab. Now in 4 days the bridge is always online, even after disconnecting the wifi or restarting openhab.

My workaround will help i think…
Just try to get UART board (1$ price).
If you of a kind tricky man - you can make it without solder!))

Hi all,
I don’t get it working.
It took me a while to get the UART working with putty. But it works right now :slight_smile:
When I connect the uart with the gateway and open putty I am able to see the feed from the gateway and al it is processing.
But when I try to send the command psm-set network.open_pf 3 there is nothing happening, I don’t get any responce, just like it don’t get there.
I use ctrl+v and enter to send the command is this the correct way? I don’t see any input option.
Hopefully someone can help me :blush:

Hello all
Very new to all these things. And nothing to soldier !
So my idea is is to stick the cable on UART.
I tried but I got no result in Putty, just black screen.

I do not know if it is because of my USB to TTL module, or my wire connection not correct.
.
Just to be sure. The wire named RX must be connected to the RX of the USB to TTL (and TX to TX) or what is shown on the picture are the TX and the RX of the gateway ?
If I understood, normally, RX equipment must be connected to TX of USB and TX to RX. Or not ?? I am very confused.

Sorry,I believe my questions are certainly stupid, but I do not want to damage something… and I would like to get a result.

Also, I am not sure where the GRD must be connected, not very clear on the picture. And as I have no result… Is it on metallic part of the reset button ?

Thanks a lot for your assistance

Hi! Does anybody know which are uart headers in this Version?

Hi,
I only got this gateway days ago started trying to set it up but I cannot bind it to openhab. Can someone summarize what to do and how to get it working (in dummy language)? This thread is starting to get really big.

Hello, when I connect through Putty, all I see are hyroglyphs:

 ▒-7▒▒▒▒▒%5/!7▒▒▒▒▒=%▒▒  ▒-''%-#=-!#▒▒▒▒▒▒▒▒▒▒RDR**▒Q=▒9!##59-#1▒!▒▒753='▒▒3=-'57▒▒I=3E▒Q=▒#5!%1▒Qg}c▒▒#5!#!▒3!#7▒▒RDR**▒Q=▒9!##59-#1▒!▒▒753='▒▒3=-'57▒▒I=3E▒Q=▒#5!%1▒Qg}c▒▒#5!#!▒3!#7▒▒RDR**▒Q=▒9!##59-#1▒!▒▒753='▒▒3=-'57▒▒I=3E▒Q=▒#5!%1▒Qg}c▒▒#5!#!▒3!#7▒▒RDR**▒Q=▒9!##59-#1▒!▒▒753='▒▒3=-'57▒▒I=3E▒Q=▒#5!%1▒Qg}c▒▒#5!#!▒3!#7▒▒

Does anyone have any idea what I’m doing wrong?

I have the firmware 167…

Settings with Putty are 115200, 8,1,N,N

However, the gateway flashes blue all the time and does not stop.

I have connected the gateway to a computer with a SUB D connector. I assume I have to connect TX to RX, don’t I?

I haven’t done this connection to gateway but… I think you need USB to UART adapter.
The RS232 port of your computer:
1/ can kill serial port of your gateway (signal levels are much higher)
2/ have inverted logic signal

Use a USB to UART cable like FTDI or things used with arduino. Be careful to use 3.3v logic.

2 Likes