Share last workout via MQTT (to be displayed in home assistant) #1338

Open
by adrianalin opened 3 years ago · 5 comments
adrianalin commented 3 years ago (Migrated from github.com)
Owner

Before requesting a new feature, please confirm the following:

  • I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
  • I have searched the issues, and I didn't find a solution to my problem / an answer to my question.
  • If you upload an image or other content, please make sure you have read and understood the github policies and terms of services

Your issue is:

Sync last workout (GPS track, HR data, etc...) via mqtt with home assistant ( or other consumer app).
If applicable, please attach logs

Your wearable device is:

Amazfit bip.
Please specify model and firmware version if possible

Your android version is:

7.1

Your Gadgetbridge version is:

0.31.1

New requests about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.

#### Before requesting a new feature, please confirm the following: - [x] I have read the [wiki](https://github.com/Freeyourgadget/Gadgetbridge/wiki), and I didn't find a solution to my problem / an answer to my question. - [x] I have searched the [issues](https://github.com/Freeyourgadget/Gadgetbridge/issues), and I didn't find a solution to my problem / an answer to my question. - [x] If you upload an image or other content, please make sure you have read and understood the [github policies and terms of services](https://help.github.com/articles/github-terms-of-service/#1-responsibility-for-user-generated-content) #### Your issue is: Sync last workout (GPS track, HR data, etc...) via mqtt with [home assistant](https://github.com/home-assistant/home-assistant) ( or other consumer app). *If applicable, please attach [logs](https://github.com/Freeyourgadget/Gadgetbridge/wiki/Log-Files)* #### Your wearable device is: Amazfit bip. *Please specify model and firmware version if possible* #### Your android version is: 7.1 #### Your Gadgetbridge version is: 0.31.1 *New requests about already solved/documented topics could be closed without further comments. Same for too generic or incomplete reports.*
jds commented 1 year ago

Yeah, this would be fantastic. Related to this, I thought there was an autoexportdb in the works, but don't see it now. Never mind---found it.

Yeah, this would be fantastic. ~~Related to this, I thought there was an autoexportdb in the works, but don't see it now.~~ Never mind---found it.

A companion app that would take the DB and upload it to a provider of people's own choice would be really nice I guess.

A companion app that would take the DB and upload it to a provider of people's own choice would be really nice I guess.
jds commented 1 year ago

Yeah, I am thinking about this. There are probably multiple ways to automate copying the database to your own server. But which would way would be the most robust, so that was useful to most users? The MQTT is a great standard, so would be very useful to many. It is also really designed for low-power, low-bandwidth devices. There are works for communication between Android and MQTT:

https://github.com/eclipse/paho.mqtt.android
https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en_US

But these seem to be about making your phone a lient to read the devices.
I found this example about turning your phone into an MQTT device (what we are talking about here):

https://developer.ibm.com/technologies/iot/tutorials/iot-mobile-phone-iot-device-bluemix-apps-trs/

It is specifically for an IBM MQTT broker, but that should not matter too much.

Yeah, I am thinking about this. There are probably multiple ways to automate copying the database to your own server. But which would way would be the most robust, so that was useful to most users? The MQTT is a great standard, so would be very useful to many. It is also really designed for low-power, low-bandwidth devices. There are works for communication between Android and MQTT: https://github.com/eclipse/paho.mqtt.android https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en_US But these seem to be about making your phone a lient to read the devices. I found this example about turning your phone into an MQTT device (what we are talking about here): https://developer.ibm.com/technologies/iot/tutorials/iot-mobile-phone-iot-device-bluemix-apps-trs/ It is specifically for an IBM MQTT broker, but that should not matter too much.

But which would way would be the most robust, so that was useful to most users?
The MQTT is a great standard, so would be very useful to many.

A multi-protocol implementation would really be the most useful. MQTT would work great for things like home automation software, but I suspect that some other solution for long-term storage and displaying activity data would be better.

But these seem to be about making your phone a lient to read the devices.

The Eclipse Paho library supports writing (MQTT people call it "publishing").

> But which would way would be the most robust, so that was useful to most users? > The MQTT is a great standard, so would be very useful to many. A multi-protocol implementation would really be the most useful. MQTT would work great for things like home automation software, but I suspect that some other solution for long-term storage and displaying activity data would be better. > But these seem to be about making your phone a lient to read the devices. The Eclipse Paho library supports writing (MQTT people call it "publishing").
jds commented 1 year ago

I think you are right. There are other home automation implementations that just read existing sqlite databases made for other purposes. In that case, it looks like it is just automatically copying the database to a server. In my case, that should be possible with ftp or KDEconnect.

I think you are right. There are other home automation implementations that just read existing sqlite databases made for other purposes. In that case, it looks like it is just automatically copying the database to a server. In my case, that should be possible with ftp or KDEconnect.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.