Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Raspberry Pi Ant+ script which sends sensor data to a MQTT-Broker

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

This is a great script which makes it possible to send ANT+ sensor data to a MQTT-Broker
in the Web or on a device. It can be used to send sensor data to Matlab, Python or other applications. To my knowledge, there was no standart path to stream sensor data to such applications to this date.

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

It takes a lot of time to copy and paste the script from Retos site to a file.

Did someone already use the script and has it copied to a a file or to a Github account?      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

A post of mine was also not published at Reto s site who developed the Raspberry Pi Ant+ script which sends sensor data to a MQTT-Broker. So I post it here.

I miss a community which is interested in the developement of this script. I m posting here as long at is not deleted.

I asked Reto to put the script on a Github site. The risk of making copy mistakes is lesser. I answered by e mail that he will be doing it eventually later on.

There are several scripts and devices which are interesting for me personally. Next to the Raspberry Pi Ant+ script which sends sensor data to a MQTT-Broker, it is also the

QBIKE ANT+ Cycling Training on Raspberry Pi

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

and the Pinephone.

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

It would be great to have those scripts together for instance in a ANT+ distro for the Pinephone and also if we could avoid to have multiple copys of that script would be fine.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

MQTT is well supported in Matlab, Python, there many Android apps for MQTT, there are MQTT brockers in the web, MQTT can be used for Windows, Linux, Rasperri PI, etc.

THIS IS ANT generally recommended an ANT+ stick for desktop applications. But which windows or Linux applications are available which support ANT+ sticks? Has everybody to reinvent the wheel and build a bridge between ANT+ sensors and desktop applications from scratch, when he wants to use ANT+ sensors with desktop applications?

The Rasperri PI script which sends sensor data to an MQTT is a helpful bridge between ANT+ sensors and Windows or Linux applications over MQQT. Can it become a standard script for all kind of applications?

Can the Rasperri PI script which send sensor data to an MQTT brocker be modified to use it for BLE sensors?      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

I miss an ANT+ and BLE Android application with MQTT support. Ask Ifor Powell to integrate this script it into IpBIke:

http://www.iforpowell.com/cms/index.php?mact=Forum,m862f6,topic,1&m862f6prev_link=default&m862f6fid=2&m862f6tid=653&m862f6post_pagenumber=1&m862f6returnid=73&page=73

I did it already.

     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Matlab supports MQQT, and there is support for MQTT in the Matlab community, You don t have to have Matlab to ask questions ins the Matlab community:

https://ch.mathworks.com/matlabcentral/answers/588937-can-a-rasperri-pi-be-used-to-send-ant-and-bluetooth-low-energy-sensor-data-over-mqtt-to-matlab?s_tid=prof_contriblnk
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

I m promoting a connection between ANT+ & BLE sensors and desktop applications. Matlab support BLE and has an example for BLE sports sensors:

https://ch.mathworks.com/help/matlab/import_export/collect-data-from-fitness-monitoring-devices.html

What is missing is a well accepted connection of ANT+ & BLE sensors to desktop applications over a mobile device. Who wants to carry around a laptop for sporting activites? Matlab supports MQTT since release 1997B:

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

no additional Matlab toolboxes are necessary for this. Matlab home version with support for BLE and MQTT is 150 USD.
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

post deleted by Peter Gamma


     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Data protection of Reto Rölli Rasperri ANT+:

https://infinityflow.ch/datenschutzerklaerung/
     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Reto Rölli writes in his blog:

«For me, the Raspberry Pi Ant + is a pure hobby story and should stay that way.
At the moment I'm not developing the Raspberry Pi Ant + any further, because I use the Home Assistant to get the data I need to control the fan and the LED strip directly from Zwift.»

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

Reto Röllins data protection is very strict:

«The copyright and all other rights to content, images, photos or other files on the website belong exclusively to the operator of this website or the specifically named rights holders. The written consent of the copyright holder must be obtained in advance for the reproduction of all files.

Whoever commits a copyright infringement without the consent of the respective rights holder can make himself liable to prosecution and possibly liable for damages.«

https://infinityflow.ch/datenschutzerklaerung/

I was suprised by his data protection site, which I saw only now. Part of Reto Röllin s project reminds of the blog of or Andreas Bader: «Track Your Heartrate on Raspberry Pi with Ant+»:

https://johannesbader.ch/blog/track-your-heartrate-on-raspberry-pi-with-ant/

Reto Röllin wrote me, that he does not know Andreas Baders project. I could not find a data protection site on Andreas Baders blog.

Reto Röllin writes at the end of his code example «quick and dirty». What did he mean by "quick and dirty? I am confused.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Here is an alternative source for script with a Rasperrri PI which sends sensor data to an MQTT broker: "Raspberry Pi running a Python app that reads data from a couple of sensors then publishes their readings to an MQTT broker"

https://www.ibm.com/mysupport/s/question/0D50z00006PE6zk/how-do-i-get-raspberry-pi-to-publish-sensor-data-to-iot-foundation?language=de

but I don't know anything about the legal situation of this example.      

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Calculated power and autostart of Reto Röllins Rasperri ANT+ script reminds of the script of
Darren Hague s ANT+ Virtual Power Meter:

https://github.com/dhague/vpower

Darren Hague s ANT+ Virtual Power Meter can be modified for other purposes, for instance heart rate:

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

and seems to have a community which is alive:

https://github.com/dhague/vpower/issues?q=is:open+is:issue

     

Signature

Peter Gamma

Avatar
RankRankRankRank

Total Posts: 243

Joined 2018-09-10

PM

Here is a detailed instruction for a radio communication between Raspberry Pi and MQTT broker:

https://tutorials-raspberrypi.de/datenaustausch-raspberry-pi-mqtt-broker-client/

It is a blog in german. Reto Röllin s blog is also in german. Did Reto folk his MQTT code from this blog?      

Signature

Peter Gamma