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:
- https://github.com/tim-hellhake/mi-flora-adapter
- https://github.com/tim-hellhake/ruuvitag-adapter
- https://github.com/tim-hellhake/medisana-ks250-adapter
- https://github.com/tim-hellhake/xiaomi-temperature-humidity-sensor-adapter
The Flic adapter does not use noble
, but it does present a button device:
What you’ll want to do is this:
- Clone one of those into
~/.mozilla-iot/addons
- Change code as necessary
- Restart your gateway via
sudo systemctl restart mozilla-iot-gateway
- Enable the adapter in the UI via Settings -> Add-ons
After that point, you can just do this:
- Change code
- Disable, then Enable, the adapter in Settings -> Add-ons
- Rinse and repeat
Thanks for the information.