Xiaomi gateway still not detected after many tries

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

Moderator: leecollings

Post Reply
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

Hi.
I have a Xiami Gateway model "lumi.gateway.v3" and I don't manage to make it works with Domoticz.
I use Domoticz 3.9056 with Zwave and Rflink support, on my Synology DS416j.

My gateway has a static ip address (192.168.1.12).
I enabled the develop mode on MiHome (activated "wireless communication protocol") like the tutorial explains.

But the fact is that when I create it under domoticz, with port 9898, and the good password, nothing happens in the devices screen (no rgb device).
I tried to play with my phone app changing the color of the light from the gateway, but domoticz still ignore it.

I can ping my gateway from my synology (ssh console).
From my computer, I ran "nmap -sU -p 9898 192.168.1.12" and it says that the port is open.

PORT STATE SERVICE
9898/udp open monkeycom

Here is the logfile :
2018-06-08 15:20:41.547 XiaomiGateway: stopped
2018-06-08 15:20:42.575 XiaomiGateway: will listen on 9898 for hardware id 10
2018-06-08 15:20:42.575 XiaomiGateway: Delaying worker startup...
2018-06-08 15:20:47.576 XiaomiGateway: Worker started...
2018-06-08 15:20:47.576 XiaomiGateway: Using 192.168.1.10 for local IP address.

Any help will be appreciated :)
Smiggel
Posts: 36
Joined: Friday 23 March 2018 17:29
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Smiggel »

Did you add port 9898 to the firewall of the nas?
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

Smiggel wrote: Thursday 12 July 2018 22:30 Did you add port 9898 to the firewall of the nas?
Yes. I think so. I tried to turn off the firewall, and I tried also to change the synology rules with theres command lines :
iptables -P OUTPUT ACCEPT
iptables -I INPUT -p udp -j ACCEPT


And I tried to enable explicitly multicast using :
iptables -A INPUT -s 224.0.0.0/4 -j ACCEPT
iptables -A FORWARD -s 224.0.0.0/4 -d 224.0.0.0/4 -j ACCEPT
iptables -A OUTPUT -d 224.0.0.0/4 -j ACCEPT

Since my last message, I upgraded my syno DSM to 6.2, and deployed the most recent Jadahl package (4.9753).
Everything's ok but xiaomi gateway still not found in domoticz devices.

I don't understand why my NAS can't talk to the mi gateway. Well I have seen that I was not alone in this case.
That's a pity 'cause I'm not able to take full advantage of my xiaomi sensors.
Without any doubt, that may be a network matter. But I still in fog on this issue :(
Some people say that when the domoticz host is connected at lan by cable and mi gateway by wifi, there are issues... no way to put my syno on wifi.
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by felix63 »

I have my domoticz running on a Raspberry over fixed network and Xiaomi on WiFi and it works fine (except for my Aqara cube...). I am running the latest stable version of domoticz. Have followed the Wiki instructions. Maybe silly question but when setting up the hardware did you point domoticz to 192.168.1.10:9898 or 192.168.1.12:9898? That is not clear from your description. I would expect 192.168.1.10:9898 to be correct.
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

Well not exactly...

My xiaomi gateway ip address is 192.168.1.12 so I set it up on domoticz hardware tab.
On the other way, my NAS (domoticz server) ip address is 192.168.1.10.

Thus, in logfile, we can read :
2018-07-13 23:19:01.285 Status: XiaomiGateway: stopped
2018-07-13 23:19:01.285 Status: XiaomiGateway: will listen on 9898 for hardware id 6
2018-07-13 23:19:01.285 Status: XiaomiGateway: Delaying worker startup...
2018-07-13 23:19:06.285 Status: XiaomiGateway: Worker started...
2018-07-13 23:19:06.286 Status: XiaomiGateway: Using 192.168.1.10 for local IP address.

I use this version of Domoticz because it's the lastest release packaged for my synology OS (dsm 6.2). I've followed the wifi too.
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by felix63 »

Accept new Hardware Devices is on?
User avatar
corbin
Posts: 463
Joined: Saturday 20 August 2016 22:57
Target OS: Windows
Domoticz version: Beta
Location: Brisbane, Australia
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by corbin »

Try one of the other Domoticz installations (Windows, Raspberry Pi), sure it won't fix the problem but should give you an indication of where the problem originates.
Question about the Xiaomi Gateway in Domoticz? Please check the Wiki first: https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

felix63 wrote: Friday 13 July 2018 23:35 Accept new Hardware Devices is on?
yep
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

corbin wrote: Saturday 14 July 2018 0:40 Try one of the other Domoticz installations (Windows, Raspberry Pi), sure it won't fix the problem but should give you an indication of where the problem originates.
Ok I'm gonna try on windows. My pc is on lan by cable...
I won't know if the issue is due to my version of Domoticz installed on the NAS or the NAS himself but it will tell me if the network is fine or not.
Thanks for your advice.
Cyclone14
Posts: 6
Joined: Friday 08 June 2018 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Xiaomi gateway still not detected after many tries

Post by Cyclone14 »

Here are the results of my tests :

- Have installed Domoticz 4.97 on a Windows 10 Desktop (connected by cable) : no devices found
- Have installed Domoticz 4.94 on a Windows 10 Laptop (connected by wifi) : everything was founded (15 items)!!!

So the problem seems to be my router configuration.
my router is lended by my internet fiber provider : a ZTE ZXHN H298N.
Wifi is on SSID1, in the same network than LAN.
I can set port forwarding from WAN (internet) to LAN but I can't see any rules about WifiLAN <-> LAN.

how could I fix it ?
I found this which is not reassuring : https://superuser.com/questions/730288/ ... o-wireless
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest