2021-09-13 V2 - Updated with notification (Outside light blink) & tidied code
2021-10-10 V3 - Now added voice notifications if not fed
I think about Home Automation as being 'what things are repeated constantly by people, that don't need to', and this in our house was the question of 'Hey, has anyone fed the pets?"
The solution needed to be cheap, and simple for anyone to use. I decided to use buttons at the pet feeding station to determine when feeding happened - the family know to press once when they feed the dog, feed the cat or top up the water.
I have a touch screen display in the lounge to display results, but I am planning on adding a simple LED display and some voice notifications for a few 'alarm' type events, such as 'pets not fed recently'.
Update 13 Sep: There were a couple of times the buttons were pressed and the zigbee coordinator picked them up, but nothing was pushed to MQTT for some reason. Also, there are times people aren't sure if they pressed the button properly. I could have given some voice/sound feedback but this isn't great for early morning feeds so I now flash the outside light when a button is pressed (either 1, 2 or 3 times depending on which button was pressed)
Update 10 Oct: I haven't added to the Node Red flows below, but my setup now announces over a couple of Google Home devices (one in Miss 10's room) if the peds haven't been fed in the afternoon. It starts around 4:30pm and keeps announcing every 40mins (about 5 times total) until the pets have been fed.
I use a bunch of methods to coordinate the zigbee signals (including Zigbee2MQTT), but for this example I'm using a Sonoff Zigbee Bridge, flashed with Tasmota. The Bridges are around $25.
Node Red outputs values to my MQTT server and I also pull those values into Home Assistant. Home Assistant uses this to update a display I have on a touch screen.
I had thought about placing them in a nice wooden panel at some stage, but at the moment they are fine stuck to the wall.
I designed some simple labels and a friend who runs a signage business printed me out some on vinyl.
Touch Screen Display
The whole 19" touchscreen isn't displayed here (it is a work in progress recessed into our lounge wall) and this is the first iteration of the pet feeding display on the touch screen. It will show orange and red as the time extends out more than half a day. At the moment, it averages when the cat/dog button is pressed, but I'll account for the possibility that only one button is pressed for some reason.
More notes on the touchscreen: ViewSonicTouchscreen implementation.
Node Red Flow
The full code is here to download
Buttons In place
-- some alarm info if it goes too long between feeds (morning and afternoon)
-- a Q/A to google home so you can ask it if the pets need feeding.
-- notifications using google homes and pushover including warnings if they haven't been fed
-- some tidyup code for the zigbee to ensure batteries get replaced and errors are caught.
I could add...
-- Snapshot image from the cameras to show who fed them (could be sent to pushover)
-- Some extra data, eg a double press of the button could indicate that the petfood is running low of something. The buttons can account for 1,2,3,4, and 'multi' press, as well as 'held' so they are being underutilised as is.
Last edited by ZorrUno
Sun, 10 Oct 2021 03:21 UTC [diff]
Sun, 10 Oct 2021 03:21 UTC [diff]