Problem statement: We had two cats. One, a grade A chonk who would happily finish off 2 portions of food if the other is outdoors. And if she was indoors, the difference in the clocks meant he had about 30 seconds eating from one feeder before the second feeder opened, after which he’d barge past his sister and get about 1.5 meals.
But if the feeders were smart, we could
- have synced time between time.
- Only open when both cats were “home” according to our smart catflap.
- Have the option of feeding them remotely, if we were out unexpectedly late
I’ve not found a cat feeder which supports local control. Sure Petcare aren’t getting any more money after shenanigans blocking the home assistant intergration → surepetcare integration is not working anymore · Issue #93814 · home-assistant/core · GitHub
I did, however, have a Petsafe 5 Meal Pet Feeder
Upon opening the units (just unscrew), I found that one circuit board was responsible for the timer, one for advancing the trays.
A little tinkering with the circuit board, and I found that output 2 gets pulled to ground when the timer. Shorting the circuit with a wire performed the same action. And the cavity has loads of space for an additional board.
I added an ESP8266 and a cheap relay, because without fully understanding a circuit, a relay is just easier. I soldered the relay outputs onto ground and output 2, using the normally closed part of the relay.
I routed the USB cable to allow for a reasonable amount of strain relief
I also added a button to indicate that the feeders had been refilled, allowing for me to keep count of portions remaining, and send me a reminder when they’re empty.
substitutions:
device_name: cat_feeder_1
esphome:
name: ${device_name}
platform: ESP8266
board: d1_mini
wifi:
ssid: "SSID"
password: "ABC123"
manual_ip:
static_ip: 192.168.2.10
gateway: 192.168.2.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${device_name} FB HS
password: "ABC123"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "abc123"
ota:
password: password
button:
- platform: template
name: ${device_name}_advance
icon: "mdi:food-turkey"
id: advance_button
on_press:
then:
- switch.turn_on: relay_1
- delay: 0.5s
- switch.turn_off: relay_1
switch:
- platform: gpio
name: ${device_name}_switch
internal: true
pin: D1
id: relay_1
restore_mode: restore_default_off
binary_sensor:
- platform: gpio
pin:
number: D8
mode:
input: true
pullup: true
id: counter
name: ${device_name}_counter_reset
filters:
- delayed_on: 500ms
And, we’re done. Smart, Local cat feeders for about £8 per device.