Luma litterbox support - #199
Merged
Merged
Conversation
Reverse-engineered the PetLibro API from the Flutter APK (libapp.so) to discover /device/device/execCmdService with the "action" field as the command executor. This enables triggering clean cycles, emptying waste, leveling litter, controlling the door, and running the air purifier -- all confirmed working against a real device. Key additions: - Device class: LumaSmartLitterBox with 40+ properties from 4 API endpoints - API: exec_device_command() generic command executor + 7 specific command methods - Buttons: Start Clean, Empty Waste, Level Litter, Stop, Open/Close Door, Air Purifier - Switches: Sound, Light, Deodorization - Sensors: 21 sensors (WiFi, battery, weight, maintenance days, states, modes, volume) - Binary sensors: 10 sensors (online, waste bin, vacuum, deodorization, door, errors, sleep) - Firmware update entity support Discovered API actions: CLEAN, STOP_CLEAN, SUSPEND_CLEAN, RESTART_CLEAN, EMPTY, STOP_EMPTY, RESTART_EMPTY, LEVELING, VACUUM, OPEN_DOOR, CLOSE_DOOR, STOP, CANCEL
Owner
|
Awesome work @tjd-dev , by chance do you have any pictures of the dashboard for the Luna litterbox that you could post so I could take a look? |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Proposed change:
Adds full-ish support for the Luma Smart Litter Box (PLLB001) with comprehensive entity coverage including sensors, binary sensors, buttons, switches, and firmware update support.
I’m still working through the API and command executor to assess the feasibility of supporting the scheduling of the air filter on the device. I’ve tried to make the entities as helpful and verbose as possible, but many are disabled by default for everyone’s sanity. The goal of future updates will be to intercept or capture photo data and allow users to route poop selfies to an AI task and an AI agent of their choice, at their own cost.
Key Features:
Device Control:
Monitoring:
API Implementation:
exec_device_command()method for executing device commandsCLEAN,STOP_CLEAN,SUSPEND_CLEAN,RESTART_CLEAN,EMPTY,STOP_EMPTY,RESTART_EMPTY,LEVELING,VACUUM,OPEN_DOOR,CLOSE_DOOR,STOP,CANCELdevice_real_info,device_data_real_info,device_attribute_settings,get_device_upgradeFirmware Updates:
Files Changed:
custom_components/petlibro/__init__.py- Device registrationcustom_components/petlibro/api.py- New API methods for command execution and device infocustom_components/petlibro/binary_sensor.py- 10 binary sensor entitiescustom_components/petlibro/button.py- 7 button entitiescustom_components/petlibro/devices/litterboxes/__init__.py- Litter box device exportscustom_components/petlibro/devices/litterboxes/litter_box.py- Base litter box classcustom_components/petlibro/devices/litterboxes/luma_smart_litter_box.py- Main device implementation (491 lines)custom_components/petlibro/number.py- Number entity supportcustom_components/petlibro/select.py- Select entity supportcustom_components/petlibro/sensor.py- 21 sensor entitiescustom_components/petlibro/switch.py- 3 switch entitiescustom_components/petlibro/text.py- Text entity supportcustom_components/petlibro/update.py- Firmware update entityREADME.md- Updated to move device from "Pending" to "Supported Devices"Total: 14 files changed, 923 insertions(+), 3 deletions(-)
Closes # (issue)
Type of change:
Checklist:
Additional notes:
libapp.so)