Peter Gamma (Physiologist & Director) Meditation Research Institute Switzerland (MRIS)

Export Sensor Data from Apple Health to Home Assistant and MQTT

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

Applehealth Autoexport

https://www.healthyapps.dev/health-auto-export

https://community.home-assistant.io/t/applehealth-autoexport/419983

According to the Home Assistan community, the best option is 1.99 for a lifetime subscription. Applehealth Autoexport can export to any REST API, MQTT Broker, Home Assistant or Dropbox.

According to Rob ter Horst, Apple watches are in a league of it s own as far as accuracy of their optical heart rate monitors is concerned. And now also as far as sleep tracking accuracy among consumer grade sports watches is concerned:

But if we want a really accurate sleep tracking device, whe choose an EEG device. Dreem 2 which has been validated scientifically is not available anymore for the consumer market. The Muse S has also 4 electrodes as the Dreem 2, it tracks sleep duration and sleep score. It is hard to believe that medical doctors as the developers of the Muse S and the developer of the Dreem 2 are, develop their own sleep tracking algorithms. Therefore we suppose that the accuracy of the Dreem 2 headband and Muse S headband are in the same range.

Better is to choose this device based on OpenBCI:

with this software:

We promote the idea of a software platform to stream in sensor data for accuracy studies to this platform:

But if we are looking for a mobile platform, it is better to avoid devices with LabStreamingLayer interface and with only Home Assistant support. The state of our current own software developement lets us conclude, that both LabStreamingLayer and Home Assistant require a x86 platform.

Currently, the developement platform of our institute consist of these two devices:

1. A LattePanda x86-64 running a LabStreamingLayer interface to OpenBCI modules. The x86 platform is required for Python LSL.

2. A HP Compaq 8100 ELITE running Home Assistant with a x86-64, which is required for an easy installation of HA via flashable image, which allows the installation of a plugin which allows editing of the HA YAML files. HA YAML file editing is required for many sensors to connect to Home Assistant.

3. Both devices are connected over an ethernet cable.

Unfortunately, this setup is not very mobile.

If our goal is a mobile platform, it is better to avoid LabStreamingLayer interfaces and Home Assistant interfaces. It is better to chosse MQTT as an interface and connect the devices directly to InfluxDB without Home Assistant. Then, our mobile setup can run on this device:

https://petergamma.org/for-features-we-miss-on-a-linux-phone-we-choose-a-rasperry-pad-5/

Such a setup is better for mobile use.