Lörinä as service
!!!
This repo is not actively maintained. For current version of infonaytto please see
https://github.com/fyysikkokilta/fk-infonaytto-v2
!!!
git clonethe repo- Install a browser plugin that allows CORS to make Kanttiinit menus work. We used CORS Everywhere on Firefox and Allow-Control-Allow-Origin: * on Chrome (tested April 2019). On firefox, you should also go to
about:configand set thesecurity.fileuri.strict_origin_policyflag to false. Note that this makes browsing the web possibly unsafe. - If you want to bridge Telegram messages to the info screen, make sure that
TelegramURLGeneratoris uncommented injs/urlmanager.jsand check the readme and configuration file intelegram/. - Open
naytto.htmlin a browser (Firefox seems to have smoother animations) and pressF11to go fullblastscreen and you're done. If you want to bridge Telegram messages, be sure to keep the bot running.
That's it, there's no pöhinä stuff like React or anything. All dependencies are included in the repo in lib/.
Install dependencies: sudo apt install xdotool tmux
To make Firefox 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-configand select "auto-login GUI" from the Boot options. Then, find all instances of the username of the user which was used to runraspi-configin the files/etc/lightdm/lightdm.confand/etc/systemd/system/getty@tty1.service.d/autologin.conf, and replace them with the user name you want. - Add the line
@sh path/to/infonaytto/launch_infonaytto.shto~/.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 2 AM and 7:45 AM): sudo crontab -e and add the lines
0 2 * * * vcgencmd display_power 0
45 7 * * * vcgencmd display_power 1
You can add custom URLs in js/urlmanager.js. URLs are added as pairs [url, weight], where weight determines how often the given URL is shown.
For dynamic URLS which are not just strings, see the examples in js/urlgenerators.js.
HTML files should go in html/, see examples therein.
Some configuration variables such as transition interval are defined in config.js.