homebridge-petlibro-2
v1.3.0
Published
Homebridge plugin for PetLibro smart feeders and water fountains. Control your pet feeder and monitor water fountain levels through Apple HomeKit.
Maintainers
Readme
Homebridge PetLibro 2
A Homebridge plugin that integrates PetLibro smart feeders and water fountains with Apple HomeKit, allowing you to trigger manual feeding sessions and monitor water levels directly from your iOS Home app. This is a fork from the original homebridge-petlibro plugin, updated to support multiple PetLibro devices.
Original repository: HomebridgeLibro
Features
- 🍽️ Manual Feeding: Trigger feeding sessions from your Home app
- 📱 HomeKit Integration: Works seamlessly with Apple's Home ecosystem
- 🔄 Momentary Switch: Switch automatically resets after feeding
- 🛡️ Robust Error Handling: Graceful failures that won't break Homebridge
- 🔐 Secure Authentication: Uses the same API as the official PetLibro app
- 🐾 Multi-Device Support: Automatically discovers and adds all feeders and fountains linked to your account
- 💧 Water Fountain Support: View water level of compatible water fountains in HomeKit
Supported Devices
This plugin works with PetLibro devices that use the main PetLibro app (not PetLibro Lite):
Smart Feeders
- Granary Smart Feeder (PLAF103)
- Space Smart Feeder (PLAF107)
- Air Smart Feeder (PLAF108)
- Polar Wet Food Feeder (PLAF109)
- Granary Smart Camera Feeder (PLAF203)
- One RFID Smart Feeder (PLAF301)
Water Fountains
- Dockstream Smart Fountain (PLWF105)
- Dockstream RFID Smart Fountain (PLWF305)
- Dockstream 2 Smart Fountain - Plug-In Model (PLWF106)
- Dockstream 2 Smart Fountain - Cordless Model (PLWF116)
Installation
Option 1: Homebridge Config UI X (Recommended)
- Search for "PetLibro" in the Homebridge Config UI X plugin store
- Install the plugin
- Configure using the web interface
Option 2: Command Line
npm install -g homebridge-petlibro-2Configuration
Using Homebridge Config UI X
After installation, configure the plugin through the Homebridge web interface. You'll need:
- Your PetLibro account email
- Your PetLibro account password
- Number of portions to dispense (optional, defaults to 1)
Manual Configuration
Add the following to your Homebridge config.json in the platforms section:
{
"platforms": [
{
"platform": "PetLibroPlatform",
"email": "[email protected]",
"password": "your-petlibro-password",
"portions": 1,
"timezone": "America/New_York",
"country": "US"
}
]
}Configuration Options
| Option | Required | Default | Description |
|--------|----------|---------|-------------|
| platform | Yes | | Must be "PetLibroPlatform" |
| email | Yes | | Your PetLibro account email |
| password | Yes | | Your PetLibro account password |
| portions | No | 1 | Number of portions per feeding (1-10) |
| timezone | No | "America/New_York" | Your timezone |
| country | No | "US" | Your country code |
| fountainPollingInterval | No | 300 | Seconds between water level updates for fountains |
Multi-Device Support
The plugin automatically discovers all PetLibro devices linked to your account:
- Feeders appear as switches in HomeKit - tap to trigger manual feeding
- Water Fountains appear with a battery indicator showing water level percentage
- Devices use their names from the PetLibro app
- New devices are added automatically on Homebridge restart
- Removed devices are automatically cleaned up
Water Fountain Notes
Water fountains display their water level as a battery percentage in HomeKit. This provides a familiar visual indicator for the water level.
- The percentage shown represents how full the water reservoir is (0-100%)
- A "Low Battery" warning appears when water level drops below 20%
- Water level is updated periodically (default: every 5 minutes)
- You can adjust the polling interval with the
fountainPollingIntervaloption
Important Setup Notes
Account Limitations
⚠️ PetLibro only allows one device to be logged into an account at a time.
Recommended Setup:
- Create a second PetLibro account with a different email
- In your main PetLibro app, share your feeder to the new account
- Use the new account credentials in this Homebridge plugin
This allows both your mobile app and Homebridge to work simultaneously.
Verification Steps
Before configuring the plugin:
- ✅ Verify your credentials work in the official PetLibro mobile app
- ✅ Ensure you're using the main "PetLibro" app (not "PetLibro Lite")
- ✅ Confirm your feeder is connected to WiFi and working normally
Usage
- After configuration, your feeder will appear as a switch in the Home app
- Tap the switch to trigger a manual feeding
- The switch automatically turns off after 1 second (momentary behavior)
- Check Homebridge logs to confirm feeding was successful
Troubleshooting
Authentication Issues
Problem: Plugin fails to authenticate
- ✅ Verify email/password work in the PetLibro mobile app
- ✅ Ensure only one device is logged into your PetLibro account
- ✅ Try creating a dedicated account for Homebridge (recommended)
Device Not Found
Problem: Plugin authenticates but can't find your feeder
- ✅ Confirm your feeder appears in the PetLibro mobile app
- ✅ Check that device sharing is set up correctly (if using separate account)
- ✅ Look at Homebridge logs for device discovery details
Feeding Not Working
Problem: Switch appears but feeding doesn't work
- ✅ Ensure feeder has food and is powered on
- ✅ Verify feeder connectivity in the PetLibro app
- ✅ Check Homebridge logs for API error messages
- ✅ Try manual feeding through the official app first
Common Error Messages
"Invalid account or password"
- Check credentials are correct
- Ensure no other device is logged into the account
"Device ID not found"
- Verify device sharing is configured properly
- Check that the feeder appears in your account
"Authentication failed: SYSTEM_ERROR"
- Usually indicates incorrect API credentials
- Verify you're using the main PetLibro app (not Lite)
Technical Details
This plugin uses the same API endpoints as the official PetLibro mobile application, reverse-engineered from the open-source HomeAssistant PetLibro integration.
API Endpoints Used
- Authentication:
POST /member/auth/login - Device Discovery:
POST /device/device/list - Manual Feeding:
POST /device/device/manualFeeding - Device Real Info:
POST /device/device/realInfo(for water level)
Contributing
Found a bug or want to contribute?
- Check existing issues
- Create a detailed bug report with:
- Homebridge logs
- Device model
- Configuration (without credentials)
- Test that your feeder works with the official PetLibro app
Legal Disclaimer
⚠️ This is an unofficial plugin, not affiliated with PetLibro.
- Use at your own risk
- API endpoints may change without notice
- Check PetLibro's Terms of Service before use
- The plugin is reverse-engineered from publicly available information
License
MIT License - see LICENSE file for details.
Acknowledgments
- Based on the HomeAssistant PetLibro integration by jjjonesjr33
- Built for the Homebridge platform
Enjoying this plugin? ⭐ Star the repository
