Skip to content

Database

jdeananderson edited this page Nov 28, 2018 · 17 revisions

Database tables, usernames and permissions

The wall-ink-server contains two database tables; devices and monitoring. The devices table contains information about all of the wall-ink devices that have been added to the wall-ink-server. The monitoring table is used for Nagios monitoring of the wall-ink-server. The deviceDatabaseUsername specified in settings.cfg requires read and write access to the devices table. After creating the monitoring table in the sql_setup.sh script, the deviceDatabaseUsername account does not need to read or write to the monitoring table. The user used for Nagios monitoring requires readonly access to the devices table, and write access to the monitoring table.

Devices table

device_id

A simple autoincremented integer associated with each device in the devices table

resource_id

The resource_id is an identifier that tells a plugin which resource a particular device is tied to. For instance, if a device is using the Google calendar plugin, the resource_id would be the identifier for a particular Google calendar. If the static_images plugin is selected, the resource_id would identify which folder of images to display. If the Booked plugin is selected, the resource_id identifies which Booked resource to display a schedule for.

device_type

Device type, sometimes referred to as "layout" lets a plugin know which layout or formatting to use for an image displayed on a device. The plugin may use the layout for screen sizing, how to organize text on the screen, which fonts to use, and how long to display an image for. A plugin can display any image it wants, for any period of time, given the resource_id and the device_type, or layout. Layouts for a particular plugin and resource are selected in the device manager.

mac_address

This is the MAC address a the wall-ink device. The wall-ink devices pass their MAC address to the wall-ink-server when they check in and ask for an image. The wall-ink server queries the devices table and finds which plugin, resource_id and layout to use to build a Wink file to return.

voltage

This is the voltage of the wall-ink device as reported when the device last checked in. The voltage may be stored using the voltage monitoring tool.

Clone this wiki locally