Initial support for AsteroidOS watches #3013
No reviewers
Labels
No Label
device mi band 7
activity post processing
activity/health
Android 12
Android 13
android integrations
architecture
Bangle.js
bug
changes requested
charts
details not provided
developer documentation
device amazfit band 5
device amazfit bip
device amazfit cor
device Casio
device fossil
device garmin
device gtr 2e
device gts 2 mini
device h30
device hplus
device huami
device Huawei
device liveview
device mi band
device mi band 2
device mi band 3
device mi band 4
device mi band 5
device mi band 6
device no.1 f1
device pace
device pebble
device pebble 2
device pinetime infinitime
device request
device sony
device support
device watch 9
device xiaomi
discussion
documentation
duplicate
enhancement
feature request
Gadgetbridge
good first issue
help wanted
i am developing my own app can you help
icebox
intent api
internationalisation
invalid
needs work
network companion app
new device
no feedback
not a bug
notifications
one of the 1000 issues about disconnection
pairing/connecting
potentially fixed / confirm and close
question
research
security
seems abandoned
Solved, waiting for F-Droid release
suggest to close
task
user interface / UX
weather
wontfix
Zepp OS
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Freeyourgadget/Gadgetbridge#3013
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "Noodlez/Gadgetbridge:asteroid-os-support"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hi! This is my contribution to the project. Current support for AsteroidOS by the AsteroidOSSync application is a bit lackluster for my uses, and after my great experience with Gadgetbridge for my PineTime, I figured I'd get AsteroidOS working in here!
There are a few known problems:
The great thing about AsteroidOS is the project is open source, and I hope to work with them to use some more standardized GATT services for things like device information, and time synchronization.
Another thing to note is that it's not really WIP. It works as is technically. The main thing I want to get fixed is the advertisement problem where I can't find the watch without using unsupported devices.
Ah and for more info on AsteroidOS you can look here: https://asteroidos.org/
@ -0,0 +76,4 @@
{
LOG.debug("Name: " + candidate.getName());
LOG.debug("Num services: " + candidate.getServiceUuids().length);
for (ParcelUuid uuid : candidate.getServiceUuids()) {
I think we should remove this before merging, it will be noisy.
Yep! Just removed that. I just forgot to take that out thanks for letting me know!
@ -0,0 +27,4 @@
@NonNull
@Override
public String toString() {
switch (this) {
You could just
return name().toLowerCase(Locale.ROOT)
and avoid the switch :)Awesome! Just learned something new about Java. I didn't know it had language reflection functions like that
@ -0,0 +253,4 @@
}
@Override
public void onFindDevice(boolean start) {
FYI (non-blocker for this PR) - On most devices that don't have this natively, GB usually just sends a call:
And set
supportsFindDevice
to true on the coordinator.Gotcha sounds cool. As an aside, would it be possible to start adding this as a default implementation for devices? Or at least have a helper function for doing exactly this?
@ -0,0 +307,4 @@
AsteroidOSWeather asteroidOSWeather = new AsteroidOSWeather(weatherSpec);
// Send weather city
{
TransactionBuilder builder = new TransactionBuilder("send weather city");
Should we consider using a single TransactionBuilder for
send weather
and queueing everything at the end?Oh yeah I can do that. Can you queue for different characteristics? I'm just learning about all this now, so I have no clue what I'm doing in this regard.
I also was thinking, if that is the case, should I do the same for the music info as well, since I am also splitting those up into different builders and queues?
Yup, should be fine, we do it in other parts of the code. It just queues multiple write actions.
I have some ideas for device discovery as well, since I think it's a good enough solution for an initial commit. AsteroidOS has a list of supported watches, and will advertise their bluetooth name by the watch's codename (eg. the LG Watch Urbane is codename "bass", so the device's name will be "bass")
We can just match on a list of supported devices, and discover that way.
AsteroidOS is supposed to be advertising a service, but when checking for it in the device coordinator in
getSupportedType()
, it's not showing up. I know this exists, because the official AsteroidOSSync application uses this and detects it.I've been doing some thinking and I think I'm willing to remove the WIP prefix if you guys are. I think it's in a good enough state to be used and integrated
@ -0,0 +144,4 @@
builder.queue(getQueue());
}
@Override
Hi, just wanted to let you know that we added empty implementations of all interface functions to the
AbstractDeviceSupport
class today. That means you can now remove all empty overridden functions from this class, which keeps the code cleaner and more readable.I just finished this but somehow rebasing onto master broke my fork. I pushed up to it and now I get a Gitea: Internal Server Error every time I try to do any git operations to my fork, so I'll make a new branch and a new pull request, if that works for you guys.
It seems also this pull request is broken as well due to missing fork information.
Yeah, it's an ongoing issue currently. The Codeberg team is looking into it. I think (hope) you don't need to recreate your branch and PR, just wait it out.
The problem should be fixed now, but this PR is still invalid. Could you try to push something again? Perhaps Gitea picks it up again correctly then...
@arjan5
How do you see that this is "invalid"?
Awesome okay that fixed it! Just needed some patience. I think it's ready to merge as-is, so I'm removing the WIP prefix
WIP: Initial support for AsteroidOS watchesto Initial support for AsteroidOS watches960a7bc794
toad6962303c