All Projects → SixBytesUnder → Infoboard

SixBytesUnder / Infoboard

Licence: mit
Infoboard showing time, weather, calendar events, photos from local folder or online sources as background and Transport for London status updates. Intended for Raspberry Pi, but should work on any machine with NodeJS available.

Projects that are alternatives of or similar to Infoboard

Nuxt Chat App
Frontend of real-time chat application built using nuxtjs, socket.io. Check the backend at https://github.com/binbytes/chat-app-server.
Stars: ✭ 77 (-30.63%)
Mutual labels:  nuxt, nuxtjs
Vue Api Query
💎 Elegant and simple way to build requests for REST API
Stars: ✭ 1,528 (+1276.58%)
Mutual labels:  nuxt, nuxtjs
Vue Masonry Wall
A pure vue responsive masonry layout without direct dom manipulation and ssr support.
Stars: ✭ 79 (-28.83%)
Mutual labels:  nuxt, nuxtjs
Nuxt Compress
A simple static asset compression module for Nuxt that runs Gzip and Brotli compression during the build process
Stars: ✭ 61 (-45.05%)
Mutual labels:  nuxt, nuxtjs
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (-5.41%)
Mutual labels:  nuxt, nuxtjs
Nuxt Tailwind
A Nuxt.js starter project template using Tailwind CSS without the distraction of a complicated development environment.
Stars: ✭ 71 (-36.04%)
Mutual labels:  nuxt, nuxtjs
Example Ecommerce Snipcart Vue
The Transglobal Candy Store: Sample front-end for the Sanity.io e-commerce schema with vue.js, nuxt.js, and snipcart
Stars: ✭ 89 (-19.82%)
Mutual labels:  nuxt, nuxtjs
Nuxt Box
Truffle, Nuxt and Vue boilerplate
Stars: ✭ 46 (-58.56%)
Mutual labels:  nuxt, nuxtjs
Nuxt User Agent
Nuxt.js module for handling User-Agent.
Stars: ✭ 102 (-8.11%)
Mutual labels:  nuxt, nuxtjs
Nuxt Netlify
Dynamically generate `_headers` and `_redirects` files for Netlify in your Nuxt.js projects
Stars: ✭ 97 (-12.61%)
Mutual labels:  nuxt, nuxtjs
Laravel Vuejs.com
Laravel and VueJs Blog, using Laravel nova, GraphQL, NuxtJs, Apollo and ...more
Stars: ✭ 54 (-51.35%)
Mutual labels:  nuxt, nuxtjs
Google Gtag Module
Enable google gtagjs for NuxtJs
Stars: ✭ 106 (-4.5%)
Mutual labels:  nuxt, nuxtjs
Eslint Module
ESLint module for Nuxt.js
Stars: ✭ 49 (-55.86%)
Mutual labels:  nuxt, nuxtjs
Docker Nuxt
Docker image to run NUXT.js application in production mode
Stars: ✭ 71 (-36.04%)
Mutual labels:  nuxt, nuxtjs
Pwa Module
Zero config PWA solution for Nuxt.js
Stars: ✭ 1,033 (+830.63%)
Mutual labels:  nuxt, nuxtjs
Nuxt Graphql Request
Easy Minimal GraphQL client integration with Nuxt.js.
Stars: ✭ 85 (-23.42%)
Mutual labels:  nuxt, nuxtjs
Virapro.ru
[E-commerce] Plumbing Store
Stars: ✭ 45 (-59.46%)
Mutual labels:  nuxt, nuxtjs
Realworld Nuxt
Nuxt.js implementation of RealWorld Frontend
Stars: ✭ 45 (-59.46%)
Mutual labels:  nuxt, nuxtjs
Sails Nuxt
Sails + Nuxt + Vuetify Combo <3
Stars: ✭ 92 (-17.12%)
Mutual labels:  nuxt, nuxtjs
Lichter.io
My own website and CV
Stars: ✭ 105 (-5.41%)
Mutual labels:  nuxt, nuxtjs

infoboard

Infoboard showing time, weather, calendar events, photos from local folder or online sources as background and Transport for London status updates.
Intended for Raspberry Pi, but should work on any machine with NodeJS available.

Live demo

Using NASA picture of the day https://infoboard.sixbytesunder.com/

Examples

Desktop landscape Galaxy S5 portrait iPad Pro landscape Magic Mirror mode

More example screenshots in /static/examples/ or https://imgur.com/a/Odm4haP

Features

  • Almost everything is configurable in .env file;
  • Show current time and date;
  • Calendar events read from an iCal format link,
  • Background images, changing every 60 seconds. Source of images can be:
    • a local folder,
    • view Exif information only for images from local folder,
    • NASA Picture of the day,
    • random image from Unsplash,
    • curated images from Pexels,
    • both Unsplash and Pexels also support showing images tagged with current weather conditions: "light rain", "mostly clear" and so on,
    • weather tagged photos from Flickr;
  • Current weather and weekly forecast from ClimaCell;
  • Additional weather details include:
    • humidity,
    • wind speed,
    • barometric pressure,
    • air quality (PM2.5 and PM10),
    • many more.
  • Support for local below;
  • Transport for London status updates for tube, overground, dlr, tfl rail and tram;
  • Transport for London bus timetable for bus stops you choose;
  • COVID-19 stats from Our World in Data. Their GitHub repo here;
  • Magic Mirror mode - no background images at all, just solid black background and all text is white. This gives best contrast to use behind a magic mirror.
  • Everything, except for time can be folded or expanded by clicking on their icons;
  • Two buttons at the bottom right corner allow skipping to the next image or skip the entire folder to the next one (for local images source only);
  • If your browser supports programmatic fullscreen mode, a third button will appear to switch browser to fullscreen;
  • Runs as a responsive website therefore can be accessed on any device;
  • Available as PWA (Progressive Web Application) - add a shortcut to infoboard that looks just like an app on your phone or tablet and don't bother using a browser.

