Where do I spend my electricity? Aivar, Tiit, Jarmo, 29 Sep 2014
Where do we spend electricity? Good question, which usually does not get a quick answer. In the best case we know the size of monthly energy bills and that’s it. While working with self-service solutions for Estonian Energy and Elion smart home project, we got personally interested in the topic. Likewise we wanted to understand, can we actually save by consuming smarter and buying electricity with prices tied to power exchange.
First, we needed data for analysis. We had to drop the idea of getting it from the network operator as they possessed at best only monthly total consumption and we had to look further. We started to look for devices that are in one hand available at reasonable cost and on the other able to give the data outside “the box”.
Soon we got the first setback as we found devices at acceptable cost, which could be plugged in and show consumption on screen, but there was no way to read out data. We even tried to disassemble one with the purpose to get data “out” by force but with no luck. We had to temporarily give up.
Other devices cost several thousands of euros and were meant for rather industrial usage. These were able to display various data on screen, but likewise unable to export this data in real time. Looking at the price, they would have never justified off the initial investment either.
The idea, that initially looked like an easy task, turned closer to mission impossible. We froze it until noticed Wattson device, which was able to export data, was reasonably priced and seemed to fit well for our purposes. For measuring consumption with clamps and assumed somewhere there is a place where both phases (or all 3) are separated, for instance by the meters. Unfortunately this did not work either as we found no place in our homes or office where to put the clamps.
Then we found Current Cost devices that fitted into any home, since data gathering was performed by counting flashes by the meters. It turns out every meter has a light that flashes after every consumed 1kWh either 1000, 10000 or more times. Current Cost device could be connected with computer and read data from COM port. Great! We wrote software that read consumption data and in every 6 seconds sent to our server.
This way our project, codenamed Wizener, finally got started! We gathered electricity consumption data and presented it graphically for our office and ca 10 homes. We started to understand, for what and when we spend electricity.
For instance, we “discovered” floor heating system in one home that had been there (switched ON!) for ages without the owner knowing it and which gave no value during summertime. The data we got was so precise that we started guessing, what was going on in our home at certain point of time, like when the oven is turned on. Going further, knowing it was oven, what was working, and judging by the time it is “ON”, we tried to figure out what was in the oven. For the sake of truth, we got it right that it was meat, but made mistake in the type of meat.
We were close to what we envisioned. To really add business value with this approach, we started looking for industrial consumers.
Contact with Tallinna Sadama Energia (Port of Tallinn Energy, ETS)
We continued developing Wizener by adding several exciting features to give better insight to electricity consumption. For instance real time price information was added according to customer contract type - at any point of time customer knows how much is consumed and how much this is in monetary terms.
While presenting Wizener to various energy experts, we met people from ETS (daughter company of Port of Tallinn, operating in the field of electricity). They liked the idea and we agreed to start a pilot, where several ETS customers would be able to monitor their electricity consumption and respective cost via Wizener.
Unlike many other network operators, ETS was gathering data from meters on hourly basis and they also had a solution for sending consumption data via email. For quick start we were able to successfully use both features and the first integration of Wizener with ETS systems was done in a quite primitive manner - every hour the solution for gathering consumption data sent an email report with last hour data that Wizener imported to its database.
At the same time (summer 2012) Estonia was approaching deregulating of the electricity market (01.01.2013). For ETS that meant an obligation to send their customer hourly consumption data to central hub of Elering. There could not be a better moment to deepen our cooperation as we were already finishing creating data hub for Elering.
Getting closer to meters
Sending data to central hub was just a half of the job. Bigger challenge was receiving consumption data from meters in a reliable quality and way.
ETS is using two types of meters - older Elster and newer ADD branded one’s, produced in Moldavia. With ADD meters the situation was quite good as the producer provided as well the data reading software. For accessing Elster meters, a custom software was made locally, that had reliability issues - server gathering meter data crashed often, causing data loss.
We offered to write more reliable software that is integrated to Wizener that is further integrated with Elering’s central data hub. This way ETS would get data to hub (regulatory compliance) and Wizener, which enables offering its customers real time consumption and pricing information. We took the meters and other necessary gadgets with us to our office and started to dig deeper.
During research and programming we became friends with RS485 and memorized OBIS codes. Once we mastered getting the data out of meters, we had to figure out where we would install the software. One option was installing it in a PC that was used so far for running the data gathering software. At the same time we had some extra Raspberry’s available in our office and we thought of using them to run the data gathering.
The benefits of using a Raspberry were the size, non-existent power consumption, ease of replacement and last but not least, it looked so cool! The only potential minus was its performance. To find out, we did several tests and performance seemed sufficient. Since the capabilities of a Raspberry are limited, we had to keep several things in mind, for instance, logs can not exceed foreseen disc space, otherwise the disc will be full and data gathering disturbed. Likewise we had to take care that installment meant only connecting network and power cables, the consumption data collection software had to start automatically and for sure. In case of problems it has to be able to notify somebody. For that purpose we use Monit, that is all the time keeping an eye on system and in case of incidents tries to solve the problem and emails administrators.
Thirdly we had to take into account all sorts of special cases, like what happens if there is no internet connection for several hours? That particular case was solved by saving readings in Raspberry’s current database and when connection is reestablished, they are gradually sent to Wizener. As a result, one Raspberry can easily handle data coming from tens of substations and from more than 500 meters.
A very similar Raspberry is handling data sending to Wizener from newer type of meters. The only difference is that data is coming directly from database, not from meters.
Data becomes information
Today ETS customers can have a graphical overview of their electricity spending with options to drill down to single meter. Data renews basically real time and can be maximum 1 hour old. Various comparisons are provided to help discover peaks and biases in consumption. For bigger customers with special needs, for instance need to inform the power market about their next days expected consumption, we added possibility to get reports in csv format.
System administrators at ETS have interface for customer management, where they can add, change, erase a customer; assign pricing details, add meters and manage access rights. In addition ETS can get a report in the end of a period, which is the base for billing their customers. This report contains hourly electricity consumption data by customer with corresponding pricing info, which is especially important for customers buying electricity at exchange price.
For some customers ETS is in the role of electricity seller and some other company provides network services. In this case Wizener operates the other way around and gets the data from Elering data hub to Wizener, enabling to see energy consumption of these customers and generate bills in the end of the period.
As expected for a modern and low maintenance infosystem, Wizener is monitoring important events and notifies needed parties when needed. For instance ETS administrators (and responsible developers at Codeborne as well) are notified when no data has been received from a meter for certain period of time, enabling to react promptly and avoid data loss. Likewise developers and administrators are informed when new customers or meters are added, about the status of consumption data exchange with Elering’s data hub, pricing info retrieval or other events take place. We have no application administrator for Wizener at Codeborne so it has to manage on its own or let us know when it can not any longer, meaning it notifies when developers need to interfere.
Raspberrys used for gathering and forwarding consumption data are as intelligent - when power outages occur, the system restarts itself. If the software crashes for some reason (sometimes JVM stops for unknown reasons) then administrators are notified and the software restarts automatically.
As a result of tight cooperation with ETS, their customers are using a very innovative solution to for smart and sustainable energy consumption, enabling among others to predict tomorrow’s needs that bigger customers have to provide the exchange.
The importance of electricity grows in time, the reasons being economical, ecological or security. The need for smart and sustainable consumption has launched many national and international initiatives. We as well have made the first steps in this direction and are proactively thinking ahead, how to create business value with the data we possess. And we like to dig deep, no matter what technology needs to be used!
See also wizener.com