This project is archived. Project tempus https://github.com/bmiddha/tempus will continue the legacy of this project.
A clock replacement for the office of ACM@UIC
docker
and docker-compose
should be installed.docker-compose.yaml
file or clone the repository..env
file based on .env.example
.docker-compose up -d
(Run docker build -t bmiddha/simple-js-clock:latest
before to include local changes).docker run
command
docker run -d -p 8080:8080 -e HTTPS="false" -e KEY="/root/ssl/ssl.key" -e CERT="/root/ssl/ssl.crt" -e PORT="8080" -e CTA_TRAIN_API_KEY="" -e CTA_BUS_API_KEY="" -e METRA_TRAIN_ID="" -e METRA_TRAIN_SECRET="" -e DARK_SKY_API_KEY="" -e COLORS="303030 01579B 006064 304FFE 004D40" -e BUS_STOPS="6700 6627 307 332 4640 14487 6347 206" -e TRAIN_STATIONS="40350" -e WEATHER_LAT_LONG="37.8267,-122.4233" -e UNITS="both" bmiddha/simple-js-clock
.env
file based on .env.example
.npm install
to install dependencies.npm run start
to start the npm server or npm run watch
to watch for changes.locahost:8080
or the port specified in the .env
config.Offline mode will disable api requests to the server leaving only the clock running. It can be activated by going to /offline
path.
Demo mode works like offline mode but displays demo information instead of real data from apis. It can be activated by going to /demo
path.
To override the default config, you can use the URL GET parameters or by pressing c
to open the config options.
sudo apt update && sudo apt upgrade -y
sudo apt install --no-install-recommends -y chromium-browser xserver-xorg x11-xserver-utils xinit
Use the raspi-config
tool to enable auto-login to the console.
sudo raspi-config
=> Boot Options => Desktop / CLI => Console Autologin
Edit the file /boot/config.txt
Add the following option:
display_rotate=3
display_rotate=0 Normal
display_rotate=1 90 degrees
display_rotate=2 180 degrees
display_rotate=3 270 degrees
.xinitrc
file/home/pi/.xinitrc
#!/bin/sh
xset -dpms
xset s off
xset s noblank
xrandr --output default --rotate left
setxkbmap -option "terminate:ctrl_alt_bksp"
unclutter &
chromium-browser http://server:8080 --window-size=1080,1920 --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --disable-features=TranslateUI --disk-cache-dir=/dev/null
Replace http://server:8080
with nodejs server.