Repository navigation
Measurements: add generic device source for wearable/sensor data - #2557
barkerd427 wants to merge 3 commits into
Conversation
|
Yes, this makes sense, and could be used by openScale or BLE Scale, which already have integration with wger. I'll have to check how we derive the read-only flag, that makes sense when the data comes (possibly aggregated) from health sync, but less so if it's from your own scale |
|
Thanks. I traced the read-only handling to save you the lookup. On the server, only That already does the right thing for |
|
alright, thanks for checking. Now that I think a bit more about this, it's also possible that users connect e.g. their scales to health sync, then we would want those editable as well. Perhaps just showing some kind of info in the ui is the better / more general solution here. In any case, that's ui thing, and has nothing to do with this pr :) |
# Conflicts: # CHANGELOG.md
Proposed Changes
Adds a generic
devicevalue toMeasurementSourcefor data written by a wearable or sensor app on the user's behalf. Migration 0009 only changes the field's choices.I'm writing heart rate from a Wear OS app into wger and didn't want to mark it as
googleorapple.devicekeeps the server from needing a source per vendor; the app can put vendor/model inextra_data.Nothing else changes.
deviceworks through/api/v2/measurement/and the PowerSync upload, filters with?source=device, dedupes on the existing(category, source, external_id)constraint, and gets the same limits as any other source. The Flutter app treatssourceas a plain string, so these rows just show up as imported entries.A bulk create endpoint would help for high-rate sensors, but that can be a separate PR.
Related Issue(s)
Related to #2417 and wger-project/flutter#1260.
Please check that the PR fulfills these requirements
ruff format && ruff check --fix)changes etc.), write a small writeup in
CHANGELOG.md