Mozilla IoT + Puck.js

Hi every one. Being very new to the Mozilla IoT sphere, I was looking at connecting a few Puck.js modules (BTLE). I’m using a Raspberry Pi 4 as the gateway.
I’m not too sure how to go about it or where to start. Are there any beginner notes or examples that I can refer to?
Many thanks in advance.

Neat! Those look a lot like the Flic button.

If you want to write an adapter for them, I’d probably just take one of the existing Bluetooth adapters and start from there.

These all use noble to do the Bluetooth comms, which you’d probably want as well:

The Flic adapter does not use noble, but it does present a button device:

What you’ll want to do is this:

  1. Clone one of those into ~/.mozilla-iot/addons
  2. Change code as necessary
  3. Restart your gateway via sudo systemctl restart mozilla-iot-gateway
  4. Enable the adapter in the UI via Settings -> Add-ons

After that point, you can just do this:

  1. Change code
  2. Disable, then Enable, the adapter in Settings -> Add-ons
  3. Rinse and repeat