Raspberry Pi production deployment steps

# go to project folder
$ cd /var/www/html/

# clone this repo to current folder
$ git clone https://github.com/SixBytesUnder/infoboard.git .

# IMPORTANT! copy or rename file .env.example to .env
$ cp .env.example .env

# then edit it to provide all necessary variables and API keys
$ vim.tiny .env

# install dependencies
$ npm install

# add DHT sensor package if you have the sensor
$ npm install node-dht-sensor

# build production bundle
$ npm run build
# Note, if you get build errors, scroll down for workarounds

# I recommend a fantastic persistent app manager pm2, but you can use any other you wish
# install pm2
$ sudo npm i -g pm2

# start pm2, see below for detailed instructions
$ pm2 start npm --name "infoboard" -- start

# configure nginx
$ sudo vim.tiny /etc/nginx/sites-enabled/default

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    access_log /var/log/nginx/infoboard-access.log;
    error_log /var/log/nginx/infoboard-error.log;

    gzip            on;
    gzip_types      text/plain application/xml text/css application/javascript;
    gzip_min_length 1000;

    # change 192.168.1.99 to your RPi's local IP address
    server_name _ 192.168.1.99 infoboard;

    location / {
        proxy_redirect                      off;
        proxy_set_header Host               $host;
        proxy_set_header X-Real-IP          $remote_addr;
        proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto  $scheme;
        proxy_read_timeout                  1m;
        proxy_connect_timeout               1m;
        proxy_pass                          http://127.0.0.1:3000;
    }
}

# test new nginx configuration
$ sudo nginx -t

# reload nginx with new configuration
$ sudo nginx -s reload

If your Raspberry is accessible on local network, open your browser and navigate to your RPi's IP address. In this example http://192.168.1.99/

Updating to latest version

# go to project folder
$ cd /var/www/html/

# pull latest files from GitHub
$ git pull

# check .env.example file and compare to existing .env to see if any new settings are needed
$ vim.tiny .env.example
$ vim.tiny .env

# install dependencies
$ npm install

# build production bundle
$ npm run build
# Note, if you get build errors, delete `node_modules` and `.nuxt` directories, then run `npm install` and `npm run build` again
# if above doesn't help, make a backup copy of your .env file, then delete the whole app and remove persistent pm2 process
$ pm2 stop infoboard
$ pm2 delete infoboard
# and follow `production deployment steps` above
# If this still does not resolve the issue, run `npm run build` on your dev machine (i.e. your laptop) and just simply copy `.nuxt` directory to your RaspberryPi web directory. Leave all the other project files there

# restart persistent app manager
$ pm2 restart infoboard

# the app takes a minute to compile, to see the progress
# run below command and watch "Global Logs" window
# app will be ready when you see something similar to "Listening on http://localhost:3000"
$ pm2 monit

Development setup

# clone this repo to current directory
$ git clone https://github.com/SixBytesUnder/infoboard.git .

# install dependencies
$ npm install

# serve with hot reload at localhost:3000
$ npm run dev

For full documentation on NuxtJS go to Nuxt.js docs.

Other helpful commands

To make sure pm2 restarts the service after your server (Raspberry) restarts, run pm2 startup command. It should tell you exactly what you need to do next.

# find out what to do to make sure pm2 runs after restart
$ pm2 startup
# above will ask you to run a commands similar to this
$ sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
$ pm2 save

# show apps managed by pm2, all three below commands show pretty much the same
$ pm2 status
$ pm2 list
$ pm2 ls

# monitor resources your apps take on pm2
$ pm2 monit

nginx setup on RPi: https://nuxtjs.org/faq/nginx-proxy/
Production Process Manager for Node.js applications with a built-in Load Balancer: https://pm2.keymetrics.io/docs/usage/quick-start/

DHT sensor installing and troubleshooting

DHT module in not included by default as it causes a lot of issues on Windows, which is my development environment. After installing everything on your Raspberry, just run npm install node-dht-sensor, add correct settigs in .env file, restart the app and it'll automatically detect the module and use it.

If you're on Windows and still want to see it, you'll quite likely get build errors on DHT module while running npm install. This is due to node-gyp or MSBuild issues on Windows. There could be a hundred reasons for it. You can check if solutions proposed here, here or here work for you.

Otherwise, just use WSL (Windows Subsystem for Linux) to install DHT module. If you do so the DHT module will return random numbers to show you how it'd look like.
Note, you can install DHT package on WSL, but still npm run dev on Windows. It'll still work just fine.

If you don't have the DHT sensor at all, you can ignore all the above or just run npm uninstall node-dht-sensor or simply remove node-dht-sensor line from your package.json file.

Donate

If this project helps you or makes you happy in any way, please consider giving me a cup of coffee tea :) I'm one of those weird people who don't drink cofee, sorry ;)

asd

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].