SELECT mean("spo2") AS "mean_spo2"
FROM "testing_db"."autogen"."gadgetbridge" WHERE time > :dashboardTime: AND time < :upperDashboardTime: GROUP BY time(:interval:) FILL(null)
Has successfully retrieved my measurement. In theory, the watch should automatically take some measurements overnight as well.
Checking this morning, the watch hasn't taken any automatic measurements - I guess that feature's not active on the watch. Unfortunately, there isn't an option (in GB or on the watch) to enable it.
Looking in the DB though, I can actually see historic values in there from manual samples too
sqlite> select * from HUAMI_SPO2_SAMPLE;
1691081164000|1|1|0|94
1691497155000|1|1|0|94
1693046180000|1|1|0|97
1693069035000|1|1|0|97
I've come up with a crazy plan to try and enable the feature, at least for long enough to test, so I'll hold this open for the time being.
Activity
26-Aug-23 16:55
assigned to @btasker
26-Aug-23 16:56
Enabling
26-Aug-23 17:30
Had done a manual blood oxygen measurement on the watch, but nothing came through.
It's because I hadn't enabled intents for the device:
Allow 3rd part apps to change settings
Then re-ran the
am broadcast
.This time when hitting Sync in GB, I saw "Fetching SpO2 data" flash up.
Running the script retrieved the data, but looks like this uses ms timestamps too
26-Aug-23 17:31
mentioned in commit 8ec93500d745ca2124865b76265b058fa990a2cd
Message
SpO2 data uses ms timestamps (utilities/gadgetbridge_to_influxdb#10)
26-Aug-23 17:32
With that fix in place, the following
Has successfully retrieved my measurement. In theory, the watch should automatically take some measurements overnight as well.
27-Aug-23 10:21
Checking this morning, the watch hasn't taken any automatic measurements - I guess that feature's not active on the watch. Unfortunately, there isn't an option (in GB or on the watch) to enable it.
Looking in the DB though, I can actually see historic values in there from manual samples too
I've come up with a crazy plan to try and enable the feature, at least for long enough to test, so I'll hold this open for the time being.
28-Aug-23 13:35
I played around in the
Zepp
app, but couldn't find an option to enable automatic SpO2 readings (I was sure I'd seen one though).Useful point of info: Gadgetbridge only updates config items that it knows about, so changes made via Zepp can persist.
I'm going to close this as done: the SpO2 support that the watch has seems to be working just fine.
27-Feb-24 08:51
mentioned in issue #16