sweebee / pimatic-aqara Goto Github PK
View Code? Open in Web Editor NEWPlugin for the Aqara (Xiaomi) gateway
License: GNU General Public License v2.0
Plugin for the Aqara (Xiaomi) gateway
License: GNU General Public License v2.0
Sometimes pimatic and the aqara gateway loose connection, it is reenabled with a restart (since pimatic does a broadcast scan for the gateway) - can this be automated if there was no message from the gateway for X seconds or no ping package?
Anybody can point me in the right direction I am willing to take a look into this and push a PR.
Hi, I get this when I start Pimatic with Debug in the Aqara Plugin enabled:
21:46:45.464 [pimatic] info: Loading plugin: "pimatic-aqara" (0.4.4)
21:46:45.469 [pimatic] debug: debug is true in plugin config, showing debug output for pimatic-aqara.
21:46:45.495 [pimatic] error: this is not a typed array.
21:46:45.538 [pimatic] debug: TypeError: this is not a typed array.
21:46:45.538 [pimatic] debug:> at Function.from (native)
21:46:45.538 [pimatic] debug:> at Object. (/home/pi/pimatic-app/node_modules/pimatic-aqara/lumi-aqara/constants.js:6:23)
21:46:45.538 [pimatic] debug:> at Module._compile (module.js:409:26)
21:46:45.538 [pimatic] debug:> at Object.Module._extensions..js (module.js:416:10)
21:46:45.538 [pimatic] debug:> at Module.load (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
21:46:45.538 [pimatic] debug:> at Function.Module._load (module.js:300:12)
21:46:45.538 [pimatic] debug:> at Module.require (module.js:353:17)
21:46:45.538 [pimatic] debug:> at require (internal/module.js:12:17)
21:46:45.538 [pimatic] debug:> at Object. (/home/pi/pimatic-app/node_modules/pimatic-aqara/lumi-aqara/index.js:15:16)
21:46:45.538 [pimatic] debug:> at Module._compile (module.js:409:26)
21:46:45.538 [pimatic] debug:> at Object.Module._extensions..js (module.js:416:10)
21:46:45.538 [pimatic] debug:> at Module.load (/home/pi/pimatic-app/node_modules/pimatic-lcd/node_modules/i2c-lcd/node_modules/i2c/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
21:46:45.538 [pimatic] debug:> at Function.Module._load (module.js:300:12)
21:46:45.538 [pimatic] debug:> at Module.require (module.js:353:17)
21:46:45.538 [pimatic] debug:> at require (internal/module.js:12:17)
21:46:45.538 [pimatic] debug:> at module.exports (/home/pi/pimatic-app/node_modules/pimatic-aqara/aqara.coffee:5:15)
21:46:45.538 [pimatic] debug:> at PluginManager.loadPlugin (/home/pi/pimatic-app/node_modules/pimatic/lib/plugins.coffee:83:16)
21:46:45.538 [pimatic] debug:> at /home/pi/pimatic-app/node_modules/pimatic/lib/plugins.coffee:485:25
21:46:45.538 [pimatic] debug:> at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)
21:46:45.538 [pimatic] debug:> at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:512:31)
21:46:45.538 [pimatic] debug:> at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:569:18)
21:46:45.538 [pimatic] debug:> at Promise._settlePromiseCtx (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:606:10)
21:46:45.538 [pimatic] debug:> at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:138:12)
21:46:45.538 [pimatic] debug:> at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10)
21:46:45.538 [pimatic] debug:> at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14)
21:46:45.538 [pimatic] debug:> at processImmediate [as _immediateCallback] (timers.js:383:17)
I checked the password and it should be ok, what I was wondering: Do I never have to enter the IP of the gateway anywhere?
Seems the plugin has problems to handle more then 20 sensors. The first 20 works fine. I have 22 sensors the last two sensors are not recognized by the plugin after pimatic startup. However the MiHome app shows state change of the sensor. It has no difference which kind of device is the last one. Same problem occurs with buttons and door sensors. There is no debug output for faulty sensors.
To get it running it was necessary to make a device discovery. After this all sensors work as expected.
See as well here.
Bye,
0rTiN
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.