I am working on a project building a system to automate much of the tasks in my home garden. For a few weeks now I have had the system setup to control a humidifier as well as have a sensor to read the current humidity. I have been reading the humidity every minute and my program has a min and max humidity set, if the humidity goes below the min it kicks on my humidifier and if it goes above the max it kicks on my exhaust fans. I have also set the system up to log the temp and humidity reading every time it updates to a database. What I am looking to do is write an algorithm that will take this data and calculate when it needs to turn the humidifier on/off to keep the humidity in the tent as stable as possible. Right now if you look at the humidity data it is consistently being brought up to just under the max when the humidifier is running (I have it setup to shut off when it reaches 3/4 of the max humidity) and then dropping back down to the min humidity. The humidifier is a warm vapour humidifier so it takes a few minutes to heat up every time it kicks on. I want to write something that would look at past data, look at all these factors and calculate when it should turn the humidifier on or off to try and keep a steady base humidity but, I am not really sure where to start or what to google to work toward an answer. Any info anyone could provide would be greatly appreciated. I apologise if I am not giving a great description and feel free to ask me for more details.
This sounds like something you might want to do with a PID or Kalman Filter. It'd probably work better than a complex machine learning model. The humidity is probably cyclical in nature and if you can just tighten the loop a bit, you should be able to achieve your result with a simple PID.
Something like this might be what you're looking for:-