Comments (12)
I don't think there should be any conflict since 0.1.12 of homebridge-aqara
. I'm unable to test this as I'm not a Homebridge or iOS user.
You can probably filter out devices in homebridge-miio
somehow as that library controls which devices it connects to and which ones it keeps being connected to. miio
in itself only provides the communication with the devices and doesn't provide any names.
Does removing the homebridge-miio
plugin help? If the Aqara-devices are still removed it might be an issue with homebridge-aqara
.
from miio.
From my experience, only one developer API connection can be established at given moment. Probably both pieces of software conflict since they both use developer connection
from miio.
@aholstenson thx for response. my suspicion cames from debug log. when i turn on debug, i found that miio library connect to gateway every five minutes. debug log is as followed:
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"iam","port":"9898","sid":"286c077773d6","model":
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV -> {"cmd":"get_id_list"}
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"get_id_list_ack","sid":"286c078883d6","token":"m
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV -> {"cmd":"read","sid":"286c078883d6"}
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV -> {"cmd":"read","sid":"158d00015618e0"}
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV -> {"cmd":"read","sid":"158d00015ae3d2"}
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV -> {"cmd":"read","sid":"158d00014cf5bf"}
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"read_ack","model":"gateway","sid":"286c078883d6"
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"read_ack","model":"sensor_ht","sid":"158d0001561
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795.158d00015618e0 Property temperature changed from undefined to 2
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795.158d00015618e0 Property humidity changed from undefined to 30.7
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"read_ack","model":"motion","sid":"158d00015ae3d2
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795.158d00015ae3d2 Property voltage changed from undefined to 3035
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795 DEV <- {"cmd":"read_ack","model":"ctrl_neutral1","sid":"158d000
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795.158d00014cf5bf Property channel_0 changed from undefined to fal
May 08 04:04:11 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:11 GMT miio.device.52232795.158d00014cf5bf Property power changed from undefined to [ false
May 08 04:04:13 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:13 GMT miio.packet -> <Buffer 21 31 00 60 00 00 00 00 03 49 bd df 00 14 b8 13 5c 26 6b 6a 6
May 08 04:04:13 rpb1 homebridge[1509]: Sun, 07 May 2017 20:04:13 GMT miio.device.55164383 -> (3) {"id":2426,"method":"get_prop","params":["power"]}
about message repeated every about five minutes.
i comment out some line in file models.js and the device didn't go off:
/usr/local/lib/node_modules/homebridge-miio/node_modules/miio/lib/models.js
//const Gateway = require('./devices/gateway');
//'lumi.gateway.v2': Gateway,
//'lumi.gateway.v3': Gateway,
after one night, the sensor and the siwtch remains.
from miio.
Thanks for debug log! There are two issues here I think:
-
That
homebridge-miio
connects to the gateway that often. Maybe @Bluebie has any ideas about what's happening there? -
That several instances can't talk with the gateway at the same time. I'll look into this and see what goes wrong with the local developer connection and if there is any way of having several instances talk to the API at the same time.
from miio.
Thx for response. after two nights, the devices didn't disappear from home app. maybe the problem is as @Gromina said that only one developer API connection can be established at given moment, and at a given point homebridge-aqara thinks that the devices is offline.
since miio library supports zigbee devices, it'll be great that if @Bluebie's homebridge-miio can support zigbee devices, and one plugin will cover all xiaomi devices.
from miio.
Good to hear! I'm currently looking at an alternative way to get the devices from the gateway so that I can avoid using most of the developer API.
For now I've found a call that will list the devices, but some more work is needed to figure out how to map those devices to proper implementations. Hoping to have something for testing soon though.
from miio.
since i have found the solution for the problem, i'll close the issue.
thx @aholstenson @Gromina.
from miio.
What's your solution?
I'm wondering. I've been same problem.
from miio.
@sankooki I think @fxdpz removed a few lines from homebridge-miio/node_modules/miio/lib/models.js
to disable the special handling of gateways in miio
. Those lines are should be the ones starting with lumi.gateway
.
If you are still having issues you should probably open an issue in the homebridge-miio repository so that it can be updated to avoid connecting to the gateway.
from miio.
I'm opening a new issue to track a new way to implement support for the Smart Home Gateway that should solve this issue in time. Please have a look at and follow #26 if you are interested in helping with that.
from miio.
@sankooki , what i did is as @aholstenson said.
from miio.
@aholstenson @fxdpz Thanks.
from miio.
Related Issues (20)
- Xiaomi Air Monitor cgllc.airm.cgdn1
- yeelight strip plus is supported?
- Canβt find Hub / Temperature-Sensors
- yeelink.light.color5 HOT 1
- Mi Smart LED Bulb (B22) - Support
- yeelink.light.mono6 HOT 1
- [add device request] yeelink.light.ceilb
- [add device request] yeelink.light.colorb
- -Bash: miio: command not found HOT 1
- doesn't work on Firmware version: 3.2.10
- Cannot connect to light after configuring wireless network HOT 1
- yeelink.light.bslamp2 HOT 2
- Create device with lib version >= 0.15.0
- Which devices can get tokens by "miio discover" or "mirobo discover --handshake 1"?
- Does this packge still getting maintained?
- Roborock S6 - 3.5.8._2902 - unsupported device
- colorTemperature2rgbUsingTH is not defined
- Device support [Vacum mop 2 ultra]
- Error connecting to device: Error: Call to device timed out
- Ib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miio.