Page 1 of 2
Using two Xiaomi Gateways
Posted: Tuesday 11 June 2019 22:21
by krizzz
Hi Guys,
I am using already one Xiaomi Gateway which I am absolute happy with. I wanted to add another, but I do not seem to get it working. I tried the tip in the WiKi (
https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)) but It did not work.
I have the 2nd gateway setup and working in the Xiaomi Home app.I disabled the first gateway within Domoticz. Then added the 2nd one. I enabled the first one and rebooted. While I am not receiving ay errors within the Domoticz log. I do not seem to receive a temp sensor from the 2nd Gateway. Can Domoticz handle both gateways on the same port (9898)? Or maybe somebody has an idea?
Re: Using two Xiaomi Gateways
Posted: Wednesday 12 June 2019 22:50
by sincze
I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
Re: Using two Xiaomi Gateways
Posted: Wednesday 12 June 2019 23:25
by krizzz
sincze wrote:I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
Thanks for your feedback! Great to hear it is working correctly for you!
I know actually am receiving a few of these ertoe messages about the 2nd Gateway:
Code: Select all
2019-06-12 23:18:19.771 Error: XiaomiGateway: received data from unregisted gateway!
I have clicked the “accept new hardware devices” button but do not seem to find any new devices. What is strange to me is the message above. I have added the 2nd gateway to Domoticz already. Why is it mentioning that it is an unregisted (spot the typo) gateway.
Anybody knows anything?
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Monday 29 July 2019 21:47
by tezzlicious
krizzz wrote: ↑Wednesday 12 June 2019 23:25
sincze wrote:I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
Thanks for your feedback! Great to hear it is working correctly for you!
I know actually am receiving a few of these ertoe messages about the 2nd Gateway:
Code: Select all
2019-06-12 23:18:19.771 Error: XiaomiGateway: received data from unregisted gateway!
I have clicked the “accept new hardware devices” button but do not seem to find any new devices. What is strange to me is the message above. I have added the 2nd gateway to Domoticz already. Why is it mentioning that it is an unregisted (spot the typo) gateway.
Anybody knows anything?
Verzonden vanaf mijn iPhone met Tapatalk
I have 3 gateways and am receiving this error on the latest beta's for months now. Everything seems to work ok. Couldn't solve it until now.
Re: Using two Xiaomi Gateways
Posted: Monday 29 July 2019 22:58
by krizzz
tezzlicious wrote:krizzz wrote: ↑Wednesday 12 June 2019 23:25
sincze wrote:I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
Thanks for your feedback! Great to hear it is working correctly for you!
I know actually am receiving a few of these ertoe messages about the 2nd Gateway:
Code: Select all
2019-06-12 23:18:19.771 Error: XiaomiGateway: received data from unregisted gateway!
I have clicked the “accept new hardware devices” button but do not seem to find any new devices. What is strange to me is the message above. I have added the 2nd gateway to Domoticz already. Why is it mentioning that it is an unregisted (spot the typo) gateway.
Anybody knows anything?
Verzonden vanaf mijn iPhone met Tapatalk
I have 3 gateways and am receiving this error on the latest beta's for months now. Everything seems to work ok. Couldn't solve it until now.
Do you mean that you have currently 3 working Gateways? What did you do exactly to get it working?
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Thursday 08 August 2019 13:47
by ilfavi
sincze wrote: ↑Wednesday 12 June 2019 22:50
I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
At what point in the procedure should it be done exactly?
Re: Using two Xiaomi Gateways
Posted: Thursday 08 August 2019 15:32
by sincze
ilfavi wrote: ↑Thursday 08 August 2019 13:47
sincze wrote: ↑Wednesday 12 June 2019 22:50
I followed the wiki and 2 gateways each with their own sensors work excellent.
Had to 'enable new hardware for 5 minutes' in the settings to get the devices in Domoticz.
At what point in the procedure should it be done exactly?
First I enable new hardware for 5 minutes.
Then I paired a new motion or door sensor with one of the gateways and the new sensor showed up under devices and in the Domoticz log
Re: Using two Xiaomi Gateways
Posted: Thursday 08 August 2019 16:00
by ilfavi
Thank you.
The problem is that I don't even see the second gateway itself between the devices. (I mean light,alarm,doorbell, etc)
Re: Using two Xiaomi Gateways
Posted: Thursday 08 August 2019 16:47
by sincze
ilfavi wrote: ↑Thursday 08 August 2019 16:00
Thank you.
The problem is that I don't even see the second gateway itself between the devices. (I mean light,alarm,doorbell, etc)
Aha :/
Mmm first I added gateway 1.
Device showed up.
Disabled first gateway.
Restart Domoticz
Again enable new hardware.
Added second gateway.
It showed up

Enabled first gateway again
Restarted Domoticz
And I was up and running.
After that I started to add sensors to each gateway by:
Enable new hardware 5 minutes
Press the gw button 3 times
Press the small whole or button on the sensor.
Chinese bla bla from the gateway.
And my new sensor showed up

Re: Using two Xiaomi Gateways
Posted: Thursday 08 August 2019 18:27
by ilfavi
When I add the second gateway all I see in the log filtered with "gateway" word, is:
2019-08-08 18:14:11.947 Status: XiaomiGateway (ID=13): Delaying worker startup...
2019-08-08 18:14:16.947 Status: XiaomiGateway (ID=13): Selected as main Gateway
and anything new shows up in the device list
ps: the first gateway has ID=4
ps2: "enable new hardware" checked in domoticz settings
Re: Using two Xiaomi Gateways
Posted: Friday 09 August 2019 19:12
by krizzz
So, I did the same procedure as mentioned a few posts above. I keep getting the error:
Code: Select all
ERROR Xiaomi Gateway: recieved data from unregisterd gateway
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Saturday 10 August 2019 12:57
by ilfavi
krizzz wrote: ↑Friday 09 August 2019 19:12
So, I did the same procedure as mentioned a few posts above. I keep getting the error:
Code: Select all
ERROR Xiaomi Gateway: recieved data from unregisterd gateway
Verzonden vanaf mijn iPhone met Tapatalk
same as me:
2019-08-10 12:54:38.580 Status: XiaomiGateway (ID=13): Delaying worker startup...
2019-08-10 12:54:43.580 Status: XiaomiGateway (ID=13): Selected as main Gateway
2019-08-10 12:54:43.580 Status: XiaomiGateway (ID=13): Worker started...
2019-08-10 12:54:43.581 Status: XiaomiGateway (ID=13): Using 192.168.0.18 for local IP address.
2019-08-10 12:54:43.697 Error: XiaomiGateway: received data from unregisted gateway!
it looks like domoticz see the second gateway but cannot use it, and in the meanwhile it keeps receiveing messages from the first one
Re: Using two Xiaomi Gateways
Posted: Saturday 10 August 2019 14:23
by ilfavi
I found the problem. Newer Xiaomi Gateways have port 9898 closed:
Starting Nmap 7.80 (
https://nmap.org ) at 2019-08-10 14:21 ora legale Europa occidentale
Nmap scan report for 192.168.0.29
Host is up (0.024s latency).
PORT STATE SERVICE
4321/udp closed rwhois
9898/udp closed monkeycom
MAC Address: 04:CF:8C:A1:30:82 (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 0.70 seconds
This is the older one I have already:
Starting Nmap 7.80 (
https://nmap.org ) at 2019-08-10 14:23 ora legale Europa occidentale
Nmap scan report for 192.168.0.9
Host is up (0.014s latency).
PORT STATE SERVICE
4321/udp open|filtered rwhois
9898/udp open monkeycom
MAC Address: 34:CE:00:91:F6:BC (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 1.90 seconds
Domoticz sunset.
Re: Using two Xiaomi Gateways
Posted: Saturday 10 August 2019 17:52
by krizzz
Oh wow, good find! But now what
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Saturday 10 August 2019 18:40
by ilfavi
https://r.tapatalk.com/shareLink?url=ht ... are_type=t
We have to solder
Inviato dal mio Le X52x utilizzando Tapatalk
Re: Using two Xiaomi Gateways
Posted: Friday 06 September 2019 22:39
by ilfavi
updated: I bought another one to make another try: DO NOT UPDATE your new gateway! FIRST enable the lan control (maybe check if the 9898 port is open), then update the firmware. If you update the firmware before enabling lan control, it will no longer be possible
Using two Xiaomi Gateways
Posted: Saturday 07 September 2019 8:05
by krizzz
ilfavi wrote:updated: I bought another one to make another try: DO NOT UPDATE your new gateway! FIRST enable the lan control (maybe check if the 9898 port is open), then update the firmware. If you update the firmware before enabling lan control, it will no longer be possible
And updating after enabling lan control is no problem?
You ordered a Gateway V2?
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Saturday 07 September 2019 10:30
by ilfavi
The lan control remains enabled after firmware updates. Both my gateways are V3, the old one and the new one.
Re: Using two Xiaomi Gateways
Posted: Saturday 07 September 2019 11:41
by krizzz
And you do not recieve the strange error in Dominica Aboutaleb receiving data from a unregisterd Gateway?
Verzonden vanaf mijn iPhone met Tapatalk
Re: Using two Xiaomi Gateways
Posted: Sunday 08 September 2019 11:32
by sincze
ilfavi wrote: ↑Friday 06 September 2019 22:39
updated: I bought another one to make another try: DO NOT UPDATE your new gateway! FIRST enable the lan control (maybe check if the 9898 port is open), then update the firmware. If you update the firmware before enabling lan control, it will no longer be possible
Nice find!