ZoneController App
(last updated: 2016-08-01)
Purpose: The ZoneController App is a software application which controls the myZone system. It receives and processes data from sensor devices, detects alert conditions, and provides system data.
Overview
The ZoneController App is a Java application that runs on the ZoneController PC which is running the Linux Mint OS. It performs the following functions:
- Receives sensor data from wireless Remote Nodes (via the ZCrf) and processes that data - which then becomes "system data"
- Interacts with Remote Nodes that include user interface features to confirm entry for premises security.
- Provides a network server from which a client application can connect and request system data - see myZoneC and the HTTP server in the ZoneControllerPC.
- Checks conditions and generates alerts if the condition becomes active, and removes the alert when the condition cancels. Active and Cancel alert messages are pushed to clients that support a push connection (myZoneC). Remote nodes that support a user interface also receive alert messages so that they can beep or display the alert message. Alert messages are logged to a file.
- Monitors system data associated with the weather:
- sun and shade temperature
- humidity
- barometric pressure
- rain amount is last 60 minutes and last 24hrs.
- wind speed and direction
- light intensity
- UV
- lightning detected
- hail detected
- forecast and weather service alerts: requested from WeatherUnderground via their API
- data is logged to a file
- Security monitoring:
- Motion
- security light control
- door open/closed state
- Fire/Flood/Environment monitoring:
- fire detection
- flood detection
- refrigerator/freezer temperature
- room conditions (temperature, humidity)
TBD functionality:
- Gets operational status from IrrigationCaddy to monitor irrigation use so that watering can be adjusted depending on the amount of rain that has occurred.
- Gets operational status from the Nest thermostat to monitor energy use.
Specifications
- Sensor Data Reception: receives data from sensor data providers (Remote Nodes, network clients), processes the data and stores it as "system data".
- Remote Node Interface:
- Communicates with the ZCrf to receive and send data from/to a Remote Node.
- RF noise test can be run (Debug Ifc menu)
- RF channel can be set (Debug Ifc menu)
- Show ids of connected Remote Nodes (Debug Ifc menu)
- Network (Socket) Server
- Listens for client connections on port 7770, then creates new client socket connection and a new handler thread.
- The connected client can request status (such as active alerts), system data, or entries from log files.
- The connected client can send a command which causes an action to be performed.
- The connected client can provide sensor data.
- Weather Monitor
- Alerts
- an alert becomes "active" when a condition is true; an alert message is sent to connected network clients that support "push" (myZoneC); an alert message is sent to Remote Nodes that include user interface features so that the alert can be announced; a sound is played.
- can be of type NOTE (status), NOTICE (potiential issue), or WARN (issue is occurring or likely to occur).
- A new WARN alert causes an "Ack Alerts" flag to be set.
- A sound is played one time for NOTICE alerts and for WARN alerts the sound is repeated periodically until the "Ack Alerts" system command is received (via a network client (myZoneC or browser via the HTTP server) or Remote node with user interface features).
- messages are logged to a file
- Debug Interface - via the terminal
- Menus
- keyboard input
- RF management.
- Status reporting
Technical Details (too many to get to all of them, but here are the highlights):