Page 1 of 1

Xiaomi Gateway missing devices in Domoticz

Posted: Monday 25 March 2019 10:18
by maciekk
Hi,
I'm beginner in Domoticz matter. My devices:
Domoticz - Rpi 3
Domoticz ver 4.97
Router - Asus AC-RT 56U
Desktop - Windows 10.
Rpi is connected by LAN with router.

Recently I got my smart Xiaomi set. I have many tries to connect it with my domoticz (domoticz doesn't find any devices). I read all topics with similar problem in that forum, but still without success. From the beginning: I install Mi Home application, install Gateway into Mi Home and next additional devices (temperature& humidity, motion sensor, wirelles switch, etc). I open developers mode - active it, found password, confirm in that. Next I add Xiaomi devices in Domoticz Hardware - internal IP (set in the router), port 9898 and password from MiHome app (accept new devices are thick). When I go to "devices" there are no one. I clean cache, reboot domoticz, reboot rpi, etc.. Still without success.
I read many topics - many people had the same problem. Some of them solved this issue, but this solution unfortunately doesn't work for me.
I have no ideas what can be wrong. Domoticz log is:
2019-03-24 22:08:41.878 XiaomiGateway: will listen on 9898 for hardware id 16
2019-03-24 22:08:41.878 XiaomiGateway: Delaying worker startup...
2019-03-24 22:08:46.878 XiaomiGateway: Worker started...
2019-03-24 22:08:46.879 XiaomiGateway: Using 192.168.1.95 for local IP address.
(192.168.1.95 - Domoticz IP). Domoticz works on 8084 port

I connect Xiaomi Gateway via 2.4GHz WIFI (subnet is the same for WIFI and LAN 255.255.255.0). I tried to connect Rpi and Xiaomi via WIFI - still, no devices found
I read that may be problem with Xiaomi Gateway (my is: lumi.gateway.v3). But I think people solved that issue.
Others ideas were: udp 9898 open or occupied by another service - I think there is no service use this port. When I check 9898 port on Rpi (nmap tool) I got result: port open|filtered.
On Rpi I use Pi-Hole (disabled during Xiaomi installation), Firewall on router disabled also.
Next idea is that router needs to be accept mDNS - I don't know if and where I should to active it.

Can You help me - what can be wrong, or what I can check to find a problem. I'm fighting with it several days. I'm desperate.

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Thursday 28 March 2019 10:08
by maciekk
Hi,
I'm still fighting but without success. I had several tries to reset gateway, domoticz, router etc. To be sure that there is no problem with my Rpi, I installed Domoticz (beta version) on my Lap with Windows 10. I added a user variable - no effect. I tried to find my gateway on the Rpi (Raspbian) by arp -a - I see this devices on the list (please see attached screen). Additional I check if port 9898 is open - by command: nmap -sU -p9898 Domoticz IP. I'm not sure if I put on the IP address as Domoticz IP or Gateway IP. In that two cases I see - Domoticz (192.168.1.95) that port is open| filtered, but in case I put Gateway IP (192.168.1.36) - port is closed. Please see screen.
Can You advise me, what I can do more to find a reason for no devices in Domoticz? I consider that subnet may be reason - I see that gateway is 255.255.255.0 (connected via WIFI), but I don't know how to check Domoticz subnet (connected via LAN. Info on the router is that lan is connected as 255.255.255.0) - so it should be no problem.
One of the user another forum found some solution - solder 3 wires and change firmware - it works for OpenHab. Any one has the same experience with that?
https://community.openhab.org/t/solved- ... /52963/125

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Saturday 30 March 2019 10:32
by vladmerc
Hi,

on new devicec and new firmware udp 9898 is closed. I have bought one ant this solution from openhub helped me
  • Find specific screw bit like fork to open gateway case.
    Find UART cable/board.
    Solder 3 wires GND and RX / TX like here (Image .
    Disconnect RX wire from UART module.
    Dont connect Vcc (power) from UART to gateway.
    Turn on gateway (220V).
    Open putty application, connect to serial port (COM1-30) -select yours one0.
    Wait for fully load of gateway, connect RX wire to UART.
    You will see all messages of gateway.
    Send command psm-set network.open_pf 3 , send it few time in case it was spammed by gateway and it can be lost in msgs…
    Check your param by command psm-get network.open_pf to be sure its OK.
    Turn off gateway.
    Turn it ON.
    Check your port.
20190330_100659.jpg
20190330_100659.jpg (233.02 KiB) Viewed 4083 times

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Tuesday 09 April 2019 20:01
by mattPiratt
@vladmers, maciekk

Hi,

Your findings, both of You, looks really really advanced and smart.
I currently am struggling with the same. Cannot get Gateway to talk to domoticz.

But seams that nmap thinks the Gateway port is open in my case:
$ docker run --rm -v "$(pwd)":/data uzyexe/nmap -sU -p9898 192.168.1.159

Starting Nmap 7.60 ( https://nmap.org ) at 2019-04-09 17:50 GMT
Nmap scan report for 192.168.1.159
Host is up (0.00031s latency).

PORT STATE SERVICE
9898/udp open|filtered monkeycom

Nmap done: 1 IP address (1 host up) scanned in 0.80 seconds
Do You know a way that I could dig further if broadcasting (g. IGMP Proxy) is working correctly? I know that Gateway should broadcast messages, that Domoticz is listening to. Or maybe I am misleading. Maybe my DHCP is incorrectly set up. Anything You
Or maybe I have to do this soldering thing always now? Please get back to me.

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Tuesday 24 September 2019 21:21
by Manny
Had the same problem with my V3 Gateway.
Vladmercs solution worked for me.

Thanks!

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Wednesday 25 September 2019 21:23
by Sprinter123
I have got the same issue wit v3

Re: Xiaomi Gateway missing devices in Domoticz

Posted: Friday 31 January 2020 18:01
by ismo67