Last Updated on September 14, 2022 by pg@petergamma.org

We wrote a «Review of Accuracy Studies of Consumer Grade Heart Rate Monitors»:

For our purpose, a motion-artifact free ECG reference device would be very helpful. We can choose an Adinstruments Equivital for it:

or an OpenBCI ECG device:

Would it not be great to have all the sensor data from our different devices in one InfluxDB? We suggested this device to achieve this:

We tried to build it, but it is difficult. We installed three different version of Home Assistant. We had to choose a x86 platform for our installation, since we needed to edit the HA .yaml files, and this was only easily possible on this platform.

We finally where able to edit the HA .yaml files. We copied there the code for a TEMPer USB temperature sensor, for which a Home Assistant installation is available:

https://www.home-assistant.io/integrations/temper/

but we where not able to get it to work. To find an easy device for Home Assistant which works out of the box, we became interested in Ikea TRÅDFRI devices. These are affordable, and there are instructions on Youtube which demonstrate how to get those to work in Home Assistant. We certainly will keep a PC with Home Assistant running on it and test it further.

But according to our own little experience, Home Assistant is not easy to understand, and it is rapidly changing. And is it stable as a data acquisition platform?

Is there no easier solution? It is time to go one level deeper and to start looking at the codes, since HA is not far from code.

There are a lot of instructions availalbe to learn how MQTT works and to send heart rate sensor data for instance to Ubdots. But is there no example available for sports sensors? Looking for that, we found this one:

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

The instruction looks complicated at first sight. But it reminded us to other Rasperri PI projects we reviewed before. We suppose the easiest way to stream sports sensor data into an InfluxDB is to use a Rasperri PI with MQTT for it. Great coders resently used a Rasperri PI to the Polar H10 heart rate to the balena Cloud.

We have studied the instructions of 4 Rasperri PI projects, which were all developed by coders on the highest level. If we really want a device which offers us all posibilities, we think it is worth to study these four Rasperri Pi s. If we understand the code, then our problem is solved. And the basic code which runs on the Rasperri PI is quiet simple, as far as we have studied it.

If we deside to use a Rasperri PI with MQTT for our project, and to study and to understand the code. Is it then not the best solution only to use MQTT for all devices?

There is a LabStreamingLayer interface available for OpenBCI, which is well established, and was used several times. But the LSL Python code requires also an x86 platform, which is a limitation for mobile devices.

There is also an MQTT instruction available for OpenBCI which requires the OpenBCI WIFI shield. Links to it can be found on this blog.

The OpenBCI WIFI shield needs a little bit of soldering, but it is said to be not such a big task. And the OpenBCI MQTT code hopefully runs also on it, after some effort:

https://openbci.com/forum/index.php?p=/discussion/3419/mqtt-route-not-found#latest

The OpenBCI WIFI shield is unavailable from OpenBCI since several years, and it may or may not come back, according to William Croft from OpenBCI. But it also can be found here:

https://www.aliexpress.com/item/1005002276107697.html?spm=a2g0o.productlist.0.0.71b06c6a85BgOI&algo_pvid=7f4689bb-578d-4150-8227-2de6ffd9f8dc&algo_exp_id=7f4689bb-578d-4150-8227-2de6ffd9f8dc-22&pdp_ext_f=%7B%22sku_id%22%3A%2212000019873552165%22%7D&pdp_npi=2%40dis%21USD%2192.87%2185.44%21%21%21%21%21%40210318be16631393285938038e9049%2112000019873552165%21sea&curPageLogUid=8uKOKsBm6TV9