TC420 is a LED dimmer/controller mainly used for aquarium lightning. There is an attached software, PLED, you can use for programming it, but it is not very well written, and not good for automation tasks. Also it is Windows only. You can found more information on its fun (not official) site: https://www.tc420.net/.
I reverse engineered the USB protocol the device uses and wrote this library and CLI tool for making endless possibilities from this device. I successfully implemented all the functions PLED.exe have.
The library is cross platform, works everywhere where libusb works. But because it is a HID device, and MacOS does not allow to detach kernel drivers of HID devices, on MacOS it is extremely hard to make it work in current form. But I tested on Windows and Linux, and works fine there. It works on (all kinds of) Raspberry Pi. (Actually there is a python library for HID devices, so theoretically it is possible to rewrite the lib using hidapi, and then it could work on MacOS as well, pull requests are welcome...)
It has a full featured CLI, which can act as a reference for the libray. Also you can use it for automation, or just for fun.
pip3 install tc420
sudo adduser your_user_name plugdev
pip install tc420
This description works without modification on Linux, on Windows, you may need to use pip
instead of pip3
and python
instead of python3
. And the activate.bat is in the Scripts
folder inside venv
.
git clone https://github.com/wallneradam/tc420.git
sudo -H pip3 install virtualenv
virtualenv -p python3 venv
./venv/bin/activate
pip install -e .
Now you have tc420 command in your virtual environment.
Both the library and the CLI tool is documented and the source code is commented, so you can find all information inside them.
You can have the help of tc420
command by running:
tc420 --help
This will only give you brief information about all commands.
You can have full description of every commands by running:
tc420 [command] --help
e.g.:
tc420 mode --help
For checking if everything is working you can sync the clock:
tc420 time-sync
Or you can run the demo which randomly fades in-out all channels:
tc420 demo
If something is not working, you probably not installed libusb well, or you need to check if you have permissions to access the device.