|0.2.7||Sep 2, 2023|
|0.2.6||Jan 18, 2023|
|0.2.5||Jun 15, 2022|
|0.2.4||Oct 2, 2021|
|0.1.0||Oct 31, 2020|
#266 in Network programming
53 downloads per month
Mijia sensor to Homie bridge
mijia-homie is a service for connecting to Xiaomi Mijia 2 Bluetooth temperature/humidity sensors
and publishing their readings to an MQTT broker following the
See the main project readme for more details and background.
It is recommended to install the latest release from our Debian repository:
$ curl -L https://homiers.jfrog.io/artifactory/api/security/keypair/public/repositories/homie-rs | sudo apt-key add - $ echo "deb https://homiers.jfrog.io/artifactory/homie-rs stable main" | sudo tee /etc/apt/sources.list.d/homie-rs.list $ sudo apt update && sudo apt install mijia-homie
Alternatively, you may install with cargo install, but that will require some more setup:
$ cargo install mijia-homie
If you have installed the Debian package, the service will be set up with systemd for you already.
Otherwise, copy the
mijia-homie binary to
/lib/systemd/system, create a
mijia-homie user to run as, and create
There should be two config files under
mijia-homie.tomlcontains the main configuration for the service, such as which MQTT broker to connect to and the name and ID of the Homie device. See mijia-homie.example.toml for an example of the settings that are supported.
sensor-names.tomlcontains a map of sensor MAC addresses to human-readable names. Only the sensors listed in this file will be connected to, so you will need to fill it in before
mijia-homiedoes anything useful. Each line should be of the form:
After editing these config files you will need to restart the service:
$ sudo systemctl restart mijia-homie.service
You may find it helpful to watch the logs to see whether it is managing to connect to your sensors:
$ sudo journalctl -u mijia-homie.service --output=cat --follow
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.