Code Monkey home page Code Monkey logo

homebridge-aqara's People

Contributors

aholstenson avatar crhan avatar januslo avatar jayqizone avatar snoorz avatar tax avatar tengelmeier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-aqara's Issues

aqara sensors at random revert back to default name and default room

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

Aqara device not viewed on homekit with homebridge

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

你好

感谢你的homebridge-aqara 什么时候能够支持, 小米空气净化器。 米家台灯。 其他小米关联设备啊。

homebridge-aqara compatible problem with aqara gateway

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.

aqara会导致homebridge软件异常退出

测试发现,在home里面快速开关动作,会导致homebridge软件异常退出。
发现的规律是这样的,切换到相同状态的时候,软件会异常退出,比如现在开关是开的状态,如果快速开关动作,在开还没有完全执行的条件下,又切换到开的状态,这样程序就会异常退出,试过在AqaraPlatform.js 里面函数LightswitchCommander.prototype.send里面 把this.lastValue==on 条件下的return屏蔽掉,重新测试,软件不会死掉,但是功能异常,设备无法控制,只能重启homebridge才能恢复。
这个bug还有个问题,就是会导致home里面场景执行可能会出现异常。比如我设置的场景里面把灯关闭,在执行场景前灯是关闭状态,那边我执行场景后,软件也会崩溃。
这个问题请问怎么解决呢?

Can't see any accessory.

I setup the homebridge-aqara successfully without any error.

And I can add the homebridge in Homekit.

But I can't see any accessory in my GateWay.

img_0897

img_0898

Can smart button be used with this plugin?

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.

Buffer problem (this is not a typed array)

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!

Still on firmware 1.2.6

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.

Plug Switch can't ON/OFF

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...

Gateway Password

How can user get Aqara Getway's password?
is it the same as Xiaomi account password? (not likely)

homebridge crash, TypeError: Cannot read property 'UUID' of undefined

/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)

Xiaomi Gateway v1

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

关于绿米86墙壁开关

早期购买了 86 单火 双开,但是处于家里都是三开照明。一直没有安装。昨天安装之后。 发现homebridge-aqara 能吧双开单独控制。这个是一个惊喜。SnOOrz 这个homebridge-aqara 真心很棒。但是我现在的问题是:
因为双开默认只能作为灯的类型来使用。请问是否可以 让这个86双开或者单开增加 选择类型。比如 它可以是 排气扇 之前用 小米自带的路由器插件 homekit 是可以选择的。但是小米路由器homekit 有很大局限性。选择使用树莓派来作为 控制关网。 不懂代码的我。真心看不懂楼主些的这个!@#!#@!#
希望你能把这个灯增加一个类型选择。

Xiaomi ZigBee Plug doesn't work properly

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.

No light switch

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"]
}
]

No password for 158d00011*****, please edit ~/.homebridge/config.json

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.

No support for 86 Switch

tb1dtn9npxxxxcyaxxxxxxxxxxx_ 0-item_pic jpg_430x430q90

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

  • channel_0: click, double_click
  • channel_1: click, double_click
  • dual_channel: both_click

Node-red

What abot a node-red plugin for aqara gateway ?

Regards
Alessandro

Home assistant

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.

Gateway password not needed for getting sensor data?

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:

  1. Any device on the same network can read the sensor data.
  2. Anyone on the same network can spoof the gateway by sending fake sensor data.

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?

Problem with port

Hi!
Tried to use homebridge-aqara, but faced with a problem.

  1. If I do everything out-of-the-box, then I see 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.
  2. If I change serverPort in AqaraPlatform.js, then plugin starts well, but after receiving initial data from sensors do nothing. I mean, I get proper states of all sensors right after starting homebridge, but then I get no updates, even if sensors changed their state. Both at Home app on iOS device and in homebridge log sensor's state doesn't change.
    What could be wrong?
    I checked with lsof if some other apps use 9898 port, but nothing.
    I run homebridge on macOS, all devices are in same network, all preparations (getting Gateway sid, password, enabling local network) are done correctly. Homebridge-hue plugin works without issues.

Internal LED Support

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?

Devices Discovery

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

Not able to interact with my aqara objects

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

img_2341
img_2339

温湿度传感器温度部分未响应

Home App 刷新状态后 温湿度传感温度部分未响应 湿度正常 米家 App 中两者均可以正确显示 重启 Homebridge 问题解决 刷新后再次失效

Magnet returns "open" when gateway is blocked from the internet.

Out of privacy reasons I blocked the gateway from accessing the internet via my router, now the gateway behaves odd in 3 ways:

  1. Door magnet sensor returns "open" after it's been closed for an hour and stays in that state. Opening and closing the door corrects the status but after another hour the sensor returns "open" again.
  2. When turning on the gateway light, by pressing the button, the light turns on as it should but after a few minutes the light is turned off and replaced by blue blinking.
  3. Occasional blue blinking (surely to tell that it has no internet access)

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?

86sw2 !

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

Lost the ability to read 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:

  1. removed all the files in /accessories
  2. removed all the files in /persist
  3. changed the name of the bridge in config.json
    The sensor showed up, shows humidity without problems, but not the temperature.

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?

TypeError: Cannot read property 'sid' of null

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"]
},

Error on startup

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

is it possible to get power consumption info of zigbee plug

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.

Eve shows door opening - no scene triggered

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?

Plugin compatibility with non Zigbee Power Plug and Strip

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.