Projects

Some of these were while I was employed by someone else and some are hobbies.

Road Condition Warning System

While working at DTN, I designed and managed the software development for a centralized, hardware-agnostic Road Condition Warning System (RCWS) which used real-time data from Road Weather Information System (RWIS) stations to drive Dynamic Message Signs (DMS).

The RWIS stations are professional grade weather stations with additional sensors embedded in the road surface that measure temperature, salinity and water film height.

Unlike other automated warning systems, this one was completely centralized on the central server. We built a prioritized rule engine, that allowed new conditions to be monitored through configuration, allowing future implementations and adjustments without code changes.

The system was deployed on Hwy 22, and I was awarded the Transportation Ministers Award for Safety Innovation.

The system was also deployed in Central Alberta on a bridge that frequently had dangerous icing conditions as well as reduced visibility. That location had rules that combined surface conditions with the visibility to affect one of three or four different messages to be displayed on the DMS signs placed on the approaches to the bridge. As far as I know, this is the only instance of a multi-parameter warning system being deployed in this way.

Here is a short animation of how the system works:

A full write up is here.

SCADA Simulator

The main purpose is operator training, and configuration testing of new Aveva OASyS SCADA features such as alarm inhibition. Our gas pipeline customer requested this as a way to test new configurations with actual replayed field data before deploying into production.

The simulator reads the SCADA point configuration straight from OASyS, and auto-configures the appropriate Modbus engines read to respond to polls from Omnicomm. It can handle multiple commlines at once, and multiple remotes per commline.

The values of the points are configured by the user according to scenarios, which in turn are made up of event blocks. This allows the user to re-use event blocks in different scenarios, to save on config time. Eventually, event blocks will be data-mined directly from the customer’s historical data, allowing the user to extract real-world situations, and replay them in the simulator.

The simulator has an easy to use web front end and runs on a VM copy of the customer’s Engineering server.

Davis Weatherlink CSV Parser

Davis Instruments have built a new WeatherLink system hosted on Amazon. Their API is a simple REST call, and the CSV you get back is a little challenging to decode.

I wrote a Python library to decode the CSV file, and prepare SQL statements to save data to a database.

No GitHub link yet because I need to break it out from the HomeMon project (below).

Internet Speed Monitor

Uses speedtest.py to record the uplink, downlink and latency of my internet connection into a SQL database.

Google charts to plot the output.

Speedmon Chart

No GitHub link yet because I need to scrub private, hard-coded things from the source.

Home Environment Monitor

Uses the Davis CSV library to plot the inside and outside temperatures of my house. The initial plan was to mount an iPad somewhere to replace the weather station console I used to have.

Sadly, the Nest data doesn’t update anymore..

The inside temperatures came from Nest, but since Google bought them, their API no longer works, and I haven’t looked into what the alternative is.

Basically just an excuse to mess with Google Charts

No GitHub link yet because I need to scrub private, hard-coded things from the source.

Visual Basic Macros

A collection of VBA code that I have collected over the years, available on GitHub, the most interesting and well-used being:

  • ConcatenateCells()
    • Assign this to a keyboard shortcut, and then merge all the selected cells into the top left of the range by concantenating all the cells into a single string seperated with spaces. Excellent when copying and pasting proposal RFPs into excel.
  • MatrixLU()
    • A shortcut for the MATCH() and INDEX() method. Use it to lookup a value from a table given the row and column headings

Various Scripts

All the little Shell, Perl and Python scripts I’ve written or collected over the years.

No GitHub link yet because I need to scrub private, hard-coded things from the source.