Home assistant, localtuya, and Petoneer Nutri Mini
I can confirm that the Petoneer Nutri Mini (a.k.a. Pettadore Nutri Fresh) can be controlled via the local Wi-Fi by Home Assistant. This can be achieved using the localtuya integration, which means that you have no dependency on the cloud.
- Setup your device with the Tuya IoT cloud in order to get the required API tokens that you need. All these steps are well described in the tuyaapi documentation.
- Add localtuya to your installation, for example via the HACS approach (as it’s not in the main integrations repository).
- Once you setup localtuya, it will find devices on your network. If you have the IoT in a different VLAN, you might need to directly provide the device’s IP address to localtuya.
- Localtuya will interrogate your Nutri Mini for its capabilities. It is important that you don’t have other tools (like a tuya-cli) with an open connection to your device (it supports only one connection at a time).
- Then the important part: which property IDs map to which device function? I didn’t enumerate them all, as for me the ‘express feeding’ capability was the only one of interest. For example, 103 is the device beep when feeding. However, the important one is ID 3, which controls express feeding. Use device type switch.
- Once you’ve added this ID (3) to Home Assistant, you will see a toggle (boolean) entity being added. If you switch this toggle from off to on, it will dispense food.
- Since the toggle is by default on true, it takes two steps to dispense (on->off, off->on). I’ve not tried to deep-dive if this can be changed, but simply created a script:
- express_feeding: mode: queued max: 10 sequence: - service: switch.turn_off target: entity_id: switch.feeder - service: switch.turn_on target: entity_id: switch.feeder - delay: 3
Now you can call this script in your automations to dispense food at conditions such as pets being indoors, specific times, etc.
Update fall 2022: I found that DPS 14 is for whether the device is empty.