The Customer
EnergyHub is a dynamic software company based in Brooklyn, New York, and the leading provider of grid-edge DERMS (distributed energy resource management system).
The Project
Dispatch Load Testing – Mock Partners APIs
Overview
EnergyHub works with more than 60 utilities across North America to enable utilities and their customers to create a clean, distributed energy future. EnergyHub’s platform lets consumers turn their smart thermostats, batteries, EVs, and other smart devices into virtual power plants, keeping the grid stable and enabling higher penetration of renewable energy.
The company works on technology that provides energy and cost savings to more than a million people through partnerships with the most exciting companies in the 'Internet of Things' space. EnergyHub is an independent subsidiary of Alarm.com, the leading platform for the intelligently connected property.
The Challenge
The EnergyHub platform communicates via OEM (Original Equipment Manufacturer) partners’ APIs (device manufacturers) with smart devices (thermostats, batteries, and EVs) installed in homes. When a utility user schedules a demand response (DR) event on the EnergyHub platform, a myriad of requests is triggered via partner APIs, activating events for each specific device brand.
Load testing presented a particular challenge because EnergyHub cannot host thousands of devices from each partner; that would not be cost-efficient or flexible. The problem of load testing at scale in a simulated environment was a challenge. Some questions included:
1) How to bring confidence that our code will work in an environment in which there are multiple device brands with unique characteristics?
2) What are the limits of the platform?
3) What errors or edge cases can we simulate and remediate?
The Solution
The solution was to create a custom test infrastructure that simulates the real scenario. This infrastructure consisted of an automated environment that executed a set of predefined tests and scaffolding that represented the partners’ APIs.
The server mocks the requests and responses that the real partners’ APIs do, and it simulates what the real API would do internally (i.e., dispatch DR events to real devices). That gives us the ability to mock any number of devices, recreate any edge case scenarios, and reproduce any production behavior for improvement and debugging purposes in a safe environment. This also allows EnergyHub to push its system to its limits, and to find and clear performance bottlenecks before they are encountered in production.
As the number of managed devices continues to grow, staying ahead of this becomes more and more critical.
The Business Benefits
Even though this was an ongoing project and it was implemented incrementally, the benefits were realized from day one. EnergyHub’s platform continues to grow, controlling more power than the state of Hawaii. EnergyHub has the infrastructure it needs to ensure it can continue to safely control millions of thermostats, batteries, and electric vehicles—to safeguard the grid as it decarbonizes.
Mark O'Neill, VP of Engineering, EnergyHub
Why Improving?
EnergyHub leveraged Improving’s Nearshore team to ramp up quickly and stay within budget. Our talented Nearshore team delivered API engineers, DevOps, QA, and Program Management, working with AWS, Java, and Python.
Get Started
Learn more about how Improving can help you get started by contacting us today at sales@improving.com or filling out a contact form through the link below.