Zigbee Questions Conbee 2 and Aqara Vibration Sensor

Hi everybody.

I have some questions regarding my Zigbee network in Nymea in combination with a Conbee 2 Zigbee stick (Dresden Elektronik):

  1. I use the Conbee 2 stick for my Nymea Zigbee network and everything is running fine.
    Today I wanted to update the Conbee 2 Stick with the latest firmware and didn’t know how to do that out of Nymea. So I installed the Phoscon/Deconz Software from Dresden Elektronik on the same Raspberry Pi Nymea is running. After enabling the Phoscon/Deconz with sudo systemctl enable deconz, I could open the Phoscon/Deconz app in my browser with http://nymea-ip/pwa, but after enabling deconz, my nymea Zigbee network was suddenly offline. I tried to reboot my maschine but that didn’t help either. So I had to delete my Zigbee Network and tried to set it up from scratch - the Conbee 2 itself was recognized by Nymea without any problem. But even when setting up a new network, Nymea always said Zigbee network offline and I also could not add any of my devices. So what I did then was first updating the Conbee 2 out of the Phoscon/Deconz App and then disabling deconz again with sudo systemctl disable deconz. After a reboot of my machine, everything was as before: Setting up my Zigbee network worked again without any problems.
    So my question is, if there is a method on how to update the Conbee 2 out of Nymea and/or if it is possible to run the Phoscon/Deconz app parallel to Nymea on the same maschine?

  2. I also have an Aqara Vibration Sensor which is noted in the Zigbee device support status list as working as expected (Zigbee device support status - Google Sheets). The sensor itself is recognized by Nymea in my Zigbee network. But under things, it can’t be found in the “sensor section” but in the “not categorized section”. And it doesn’t react to any kind of vibration - even when I shake it like mad, the Vibration detected status stays the same. I think this is bug. Maybe you can have a look.

By the way, I use the latest experimental builds for testing.

Thanks for your help.

Hi,

  1. Updating the ZigBee stick firmware directly with nymea is currently only implemented for the NXP backend. Also, it is not supported to run nymea and deconz in parallel (well, only if using the hue bridge emulation on deconz and adding it via the philipshue plugin, which probably is not what you want to do). However, just for updating the firmware it shouldn’t be necessary to actually run deconz. You can follow this guide to update: Update deCONZ manually · dresden-elektronik/deconz-rest-plugin Wiki · GitHub (instead of stopping and starting deconz in step 1 and 6, you stop and start nymead).
  2. Most definitely a bug, yes. We’ll be looking into it. Thanks.

I’ve just read through the code… Couldn’t spot an obvious mistake. Mind creating some logs please with the ZigbeeLumi category enabled? It should hopefully produce some debug message when detecting a vibration.

Also note that the message in the UI wouldn’t change, instead the LED indicator would briefly flash whenever it sends a vibration detected event.

Hi @mzanetti ,

thanks for your quick reply.

Regarding my first question, I will have a look and try that. Thanks! :+1:

Regarding my second question, what I see in the logs is the following:

I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 1
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 2
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 3
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 2
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 3
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 1
I | ZigbeeLumi: Thing(Vibration Sensor 01 Test, id: {eb66e278-8a29-45d3-91ec-8c0717e71378}, ThingClassId: {775be45e-08d8-4ae8-bc95-5721a5317856}) vibration attribute changed 2

So it seems that the vibration attribute changes somehow between 1, 2 and 3. But in the nymea gui, I definitely see no flash, the “Vibration detected” button always stays white.

And also under Protocol, I do not find any kind of vibration detected message.

Thanks!

I have found an issue why it doesn’t appear in the log. The fix is building in experimental.

However, I’m still not sure why the event doesn’t seem to be emitted altogether, because when this line is printed, the next one does emit the vibration event… My guess/hope right now would be that the flash in the LED is too short so it’s hard to see in this style… We will see when the logging is fixed in the next build.

