In Part 1 of the Rethinking the Smart Home series, we looked at how we can using batteries to offset the electrical usage of certain devices.  We did not discuss how and when that battery system is charged.  We will do that now.

Batteries are just devices

There are a lot of “devices” in our homes.  Devices are things that use power.  This includes lights, displays, HVAC systems, and even battery chargers.  Over the last few years, the market has flooded with relatively inexpensive smart light bulbs, switches and outlets.  Many of these offer power and energy consumption monitoring.  Many of them have APIs either provided by the manufacturer or reverse engineered by the community that can be used to communicate with these devices.  I decided that I could use one of the smart outlets I have to control when the battery system charges.  Obeying the Law of Using Your Own Generated Power, I will only charge the batteries when there is enough solar power available.  I realized quickly that there are many devices I have in my house that I can turn on and off in this way.  I have several grow lights for indoor food plants that are already connected to Ubiquity mFi WiFi outlets.  I have them on a schedule, but I was interested to see how much I could save if I only had them run when there was enough available solar power. 

The use-cases after that kept growing.  What if I tell my smart light switches to dim when there isn’t enough available solar power?  What if I raised the setpoint of my thermostat by a degree if there isn’t enough solar power?  What if I only charge my robot vacuum on solar power? 

To see how much money I could save, I wrote some code to help manage the devices based on a “power budget” which was set by the output of the solar PV system.  For example, if the PV system was producing 2000 Watts of power, I would turn on “managed” devices until I either reached 2000 Watts or they were all powered.  If the solar PV output dropped to 1000W, I would need to turn off some devices.  To do this, I wrote some code I call the “Device Manager”.  The Device Manager would maintain the power budget and turn on and off devices as required.  It would also run device-specific rules (more on that later).


Some devices are more important to me to have powered than others.  For example, my phone charger is more important than the robot vacuum charger.  If the power budget is exceeded, Device Manager will first turn off the lower-priority devices.

Runtime Modes

 Many utilities offer variable rates depending on the “time of use” of your power.  For example, rates are often cheaper in the night when fewer people are using lights and appliances.  Rates can also be more expensive during “peak usage” when the grid is experiencing more load for example, at noon on a hot summer day when everyone’s air conditioning is running.

The Device Manager should be smart enough to take these time of use modes into account.  If I go over my local power budget, I may want some devices to remain running if it’s during off-peak hours of the day.

A perfect example of this is my greenhouse preemptive cooling system.  I run this system at night during off-peak hours for the cheapest rates.  It also runs more efficiently at night because it’s cooler.  Double-bonus.

Rules Engine

Turning on/off devices is powerful enough for many devices.  But what about devices you don’t necessarily want completely off?  For example, I need lights at night to see.  I can’t just have them turn off if there isn’t enough power.  I can have them dim, however.  There are lots of use cases from dimming lights to adjusting thermostat settings that calls for a rules engine.  I have written rules to turn off devices, or dim lights or even check occupancy.  Devices can have many different rules so rules can be combined in interesting ways.  My lights have occupancy rules and dimming rules.  I even have a rule that “links” devices to a master devices so that the on/off state mirrors the master device.

Batteries as a buffer

In the first part of this series, I built a battery system to help optimize when I charge my laptop and other devices.  That system really cannot work to peak efficiency without the Device Manager managing when the batteries charge.  I charge the battery banks when I am under budget with medium priority.  I found this works best for my usage.  I am able to charge all phones in the house and my laptop from this simple battery system.  While it doesn’t amount to huge savings (only $5/year), it does make a good proof of concept that we can use to power additional devices later.

In practice

With the system running and managing about 8 devices ranging from grow lights, to chargers to the thermostat, we observed considerable savings.  Our power usage is about 30-50% less year over year.  That’s much more than Not all of that can be attributed to the Device Manager system, but a lot of it can.  Most of the savings is probably in the thermostat automation, but the light management probably helps a lot.  I believe it also helps us get to sleep faster since the lights are not so bright at night.

In the next part, we will look at how using AI and machine learning makes this system even better.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.