- The Listener
- Virtual RTUs
- Education and Support
The Site Controller, sometimes referred to as the Master Controller, is responsible for all automation activities at a Site. In this role, they act as control and data conduits between lower-level systems such as RTUs and higher-level interfaces such as web pages and smartphone apps. In addition, they manage all of the data accumulated at the site and provide alert services that notify site operators to operational and security problems.
The Site Controller is written in the Python programming language and can therefore run on nearly any common computing platform including Windows, Mac OS and Linux. It uses SQLite as its database system, which similarly runs on most computing platforms. The HAPI team has also developed an Raspian-based image for the Raspberry Pi, our hardware of choice for running the Site Controller program.
The Site Controller code for HAPI v2.1 features:
- Simple, network-based control interface for site operators (The Listener)
- Robust job scheduling function
- User-definable alert system with text message and email support
- Automatic discovery of Remote Terminal Units
- Integration support for Weather Underground
- Complete site/system logging
- Webcam integration (on linux-based systems)
The Listener does just that, it listens for a user or other computers to connect to it and provides the capability to manage a site. Whether it’s gathering information from the site, changing the configuration of the Master Controller or firing off commands to RTUs, the listener is their to help. Additionally, a user connected to the Listener can tell the site controller to pause its job scheduler, list all known RTUs, take pictures and report its current status.
- Jobs can be control tasks, polling for sensor data, checking for alerts, etc
- Interval Scheduling — Allows for a job to be scheduled every x minutes, hours, days. So you can schedule a job for every 5 minutes that gets sensor data from all of your RTUs and stores it in the database.
- Calendar/Clock scheduling — Allows jobs to be scheduled at specific times and days. It’s a perfect mode for scheduling your lights.
- Job information is stored in a database. It can be directly manipulated by the user. A user-interface for managing scheduler information will be available in the next version of the HAPI platform.
User-definable Alert System
The alert system allows users to define lower and upper thresholds for any sensor. A job is created that runs every minute and checks if sensor values are within their assigned thresholds. For example, you could create an alert on a pH sensor that triggers when the pH falls outside of some range, e.g. 5.8 — 6.8.
Triggered alerts are logged in the database. They can also be sent to site operators via sms text messages and email.
Automatic Detection of Remote Terminal Units
When the Site Controller program runs, it automatically scans the local network and identifies every Remote Terminal Unit that’s on the same network. Users do not have to configure, store or maintain information about RTUs.
The Site Controller supports the concept of a virtual RTU. A virtual RTU can be any function the user wants to incorporate into the system. For example, we’ve incorporated an interface to Weather Underground (wunderground.com) in order to get local weather conditions near our facility.
Everything the Site Controller does is written down in log files. User connections, sensor data, user-based command execution, job execution. Everything is stored in the database.
Education and Support
- HAPI System Description
- HAPI Master Controller Installation and Configuration
- Scheduling Jobs
- Working with the Listener
- Setting up Virtual RTUS
- Accessing Site data
- Working Examples