11-08-2022 09:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-08-2022 09:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I wanted to show real-time heart rate on my Django app, but I am also using the web API to show various summaries.
How can I use both to get to the desired goal?

11-08-2022 11:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-08-2022 11:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The Web API doesn't provide real-time data. It only updates after the device syncs, which can be every 20 minutes or so.
If you really want real-time data, you'll need to use the device and companion APIs. You'll probably also need to write some server code to receive the data (perhaps within your Django app). The comms are difficult.
Gondwana Software

11-08-2022 11:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-08-2022 11:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you for a quick response.
I have not been able to find any way to integrate Companion API with my Django project. It would be great if you could guide me in the right way.

11-08-2022 11:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-08-2022 11:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The companion can only communicate using fetch() or WebSocket. WebSocket is probably better suited to real-time streaming. You'll need to write server code somewhere to receive the fetch() requests or WebSocket messages.
Be warned that you may need to use https/wss, rather than http/ws, depending on where the server is running.
Gondwana Software

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

11-08-2022 13:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you so much for the help. I will try it out and get back to you if it worked.

