Using two Xiaomi Gateways

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Using two Xiaomi Gateways

Post 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?
User avatar
sincze
Posts: 1302
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Using two Xiaomi Gateways

Post 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.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Using two Xiaomi Gateways

Post 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
tezzlicious
Posts: 39
Joined: Saturday 09 April 2016 13:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Using two Xiaomi Gateways

Post 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.
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Using two Xiaomi Gateways

Post 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
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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?
User avatar
sincze
Posts: 1302
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Using two Xiaomi Gateways

Post 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
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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)
User avatar
sincze
Posts: 1302
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Using two Xiaomi Gateways

Post 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 :)
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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
:roll:

ps: the first gateway has ID=4
ps2: "enable new hardware" checked in domoticz settings
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Using two Xiaomi Gateways

Post 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
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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.
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Using two Xiaomi Gateways

Post by krizzz »

Oh wow, good find! But now what


Verzonden vanaf mijn iPhone met Tapatalk
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post by ilfavi »

https://r.tapatalk.com/shareLink?url=ht ... are_type=t

We have to solder

Inviato dal mio Le X52x utilizzando Tapatalk

ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post 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
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Using two Xiaomi Gateways

Post 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
ilfavi
Posts: 11
Joined: Friday 04 May 2018 10:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using two Xiaomi Gateways

Post by ilfavi »

The lan control remains enabled after firmware updates. Both my gateways are V3, the old one and the new one.
krizzz
Posts: 200
Joined: Wednesday 20 November 2013 20:36
Target OS: Linux
Domoticz version:
Location: The Netherlands
Contact:

Re: Using two Xiaomi Gateways

Post 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
User avatar
sincze
Posts: 1302
Joined: Monday 02 June 2014 22:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands / Breda Area
Contact:

Re: Using two Xiaomi Gateways

Post 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!
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Dave21w and 1 guest