I am on Duke Energy residential and have solar panels. The largest part of my monthly bill is on-peak demand for a 15 minute window. If I turn on my oven at the same time my AC is running, that can add about $28 to my bill for just for that 15 minutes. This happens time-to-time, and I hate it.
I have been looking for a long time for a solution for turning off appliances and other devices when my demand goes above my current peak. I figure through the Nest API, I can just turn off the heater/AC if I, for example, turn on the oven. If the sun is out at that time and my solar panels are generating electricity, I can run both. This solution has been working well for me over the last few months.
Since I am not much of a programmer, I grabbed what I could from the web. Most of the program is from this base:
http://lancet.mit.edu/mwall/projects/power/That script pulls the TED data and puts it into MySQL every minute. I added all the Nest data like temperature, humidity, set point, away, outside temp, etc to the database. I then added a moving 15 minute average and a 2 minute average. If my 2 minute average goes above my current peak demand, I turn on the heater/AC. Once both averages are back below my peak demand, I turn it back on. I find that the heat/AC only turn off a few minutes a day.
I then wrote a simple PHP script to serve the MySQL data to Excel for plotting and calculating. Excel updates itself every time you open it to get the latest data. I thought about web-based graphing programs, but in the end the only one who cares about the data is me.
I am interested to see if anyone else is looking for this type of solution and wants to share ideas.