02-22-2018 14:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-22-2018 14:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
This is a duplicate post, but I had originally put it in a conversation that was flagged as "solved".
Operating Conditions:
1) Running current app on android and firmware on ionic.
2) I re-push the companion and app regularly as development is still ongoing.
My watchface companion does a web call to an app on the same phone (OnePlus 3T) with a web server running a JSON API endpoint. The companion then manipulates the data and sends it to the watch for data display and graph generation as well as other to-come things.
Issues:
1) Occasionally I get Socket not open when the companion tries to grab the data over an http connection. When this happens repeatedly I can successfully pull up the webpage via browser on the same phone verifying that the data source isn't the issue. Then randomly connections will start working with no changes on my side.
2) Message passing out from the phone (no messaging back yet to see if it's symmetrical issue, haven't coded it in yet) is unreliable, very unreliable. The data should be pushed out every 5 min and sometimes it will update after 6 min, 15 min, 5 min, or not for a few hours, etc. There doesn't seem to be a match to setInterval() at all. My general sync to the ionic is also unreliable (as per the display in the app), generally runs whenever I manually trigger it but even with all day polling enabled it frequently will sit with X hours since last sync. The sync issue could be a UI confusion matter as things like step counter data and sleep etc. current values are displayed on the dashboard.
I've even switched my watchface that I'm building to an app instead and that seemed to improve the web connect but I still get some occasional issues, and didn't improve the message passing reliability to speak of. Also, this really can't remain an app it needs to be a watchface so I don't lose all things like whatsapp/sms alerts, etc.
This watchface is to display Blood Glucose data from a continuous glucose monitor so the data updates MUST be timely and reasonably reliable. If I could trust that I could force the companion to stay alive but "Quiet" I'd trigger the data fetch via message from the watch which feels like a more reliable way to get time-based triggers.

02-23-2018 07:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
02-23-2018 07:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
First, are you running the latest firmware version on your Ionic as the latest companion app? We had communication issues and made great progress in fixing some of the problems we got. It's still a bit buggy, but from the tests we did and feedback from the community, it's way better!

02-23-2018 14:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-23-2018 14:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Firmware:27.311.29, app 2.66, and companion built daily generally.
I agree things did improve on this release for messaging but I suspect the root of this is the companion just deciding to shut itself down and ignore the wake timer settings, I always see "inactive" as the status of the companion when the watch-companion messaging goes sideways. It does it less with the watchface deployed as an app but it still does it.

03-02-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-02-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok, so this seems to be similar/related to an issue people reported where the companion sometimes seems to just lose it's mind when sideloading from the dev environment. Related in that I have the same problem but I don't accept "push it out again" as a fix but rather a workaround for the problem.
I still occasionally see issues trying to open sockets out from the companion to the webserver on the same phone but after firmware/app update it has reduced.

08-05-2018 08:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-05-2018 08:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am just curious about a messaging problem I am facing.
Has anyone been able to run the BART SDK Sample (https://github.com/Fitbit/sdk-bart) on an Ionic device? I am able to run it in the Fitbit OS Simulator but not as an app on my device.
I have privately published the BART App to https://gam.fitbit.com/gallery/app/205b0655-e7a2-4f2a-82a7-5110cec379b9.

08-05-2018 13:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-05-2018 13:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Does your BART app have the necessary permissions? I think the simulator ignores permissions, but real devices don't.
Gondwana Software

08-05-2018 13:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-05-2018 13:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I think so.
The packages.json looks like this:

