Coder Social home page Coder Social logo

ineedcaffeine / sitincator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplificator/sitincator

0.0 0.0 0.0 1.74 MB

Simplificator's meeting room display system

Home Page: https://www.simplificator.com

Shell 2.08% JavaScript 68.87% CSS 27.84% HTML 1.21%

sitincator's Introduction

Sitincator

Warning

We are no longer actively maintaining this. You are welcome to fork the repository and contribute there.

Sitincator

Sitincator is Simplificator's meeting room display system. It consists of a React/Electron app running on a Raspberry Pi 3, which is connected to a touch screen display.

The system shows the current occupancy of the meeting room on the display, all meetings of the current day and allows to make a reservation for 15 or 30 minutes. Sitincator reads the meeting information from Google Calendar (once every minute).

Hardware

Required components for the displays:

Software

Installation on the Raspberry Pi

To install the binary:

curl -ssL https://github.com/simplificator/sitincator/raw/master/scripts/automatic_updates.sh | bash

Configuration

  • Follow Google's guide to obtain the OAuth JSON file and store it in config/client_secret.json.
  • Start the application: /home/pi/Sitincator/Sitincator
  • You are asked to enter the calendar ID (the calendar ID can be found on the settings page of your calendar in Google Calendar)
  • Open the link printed in your terminal, login with the same user as before to obtain the OAuth JSON file and authorize the app to access Google's API. You now get a token in the browser. Enter that token in the terminal's prompt.
  • If your Raspberry Pi is not already in portrait mode, append the following to your /boot/config.txt: display_rotate=1 90 degrees
  • To add a custom title to the screens (e.g. to identify a specific room this display is for), edit sitincator.json (created during the calendar ID setup) and modify the title entry.

Start the Application

Run the following in a terminal:

/home/pi/Sitincator/Sitincator

Development Environment Setup and Startup

It is not recommended to run the following setup on a Raspberry Pi. The installation of the correct node version and the required npm packages is quite a burden for the Raspberry Pi and takes a long time to complete, if successful. The setup has been tested on recent versions of OS X.

Node requirement: v6

git clone git://github.com/simplificator/sitincator.git
cd sitincator
npm install

Follow the instructions above (Installation on the Raspberry Pi -> Configuration).

Start webpack (note that this process is blocking, you could also start it in the background):

npm run watch

Start the application in development mode (windowed, with debugging information):

npm start

Local Production Environment

To start the application in production environment on your development machine:

npm run build
npm run start-prod

Building the Package for the Raspberry Pi

It is recommended to build the package for the Raspberry Pi on an x86 machine:

scripts/pack_pi.sh

The package for the Raspberry Pi now resides in /tmp/sitincator/Sitincator-linux-armv7l. You can launch the app by copying the directory to your Raspberry Pi 3 and calling ./Sitincator-linux-armv7l/Sitincator.

Note that you need to configure config and credentials as outlined in Configuration.

Configuration of the Raspberry Pi

Below you find some starting points to configure the Raspberry Pi for Sitincator.

Create a script start_meeting_room_app using the following command to start Sitincator and initialize the Raspberry Pi's touch screen to portrait format. It also prevents the display from going into sleep mode.

cat > /home/pi/start_meeting_room_app << EOF
DISPLAY=":0" xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix'  0 1 0 -1 0 1 0 0 1

DISPLAY=":0" xset s off
DISPLAY=":0" xset -dpms
DISPLAY=":0" xset s noblank

cd /home/pi/Sitincator/
DISPLAY=":0" /home/pi/Sitincator/Sitincator --disable-pinch
EOF
chmod +x /home/pi/start_meeting_room_app

To automatically start Sitincator when the Raspberry Pi boots, run the following command to add the script start_meeting_room_app to autostart:

echo '@/home/pi/start_meeting_room_app' >> /home/pi/.config/lxsession/LXDE-pi/autostart

To save some power, add the following cronjobs to automatically turn the display on and off:

# Cronjobs definition: crontab -e
0 7    *   *   *   /home/pi/display_turn_on
0 18   *   *   *   /home/pi/display_turn_off

cat > /home/pi/display_turn_on << EOF
DISPLAY=":0" xset dpms force on

DISPLAY=":0" xset s off
DISPLAY=":0" xset -dpms
DISPLAY=":0" xset s noblank
EOF
chmod +x /home/pi/display_turn_on

cat > /home/pi/display_turn_off << EOF
DISPLAY=":0" xset dpms force off
EOF
chmod +x /home/pi/display_turn_off

sitincator's People

Contributors

phylor avatar marcusegues avatar seasilvia avatar zinggi avatar lxxxvi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.