This is my English translation of the article originally published in Geek Times.
A couple of years ago I purchased esp8266, a cheap Wi-Fi chip with full TCP/IP stack and micro controller capability manufactured by Espressif. My idea was to build something useful for my home using this controller. Such features as Wi-Fi connectivity, small size, enough inputs / outputs and ease of programming make esp8266 a perfect controller for enabling home automation. I eventually decided to build a home weather station.
Basic system requirements:
My first step was to find existing systems I could use for a prototype. As I explored available systems I understood none of them would meet my requirements either because of the closed code or because they charge extra fees for letting you get advantage of all features you need. Therefore, I chose to invent my own bicycle. To take my project from the ground up, I had to deploy software and hardware first. I bought the following components on eBay:
For software development I chose a simple PHP + MySQL stack based on Raspberry PI and deployed to home server. Its advantage over Cloud services is system stability in case of black-out or disconnection. Although I had to program back-end for data storage and processing, I was excited to do so! Arduino IDE fitted with an esp8266 module was chosen as a programming environment, check out details here.
My plan A was to program everything in Lua (nodemcu), but I had to refuse from it because I'd run out of memory each time I uploaded sketches. For data exchange between Raspberry and my weather station I chose JSON.
I used standard methods of sensor connection to module and found relevant libraries here:
This library was helpful, too.
Here're additional sensors you can connect and configure for data collection and analysis:
Right now I'm waiting to receive MHT-Z19 CO2 sensor to monitor CO2 level in the air (indoor and outdoor). Once I've got it, I'm going to extend weather parameters I'm tracking at home.
After several iterations of code bug fixing and prototyping I was ready to assemble my home weather station.
At first, I made a display opening in a plastic box:
Then I embedded the display inside along with a hardware board, module and sensors. Reset button was deployed, too.
I made holes in the front plates of the box for sensors ventilation and power connectors.
I deployed a remote control in the module firmware using a web server. It allowed me to set up and configure the device with regards to:
I used responsive design to control my weather station remotely from a smartphone. Built-in pages don't have any external dependencies, all styles and scrips are being stored in modules memory.
I also created a basic website to view a list of connected modules, generated data and graphs and deployed it to Raspberry.
Feel free to view the project code on GitHub.
And have you experimented with DIY home automation? Please share your experience as a comment below or send us a tweet to @Intersog!
Intersog, a leading technology partner, gains recognition on Clutch's prestigious list for game-changing software developers…
In the shift towards widespread remote work, the adoption of advanced digital tools marks a…
In the quest for innovation, the fusion of AI and Machine Learning with global remote…
In an era marked by rapid technological progress, the fusion of cloud computing and artificial…
Explore Intersog's unique approach to tech recruitment, offering a transparent, direct path to genuine career…
Explore the critical role and innovative strategies of efficient software maintenance for ensuring software stability,…
This website uses cookies.