I'm pretty fresh to the Raspberry Pi scene and decided my first project is to design a smart humidifier for a Cigar Humidor.
I looked online at some projects other people have used, but it involved a full size humidifier that was plugged into a smart outlet to control a room humidifier. My project has obvious size constraints being that both the sensor and humidifier must be small enough to fit in a humidor with cigars, and obviously going too big will result in loss of usable space which kind of defeats the purpose.
Due to the nature of a humidor having moisture inside I'd like to keep the Raspberry Pi unit external, so only the Humidity sensor & Ultrasonic humidifier will be inside.
For the Humidity sensor I'm going with the AM2302 Sensor as it is already setup for mounting, the fact that the polling is limited to 2 seconds isn't that huge of a deal as it is measuring Relative Humidity (or RH) and only needs to be checked within a 5-10 target drop in RH% (Target humidity for cigars are between 60-80% RH, but this is preferential to the smoker). The plan is to have the sensor poll the RH inside the humidor to the Raspberry Pi outside of the Humidor, if the result is above the specified threshold nothing will occur. If the result is below the specified threshold this will result in the Ultrasonic Humidifier to be powered on, thus increasing the amount of humidity in the humidor.
I found a guide easily enough through Adafruit for wiring the sensor so that it will poll to the Raspberry Pi, but that's where I'm getting stumped! I know there is limited control for the Raspberry Pi's USB ports, in fact the only thing I seem to find is an "All or Nothing" response where it would disable not only the 4 USB ports but also the Ethernet Port which would prevent my Pi from communicating with the outside world.
So my question is, how would I go about controlling power to a USB powered device?