1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 10:05:49 +01:00
Commit Graph

11786 Commits

Author SHA1 Message Date
Andreas Shimokawa
3ef6f092b3 Marstek B2500: allow setting and getting manual/automatic mode
we do not support the smartmeter though
2024-12-21 23:25:41 +01:00
Andreas Shimokawa
225ee7a248 Marstek B2500: set as experimental 2024-12-21 23:25:41 +01:00
Andreas Shimokawa
916368c05f Marstek B2500: support battery level display and reboot. Decode some more stuff 2024-12-21 23:25:41 +01:00
Andreas Shimokawa
f79930fad9 Marstek B2500: initial support
Supported
- setting the time
- setting/getting the minimum charge of the battery that shall remain
- setting/getting 5 time intervals with output wattage and enable/disable switch
- getting the firmware version

TODO:
- check if times overlap
- check if we can output less than 80W (offical app only supports 80-800)
- research about the "automatic mode"
- research about unknown values we get from the two info calls

This has been tested with Firmware V220
I only have a very brief capture of V210 which obviously had less feature. I tried to somehow support it but I am not sure
2024-12-21 23:25:38 +01:00
Arjan Schrijver
7ff1e87ea8 About screen: Copy build details on tap 2024-12-21 23:07:50 +01:00
Unpublished
31c85be5a0 Colmi R0x: Read charging state from battery notification 2024-12-21 18:57:48 +01:00
Jisakiel
416631e028 Cleanup unneeded imports & fix missing one on Casio 5600
Side effect of last minute fixes on it.
2024-12-21 00:29:37 +00:00
Jisakiel
326b01c296 fix byte errors flagged by intellij in Casio code
since byte is signed, 0x81 and 0xff go out of range and need explicit casts for equal comparisons to work.
2024-12-20 23:43:55 +00:00
Jisakiel
960a864ea0 Casio ECB-S100 support
Lightly refactoring gwb5600 as a starting base, since the commands supported etc seem pretty similar. Using as well https://github.com/izivkov/GShockAPI as further reference for what is supported (which I tested with the watch) and the same commands.
2024-12-20 23:43:55 +00:00
AndrewP
bac9c8b239 Activity icons for stretching, free training, outdoor walking and trail run 2024-12-20 13:59:59 +00:00
Sebastian Dröge
15fff6a38d Xiaomi: Parse max step rate in outdoor walking v2 parser for > v1 2024-12-20 13:26:13 +02:00
a0z
d6dee559f7 PAI fragment: update colors, replace piechart with gauge 2024-12-18 23:04:10 +00:00
Arjan Schrijver
2ec37fa77a Dashboard: Make today widget data loading more efficient 2024-12-18 23:30:59 +01:00
AndrewP
ae4079eb14 Max step rate for OutdoorWalkingV2Parser version 1 2024-12-18 21:41:25 +01:00
José Rebelo
f4bc2ed6af Zepp OS 3.5+: Fix notification vibration 2024-12-17 18:43:44 +00:00
José Rebelo
199a6835a2 Garmin: Add intensity minutes 2024-12-15 21:22:29 +00:00
Sebastian Dröge
396aa41647 Xiaomi: Add a comment about possible interpretation of unknown bytes in v5 freestyle activity parser
They're probably the same as for v8.
2024-12-15 20:39:27 +00:00
Sebastian Dröge
e9363ec51a Xiaomi: Parse configured time/calories goal for freestyle activity parser v5
They're parsed for other activities like this.
2024-12-15 20:39:27 +00:00
Sebastian Dröge
e249236873 Xiaomi: Parse more fields in freestyle activity parser for v8/9/10
Specifically: workout type, configured time/calories goal, workout load and vitality gain.
2024-12-15 20:39:27 +00:00
Martin.JM
600629e7ed Switch from kcal to cal in samples
This allows for higher precision in devices that support it.
2024-12-15 21:10:05 +01:00
Martin.JM
d807909b25 Huawei: Add calories support
These devices provide calories instead of kcal, which are rounded
per-sample, resulting in a slight difference from what is shown on the
device itself.
2024-12-15 21:08:49 +01:00
Sebastian Dröge
b31832a72e Xiaomi: Don't show heart rate avg/max/min duplicates of outdoor walking v2 in the UI 2024-12-15 15:16:02 +00:00
Sebastian Dröge
5781d5ac18 Xioami: Parse vitality gain and TRAINING_EFFECT_ANAEROBIC in outdoor walking v2 parser 2024-12-15 15:16:02 +00:00
Sebastian Dröge
0cdc0777c0 Xiaomi: Change recoveryValue to TRAINING_EFFECT_AEROBIC in outdoor walking v2 parser
That's how this value is treated elsewhere.
2024-12-15 15:16:02 +00:00
Sebastian Dröge
eb97208ca1 Xiaomi: Add a comment about possible interpretation of unknown bytes in v3 jump roping activity parser
They're probably the same as for v5.
2024-12-15 15:06:51 +00:00
Sebastian Dröge
8aac1f4f12 Xiaomi: Parse more fields for v5 jump roping parser
Specifically: aerobic training effect, recovery time, anaerobic training
effect, configured time/calories/jump goal, workout load and vitality
gain.
2024-12-15 15:06:51 +00:00
DeLoooping
59caecf717 fix calendar synchronization (#4403)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/4403
Co-authored-by: DeLoooping <cj-codeberg@loooping.de>
Co-committed-by: DeLoooping <cj-codeberg@loooping.de>
2024-12-14 15:53:55 +00:00
a0z
624deee7bc Sleep week fragment: resolve scroll issue 2024-12-14 16:39:48 +01:00
a0z
d1e19df3fe Sleep score: widget 2024-12-14 16:39:41 +01:00
José Rebelo
4374a61c40 TimeSampleProvider: Add getLatestSample(until) 2024-12-14 14:16:02 +00:00
José Rebelo
66457a76f9 Update protobuf to v4.29.1 2024-12-14 14:03:00 +00:00
dependency-bot
dc806c4226 Update android-emojify to v1.9.5 2024-12-14 14:01:58 +00:00
dependency-bot
c581aba998 Update androidx.camera to v1.4.1 2024-12-14 01:08:19 +00:00
Arjan Schrijver
c918765931 Fix app crash when switching between Android user profiles 2024-12-13 21:38:38 +01:00
Gordon Williams
839cbcd3e5 Bangle.js: Fix call notification in Turkish locale
Turns out toUpper/Lowercase use the current locale, so for Turkish, "INCOMING" turns into "ıncomıng" (the 'i' is different!)
2024-12-13 11:07:21 +00:00
José Rebelo
03eb303181 Garmin Fenix 7X: Initial support 2024-12-12 18:14:32 +00:00
Sebastian Dröge
43829d8f62 Xiaomi: Add support for parsing jump roping summary v5
It contains an extra unknown byte between the heartrates and heartrate
zone times.
2024-12-12 18:47:48 +02:00
José Rebelo
b754b595df Redmi Watch 5 Lite: Initial support 2024-12-11 22:47:11 +00:00
José Rebelo
a1d89e3e55 Amazfit Cheetah: Unmark as experimental (#4394) 2024-12-11 19:16:36 +00:00
AndrewP
cd7c7092b2 Xiaomi: Workout parser for jump roping (#4389)
workout parser for jump roping incl. new field names, units und a group

Co-authored-by: AndrewP <>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/4389
Co-authored-by: AndrewP <andrewp@noreply.codeberg.org>
Co-committed-by: AndrewP <andrewp@noreply.codeberg.org>
2024-12-07 18:16:04 +00:00
Martin.JM
c5714746fb Huawei: Initial Freebuds (5i) support 2024-12-06 23:23:46 +00:00
a0z
55238f4ee9 AbstractActivityChartFragment: heart rate gap support 2024-12-07 00:10:31 +01:00
a0z
c4e44df2c4 Workout heart rate chart: line chart gap instead of drawing when no data for longer than max gap 2024-12-07 00:04:47 +01:00
a0z
1b78ebfad9 Heart rate fragment: line chart gap instead of drawing when no data for longer than max data gap 2024-12-06 23:40:19 +01:00
AndrewP
c01607dc06 Xiaomi: Outdoor Cycling and GPX fix for Smart Band 8 Active 2024-12-06 19:21:01 +01:00
José Rebelo
32109507d9 Xiaomi-protobuf: Fix RR parsing
Thanks to nic8 on matrix for the fix.
2024-12-06 16:45:58 +00:00
José Rebelo
69847c19ff Xiaomi-protobuf: Persist heart pulse samples 2024-12-06 16:45:54 +00:00
José Rebelo
95b9009318 Garmin Instinct Solar: Add "Dual Power" version (#4380) 2024-12-06 16:42:19 +00:00
José Rebelo
4169c8319a Garmin: Add V0 characteristics
As seen in btsnoops from Vivovit / Forerunner 620
2024-12-05 18:35:10 +00:00
José Rebelo
a6de977d50 Garmin: Add support for V1 2024-12-05 18:35:00 +00:00
José Rebelo
ce126b805e Xiaomi-protobuf: Add resting HR 2024-12-05 18:33:34 +00:00
Gordon Williams
9a962bd495 Bangle.js: Support sending activity type from Bangle (#4323) 2024-12-05 09:31:07 +00:00
Simon Brand
6c7649264f Huawei: add Huawei Band 2 (Pro) 2024-12-05 07:00:08 +00:00
José Rebelo
d850439b4e Fix sleep score for current day 2024-12-05 06:56:14 +00:00
José Rebelo
2b4493eeb7 Oppo Headphones: Fix decoding of concatenated responses 2024-12-04 18:50:44 +00:00
José Rebelo
12671fb1e0 Oppo Enco Air2: Fix firmware parsing 2024-12-04 18:35:29 +00:00
Aike Seiko
6e3ce50221 Xiaomi: Print log message if cmd.hasSystem() returns true, otherwise cmd.getSystem() would not work in the first place. 2024-12-04 18:13:52 +00:00
Aike Seiko
b8990ecc31 Xiaomi: Add support for activating DND from watch 2024-12-04 18:13:52 +00:00
Aike Seiko
f8ebe19d4b Xiaomi: Add support to for command CMD_FIND_WATCH 2024-12-04 18:13:52 +00:00
Aike Seiko
9d5a02b0bf Fix typo in alarmClockRining lead to multiple field definitions 2024-12-04 18:12:18 +00:00
a0z
c3433f55cb Add sleep score to sleeping tabs for supported devices 2024-12-04 18:03:37 +00:00
Aike Seiko
51a3b5d036 MiBand9: Fix parsing of IndoorCycling 2024-12-04 17:22:51 +00:00
Arjan Schrijver
368cd88146 Colmi R0x: Add support for Colmi R09 2024-12-04 16:08:35 +01:00
Arjan Schrijver
98e9a0dbf0 Fossil/Skagen Gen. 6 Hybrids: Add SpO2 watchface widget 2024-12-04 14:34:39 +01:00
a0z
6a68071702 Workout page: hr zones add colors 2024-12-03 22:44:32 +00:00
José Rebelo
9748f389dd Xiaomi-protobuf: Fix activity sync stuck on duplicated or invalid files
Ref: #4305
2024-12-03 21:04:30 +00:00
MrYoranimo
44d50e6246 Xiaomi: implement requesting chunks for incomplete transactions
When using characteristics for communication with a Xiaomi protobuf
device, a chunked transaction could be sent out-of-sequence or
incomplete, which would result in either a corrupted payload or the
characteristic to halt because the device would not receive an
acknowledgement.

This changeset implements a map to store the received chunk data and
sequence number, that allows us to reassemble the payload in sequence
after confirming having received all chunks for the transaction. A list
of missing chunks is sent to the device if not all chunks have been
received and 5 seconds have passed since the last chunk was sent.
2024-12-03 19:23:26 +00:00
AndrewP
11ac1ed8bf Xiaomi: More workout types 2024-12-03 18:27:27 +01:00
Me7c7
5e81d1e4a2 Fix temperature layout 2024-12-02 08:58:28 +02:00
Me7c7
2a1e8e8651 Huawei: Obsolete temperature measurement description removed 2024-12-02 08:51:09 +02:00
Me7c7
922c4a19a9 Continuous temperature chart. 2024-12-02 08:51:09 +02:00
José Rebelo
92f1715b09 Hide respiratory rate tab if not supported 2024-12-01 19:12:27 +00:00
Me7c7
609a673dae Huawei: Little cleanups in P2P service 2024-12-01 17:57:27 +02:00
Me7c7
ed49f6d323 Huawei: Allow to sync more data over Dict P2P service 2024-12-01 17:48:45 +02:00
José Rebelo
86b51683d2 Respiratory rate: Swap awake and sleep order 2024-12-01 13:06:25 +00:00
José Rebelo
2e6552e3d5 Zepp OS: Fix respiratory rate being detected as awake 2024-12-01 13:06:25 +00:00
a0z
53ccae347d Respiratory rate: remove unused string, fix disappearing tabs bug 2024-12-01 13:06:25 +00:00
a0z
7e454a17ba Respiratory rate: use label, not value in tabs selection 2024-12-01 13:06:25 +00:00
a0z
a11f6871cd Respiratory rate: fix strings, margins, missing data on chart 2024-12-01 13:06:25 +00:00
a0z
9ae56ae88c Respiratory rate: init 2024-12-01 13:06:25 +00:00
Me7c7
7edb1f5941 Huawei: Added selecting for more than one item for music management 2024-12-01 13:03:23 +00:00
AndrewP
16a8efb7ee More workout types and parser for rowing and for treadmill 2024-12-01 13:00:43 +00:00
AndrewP
b5edfd8c17 A few additions and changes for Xiaomi Workouts 2024-12-01 13:00:43 +00:00
Benjamin Swartley
4f30648886 Fossil/Skagen Gen. 6 Hybrids: Add SpO2 Support 2024-11-30 15:45:45 -05:00
gjaekel
b3f29d16b3 Add support for XIAOMI Smart Band 9 Pro (MiBand9Pro) (#4363)
Co-authored-by: gjaekel <gjaekel@noreply.codeberg.org>
Co-committed-by: gjaekel <gjaekel@noreply.codeberg.org>
2024-11-29 22:24:52 +00:00
Martin.JM
55014fd13a Huawei: Fix notifications for Huawei Band 3 pro 2024-11-29 13:37:54 +01:00
Jonathan Gobbo
287a759e28 Add support for Redmi Buds 5 Pro (#4343)
This PR introduces support for the Redmi Buds 5 Pro earbuds.

Working:

- Connection and authentication;
- Firmware version;
- Battery percentage;
- Switching between ANC/Transparency/OFF, their relative strength settings and Adaptive ANC toggle;
- Configuring all touch options;
- Ear detection play/pause, Auto call answer, Double connection, Adaptive sound settings toggles;
- Equalizer presets and custom curve;

Not working:

- Personalized ANC (code for toggle is present but commented-out, as the logic for ear calibration is missing);
- Spatial Audio
- Find my earbuds
- Firmware Update

Closes #3566

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/4343
Co-authored-by: Jonathan Gobbo <jonathangobbo@outlook.it>
Co-committed-by: Jonathan Gobbo <jonathangobbo@outlook.it>
2024-11-28 18:16:17 +00:00
José Rebelo
9270bd9003 Oppo Enco Air2: Initial support 2024-11-27 22:43:42 +00:00
José Rebelo
93ed525a93 Garmin: Map missing realtime settings phone icon 2024-11-27 22:31:57 +00:00
Me7c7
f9d157ad51 Huawei: Allow more languages to be set on the watch 2024-11-27 19:20:19 +02:00
Me7c7
5a025d8d99 Huawei: Display maximum oxygen uptake if available 2024-11-26 21:54:02 +00:00
Me7c7
7b8f02ec29 Huawei: Collect and process more workout data: HRZones, RunPaceZones 2024-11-26 21:54:02 +00:00
Martin.JM
48a6e1aa95 Huawei: Fix for encrypted file downloads
Necessary for the Huawei Band 3 Pro GPS download.
2024-11-26 21:39:14 +00:00
Martin.JM
5e62bd3cc6 Huawei: Mark downloaded GPS file as complete only after parsing
Otherwise the icon does not show up in the workout list properly at
first.
2024-11-26 21:39:14 +00:00
Martin.JM
8746577c4e Huawei: Split off SyncState 2024-11-26 21:39:14 +00:00
Martin.JM
9970a37df3 Huawei: Use queue for downloading activity data
This also makes the sync button download both the activity and workout
data.
2024-11-26 21:39:14 +00:00
Martin.JM
3562eb69d0 Huawei: Add P2P to SyncState 2024-11-26 21:39:14 +00:00
Martin.JM
8bfbc07a45 Huawei: Cleanup of the HuaweiSupportProvider
Removes a lot of duplicate TODOs that mostly clutter the overview.

Also includes a couple of changes to please the linter.
2024-11-26 21:39:14 +00:00
José Rebelo
ee8eeaf16f Garmin: Improve logging if notification picture is not found 2024-11-26 21:28:08 +00:00
Me7c7
fab6a7bc7f Huawei: Fix encryption logic for files upload 2024-11-26 19:03:01 +02:00
José Rebelo
c687496cc5 Garmin: Send notification pictures 2024-11-25 18:16:11 +00:00
José Rebelo
ef3509446e Zepp OS: Remove notification picture paths on notification delete 2024-11-25 18:16:09 +00:00
Daniele Gobbetti
b70c2af117 Garmin: initial plumbing for notifications' images (blind implementation)
This commit adds the signaling of notifications with images to the watch.
According to https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/3469 the watch should followup with a protobuf request "MediaRequest".
The protobuf is documented in https://gadgetbridge.org/internals/specifics/garmin-protocol/#mediarequest

As examples and only intended to help further developments, two new methods getNotificationAttachmentPath and getNotificationAttachmentBitmap are added to GarminSupport
2024-11-25 18:16:07 +00:00
José Rebelo
4cf076b3fa Fix edge case where chart tabs were reset to single value on debug build 2024-11-24 21:33:36 +00:00
Arjan Schrijver
6f8fbd9b3c Add buttons to DebugActivity for Welcome and Permissions 2024-11-24 21:14:23 +01:00
Arjan Schrijver
765e6950dc Add preference migration for existing users 2024-11-24 21:14:23 +01:00
Arjan Schrijver
fc4fea35cd Scroll Notification and Overlay permissions screens to GB automatically 2024-11-24 21:14:22 +01:00
Arjan Schrijver
77d0d545c8 Make strings translatable 2024-11-24 21:14:22 +01:00
Arjan Schrijver
11f38aff15 Remove option to start first run screens from preferences 2024-11-24 21:14:22 +01:00
Arjan Schrijver
79a846a907 Add theme selector to first screen 2024-11-24 21:14:22 +01:00
Arjan Schrijver
20d6c87dd8 Improve background location permission request flow 2024-11-24 21:14:22 +01:00
Arjan Schrijver
20eb4bc922 Fix permissions list left margin 2024-11-24 21:14:22 +01:00
Arjan Schrijver
5a3bc94f86 Hide Permissions title when action bar is visible 2024-11-24 21:14:22 +01:00
Arjan Schrijver
b3b665ab6c Actually improve requesting all permissions 2024-11-24 21:14:22 +01:00
Arjan Schrijver
2422e02e5d Improve requesting all permissions 2024-11-24 21:14:22 +01:00
Arjan Schrijver
a889f671d7 Improve permissions descriptions 2024-11-24 21:14:22 +01:00
Arjan Schrijver
4c86c275f8 Fix missing permission request buttons 2024-11-24 21:14:22 +01:00
Arjan Schrijver
13c8061507 Add back permission explanation dialogs 2024-11-24 21:14:22 +01:00
Arjan Schrijver
1d330b2788 Improve "works locally" wording 2024-11-24 21:14:22 +01:00
Arjan Schrijver
a2e6009623 Make strings translatable 2024-11-24 21:14:22 +01:00
Arjan Schrijver
83b532e16e Reorder intro screen and use correct app_name 2024-11-24 21:14:22 +01:00
Arjan Schrijver
32c92c3533 Add First Start screens with permissions screen 2024-11-24 21:14:22 +01:00
José Rebelo
c52fd53ebd Garmin: Persist sleep score 2024-11-24 19:44:18 +00:00
José Rebelo
5531ddc49a Restore sleep balance on weekly and monthly charts 2024-11-24 18:36:20 +00:00
AndrewP
b2b79c99cd Workouts Freestyle and OutdoorWalkingV2 for Xiaomi Smart Band 8 Active 2024-11-24 17:15:05 +00:00
José Rebelo
e54b7959a4 Calories: Cleanup and fix some inconsistencies 2024-11-24 16:55:25 +00:00
a0z
27c4cc95c9 Calories: remove total goal 2024-11-24 16:50:51 +00:00
José Rebelo
3ad2e827c2 Calories: Fix some crashes 2024-11-24 16:50:51 +00:00
José Rebelo
df138e9c79 Add DefaultRestingMetabolicRateProvider 2024-11-24 16:50:51 +00:00
a0z
37ea9bc571 Calories: fix loading lag, gap 2024-11-24 16:50:51 +00:00
a0z
622d37ed38 Calories: add fragment 2024-11-24 16:50:51 +00:00
José Rebelo
60ab38db57 Garmin: Resting metabolic rate 2024-11-24 16:50:51 +00:00
Martin.JM
78d6ad3a1f Huawei: Fix some linter warnings 2024-11-24 13:41:58 +01:00
Martin.JM
c5a5cd1649 Huawei: Send weather error if there is no data
This will hopefully reduce the number of requests from the watches if
there is no weather data available.
2024-11-24 13:41:53 +01:00
dependency-bot
9a40190e5f Update dependency org.robolectric:robolectric to v4.14.1 2024-11-24 09:05:44 +00:00
José Rebelo
4d5141c765 Zepp OS: Fix TGA id 2024-11-23 23:40:24 +00:00
José Rebelo
9174d95894 Zepp OS: Send notification pictures 2024-11-23 22:04:42 +00:00
Daniele Gobbetti
4aa145560a Add support for picture attachments in notifications
Also adds a local cache for pictures which is handled by the NotificationListener itself.

If the picture is hosted in a third party content provider it gets queried.
If the Bitmap is embedded in the notification, the local cache is used.

In any case the NotificationSpec just holds a String to the absolute file path
2024-11-23 21:15:47 +00:00
José Rebelo
7aa7de6463 Colmi R0x: Remove all background tasks on dispose
Somehow, the tasks were not being fully removed on dispose, which would
result in a crash. I am not able to reproduce the issue reliably, but
removing all the background tasks on dispose should fix the issue.
2024-11-21 22:52:04 +00:00
cdvrs
16aed1364b GBX-100: Fix notification title 2024-11-20 08:17:56 +00:00
Renato Aguiar
212289645f Add Garmin Instinct 2 2024-11-19 20:59:05 +00:00
José Rebelo
6b5c5ae0ac Garmin: Fix weather temperature conversion to celsius 2024-11-19 20:57:04 +00:00
José Rebelo
9d1a57b6c2 Fix crash in some chart pages (#4319) 2024-11-19 20:53:34 +00:00
dependency-bot
b56ed974a3 Update dependency com.android.tools:desugar_jdk_libs to v2.1.3 2024-11-19 00:15:30 +00:00
MrYoranimo
b5bd4da9b1 Xiaomi SPPv2: Catch exception thrown in onPacketReceived
When a received packet causes an exception to be thrown while
getting handled in the service's onPacketReceived method, the
message will get stuck in the queue because it is never released.
Subsequently received messages get lined up after the first message
that causes an exception, and since that message is never removed,
those newer messages are never processed.

Catching the exception thrown from within the onPacketReceived method
allows the code flow to continue and therefore remove the troubling
message from the queue.
2024-11-18 23:25:28 +01:00
José Rebelo
1d2404a4e6 Garmin: Display AGPS age 2024-11-17 19:00:00 +00:00
Martin.JM
39e7bd8c62 Huawei: Add non-P2P HR zones configuration 2024-11-17 17:57:30 +00:00
José Rebelo
5f91715c89 Realme Buds T110: Initial support 2024-11-17 17:23:23 +00:00
José Rebelo
1618fda418 Log exceptions during DBAccess async tasks 2024-11-17 00:01:40 +00:00
José Rebelo
e453855e88 Do not suppress repeated notifications if timestamp is in the future (#4327) 2024-11-16 21:46:22 +00:00