Commander iCal Integration
Jan 1 2022 at 12:00 AM
Overview
The purpose of this document is to provide clear and precise detail of calendar event linking with a focus on BACnet.
The booking of rooms is done through third party calendar applications such as Outlook, Gmail etc. A room can be scheduled from the third party calendar or directly from Commander™. If a room is required, it is initiated by sending a request to a specific room. Dependent on the setup configured in Commander™ Calendar Management the room may require no approver, one, or a maximum of two approvers. If approval is needed it will be sent to approval mailbox and a manual intervention will be required by the approver. The request will be approved, if no approval is required it will directly go through to the Destination calendar and the organiser will receive an email for room acceptance. If multiple requests are received the calendar will check the mode (on/off/janitor) and the priority allocated to the request received to determine which takes precedence, then communication will be sent to the Raptor and BACnet to control the lights etc for that specific room.
Definitions
Abbreviation / Term | Definitions / Note |
---|---|
IoT | Internet of Things |
iCal | Protocol for scheduling calendars used by third party calendar applications such as Outlook, Gmail etc |
BACnet | is a communications protocol for Building Automation and Control (BAC) networks that leverage the ASHRAE, ANSI, and ISO 16484-5 standard protocol |
KMC | KMC Smart offers the most comprehensive voice controlled smart home experience with Alexa. Control your home lighting and other devices hands-free |
Venstar | Venstar Thermostats to Manage Energy Costs. |
Feature flag | Determines whether functionality is enabled for the Tenant |
Ical integration modes | Mode determines if the room is available for use (1)Off Mode (0) = (1), (2)On Mode (1) = (0), (3)Janitor Mode (2) = (2) |
Priority | Priority is used when multiple events happen within the same time spot, the highest priority will take preference |
Calendar | Is used to book rooms, within the rooms you allocate a mode. Each mode will have an allocated priority, the priority determines the allocation of the mode based on the highest priority. |
Source Calendar (Email entity) | The source calendar(room) through gateway linking is setup to talk to a specific destination calendar. The Source calendar defines modes such as Holiday, Janitor, off. |
Destination Calendar (Email entity) | A destination calendar is usually connected to the BACnet. Actual Instance of a live calendar with endpoints and events. |
SMTP | The Simple Mail Transfer Protocol. User-level email clients typically use SMTP only for sending messages to a mail server for relaying |
IMAP | Internet Message Access Protocol. Open standard that describes how to access messages in an email mailbox. While IMAP is an important part of receiving emails |
Configuration flow with steps
Process flow (background)
Check feature flags are enabled (Refer to Fig 1)
- Go to Core Portal, Client Management
- Enable Scheduler Gateway flag
- A prequisite to communicate to Edge devices
- Enable Integration of iCal format
- A prerequisite to use “ical and Calendar linking
- Enable Gateway scheduler notify v3
- The default is version 3
- The gateway Upsync version needs to be insync with the feature flag version.
- The Raptor will ignore any message/s that does not correlate to its own version.
Figure 1 - Client Management - check feature flags are enabled
- Go to Core Portal, Client Management
Confirm Raptor is on Version 3 (Refer to Fig 2)
- Go to Raptor Scheduling, confirm Cloud (Upsync) as Version: 3
- Note: The default is Version3 so this may not be required
- Version 3 can handle priorities and mode, which is translated via a previously configured Mode translator. From Cloud to Raptor:
- Off Mode 0 = 1
- On Mode 1 = 0
- Janitor Mode 2 = 2
- Version 2 cannot handle this as it sends through a endpoint with a specific value only
- Off Mode 1
- On Mode 0
- Janitor Mode 2
- Version 3 can handle priorities and mode, which is translated via a previously configured Mode translator. From Cloud to Raptor:
Figure 2 - Confirm Raptor is on Version 3- Raptor Scheduling
- Create endpoint of type string (Refer to Fig 3)
- Go to Portal, Entity Management to create source and destination entities/endpoints.
- Create a group:
- Name example : Scheduler Gateway
- Create endpoint : (Endpoint required to integrate with the scheduling functionality on the Raptor, a BACnet simulator was used)
- Name example: BACnet
- Data type: String
- Create a group:
Figure 3 - Create endpoint of type string
- Go to Portal, Entity Management to create source and destination entities/endpoints.
- Create source and destination calendar entities with edge control type (Refer to Fig 4)
- Continue in Entity Management within the same group created in previous step.
- Create a Calendar entity: Source Calendar
- Default event control type: Edge
- Source calendar is linked in ical to the room
- Create a Calendar entity: Source Calendar Holidays
- Default event control type: Edge
- Create a Calendar entity: Destination Calendar
- Default event control type: Edge
- Create a Calendar entity: Source Calendar
Figure 4 - Create source and destination calendar entities
- Continue in Entity Management within the same group created in previous step.
- Link endpoint to final destination calendar (Refer to Fig 5)
- Continue in Entity Management
- Destination Calendar
- Drag the endpoint created to the Destination Calendar linked endpoints section
- Note :The endpoint is required because it is linked to Raptor that talks to BACnet Driver and BMS
- Destination Calendar
Figure 5 - Link endpoint to final destination calendar
- Continue in Entity Management
- Link endpoint to gateway property (Refer to Fig 6)
- Continue in Entity Management
- BACnet endpoint
- Go to Gateways tab and find the required Gateway/Raptor
- Drop the property that is created for the scheduling functionality received from Gateways
- BACnet endpoint
Figure 6 - Link endpoint to gateway property
- Continue in Entity Management
- Raptor configuration (Refer to Fig 7)
- Require a device and endpoint for scheduling created on the Raptor
- Connection required for BACnet
- Through the message we integrate to the Raptor device that is connected to BACnet
- Require a device and endpoint for scheduling created on the Raptor
- Create view (Refer to Fig 8)
- Create a view to view calendar entities and subscriptions created in the previous step.
Figure 7 - Create view
- Setup Ical integration (email outbox and ical service in Commander™)(Refer to Fig 9)
- Before continuing in Commander™ and go to the next step in Calendar Management, it is a prerequisite that you have your thirdparty mailbox (Outlook) setup for each room.
- Configure account email with IMAP capability for sorce calendar integration
- Click File → Info → Add account.
- The Outlook wizard for setting up a new account will open.
- Enter an email address to add your account.
- Click Advanced options and check the box for Let me set up my account manually.
- Click Connect.
- Choose the account type IMAP.
- The dialog IMAP Account Settings will open up.
- Use the following settings:
- Incoming mail: Server imap.mail.com with port 993 and check the option This server requires an encrypted conncetion (SSL/TLS)
- Outgoing mail: Server smtp.mail.com with port 587 and the encryption method STARTTLS
- Click Connect.
- A login dialog will appear.
- Enter your e-mail-address and your password, check Save the password in your password list and click OK.
- Outlook 2016 will now sync with your mail.com account.
Figure 9 - Configure account email
- Before continuing in Commander™ and go to the next step in Calendar Management, it is a prerequisite that you have your thirdparty mailbox (Outlook) setup for each room.
- Calendar integration setup (Refer to Fig 10)
- Go to Calendar management to to setup the Calendar integration configuration which allows for a connection to a calendar application mailbox using SMTP for sending and IMAP for email receiving purposes.
- If a booking request is made using Outlook it will hit the ical service defined below and follow any conditions specified ie. before a request is processed it must go to the following approvers etc
- Calendar: Use your created Calendar endpoint (Source Calendar for the room that is to be linked for ical integration).
- The below fields are setup by IT Admin - Pieter or Gerhard can assist
- IMAP Host
- IMAP Port
- IMAP SSL
- SMTP Host
- SMTP Port
- SMPTP SSL
- Approvers: Enter email address/es, individual or group email
- Username: Each room will have its own user account and username
- Password: Each room will have its own user account and password
- Status: once the integration is enabled, status will change to running
- Enabled
- Once all the above fields are configured in full the user can test IMAP and SMPT to test if the integration is functional when an email is sent to the room it will run the completed conditions and send to endpoint.
- Email address: email for the SMTP packet to send to
- Test SMTP/Test IMAP
- If at this point an email is sent from Outbox, it will go to the Source Room Calendar until the Source and Destination Calendar is linked in the next step.
Figure 10 - Setup ical integration
- Setup Calendar Linker (setup between source and destination calendar) (Refer to Fig 11)
- Calendar linking links Source Calendars to Destination Calendars, the behaviour of how the Destination Calendar actions the events will be defined here.
- Remain in Calendar management (second tab)
- Select “+ Add link”
- 1 Source Calendar to many Destination Calendars
- Source Calendar: Use your created Calendar endpoint (Source Calendar for the room that is to be linked for ical integration).
- Destination Calendar: Use your created Calendar endpoint (is linked to the endpoint on the Raptor that talks to BACnet Driver and BMS.)
- Priority: If two events happen within the same time spot, the highest priority will take precedence)
- Decide if a room booking has higher priority over a holiday booking so that as events take place the one will have precedence over the other
- Only allows for positive numbers
- Defaults are set to Priority 0 (BMS)
- The Range for priorities is 0-9
- Mode: As discussed in Point 2.
- Enabled
- Remain in Calendar management (second tab)
Figure 11 - Setup calendar linker
- Calendar linking links Source Calendars to Destination Calendars, the behaviour of how the Destination Calendar actions the events will be defined here.
- Create Calendar Widgets (Source and Destination) (Refer to Fig 12)
- Go to Dashboard
- Drop three calendar widgets
- Label as Destination Calendar
- Change to week view if preferred
- Label as Source Calendar (Room)
- Change to week view if preferred
- Label as Source Calendar (holidays)
- Change to week view if preferred
Figure 12 - Calendar setup
- Go to Dashboard
- Drag endpoints on widget (Refer to Fig 13)
- Destination Calendar
- Drag created calendar entity on to the widget
- Source Calendar (Room)
- Drag created calendar entity on to the widget
- Source Calendar (holidays)
- Drag created calendar entity on to the widget
Figure 13 - Endpoint linking
- Destination Calendar
- View Calendar - tentative event created (Refer to Fig 13)
- The endpoints have been setup, one destination calendar although there can be many. Two Source calendars (Holiday and Room), holiday calendar is created so that with one event can affect multiple rooms.
- Create an event on the Holiday Source Calendar in Commander™(example holiday event)
- OR go to Outlook and select a room to send a request to.
- Fields populated that do not align with the calendar linker priority and mode will be over written once saved.
- After the creation of the event, a tentative event will be visible in destination calendar as tentative/pending
- If the event was created in outlook the request would go to the Room Source Calendar until it is approved then it will move through to the Destination Calendar.
- Priority level will be applied within the Raptor and passes through the exception events as per the calculated priority back to BACnet
Figure 14 - Tentative event
- The endpoints have been setup, one destination calendar although there can be many. Two Source calendars (Holiday and Room), holiday calendar is created so that with one event can affect multiple rooms.
- View Calendar (confirmed event created)
- Events can be viewed side by side, after the higher prioritised event is complete, the lower priority event will kick off. The calculation on the Raptor will make this possible.
- Additional information for BACnet
- BACnet schedule only applies to current week
- BACnet is connected to Raptor, The Raptor is connected to the Destination calendar
- One scheduled week at a time
- From the Cloud scheduler you can enable/disable Maintenance Mode
- if you no longer want information to be sent, between Raptor and BACnet
Figure 15 - Raptor schedule
- Go to Raptor to view full schedule within Raptor Scheduler
- With an exception, should it have been created (events scheduled at the same time)
Figure 16 - Raptor schedule
- Go to Raptor to view exceptions
- View the event being applied on the Raptor
Figure 17 - Raptor results
Go to BACnet Simulator
Figure 18 - BACnet