Legacy Christian Church in Overland Park, KS, was an early adopter of Events2HVAC in 2011. Over the years they have expanded their use of the software to control HVAC in 110 rooms using the NetworkThermostat, P2000 security, and BACnet/IP device interfaces. This year, they have added an innovative way to control door access for their church and school.
Legacy Christian’s door access project had two goals:
Permit real-time access for employees on demand.
Unlock and lock doors at appropriate times based on events scheduled in EMS (their event-management system).
Rather than purchasing a full-blown access system and integrating it to Events2HVAC, Executive Pastor Jamie Schools and Director of Operations Shane Rushik wanted to limit costs by using existing maglocks on the doors. After some research, they discovered a relay that can trigger the maglocks using scripts sent through Microsoft PowerShell. (See WebRelay-Quad™)
Next, Rushik developed a mobile app that sends commands to the relays on each door, enabling church and school employees to unlock and lock doors using their phones. The app uses GPS proxy to restrict door access so that employees cannot unlock church doors while at home or at any other location. They must be in close proximity to the door to unlock it, and of course they must have the required user permissions.
The app successfully accomplished Legacy Christian’s first goal. But to achieve their second goal, they had to find a way to activate PowerShell scripts based on room schedules.
Initially, Rushik developed PowerShell scripts to read events directly from the EMS database. But since Events2HVAC was already reading schedules from EMS to control HVAC, Rushik thought it would be better to use Events2HVAC for the security solution too.
“We needed an efficient way to automate building security,” Rushik said. “E2HVAC works great for automating heating and cooling based on room reservations, and we needed to lock and unlock the building for the same reservations. Since E2HVAC was already managing heating and cooling, it was the perfect solution to automate the door access as well.”
But Events2HVAC was not setup to trigger PowerShell scripts. So Rushik contacted Brian Russell at Streamside Solutions who agreed to develop a new PowerShell Action in Events2HVAC to execute the scripts based on EMS room schedules.
Within Events2HVAC, the new PowerShell Action is selected in the Add/Edit Action dialog box when configuring zones, as shown below.
Using the Device Common interface and the PowerShellAction in Events2HVAC permits users to specify a PowerShell script that will be used to perform the desired action and pass the necessary parameters into the script for the start and stop events. Rushik wrote the PowerShell scripts and setup the parameters to unlock the doors on a “start” trigger and lock the doors on a “stop” trigger. When the PowerShellAction is triggered by a room schedule in Events2HVAC, the scripts command the relay to unlock or lock the doors.
“One application to handle all of that really simplifies our workflow and management,” Rushik said.
Potentially, the PowerShellAction in Events2HVAC could be used for many other types of solutions such as posting information to a kiosk, controlling music in a building, or controlling window shades based on room schedules.
Rushik said one challenge they had to work through with this solution at Legacy Christian was restricting access to the school during school hours. As with most schools today, the doors need to remain locked on the outside while school is in session. But Events2HVAC would see the rooms as being “occupied” based on the room schedule and unlock the doors.
To overcome this, Rushik created a flag in PowerShell that is enabled when school is in session. This flag forces the relay to ignore the unlock command from Events2HVAC so the doors remain locked while classes are in session. Employees use the mobile app to unlock doors for 10 seconds to permit parents, students, and visitors to enter on a case-by-case basis.
Rushik also established a log for the app that shows every unlock and lock command – and its source. It shows him if the command came through Events2HVAC based on an event schedule or the name of the employee who unlocked or locked a door at a specific time.
Currently, this solution is implemented on two of Legacy Christian Church's campuses. They plan to implement it on their other two campuses very soon.
Resources:
What is PowerShell? https://devblogs.microsoft.com/scripting/what-is-powershell/
PowerShell Overview https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-6
WebRelay-Quad™ https://www.controlbyweb.com/webrelay-quad/
Comments