Fitbit Ionic/Versa beta integration

Sorry for late answer, yes that’s exactly it. We do that for any sleep record so that’s not specific to Fitbit.

Happy to report that last night went smoothly. I did restart all the apps yesterday after the updates as suggested. Had no problems starting tracking last night. Looking more and more stable each build, great job Jiri!

Versa App: v .10
Pixel App: 20190418

I know your working on more pieces. No pressure, but now that it seems more stable, thought I’d bring up the two items that I’ve noticed again:

  1. Heart rate not there - fun history in this beta process. I know you’re working on this one.
  2. Starting the phone server - after phone rebooting or phone app updates, it’s a little tricky to get to the “start server” button. Purely thinking UX (because I obviously find it, but also, I’m lazy), could there be a widget added to start the server? Or a shortcut added in the main menu shortcuts if Fitbit is selected as a wearable type?

Again, thank you for all the hard work Jiri!

2 Likes

version 0.10 worked fine last night.
I did not needed to start and kill once before, just started like always, following the procedure I shared before.
looking forward to see the HR included.
so far, really good!
thanks @jiri-urbandroid

I use Ionic and sleepmask from Happy Electronics. Every time I try to start my mask with a program (example “Fall asleep”) before I start Sleep as Android from my watch; the Fitbit app kills the sleepmask program. So I always have to start the Fitbit app first, before I start any Mindroid program.

I was able to test it today/yesterday. After I found I have to start the server, the Fitbit was able to connect. The I turned on the airplane mode and when the application asked turned back on the Bluetooth. In the watch everything looked good but in the morning I get a flat line in the application.

Today I tried it without enabling the airplane mode but the result was the same. The watch looks working but flat line in the phone.

I saw @treyhendon had issues with the start server button, I too was confused when it came and went. I believe I’ve worked out the current flow (for me and my devices, at least).

When you’re in the companion/android app, then Settings > Wearables:

  1. Choosing use wearables (in order to select Fitbit) and selecting Fitbit will automatically try to connect to Fitbit.
  2. The Start Fitbit Server option is now hidden
  3. I get a push notification ‘waiting for Fitbit’ but it will never connect. I’m presuming this is why the Start Fitbit Server option is hidden - because it’s trying to connect
  4. Stopping the connection won’t bring back the Start Fitbit Server option by itself, but going back to settings and then again into the wearables menu does for me (it would appear the menu needs to refresh)

Ideally the app would not try to autoconnect, or start fitbit server option would reappear if you stop trying to connect.

Hopefully that helps someone else out there!

The Start Fitbit server option disappeared for me too.
To start the server just select Fitbit again from the list of wearables.
For me is still working fine.

I used the beta phone app last night and have just downloaded 20190430 for tonight. The auto server start worked perfectly. Thanks Jiri!

First time in a while, but watch lost connection after a few minutes. Just sent in a crash report.

Versa: 1.0
Pixel: 20190430

Second night that the watch lost connection after 5 min. Did a full reboot on both yesterday after my sync issues.

After yesterdays Sleep app update, the Start fitbit server option disappeared and cannot start the server.
Please help. The way I found before its not working with this version.

Hello Ludo, we should be starting the server automatically when you start sleep tracking and finishing it when you stop the app from watch… so the flow is:

  • start sleep tracking - wait for connectivity shows up
  • you have 2 minutes to start the app on your watch
  • when you finish tracking the server is again stopped for you…

You can also do it the other way around (start on the watch first, then start sleep tracking on your phone). The key point is that you have to start tracking on both devices, within two minutes.

Hi everyone and thanks for all the help so far. I’ve released a version that I dared to number 1.0, mainly because it seems to me that there’s not much more I can do :slight_smile: I’m kidding, but just a little.

In this (rather lengthy) post I’m going to summarize what the state of things is, and some hints what to expect now.

