Adding option to live stream of sensor data to Matlab or Python trough a MQTT Brocker
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.
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/
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:
- Example code from Reto, modify it and integrate it into a training tracker:
https://infinityflow.ch/raspberry-pi-ant/
- install a MQTT brocker on target PC:
https://mosquitto.org/download/
-
Connect to Android ad hoc network from windows PC:
-
Connect to Matlab MQTT:
https://www.mathworks.com/matlabcentral/answers/300785-does-matlab-support-mqtt
- connect to Matlab example code:
https://youtu.be/Ercd-Ip5PfQ
- Or connect to Python MQTT:
https://pypi.org/project/paho-mqtt/
- connect to Python example code:
https://www.youtube.com/watch?v=GIywmJbGH-8
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.
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/
Highway to Matlab:
https://ch.mathworks.com/matlabcentral/answers/585593-adding-mqqt-to-the-ant-and-ble-a-training-tracker-app-a-for-real-time-stream-to-matlab?s_tid=prof_contriblnk
developers wanted.
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:
or data from the BItalino mobile app:
https://forum.bitalino.com/viewtopic.php?f=19&t=627
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.