Rustuya
Rustuya is a high-performance, concurrency-friendly implementation of the Tuya Local API. It provides a robust interface for controlling and monitoring Tuya-compatible devices over a local network with minimal latency and high reliability.
Key Features
- High Performance: Built on Rust’s efficient asynchronous I/O and non-blocking execution.
- Thread-Safe & Concurrent: Designed for safe multi-threaded access across both Rust and Python environments.
- Multi-language Support: Native Rust API and high-performance PyO3-based Python bindings.
- Resilient Connections: Per-device background tasks handle automatic reconnection with exponential backoff.
- System Optimization: Built-in utilities to maximize system resources for large-scale device management.
- Gateway & Sub-device Support: Comprehensive support for Zigbee/Bluetooth gateways and sub-devices.
- Real-time Monitoring: Event-driven architecture providing instant status updates via streams or iterators.
- Universal Compatibility: Supports Tuya protocol versions 3.1 to 3.5, including the device22 variation.
Documentation
- Getting Started - Installation and quick start guide for Rust and Python.
- Rust API Reference - Detailed reference for the core Rust library components.
- Python API Guide - API reference and guide for Python integration.
- Python Examples - Practical code examples for common Python use cases.
- Design Philosophy - Core concepts and the underlying execution model.
- Architecture - System design and internal component breakdown.
- FAQ - Frequently asked questions and troubleshooting.
Repository
- Source Code: https://github.com/3735943886/rustuya
Credits
This library refers to the protocol specifications and error codes documented in tinytuya: