unifi-protect-client
A Rust client library for interacting with the UniFi Protect API.
Features
- 🔄 Automatic authentication and session management
- 📝 Type-safe API responses with serde deserialization
- 📹 Camera management operations
- 🛡️ Comprehensive error handling
Installation
Quick Start
use ;
use Result;
async
API Documentation
See https://docs.rs/unifi-protect-client
Troubleshooting
Common Issues
-
Authentication Failures
Error: Unauthorized access - check your credentials- Verify username and password (See
Admins & Usersin your UniFi console) - Ensure the user has sufficient permissions (Must have
Protectpermissions in UniFi console)
- Verify username and password (See
-
Network Connectivity
Error: Network error: connection refused- Verify the controller URL is correct
- Check network connectivity
- Ensure the controller is running and accessible
-
Invalid Response Format
Error: Failed to parse API response: missing field 'id'- This may indicate API version compatibility issues
- Check if your controller firmware is up to date
Other UniFi Clients
This crate is for interacting with the UniFi Protect API.
- If you are looking for a client for the UniFi Access API checkout: unifi_access
- If you are looking for a client for the UniFi Network API checkout: unifi-rs
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This is an unofficial client library and is not affiliated with or endorsed by Ubiquiti Inc. UniFi and Protect are trademarks of Ubiquiti Inc.