Simple Bash scripts to automate configuration and operation of the Ulanzi TC001 Smart Pixel clock with the alternative AWTRIX 3 firmware.
These instructions will show how to install, configure, test and automate the operation of your Smart Pixel clock.
- Bash
jo
, a small utility to create JSON objects on the command line (https://github.com/jpmens/jo)- Cron (for automation)
- A small system which runs 24/7 (ideally), e.g. Raspberry Pi or LXC
- Clone the repository
- Copy
config.sh.example
toconfig.sh
- Set IP address or name of the Smart Pixel clock in
config.sh
- Configure colors and messages in
smartclock_operate
Currently, three scripts are implemented: smartclock_notify
, smartclock_operate
, smartclock_power
.
./smartclock_notify "message"
Displays a message on the Smart Pixel clock. Messages longer then the display will be scrolled. The message will disappear after a couple seconds.
./smartclock_operate
Depending on current time (hour only), the script sets a different configuration on the Smart Pixel clock. For testing, the hour can be overriden in the file itself.
./smartclock_power
The script will toggle the LED matrix on and off. For this, it uses a toggle file, which is configured in config.sh
. The location of the file needs to be writeable for the user running the script.
- Copy
CRON.example
to/etc/cron.d/smartclock
and chown toroot:root
- Choose a user to run the script under
- Set
smartclock_operate
to run every hour - If you want to turn the matrix display off e.g. during the night, set
smartclock_power
to run when to switch off and on again
See LICENSE for licensing information.
- https://www.ulanzi.com/products/ulanzi-pixel-smart-clock-2882 (Hardware)
- https://github.com/Blueforcer/awtrix3 (AWTRIX 3 firmware)
- https://blueforcer.github.io/awtrix3/#/api (API)