Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does the accel: Description: 'Accel. Light 5m' mean? #1

Open
christianchristensen opened this issue Sep 3, 2018 · 6 comments
Open

Comments

@christianchristensen
Copy link

Any ideas what this field might indicate?

Pulling this down as a decimal and plotting over time seems like it could be a percentage...
Based on the time-of day increase it almost looks like it could be light level?

chart
chart 1
chart 2

@marcelm
Copy link
Owner

marcelm commented Sep 16, 2018

I am so sorry I haven’t seen your comment before. I thought I would automatically receive notifications, but it seems that wasn’t the case.

Regarding your observation: I think you are absolutely right that this is some type of brightness!

How did you convert to a decimal? When I take the second byte of the Accel. Light 5m value and plot it, it looks like this:
brightness

The pattern is different, but the idea is the same: Very low values during the night, higher values during the day (tick marks are at midnight). The values aren’t percentages, however: As you can see, there’s a section with values above 100. Also, the pattern changed a couple of months ago, which probably coincided with me moving the device from one room to another, brighter one.

To test this, I shone a light on the Wave and ran the script just now. The value was 0 or 1 before and then went up to 157. After I switched it off, it decreased to 1 again. I think this is confirmed.

Now I wonder whether the first byte encodes acceleration, as the name of the characteristic would imply. It would make sense: Some radon meters are advertised as including an accelerometer for detecting whether the device has been moved. This is useful as tamper protection, for example, when someone wants to measure radon levels in a house they plan to buy while the seller still lives in it.

Thanks so much for finding this! I’m happy I put the script up as I’m now benefiting from it myself :-).

@marcelm
Copy link
Owner

marcelm commented Sep 16, 2018

Regarding (possibly) acceleration, here is how often which byte value occurs in one of my logs:

70 6658
F0 1231
71 14
F1 7
80 3
F6 2
B0 2
90 2
00 2
F3 1
E2 1
E0 1
DD 1
D0 1
61 1
50 1

When I shook the device for a couple of minutes, the value changed from 70 to 61, 81, 91, A1, and B1 over the course of a couple of minutes. After I stopped, the value continued to increase to C1, E1 and F1 over a couple more minutes.

Hm, I’ll try hanging it upside down or laying it flat on a table.

@christianchristensen
Copy link
Author

@marcelm Interesting. Thanks!

Some feedback based on this: I have my device mounted to the ceiling in my basement (similar to a smoke detector). The first two bytes have been 00 since I've started reading. Therefore my best guess on the last two bytes is that the brightness is not enough such that it has gone above 100...

I will point a light at it to test this and change the orientation to see if the first bytes change. Thanks indeed for posting this - it's been quite valuable!

@christianchristensen
Copy link
Author

Here's a sampling where I took the device from the ceiling and placed it on the floor; lights were turned off in the basement @ 01:28. Oddly, this reads every 20 minutes, so I would have expected the reading to switch immediately then stabilize, but there seems to be a transition over 2-3 readings (00,91,F1,F0). Could it be the accelerometer is the first 4 bits and the light is the last 12 bits?

Date Time Accel. Light
2018-09-17 22:32:03 0013
2018-09-17 22:52:07 0011
2018-09-17 23:12:11 0011
2018-09-17 23:32:15 0013
2018-09-17 23:52:19 0011
2018-09-18 00:12:24 0011
2018-09-18 00:32:27 0011
2018-09-18 00:52:36 9102
2018-09-18 01:12:39 F102
2018-09-18 01:32:45 F002
2018-09-18 01:52:49 F000
2018-09-18 02:12:56 F001
2018-09-18 02:33:01 F000

@marcelm
Copy link
Owner

marcelm commented Sep 18, 2018

I think you are right that bits 5-8 somehow have a different meaning, but I think it must be related to acceleration: I just moved the device a little bit (rotated it 90°) and then the Accel. Light value changed from 7000 to 7100. Since bit 8 changed (and the light is still off), I’d say that bits 5-8 belong to acceleration.

With this in mind, I looked at some measurements I made yesterday again. My best guess (but see below) is that bits 5-8 encode something like the number of times the device was moved over the last hour. This would explain why that part of the value stays constant for an hour and then resets to zero.

Time Accel. Light
2018-09-17 21:30:09 700F
2018-09-17 21:52:50 7012
2018-09-17 21:54:59 B401
2018-09-17 21:58:12 A400
2018-09-17 22:03:33 9400
2018-09-17 22:08:54 8401
2018-09-17 22:22:40 8400
2018-09-17 22:23:43 7401
2018-09-17 22:51:36 7401
2018-09-17 23:11:40 7002

Ok, while I wrote this, I noticed that the 7100 went back to 7000 already after something like 20 minutes, so it’s not that simple.

Oh, by the way, my device is positioned vertically (it hangs on the wall).

@marcelm
Copy link
Owner

marcelm commented Sep 18, 2018

I noticed that the radon level indicator ring would come on whenever I moved the device, so I tried to see whether that has any influence and indeed, without even touching the device, I can get the values to increase by just “waving”:

Time Accel. Light (first byte)
2018-09-18 23:15:44 C1
2018-09-18 23:16:00 C2
2018-09-18 23:16:45 D3
2018-09-18 23:18:11 D5
2018-09-18 23:19:49 E6
2018-09-18 23:20:18 E7
2018-09-18 23:20:31 E8
2018-09-18 23:21:01 E9
2018-09-18 23:21:58 EB
2018-09-18 23:22:12 EC
2018-09-18 23:22:40 ED
2018-09-18 23:24:51 EE
2018-09-18 23:25:31 FF

The value did not change strictly every time the indicator ring came on, but in most cases. The way this is increasing is a bit weird, possibly each nibble is a separate counter. Also, when it reached FF, the value wouldn’t change anymore even though the indicator ring still lit up.

So, possibly not acceleration after all, but then the question of course is why there is the “Accel.” in the name. And why the first byte is more or less stuck at 70 on my device.

I’ll probably have to take a break from playing with this, but will update the README as soon as I have time again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants