The word clock is now available as a Wear OS Watch Face and as an Android widget. Check out the links above.
- Multiple Transitions (simple, fade, matrix)
- MQTT support
Run following command to install all dependencies
sudo apt-get install python3-numpy
pip install -r requirements.txt
pip install RPi.GPIO
pip install adafruit-ws2801
to configure qlock modify the config.json in the root directory. The following illustrates all the available options with their respective default values.
{
"environment": "prod",
"tick_interval": 5,
"color": [255, 255, 255],
"transition": "fade",
"mqtt": {
"active": true,
"host": "192.168.0.2",
"port": 1883,
"user": "",
"password": "",
"topic": "qlock"
},
"opt3001": {
"active": true,
"address": "0x44",
"bus": 1,
"max_brightness_percentage": 100,
"min_brightness_percentage": 30,
"max_brightness_threshold": 2000,
"min_brightness_threshold": 500,
},
"special_interval": 60,
"dates": [{
"date": "21.06",
"text": "HAPPYBIRTHDAYPAPA"
}, {
"date": "27.09",
"text": "HAPPYBIRTHDAYMAMA"
}]
}
- Type: String
- Values:
dev
,prod
- Type: Int
- Unit: Seconds
Time between clock ticks in seconds
- Type: Array
Color of the LEDs.
- Type: String
- Values:
simple
,fade
,matrix
Transition between different words
- Type: Object
MQTT related settings
- Type: Object
Opt3001(Lightsensor) related settings
- Type: Array
- Default: []
Special Dates like birthdays can be configured here. The clock will write the given text at this date to the screen.
For local development on a non raspberry pi system you have to comment out the controller import. Because the GPIO packages are only available on a raspberry pi.
python3 -m unittest -v
- Thomas Pöhlmann (@perryrh0dan)