I believe that requestId is just a random MD5 to try and provide idempotency (if for whatever reason the request goes through multiple times, it’ll only feed once)
the grainNum is the “amount” - in 1/12th cup increments (or whatever equivalent you’ve set it to). The smallest amount you see on the manual feeding button is “1” - multiply it to get more
You’ll need to use the token provided by logging in first - which will be the difficult bit.
also, make sure you set deviceSn to the right device!
Thank you so much! thanks to you I was able to make a Siri Shortcut and now I just press a philips hue button and it feeds my cat ( no more holding 5sec to unlock the feeder or opening petlibro app).
i have made a great start on adding support for PLAF301 i feel in my fork of this. of course i am certain there is a bunch of changes to the structure of things that you want to do @flifloo this is my first time coding in python, so i am sorry if things are a bit messy.
here are the current sensors and controls:
if someone wants to test to see how it works for them, try and use my fork. let me know what you think.
keep in mind that i will be itterating a lot - so i cant guarantee that everything will be working as you download it.
what i will be working on next is trying to implement control over the individual scheduled daily feedings.
i am also going to try and convert the manual feed switch into a button entity instead, as that is probably more appropriate.
I also bought a Petlibro feeder, the PLAF203S specifically, a few weeks ago and was surprised that my model differs from the old PLAF203 (non S variants) that support local tuya.
I have been following this thread and the other one about the petlibro feeders (PetLibro cat feeder) which also provided valuable information to support my own reverse engineering efforts.
My personal goal was to have the device running locally with the feeding features and not having to communicate with Petlibro’s platform at all.
I’m thinking of getting the plaf103 which is how I stumbled across this thread. Based on the conversation so far, is it correct to assume that all the calls to make this work with HASS are still being routed out to Petlibro’s servers?
Unfortunately, for the newer models yes. I believe there is someone who’s got into another device, which may provide some information - but for now, we only know that the device communicates to an MQTT server, which is controlled by the API - I know there are people out there trying to get into this though
I just got the water fountain as a gift. I was excited for integrate into TUYA but now I’m seeing that there is a HACS options.
But after install and config, I don’t see my water fountain yet.
if I can provide any assistance or help, please let me know
If any of you want to go review/go over it the repo I have put together is this one. Feel free to import it to HA and test it out. It is 100% working as of right now without errors just missing some buttons
Supported Devices
This has been reworked to work with the following devices
One RFID Smart Feeder (PLAF301)
Dockstream RFID Smart Fountain (PLWF305)
May or may not work as intended with
Granary Feeder (PLAF103)
Features
This is still a WIP integration, features may or may not be removed at any time. If you have suggestions please let me know.
Features missing, but in the works.
Buttons for scheduling - One RFID Smart Feeder (PLAF301)
Buttons to reset Cleaning/Filter Days - Dockstream RFID Smart Fountain (PLWF305)
Tracking RFID per pet intance eat/drink - Both (PLAF301) & (PLWF305) - Currently missing the API to setup tracking.
I don’t know if I can just add it to the main repo at this point, I changed a ton of stuff when it comes to logging in , how it loads and stores devices, and the api calls.
I might just have to keep this as it’s own or move it to a separate repo and just re-import what I’ve done.
So far though testing with adding my repo into HACS it pulls correctly and if I update the release it pushes it to HACS too. First time I’ve done something like that so learning something new all the time.
No matter what I do, I can’t seem to find any devices when I install the integration from any repo. I’m using a PLAF103 and the device has been shared to a separate account. Any idea what may be causing this issue? Thanks.
Since yours seems to be way further along, would you mind pulling in the other devices that people have added? Notably the the PLWF105 water fountain and the PLAF103 granary feeder. Not sure if @flifloo is still interested in owning this project since he hasn’t touched it in a couple months. It might be best for everyone to rally around your repo?
Yeah I don’t mind at all working/building it for the other devices. Just throwing this out there tho I’m kind of a visual guy so if I could get a test account that has shared access to the devices we need to get added I can get it done. totally would help me see the live data it pulls to know what to code.
On the repo side of things that might be the way to go at this point? But if that’s the case I would need to migrate the repo instead of branching off. I probably should do that anyway since I’m a branch of a branch at this point.
I’ll get that setup here shortly and get things up and going.
The PLAF103 may not be enabled if you are using my build, you could throw this in your configuration.yaml for home assistant and see what it pulls from the logs.
logger:
default: warning # Default log level for all components
logs:
custom_components.petlibro: debug # Enable debug logging for your component