Difference between revisions of "Building monitoring"

From Earlham CS Department
Jump to navigation Jump to search
(Energy Display Scripts Outline version 2.0)
(Buildings)
 
(169 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Energy Display Scripts Outline version 1.0==
+
==General==
#Java scripts harvest data directly from Modbus
+
* [[Energy Monitoring Hardware|Equipment Details]] (keep current!)
#Perl scripts collects this data and put it in the Postgress database "energy" under the table "electrical_energy"
 
#*electrical_energy attributes:
 
#**area - what building.
 
#**preal - kW hours for that instant.
 
#**date - date of harvest.
 
#A final perl script (display/production|development/js-file-gen.pl) accesses this data and generates a .png graph using the Google graph API
 
#* This script takes one parameter for either the production or development branches.
 
#The images generated (day, week, month, year) are put in a html frame on a [http://proto.cs.earlham.edu/~energy/production/eDisplay/ page] to display the data.
 
#*This page refreshes every 5 minutes
 
  
==Energy Display Scripts Outline version 2.0==
+
==Buildings==
===Postgres db===
+
* Contact Daryl about Siemans (Tyler, Stanley, CST)
* Data stored in databse 'energy' under table 'electrical_energy'
+
* Central Switch - IB, CP, GC
* 'electrical energy' has the following attributes:
+
* EH - (good luck)
**area - which building.
+
* AWC - GC - (GC, 10-16-14, needs hooked up)
**preal - kW hours for that instant.
+
* Tyler - GC - (GC, 10-16-14, Steve Belec said that he will be receiving a walk-through from the contractors)
**date - date of harvest.
+
* Stanley - GC - (GC, 10-16-14, need direct access for configuration over powerconfig)
 +
* New Building - GC - (GC, 1-23-14, waiting for Siemens system designers to get here to hopefully explain Tyler, Stanley and the new building)
  
===data_gen.py===
+
==EGX100==
* generates a JSON file filled with data from a sql call to the database.
+
[[Energy Monitoring Hardware]]
  
*Main(building_file)
+
==Siemens==
**file run by cron
+
[[Siemens Sentron Pac3200]]
**Called from main loop.
 
**Calls CreateBuildingList(), ConnectToDatabase(), GetAllData(), EncodeData(), DisconnectFromDatabase()
 
 
*CreateBuildingList(building_file)
 
**Called by Main().
 
**For each building in building_file add to a python list.
 
**return that list.
 
 
*ConnectToDatabase()
 
**Called by Main().
 
**connects to 'energy' databse in Postgres
 
**returns database connection and the current name of database.
 
  
*GetAllData(db connection, building list)
+
==PowerLogic==
** Called by Main().
+
[[PowerLogic PM800]]
** makes a python dict of all data
 
** calls GetBuildingData()
 
** replace unwanted dates from older buildings
 
** calls EqualizeDataValues()
 
 
*GetBuildingData(dbconnection, building)
 
**called from GetAllData()
 
** calls SetSQLQuery()
 
** returns rows from sql call and row count
 
 
*SetSQLQuery(building)
 
** called from GetBuildingData()
 
** Makes a sql call to the databse energy from the table electrical_energy
 
** returns rows from sql call and row count
 
 
*EqualizeDataValues(all_data, dates)
 
** fills null values for dates of newer buildings.
 
** returns all data
 
 
*EncodeData(all_data, dates)
 
** Called by Main().
 
** sorts all_data by date
 
** dumps in JSON file
 
** initializes gviz metadata
 
** calls LoadData().
 
** writes JSON file which JS reads from.
 
 
*LoadData()
 
** Called by EncodeData()
 
** gviz api call
 
** encodes data to JSON file with headers.
 
 
*DisconnectFromDatabase()
 
**Called by Main().
 
**disconnects from database 'energy'.
 
 
===main.js===
 
*non-function
 
**creates a global variable which keeps track of which buildings are checked, initializes as all true.
 
  
*Flip(which)
+
[[Sepam Series 20]]
** flips the boolean values of the global array.
 
** calls RedrawVis()
 
  
*RedrawVis(values[])
+
[[Category:export]]
**Takes an array of booleans
 
**processes and array to pass to DrawLineChar() containing indices of which columns delete and therefore not draw.
 
**calls DrawLineChart()
 
 
*DrawLineChart()
 
**creates a Dashboard
 
**creates a chart wrapper, this is where you can adjust basic settings about the main chart.
 
**creates a control wrapper, this creates the controling bar on the bottom.
 
**binds the chart wrapper and the control wrapper together, draws the chart.
 
** calls RedrawControls()
 
 
*RedrawControls()
 
**finds a certain string in the svg tag that designates the control tabs in the control wrapper
 
**replaces with a new string in svg format for a slightly larger control that can be more easily manipulated by touch.
 
**not functional at time of writing.
 
 
===HTML+CSS===
 
*index.html, the file people load.
 
*includes jquery.minm.1.7.2, for gviz api
 
*main.js, draws graphs
 
*bootratp-button.js, enables buttons to behave like checkboxes.
 
*main.css, styling.
 
 
 
==Building EGX100 IPs==
 
*159.28.165.<strong>100</strong> - Bundy
 
*159.28.165.<strong>101</strong> - Barrett
 
*159.28.165.<strong>102</strong> - Wilson
 
*159.28.165.<strong>103</strong> - Warren
 
*159.28.165.<strong>104</strong> - Mills*
 
*159.28.165.<strong>105</strong> - Olvey Andis
 
*159.28.165.<strong>?</strong> - Main switch gear (PM8)
 
 
 
: * - CT magnets are not installed yet and/or no EGX100 on network
 
 
 
==Building Amperage Correction Factors==
 
*Bundy - 31.25
 
*Barrett - 15.625
 
*Wilson - 62.5
 
*Warren - 62.5
 
*Mills* - ?
 
*Olvey Andis - 31.25
 
:Source: load the schneider doc, amps, reference page
 
 
 
==Documentation==
 
* [[pm8-mib|MIB for the PM8]] (device mounted on the main switchgear)
 
* [[Media:enercept-registers.pdf|Register list]] for the Enercept/EGX100s (devices mounted in each of the buildings)
 

Latest revision as of 13:54, 4 January 2017

General

Buildings

  • Contact Daryl about Siemans (Tyler, Stanley, CST)
  • Central Switch - IB, CP, GC
  • EH - (good luck)
  • AWC - GC - (GC, 10-16-14, needs hooked up)
  • Tyler - GC - (GC, 10-16-14, Steve Belec said that he will be receiving a walk-through from the contractors)
  • Stanley - GC - (GC, 10-16-14, need direct access for configuration over powerconfig)
  • New Building - GC - (GC, 1-23-14, waiting for Siemens system designers to get here to hopefully explain Tyler, Stanley and the new building)

EGX100

Energy Monitoring Hardware

Siemens

Siemens Sentron Pac3200

PowerLogic

PowerLogic PM800

Sepam Series 20