Start building your open-source smart energy management system in 5 steps

Dec 10, 2020 | Blog

Smart energy management offers up to 10-30% extra carbon and financial savings by balancing power consumption with your own renewable energy production. From cities and campus areas, to larger offices and apartment complexes, Open source IoT solutions can contribute to making it all work for you, using least cost and transparent processes. We will explain the key first steps involved in building a great smart energy management system using an open source IOT platform.


1.  Define your goals

Developing an open-source solution starts with the right mindset, one that focusses on sustainability and the value of shared knowledge, keeping in mind that it is also compatible with the pursue of financial savings. While striving to make the most of locally produced green energy, the open source approach demands a readiness to share findings and innovations with others, so everyone can benefit.

In order to decrease your environmental impact and reduce costs, your goals in an energy management project will most likely be one or more of the following:

  1. Making the most of your locally produced energy: improving the self-consumption of your system.
  2. Decreasing your consumption by balancing the load and lowering the peak use.
  3. Managing your energy assets through data analysis, to make sure the system behaves as planned.

Finally, make sure you go beyond the technology itself and look at how your users are behaving. Can you influence the way they act by giving them insights in the system, or by reminding them at the right time how they can take a specific action to reduce their carbon footprint? Defining the optimisation goals is a key starting element to build an effective energy management solution for your city microgrids or smart buildings.


2.    Connect your energy producers and consumers and get insight

At the onset, energy managers need to fine tune their understanding of their current energy assets*, or in other words, start measuring. You need to compare the behaviour of your assets and look into any noteworthy differences. Before attempting to automatically control your energy consumers*, one can make significant improvements by visualising and analysing the data collected. With a clear view of the typical behaviour of your system, you can start working on the algorithms that control your system to improve the self-sufficiency of your microgrid.

For your production devices (i.e. “producers”) you can make use of the API’s provided by most suppliers such as the SolarEdge API. Otherwise, with a bit more work, you can connect your local meter to the system.

To collect your consumption data, the same options are available: connect to your energy providers, or connect to your meter, and do not forget to deduct what you are producing. To control your consumption, focus on the high-power consumers such as your fleet of electric cars or your HVAC system.


3.    Get your energy predictions right

For best-in-class optimization, Making correct decisions as to when to charge and discharge is critical. To get this right, you need to have accurate predictions for production, consumption and pricing. To forecast solar production, online services with an API , such as SolCast, are available. Alternatively, you can build your own prediction model using free weather forecast services, e.g. OpenWeatherMap.

OpenWeatherMap wind speeds map, useful for wind turbine forecasts.

On the consumption side, use a weighted historical moving average, and take into account weather conditions. Finally, for pricing considerations, make use of the variable pricing supplied by your energy providers to take advantage of planned price variations.


4.    Define your energy management optimization rules

Now that you have live data and predictions, you can start building rules that automate the behaviour of the system according to your goals.

By way of example, if you want to increase power self-consumption, you can make sure your electric cars only charge using green energy when a sufficient surplus is predicted. You could also connect a battery that stores that surplus, which can then be used when no energy is being generated.

If your main objective is to lower costs, you could make use of flexible tariffs and run your devices, such as air conditioning units, at the most favourable tariff time periods.


5.    Save more energy by involving the user

A final critical step is to include user behaviour in the equation. Consider for instance the fact that people generally respond well to price incentives or like to benefit from easy ways to reduce their footprint.

Knowing this, just imagine as an example that you calculate the potential savings of an ad hoc action, such as charging an electric car one hour later, or at a lower charging power. Next, you send a notification to the user to offer him or her to opt in to collect half of the cost saving incurred. Engaging the users with this type of active offers and messages can trigger specific behaviours that will lead to extra energy savings.

We hope this helps you to get started with your open source smart energy management system!



More on the importance of IoT and the topics we just briefly touched upon:

  1. IoT For All: What’s IoT?
  2. Why is open source IoT important for my business?
  3. 5 ways to optimise your microgrid


*The assets (Things) in the energy system can be categorized as:

  1. Producers: locally generated green energy such as solar and wind power.
  2. Consumers: a device or group of devices that can (indirectly) use the produced energy such as electricity consumption in buildings, EV cars, and outdoor lighting. Being able to control the rate at which these assets consume the energy is preferable, as it opens up possibilities for further optimisation.
  3. Storage: for electricity this is most often a battery. Vehicle-to-grid chargers let cars function as batteries in the system too.
  4. Data: collected by your own assets or from external (open) sources, such as weather, building heating set points and car usage.
  5. Predictions and algorithms: essential to decision making are the predictions of production, consumption, and grid energy tariffs. These feed into the algorithms that decide which actions to take.