The ESP32, a significant upgrade over the ESP8266, offers several advantages, including support for Wi-Fi, Bluetooth, and Bluetooth Low Energy (BLE). Leveraging these features, ESPHome has introduced support for the Xiaomi Mi Smart Scale and Xiaomi Mi Smart Scale 2 in its latest release, version 1.17.0.
Contents
Expanding Support for Xiaomi Devices
With ESPHome and an ESP32, you can integrate various BLE devices from Xiaomi and its partners. Previously, integrations included the Mi Flora for plant soil monitoring, several hygro-thermometers with LCD and e-paper screens for climate tracking, and a smart mosquito repellent. The addition of the Xiaomi Mi Smart Scale and Xiaomi Mi Smart Scale 2 expands this support further.
Integrating the Xiaomi Mi Smart Scale with ESPHome
The new integration supports both the Xiaomi Mi Smart Scale and the Xiaomi Mi Smart Scale 2. The main difference is that the second version includes impedance measurements, which are also read by ESPHome. To set up ESPHome to communicate with the scales, you need the scale's MAC address. A detailed guide on finding the MAC address is available on the ESPHome website.
Here's a basic configuration example:
sensor:
- platform: xiaomi_miscale2
mac_address: '5C:CA:D3:70:D4:A2'
weight:
name: "Xiaomi Mi Scale Weight"
impedance:
name: "Xiaomi Mi Scale Impedance"
To track the weight of multiple users, you can use lambda. An example setup is available on the ESPHome integration page. You will need to know the weight ranges of each user and set up a template for each.
Analysing Body Composition with the bodymiscale Custom Component
Knowing your weight is important, but it doesn't provide a complete picture of your health. The Xiaomi Mi Smart Scale 2 measures impedance, but interpreting these results can be challenging. To address this, a developer has created a custom component called bodymiscale, available through HACS. This component provides detailed metrics such as lean body mass, body fat, water weight, bone mass, and muscle mass. While not as precise as clinical tests, it gives a useful overview of your health.
Why Use the Xiaomi Mi Smart Scale with ESPHome Instead of the App?
The primary reason for integrating the Xiaomi Mi Smart Scale with ESPHome instead of using the official app is privacy. Weight and health data are sensitive, and Xiaomi has previously been caught sharing private data . By using ESPHome, you avoid sharing data with Xiaomi's services. Note that without the app, you cannot update the Xiaomi Mi Smart Scale's firmware.
Using ESPHome to collect data from your scales also allows for creative automations. For instance, you could set up an automation to play a specific song when you reach your goal weight.
Conclusion
The addition of Xiaomi Mi Smart Scale support in ESPHome enhances its versatility and privacy. With the ability to integrate multiple users and detailed body composition analysis, it offers a comprehensive health monitoring solution without relying on external apps and services.
hello where is the configuration for multiple people?
Hello there. You will find an example on the ESPHome website.