Commit Graph
16407 Commits
Author SHA1 Message Date
Thomas Kuehne 5c3183d36c git: reduce exposure risk for local secret 2026-06-14 10:31:02 +00:00
duhowandJosé Rebelo 0fd997ccaf add comment for find device 2026-06-14 10:34:05 +02:00
duhowandJosé Rebelo 89ca02fa59 restore comments 2026-06-14 10:34:05 +02:00
duhowandJosé Rebelo afbf2df4c6 move message functions, refactor into Abstract Protocol 2026-06-14 10:34:05 +02:00
duhowandJosé Rebelo 9fd323789e refactor: add protocol implementation and command variables 2026-06-14 10:34:05 +02:00
José Rebelo cb5c820f4f Merge pull request 'Health Connect: Recover late-arriving step samples to fix step count discrepancies' (#6215)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6215
2026-06-14 00:55:52 +02:00
José Rebelo 0c71905c6c Merge pull request 'Health Connect: Harden sync-start selection against non-positive sample timestamps' (#6207)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6207
2026-06-13 19:50:12 +02:00
Spiralo-IdioideandJosé Rebelo 12605bd749 Intent extra handling : Use instanceof pattern matching 2026-06-13 19:46:32 +02:00
Spiralo-IdioideandJosé Rebelo 602e4e15b2 BangleJs : Added support for different data types in intent extras 2026-06-13 19:46:32 +02:00
José Rebelo 0a0dd83220 FitPro: Add camera 2026-06-13 17:31:22 +01:00
José Rebelo 5e9e0c05e2 Xiaomi-protobuf: Keep notification IDs on reconnection (#6265)
Otherwise we stop being able to remove notifications.
2026-06-13 17:10:01 +01:00
dependency-botandJosé Rebelo 8a94075274 fix(deps): update protobuf to v4.35.1 2026-06-13 16:01:08 +01:00
dependency-botandJosé Rebelo f6abba980c Update okhttp monorepo to v5.4.0 2026-06-13 16:59:57 +02:00
duhowandJosé Rebelo 25974bc504 add device name to test 2026-06-13 16:43:12 +02:00
duhowandJosé Rebelo 62105fbbf2 FitPro: Add support for Yell Smart Watch GT3 2026-06-13 16:43:12 +02:00
José Rebelo 0fbd839530 Merge pull request 'cherry picks for Zepp OS weather (#5653)' (#6260)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6260
2026-06-13 16:41:23 +02:00
NTeditorandJosé Rebelo 62406519d1 Add realme Buds T100/T200/T300 to AbstractDeviceCoordinatorTest.deviceMatchingByNameTest 2026-06-13 16:38:37 +02:00
NTeditorandJosé Rebelo 9699282038 Add find support for Realme Buds T200 2026-06-13 16:38:37 +02:00
NTeditorandJosé Rebelo 4a7ce22529 Add noise control touch configuration for Realme Buds T200 2026-06-13 16:38:37 +02:00
NTeditorandJosé Rebelo 90725ad70e Added basic support for Realme Buds T200 2026-06-13 16:38:37 +02:00
José Rebelo 438eb1b80f Merge pull request 'fix typos in device independent comments' (#6279)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6279
2026-06-13 16:33:49 +02:00
Gideon Zenz d4c36e2e36 Health Connect: Exclude bad-measurement sentinels from HR and SpO2 sync
PR #6195 widened the syncer guards to match Health Connect's enforced
bounds, but widened too much: it overlooked that some of Gadgetbridge's
in-band sentinel values fall inside HC's accepted range, so placeholder
readings leaked into Health Connect and showed up as spurious data points.

- HeartRate / RestingHeartRate: 255 is GB's "illegal value" marker for a
  bad measurement (ActivitySample.getHeartRate), and it sits inside HC's
  1..300 / 0..300 range. Exclude it explicitly while keeping HC's bounds.
- SpO2: 0 means "not measured" (sample providers return null on 0 and all
  SpO2 charts filter getSpo2() > 0). Raise the lower bound to 1.

Add HeartRateSyncerTest covering the HeartRateSyncer.sync() path (sentinel
255 and 0 are not inserted; valid range passes) and extend
SyncerRangeValidationTest with the new boundaries.
2026-06-13 11:13:37 +02:00
Thomas Kuehne bb03a2d5eb fix typos in device independent comments 2026-06-12 14:23:06 +00:00
José Rebelo 1f65fc26eb Victron SmartShunt: Initial support 2026-06-11 21:34:11 +01:00
José Rebelo 82483cfee9 woodpecker: Restore missing files from pages repo 2026-06-10 21:46:28 +01:00
José Rebelo ca29c04b1d woodpecker: Add missing --upload-dir flag 2026-06-10 21:25:34 +01:00
José Rebelo 128854f4c6 woodpecker: Download git-pages-cli 2026-06-10 18:57:45 +01:00
José Rebelo b2871e300d woodpecker: Deploy nightly using git-pages 2026-06-10 16:44:41 +01:00
Thomas KuehneandJosé Rebelo 6ad6638605 fix device independent typos 2026-06-10 17:43:46 +02:00
José Rebelo fd03accd4c Xiaomi Smart Band 10 Pro: Experimental support 2026-06-08 21:09:15 +01:00
Arjan Schrijver a2c249b86e OpenTracks: Fix extra empty activitytrack and rare crash 2026-06-08 21:25:46 +02:00
Peter KandThomas Kuehne 35c3766f27 Zepp OS: emit skeleton responses for all v5 weather datasets
The Bip 6 widget shows "open Zepp to get weather" when our v5 response
omits or empty-stubs any dataset the firmware asked for. Fixes three gaps:

- Implement createDailyAirQuality with a 7-day skeleton (placeholder
  AQI 50, level "good"; real ingestion gated on WeatherSpec extension).
- Replace EmptyResponse "{}" for hourlyAirQuality and dailyTide with
  populated shape stubs (metadata + empty items list).
- Add a defensive else branch for unknown dataset names that returns a
  metadata+empty-items skeleton and logs the key at WARN, so future
  firmware additions surface in logs without silently dropping keys.

See docs/bip6-weather-widget-research.md for the diagnosis.

Source: https://github.com/PeterXMR/Gadgetbridge

(cherry picked from commit 8b9d4f319ecc69dcb3c9ebbe77c35a06df7ebbbc)
2026-06-07 05:32:51 +00:00
Peter KandThomas Kuehne 9b7d380257 Zepp OS: send real coordinates in v5 place response
The v5 place dataset hard-coded latitude/longitude to "0.0" and used a
constant locationKey "accu:123456", which prevented watches that were
never provisioned via the official Zepp app (Bip 6, Active 2, ...) from
accepting the response as authoritative — they treated the zero coords
as a missing-location signal and silently refused to display weather
(issue #5653).

- ZeppOsWeatherHandlerV5.createPlace: pull lat/lon from WeatherSpec
  when set, else fall back to the user-configured location pref. Format
  with Locale.ROOT and derive a stable per-location locationKey from a
  hash of the coords so the watch can dedupe responses.

- ZeppOsWeatherService.onSendWeather: same fallback chain for the
  CMD_SET_DEFAULT_LOCATION packet so the watch's default-location state
  is bootstrapped with real coordinates instead of "1.234,-5.678".

Refs #5653.

source: https://github.com/PeterXMR/Gadgetbridge

(cherry picked from commit be87ac3364fbf5725f43e3dbac87ef2e103fdd89)
2026-06-07 05:32:42 +00:00
José Rebelo ef7a297100 Merge pull request 'cherry picks from #5946' (#6237)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6237
2026-06-06 21:35:50 +02:00
Ingvar StepanyanandJosé Rebelo 9229239e7e Address review comments 2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo 3d48db83c9 Garmin: fix transfer notification leaks and stray pre-start posts
Three lifecycle bugs in GarminSupport's transferNotification:

* addFileToDownloadList incremented totalSize unconditionally, so a directory listing arriving on connect posted a notification with the unlocalised "Unknown transfer" fallback title before any transfer started.

* The start/finish pair gated on gbDevice.isBusy(), which other paths set and clear — start could be skipped while the matching finish ran anyway, or vice versa.

* dispose() didn't finish the notification, leaving it pinned after a mid-sync disconnect.

Gate the increments and the start/finish pair on the private isBusyFetching flag, and finish + clear the flag in dispose().
2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo 3b9b4126ba Workout list: live-refresh on ACTION_NEW_DATA without blink
Long-running per-line fetches (e.g. ExploreSync's catalog walk) hold the device's busy task for the entire session, so the busy→idle edge WorkoutListActivity refreshes on only fires at session end. Listen for ACTION_NEW_DATA too so each newly imported activity appears as it lands.

Add a silent loadSummaries path that skips the isLoading flips, and disable the RecyclerView change animator so the dashboard row's notifyItemChanged(0) doesn't cross-fade — both would otherwise read as a distracting blink during an active sync.
2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo c1946573fb Garmin: ExploreSync historical activity import
Wires the new ExploreSync sub-service into ProtocolBufferHandler and GarminSupport so a paired device's historical-line catalog can be fetched independently of FIT — which Garmin Connect Mobile irreversibly archives files out of after the first sync (see issues like #5694 and #5994). Activities the FIT path can no longer see become visible again here.

Each historical line is reconstructed into an ActivityTrack, written as GPX, and persisted as a BaseActivitySummary keyed on the first-point timestamp — the same surface FIT-imported workouts use, so UI and exporters need no ExploreSync awareness. GarminCoordinator now picks the activity track provider from the summary contents (gpxTrack vs rawDetailsPath) instead of hard-coding the FIT one.
2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo 1cfcd0772c Garmin: extract buildExportPath helper in GarminUtils
Three call sites (FileTransferHandler, FitImporter, GarminSupport) each open-coded the same [TYPE]/[YEAR]/[TYPE]_[timestamp]_[suffix] filename shape and re-created their own SimpleDateFormat. Hoist the formatters (now thread-safe DateTimeFormatter) and the path builder into GarminUtils as buildExportPath(type, instant, suffix, ext).

FitImporter's null-type fallback now uses "NULL" consistently for both directory and filename, fixing a latent NPE.
2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo 5b375b2bb8 Garmin: extract sendProtobufRequest helper
Every watch-bound Smart RPC site followed the same shape: sendOutgoingMessage(taskName, protocolBufferHandler.prepareProtobufRequest(payload)). Fold it into a single sendProtobufRequest(taskName, payload) on GarminSupport. No behaviour change.
2026-06-06 21:26:51 +02:00
Ingvar StepanyanandJosé Rebelo 32a18d8d81 Garmin: deduplicate degrees ↔ semicircles math in GarminUtils
The watch encodes lat/lon as signed 32-bit semicircles (1<<31 == 180°). Move the bidirectional conversion behind named helpers backed by a single constant, and migrate toLocationData and FieldDefinitionCoordinate onto them.
2026-06-06 21:26:51 +02:00
Thomas Kuehne 25e322ea9a IntentApiReceiver: enhance device specification in Intents
- harmonise extra `address` to `device` - the old extra `address` logs a warning but is still supported
- support optional `device` extra for action nodomain.freeyourgadget.gadgetbridge.command.ACTIVITY_SYNC
- support optional `device` extra for action nodomain.freeyourgadget.gadgetbridge.command.DEBUG_SEND_NOTIFICATION
- support optional `device` extra for action nodomain.freeyourgadget.gadgetbridge.command.DEBUG_INCOMING_CALL
- support optional `device` extra for action nodomain.freeyourgadget.gadgetbridge.command.DEBUG_END_CALL
- support ComponentName extras for action nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION
- code review

See Freeyourgadget/website#247 for the documentation update.
2026-06-06 18:03:48 +00:00
José Rebelo 7f755a6887 Merge pull request 'onTestNewFunction enhancements' (#6247)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6247
2026-06-06 10:00:07 +02:00
José Rebelo c186b45742 Merge pull request 'SMAQ2OSS: move SMAQ2OSSSupport to standard package' (#6242)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/6242
2026-06-06 09:47:56 +02:00
Thomas Kuehne bc20a1a874 onTestNewFunction enhancements
EventHandler.onTestNewFunction
- add optional `options` Bundle parameter for receiving arguments

intent nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION
- add optional String extra `address` to specify the MAC address of the target device
- add optional Bundle extra `options` to pass arguments to EventHandler.onTestNewFunction
- construct a synthetic `options` bundle if the `options` extra is missing but there are `options_...` extras

Global setting `Settings / Developer options / Intent API / Allow Debug Command` must be enabled and the device(s) connected for the following examples.

Example to trigger onTestNewFunction for all currently connected devices:
`adb shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION"`

Example to trigger onTestNewFunction for a specific device:
`adb shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION" --es address "12:34:56:78:9A:BC" `

Example to trigger onTestNewFunction for a specific device with an option Bundle containing float x=4.2 and integer array y=[1,2,3] extras:
`adb.exe shell am broadcast -p nodomain.freeyourgadget.gadgetbridge -a "nodomain.freeyourgadget.gadgetbridge.command.DEBUG_TEST_NEW_FUNCTION" --es address "31:31:43:30:40:07" --ef options_x 4.2 --eia options_y 1,2,3`

Extras for some other types can also be specified via command line. See https://developer.android.com/tools/adb#IntentSpec for details.
2026-06-06 07:28:51 +00:00
Thomas Kuehne 2407519e61 SMAQ2OSS: move SMAQ2OSSSupport to standard package 2026-06-06 00:41:59 +00:00
Gideon Zenz 8be39c99ea Health Connect: Advance sync cursor for temperature records
TemperatureSyncer is the only syncer implementing HealthConnectSyncer
directly instead of inheriting from AbstractTimeSampleSyncer or
AbstractActivitySampleSyncer, both of which populate latestRecordTimestamp
in their base sync(). Its hand-rolled sync() never set the field, so the
orchestrator had nothing to advance the persisted cursor with and the
TEMPERATURE cursor stayed pinned at its starting value. Every sync then
re-read from that frozen point to now and re-inserted the whole span; the
per-record clientRecordId dedup hid the duplicates in Health Connect, so it
was silent but re-inserted weeks of records on each run.

Return the furthest-forward edge of the inserted records (body record time,
skin record endTime) as latestRecordTimestamp on the success path. The no-op
early returns keep it null, which correctly holds the cursor, matching every
other syncer's "nothing synced" behaviour. The cursor self-heals on the next
successful sync; no reset needed.
2026-06-05 23:29:37 +02:00
José Rebelo f6fe89fcf0 Zepp OS: Limit number of weather items in V5 response 2026-06-05 21:28:33 +01:00
d3vv3andThomas Kuehne 0443798dd7 cherry pick from #5946: fix OpenTracks integration with all package names
(cherry picked from commit 0f4449cd87)
2026-06-05 15:50:44 +00:00
d3vv3andThomas Kuehne adbe6b9e1e cherry pick from #5946: support org.forkgram.messenger messenger
(cherry picked from commit 75052fc070)
2026-06-05 15:48:55 +00:00