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

i used copy and paste

=recv zigbee message:Free=180856 ,t=8000;l=5;data= 00 00 9f 0a 00
01-21 23:37:36.446
{ā€œidā€:12,ā€œmethodā€:ā€œpropsā€,ā€œparamsā€:{ā€œtemperatureā€:30}}
psm-set network.open_pf 3

psm-set network.open_pf 3

psm-set network.open_pf 3

psm-set network.open_pf 3

psm-set network.open_pf 3

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

Dont work. I use screen (osx) for test. IĀ“ve no idea :frowning:

My Mac: 4c:f8:c8:ff:ff:ff

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.

1 Like