Gbcsdpd: daemon publishing measurements via MQTT (+dashboard setup)


I’ve open-sourced a simple daemon that listens for Ruuvi advertisements and published them over MQTT protocol:

It’s target platform is Linux and the only dependency is Bluez D-Bus API.

The repository also contains instruction with Terraform configuration to setup a full monitoring dashboard on Google Cloud.

I’ve started this side project around June 2020, committed some code from time to time until October 2020 when it was finished end-to-end and I’ve used successfully since then. This week I’ve only polished it a bit by adding better comments, some docs etc.

Why? Primarily it was a fun project and I was able to try out a few things :slight_smile: . More reasons are:

  • I didn’t like dependencies other collectors brought with them, eg using deprecated hcitool (I see that now there is by @jommy) or requiring some expensive runtime. This collector depends only on actively maintained official Bluez D-Bus API.
  • I wanted it to have a small footprint and be very easy to deploy. My target device for this collector is my OpenWrt router: both memory and disk usage counts. Go allows for easy cross-compilation, and still has okish footprint to run it on my router: binary is 9.2MiB and it’s using ~12MiB of RAM (bluetooth Bluez + dbus daemons consume ~70MiB). (The alternative to Go I’ve considered was C with libdbus (or just use kernel interface directly), libmosquitto and libjose as dependencies)
  • I really wanted something very, very simple: just gather measurements and push them to some other place.

While developing it I also tried out a few things:

  • Play a bit with GCP: implemented monitoring dashboard on it with Infrastructure as Code approach with Terraform. If you decrease deamon publishing frequency to eg 1 in 2 min (it’s a feature in the daemon and it’s perfectly fine for my home monitoring) it fits fully in the free tier.
  • Try out Bazel in OSS project: looking back, IMHO not worth for such a small project. Was interesting to try out anyway.

Happy to hear any feedback :slight_smile: .

1 Like

The link to your repository has a trailing period (dot) resulting in a 404

Whoops, fixed, thanks!