New version of the information display made to solve its predecessor problems with maintainability and perfomance. Made with React.
New features:
- intelligent pages: page visibility and duration on the screen is easily configured
- easier to maintain(?)
Removed features:
- less emphasis on animations
- a bit less lörinä
- Clone repo, install bun and dependencies in root and telegram bot with
bun install
andpip install -r requirements.txt
. - Create a
.env
file using the example.env.example
- Create the bot config in file
config.py
using the exampleexample-update.json
- Copy
example-update.json
toupdate.json
- After that start the server with
bun run server.ts
and bot withpython infonayttobot.py
and open http://localhost:3010 in browser.
The project can also be started as a Docker container using docker compose -f docker-compose.prod.yaml up -d
.
To make Chromium open automatically on startup, do the following:
- Set up Raspbian to automatically log in to the user you want. This can be done with
sudo raspi-config
and select "Desktop Autologin Desktop GUI" from the System options -> Boot / Auto Login. Then, find all instances of the username of the user which was used to runraspi-config
in the files/etc/lightdm/lightdm.conf
and/etc/systemd/system/[email protected]/autologin.conf
, and replace them with the user name you want. - Add the line
@chromium-browser --kiosk infonaytto.fyysikkokilta.fi
to~/.config/lxsession/LXDE-pi/autostart
(note the@
at the beginning), with the user that will log in automatically. - To prevent the raspi from going to sleep, also add the following lines to
autostart
(instructions from here):
@xset s noblank
@xset s off
@xset -dpms
To automatically turn of the screen during certain time of day (e.g. between 12 AM and 7 AM): sudo crontab -e
and add the lines
0 0 * * * DISPLAY=:0 xset dpms force off
0 7 * * * DISPLAY=:0 xset -dpms
Adding new pages to the infomation display is simple. Just take a look src/pages/Example.tsx
to see how page works. Contact developers if you want to contribute.