CyberGear Python Driver¶
Python driver for the Xiaomi CyberGear brushless motor over CAN bus.

Built on top of python-can. Tested with SocketCAN on Linux; custom polling threads are used instead of BCM to support other python-can interfaces as well.
Features¶
- Five control modes: operation (MIT-style), position, speed, current, and quick-move
- Auto-scan: discovers motors on the bus without needing to specify a CAN ID
- Async feedback:
can.Notifier-based listener deliversMotorFeedbacksnapshots without blocking - Background polling: portable parameter polling thread keeps properties up to date on any interface
- Event callbacks: subscribe to feedback, parameter updates, and fault state changes
- Context-manager API: guarantees clean resource release
- Fault detection: decodes and monitors over-temperature, over-current, undervoltage, and encoder faults
Quick install¶
With the dashboard (requires Textual and Rich):
Then read Getting started to connect your first motor.
Hardware¶
Tested with a CANable USB adapter and an XT30(2+2) cable.
