Could you enable debug from pimatic? Then you get more information about the error.
-
Aqara (Xiaomi) plugin (Released)
-
New release: when doing a device discovery in pimatic, the join/pairing mode on the gateway will be enabled to include new devices.
@koffienl I think removing device is not needed, because when you press the pair button on a sensor for 5 seconds, it will be removed from the gateway.
-
Wasn’t aware of that? Sounds like a unwanted feature toe me to be honest
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
Could you enable debug from pimatic? Then you get more information about the error.
As far as I can see, debug is on…
{ "password": "C8D582BD46A@@@@@", "plugin": "aqara", "active": true, "debug": true } ],
And for the Pimatic part:
"messageLogging": [ { "level": "*", "tags": [], "expire": "7d" }, { "level": "debug", "tags": [], "expire": "0" } ] },
All I get is the above… -
@mr-smith debug from pimatic itself must be enabled, see menu > configuration
-
@koffienl yea, the wall switch doesn’t have a dedicated pair button, it uses the switch itself, so if you press it to long it stops working
-
Can you recommend the wall switch? Is it able to switch even if the gateway is offline? Does it need three wires to work?
-
@georg90 I have the wireless version, so on batteries and no connection to a real light.
But I can tell you it always need 3 wires and it will work when the gateway is offline.
It will probably not fit in to your wall because its square, whole Europe is round I guess? at least in holland.I also released a new version again, there were some bugs in the auto discovery.
-
Started testing / playing with the plugin. Looks nice, great job!
I have a brand new pimatic setup. Enabled debugging in pimatic and the plugin but can’t see any debug messages?{ "settings": { "debug": true, "httpServer": { "enabled": true, "port": 81 }, .... { "password": "xxx", "debug": true, "plugin": "aqara", "active": true }
From the logfile:
10:16:53.529 [pimatic] info: Starting pimatic version 0.9.42 10:16:53.764 [pimatic] debug: settings.debug is true, showing debug output for pimatic core. 10:16:55.393 [pimatic, ppm] info: 2.15.12 10:16:55.446 [pimatic] info: Loading plugin: "pimatic-cron" (0.8.8) 10:16:55.833 [pimatic] info: Loading plugin: "pimatic-mobile-frontend" (0.9.12) 10:16:56.444 [pimatic] info: Loading plugin: "pimatic-aqara" (0.2.13) 10:16:56.446 [pimatic] debug: debug is true in plugin config, showing debug output for pimatic-aqara. 10:16:56.527 [pimatic-cron] info: the time is: Tue Mar 13 2018 10:16:56 GMT+0000 (UTC) 10:16:56.539 [pimatic-aqara] debug: Searching for gateway... 10:16:56.809 [pimatic] info: New device "pir_overloop"... 10:16:56.854 [pimatic] info: New device "pir_hal"... 10:16:56.883 [pimatic] info: New device "pir_woonkamer"... 10:16:56.942 [pimatic-aqara] info: Gateway discovered 10:16:57.153 [pimatic-mobile-frontend] info: packing static assets 10:16:57.557 [pimatic-mobile-frontend] info: packing static assets finished 10:16:57.569 [pimatic-mobile-frontend] info: rendering html 10:17:05.320 [pimatic-mobile-frontend] info: rendering html finished 10:17:05.360 [pimatic] info: Listening for HTTP-request on port 81... 10:17:05.371 [pimatic-aqara] debug: Gateway is ready
Do you actively ask for connected sensor status when the plugin is started?
"cmd": "get_id_list", sid: sid}
followed by (for each sensor):
{"cmd": "read", "sid": device_sid}
But I noticed some strange info about my PIR’s.
PIR1 battery level according to looking into the gateway multicast traffic : 3005 mV
PIR2 battery level according to looking into the gateway multicast traffic : 3045 mVPIR1 battery level according to plugin : 49%
PIR1 battery level according to plugin : 39%Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
I think I’ve removed some debug messages in the latest release.
get_id_list is only triggered on startup of pimatic and when discovering devices.
Battery levels are calculated by the package (aqara-lumi), havent changed that, looks like thats not working properly. The package works, but its not great so we have to improve it.
var SUBDEVICE_MIN_VOLT = 2800; var SUBDEVICE_MAX_VOLT = 3200; return Math.round((SUBDEVICE_MAX_VOLT - this._voltage) / (SUBDEVICE_MAX_VOLT - SUBDEVICE_MIN_VOLT) * 100);
this is how the battery value is calculated right now.
-
Request : could you add the gateway as possible Aqara device class as well ?
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
Fixed battery level, will be in next release.
I can add the gateway, what should be possible with the device? Don’t know if I get everything working.
Edit: I already have a function to get all the devices with
@board.gateway.getDevices()
there is also an event listener to get these devices@board.on("discovered", function)
will be called if the gateway sends the device list.This is only used in the discover function, should I use it to get status of devices every hour or so?
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
Fixed battery level, will be in next release.
I can add the gateway, what should be possible with the device? Don’t know if I get everything working.
Great!
For the gateway:- its ping
- lux level
- Illumination level
- RGB status
All these values are automaticly published by the gateway itself
edit: and if possible for gateway and PIR: a sparkline on the GUI
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl sparkline for the lux level? thats easy, disabled it now, maybe it should be configurable.
Which gateway do you have? mine does not have lux.
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
@koffienl sparkline for the lux level? thats easy, disabled it now, maybe it should be configurable.
Which gateway do you have? mine does not have lux.
I have the v2 gateway, the round one with speaker. As far as I know all gateways have lux levels. Lux is published every hour if I remember and when the RGB leds change.
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
I also have the V2, this is what I receive:
{ cmd: 'read_ack', model: 'gateway', sid: '7811dcb2662b', short_id: 0, data: '{"rgb":0,"illumination":347,"proto_version":"1.0.9"}' }
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
I also have the V2, this is what I receive:
{ cmd: 'read_ack', model: 'gateway', sid: '7811dcb2662b', short_id: 0, data: '{"rgb":0,"illumination":347,"proto_version":"1.0.9"}' }
When changing the RGB led, I get this confirmation on the multicast:
{u'model': u'gateway', u'cmd': u'report', u'data': u'{"rgb":1694435840,"illumination":298}', u'short_id': 0, u'sid': u'34ce0091f540'}
Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
So no lux and ping.
-
@sweebee said in Aqara (Xiaomi) plugin (Released):
So no lux and ping.
Sorry, lux is name ‘illumination’ on the gateway
With ping I mean the heartbeat the gateway send:
{u'short_id': u'0', u'cmd': u'heartbeat', u'token': u'xxx', u'sid': u'34ce0091f540', u'model': u'gateway', u'data': u'{"ip":"192.168.2.226"}'}
Other question : by default you change the presence to absent after 30 seconds, why don’t you change this when the sensor updates a
no_motion
level?Like my projects and help? Consider donating electroneum etnjwAKGPqF6omQWRmpp9u2BPyVDG9VuyRQjNJ1S8yfBdfR9qeUQ46kRy8KS2CNqbpNLRrsgmNW6F2TMzxmZgPrh6KctrkrYbm
-
@koffienl no_motion gets triggered at 120s, way to long for me. But you can change that yourself. if you set it higher that 120s it will also reset it when the gateway sends no_motion.
Are you sure its illumination? because mine is always around 300 while its pitch dark in the room where it is.