The “Vibration detected” button in my Nymea system is only flashing briefly and barely noticeable with the Aqara sensor. I set up an automation rule that sends a push notification once the sensor triggers and that is working, if you move the sensor to some extend.

Hi @s05,
I have the vibration sensor and I’m implementing currently the rest functionality of the device. Will ping you here once the new code is in experimental. So far indeed any motion (vibration, tilde, drop) has notified as “vibration”.
Soon you have the angles and all 3 notifications for realizing your magic :slight_smile:

Out of curiosity, what is your use case for this sensor type?

This is great to hear @simon.stuerz. Looking forward to the implementation. Thought about putting it at a door as additional alarm device. Lets see, what the angles can provide.
@plasmediaX As you started this topic, what would be your use case for the sensor?

Same for me. I’m also looking forward to get this working. Thanks for your work on it, @simon.stuerz :+1:
My use case is similar to yours @s05. The idea behind is to put it on my windows to get an information if somebody tries to break the glass.

Here we go: interesting how good this actually works.
Using the script engine here could be done some fun stuff.

Depending on the cool use case we might find here we could also add an orientation state… something like:

  • horizontal
  • horizontal upside down
  • front up
  • bottom up

Just an idea…would that be usefull?

Build is currently running for experimental…

Hey @simon.stuerz,

That really sounds interesting… :+1:

For me, showing the vibration, tilt and drop detection states would already be more than helpful. But if the sensor also gives all the other information like angles or orientation state, why not showing it and having it available in Nymea? There always might be a possible usecase in future.

By the way, one small thing … Would it be possible to have the Aqara vibration sensor in Nymea as thing type „sensor“ instead of being located in the „not categorised“ section? I think it would fit better there. But only if it is not too much effort …

Thanks for your great work!

Just updated to the latest experimental. @simon.stuerz thank you very much for this update on the sensor.
The sensor is reporting drops, vibrations and tilts. Just have to see how those angles and axis fit the actual position and how accurate they really are.
Tilt changes are reported after each movement. There seems to be a timeout, where the sensor does not report the following action right after. Have to see, if that is network related or sensor related (like with the Aqara occupancy sensors). Does anyone else have these timeouts?
Is it possible to set the sensitivity level on the sensor via Nymea?

The build is done and should be in experimental online.

You mean having states, with timeout like presence detector? A vibration will be detected, a state goes true for some seconds, and then false, unless the vibration event occures again in the meantime? Same for tile detected and

Yes, that will be possible once we add an appropriate sensor interface for this case. Something like motion detector or IMU interface would be thinkable.

I think almost like the presence sensor, but motion instead of presence. with an optional orientation interface.

For me the x, y and z represent the absolute posion according to the gravitation vector.
Putting it on the table with:

  • icon up: z = 90°
  • icon down to the table: z= -89°

Somehow x and y don’t seem to be correct, they are 45 ° if the sensor icon is looking straight to me…need to check the x and y rotation vector

Yes, it’s more like: after a clear and finished motion the sensor send the event with the new angles. According to some other code there should be a strength value too, but I have not received it. The debug logs of ZigbeeLumi would print them if occurred.

fwiw, some reasearch revealed that setting the sensitivity would be supported by the device by writing the attribute 0xff0d of the Basic cluster with the manufacturerSpecific flag set to Lumi (0x115F). Values seem to be a range from 0x01 to 0x15.

interesting…need to have a look at that!

Ok, I updated the sensitivity settings, but with my sensor I just get Mac Layer errors…
very annoying those out of spec things.

But maybe I have an old version here of the hardware, would be nice if others could test it with their sensor (changing the sensitivity settings in the thing configuration while moving or rotating the sensor so it will be wake).

Also: @mzanetti added the vibration sensor interface, so the sensor will be shown under sensors with some nice UI starting with nymea 1.6.0 (or experimental in the next days) :slight_smile: