snoorz / homebridge-aqara Goto Github PK
View Code? Open in Web Editor NEWHomeBridge plugin for Aqara gateway and devices
HomeBridge plugin for Aqara gateway and devices
In Home, some sensors at random revert back to default name and default room. And this has happened to me more than dozen or so times.
This has never happen to me with either Yeelight or Wemo.
Anyone else experienced this issue? And do you have a suggested fix for me?
I'm running homebridge on mac, and firmware on my gateway is 1.4.1_143.0141
after update to version 0.1.8 , one in-wall switch is shown as two devices - light and switch. and only one of them works depends on the fakeLightBulbForLightSwitch value.
/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:56
var gatewaySid = this.gatewaySids[accessory.UUID];
^
TypeError: Cannot read property 'UUID' of undefined
at AqaraAccessoryFactory.autoRemoveAccessory (/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:56:48)
at Timeout._onTimeout (/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:92:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
My gateway report 1.3.1_141.0141 is up to date.
I have a combination of Aqara door sensors and yeelight / hue bulbs. I notice that when I'm looking at the log files (homebridge -D) the changes of the Aqara sensors are not shown. However, when I open the door I can see the changes of values in the Eve / Home app.
The problem i have is that based on the door sensor a scene should be triggered. This is not happening. Any clue what causes this?
http://xiaomi-mi.com/mi-smart-home/xiaomi-mi-smart-home-cube-white/
Will this sensor be supported?
Hello
I have bought a new v2 hub (I was on v1) purely because I wanted the HomeKit integration. Received it yesterday, installed it. Can't upgrade to 1.3.1.
Mihome app (last version, tried on android and iOS) says that I have the most updated firmare (1.2.6).
Furthermore I can't activate developer mode on the app, is this due to the fact that the firmware is not updated?
Please help me out. I wrote to Xiaomi support with no response.
the 86sw2 always turn off by itself (about 5 to 10 minutes) in the new version 0.19
it sames like the state of the 86sw2 is not stable
Can smart button be used with this plugin - so let's say when I click xiaomi smart button, it will play music through my SONOS speaker (already integrated using homebridge).
Thanks.
Would the new sensors be compatible?
goo.gl/tD0eUE
Everything was configured perfectly and all accessories can be found in HomeKit. But if I click the light button. The error message show up no password for the light and require edit config file. I double checked the password for the gateway and no error. Do we need add the light's mac into the config file but I cannot find the password.
感谢你的homebridge-aqara 什么时候能够支持, 小米空气净化器。 米家台灯。 其他小米关联设备啊。
Wall switch can increase type?
It can only be a light switch
I want it to be another type.
Hey guys,
first of all a huge thanks for implementing such an awesome tool.
I ran into some problems when starting homebridge. I installed everything as described in the README. When I'm executing
homebridge
I get this
Loaded plugin: homebridge-aqara
/usr/local/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:4
const iv = Buffer.from([0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58, 0x56, 0x2e]);
^
TypeError: this is not a typed array.
at Function.from (native)
at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:4:19)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Plugin.module.exports [as initializer] (/usr/local/lib/node_modules/homebridge-aqara/index.js:2:3)
at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:147:14)
I tried other plugins and they work fine.
Thanks for your help!
Some more info:
node -v 4.3.2
npm -v 3.10.9
raspbian jessy
Just wondering if following products are supported or is there a plan to support these devices on roadmap. Sorry, if this question has been asked and addressed. I couldn't find a definite solution.
Xiaomi Mi Smart Socket Plug 2 (without Zigbee)
EN: http://xiaomi-mi.com/smart-home/xiaomi-mi-smart-socket-plug-2/
CN: http://www.mi.com/socket/
Xiaomi Mi Power Strip 6 Sockets
EN: http://xiaomi-mi.com/smart-home/xiaomi-mi-power-strip-6-sockets-white/
CN: http://www.mi.com/chaxianban2/
Thanks
hi,my firmware is 1.4.1_141.0141, and i success add V2 gateway to homekit , the Temperature,Humidity,Motion Sensor are working. but plug switch can't work. tap ON or OFF no status change.
please help...
I have all my things installed but my door/window sensors were always marked as open when I started HomeKit. I had to manually open and close all windows and doors to have them work correctly.
I still have issues with my power plugs. They get the correct status (switched on or off) but I cannot switch them off/on from home kit. If I try I get home bridge to crash and it takes a few seconds to come back to normal. Is there anyone that has got the plugs working?
thanks
Home App 刷新状态后 温湿度传感温度部分未响应 湿度正常 米家 App 中两者均可以正确显示 重启 Homebridge 问题解决 刷新后再次失效
i'm able to discover Human Sensor and door contact switch, but not the other devices like smart mini plug or wireless switch for building rules and automation, is there any way to add these devices as well. thx in advance for any help
I set the following, but after the start and no lights, do not know where I was wrong?
……………………………………………………………………………………………………………………
"platforms": [
{
"platform": "AqaraPlatform",
"fakeLightBulbForLightSwitch": true,
"sid": ["XXXXXXXXXXXXXX"],
"password": ["XXXXXXXXXXXXXXXX"]
}
]
Hi there, thanks for this amazing plugin, just wanna know how can we get the plug device's voltage reading?
i tried print PlugSwitchParser.prototype.parse
data, but the voltage is not contained.
Hi,
Just to share my experience with this error, maybe someone will get this.
I try to launch homebridge-aqara on my RPi (the version of node is 5.1.0), and i got the following error:
const iv = Buffer.from([0x17, 0x99, 0x6d, 0x09, 0x3d, 0x28, 0xdd, 0xb3, 0xba, 0x69, 0x5a, 0x2e, 0x6f, 0x58, 0x56, 0x2e]);
TypeError: this is not a typed array.
To resolve this error, just change this line in "AqaraPlatform.js", line 4
const iv = Buffer.from([....
to
const iv = new Buffer([...
Hope that help!
Hi,
I tried to incorporate the aqara devices (gateway, door sensor and motion sensor) into homekit, using homebridge, but when i tried, homekit says that there is no device to add.
I installed the npm homebridge-aqara
I obtained mac address of aqara gateway and password and added on my config.json like this:
pi@raspberrypi:~/.homebridge $ more config.json
{
"bridge": {
"name": "Homebridge",
"username": "XX:XX:XX:XX:XX:XX",
"port": 51825,
"pin": "031-45-154"
},
"platforms": [
{
"platform" : "yeelight",
"name" : "yeelight"
},
{
"platform": "HomeAssistant",
"name": "HomeAssistant",
"host": "http://192.168.0.100:8123",
"password": "XXXXXX",
"supported_types": ["binary_sensor", "cover", "fan", "input_boolean", "light", "lock", "media_player", "scene", "s
ensor", "switch"]
},
{
"platform": "AqaraPlatform",
"sid": ["MAC_ADDRESS_GW"],
"password": ["xxxxxxxx"]
}
]
}>
And when i execute homebridge i have this message:
/usr/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:55
var gatewaySid = this.gatewaySids[accessory.UUID];
^
TypeError: Cannot read property 'UUID' of undefined
at AqaraAccessoryFactory.autoRemoveAccessory (/usr/lib/node_modules/homebridge-aqara/lib/AqaraAccessoryFactory.js:55:48)
at Timeout._onTimeout (/usr/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:92:15)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
Just say that in config.json about "sid" i added the mac address in this format: "aabbccddeeff"
Can someone help me please?
thanks
Hi!
Tried to use homebridge-aqara, but faced with a problem.
error, msg - bind EADDRINUSE 0.0.0.0:9898, stack - Error: bind EADDRINUSE 0.0.0.0:9898
at homebridge log and Aqara plugin doesn't work.Really looking forward to it :)
什么时候可以开放小米万能遥控器的接口,让小米万能遥控器也可以接入homtkit
Hello! I have read all the issues topics, also regarding this issue, but nothing helps. Please help me)
I have ZigBee plug that has fan on it. That plug works via MiHome, but doesn't work with HomeKit, I can see the status, but can't control it.
I have Gateway and detectors in one wi-fi network (AirPort Express) and Yeelight bulbs working in another wi-fi network (Xiaomi Nano, have to purchase it, because bulb can't connect to AirPort Express). Homebridge is installed on my old iMac.
Everything work somehow, but I have a problem with Plug. Password that I got in Developer Mode of Gateway is correct. All the updates are installed.
P.S. Also I have minor problem with bulbs. It stops to work after Homebridge server has been restarted. I have to hard switch off that bulbs and switch it on then, so Homebridge can see it. If you can advise I will appreciate it.
Just curious, are there any chances of adding Magic Cube Controller and other devices?
Is there an updated list of compatible devices?
Hi,
Just find some interesting stuff
https://github.com/louisZL/aiot-open-2b
Hey, thanks for your great work snOOrz! My sensors and LED bulbs are working flawlessly and I'm thinking about adding more devices.
Are you going to implement the Xiaomi Aqara Smart Light switches? I'm considering buying some of these to control my Xiaomi LED bulbs.
I'm talking about this these: http://xiaomi-mi.com/smart-home/xiaomi-aqara-smart-light-control-set/
http://files.xiaomi-mi.com/files/aqara/aqara-EN.pdf
测试发现,在home里面快速开关动作,会导致homebridge软件异常退出。
发现的规律是这样的,切换到相同状态的时候,软件会异常退出,比如现在开关是开的状态,如果快速开关动作,在开还没有完全执行的条件下,又切换到开的状态,这样程序就会异常退出,试过在AqaraPlatform.js 里面函数LightswitchCommander.prototype.send里面 把this.lastValue==on 条件下的return屏蔽掉,重新测试,软件不会死掉,但是功能异常,设备无法控制,只能重启homebridge才能恢复。
这个bug还有个问题,就是会导致home里面场景执行可能会出现异常。比如我设置的场景里面把灯关闭,在执行场景前灯是关闭状态,那边我执行场景后,软件也会崩溃。
这个问题请问怎么解决呢?
Hello,
Can we hope a firmware update of the 1st version of the gateway to add this useful (quite mandatory) feature ?
Desperately blocked on version 1.3.0_124.0140 for over a month.
Thx
I'm working home-assistant integration (also mentioned here)
One interesting finding, it looks like the password is not needed for reading sensor data? (only needed for controlling the lights, see code)
All sensor data are just multicasted to 224.0.0.50:4321 and I can write a simple script to read them without the gateway password.
This implies two things:
Not a great deal for me but just posting here in case anyone is interested.
@snOOrz, it seems signing/encrypting the multicasted sensor data is technically possible, is there a reason why this is not implemented?
Hello snOOrz, thanks for your work! It is really great to use the aqara ecosystem.
Do you plan to create an homeassistant component ?
Any idea how to start the implementation ?
Not really an issue but I don't know where to send a direct message.
Here is the message from this devices. (dumpd from parseMessage method)
{
"cmd": "report",
"model": "86sw2",
"sid": "xxxxxxxxxxxxxxxx",
"short_id": 12345,
"data": "{\"channel_0\":\"click\"}"
}
Data could be one of the following values
早期购买了 86 单火 双开,但是处于家里都是三开照明。一直没有安装。昨天安装之后。 发现homebridge-aqara 能吧双开单独控制。这个是一个惊喜。SnOOrz 这个homebridge-aqara 真心很棒。但是我现在的问题是:
因为双开默认只能作为灯的类型来使用。请问是否可以 让这个86双开或者单开增加 选择类型。比如 它可以是 排气扇 之前用 小米自带的路由器插件 homekit 是可以选择的。但是小米路由器homekit 有很大局限性。选择使用树莓派来作为 控制关网。 不懂代码的我。真心看不懂楼主些的这个!@#!#@!#
希望你能把这个灯增加一个类型选择。
Hello, can someone help me with this error.
Thank you
/usr/lib/node_modules/homebridge-aqara/lib/AqaraPlatform.js:62
var sid = config['sid'];
^
TypeError: Cannot read property 'sid' of null
config.json
{
"platform": "AqaraPlatform",
"sid": ["zzzzzzzzzzzzzz"],
"password": ["xxxxxxxxxx"]
},
In recent days, the home app can not be used to control the switch, the switch state can only be displayed. A few days ago can still control the switch.
Hi snOOrz, I found that existing homebridge-aqara have compatible problem with aqara gateway firmware version 1.4.1_143. When the platform setup but cannot control aqara switch. Homekit app was hang up when motions sensor is active. Also the device keep "updating" status.
How can user get Aqara Getway's password?
is it the same as Xiaomi account password? (not likely)
Out of privacy reasons I blocked the gateway from accessing the internet via my router, now the gateway behaves odd in 3 ways:
I monitored these issues for about 3 months now and tried restarting, reinstalling, resetting and updating to solve the problem - sadly without success.
Has someone else encountered these and has a fix for them?
I can get power consumption info from xiaomi app for zigbee plug. Can homebridge-aqara also get this information?
I have tried to write a trial python script to retrieve udp broadcast message from xiaomi hub according to some blogs. But still can't see power usage info.
Howdy snOOrz, thanks for your work! There is a internal RGB light on the gateway and can be control by the official xiaomi app. However, it is not shown in the homekit while everything else does. Do you have any plan for implementation?
What abot a node-red plugin for aqara gateway ?
Regards
Alessandro
Juste à quick tip to update the temperature stuck on 100 degrees. A press on the sensor button seems to fix the problem and updates the sensor to the current temperature
如题,谢谢!
Hi,
I was successfully using HomeBridge with both yeelight and aqara plugins. I had no issues at all until today, when I've decided to change the location of my Xiaomi Temperature and Humidity Sensor. I also wanted to clear the temperature history within the Xiaomi Home app, so I decided to remove the device there. After doing this, I have paired it again. Unfortunately in the iOS Home app the sensor doesn't show the temperature anymore! The weird thing is that the humidity is still there, but the temperature "box" says "No answer".
I have already recreated the whole homebridge setup:
Another weird thing, is that the Xiaomi Home app shows both the humidity and temperature just fine (so the sensor itself isn't damaged).
What's wrong? Can you help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.