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

[Feature Request]: PLAF203 / Granary Smart Camera Feeder | Missing Implementation for Camera Monitoring #4

Open
1 task done
matthewlehew opened this issue Oct 18, 2024 · 11 comments
Assignees
Labels
Deferred put off (an action or event) to a later time; postpone Enhancement New feature or request Help wanted Extra attention is needed

Comments

@matthewlehew
Copy link

matthewlehew commented Oct 18, 2024

Device model name

GRANARY Smart Camera Feeder - Camera Monitoring 5L

Device model number

PLAF203

Device type

Feeder

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

Highest priority: the same feeding, food level, desiccant status as available in the PLAF103
Secondary priority: camera feeds, motion and sound detection alerts

Can provide any needed info as necessary, manual available here:
https://cdn.shopify.com/s/files/1/0252/5197/1119/files/PETLIBRO_Granary_Camera_Dual_Food_Tray_Feeder_PLAF203_V2_USER_MANUAL_2.pdf?v=1698059425

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
@jjjonesjr33 jjjonesjr33 added the Enhancement New feature or request label Oct 18, 2024
@jjjonesjr33
Copy link
Owner

Hey @matthewlehew would you be able to provide information on what the api pulls or give temporary shared access to this device via my support account?

@github-project-automation github-project-automation bot moved this to To triage in Petlibro Oct 18, 2024
@jjjonesjr33 jjjonesjr33 moved this from To triage to Pending in Petlibro Oct 18, 2024
@trentsmart
Copy link

Sorry @jjjonesjr33 this is the exact model I have, I'm just now seeing this. Sorry for the mixup.

@jjjonesjr33
Copy link
Owner

All good @trentsmart , same comment goes tho for you as well 😄 the easiest way I can see what I am working with is via temporary shared access. If you okay with that, I have a test account setup via [email protected] that you can give access to via the Petlibro app on your phone.

If I can see the data with my own eyes I can build it.

@matthewlehew
Copy link
Author

Access link is sent @jjjonesjr33, but app warns it's only valid for 30 mins. Let me know if I need to send another.

@jjjonesjr33
Copy link
Owner

Thanks @matthewlehew I see it now on my side now. I'll take a look at it shortly and see what I can get going.

@jjjonesjr33
Copy link
Owner

@matthewlehew, @trentsmart here is what I was able to pull and put together. Tell me what you guys think. Is there anything we need to add from the API in logs below that you would like info for in your dashboard? I went ahead an added the info for the Video camera, however I am not sure where/how we can pull the video in yet. I wonder if there is a different API call that I don't know about for live video feeds.

A couple of things we will need to test @matthewlehew is the battery. Looks like you just have it plugged into the wall without a backup battery installed. We would just need to know if it reports a correct value for the device.

I did test the enable, disable, and feed buttons so if your kitty got an extra helping earlier that was me 😄 Besides that I know once I get the switches in order for the RFID feeder I'll add that functionality to all devices since it's across the board.

From baseInfo

2024-10-18 17:06:03.862 DEBUG (MainThread) [custom_components.petlibro.api] Making POST request to [https://api.us.petlibro.com/device/device/baseInfo](https://api.us.petlibro.com/device/device/baseInfo%3C/span%3E)
2024-10-18 17:06:03.987 DEBUG (MainThread) [custom_components.petlibro.api] Response data: {'code': 0, 'msg': None, 'data': {'deviceSn': 'AF03013530C879617', 'thirdSn': None, 'mac': 'CC:64:1A:43:A6:56', 'batchId': 131, 'productId': 23, 'productName': 'Granary Smart Camera Feeder', 'productIdentifier': 'PLAF203', 'icon': 'https://oss.us.petlibro.com/dlcloud/platform/product_icon/product_icon_66b4a81de54e92de3584836f.png', 'name': 'Cat Feeder', 'firstCategoryId': 1, 'secondCategoryId': 2, 'memberId': 188861048, 'timezone': 'America/New_York', 'enableFeedingPlan': True, 'enableAutoUpgrade': True, 'enableNotice': True, 'noticeType': 1, 'noticeStartTime': '', 'noticeEndTime': '', 'enableFeedingPlanNotice': True, 'enableFeedingPlanAdvanceNotice': True, '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': 1, 'batteryDisplayType': None, 'enableReGrainNotice': True, 'petCareKind': 'FREE', 'deviceOwner': False}}

From grainStatus

2024-10-18 16:55:03.033 DEBUG (MainThread) [custom_components.petlibro.api] Making POST request to [https://api.us.petlibro.com/device/data/grainStatus](https://api.us.petlibro.com/device/data/grainStatus%3C/span%3E)
2024-10-18 16:55:03.127 DEBUG (MainThread) [custom_components.petlibro.api] Response data: {'code': 0, 'msg': None, 'data': {'todayFeedingQuantities': [3, 3, 4, 3, 3], 'todayFeedingQuantity': 16, 'todayFeedingTimes': 5}}

And then from realInfo

2024-10-18 16:57:03.130 DEBUG (MainThread) [custom_components.petlibro.api] Making POST request to [https://api.us.petlibro.com/device/device/realInfo](https://api.us.petlibro.com/device/device/realInfo%3C/span%3E)
2024-10-18 16:56:03.183 DEBUG (MainThread) [custom_components.petlibro.api] Response data: {'code': 0, 'msg': None, 'data': {'deviceSn': 'AF03013530C879617', 'mac': 'CC:64:1A:43:A6:56', 'timezone': 'America/New_York', 'hardwareVersion': '1.0.7', 'softwareVersion': '3.0.33', 'online': True, 'onlineList': [{'online': True, 'ts': 1725217014012}], 'wifiSsid': 'Interwebz', 'wifiRssi': -55, 'wifiRssiLevel': 3, 'powerMode': 1, 'powerType': 1, 'electricQuantity': 0, 'batteryState': 'low', 'surplusGrain': True, 'vacuumState': True, 'pumpAirState': True, 'motorState': 2, 'grainOutletState': True, 'audioUrl': 'https://oss.us.petlibro.com/dlcloud/platform/audio/audio_66d4d547e54ed82c1d6a89f2.aac', 'volume': 100, 'enableLight': True, 'lightSwitch': True, 'lightAgingType': 1, 'enableSound': True, 'soundSwitch': True, 'soundAgingType': 1, 'remainingDesiccantDays': -33, 'changeDesiccantFrequency': 14, 'desiccantNextChangeTime': 1726426614012, 'weightPercent': 0, 'weightState': 'NORMAL', 'weight': 0.0, 'waterBoxStatus': -1, 'todayTotalMl': 0, 'calibration': True, 'vacuumMode': 'NORMAL', 'enableCamera': True, 'cameraSwitch': True, 'cameraAgingType': 1, 'resolution': 'P1080', 'nightVision': 'AUTOMATIC', 'enableVideoRecord': False, 'videoRecordSwitch': False, 'videoRecordMode': 'MOTION_DETECTION', 'videoRecordAgingType': 1, 'cloudVideoRecordSwitch': True, 'feedingVideoSwitch': True, 'enableVideoStartFeedingPlan': True, 'enableVideoAfterManualFeeding': True, 'beforeFeedingPlanTime': 1, 'automaticRecording': 20, 'afterManualFeedingTime': 10, 'videoWatermarkSwitch': False, 'enableMotionDetection': True, 'motionDetectionSwitch': True, 'motionDetectionAgingType': 1, 'motionDetectionSensitivity': 'MEDIUM', 'motionDetectionRange': 'LARGE', 'enableSoundDetection': True, 'soundDetectionSwitch': True, 'soundDetectionAgingType': 1, 'soundDetectionSensitivity': 'MEDIUM', 'snowflake': True, 'barnDoorError': False, 'errorState': False, 'runningState': 'IDLE', 'doorErrorState': 'NORMAL', 'bowlMode': 'DOUBLE_BOWL', 'whetherInSleepMode': False, 'ringerMode': 'NORMAL', 'ringerInterval': 2, 'ringerDuration': 10, 'cameraAuthInfo': '0B80Z80880480280L80EIup0'}}

image

@jjjonesjr33 jjjonesjr33 moved this from Pending to In progress in Petlibro Oct 18, 2024
@jjjonesjr33 jjjonesjr33 moved this from In progress to In review in Petlibro Oct 19, 2024
@jjjonesjr33
Copy link
Owner

This has been completed - https://github.com/jjjonesjr33/petlibro/releases/tag/v1.0.8

@github-project-automation github-project-automation bot moved this from In review to Done in Petlibro Oct 19, 2024
@jjjonesjr33
Copy link
Owner

@matthewlehew I'm going to leave this open just until we can get the camera feed added, that would be my next push I would like to do for this device if we can figure out the access for the feed.

@jjjonesjr33 jjjonesjr33 reopened this Oct 19, 2024
@github-project-automation github-project-automation bot moved this from Done to Pending in Petlibro Oct 19, 2024
@jjjonesjr33 jjjonesjr33 added the Help wanted Extra attention is needed label Oct 19, 2024
@matthewlehew
Copy link
Author

This looks incredible! And the cats definitely appreciate the extra food haha.

@trentsmart
Copy link

Awesome. I have been waiting for this. I really appreciate the work you have done for this.

@jjjonesjr33 jjjonesjr33 added the Deferred put off (an action or event) to a later time; postpone label Nov 8, 2024
@jjjonesjr33 jjjonesjr33 changed the title [Device]: Support for PLAF203 GRANARY Smart Camera Feeder - Camera Monitoring 5L [Device]: PLAF203 / Granary Smart Camera Feeder | Missing Implementation for Camera Monitoring Nov 8, 2024
@jjjonesjr33 jjjonesjr33 changed the title [Device]: PLAF203 / Granary Smart Camera Feeder | Missing Implementation for Camera Monitoring [Feature Request]: PLAF203 / Granary Smart Camera Feeder | Missing Implementation for Camera Monitoring Nov 8, 2024
@jjjonesjr33 jjjonesjr33 moved this from Pending to Deferred in Petlibro Nov 10, 2024
@C4-Dimitri
Copy link
Contributor

C4-Dimitri commented Nov 18, 2024

@matthewlehew - if you are comfortable giving me access as well - i have been pulling all the different app API endpoints for the OneRFIDFeeder. i can see if i can get some more info for the camera stream for the Granary Feeder so we can potentially get that going?

if you want you can give me access via [email protected]

also feel free to shoot me an email on there so we can coordinate timings for me to accept the request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deferred put off (an action or event) to a later time; postpone Enhancement New feature or request Help wanted Extra attention is needed
Projects
Status: Deferred
Development

No branches or pull requests

4 participants