Open fjlopezandreu opened 7 years ago
try change homekit pin&username
I have done it several times without positive results.
It is clear that the plugin communicates correctly with the gateway since it shows the events that are occurring. I think the problem is that it is not written to the file cachedAccessories.
I have debugged the MiAqaraPlatform.js file and noticed that the gateway only sends heartbeat messages.
Therefore, in the function MiAqaraPlatform.prototype.parseMessage runs the code snippet corresponding to the heartbeat condition and finally runs the this.Gateways.updateGateway function.
As this.Gateways.addOrUpdateGateway or this.Gateways.addGateway (get_id_list_ack condition in parseMessage) was not initially executed, no accessory is added since there is no gateway created.
I had a same problem, my gateway is v3 too, homebridge-mi-aqara can not show the accessory, but homebridge-aqara is ok.
Had same problem. Fixed by change const multicastAddress = '224.0.0.50'
to const multicastAddress = '192.168.1.64'
where '192.168.1.64'
is IP address of Gateway.
Dont know why but gateway not responding on commands ({"cmd":"whois"}
for example) from MiAqaraPlatform.js
if i try connect by multicast address(224.0.0.50
). But in same time if i send commands from my PC (Packet sender application) both IP`s responding well.
Any ideas why?
Hi SpiritAmalthea. Where is this multicastaddress variable? It’s not part of my config.json
Hi SpiritAmalthea. Where is this multicastaddress variable? It’s not part of my config.json
Hello Jinsterrrr. Why config.json? We are talking about index.js (https://github.com/YinHangCode/homebridge-mi-aqara/blob/master/index.js)
I found index.js in /usr/lib/node_modules/homebridge-mi-aqara Is that the correct location? I modified the multicast address to 10.0.0.123 (my aqara gateway IP) and also tried 10.0.0.210 (the address where homebridge is run). Both resulted in Homebridge crashing on launch with the following:
[2017-12-17 03:01:35] [MiAqaraPlatform] [DEBUG][Send]{"cmd": "whois"} [2017-12-17 03:01:36] [MiAqaraPlatform] [INFO]server is listening on port 9898. dgram.js:614 throw errnoException(err, 'addMembership'); ^
Error: addMembership EINVAL
at _errnoException (util.js:1024:11)
at Socket.addMembership (dgram.js:614:11)
at Socket.
Jinsterrrr. Keep ''224.0.0.50'' in addMembership function
Hi guys I'm new to this... I've found the index.js in /usr/local/lib/node_modules/homebridge-mi-aqara and I changed the "const multicastAddress = '224.0.0.50' " to the gateway's IP address but now it gives the same error from addMembership EINVAL.
SpiritAmalthea what do you mean about keeping the "224.0.0.50" ? How can I do it? I've only changed the multicastAddress...
best regards
SpiritAmalthea what do you mean about keeping the "224.0.0.50" ? How can I do it? I've only changed the multicastAddress...
index.js file: line 17 const multicastAddress = 'your gateway IP adress'; line 86 you should change serverSocket.addMembership(multicastAddress) to serverSocket.addMembership('224.0.0.50') line 173 you should change serverSocket.addMembership(multicastAddress) to serverSocket.addMembership('224.0.0.50')
So you changing multicastAddress const, but in addMembership function you keep old value "224.0.0.50"
Had same issue but with Homebride working on my Raspberry Pi3 with VPN Could solve loading accessories by using above's fix! Thanks SpiritAmalthea for your fix. All works as it should with homebridge-mi-aqara now :)
URBANsUNITED
Hi guys, I'm new on homebridge and I'm trying to add xiaomi devices to it. I've installed the plugin, when I run homebridge the plugin is loaded correctly the first time, all the accessories are online in my home app, after few seconds it stops working and the devices do not respond, on debug the error is:
[3/11/2018, 6:42:20 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key [3/11/2018, 6:42:20 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key at MiAqaraPlatform.parseMessage (/usr/local/lib/node_modules/homebridge-mi-aqara-2/index.js:301:26) at emitTwo (events.js:106:13) at Socket.emit (events.js:192:7) at UDP.onMessage [as onmessage] (dgram.js:546:8)
I've already applied the fix, thanks SpiritAmalthea, but my problem still persists, I've though it was due to the multicast address so I've checked and for my network it is 224.0.0.251, I've tried to applied it following the fix, nothing..I have been experiencing this issue and I don't know where is the problem. Ideas? thanks for the support.
Hi guys, I'm new on homebridge and I'm trying to add xiaomi devices to it. I've installed the plugin, when I run homebridge the plugin is loaded correctly the first time, all the accessories are online in my home app, after few seconds it stops working and the devices do not respond, on debug the error is:
[3/11/2018, 6:42:20 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key [3/11/2018, 6:42:20 PM] [MiAqaraPlatform] [ERROR]Error: Invalid key at MiAqaraPlatform.parseMessage (/usr/local/lib/node_modules/homebridge-mi-aqara-2/index.js:301:26) at emitTwo (events.js:106:13) at Socket.emit (events.js:192:7) at UDP.onMessage [as onmessage] (dgram.js:546:8)
I've already applied the fix, thanks SpiritAmalthea, but my problem still persists, I've though it was due to the multicast address so I've checked and for my network it is 224.0.0.251, I've tried to applied it following the fix, nothing..I have been experiencing this issue and I don't know where is the problem. Ideas? thanks for the support.
Hello. Looks like this is error from anoter module 'homebridge-mi-aqara-2' (github.com/acc-ua/homebridge-mi-aqara-2/. You should made issue in corresponding project. Check line 301 in this file (https://github.com/acc-ua/homebridge-mi-aqara-2/blob/master/index.js)
thanks for the reply, yes I've tried to use homebridge-mi-aqara-2, because with homebridge-mi-aqara i had the same issue,on the first run it didn't work, after multicast address change as you proposed I received the error Invalid key after few seconds.
I've thought that both forks were similar.
At the end, each fork doesn't work: homebridge-aqara homebridge-mi-aqara homebridge-mi-aqara-2
it is little bit frustrating :(
Same problem :( Any idea?
SpiritAmalthea what do you mean about keeping the "224.0.0.50" ? How can I do it? I've only changed the multicastAddress...
index.js file: line 17 const multicastAddress = 'your gateway IP adress'; line 86 you should change serverSocket.addMembership(multicastAddress) to serverSocket.addMembership('224.0.0.50') line 173 you should change serverSocket.addMembership(multicastAddress) to serverSocket.addMembership('224.0.0.50')
So you changing multicastAddress const, but in addMembership function you keep old value "224.0.0.50"
Have same problem. Have done this. now I see my gateway in the MiAqara Manage, but nothing accessories and nothing new in homebridge
Have same problem. Have done this. now I see my gateway in the MiAqara Manage, but nothing accessories and nothing new in homebridge
Did you change your config file? I mean homebridge/config.json
I have a raspberry pi with the latest version of raspbian and when I run homebridge with homebridge-mi-aqara and configuro homekit I do not see any accessory.
In the execution console no error is observed, and the events that produce the accessories are captured by the plugin and shown in the console as you can see in the image.
It has been running for two days and the cachedAccessories file is empty ([]).
According to the Mi Home app my model is lumi.gateway.v3.
I have tested it with other plugins like homebridge-aqara and it works perfectly.