Issues we’ve been experiencing:

  • The app doesn’t last full night
    In fact there were no other serious issues than this, and the whole time of the betatesting I was trying to find a way in which the app would be reliably running for the night. It apparently isn’t working through the night out of the box.
    Reasons include:
    • unreliability in the Fitbit companion part (it should be running when the watch app is running but often isn’t)
    • your OS killing the Fitbit app (there are things you can do to minimize the chances, see below)
    • or of course holes in our design of the app (this is ideal since we can do something about it :-] ) - since I started writing this post I’ve noticed at least one hole so there might be some hope in this haystack :]
  • No heart rates
    Those have been added back, though I’m still not sure whether they are not a cause of some of the watch app crashes, but haven’t had any direct evidence even though I was looking for it extensively.

What the 1.0 version brings:

  • Heart rates are added back
  • Panic mode - if the memory usage on the watch is going to hit the ceiling, the app attempts to stop everything and enter Panic mode. You will see that on the screen. Please, send me a report if you get to this state.
    This is because I’m unable to get logs out of the watch when it crashes, and you don’t know if it crashes because of a memory spike. So this is an attempt to catch the exact moment before the crash.
  • Better monitoring of the watch’s memory
  • Faster messaging
  • some UI polishes by @Joel_Balmer (thanks a lot!)
  • better checks for connection between phone and watch
  • fixed a scenario where the companion part would run all day intermittently even though sleep tracking is not running

** Things to try if it’s not working **

  • Disable heart rates - you can do that in the phone app Sleep > Settings > Wearables > Heart rate monitoring
  • Make sure that there is not battery optimization in play on your phone for the Sleep as Android and especially the Fitbit app. Look through dontkillmyapp.com for pointers for your specific hardware/Android version combination
  • Make sure the Fitbit is set up for maximum sync :slight_smile: meaning
    • in Fitbit app, All-day sync is enabled
    • in Fitbit app, Always connected is enabled
    • your Fitbit device is bluetooth paired to your phone (i.e. it can be seen when you go to the standard bluetooth menu on your phone, and has a MAC address visible when going to settings on your watch)

How to operate this thing:

I see that it is sometimes not very clear how things are intended to work from your perspective. So the intended flow to start sleep tracking is:

  • Go to the phone app and tap Start sleep tracking
  • A screen shows up saying Waiting for connection (at this moment the Fitbit server is started automatically)
  • You have 2 minutes to start the Sleep app on your watch

The app on the watch will start in “Connecting…” mode, which should switch to “Tracking…” in a little while.

When you finish tracking (either by stopping the watch app or stopping tracking on the phone), the server is again stopped for you.
So basically you don’t need to worry about the Fitbit server anymore, and the option to start it has been removed.

I’m still very eagerly reading your debug logs, they are very useful. Thanks for sending them in!

4 Likes

I have been running the new version for 4 nights now. Using the “How to operate this thing” instructions from Jiri the app starts flawlessly and the first three nights the app was running on the Versa. This morning the app on the versa was not running but the sleep was still running on the Note 9. In all four cases I did not get a graph in the morning. I will delete the app from the Versa and start from scratch tonight to see if that helps.

Hi Jiri. Had red flat line this morning. Watch icon was on phone.While testing this morning, watch Versa, app was sleeping after less than a minute but phone was saying connected. This happened when setting up last night…this did not happen when exploring new settings yesterday morning, when everything connected and stayed connected and the versa app stayed open. Many thanks.

@MiaDa could you please send me a debug log using menu > report a bug in Sleep as Android on the phone?

For me all nights since the latest update was a no data.
Yesterday did some testing and as soon as the heart icon started to blink in the phone app the watch app closes. Test it several times, including force closing the phone app and starting again.
I will reinstall the watch app today and retest tonight.

+Edit: I even disabled the HR monitoring in Sleep app and still the heart icon showed blinking when started the sleep session.

I use Ionic with Moto Z2 Force (android 8.0 latest)

Same here…
Sony XZ1 and Ionic