
ble2mqtt
Bluetooth Low Energy (BLE) to MQTT gateway.
Install
There are various ways of installing the application.
Precompiled binaries
Precompiled binaries are available in the release section. Using the latest production release binary is the recommended way of installing ble2mqtt
.
A systemd
service unit file and an example configuration file are also available.
Building from source
Clone the repository:
git clone https://gitlab.com/s-sebastian/ble2mqtt.git
cd ble2mqtt
You can use the go
tool to build and install the ble2mqtt
binary into your $GOPATH/bin
:
go install gitlab.com/s-sebastian/ble2mqtt/cmd/ble2mqtt/...
ble2mqtt run --config configs/config.yml
You can also build using make build
:
make build
./bin/ble2mqtt run --config configs/config.yml
The Makefile provides several targets:
make help
Usage:
build build the application
build-all cross compile the application for multiple architectures
release create a release archive for all platforms
test run only short tests
test run all tests
lint run golint
fmt run gofmt on all source files
unused run check for unused/missing packages
clean cleanup
help print this help message
Web UI
ble2mqtt
includes a simple web UI to display devices. The UI can be enabled with the -u
or --ui.enabled
flag. By default, the web server listens on port 8080
, but a different address can be specified using the -a
or --ui.addr
option:
ble2mqtt run --ui.enabled --ui.addr ":8080"
Alternatively, the same settings can be defined in the configuration file (config.yml
):
ui:
addr: :8080
enabled: true
License
MIT License, see LICENSE.