-
Notifications
You must be signed in to change notification settings - Fork 17
Xiaomi Smart Pet Food Feeder
Note
Requires special Tri-point screwdriver.
- Remove the backup batteries, if any are installed, in addition to unplugging the device.
- Remove the top food compartment lid and the food hopper.
- Unscrew the 6 tri-point screws visible on the triangular plastic cover of the controller board.
- Important! Take pictures of the connectors. The connectors for the hopper motor and door motor, respectively the connectors for the battery and DC IN, are the same shape, but different colors. Try to not swap any of them when reassembling!
- Unplug all the connectors and unscrew the board. We are now ready for flashing.
Pictures to be added soon
Note
Requires soldering to exposed pads.
Unfortunately, for this device there are no connector footprints for the required pins on the ESP8266, so a solderless flash is not possible.
There are however, broken out and labelled test-pads, so it's not necessary to solder the wires directly to the tiny pins of the chip.
- On the back of the board identify test-pads labelled
11
,12
,VIN
, (2x)GND
,IO0
, and solder wires to them.- Identifying two
GND
pads is not necessary, but is easier than soldering 2 wires to the same pad.
- Identifying two
- With the flasher disconnected from your PC,
- Make sure your flasher voltage is set to 3.3V;
- Connect
VIN
and oneGND
to the3V3
andGND
on your flasher; - Cross-connect pad
11 (RXD)
toTX
, and pad12 (TXD)
toRX
on your flasher; (ESP-WROOM-02U Datasheet, Pin 11 - RXD, Pin 12 - TXD) - Connect the other
GND
pad to the pad labelledIO0
to put the ESP in bootloader mode.
- Using the tool of your choosing (
esptool
recommended) download the contents of the flash and store for safe keeping, in case you want to revert to factory or sell the device. - Flash the ESPHome config.
- Unsolder the cables, plug the connectors according to the pictures you took, and reassemble the device.
Pictures to be added soon
To be added.
Nothing is sent on 1:1 ~ 1:5 on power cycle.
- Device Fault. Works as expected
- Feeding measure. Can be read, but garbage. Used as input for the pet-food-out action.
- Pet Food Level Left - Works as expected
- Pet Food Out. Works as expected. Dispenses the specified portions immediately. Optional
feeding-measure
parameter; if left out, dispenses one portion.
Everything works as expected
-
outfood-num
. Number of dispensed portions in last event. Specs say this is read|notify, but really it's only notify. The feed started|status|successful events use this to communicate what happened -
outfood-id
. Index of scheduled feed that dispensed outfood-num portions in last event, or 255 if a manual feed. Specs say this is read|notify, but really it's only notify. The feed started|status|successful events use this to communicate what happened -
outletstatus
. There is a motorized door protecting the dispensing outlet, "for freshness". Can be read. Is notified by properties_changed, but only after it's closed; there's no notification when it's opened, not even in the "Feeding Started" event. -
doorstatus
. Top Lid of the device. Works as expected, thankfully.
-
feedplan-contr
. Enable or disable the automatic feeding schedule. Works as expected. -
feedplan-stat
. Unknown? Marked as write-only.
- 6 -
feedplan-hour
, 7 -feedplan-min
, 8 -feedplan-unit
, 10 -feedplan-id
, 11 -getfeedplan-num
, 12 -feddplan-string
produce garbage if read by themselves. They're used as inputs/outputs for actions.
-
stopfeed
. Unknown. Marksfeedplan-contr
as input, but the control is switchable by itself, making this action redundant. -
getfeedplan
. Usageaction 5 6 11 0
oraction 5 6 11 1
, and returns the first 5 or last 5 schedules in thefeddplan-string
property as output.Example:
// Get page 0 of schedule. (schedules 0-4) [15:04:28][V][miot:189]: Sending reply 'down action 5 6 11 0' to MCU [15:04:28][V][miot:095]: Received MCU message 'result 5 6 0 12 "0,6,0,5,0,1,10,0,5,0,2,255,255,255,255,3,255,255,255,255,4,255,255,255,255"' [15:04:28][V][miot.text_sensor:011]: MCU reported text sensor 5:12 is: 0,6,0,5,0,1,10,0,5,0,2,255,255,255,255,3,255,255,255,255,4,255,255,255,255 [15:04:28][V][text_sensor:013]: 'Raw Feed Plan': Received new state 0,6,0,5,0,1,10,0,5,0,2,255,255,255,255,3,255,255,255,255,4,255,255,255,255 [15:04:28][D][text_sensor:064]: 'Raw Feed Plan': Sending state '0,6,0,5,0,1,10,0,5,0,2,255,255,255,255,3,255,255,255,255,4,255,255,255,255' // Get page 1 of schedule. (schedules 5-9) [15:05:06][V][miot:189]: Sending reply 'down action 5 6 11 1' to MCU [15:05:06][V][miot:095]: Received MCU message 'result 5 6 0 12 "5,255,255,255,255,6,255,255,255,255,7,255,255,255,255,8,255,255,255,255,9,255,255,255,255"' [15:05:06][V][miot.text_sensor:011]: MCU reported text sensor 5:12 is: 5,255,255,255,255,6,255,255,255,255,7,255,255,255,255,8,255,255,255,255,9,255,255,255,255 [15:05:06][V][text_sensor:013]: 'Raw Feed Plan': Received new state 5,255,255,255,255,6,255,255,255,255,7,255,255,255,255,8,255,255,255,255,9,255,255,255,255 [15:05:06][D][text_sensor:064]: 'Raw Feed Plan': Sending state '5,255,255,255,255,6,255,255,255,255,7,255,255,255,255,8,255,255,255,255,9,255,255,255,255'
- 5 -
feedlistadd
, 6 -feedlistedit
, 7 -feedlistdel
are implemented as home assistant service callsadd_scheduled_feed
,edit_scheduled_feed
andremove_scheduled_feed
respectively. All work as intended.
Everything works as expected.
Everything works as expected.
-
factory-result
. Did not test. Specs say read|notify but I expect is only an output for the prtest action -
phon-time-zone
. Unknown if this is useful. read|write|notify works. -
countrycode
. Unknown if this is useful. read|write|notify works.
Not tested.
Everything works as expected.