Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Support Interfacing with GadgetBridge and Sleep as Android #1

Open
theuser18 opened this issue Dec 22, 2021 · 3 comments
Open

Comments

@theuser18
Copy link

Gadgetbridge is an open-source fitness tracker. Sleep as Android is a popular sleep-tracking app for Android.

Sleep as Android is interested in compatibility with PineTime, but notes that it does not currently support the proper APIs.

@thiswillbeyourgithub
Copy link
Owner

thiswillbeyourgithub commented Dec 23, 2021

Thank you for the interest in this project :)

My goal is to make a sleep tracking app for wasp os, not infinitime. The reason is mainly that I can.

  • Infinitime is done in C / C++, which I don't know.
  • Gadgetbridge is done in Java, which I don't know.
  • waspos is done in python, which I'm very familiar with.

Also, the initial goal is to make it as standalone as possible, and not require a companion app.

Having said that, I am absolutely open to implementing any kind of thing in python in this sleep tracker to interact with Sleep as Android or Gadgetbridge. But I can't contribute to their code to do so.

I have a few questions for you. Can you please explain what features you expect from this? Are we just talking importing sleep data to those phone apps or is there something more involved that you have in mind? Because exporting files should not be a problem and not knowing C / C++ / Java should not cause too much trouble.

@jdsmo
Copy link

jdsmo commented Apr 15, 2022

I can explain why I would be interested in interfacing with GadgetBridge. I currently use an Amazfit Bip S that interfaces with GB, which then knows when I fall asleep or wake up. It broadcasts this state change, which is picked up by my Home Assistant app. Hence, I can write automations in the house that use this knowledge of my sleep state. It would be great to have something like this on my PineTime watch.

@thiswillbeyourgithub
Copy link
Owner

Okay so you want wake up and sleeping time to be broadcast. Not body movement throughout the night for example.

I can see the value in that and would appreciate that myself.

I think that the best course of action for me is to wait for someone to improve the code related to gadget bridge (on their side as well as on wasp-os side). As it's currently pretty basic and I can't add them myself (don't know C++). If you find someone interested in this don't hesitate to recruit!

I am actually interested in doing a separate "actigraph" app : basically it would run continuously and record movement and heart rate data every so often. That would allow to infer when the owner is sleeping or not. I've seen plenty of research papers on this and it seems quite easy.

But I don't have time to spend on this for now because I have no understanding of how to broadcast to GB, data formatting etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants