Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Device]: PETLIBRO One RFID (PLAF301) #3

Open
1 task done
C4-Dimitri opened this issue Aug 19, 2024 · 12 comments
Open
1 task done

[Device]: PETLIBRO One RFID (PLAF301) #3

C4-Dimitri opened this issue Aug 19, 2024 · 12 comments
Assignees

Comments

@C4-Dimitri
Copy link

C4-Dimitri commented Aug 19, 2024

Device model name

One RFID

Device model number

PLAF301

Device type

Feeder

What state, statistic or control do you want to be reported in the integration ?

Manual Feed Button
Food Hopper Jam Reporting
Food Hopper Low Level Reporting
Dessicant Days Remaining Reporting
Count of times visited Reporting
Sum of Daily Feeding Amount
Sum of Length of time visited Reporting
Binary Sensor for Pet Present at Feeder or not.
Measurement Unit Reporting
Backup Battery Level Reporting (or Battery Low Reporting).
Firmware Version Reporting.
Wifi Connection Reporting.
IP Address Reporting.

If Possible viewing Schedule with feeding amounts, and even more IF possible, control over schedule and feeding amounts.

Available to help integrate the new device

  • I agree to help with the integration of the new device by providing the necessary information that will be requested
@terryhonn
Copy link

I'm also interested and available to help with testing of the PLAF301 feeder.

@C4-Dimitri
Copy link
Author

C4-Dimitri commented Aug 24, 2024

Adding response from the API server for my 2 feeders:

{
  "code":0,
  "msg":"None",
  "data":[
    {
      "deviceSn":"AF06013AF056214A2",
      "name":"Marble's Feeder",
      "icon":"https://oss.us.petlibro.com/dlcloud/platform/product_icon/product_icon_66b4a757048e592c7e3a75d4.png",
      "productIdentifier":"PLAF301",
      "productName":"One RFID Pet Feeder",
      "roomId":"None",
      "roomName":"None",
      "mac":"E0:09:BF:03:02:21",
      "thirdSn":"None",
      "cameraId":"None",
      "softwareVersion":"2.0.25",
      "timezone":"Europe/London",
      "online":true,
      "surplusGrain":true,
      "powerType":3,
      "powerMode":1,
      "electricQuantity":100,
      "batteryState":"high",
      "vacuumState":true,
      "pumpAirState":true,
      "vacuumMode":"NORMAL",
      "lowBatteryState":"None",
      "enableSound":true,
      "enableLight":true,
      "enableFeedingPlan":true,
      "enableAutoUpgrade":true,
      "nextFeedingDay":"None",
      "nextFeedingTime":"05:00",
      "nextFeedingEndTime":"None",
      "planState":"None",
      "nextFeedingQuantity":1,
      "autoChangeType":"None",
      "autoThreshold":"None",
      "wifiRssiLevel":4,
      "wifiRssi":-47,
      "productKey":"None",
      "useWaterType":"None",
      "remainingReplacementDays":"None",
      "remainingCleaningDays":"None",
      "useWaterInterval":"None",
      "useWaterDuration":"None",
      "exceptionMessage":"None",
      "todayTotalMl":0,
      "weightPercent":0,
      "weight":0.0,
      "grainOutletState":true,
      "snowflake":true,
      "temperature":"None",
      "platePosition":"None",
      "deviceShareState":1,
      "deviceCloudStorageState":"None",
      "shareId":41309,
      "unitType":2,
      "enableBatteryPercent":false,
      "barnDoorState":false,
      "barnDoorError":false,
      "coverOpenMode":"KEEP_CLOSE",
      "errorState":false,
      "doorErrorState":"NORMAL",
      "bowlMode":"None",
      "whetherInSleepMode":"None",
      "imageId":"d8eba6c52cda41e480b3711ccdb2c6ad",
      "imageName":"Dark coffee"
    },
    {
      "deviceSn":"AF0601314D5F8511M",
      "name":"Jet's Feeder",
      "icon":"https://oss.us.petlibro.com/dlcloud/platform/product_icon/product_icon_66b4a757048e592c7e3a75d4.png",
      "productIdentifier":"PLAF301",
      "productName":"One RFID Pet Feeder",
      "roomId":40351,
      "roomName":"Lounge",
      "mac":"E0:09:BF:03:4F:BB",
      "thirdSn":"None",
      "cameraId":"None",
      "softwareVersion":"2.0.25",
      "timezone":"Europe/London",
      "online":true,
      "surplusGrain":true,
      "powerType":3,
      "powerMode":1,
      "electricQuantity":100,
      "batteryState":"high",
      "vacuumState":true,
      "pumpAirState":true,
      "vacuumMode":"NORMAL",
      "lowBatteryState":"None",
      "enableSound":true,
      "enableLight":true,
      "enableFeedingPlan":true,
      "enableAutoUpgrade":true,
      "nextFeedingDay":"None",
      "nextFeedingTime":"05:00",
      "nextFeedingEndTime":"None",
      "planState":"None",
      "nextFeedingQuantity":1,
      "autoChangeType":"None",
      "autoThreshold":"None",
      "wifiRssiLevel":4,
      "wifiRssi":-47,
      "productKey":"None",
      "useWaterType":"None",
      "remainingReplacementDays":"None",
      "remainingCleaningDays":"None",
      "useWaterInterval":"None",
      "useWaterDuration":"None",
      "exceptionMessage":"None",
      "todayTotalMl":0,
      "weightPercent":0,
      "weight":0.0,
      "grainOutletState":true,
      "snowflake":true,
      "temperature":"None",
      "platePosition":"None",
      "deviceShareState":2,
      "deviceCloudStorageState":"None",
      "shareId":"None",
      "unitType":2,
      "enableBatteryPercent":false,
      "barnDoorState":false,
      "barnDoorError":false,
      "coverOpenMode":"KEEP_CLOSE",
      "errorState":false,
      "doorErrorState":"NORMAL",
      "bowlMode":"None",
      "whetherInSleepMode":"None",
      "imageId":"d8eba6c52cda41e480b3711ccdb2c6ad",
      "imageName":"Dark coffee"
    }
  ]
}

@C4-Dimitri
Copy link
Author

C4-Dimitri commented Aug 26, 2024

Adding more API information:

baseInfo API data.

{
  "code":0,
  "msg":"None",
  "data":{
    "deviceSn":"AF06013AF056214A2",
    "thirdSn":"None",
    "mac":"E0:09:BF:03:02:21",
    "batchId":128,
    "productId":26,
    "productName":"One RFID Pet Feeder",
    "productIdentifier":"PLAF301",
    "icon":"https://oss.us.petlibro.com/dlcloud/platform/product_icon/product_icon_66b4a757048e592c7e3a75d4.png",
    "name":"Marble's Feeder",
    "firstCategoryId":1,
    "secondCategoryId":2,
    "memberId":189154522,
    "timezone":"Europe/London",
    "enableFeedingPlan":true,
    "enableAutoUpgrade":true,
    "enableNotice":true,
    "noticeType":1,
    "noticeStartTime":"",
    "noticeEndTime":"",
    "enableFeedingPlanNotice":true,
    "enableFeedingPlanAdvanceNotice":false,
    "feedingPlanAdvanceNoticeTime":5,
    "enableSurplusGrainNotice":true,
    "enableLowBatteryNotice":true,
    "enablePowerChangeNotice":true,
    "enableVacuumSuccessNotice":true,
    "enableVacuumFailedNotice":true,
    "enableOfflineNotice":true,
    "offlineNoticeType":1,
    "enableGrainOutletBlockedNotice":true,
    "enableNoGrainOutNotice":true,
    "enableDrinkingWaterNotice":true,
    "enableLowWaterNotice":true,
    "enableFilterReplacementReminder":true,
    "remainingReplacementDays":3,
    "enableMachineCleaningReminder":true,
    "remainingCleaningDays":3,
    "enableTankOverturnedNotice":true,
    "unitType":3,
    "batteryDisplayType":"None",
    "enableReGrainNotice":true,
    "petCareKind":"FREE"
  }
}

realInfo API data:

{
  "code":0,
  "msg":"None",
  "data":{
    "deviceSn":"AF06013AF056214A2",
    "mac":"E0:09:BF:03:02:21",
    "timezone":"Europe/London",
    "hardwareVersion":"3.0.0",
    "softwareVersion":"2.0.25",
    "online":true,
    "lastOnlineTime":1724651987754,
    "onlineList":[
      {
        "online":true,
        "ts":1724430954929
      }
    ],
    "wifiSsid":"HIPPO V2.0",
    "wifiRssi":-44,
    "wifiRssiLevel":4,
    "powerMode":1,
    "autoChangeType":1,
    "autoThreshold":60,
    "powerType":3,
    "electricQuantity":100,
    "batteryState":"high",
    "surplusGrain":true,
    "vacuumState":true,
    "pumpAirState":true,
    "motorState":2,
    "grainOutletState":true,
    "barnDoorState":false,
    "volume":50,
    "enableLight":true,
    "lightSwitch":true,
    "lightAgingType":1,
    "enableSound":true,
    "soundSwitch":true,
    "soundAgingType":1,
    "remainingDesiccantDays":11,
    "changeDesiccantFrequency":14,
    "desiccantNextChangeTime":1725640554930,
    "weightPercent":0,
    "weight":0.0,
    "waterBoxStatus":-1,
    "todayTotalMl":0,
    "calibration":true,
    "vacuumMode":"NORMAL",
    "coverOpenMode":"KEEP_CLOSE",
    "coverClosePosition":4,
    "coverCloseSpeed":"MEDIUM",
    "enableScreenDisplay":"true",
    "screenDisplaySwitch":true,
    "screenDisplayAgingType":1,
    "screenDisplayInterval":2,
    "childLockSwitch":true,
    "childLockLockDuration":30,
    "childLockUnlockDuration":3,
    "closeDoorTimeSec":5,
    "snowflake":true,
    "barnDoorError":false,
    "errorState":false,
    "runningState":"IDLE",
    "doorErrorState":"NORMAL",
    "whetherInSleepMode":false
  }
}

todayNew API Data:

{
  "code":0,
  "msg":"None",
  "data":{
    "plans":[
      {
        "planId":1186237,
        "index":1,
        "time":"05:00",
        "grainNum":1,
        "state":3,
        "repeat":true
      },
      {
        "planId":1186240,
        "index":2,
        "time":"09:00",
        "grainNum":1,
        "state":3,
        "repeat":true
      },
      {
        "planId":1186245,
        "index":3,
        "time":"13:00",
        "grainNum":2,
        "state":3,
        "repeat":true
      },
      {
        "planId":1186247,
        "index":4,
        "time":"21:00",
        "grainNum":1,
        "state":1,
        "repeat":true
      }
    ],
    "allExpired":false,
    "allSkipped":false
  }
}

grainStatus API data:

{
  "code":0,
  "msg":"None",
  "data":{
    "todayFeedingQuantities":[
      1,
      1,
      2
    ],
    "todayFeedingQuantity":4,
    "todayFeedingTimes":3,
    "todayEatingTimes":7,
    "eatingTime":"14'33''"
  }
}

@C4-Dimitri
Copy link
Author

And the responses from the feeding plan API

updateFeedingPlanSwitch API data:

{
  "code":0,
  "msg":"None",
  "data":"None"
}

enableTodayAll API Data:

{
  "code":0,
  "msg":"None",
  "data":"None"
}

