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.
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
- Install the following dependencies to a Linux server:
git
,gcc
,make
(tested with GNU Make), MariaDB or MySQL - Clone this repo
git clone https://github.com/caedm/wall-ink-server
- Edit the information in
wall-ink-server/web/config/settings.cfg.example
and save the file aswall-ink-server/web/config/settings.cfg
See the wiki article on settings.cfg for a full explanation of each setting. - 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. - 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. - 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. - (optional) If you want to use the built-in voltage monitoring tool, follow the steps below:
- Install the optional
rrdtool
dependency - Create a cron job, systemd timer, or similar to run the
wall-ink-server/monitoring_scripts/collectVoltageData.sh
script once every 30 minutes. ThecollectVoltageData.sh
script takes only 1 command-line parameter: the absolute filepath of thedatabase.sh
file created bymake
. This can be found inweb/config/database.sh
.
- Install the optional
- (optional) If you want the number of recent errors to be reported on the view_devices page, follow the steps below:
- Create a cron job, systemd timer, or similar to run the
wall-ink-server/monitoring_scripts/collectErrorData.sh
script once every 30 minutes. ThecollectErrorData.sh
script takes only 1 command-line parameter: the absolute filepath of thedatabase.sh
file created bymake
. This can be found inweb/config/database.sh
.
- Create a cron job, systemd timer, or similar to run the
- (optional) For those using Google Calendar API, follow the steps below:
- Install the dependency
php
necessary run the google API key software from the command line - Open a web browser and follow the steps on https://developers.google.com/calendar/quickstart/php to enable the Google Calendar API
- Save the
credentials.json
file you got from the step above towall-ink-server/web/plugin_dependencies/google/credentials.json
- Open terminal and navigate to
wall-ink-server/web/plugin_dependencies/google
- 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. - 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.
- Install the dependency
- (option) For those using Outlook / Exchange, or other published iCal calendars, see the installation instructions for the iCalWeb plugin.
- (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.
- Follow the steps below to build the project
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
.
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.
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.
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.
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.