Balena Health: Raspberry Pi project which sends Polar 10 Bluetooth Low Energy sensor data to MQTT, InfluxDB & balenaCloud

Last Updated on January 1, 2023 by pg@petergamma.org

  • Balena Health can be found on Ryan Hampton GITHUB:

https://github.com/rhampt

Ryan Hampton, MBA is Lead Sales Engineer and Customer Success Manager at Balena

https://www.linkedin.com/in/hampton-ryan/

Ryan Hampton is Master of Business Administration MBA & Bachelor of Science in Engineering & Computer Engineering, University of Michigan

  • We usually don t code, as you can see on our GITHUB page:

https://github.com/PeterGamma

  • But all the same, we have more followers on our GITHUB page than Ryan Hampton:

https://github.com/rhampt

  • But this does not say anything about the quality of Ryan Hamptons Balena Health Raspberri Pi.
  • Ryan Hampton wrote a long blog post about Balena Health:

https://www.balena.io/blog/build-heartrate-monitor-using-raspberry-pi-and-balena/

  • Balena Health supports any Low-Energy Bluetooth (BLE) heart rate monitor that conforms to Bluetooth SIG’s Service Schema, specifically tested with the Polar H10 BLE heart rate device.
  • It includes a time-series graph over a persisting database to see heart rate over time with InfluxDB & Grafana
  • Balena Health runs BalenaOS on Raspberri Pi:

https://www.balena.io/os/

  • The service runs a Node application that receives HR data over BLE and routes it to the MQTT broker
  • It has a Python app that receives live heart rate from the MQTT broker and outputs it to the E-Ink display attached to your Raspberry Pi.
  • It receives MQTT messages and forward them to the display in real time.
  • The Influxdb service is used for building historical heart rate database.
  • It has a Grafana dashboard
  • the instruction has pictures wich are of good quality
  • also the blog is written also for people which usually don t code
  • the device is supported by Ryan Hampton
  • In contrast Reto Röllins Raspberri Pi which sends ANT+ sensor data to an MQTT broker:
  • which is legally protected:
  • BalenaHealth is a free software, and may be redistributed under the terms specified in the License:

https://github.com/rhampt/balena-health/blob/main/LICENSE

  • The blog page with great dashboards was written by Ryan Hampton, product builder at balena:

https://www.balena.io/blog/build-heartrate-monitor-using-raspberry-pi-and-balena/

  • We can expand on balenaHealth and submit pull requests to the repo, we can ask questions in the comments, and there is also a Balena forum:

https://forums.balena.io/latest

Software required:

  • a free balenaCloud account, your first ten devices are free and fully-featured, perfect for small-scale projects like this one
  • When the device boots for the first time, it connects to the balenaCloud dashboard, after which you’ll be able to see it listed as online.

As in Dave Lustys (Microsoft UK) demo with the Garmin Fenix 5 EventHubApp Azure Cloud Power Bi, the Balena Health gives an alarm when the heart rate is too high. This is a very basic stress monitor. A stress monitor which is a bit advanced is the stress feature of Firstbeat on Garmin watches. We tested it during practicing breath meditation with a Venu watch and the Yoga protocol which shows respiration rate and stress. Both parameters dropped during practicing breath meditation and are very colorful in Garmin Connect. Unfortunately, the respiration rate of Garmin watches is inaccurate and the algorithms how Firstbeat measures stress not published. Also stress values vary strongly when two Garmin watches are used simultaneously. Devices like Balena Health or the Microsoft Azure Cloud Power Bi demo are new tools to further develop such stress metrics. An implementation of HRV and R-R peak data, which can also be obtained from a Polar H10 chest strap, would be helpful for this purpose.