Skip to content

caedm/wall-ink-server

Repository files navigation

Introduction

This project is a server-side companion to the Wall-Ink project. The wall-ink devices display any image on their e-ink screens that the wall-ink-server delivers to it. The bulk of the server plugins created to date are for displaying scheduling systems, but the wall-ink-server can be used for any digital signage purposes. Right now the server has plugins for Outlook, Google Calendar and the Booked scheduling system, but it could be integrated with any scheduling system that has a decent API. There are other plugins as well, and it is not too hard to create your own.

The wall-ink server is a php based website that requires a database. Plugins used to create images for the devices may be written in any language. Some of the included plugins have been written in php, others are a mixure of php scripts that run compiled C code.

Summary

The wall-ink-server houses several important functions:

  • It generates new images for the Wall-Ink displays
  • It serves images to the Wall-Ink displays
  • It notifies the database when the Wall-Ink displays are updated
  • It hosts a website for the configuration of the Wall-Ink displays

Installation

  1. Install the following dependencies to a Linux server: git, gcc, make (tested with GNU Make), MariaDB or MySQL
  2. Clone this repo git clone https://github.com/caedm/wall-ink-server
  3. Edit the information in wall-ink-server/web/config/settings.cfg.example and save the file as wall-ink-server/web/config/settings.cfg See the wiki article on settings.cfg for a full explanation of each setting.
  4. Create the table in mariadb or mysql by running the sql_setup.sh script in the wall-ink-server directory. This script will only be successful if valid device database settings were set in the settings.cfg file above.
  5. Edit wall-ink-server/web/device_manager/.htaccess with your organization's information. Settings in .htaccess files protect your database passwords and other configuration settings from being world readable on the wall-ink-server web site, and this particular one also restricts access to the device manager website.
  6. Edit the image key in the Arduino sketch to match the image key in the wall-ink-server/web/config/settings.cfg file. See the wiki article on image security to understand the use and purpose of the image key. Point your Wall-Ink module at the server by changing the baseURL in the firmware.
  7. (optional) If you want to use the built-in voltage monitoring tool, follow the steps below:
    1. Install the optional rrdtool dependency
    2. Create a cron job, systemd timer, or similar to run the wall-ink-server/monitoring_scripts/collectVoltageData.sh script once every 30 minutes. The collectVoltageData.sh script takes only 1 command-line parameter: the absolute filepath of the database.sh file created by make. This can be found in web/config/database.sh.
  8. (optional) If you want the number of recent errors to be reported on the view_devices page, follow the steps below:
    1. Create a cron job, systemd timer, or similar to run the wall-ink-server/monitoring_scripts/collectErrorData.sh script once every 30 minutes. The collectErrorData.sh script takes only 1 command-line parameter: the absolute filepath of the database.sh file created by make. This can be found in web/config/database.sh.
  9. (optional) For those using Google Calendar API, follow the steps below:
    1. Install the dependency php necessary run the google API key software from the command line
    2. Open a web browser and follow the steps on https://developers.google.com/calendar/quickstart/php to enable the Google Calendar API
    3. Save the credentials.json file you got from the step above to wall-ink-server/web/plugin_dependencies/google/credentials.json
    4. Open terminal and navigate to wall-ink-server/web/plugin_dependencies/google
    5. Run the command php ./quickstart.php from a terminal and follow the onscreen instructions. It will have you paste a url in to a browser to activate the API key. You will copy a line of text back from google and past it back into the quickstart.php script on the command line.
    6. The quickstart.php file should now create a new .json file wall-ink-server/web/plugin_dependencies/google/token.json using both the credentials.json file you downloaded, and the phrase pasted into the quickstart.php script. If the API keys were successfully created, running quickstart.php should display a list of calendars available from the google API to the command line. You can use the quickstart.php script from the command line at any time to verify that the google API keys are still working.
  10. (option) For those using Outlook / Exchange, or other published iCal calendars, see the installation instructions for the iCalWeb plugin.
  11. (optional) Create a plugin to integrate with your own calendaring system, or for a whole different use case like a weather station or a bus schedule.
  12. Follow the steps below to build the project

Build

You will need gcc and GNU make. To build and deploy to the live server (hosted at your web directory as defined in settings.cfg), use the command make.

Wiki

This project has a fairly extensive Wiki, including articles on Troubleshooting, the database, Plugins, Nagios monitoring, and many more. The companion wall-ink device project also has a great deal of documentatiion in it's Wiki as well.

Plugins

The wall-ink-server can deliver any image to a wall-ink device. Plugins allow additional code to be added to the wall-ink-server to add integration of any API or code to generate images specific to your application.

A special trivial case for adding a new plugin would be to add an additional "scheduler". The difficult part of writing an engine for creating images for a schedule on a wall-ink device has already been written, and is in use by several plugins that are already part of the wall-ink-server project. All that is necesary is to make API calls to facilitate a few functions that format text.

Device Manager

The Device Manager website is hosted at the web root. It is used as a configuration center for your wall-ink devices. A list of the important files in the device manager and their purpose is located in the Wiki.

Image Generation and Hosting

The image generation code is located at wall-ink-server/. GCC 8.1.0 was used to build it. See the discussion on Wall ink image formats and image handling for more information. A list of important files in image generation and their purpose is also available in the Wiki.

About

Accompanying server software for the wall-ink project. Plugins for room scheduling through Outlook, Exchange, iCal, Booked, and Google Calendar API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •