turn off firewall on my windows 10 (host) and ubuntu (guest in VM)
root@homeassistant:~# ufw status
Status: inactive
multicast support on router. I’m not sure on this, I have Tenda AC6. I’ve tried searching in the manual, and the only place I found about multicast is in the IPTV setting. I’m not using the IPTV feature but I have enabled it, just in case. I’ve read here about using iperf to test multicast capability of my network. I don’t know whether this is the right tool and whether the result is valid, however I get good result using this method. I’ve already sent an email to Tenda support regarding this regard and still awaiting their response.
trying to set mac: blank → no effect, still error.
2018-08-27 10:10:46 WARNING (MainThread) [homeassistant.components.http] Experimental auth api enabled and legacy_api_password support enabled. Please use access_token instead api_password, although you can still use legacy api_password
2018-08-27 10:10:46 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.broadlink_power which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-08-27 10:10:47 DEBUG (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2018-08-27 10:10:47 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2018-08-27 10:10:52 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 2)
2018-08-27 10:10:57 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2018-08-27 10:10:57 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 3)
2018-08-27 10:10:59 WARNING (SyncWorker_4) [homeassistant.components.light.flux_led] Failed to connect to bulb 192.168.0.180, LED Tempat Tidur
2018-08-27 10:11:02 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 4)
2018-08-27 10:11:07 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 5)
2018-08-27 10:11:12 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 6)
2018-08-27 10:11:17 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 7)
2018-08-27 10:11:22 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 8)
2018-08-27 10:11:27 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 9)
2018-08-27 10:11:32 INFO (SyncWorker_1) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 10)
2018-08-27 10:11:37 ERROR (SyncWorker_1) [homeassistant.components.xiaomi_aqara] No gateway discovered
2018-08-27 10:11:37 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.
set discovery_retry: 10 → no effect also. If I don’t put host: and mac: specifically, the auto-discovery will fail even after 10 retries. I have to specifically put the IP address and mac of the xiaomi gateway for it to be found.
disable-enable Lan access from miHome apps has no effect also.
hard-reset gateway → I’ve tried several times but still same errors
docker… I think I don’t use docker. I’ve installed hassio directly to the Ubuntu VM. CMIIW…
I never get error about invalid key…
I have no error about PyXiaomiGateway library… However I went ahead and install all dependencies
root@homeassistant:~# apt-get install python3-dev libssl-dev libffi-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libffi-dev is already the newest version (3.2.1-8).
libssl-dev is already the newest version (1.1.0g-2ubuntu4.1).
python3-dev is already the newest version (3.6.5-3ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
In short, I have tried every toubleshooting steps in the documentation page, but still unsuccessful. I have some suspicion :
My errorr always stopped at listening for broadcast. Could it be my router doesn’t support multicast?
I may have too complicated network hops : xiaomi gateway ↔ wireless router (Tenda AC6) ↔ wireless USB stick (TP-Link TL-WN722N) ↔ VMware Ubuntu host (bridged).
I will try to run hassio from persistent-storage live ubuntu on flashdisk (bypassing windows and VMware), or change the wireless USB stick, or even try on a different wireless router…
2018-08-27 11:21:20 WARNING (MainThread) [homeassistant.components.http] Experimental auth api enabled and legacy_api_password support enabled. Please use access_token instead api_password, although you can still use legacy api_password
2018-08-27 11:21:20 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sensor.broadlink_power which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-08-27 11:21:20 DEBUG (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2018-08-27 11:21:20 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2018-08-27 11:21:25 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 2)
2018-08-27 11:21:30 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2018-08-27 11:21:30 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 3)
2018-08-27 11:21:33 WARNING (SyncWorker_0) [homeassistant.components.light.flux_led] Failed to connect to bulb 192.168.0.180, LED Tempat Tidur
2018-08-27 11:21:35 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 4)
2018-08-27 11:21:40 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 5)
2018-08-27 11:21:45 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 6)
2018-08-27 11:21:50 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 7)
2018-08-27 11:21:55 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 8)
2018-08-27 11:22:00 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 9)
2018-08-27 11:22:05 INFO (SyncWorker_2) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 10)
2018-08-27 11:22:10 ERROR (SyncWorker_2) [homeassistant.components.xiaomi_aqara] No gateway discovered
2018-08-27 11:22:10 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.
How was your problem like? How do you find it was the router that block the multicast? May I know what is your router back then, and what is your current router now?
I just bought the Tenda AC6 a month ago, and I really hope that the router was not the culprit. Don’t know what my wife will say if I buy another router…
How was your problem like? How do you find it was the router that block the multicast? May I know what is your router back then, and what is your current router now?
I don’t remember exacly, but first i had 1 router from my company of internet, then they changed my router and then the gateway didn’t appeared in HA, so I installed my old one to test, and with old one, the gateway discovered.
The one that blocked multicast was a livebox, then old one that i was using was a ZTE. Now i have a Unifi.
If you look in forum, about xiaomi gateway discovered problem, you can see about that some routers block the multicast. Ask a friend if has old router…
Look if configuration of hassio has bridge mode activated also…
Hmm… I’ve spoken to the live support of Tenda. Not the best customer support though… Waiting 30 minutes for an answer, and they just answer in two lines and disconnect my session… They said the router supports multicast, although I cannot find any setting regarding multicast in my router web-admin…
However, I will still try to find another router to check this out…
@garvarma what did you mean by hassio bridge mode? I’ve tried googling a bit about it, but still haven’t found any information about it… How do we check the bridge mode of hassio?
what did you mean by hassio bridge mode? I’ve tried googling a bit about it, but still haven’t found any information about it… How do we check the bridge mode of hassio
In my case i’m using HA in dockers option. In my case when i configure the docker, i need to put in bridge mode, that all devices works in the same network.
If you didn’t find anything, in google, then maybe is not necessary in your case.
speaking of this docker thing… I went ahead and try to see whether my system is actually running on a docker… So, when I issue this command from SSH (putty), this is the result that I get :
Does that mean I’m running hassio in docker? If yes, how do I make it running in –net:host mode? I’m really lost here, and I’ve tried searching around for instruction to run the already-installed docker in host mode… Any help would be appreciated…
Hmm… I’ve tried using different router D-LINK L7-N-R2000 which have multicast capability (there’s a menu about that in the setting). But the error persist. It seems like the port 9898 is closed most of the time. It only opens for a second after I disabled-enable LAN access. I assume this is the bug of the latest firmware…
i dont think it is multicast issue. Cause multicast issue you still can discover the gateway but will keep give key error in the logs
Possible migateway bug.
Try this.
turn off wireless communication protocol
change the password by press the button(avoid password with L / i / o / 9 / g. Sometime, cant differentiate it.)
turn on wireless communication protocol
try connect using new password.
if step 4 fail. Reboot your migateway and wait 5 mins after reboot. Then restart your home assistant.
Other things you can try is running hassbian rather than hass.io.
I has problem with hass.io which it only listen to my lan port and not my wireless.
You can also see the broadcast from migateway using ngrep
$ ngrep port 9898
interface: eth0 (192.168.xx.0/255.255.255.0)
filter: (ip or ip6) and ( port 9898 )
#
U 192.168.xx.xx:4321 -> 224.0.0.50:9898
{"cmd":"heartbeat","model":"gateway","sid":"xxxxxxx","short_id":"0","token":"xxxxxxxxxxxxx","data":"{\"ip\":\"192.168.xx.xx\"}"}
#
U 192.168.xx.xx:4321 -> 224.0.0.50:9898
{"cmd":"heartbeat","model":"gateway","sid":"xxxxxxx","short_id":"0","token":"xxxxxxxxxx","data":"{\"ip\":\"192.168.xx.xx\"}"}
#
thanks for the suggesntion @tyjtyj
I will once again try to disable-enable wireless comm protocol, changing the password…
I’ve tried ngrep port 9898 but I’ve waited 30 mins there’s nothing on port 9898… not a heartbeat from the gateway… I really think the gateway doesn’t want to open himself to the network…
Anyway, what is you nmap result to the gateway? could you please perform
nmap -sU 192.168.0.x -p 9898,4321 to your gateway IP?
I’ve tempted to try to install hassbian. But don’t know how to install hassbian on ubuntu desktop pc?
Yes, nmap is rather unreliable over wifi… If you use cable like me, you will get far more success doing nmap.
I see you have port 4321 and 9898 open on Gateway… I never have those port opens, eventhough I reset the gateway multiple times, and disable-enable LAN access numerous times. I wish I could send you my unit to test.
No, you cant access my GW over the internet but I dont like to expose my private ip to the internet(full stop).
There is a space there in my command line. I am not sure why when I copy and paste, it disappear.
It does shows the port was open for a while and then closed then open and then close…
I ran few times and sometimes it open and sometimes it closed. I just copy the 2 that shows different result.
hoedha, maybe you wanna try run on host computer rather than virtual machine.
Was it stated as closed or was it the Nmap couldn’t connect to he gateway? In my case using LAN cable I can always Nmap the gateway but it always return the state of closed on both ports.
I’ve tried running HA in VMware, in virtualbox, and in Ubuntu desktop pc as host… All result in same situation… Do I get a defective gateway?
@tyjtyj@nickrout please don’t fight each other. We are here to help others having problems (like me)…
Back to topic, I’ve tried running nmap using -Pn as suggested, but the result is the same… So I really guess there’s something wrong with my gateway which won’t open its port. I’ve disabled-enabled LAN access from dev-mode in mi-home but still face the same problem. I’ve found a guy in another city with HA setup and xiaomi gateway, so I may try to send him my unit to try on his setup, or ask him to send his gateway for me to try in my network…
Really strange… I wish we could flash (custom) firmware to the Xiaomi gateway…
root@hoedha-m93p:~# nmap -sU -Pn 192.168.0.108 -p 9898,4321
Starting Nmap 7.60 ( https://nmap.org ) at 2018-09-08 09:24 WIB
Nmap scan report for 192.168.0.108
Host is up (0.22s latency).
PORT STATE SERVICE
4321/udp closed rwhois
9898/udp closed monkeycom
MAC Address: 78:11:DC:B3:7D:98 (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 14.07 seconds
root@hoedha-m93p:~# nmap -sU -Pn 192.168.0.108 -p 9898,4321
Starting Nmap 7.60 ( https://nmap.org ) at 2018-09-08 09:24 WIB
Nmap scan report for 192.168.0.108
Host is up (0.22s latency).
PORT STATE SERVICE
4321/udp closed rwhois
9898/udp closed monkeycom
MAC Address: 78:11:DC:B3:7D:98 (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 13.99 seconds