How To Connect OpenBCI to Home Assistant?

Last Updated on October 9, 2022 by pg@petergamma.org

Dave Lusty from Microsoft UK (DaveDoesDemos) developed the Garmin watch EventHubApp Micosoft Azure Cloud Microsoft PowerBI pathway to access the heart rate in real-time from a Garmin watch, and was one of the pioneers, who helped us to solve the problem to access sensor data from sports sensor devices.

Another pioneer was Adafruit with the Pyloton CircuitPython Cycling Computer, which was also very helpful to us, a great instruction.

Dave Lusty adviced us, to get sensor data into Matlab, we should connect the Rest API of Microsoft Power Bi to Matlab. Dave Lustys instruction with the Fenix 5 was the first instruction, which was helpful to solve our problem. Unfortunately, whe stuck to get the EventHubApp to work on a Garmin Fenix 5.

Now, whe are facing another problem to get sensor data from OpenBCI to Home Assistant and Influx. Home Assistant is not urgently necessary for our purposes. But HA is the second most active Python application, and there are already several integrations and instructions for several consumer grade sports sensor companies, to get their sensor data into HA. Therefore, HA is our fist choice.

As described here in this blog, we are struggling with the problem how to do this. We described several solutions. There is no straightforward solution in sight yet or tested, according our own little experience.

If nothing works, we could also try to connect the OpenBCI WiFi Shield API to the Home Assistant RESTful API:

https://developers.home-assistant.io/docs/api/rest/

Developers which a lot of coding skills and time welcome. We currently lack both skills and time.

To directly connect OpenBCI to Home Assistant is also a risk. Home Assistant is free, continuously developed further, we do not know whether it is stable. Another possibility is, to connect the OpenBCI sensor stream directly to InfluxDB. This is eventually saver, if we do not depend on code from other applications. Since there is a Plugin in Home Assistant for InfluxDB, there is a InfluxDB for HA, and we can stream our sensor data directly to the InfluxDB of HA.