/kubernetes-zigbee-prometheus

How to use ZigBee sensors through Kubernetes

Primary LanguageGo

Sensors to Prometheus via ZigBee

This repo is for exploring how to operate ZigBee sensors in the long run using Kubernetes. I liked the "without cloud" approach of Conbee II so that's my starting point. The goal isn't primarily automation, but only a neat Grafana dashboard. Also I've learned to appreciate how many self-hosting problems Kubernetes solves, so I'm not very interested in existing high level frameworks. My approach is:

Hardware  -> Driver -> Vendor's gateway/API -> a prometheus metrics endpoint -> Prometheus -> Grafana

The current metrics container assumes access to a Deconz REST API and is therefore built as the image solsson/prometheus-deconz-exporter.

Build using docker buildx build --push(?) --tag solsson(?)/prometheus-deconz-exporter:$(git rev-parse HEAD) --platform=linux/amd64,linux/arm64 .

References

Fresh start 2022

Still on a Raspberry Pi 1. Used the imager and selected 32bit Bullseye.

Deconz version 2.13.04.

Firmware 0x26720700 md5.

Deconz installation

sudo dpkg -i ...
sudo apt --fix-broken install
sudo systemctl enable deconz

To get the API key, in the gateway click "Authenticate app" then run something like curl -X POST -H 'Content-Type: application/json' --data '{"devicetype":"local-kubernetes"}' http://192.168.3.45/api. Save the KEY.