This project provides ESPHome configurations for building a WiFi-connected digital scale using an ESP32 and an HX711 load cell amplifier. An optional configuration adds an SSD1306 OLED display for local readout.
- WiFi-enabled: Integrates with Home Assistant.
- Weight measurement: Uses HX711 and 4x half bridge load cells.
- Optional OLED display: Shows weight, date and time.
- Calibration: Instructions included in the YAML files.
- Restart switch: Remotely reboot the device from Home Assistant.
- ESP32 development board
- HX711 load cell amplifier
- 4x Half bridge load cells
- (Optional) SSD1306 OLED display (I2C, 128x64 recommended)
- Jumper wires, breadboard or PCB
- (Optional) 3D-printed or custom scale enclosure
- For a simple WiFi-connected scale.
- No display; all readings are sent to Home Assistant.
- Sensors:
- Weight (HX711, GPIO18/19)
- ESP32 chip model (text sensor)
- Includes a restart switch.
- Calibration instructions in comments.
- All features of
scale.yaml. - Adds SSD1306 OLED display (I2C: SDA=GPIO21, SCL=GPIO22).
- Displays:
- Current weight (in grams or kg depening on yaml setting)
- Current date and time
- Custom fonts for improved readability.
- Add fonts to /esphome/fonts folder in Home Assistant
-
Clone this repository and open in your favorite editor.
-
Fonts (for OLED version):
Ensure thefonts/arial.ttffile is present in thefonts/directory. -
Secrets:
Create asecrets.yamlfile with your WiFi credentials:iot_wifi_ssid: "YOUR_WIFI_SSID" iot_wifi_password: "YOUR_WIFI_PASSWORD"
-
Flashing:
- Install ESPHome.
- Flash the desired YAML to your ESP32:
-
Calibration:
- Place a known weight on the scale and follow the calibration comments in the YAML file.
- Adjust the
calibrate_linearfilter as needed for accurate readings.
-
Home Assistant Integration:
- The device will auto-discover in Home Assistant if on the same network.
- View weight and device status in Home Assistant.
- (OLED version) See real-time weight, WiFi signal, and time on the display.
- Use the "Restart device" switch in Home Assistant to reboot the ESP32 remotely.
- No readings? Double-check wiring, especially HX711 and I2C connections.
- Display issues? Confirm the OLED address (default is
0x3C) and wiring. - Calibration off? Repeat the calibration steps with a known weight.

