esphome-miot
esphome-miot copied to clipboard
Support `event_occurred` MCU message
For the Smart Pet Food Feeder (mmgg.feeder.fi1), there's a physical/manual feed button that when pressed generates a number of messages from the MCU in the form event_occured 4 3 5 255
.
This seems to conform to the message format that I read in https://blakadder.github.io/miot/#event_occured , even though the device spec page doesn't list any events.
For this device, I haven't found a cumulative "portions dispensed today/total" property so counting the portions as they're dispensed is useful for deriving state.
I'm not sure if this is already considered in the TODO comment,
* add "access" to components? read/write/notify
* automations?
But leaving this here just in case it's useful.
I would deduce the below event stream to be
- feed started + id 255 (manual instead of scheduled?)
- feed ended + dispensed portion count + id 255 (manual instead of scheduled?)
- ??
Example short press.
[20:25:21][V][miot:091]: Received MCU message 'event_occured 4 3 5 255'
[20:25:21][W][miot:297]: Unknown command 'event_occured'
[20:25:21][V][miot:174]: Sending reply 'ok' to MCU
[20:25:21][V][miot:091]: Received MCU message 'net'
[20:25:21][V][miot:174]: Sending reply 'cloud' to MCU
[20:25:21][V][miot:091]: Received MCU message 'get_down'
...
[20:25:24][V][miot:174]: Sending reply 'down none' to MCU
[20:25:24][V][miot:091]: Received MCU message 'event_occured 4 2 4 1 5 255'
[20:25:24][W][miot:297]: Unknown command 'event_occured'
[20:25:24][V][miot:174]: Sending reply 'ok' to MCU
[20:25:24][V][miot:091]: Received MCU message 'get_down'
[20:25:24][V][miot:174]: Sending reply 'down none' to MCU
[20:25:24][V][miot:091]: Received MCU message 'event_occured 4 1 4 1 5 255'
[20:25:24][W][miot:297]: Unknown command 'event_occured'
[20:25:24][V][miot:174]: Sending reply 'ok' to MCU
[20:25:24][V][miot:091]: Received MCU message 'properties_changed 4 9 0'
[20:25:24][V][miot.binary_sensor:011]: MCU reported sensor 4:9 is: OFF
Pressing and holding down the feed button:
[19:56:38][V][miot:174]: Sending reply 'down none' to MCU
[19:56:38][V][miot:091]: Received MCU message 'event_occured 4 3 5 255'
[19:56:38][W][miot:297]: Unknown command 'event_occured'
[19:56:38][V][miot:174]: Sending reply 'ok' to MCU
[19:56:38][V][miot:091]: Received MCU message 'get_down'
...
[19:56:45][V][miot:174]: Sending reply 'down none' to MCU
[19:56:45][V][miot:091]: Received MCU message 'event_occured 4 2 4 3 5 255'
[19:56:45][W][miot:297]: Unknown command 'event_occured'
[19:56:45][V][miot:174]: Sending reply 'ok' to MCU
[19:56:45][V][miot:091]: Received MCU message 'get_down'
[19:56:45][V][miot:174]: Sending reply 'down none' to MCU
[19:56:45][V][miot:091]: Received MCU message 'event_occured 4 1 4 3 5 255'
[19:56:45][W][miot:297]: Unknown command 'event_occured'
[19:56:45][V][miot:174]: Sending reply 'ok' to MCU
[19:56:45][V][miot:091]: Received MCU message 'properties_changed 4 9 0'
[19:56:45][V][miot.binary_sensor:011]: MCU reported sensor 4:9 is: OFF
[19:56:45][V][miot:174]: Sending reply 'ok' to MCU
Pressing for even longer:
[20:10:07][V][miot:091]: Received MCU message 'event_occured 4 3 5 255'
[20:10:07][W][miot:297]: Unknown command 'event_occured'
[20:10:07][V][miot:174]: Sending reply 'ok' to MCU
[20:10:07][V][miot:091]: Received MCU message 'get_down'
...
[20:10:16][V][miot:174]: Sending reply 'down none' to MCU
[20:10:16][V][miot:091]: Received MCU message 'event_occured 4 2 4 5 5 255'
[20:10:16][W][miot:297]: Unknown command 'event_occured'
[20:10:16][V][miot:174]: Sending reply 'ok' to MCU
[20:10:16][V][miot:091]: Received MCU message 'get_down'
[20:10:16][V][miot:174]: Sending reply 'down none' to MCU
[20:10:16][V][miot:091]: Received MCU message 'event_occured 4 1 4 5 5 255'
[20:10:16][W][miot:297]: Unknown command 'event_occured'
[20:10:16][V][miot:174]: Sending reply 'ok' to MCU
[20:10:16][V][miot:091]: Received MCU message 'properties_changed 4 9 0'
[20:10:16][V][miot.binary_sensor:011]: MCU reported sensor 4:9 is: OFF
I'll be available for testing this on the real device if/when this is implemented.