Cat Scale Integration 🐱 – Monitor Cat’s Health with a DIY weight sensors under litter box

Hi everyone,

I’ve been working on a Home Assistant integration for a simple yet interesting idea: using weight sensors under your cat’s litter box to track their weight and other metrics. I wanted to share it here in case anyone else finds it useful or has ideas to improve it.

The integration allows you to:

  • Detect when your cat enters and leaves the litter box.
  • Measure your cat’s weight each time they visit.
  • Calculate the weight of any “waste” left behind.
  • Track baseline changes (e.g., litter added or removed).

This setup could help you monitor your cat’s health over time or spot unusual behavior (like a decrease in visits or changes in weight). It’s built as a custom sensor and works with any weight sensor that integrates with Home Assistant.

It’s a bit WIP still though, any thoughts are welcomed
image

6 Likes

This is such a great idea! Thanks for sharing this. I’ve been thinking about doing something like this to track our cats’ litter box habits. We actually have two cats and two litter boxes, so it would be really helpful to support multiple cats by identifying which cat is using the litter box based on their weight (not too difficult for our cats who have quite different weights). And maybe a way to aggregate usage of multiple litter boxes.

1 Like

Amazing! I just had the idea to build something like this.

Will you add images of the hardware side?
I know it should be a modular integration but it would be nice to have an example

1 Like

Nice, was just looking at something like this. This should work with an off-the-shelf smart scale that connects to HA? I’m looking at buying a Xiaomi’s Mi-Scale 2 which seems to be well regarded for HA integration.

I just built this myself, here are some pictures and info on the hardware i used:

I went for some m5stack hardware:

  • m5stack scales kit
  • nano-c6
  • Some raspberry pi usb-c charger for power
  • 2 wooden plates, in my case 25x40x1.9cm, cut for me at my local diy store.
  • some cheap 2 euro anti slipping mat from the same diy store
  • double sided tape
    Setting this up was very straightforward:





Pictures might speak for itself here, mainly what i did was that between every layer i cut out some antislipping mat to make sure things wont start moving when the cat jumps out of the litter box, so bellow my gravel collecting mat, then between that mat and my scale, and between my scale and the litterbox.

Setting this up in esphome was also straightforward:

esphome:
  name: kattenweegschaal
  friendly_name: kattenweegschaal

esp32:
  board: esp32-c6-devkitm-1
  variant: esp32c6
  framework:
    type: esp-idf
    version: 5.3.1
    platform_version: 6.9.0
    

# Enable logging
logger:

web_server:
  port: 80

# Enable Home Assistant API
api:
  encryption:
    key: !secret encryption_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kattenweegschaal"
    password: "supersecretpassword123"

captive_portal:

binary_sensor:
  - platform: gpio
    name: "Button"
    id: m5stack_button
    pin:
      number: GPIO9
      inverted: true

button:
  - platform: safe_mode
    name: "Safe Mode Boot"
    entity_category: diagnostic
    id: kattenweegschaal_safe_mode_boot

# Configuration of M5 Atom Lite onboard RGB LED
light:
  - platform: esp32_rmt_led_strip
    rgb_order: GRB
    pin: GPIO20
    num_leds: 1
    # rmt_channel: 0 ### this stopped working 2025/02
    chipset: WS2812
    is_rgbw: true
    id: m5stack_led
    name: "Light"
    icon: "mdi:led-outline"
    effects:
      - random:
      - flicker:
      - addressable_rainbow:

sensor:
  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 60s
  - platform: hx711
    name: "Cat Weight Sensor"
    dout_pin: GPIO01
    clk_pin: GPIO02
    gain: 128
    update_interval: 5s
    unit_of_measurement: kg
    accuracy_decimals: 3
    filters:
      - calibrate_linear:
          - 148937 -> 0
          - 2055181 -> 65.1
      - clamp:
          min_value: -10
          max_value: 200
          ignore_out_of_range: true
switch:
  - platform: factory_reset
    name: "Restart with Factory Default Settings"
    entity_category: "diagnostic"

  - platform: restart
    name: "Restart"

  - platform: gpio
    pin: GPIO7
    name: "on board LED"

  - platform: gpio
    pin: GPIO19
    name: "RGB on/off"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "My IP Address"
      id: kattenweegschaal_my_ip_address
    mac_address:
      name: "My Mac Wifi Address"
      id: kattenweegschaal_my_mac_wifi_address
    ssid:
      name: "Connected SSID"
      id: kattenweegschaal_connected_ssid
    bssid:
      name: "Connected BSSID"
      id: kattenweegschaal_connected_bssid
    dns_address:
      name: "DNS Address"
      id: kattenweegschaal_dns_address

In this setup make sure to adjust the linear filter with some values that you measure on your device as calibration.

After that i setup the repository from this thread and you should be good to go!
Hope this helps:)

2 Likes

Hi! Not sure exactly about Mi Scale 2, but it should work with any HA-compatible weight sensor that can update the weight with decent frequency.
I have the Xiaomi Mi Smart Scale (not 2, first version) myself, AFAIK it sends only the resulting weight via BLE (not sequent measurements) so not suitable for this integration