I have the following setup for collecting, persisting and visualizing temperature, humidity, moisture, light and fertility data:
- A bunch of Xiaomi’s MiFloras, MiTemps, and some ESPEasy ESP8266s
- A few Raspberry PI nodes in a Docker swarm
- Services running in the swarm:
- Mosquitto MQTT
- InfluxDB, Telegraf, Kapacitor
- Grafana + dashboards
- Portainer, Traefik
I would like to integrate HA into this setup, and need an advise on how to approach this. I see that HA has InfluxDB and Grafana integrations, but I build the cluster/swarm with an idea of hardware and software redundancy, and at the end quite happy with the result. I would like to keep in place things like how Docker, e.g. automatically restarts my MQTT server - on any available node in the cluster, and also a bunch of other things granted by Docker.
I am thinking about how to integrate HA into the existing system, and last but not least - how to use in the HA already collected data from InfluxDB, and reuse my Grafana dashboards.
I have already tried:
- HA service as one of the containers in the swarm
- Standalone HassOS node
- Installed Grafana add-on - it connects nicely to the external InfluxDB - as long as the InfluxDB container’s port is published, have imported the dashboards - everything looks good so far
- Pointing HA at my (external) MQTT server works fine in both cases - thanks to the Docker network mesh.
Now the questions is - what would be the best approach to integrate HA with the InfluxData stack running in a docker swarm?
Is there a way to make HassOS join my swarm, or connect to an external Docker network?
Thanks!