1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-21 12:30:23 +02:00
Commit Graph

198 Commits

Author SHA1 Message Date
José Rebelo
247a954920 Huami/Zepp OS: Improve reconnection
- Remove notification on unneeded characteristics for Zepp OS devices
- Reset MTU before initializing device, since the support class is
  reused when reconnecting, and keeping the previous high MTU before
  renegotiating again can make the initialization fail sometimes
  (band will never reply)
- If any of the chunked characteristics is null during initialization,
  mark the device as waiting for reconnect, which will make it retry the
  connection later with a backoff delay.
2023-07-22 20:31:26 +01:00
José Rebelo
76576af324 Huami 2021: Do not initialize device for chunked ack
Since we now handle chunked acks as of 74dac3f5c, these may happen
during device initialization. We must not use performInitialized, or
initializeDevice will be called twice, since the device will still not
be in INITIALIZING state.
2023-07-22 13:50:54 +01:00
José Rebelo
da5f91f05b Huami/Zepp OS: Improve music info stability 2023-07-09 15:16:37 +01:00
José Rebelo
e95c8a3775 Add PAI charts 2023-07-02 16:05:10 +01:00
José Rebelo
88b7cd5756 Add stress charts 2023-06-17 17:28:11 +01:00
José Rebelo
9d3c480414 Zepp OS: Refactor config, display items, reminders and http to standalone services 2023-06-16 20:43:07 +01:00
José Rebelo
74dac3f5cd Huami 2021: Handle chunked ACKs 2023-06-14 15:45:49 +00:00
Andreas Shimokawa
f80b873866 Prefs: make allow high MTU default to true.
It is 2023, it should work, if not it can be turned off.

For newer devices with big firmwares and apps (like Mi Band 7), people just wonder how slow Gadgetbridge installs stuff...
2023-06-14 16:44:51 +02:00
Damien 'Psolyca' Gaignon
a3c0e10330
Add GBDevice argument to getAlarmSlotCount 2023-06-13 23:10:55 +02:00
José Rebelo
d77a32a430 Zepp OS: Add code to toggle raw sensor data 2023-06-10 19:07:00 +01:00
José Rebelo
a3c59b0e0e Zepp OS: Add experimental sync of SpO2, stress, PAI, HR stats and sleep respiratory rate 2023-06-10 17:19:22 +01:00
José Rebelo
e55a35eced Huami: Persist sleep respiratory rate data 2023-05-27 19:03:43 +01:00
José Rebelo
a1e07b5d1b Huami: Persist PAI samples 2023-05-27 19:02:01 +01:00
José Rebelo
24f78655c2 Huami: Persist heart rate max, resting and manual samples 2023-05-27 18:59:12 +01:00
José Rebelo
3f87bfadd4 Huami: Add queued fetch operations 2023-05-22 22:15:35 +00:00
José Rebelo
07357305cb Huami: Unify recorded data fetching in HuamiSupport 2023-05-20 20:44:18 +01:00
José Rebelo
e1cccd6953 Zepp OS: Refactor code for alarms, notifications, calendar, canned messages 2023-05-10 23:33:23 +01:00
José Rebelo
ac002f8db9 Zepp OS: Fix activate display upon lift wrist smart mode 2023-03-19 22:11:39 +00:00
Arjan Schrijver
b1d03e9f7a Clean up duplicated unimplemented methods from device support classes
Moved to AbstractDeviceSupport so each device support class can override them if required. This change helps to keep the code base clean by not requiring every (Device)Support class to implement these methods even when they don't need them.
2023-01-05 22:11:32 +01:00
José Rebelo
b51328e4f2 Huami: Fix payload when setting the time
Fixes #2999
2022-12-15 21:38:06 +00:00
uli
6cf079e55b adapt HuamiSupport to updated BLE Time handling 2022-12-12 15:04:45 +00:00
uli
5097327234 add local time service to PineTime, fixed standard ble format 2022-12-12 15:04:45 +00:00
musover
4386f321a3 Fixed regression undoing PR #2474, notification content preserved for Amazfit GTS 2 Mini 2022-12-12 07:49:26 +00:00
José Rebelo
2a47dc863a Huami: Allow activity fetch timestamps to be sent in seconds 2022-11-07 19:37:28 +01:00
José Rebelo
164c5e52a4 Zepp OS: Add World Clocks 2022-11-07 10:31:41 +01:00
José Rebelo
cd59511aad Zepp OS: Refactor config, fix health on GTR 3 and GTS 3
The config refactor in addf7ff6a broke health settings on GTR3 and GTS3

- GTS 3 and GTR 3 health configs use protocol v1. The only difference
  seems to be that the steps goal is a SHORT instead of an INT.
- It needs a refactoring from the ground up to better handle different
  versions, but this is enough to get the GTR 3 and GTS 3 working.
2022-10-29 14:17:40 +01:00
José Rebelo
6cc3579e9c Zepp OS: Refactor file upload, fix notification icons > 56x56px
- File uploads are split in chunks, with the size dictated by the
  watches. There seem to be 2 protocol versions, without any noticeable
  differences
