Open C4-Dimitri opened 4 weeks ago
@C4-Dimitri at some point I would like to figure out how to actually switch that setting via home assistant and whatever is selected it would report it that way.
@jjjonesjr33 this might require more digging - as the devicesn isnt included in the below request - so i am guessing it figures out what device to send the change to with some of the earlier requests? right before requesting the below it makes some posts to these endpoints too: https://api.us.petlibro.com/device/setting/getAttributeSetting
{
"id": "AF0601314D89978A9"
}
response data:
{
"code": 0,
"msg": null,
"data": {
"deviceSn": "AF0601314D89978A9",
"lightSwitch": true,
"lightAgingType": 1,
"lightingStartTime": null,
"lightingEndTime": null,
"soundSwitch": true,
"soundAgingType": 1,
"soundStartTime": null,
"soundEndTime": null,
"volume": 50,
"powerMode": 1,
"autoChangeType": 1,
"autoThreshold": 60,
"enableAutoUpgrade": true,
"enableBatteryPercent": false,
"cameraSwitch": null,
"cameraAgingType": null,
"cameraStartTime": null,
"cameraEndTime": null,
"resolution": null,
"nightVision": null,
"videoRecordSwitch": null,
"videoRecordMode": null,
"videoRecordAgingType": null,
"videoRecordStartTime": null,
"videoRecordEndTime": null,
"feedingVideoSwitch": null,
"enableVideoStartFeedingPlan": null,
"enableVideoAfterManualFeeding": null,
"beforeFeedingPlanTime": null,
"automaticRecording": null,
"afterManualFeedingTime": null,
"videoWatermarkSwitch": null,
"motionDetectionSwitch": null,
"motionDetectionAgingType": null,
"motionDetectionStartTime": null,
"motionDetectionEndTime": null,
"motionDetectionSensitivity": null,
"motionDetectionRange": null,
"soundDetectionSwitch": null,
"soundDetectionAgingType": null,
"soundDetectionStartTime": null,
"soundDetectionEndTime": null,
"soundDetectionSensitivity": null,
"enableSleepMode": null,
"enableSleepSound": null,
"enableSleepLight": null,
"enableSleepAutoVacuum": null,
"sleepStartTime": null,
"sleepEndTime": null,
"enableDeviceShare": true,
"coverOpenMode": "CUSTOM",
"coverClosePosition": 4,
"coverCloseSpeed": "FAST",
"enableScreenDisplay": "true",
"screenDisplaySwitch": true,
"screenDisplayAgingType": 1,
"screenDisplayStartTime": null,
"screenDisplayEndTime": null,
"screenDisplayInterval": 2,
"childLockSwitch": true,
"childLockLockDuration": 30,
"childLockUnlockDuration": 3,
"closeDoorTime": null,
"closeDoorTimeSec": 1,
"errorState": false,
"doorErrorState": "NORMAL",
"bowlMode": null,
"whetherInSleepMode": false,
"ringerMode": null,
"ringerInterval": null,
"ringerDuration": null
}
}
https://api.us.petlibro.com/data/data/realInfo (we already know the response layout for this, so wont post it again for the sake of brevity).
the API endpoint for changing the reporting for the onerfidfeeder:
https://api.us.petlibro.com/member/member/updateSetting post data:
{
"feedUnitType": 1
}
unit type id corresponds to these:
1 = cup(US legal cup) 2 = oz (ounce) 3 = g (gram) 4 = ml (milliliter)
response data:
{
"code": 0,
"msg": null,
"data": null
}
i believe you are already capturing the correct unit being used, can we please ensure the selected unit is reported instead?