Close

And we're up and running

A project log for ESP32 Greenhouse Monitor

Collect temp/humidity, soil moisture, sunlight data to be stored on local web server

Jeff TaylorJeff Taylor 04/10/2018 at 22:180 Comments

I finished building out the electrical box and hooking everything up this weekend.  The unit is now in place in the greenhouse, and the real-world is presenting issues I hadn't thought about...

The data is being fed into a mySQL database now, but the current code is updating every 30 seconds.  That's way more data than I really need to store.  I wrote up a quick web page to display the last 24-hours of info and found it best to average out every 5 minutes worth of data to smooth out spikes.  That also made a huge difference in the time required to render the graphs... for each 5-minute period I now have a single value to plug in rather than 600.

As  for the outlet box itself, that was as easy as expected.  I took a metal outlet box with a faceplate for four outlets, purchased one each of black and white outlets, and removed the tabs from one side to isolate each outlet.  I have two power cords, one black and one white, which feed power to the corresponding outlet, and then from all of this I feed eight wires from the outlets to the relays.  The socket colors allow me to keep track of the source of power for each device.  Since the heaters pull so much juice I have to run two extension cords to the greenhouse, and each one feeds one heater plus one other device.  It's not much of an issue right now because the heaters only run at 50% power, and only one of those stay on all night.

So far so good... now I just have to work out the issues with the code...

Discussions