Skip to content

A GUI dashboard, written in Python, for interfacing with the Xiaomi CyberGear Micromotor

License

Notifications You must be signed in to change notification settings

jgillick/CyberGearDashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CyberGear Dashboard

A GUI dashboard for controlling the Xiaomi CyberGear micromotor.

Getting started

Install the package from pip:

pip install CyberGearDashboard

Launch it with CAN bus connection details.

# Connect to motor ID 127 with the serial USB to CAN adapter device /dev/cu.usbmodem101
python -m CyberGearDashboard --motor 127 --channel /dev/cu.usbmodem101 --interface slcan

(see more about CAN devices, below)

CAN bus connection

Unlike the stock Xiaomi CyberGear software, this tool can use any CAN adapter supported by the Python CAN library. If you have trouble connecting, start by connecting to one of the Python CAN tools, in order to get the correct connection settings.

Serial adapters

If you have a CAN to serial adapter, you'll likely be connecting with the slcan interface.

# Replace /dev/cu.usbmodem101 with the device port for the adapter on your computer
python -m CyberGearDashboard --channel /dev/cu.usbmodem101 --interface slcan --motor 127

If that doesn't work, try the serial interface

# Replace /dev/ttyUSB0 with the device port for the adapter on your computer
python -m CyberGearDashboard --channel /dev/ttyUSB0 --interface serial --motor 127

SocketCAN / candlelight / Geschwister Schneider

Linux

On Linux, you can connect using the SocketCAN interface. This will not work on Windows or Mac.

python -m CyberGearDashboard  --interface socketcan --channel can0 --motor 127

Mac/Windows

For Mac and Windows, you can connect to SocketCAN and candleLight devices with the Geschwister Schneider interface. NOTE: you might have to disconnect and reconnect the adapter between uses.

python -m CyberGearDashboard  --interface gs_usb --channel 0 --motor 127

Troubleshooting

If the dashboard has trouble connecting to your device, try connecting via one of the Python CAN tools. Once you're able to connect with one of those tools, use the same arguments to open the dashboard.

For example

pip install python-can

# If this connects without error
python -m can.viewer --interface gs_usb --channel 0

# Open the dashboard with the same connection values
python -m CyberGearDashboard --motor 127 --interface gs_usb --channel 0

About

A GUI dashboard, written in Python, for interfacing with the Xiaomi CyberGear Micromotor

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages