Microservice for collecting and processing data from Govee bluetooth hygrometers.
Immediately after launch the service starts listening for BLE advertisement data
from the devices defined in ~/.govee_devices.toml
.
The collected data is accessible via gRPC.
Proto file: proto/service.proto.
-
Checkout the repository:
git clone --recurse-submodules https://github.com/Samarkin/govee_collector cd govee_collector
-
Prepare
.govee_devices.toml
in your home directory.For example:
[GVH5075_6A19] friendly_name = "Living Room"
-
Build and run:
cargo run
Govee provides a smartphone app, that is good enough for most people,
but it requires creating an account and storing data in the cloud to
access the most interesting features.
As a privacy freak advocate, I'm planning to achieve the same functionality
by collecting and processing the data on a local Raspberry Pi
(or any other 24/7 Linux or macOS machine).
The service officially supports macOS and Linux, but since all tools and libraries that I use are cross-platform, it could work on other OS's too – give it a try.
To use Bluetooth on macOS Big Sur (11) or later, you need to either package your
binary into an application bundle with an Info.plist
including
NSBluetoothAlwaysUsageDescription
, or (for a command-line application such as
the examples included with btleplug
) enable the Bluetooth permission for your
terminal. You can do the latter by going to System Preferences → Security &
Privacy → Privacy → Bluetooth, clicking the '+' button, and selecting
'Terminal' (or iTerm or whichever terminal application you use).
On macOS, you can use HomeBrew:
brew install protobuf
On Raspbian, similarly:
sudo apt-get install protobuf-compiler
Also, you can download the latest version of protoc
here:
https://github.com/protocolbuffers/protobuf/releases