- Extract the file upload logic to a standalone class. This makes it
  easier to keep track of concurrent requests, each of which have their
  own session id
- Icons larger than 8KB will end up split in multiple chunks - we now
  handle that correctly
- Notification icons are also requested in 2 different formats, but
  the actual encoding seems to be the same, with only a different id
2022-10-28 23:37:22 +01:00
José Rebelo
bc2d5aa16d Zepp OS: Change default fetch operation time unit resolution to minutes
Reverts the default behavior introduced by 1335f0bd8 since it was
causing issues on the GTR 3, but keeps it optional as a developer
option.
2022-10-27 23:51:02 +01:00
José Rebelo
addf7ff6a6 Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
Andreas Shimokawa
a0ba977cde Revert "remove AndroidThreeTen library, since we have java8 in this branch"
This reverts commit 43eb6bfe0e.

The reason was not only Java8 but this also requires Android 8!
2022-09-28 07:51:10 +02:00
José Rebelo
43b43ab742 Huami: Change default find band vibration pattern
The previous one was too long, now that we loop it.

This one should be a sane default, even for devices that do not support
it (eg. Bip), as the total time is 1.5s.
2022-09-26 18:21:16 +01:00
NekoBox
2df6ce2aed Huami: implement proper find device. 2022-09-26 19:18:41 +02:00
Nathan Philipp Bo Seddig
63b1cffe2a Mi Band 6: Enable adding workout activity types to the "more" section 2022-09-25 19:40:36 +01:00
José Rebelo
aac1e656b1 Mi Band 6: Add support for workout activity types 2022-09-25 19:40:28 +01:00
NekoBox
4675c7a344 Fix world clock packet format.
Fix short city name in packet (used by Neo).
Enable world clocks for Amazfit Neo.
2022-09-19 21:53:20 +02:00
José Rebelo
c36857f063 Huami: Set OpenTracks track category and icon 2022-09-19 11:50:44 +02:00
José Rebelo
2efc564d21 Huami: Add preference to overwrite band settings on connection 2022-09-10 23:24:27 +02:00
Andreas Shimokawa
43eb6bfe0e remove AndroidThreeTen library, since we have java8 in this branch 2022-09-10 12:04:16 +02:00
Andreas Shimokawa
969164ba5d Remove KitKat support 2022-09-10 12:04:16 +02:00
José Rebelo
f915ab5ebd Mi Band 7: Enable app support 2022-09-08 18:20:28 +02:00
NekoBox
bf7446abe9 Fix Amazfit Neo manual HR measurement.
Fix heartrate notify staying on after manual measurement.
Fix "live measurement" to use "continue" packet instead of restarting measurement every second.
2022-09-08 17:58:29 +02:00
José Rebelo
ba565df088 Xiaomi Smart Band 7: Initial support 2022-08-19 23:13:27 +02:00
NekoBox
dcce900f23 Amazfit Neo: fix heartrate sleep packet 2022-08-19 23:11:18 +02:00
NekoBox
eceb612c9e Amazfit Neo: fix alarms setting to "unused" on connect. 2022-08-12 16:57:24 +03:00
NekoBox
ad38a32cc8 Implement Hourly chime which was added in firmware 1.1.2.46 2022-08-12 09:05:13 +02:00
NekoBox
c2f5fd3215 Fix Amazfit Neo daily steps goal and notification, fixes #2773 (#2780)
The notification, once enabled, can only be triggerd once per day, mind that when testing.

Packet structure:

```
00:c2:00:3a:01:00:00:00:01:88:13:00:00
00:c2:00: - chunked transfer type 2
3a: - command set goals/notificatrions
01: - 01 - set steps goal, 02 - set calories goal, 03 - both
00:00:00: - delimiter
01: - enable steps goal notification
88:13: - set steps goal (5000)
00:00 - delimiter
```

This is sent when goal notification switch is enabled in Zepp app:
```
00:c2:00:3a:03:00:00:00:01:40:1f:00:00:01:2c:01:00:00
00:c2:00: - chunked transfer type 2
3a: - command set goals/notificatrions
03: - 01 - set steps goal, 02 - set calories goal, 03 - both
00:00:00: - delimiter
01: - enable steps goal notification
40:1f: - steps goal (8000)
00:00: - delimiter
01: - enable calories goal notification (seems to be not used in Neo)
2c:01: - set calories goal (300)
00:00 - delimiter
```

And when disabled:
`00:c2:00:3a:03:00:00:00:00:40:1f:00:00:00:2c:01:00:00`

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2780
Co-authored-by: NekoBox <nekobox@noreply.codeberg.org>
Co-committed-by: NekoBox <nekobox@noreply.codeberg.org>
2022-07-30 21:37:21 +02:00
José Rebelo
2a0b7b64fb Huami: Fix MTU update on device connection 2022-07-20 17:27:36 +02:00
José Rebelo
9cb6403c04 Mi Band 4: Add password support 2022-07-05 19:29:16 +01:00
José Rebelo
152f19575f Make calendar blacklist configurable per device 2022-07-05 19:58:21 +02:00
José Rebelo
7512147c34 Huami: Display native alarm notification 2022-07-05 19:57:13 +02:00