Position or rotation sensing?

Is RuuviTag device supposed to detect position/rotation or just acceleration/movement? I attached the device to the top right corner of the door. So the device is in vertical position (like car tyres when rolling). When I open the door (90 degrees) the AccX/Y/Z values in the Ruuvi Station app are about the same in the end.

Hey Hanski,

The Ruuvitag only measures acceleration/movement.

Some rotation could be made it the tag if the tag was to rotate like a wheel as some of the values would then be different from the original reading.

However placing on a door the movement will be detected but as soon as the door has stopped moving the readings should stabilise to the original readings that were seen before the door was opened.

Hello,

It’s also possible to use movement counter to detect if there has been any activity at the door. We’re also planning to add support for Hall sensor on RuuviTag which would let you have a door magnet detection, but there’s no schedule for it yet.

1 Like

I thought that Ruuvi Station uses that already(?). It did not give any alert if slowly opening the door.

Yes, if you’re having a tag with 2.x or 3.x firmware sending data in RAWv2. You can check the firmware version with NFC, if green led is blinking the data is sent in RAWv2.

The detection threshold is 64 mg, so it’s also possible that opening the door really slowly is under that threshold and you’d need a Hall sensor.

1 Like

I just got a new RuuviTag but I will check the FW version (I think there was a red led blinking…).

I updated FW to v3.28.13, but still does not work reliably. Looks like the accelerometer is just not sensitive enough to detect slow motion.

It might also be that the threshold setting is too high on your use case, it’s always a compromise between false positives and negatives. The default FW version defines threshold here: https://github.com/ruuvi/ruuvi.firmware.c/blob/4a1b1057fe5f63b1e91076023bd7e8910bb84241/src/application_config/application_config.h#L88

In my configuration even slow motion is detected very well. I tested to open door slowly and just a bit and it was enough to trigger motion.

Ok. Can you detect that with Ruuvi Station (Android)?

Yes, it was also detected using Android. Very slow motion is not detected accurately but normal door opening is detected. Tag is opposite side of hinges. In my case I have not seen that any normal door opening would have not been detected :confused:

That is about the experience I got also. To reliably to detect a slow door opening, I guess, we would need a gyroscope or a magnetometer.

@otso how is this threshold changed? Where in the firmware? What are the allowable values? Once I change it, how do I flash it to Ruuvi?

Thank you

Have you seen:
MyBeacons Door Monitor

1 Like

in config file:

The threshold is calculated as “at least this much”, next value will be selected by firmware if sensor does not support value selected. The resolution is the least significant bit of accelerometer at selected range, 4 mG at 2 G range if I recall correctly. Maximum is half of full range if I recall correctly.

The DFU package generation scripts are at ruuvi.firmware.c/src/targets/ruuvitag_b/armgcc at master · ruuvi/ruuvi.firmware.c · GitHub, you can just commit your changes to git and run “make” at src folder. It will generate the packages for you, named after the git commit or tag name if you have tagged the commit.

@otso outstanding. Thank you very much for the reply and information. I will give it a go