Control a plug based on available solar energy


To keep my electricity bills down, I’ve created this to encourage my family to use the dishwasher only when my solar panels are producing power. It’s connected to a smart plug (I’m using a Samsung ST one).

The piston turns on the plug an hour after sunrise and turns it off an hour before sunset. This serves as a proxy for solar energy production (my inverter isn’t smart enough for anything better). If the dishwasher is running, the piston will wait until the cycle is complete before turning off the plug. We often load the dishwasher in the evening and turn it on. It will only actually start when the piston turns on the plug the next morning.

It’s quite simple: just define a plug to use and a power threshold to tell the piston that the device is running.


Excellent use case and environmentally friendly.

Just curious if you’ve considered a lux sensor somewhere near the panels. Seems like you could correlate light level to energy production increasing the efficiency of your piston, not only could you limit use by time but weather events too (clouds/storms/etc).


Good idea. The sensor would need to be weatherproof. And most importantly, I’ll need to develop some courage to get on the roof :wink:

To improve the estimation, the light level would need to be tempered by the temperature. Solar panels like sunlight, but they don’t like heat.