-
Notifications
You must be signed in to change notification settings - Fork 72.9k
Description
This is a sister issue to nightscout/AndroidAPS#4497
Is your feature request related to a problem? Please describe.
I would like my stepcount and heartrate data accessible with my nightscout data. Whether it gets used or even displayed in Nightscout is up for further discussion, but as a datastore, Nightscout is perfect.
Describe the solution you'd like
Currently APIv1 supports the activity collection, but APIv3 does not.
I would like to see APIv3 extended to support the activity collection.
Describe alternatives you've considered
I have already implemented a feature in in AndroidAPS that posts HeartRate and StepCounts to my nightscout instance via the entries collection.
I believe entries to be a reasonable container for activity data -- Steps and heartrate data are more akin to sgv readings than they are to Treatments.
Since APIv3 supports a polymorphic entries collection, this works today with no code changes.
In my current implementation, the documents in entries look like:
"_id": "696a32794c93b0e629ce980b",
"app": "AAPS",
"date": 1768566798319,
"device": "Mobvoi TicWatch Pro 5",
"heartrate": 70,
"identifier": "HR_1768566798319",
"isReadOnly": false,
"isValid": true,
"type": "activity",
"utcOffset": -300,
"created_at": "2026-01-16T12:33:18.319Z",
"srvModified": 1768568018146,
"srvCreated": 1768567417676,
"subject": "AAPS",
"modifiedBy": "AAPS"
}
{
"_id": "696873584347a45c6a678389",
"app": "AAPS",
"date": 1768442858239,
"device": "Mobvoi TicWatch Pro 5",
"identifier": "STEPS_1768442858239",
"isReadOnly": false,
"isValid": true,
"steps": 18,
"type": "activity",
"utcOffset": -300,
"created_at": "2026-01-15T02:07:38.239Z",
"srvModified": 1768453100981,
"srvCreated": 1768452952250,
"subject": "AAPS",
"modifiedBy": "AAPS"
}
Additional context
I would like some discussion: Are there any philosophical objections to my current implementation (entries colleciton, no code changes required to support the feature) or would it be preferable to extend nightscout apiv3 and use the existing activity collection?