In this repository you will find an example IoT control service that will let you control relative humidity level via ESP8266 module and ultrasonic humidifier.
- AWS account (free tier will do just fine)
- ESP8266 microcontroller NodeMCU v3
- Ultrasonic humidifier UKC YX025S (KPY-25S)
- DHT11 humidity/temperature sensor
- Wirings, relays etc.
Disclaimer: this is not a step-by-step instruction, I assume you're familiar with most of the things.
-
Configure AWS credentials
- Given you already have AWS account, you now have to configure credentials on the machine that you will use for
serverless deploy
command - See this page for details -> https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
- Given you already have AWS account, you now have to configure credentials on the machine that you will use for
-
Prepare Lambda deployment archive
- Now you need to build, publish and package this project so that the Lambda funciton can be deployed
- You'll have to execute
dotnet publish -c Release
command - Then zip everything you find in publish folder, see serverless configuration file for expected artifact path
-
Deploy AWS infrastructure
- Navigate to serverless folder
- Execute
npm install
so that you have required node modules installed - If everything went well, you should now have a fresh CloudFormation stack deployed & API Gateway endpoint available
-
Compose the hardware
- You have to connect the DHT11 sensor to the controller
- And the controller itself to the humidifier
- See schemes at this folder
-
Configure controller firmware
- Open controller firmware file in the editor
- Set the values for NETWORK_NAME & NETWORK_PASS so that the controller can connect to the internet trough the WiFi
- Set the values for HUMIDITY_UPDATED_ENDPOINT & AWS_FINGERPRINT so that controller know where to send metrics to
- Compile and flash the firwmare to controller
- Turn on the controller, set desired_humidity_level in DynamoDB table, and have fun!