I just want to point out that Flic might be an option.
There may be a native binding for Flic in the future.
You would need a server with Bluetooth of cause.
And the range might be limited.
But there is already a linux library. You don’t have to use a phone to connect your Flic.