Skip to content

UMDWaterShed/DataLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

WaterShed DataLogger

This repository holds all of the code for the house's DataLogger in a single Visual Studio Solution.

Here is a breakdown of the Projects in the Solution.

  • DataLogger Setup - This project is an installer for the other projects.
  • DataLogger Controller - This project is a service controller to start and stop the DataLogger services.
  • DataToWeb - This project is for the service that uploads the data to the remote webserver.
  • EnphaseParser - This project is a class library for parsing the HTML generated by the Enphase unit that monitors the solar panels.
  • WaterShed DataLogger - This is the most important project. It is for the service that listens to the serial port and collects data from the Arduino controllers.
  • WaterShed Enphase Logger - This project is for the service that gets the data from the Enphase unit. It uses the EnphaseParser class library above.

IMPORTANT: The Branches

There are currently two branches (besides master) in this repository.

  • Timer-Based--used-for-competition uses System.Timers.Timer objects to check the serial port for new data. It has several drawbacks, including regular receipt of partial packets if the timer ticks while a packet is being received. It was written this way following the sample code that came with the Arduino controllers. This is the version that was running in the house during the competition.
  • Event-Based, as its name implies, uses events fired by the framework when data comes in to the serial port. It also uses events to fire packet processing instead of processing the packets inside the timer loop. This speeds up data collection and avoids buffer overflows. It also reduces system load because of passive waiting for an event instead of actively checking for data every second.

Setup

Several items are needed in order to set up the DataLogger.

  • MySQL-compatible Database Server. My preference is for MariaDB and the Aria storage engine. Using this engine substantially improves database reliability and recovery, a problem that we had quite often during construction when power was regularly shut off. The MySQL instance got corrupted almost every day and we set up scheduled tasks to repair it. Aria should prevent this from happenning.
  • Microsoft .NET Framework 4 Full. This should already be installed if the computer is current on its Windows Updates.

Recommended items

  • Any Database Tools, such as MySQL Workbench, HeidiSQL, and/or PHPMyAdmin that will allow easy maintenance of the database.
  • Microsoft Visual Studio 2010 to be used to build the software from source. However, this can be run on another machine and the compiled files be transferred to the DataLogger computer in the house.

Important Changes to the Settings Files (app.config)

In this repository, all settings files contain placeholders instead of usernames and passwords. Here is a list of the type of data which must be entered:

  • COM port on which the Arduinos are connected.
  • Database Name
  • Database Login Username/Password
  • Login UserName/Password for the DataToWeb uploader.

TO BE CONTINUED

Releases

No releases published

Packages

No packages published