Skip to content

iCalWeb Outlook Exchange plugin

jdeananderson edited this page Dec 21, 2018 · 20 revisions

The iCalWeb plugin was created to display the schedule of a room from an iCal file. This plugin was created initially to enable web-published Exchange / Outlook calendars to be displayed on a wall-ink device, but will work with any ical file that the icalparser library can interpret. Thanks to Roman Ožana for the icalparser! This parser has been tested successfully with the wall-ink-server project on a variety of ical files including Exchange / Outlook, web-published Google Calendars, and other random ical calendars from public sources. Several functioning example calendars are included with the plugin.

Installation

  1. Activate the iCalWeb plugin by setting icalWebPluginActive="true" in the settings.cfg file. Set the other settings for the plugin as appropriate for your situation.

  2. Edit the information in wall-ink-server/web/config/icalweb_calendars.php.example and save the file as wall-ink-server/web/config/icalweb_calendars.php. See notes below on how to use the icalweb_calendars.php file.

What kind of calendars will work?

In short, the iCalWeb plugin can display any iCal file that the icalparser library can read. It has been tested on web published Exchange / Outlook calendars, web published Google Calendars, and other random iCal files from the web. Note, that there is a Google Calendar plugin that uses the Google Calendar API. Although most any iCal file can be read, it may not make sense to be used as a scheduler plugin. The scheduler plugin system was designed to display what was going on in a particular room, not display a complex schedule including overlapping events, or events occurring in multiple locations. The scheduler display code should not crash if a complex schedules are displayed, but it may not be able to clearly display all of the simultaneous events clearly.

Does it support Exchange / Outlook?

The short answer is yes! The iCalWeb plugin can display any iCal file that the icalparser can parse, including web-published Outlook calendars. The iCalWeb plugin does not use the EWS API to talk to an Exchange server. It simply reads and processes ics files from a URL. This means it can do Outlook, and a whole lot more.

Outlook "private" events

If an Outlook event is marked as "private" in outlook, the iCalWeb plugin replaces the name of the event with the word "Reserved". This may be useful if the name of a particular event should not be known to passers-by.

icalweb_calendars.php config file

The settings file for the iCalWeb plugin is located at wall-ink-server/web/config/icalweb_calendars.php. It allows for a list of calendars to be configured to work with the plugin. It should appear something like this:

<?php
$icalweb_calendars = array();

$icalweb_calendars[0] = array();
$icalweb_calendars[0]['id'] = 0;
$icalweb_calendars[0]['resource'] = 'Outlook Test Calendar';
$icalweb_calendars[0]['URL'] = 'https://raw.githubusercontent.com/caedm/wall-ink-server/master/web/plugin_dependencies/icalweb/outlook_test_calendar.ics';
$icalweb_calendars[0]['DisplayURL'] = 'Call 555-1234 for reservations';

$icalweb_calendars[1] = array();
$icalweb_calendars[1]['id'] = 1;
$icalweb_calendars[1]['resource'] = 'Google Test Calendar';
$icalweb_calendars[1]['URL'] = 'https://raw.githubusercontent.com/caedm/wall-ink-server/master/web/plugin_dependencies/icalweb/google_test_calendar.ics';
$icalweb_calendars[1]['DisplayURL'] = 'www.example.com';

$icalweb_calendars[2] = array();
$icalweb_calendars[2]['id'] = 2;
$icalweb_calendars[2]['resource'] = 'BYU Athletics Calendar';
$icalweb_calendars[2]['title'] = 'BYU Athletics';
$icalweb_calendars[2]['URL'] = 'https://calendar.byu.edu/iCal/export/10';
$icalweb_calendars[2]['DisplayURL'] = 'https://byucougars.com';

return $icalweb_calendars;
?>

Adding a new calendar

Each section of the config file represents a calendar that can be chosen in the device manager. To add a new calendar to the config file, add a new section formatted as seen below, between the last existing calendar and the "return" line. The new section would look like:

$icalweb_calendars[3] = array();
$icalweb_calendars[3]['id'] = 3;
$icalweb_calendars[3]['resource'] = 'Device Manager Display name';
$icalweb_calendars[3]['title'] = 'Calendar name to appear on device';
$icalweb_calendars[3]['URL'] = 'https://mycompany.com/calendar.ics';
$icalweb_calendars[3]['DisplayURL'] = 'https://mycompany.com/how_to_schedule_this_room.html';

Notice that the array indexes [3] match the 'id' of 3. Be sure that the number used here is not the same as any other index used in the config file.

'resource' is the name of the resource as it will appear in the drop-down menu in the device manager.

'title' is an optional parameter for naming the calendar as it will appear on the wall-ink device. If the title is left blank, the iCalWeb plugin will use the X-WR-CALNAME parameter in the iCal file to name the calendar. Outlook / Exchange and Google iCal files both use this parameter. You can use the 'title' parameter to override the calendar name as received from the X-WR-CALNAME parameter if desired. If 'title' is not set and X-WR-CALNAME is also not set, the calendar will be named using whatever the 'resource' parameter is set to.

'URL' is the URL to the ical file.

'DisplayURL' is text displayed below the QR code to help users know where to schedule the room or resource associated with the calendar displayed. It might be a URL to a website, it could be a phone number, a building address or room number, or other instructions.

Security implications of using a web published iCal file

Retrieving a published iCal file from the web does not require a username and password, but does require a https URL. That URL does not need to be widely known, and may be kept secret. The URL issued by Outlook or Google Calendar is typically very long and contains a seemingly random string of characters. When a https URL is visited by a web client, the "GET" packet sent to the web server contains only the name of the server in plain text, but the full URL, including the id of your calendar, is encrypted. The full URL will however, appear in any browsing history or logs kept on the client, and the server. When publishing a calendar to the web, most services such as Outlook allow to only share a "Limited" amount of information such as the name of the events and when they will occur. This will make it so information such as event "notes" are not contained in the iCal file.