Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to live stream of sensor data to Matlab or Python trough a MQTT Brocker #34

Open
PeterGamma opened this issue May 17, 2020 · 8 comments

Comments

@PeterGamma
Copy link

To my knowledge, there is no live stream application of ANT or BLE sensor data to Matlab or Python available to this date. Integration of the following code could solve this problem

https://www.thisisant.com/forum/viewthread/7360/

it is a script for the Rasperri Pi, which also should work on Linux. I don t know wether it is possible to integrate this script into a training tracker, or part of the script. But I miss such a stream and It would be great to have it integrated into a training tracker.

@PeterGamma
Copy link
Author

I started a new threat in the Garmin Forum about a training tracker
https://forums.garmin.com/apps-software/mobile-apps-web/f/garmin-connect-web/226152/does-someone-work-on-the-android-application-a-training-tracker/1068421#1068421
Someone had troubles with my posts in the Garmin forum, reason unknown. My posts are in the range of other posts in the Garmin Forum. Posting is also possible here
https://www.thisisant.com/forum/viewthread/7363/

@PeterGamma
Copy link
Author

PeterGamma commented May 19, 2020

A well documented interface for a sensor stream from ANT and BLE sensors to Matlab or Python is missing. A training tracker with integrated MQTT script could solve this problem

Matlab supports MQTT

https://ch.mathworks.com/matlabcentral/answers/300785-does-matlab-support-mqtt

and also Python

https://pypi.org/project/paho-mqtt/

What you need for this:

  1. Example code from Reto, modify it and integrate it into a training tracker:

https://infinityflow.ch/raspberry-pi-ant/

  1. install a MQTT brocker on target PC:

https://mosquitto.org/download/

  1. Connect to Android ad hoc network from windows PC:

  2. Connect to Matlab MQTT:

https://www.mathworks.com/matlabcentral/answers/300785-does-matlab-support-mqtt

  1. connect to Matlab example code:

https://youtu.be/Ercd-Ip5PfQ

  1. Or connect to Python MQTT:

https://pypi.org/project/paho-mqtt/

  1. connect to Python example code:

https://www.youtube.com/watch?v=GIywmJbGH-8

@PeterGamma
Copy link
Author

PeterGamma commented Aug 12, 2020

It is possible to stream sensor data to Influx data base through MQTT.

https://www.influxdata.com/integration/mqtt-monitoring/

Influx database is helpful to have synchronized sensor data from multiple devices.

I use a training tracker and the Mind Monitor app for the Muse Meditation headband. Both are research grade apps. But to get the sensor data synchronous is difficult.

I m promoting a solution to have a Linux Pinephone with a distro physiological sensors. It should be possible to run a training tracker and Mind Monitor on the Pinephone. But how to get all these sensor data synchronized? Influx data base could solve the problem.

@PeterGamma
Copy link
Author

PeterGamma commented Aug 14, 2020

With MQTT brocker and the open source Infux Data Base, Grafana can be used to visualize data:

https://diyi0t.com/visualize-mqtt-data-with-influxdb-and-grafana/

@PeterGamma
Copy link
Author

And combine a Training Tracker sensor data with sensor data from other applications like Mind Monitor:

https://ch.mathworks.com/matlabcentral/answers/585584-adding-mqqt-to-the-eeg-mind-monitor-app-for-a-real-time-stream-to-matlab?s_tid=prof_contriblnk:

@PeterGamma
Copy link
Author

or data from the BItalino mobile app:

https://forum.bitalino.com/viewtopic.php?f=19&t=627

@PeterGamma
Copy link
Author

The Polar Sensor Logger app supports sensor data forwarding using MQTT-protocol. The Mind Monitor app developer James Clutterbuck says, MQQT is a possibility for the future. It would be great when data forwarding using MQTT-protocol becomes a standard for android sensor apps. MQTT has good support for Influx database. All sensor data in one influx database, this is my vision. I am a physiologist, and not a programmer, so I won t code it myself. Until this vision comes true, I can live with importing .csv files from a training tracker to my database software. For importing data from my Stryd foot pod, I could no find an easier way.

@PeterGamma PeterGamma changed the title Adding option to live stream of sensor data to Matlab or Python trough a MQQT Brocker Adding option to live stream of sensor data to Matlab or Python trough a MQTT Brocker Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant