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

59 Commits

Author SHA1 Message Date
José Rebelo
515b9efce8 Zepp OS: Fix calendar sync for Zepp OS 2 2023-08-14 18:40:39 +01:00
José Rebelo
606e20a065 Amazfit GTR/S 3: Enable AGPS Updates 2023-07-25 21:47:12 +01:00
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
07ec8a095b Zepp OS: Handle fitness goals in Huami2021Support
HuamiSupport handles configurations with performInitialize, which may
trigger a device reinitialization if called while the device is already
initializing.

Handle fitness goals in Huami2021Support, which should be one of the
last settings still missing.
2023-07-22 14:35:54 +01:00
José Rebelo
da5f91f05b Huami/Zepp OS: Improve music info stability 2023-07-09 15:16:37 +01:00
José Rebelo
708cb0c617 Zepp OS: Attempt to parse raw sensor values 2023-07-05 17:47:19 +01:00
José Rebelo
fea3bf50a4 Zepp OS: Add loyalty cards integration with Catima 2023-07-03 23:19:19 +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
fad7fa395b Zepp OS: Show watchfaces in app management 2023-06-15 22:04:01 +01:00
José Rebelo
853470a2bd Revert "Zepp OS: Unify support class and fw handling"
This reverts commit d59e8c3f62.

We need to refactor the Huami classes too, otherwise this needs a lot of
hacks to work properly.
2023-06-15 21:39:22 +01:00
José Rebelo
d59e8c3f62 Zepp OS: Unify support class and fw handling 2023-06-15 20:50:15 +01:00
José Rebelo
b3db9b7768 Zepp OS: Add screenshot support 2023-06-14 21:02:27 +01:00
José Rebelo
9393d2c28f Zepp OS: Add service to query supported services 2023-06-11 18:34:40 +01:00
José Rebelo
c3c4c2ce74 Zepp OS: Add watch app logs developer option 2023-06-11 18:23:54 +01:00
José Rebelo
d38afe60c2 Zepp OS: Add incoming file support to file transfer service 2023-06-11 15:21:39 +01:00
José Rebelo
8ff3ce0477 Zepp OS: Add experimental app management 2023-06-10 23:31:38 +01:00
José Rebelo
d77a32a430 Zepp OS: Add code to toggle raw sensor data 2023-06-10 19:07:00 +01:00
José Rebelo
3716a031ce Zepp OS: Implement Alexa service protocol 2023-06-10 17:05:09 +01:00
José Rebelo
eb7366c7e3 Huami 2021: Prevent duplicated payload logging 2023-06-03 20:25:23 +01:00
José Rebelo
07357305cb Huami: Unify recorded data fetching in HuamiSupport 2023-05-20 20:44:18 +01:00
José Rebelo
2b6a79f462 Zepp OS: Manage contacts on watch 2023-05-17 23:43:29 +01:00
José Rebelo
9851493cf1 Zepp OS: Add gpx route file upload 2023-05-14 14:20:39 +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
483ef27a4f Zepp OS: Set region on user info
This affects available features (eg. Alexa). Defaults to the previous
value of "unknown" for now, and no UI. Alexa requires a region where it
is available, such as Germany ("de").
2023-04-30 17:03:05 +01:00
José Rebelo
1d0b10ed0f Zepp OS: Refactor services config and init logic 2023-04-30 11:42:34 +01:00
José Rebelo
94c7b43ad4 Zepp OS: Map known watchfaces to human-readable names 2023-04-26 09:51:14 +01:00
José Rebelo
9a8e95bd18 Zepp OS: Set watchface from phone 2023-04-24 20:20:43 +01:00
José Rebelo
3c3936bf6a Zepp OS: Add shortcut cards preference 2023-04-24 19:12:22 +01:00
José Rebelo
ad8069b38d Zepp OS: Fix setting of control center 2023-04-22 22:56:18 +01:00
José Rebelo
340db0ca15 Amazfit GTR 4 / GTS 4: Perform and receive phone calls on watch 2023-04-02 18:50:58 +01:00
José Rebelo
f1dd4019bf Zepp OS: Add support for morning updates 2023-04-01 20:58:21 +01:00
José Rebelo
4713c6511e Zepp OS: Manage contacts on watch (protocol only) 2023-04-01 13:51:23 +01:00
José Rebelo
aeb8607e78 Amazfit GTR 4 / GTS 4: Add watch Wi-Fi Hotspot and FTP Server 2023-03-21 00:02:59 +00:00
Oleg Vasilev
007f070125 huami: implement repeated activity fetching
Currently, huami only attempts to fetch activities once.

Since sports activity fetching creates an Operation twice per every fetch, we
need to pass around fetchCount variable to keep track of how many fetches has
occured.

Tested on my Amazfit GTR 4.

Signed-off-by: Oleg Vasilev <me@svin.in>
2023-03-11 15:02:00 +00:00
José Rebelo
17c58d2947 Amazfit GTR 4/GTS 4: Add AGPS Updates 2023-01-05 11:31:51 +00:00
José Rebelo
fe9648dea3 Zepp OS: Allow activity fetch timestamps sent in seconds
Re-applies #2959 after b51328e4f
2022-12-15 22:03:14 +00:00
José Rebelo
b51328e4f2 Huami: Fix payload when setting the time
Fixes #2999
2022-12-15 21:38:06 +00:00
José Rebelo
21f217b698 Zepp OS: Fix notification icons for work profile apps 2022-12-08 18:14:07 +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
fffb1462c7 Zepp OS: Fix notification icon for SMS 2022-10-31 12:01:45 +00: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
9c82180930 Zepp OS: Do not change GATT Callback unless explicitely set 2022-10-23 10:11:23 +01:00
José Rebelo
addf7ff6a6 Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
José Rebelo
1335f0bd86 Zepp OS: Fix fetching workouts shorter than 1 minute
Since GB would always round down the time precision to the minute,
workouts shorter than 1 minute would be fetched over and over again.
2022-10-16 22:08:13 +01:00
José Rebelo
d0b1e2a23c Zepp OS: Fix crash when user attempts to disable Settings display item
The display items lists were immutable, so removing items from them
would crash GB.
2022-10-03 22:12:50 +01: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
José Rebelo
a6cb73e843 Amazfit GTS 3: Fix battery drain due to unanswered weather requests
- Reply with HTTP 404 to unknown weather endpoints
- Add some missing fields to weather responses

The official Zepp app itself gets a 404 when calling a /weather/tide
endpoint, so we don't know what the watch is supposed to receive.

Weather also seems to still not work correctly on the GTS 3, but this at
least fixes the request spam that was coming from the watch on the tide
endpoint.
2022-09-21 21:31:45 +01:00