urbandroid-team / sleep-as-android-garmin-addon Goto Github PK
View Code? Open in Web Editor NEWCode for both Android part and Garmin part of the Sleep as Android Garmin smartwatch integration
Code for both Android part and Garmin part of the Sleep as Android Garmin smartwatch integration
Let's talk about the battery drain.
How big drain do you get on your watch model?
How big a drain is acceptable for you?
What might be the causes of the drain?
What might be done to lower it?
It would be nice if I could disable the alarm feature (wehere you dismiss or snooze the current alarm on the watch.) in the app settings.
One reason is the issue #20 .
Bit I actually prefer to dismiss/snooze the alarm on my phone.
On the bedtime notification, when selecting this time or every time on the watch to start the Sleep activity, the watch reboots. Seems to be quite repeatable, as it happens every time I try it. Let me know what I can do to assist in tracking down the bug.
I'm using current (today is 10.12.2018) released versions of SaA (beta), Garmin addon, Garmin watch app with a OnePlus 6 on Android Pie with a Garmin VA3.
Every time the tracking is stopped - no difference if it is stopped from the watch or phone - the watch freezes completely. It stucks at the screen "Tracking". I tried to get a log or something, but I were not able to access the watch anymore. The only way to "fix" it is by performing a cold restart (pressing 15 secs on the hardware button).
Edit: Don't know how to reference an issue in the correct way, so: Mentioned from Artaud
Hello. I am a user using garmin mk1.
I would like to ask for your support for mk1.
Thank you
Sorry, this isn't an issue, but I was just wondering if you managed to find a way to stream accelerometer data from the watch to phone in real time?
I'm not sure if this is intended or not but for the Fenix 5 the backlight will come on after some movement. I think this should be made into a setting because some people may not want it to wake the person next to them. It'd also be a good battery saver for people that move around a lot at night.
For easiest entry:
tones may be behind some issues with alarm crashing as apparently tonesOn method is bugged
I believe the issues with heart rate and intermittent tracking aren't an actual Garmin issue, but in fact stem from a 3rd party watch face app. Specifically Actiface, Dozen Run, and others.
I first noticed the issue about 8-10 months ago when I installed dozen run. That app not only broke the heart rate tracking in Sleep As, but also broke sleep tracking in Garmin's native app. All returned to normal after uninstalling dozen run. Esstentially the same thing happened when I installed Actiface and Watch II. Uninstalled those and again things returned to normal. Since then, you removed its hr tracking, so I reinstalled Actiface, which promptly broke Garmin's native tracking. I then upgraded the firmware to 4.3 and uninstalled Actiface and Watch II. Again, the native tracking has returned, but only sporadically, so it is possible there is a FW issue as well, Sleep As Android tracking still works 100% of the time however. Sorry I can't provide any more technical details, but maybe this will help a little.
HS # 58274
The app freezes my watch if the session is started from the phone. I have a vivoactive HR. The problem also hapens on other Garmin devices according to reviews on Connect IQ.
Thanks to @MrFly, we've got a bug to squash .]
Error: Unhandled Exception
Time: 2018-10-16T19:38:28Z
Part-Number: 006-B2700-00
Firmware-Version: '5.40'
Language-Code: deu
ConnectIQ-Version: 3.0.3
Filename: 201809~1
Appname: Sleep
Message: 'UnexpectedTypeException: Expected Number/Float/Long/Double, given null/Float'
Stack:
_Originally posted by @MrFly in https://github.com/urbandroid-team/Sleep-as-Android-Garmin-Addon/issues/10#issuecomment-430877353_
Investigate: At some point the watch app will be stuck in "Stopping" state with no option to actually exit the app
I would like to see my pulse on the display while the app is active.
I guess this should be an option in the app settings to en/disable.
Maybe even set an update interval.
Details
Device: Vivoactive HR+ (SW version 4.40)
Sleep version: 20180613
Sleep Garmin version: 20170725
Garmin Connect IQ app version: 20170103-upd5
Symptom
I had just installed the app add-ons and app onto my watch today and once I had it all set up and connected, ran the "Test Sensors" in the Sleep app. The watch buzzed with the prompt "Launch Sleep (Yes/No)". I tap "Yes" and the Connect IQ Error screen pops up (black screen, stylized "IQ" in the middle with a red circle and exclamation mark). After a few seconds, a slightly different "Launch Sleep" menu appears. Cycle repeats ad-nauseum.
I would provide a stacktrace or something, but nothing no additional files related to the app exists.
I was often kinda misoriented in the app. Renaming "Graphs" to something like "Graphs/History" would have helped.
Thanks in advance!
`FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task :app:mergeDebugResources.
Could not resolve all files for configuration :app:debugRuntimeClasspath.
Could not find com.urbandroid:common:1.23.
Searched in the following locations:
- https://jcenter.bintray.com/com/urbandroid/common/1.23/common-1.23.pom
- https://jcenter.bintray.com/com/urbandroid/common/1.23/common-1.23.aar
- https://dl.google.com/dl/android/maven2/com/urbandroid/common/1.23/common-1.23.pom
- https://dl.google.com/dl/android/maven2/com/urbandroid/common/1.23/common-1.23.aar
- file:/home/chakaponden/.m2/repository/com/urbandroid/common/1.23/common-1.23.pom
- file:/home/chakaponden/.m2/repository/com/urbandroid/common/1.23/common-1.23.aar
- https://repo.maven.apache.org/maven2/com/urbandroid/common/1.23/common-1.23.pom
- https://repo.maven.apache.org/maven2/com/urbandroid/common/1.23/common-1.23.aar
- file:/home/chakaponden/Sleep-as-Android-Garmin-Addon/SleepGarmin-android/app/libs/common-1.23.aar
- file:/home/chakaponden/Sleep-as-Android-Garmin-Addon/SleepGarmin-android/app/libs/common.aar
Required by:
project :app`
Latest Android Studio 3.6.3
Since the rewrite was released everything was working for me. Just recently things stopped working and now sleep tracking crashes a few hours after I've fallen asleep. I wake up in the morning to see my watch on my default widget. This happens regardless of how I start tracking (from the phone/watch) and is now consistent every time I use the app. I've tried to look for logs in the device but didn't see anything from this addon. I did find something in the ERR_LOG.TXT
file under GARMIN/DEBUG
:
2697 (fenix 5) SW ver: 1000
Build Type: RELEASE
Commit:bef5fea663aeec52575bd5b5b91e2d15afc92b7d
ESN: 3962006839
10/07/18 02:17:42
RTL
errnum: 0x00a
r0: 0x2005bd40
r1: 0x00000063
r2: 0x0000007e
r3: 0x0000007f
r4: 0x000a4a49
Stack frame PC, SP: 0x000cceb9, 0x2005b948
Call Stack - SP at 0x2005b948:
0x000704cf
0x000a4a49
0x0008cba5
0x000a4a49
0x000a4a49
0x0008d82d
0x000a551d
0x0001011d
0x0000b475
0x00070675
0x0008d82d
0x0008d82d
0x0008d6bd
0x00020075
0x000a4c89
0x00027983
0x0002621b
0x0001fdeb
0x0008d82d
0x0008d6bd
0x0008d6db
0x0008e9a5
0x0004f255
0x0004f0ad
0x0005d523
0x00011985
0x0005d571
0x0005d57d
0x0008ea8b
0x000e5b47
0x0008b80d
0x00000000
Uptime: 4880819
It looks like I should be seeing a log file specifically for the app.
If you guys make another release with logging enabled I'd be happy to share the logs and help debug the issue.
As mentioned by @MrFly in #10 (comment)
On some watch models the first start on a given day always results in an app crash (IQ logo shows on the watch screen).
Further start attempts do not crash the app - the app is able to work normally.
Whoever is able to reproduce it, please comment with your watch model and ideally attach a crash log from the watch (/GARMIN/APPS/LOGS/CIQ_LOG.txt).
Hi, I tried to debug the application for the watch and the companion Android app so that I can try some things regarding battery saving but unfortunately I failed to create my development setup for both apps.
I am able to start the watch app using the Connect IQ simulator through VS Code, and I am also able to start the Android app in my emulated Android device (Pixel 5 API 28, SleepAsAndroid is installed). I set the debug values in both apps to true, so it uses the tethered connection. I can also connect both using ADB. When debugging the Android app I see that the Simulator device is recognized and connected, however no messages are sent between the two emulated devices. I think this has to do with the Android app not recognizing that the watch app is installed in the simulated watch. IQApp(IQ_APP_ID)
in the Android app works, but the state of the App is always unknown and/or not installed.
My question: How do you develop/debug both apps, do you use a real Android device? Is it necessary to install Garmin Connect on the emulated Android device? I installed it but I could not log in, and even if I could I would not be able to connect the simulated watch. Is this even necessary when using the TETHERED
connection type? Thanks
OS: Linux
Simulated Garmin watch: Venu 2 (I removed all other devices from the manifest)
I was interested in the option of receiving a low breathing rate alarm. Can you tell that the app tracks your breathing while you sleep and the alert above is the same as sleep apnea?
With the xiaomi mi band, I will be able to get such an alert? Possibly which bands support this functionality.
A tap on dismiss does not work. It simply does nothing (at least as user I'm not able to see any difference than not tapping on it).
I'm using SaA beta, and all other pieces of software in the current versions (10.12.2018) on a Garmin VA3.
This was mentioned here
Hey there,
it's really annoying when the Backlight always triggers when moving around a bit in bed (already woke up because of this) ..., but as I rely on "Gesture Backlist activation" on running and other activities I can't disable it (as advised here: #9)
On newer Fenix Models like the Fenix 6 one can configure Power Profiles, and those Power Profiles can be activated within Activity Settings. So it would be possible to create a Power Profile with disabled Backlight which one could assign to "Sleep App" ...
Mind implementing this Feature? ;-)
thx, bye from Austria
Andreas Schnederle-Wagner
I got an update to Android 10 this days. Since this, it's not possible to start Sleep from phone and watch. Before this, starting from watch worked without problems. Starting from phone ended up in the screen with the red x and green v, but do not respond - this hasn't changed.
If starting from watch, the "Sleep" entry on the watch gets a grey background, but nothing else happens.
Can I provide some more informations? I'm using the Garmin VA3 with newest firmware, Android 10 and a OnePlus 6 phone. All settings against killing apps (power saving) were checked twice and it worked the last few weeks (before A10) really good.
Garmin recently released a few new models with new product IDs, including venusq2
and venusq2m
:
https://developer.garmin.com/connect-iq/reference-guides/devices-reference/#venu%C2%AEsq2
Could someone update the watch app manifest with the new product IDs and roll a release?
Thanks!
Hi there,
Should I be using a different version of Garmin Add-on for Sleep? In looking at things to file this Issue, I see that the version I have installed is from the Play store, 20220207.
So much seems to work just fine with this version of the app and my watch, but I only just realized it's as old as it is.
At any rate, Sleep as Android is the 20231001 version.
To be clear about the report - If I dismiss my alarm on the phone in SaA, the watch stops it's alarm and goes back to it's normal operation. If I snooze my alarm in SaA, the alarm continues indefinitely on the watch and I have to power cycle the watch to get it to go away.
After forking and opening the Android code base in Android Studio there are some errors that devs will hit:
signingConfigs
section along with this)Hello Sleep as Android team,
I am an avid user of your main app and appreciate the functionalities it offers. However, I've been experiencing issues with the Garmin addon. The battery drain that occurs while using it is significant, which prevents me from making full use of this extension.
I've also noted that you acknowledged connection stability issues in your Google Play Store description, which has been a concern as well. This combination of high battery usage and unstable connections certainly impacts the overall user experience.
Recently, I was browsing the Garmin Developer site and stumbled upon something called the "Companion SDK". This software development kit supposedly allows for live broadcasting of various data types.
Have you considered looking into this Companion SDK as a possible solution? It might offer a more efficient way of handling data and could potentially address the aforementioned issues with the Garmin addon.
Link to Companion SDK
https://developer.garmin.com/health-sdk/overview/
I don't want to spam the issue tracker with too many FR935 related issues, so I'm making this one for the ones I noticed.
Versions (all of them the latest stable releases, as far as I know):
Connect IQ App: 20181128
Android App: 20181011
Sleep Garmin: 20181206
"Sleep tracking from watch" app: 1.0
Garmin Forerunner 935 firmware: 11.00
This current setup is actually rock solid and tracks my sleeps without ever restarting the watch/disconnecting/etc. The battery drain is not bad either though the FR935 has a huge battery (it's using about 1-2%/hour). The previous release had a lot of stability problems, but they seem to be fixed, kudos! Also kudos for the open source approach!
However there are regressions that new release introduced, which are possible to work around, but definitely result in a poor user experience until you figure out the only right combination to start/stop tracking. Here's a list:
I'm on the stable SaA Android app, not using heart rate tracking function (because it's not in the stable yet). The Forerunner 935 is a very popular device (especially for triathlonists), so it would be cool to have stable and good looking app on it, not just for my own sake. Let me know if I can help by testing some fixes.
Once again, thanks for all the work on this project (and on Sleep as Android in general), it's very much appreciated!
I had issues (like #17 and #22) before and will try to report logs if it happens again.
But since the newer version with the improved UI (v202010*) was automatically installed on my watch a few days ago I had a new strange issue the last days.
Sleep
to start the tracking on the watch.Dismiss
and Snooze
the alarm, but nothing happens. Like these buttons have no functionality at all.I am not sure how often this happens, but it happened the last two or three days ion a row.
I will keep an eye on this and report if I know more.
Are there any logs I can provide?
Hi, I just got a new Garmin watch, and have been using Sleep as Android for I can't remember how long.
However I tried yesterday pretty much all night to get Sleep as andriod sleep tracking working for my Garmin Forerunner 245 Music, and I can't get it working. Not sure it's the new watch or that I can't tracking my sleep anymore, I lost sleep last night.
Anyway, I installed: 'Sleep as Android' (already been using), 'Garmin Addon for Sleep as Android', 'Sleep as Android' for the Watch and 'Sleep watch starter'.
And when I started the sleep tracking from the watch using 'Start/Stop' button -> select 'Sleep' -> 'Start/Stop' button again. Then the watch screen shows "11:49, Starting ..." with options to 'Resume tracking' or 'Stop tracking', and it just here. I waited for about half hour and nothing happens, and it's stayed in the same screen (with correct time been displayed) when I waked up in the morning.
The watch is a Garmin Forerunner 246 music with (software/firmware version 4.40), and the phone is a Xiaomi M9 with Android 10, MIUI 11. I've enabled Wearables with 'Use wearables' -> Garmin.
I didn't try to start sleep tracking from the Phone last night, but when I tried it now by 'Start Sleep tracking' from my phone, it will display 'Garmin, Waiting for connectivity' with 'Cancel' and 'Track without' options at the bottom, both options seems working fine. Initially I thought that it too will waiting forever in this screen, but after about 3 minutes(?), it eventually went into sleep tracking mode.
So it seems the start sleep tracking function (is it the Garmin Addon on the watch or the Sleep watch starter?) on the watch cannot starting/communicate with Sleep as Android in the phone?
I'm seeing that my Fenix 5 will still vibrate for alarms even if the vibrate setting is set to disabled.
It looks like the Venu 3 isn't supported yet. Keep getting a server error for ConnectIQ when attempting to download as well
Add MARQ Athelete device!
Thanks!
Forerunner 630 - new watch request.
Recently started using a 630 and discover that it isn't supported.
I would like to be able to wake up and stop sleep tracking without my phone, directly from the watch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.