Clean Smart Plug

Clean Smart Plug

A "smart plug" that only turns on when the marginal power on the local (New England) grid is clean.

Status: Completed
Start Date:
March 24, 2021
End Date:
May 01, 2021

Motivation

Through my work, I'd heard about times that wind power in northern Vermont had to be attenuated because there was sufficient local demand. I thought it'd be neat if I could program a smart plug to only turn on when the marginal fuel on the grid was clean. Roughly 30% of the time on the New England grid, this is true. If I have a job that is flexible (perhaps charging an electric vehicle during the night), I could use this sort of plug to maximize our usage of clean energy. (The marginal fuel is the fuel used by the *last* power plant needed to meet demand at a given moment. It determines the current price of electricity on the grid and if more power is needed, it will be the fuel that is used to meet that immediate increase in demand.)

Description

I used a KASA smart plug and found some notes online about its API so I could turn it on and off according to code I wrote. I already had code that interacts with New England's ISO region (Independent System Operator - the people who are responsible for the reliability, pricing, and planning of the electricity on the grid). So, to build this plug, I wrote a bit of additional code that connected the ISO information on the marginal fuel to the smart plug. When the ISO region reported at least one of its marginal fuels was a renewable/low-carbon fuel (roughly 30% of the time), I turned the plug on. When the ISO region reported that the marginal fuel was a fossil fuel (usually natural gas), I'd turn the plug off. I included a little safety valve: if I used it overnight to charge something, I'd make sure that if there hadn't been at least 90 minutes of time when the plug was on, I'd turn the plug on for the last part of the night so I'd be sure my device was charged when I woke up. Here's a time-lapse video of the plug working overnight: https://www.youtube.com/watch?v=wOJVtizFYu8

Lessons Learned

Automating tasks I want my computer to do (checking the ISO-NE grid status) Using APIs that don't have publicly published methods (at the time, I couldn't find official documentation for the Kasa plug, but I think it exists now.).

Resources

Tags

clean energy fun coding

Project Images

Project Image

The New England grid relies heavily on natural gas as a marginal fuel, but about 1/3rd of the time, a renewable fuel complements or displaces the marginal fuel.

Project Image

The smartplug + charging iPhone in action.

Project Image

Wind and hydro electricity are the most likely renewables to act as marginal fuels on the New England grid.