Being that it is spring, and in the state of North Carolina, you never know what the weather is going to be like at the start of each day. We created this IOT project with the goal of being able to know the temperature and humidity inside your home/office without the need of looking at the thermostat. To accomplish this, two Particle Photons were used. The first was connected to a temperature/humidity sensor (DHT11), which would record the present temperature and humidity which is then published to the internet. The second Photon was connected to the humidifier itself which was subscribed to the data published by the first Photon.
The first Photon, referenced as DHT11 Sensor in the wiring diagram and code attachment, was responsible for recording the temperature/humidity and then publish this data to the internet. The photon was set to record the temperature every 15 seconds. To test the sensor, we placed the photon inside and allowed it to record and publish data. ThingSpeak was paired with the Photon over this period so that it could be used to plot the temperature versus the time and the humidity versus time recorded. Below is the ThingSpeak graph displaying the temperature/humidity data over this time period. Note that the Temperature/Humidity Sensor code includes library codes "PietteTech_DHT.h" and "ThingSpeak.h".
The first Photon, referenced as Humidifier Sensor in the wiring diagram and code attachment, was responsible for taking the published data from the internet and using that against a set point. The photon had a set point which when this set point was exceeded the photon turned the humidifier off. On the other hand, if the data is reading under the set point then the humidifier continues to run. The photons together each have an LED that is lit to notify the user that the humidifier is active and if it is not lit the humidifier is currently turned off. Note that the Humidifier Sensor code includes library codes "math.h".
Live Graph Link