Inspiration

Energy usage has been an interest of ours for some time. The problem has always been that it is very difficult to intuitively see and understand energy usage as you might water or fuel usage. The amount of electricity individuals have access to is practically unlimited, so it is easy to consume much more energy than you may want or need.

We took the name for our project from the mho, a unit of electrical conductance, equal to the inverse of an ohm (a unit of electrical resistance).

What it does

mhO-Map is an electrical power usage monitoring framework that aims to provide insight useful in reducing power usage. To do this, the framework maintains a map of the electrical circuits in your home, and visually represents the sensors deployed on the circuits.

The design is modular, so power measurements can be obtained from many different sensors and sources, and different interfaces can display the data and retrieve analytics.

How we built it

The statistics and data backend is written entirely in multithreaded C++. This part of the project handles scheduling data collection from sensor devices, and serves data to the user interface on request, so this is the best place to benefit from the performance of C++. The backend stores data in a SQLite database.

It is also interesting that the entirety of the code in the backend application, with the exception of kernel calls, standard C++ libraries, and SQLite3, was written by a member of the team. Some utility code was reused from previous projects, but was still originally written by a team member.

The web user interface is written DJango, a python web server and frontend framework.

Challenges we ran into

Toward the end of the hackathon, we found some of the most difficult work was integrating the parts of the project that had been developed separately for time efficiency.

Accomplishments that we're proud of

Jeremy was proud of of using a raw TCP socket from python to interface with the statistics backend server.

Ethan was proud of building a Real C++ application, which was well architected before code was written, and implemented complex program functionality correctly. He was particularly please because he was able to implement a plugin system using shared objects, which he had been meaning to do for a long time. We did this to implement flexible support for arbitrary systems through a common interface.

Charlie was proud of the handwritten multithreaded epoll-based TCP socket server implemented in the backend, which was potentially overkill for this application, but performed well. He was also proud of actually planning out and designing a project before starting coding.

What we learned

A lot. There are always more problems than you expect, and a little bit of planning will save you a lot of headache. Just make sure to leave time for the programming!

What's next for mhO-Map

The main missing piece at this point is the hardware devices that implement the power sensors. We worked to offload some of the functionality of these devices to the common backend, such and measurement scheduling and data flow. There are a number of ways to implement these devices, from open source hardware to pre-made cost-effective devices.

Share this project:
×

Updates