-
1Step 1
Hi!
Get all needed components and let's start.
-
2Step 2
Connect all components accordingly to this messy sketch. Sorry because of wire mess. :(
-
3Step 3
Install PlatformIO IDE, HomeAssistant + Python
Once more, you can follow this video to see more details about installation of HomeAssistant and Python.
To follow step by step PlatformIO installation and to see how to upload simple blinking LED program check this video.Please note that you don't need to use strictly PlatformIO IDE, but it will probably be easier for you to follow.
-
4Step 4
Copy code to main.cpp file from here.
Replace mqtt_server IP to IP of your PC on which the HomeAssistant is installed.
Replace SSID and password with your desired Wi-Fi SSID and password.
Upload to NodeMCU. -
5Step 5
In windows search (start) write %appdata% and open .homeassistant folder.
There you will find configuration.yaml.
Open it and replace all content with this one.Be careful if writing something additional because config is space sensitive!
It must be structured within its rules.Start HomeAssistant on your PC if it is not already started.
Enter IP of that PC and add port :8123 after it in browser.
In top right corner you will find option to configure UI.
Select that and again in top right corner find RAW config editor and replace its content with this one. -
6Step 6
Check that everything is connected correctly and MQTT is working as it should by sending data every few seconds and test how every sensor is working.
On your smartphone go to browser and enter IP of your HomeAssistant server and add port :8123.
Save web page to home screen and you have access to your new home automation system in one tap.Now on the end I encourage you to expand this project to be more useful and not just for educational purposes.
Thanks for joining me through this project build. :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.