myZone

last updated: 2016-7-8 (Under Construction)

Purpose: A property control system that includes security, weather monitoring, HVAC control, irrigation control, fire detection, and flood detection.

Overview

****system block diagram

Sensors devices send their data to the ZoneController Application which is running on the ZoneController PC. The application processes the sensor data to create system data. It performs a test to determine if an alert condition exits, and if so, an alert message is sent to external connections and the alert is logged to a file. The myZoneClient Application runs on computers connected to the (local) network. It gets and displays status from the ZoneController Application. The system's status can be checked via the Http server.

Functionality includes,

  • Security
    • motion sensors
    • security light control
    • door sensors
  • Weather monitoring (via local sensors)
    • shade temperature
    • sun temperature
    • humidity
    • barometric pressure
    • rain amount in last 60 minutes
    • rain amount in last 24hrs
    • lightning detected
    • UV index
    • light intensity
    • wind direction
    • wind speed
    • wind gust
    • Weather data log
    • External Weather Information
      • 3 day forecast
      • severe weather alerts
    • Fire detection
    • Flood detection
    • HVAC - integration with "Nest" thermostat
    • Irrigation - integration with "Irrigation Caddy
    • Http server - using LIGHTTPD + PHP + Javascript

System Components

ZoneController PC

  • Intel D945GSEJT (mini-ITX, Intel Atom N270 processor) + 2GB RAM
  • external 12VDC power supply brick, connected to UPS
  • connected: 2W speakers
  • connected: KVM to mouse/keyboard/monitor
  • connected: ZCrf (see below) - RF interface
  • connected: Ethernet network
  • connected: USB to UPS
  • SanDisk SSD Plus (120GB)
  • 1U 19" rackmount enclosure

OS

    • Linux Mint 17.2
    • lm-sensors is called by ZoneController App to monitor PC health (temperature)
    • static IP
    • Samba network share (so that Windows PCs on network can easily retrieve log files)
    • SSH server
    • SFTP server
    • HTTP server (see below)
    • ufw (firewall)

ZoneController App

  • Java application (NetBeans project)
  • RXTX used for communications interface to ZCrf
  • gets PC health using Linux lm-sensors; detects high temperature
  • gets power status from UPS using Linux apcupsd; detects power loss events, backup time < 15 minutes
  • Network (socket) server (so that other PC's on network running the zcClient App can get data, and so that HTTP server can get data using PHP).
  • gets sensor data from Remote Nodes via the ZCrf interface.
  • detects alert conditions; sends alert message to external devices (zcClient App connected via network, Remote Nodes with human interface support); log to file
  • monitors sensor data; log to file
  • gets weather info (forecast, NWS alerts) via WeatherUnderground API

HTTP Server

    • LightTPD + PHP + Javascript
    • PHP script uses client socket connection to the ZoneController App network server to get data; sends JSON formatted data.
    • Javascript requests data every 10 seconds
    • HTML pages show alerts, security status, weather info

UPS

  • APC Back-UPS XS 1000 (BX1000G)
  • >4hrs backup for ZoneController PC
  • connected to ZoneController PC via USB
  • apcupsd: Linux service is used to get information - called by ZoneControllerApp which then parses the data
  • detect power loss events

ZCrf

    • link to project page
    • wireless interface to Remote Nodes

Remote Nodes + Sensor Nodes

    • link to project page (Remote Nodes)
    • link to project page (Sensor Nodes)

Future Improvements

    • Use 915MHz RF modules in ZCrf and Remote nodes (significant power savings, less crowded band)
    • Replace UPS with DC battery backup (increased backup time, wasted conversion back to AC, no need for AC-12VDC power supply)
    • Replace ZoneController PC with Raspberry Pi, or similar (significant power savings)

Note: for security reasons, no files will be distributed.