When I was working on blood oxygen levels (#2) I could see that there was a click
type event, but didn't have any examples of it in order to be able to implement support.
Whilst looking at some other stuff yesterday I observed an event
{
"items": [
{
"userId": "<redacted>",
"eventType": "blood_oxygen",
"subType": "click",
"timestamp": 1691081164000,
"timezone": "Europe/London",
"extra": "{\"appName\":\"com.huami.midong\",\"deviceId\":\"<redacted>\",\"deviceSource\":256,\"isAuto\":false,\"sn\":\"<redacted>\",\"spo2\":94,\"spo2History\":[93,94,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],\"timezone\":\"Europe/London\",\"timestamp\":1691081164000}"
}
]
}
So the format is pretty much the same as for osa_event
. The primary difference, though, is that spo2History
list
There are 60 entries in that list - could that be a minute per hour? Or is that maybe the history of manual reads?
#2 | Capture blood oxygen levels |
Activity
08-Aug-23 12:20
assigned to @btasker
08-Aug-23 12:27
I've just triggered another manual read to see if that turns up as a
click
event (and if it does, whether we get an extra entry in that list).Either way, we can extract the other data from the format
08-Aug-23 17:00
I've not had another
click
event show up in the feed yet. But, the timestamp on the one in the description does line up with when I clicked measure in #2Will build based on what we have.
08-Aug-23 17:07
I'm going to skip
spo2_history
for now - at least until we understand what it is (which will probably require a second example for comparison).That means we're adding a simple series
Fields:
spo2_level
(float)Tags
blood_event
:manual_read
08-Aug-23 17:09
mentioned in commit 8dceade9f937a986ab3cfaa7966a5114dd35ec78
Message
Record SPO2 level from
click
events (utilities/zepp_to_influxdb#6)The event does also have a
spo2_history
attribute, but it's not currently understood what the meaning/granularity of this is, so it's not being captured08-Aug-23 17:10
marked this issue as related to #2