or below if feeding schedule has been turned off entirely:

{
  "code":1218,
  "msg":"DEVICE_FEEDING_PLAN_NOT_AVAILABLE",
  "data":"None"
}

@C4-Dimitri
Copy link
Author

C4-Dimitri commented Aug 28, 2024

i have made a great start 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.

@terryhonn, if you want to test to see how it works, try and use my fork. let me know what you think.

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.

@flifloo
Copy link
Owner

flifloo commented Aug 28, 2024

i have made a great start 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.

It's a pretty good start since it's your first time in Python and HA, I saw some refactor to do, you should open a PR and I could discuss it with you in a code review

@terryhonn
Copy link

i have made a great start 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.

@terryhonn, if you want to test to see how it works, try and use my fork. let me know what you think.

I'll agree, a great start indeed! It's working great for me, was able to do a manual feeding (and I agree, a button entity would be better).
Is a manual opening of the lid possible? That would be great to allow access to food if collar was off, etc., and not have to actually press a button like a caveman ;-)
Another question, is the integration polling to pick up state changes, or relying on a push from the API? I notice state changes like lid open and lid problem take a few minutes to update in HA.

Not complaining at all, of course, because even just the level of integration you've provided here is fantastic compared to none!

Thanks so much!

@C4-Dimitri
Copy link
Author

C4-Dimitri commented Aug 28, 2024

i have made a great start 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.
@terryhonn, if you want to test to see how it works, try and use my fork. let me know what you think.

I'll agree, a great start indeed! It's working great for me, was able to do a manual feeding (and I agree, a button entity would be better). Is a manual opening of the lid possible? That would be great to allow access to food if collar was off, etc., and not have to actually press a button like a caveman ;-) Another question, is the integration polling to pick up state changes, or relying on a push from the API? I notice state changes like lid open and lid problem take a few minutes to update in HA.

Not complaining at all, of course, because even just the level of integration you've provided here is fantastic compared to none!

Thanks so much!

Happy its working for you!

Its currently set to refresh every 5 mins. I just followed what was already set as my update uses the same refresh method that was already there.

I assume this was set to a relatively high value so that we dont overwhelm rhe API and get blocked.

In terms of remotely opening the door.
I dont think so, i saw nothing in the api when triggering the door manually to suggest that there was any functionality for that.

@C4-Dimitri
Copy link
Author

i have made a great start 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.

It's a pretty good start since it's your first time in Python and HA, I saw some refactor to do, you should open a PR and I could discuss it with you in a code review

PR created :)

@JPfowl
Copy link

JPfowl commented Sep 16, 2024

I have 2 of these and just tested your fork. Same comments as everyone else. Let me know if there’s any specific tests I can help with.

@flifloo flifloo removed the Triage label Sep 20, 2024
@JPfowl
Copy link

JPfowl commented Sep 27, 2024

@C4-Dimitri is there a way to change from personal mode to open mode and vice-versa? I know you said there’s no way to open the lid but this would effectively do the same thing.

@jjjonesjr33
Copy link

Hey, Hi, Hello everyone!

@flifloo, @C4-Dimitri, I stumbled across your guys work and added to it 💯 % Hopefully you both won't mind but I managed to get a lot of things done in the past few hours. @C4-Dimitri I pulled from your work with the RFID setup you had going. With your help I was able to get a majority of the API info I needed to add into Home Assistant. Great Work to both of you!

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 🤣

@flifloo you might be able to help me out on this part thou, for some reason my buttons stopped working once I added in the Dockstream. I did have the functions for feeding, and turning on/off their schedule as buttons. ( switched it from a toggle since it looked a bit weird with it enabling then disabling ) Let me know if you can figure that part out? Please and thanks!

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.

One RFID Smart Feeder Preview

One RFID Smart Feeder

Dockstream RFID Smart Fountain Preview

Dockstream RFID Smart Fountain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants