DIY Home automation project (1/3) 01-03-2017, 11:45 AM
#1
Hey there, haven't posted anything in a good while (couple of years), so I guess this is at least something.
I have decided to do a home automation project, simply because it seems cool, and I don't trust the big IoT companies with security (Mirai botnet).
This project would also let me learn more about electronics, programming and some networking.
I decided to use a NodeMCU board, which is a development board for the ESP8266 WiFi board, as it can be programmed through the Arduino IDE
and can be controlled over WiFi.
![[Image: iewcee.png]](https://a.sinister.ly/iewcee.png)
At the time of starting this project, I had absolutely no knowledge of the Arduino/ESP8266 libraries available, so I had do do some research.
The software on the NodeMCU listens on port 1901 UDP for certain commands identifying which GPIO pin to set HIGH, and which to set LOW to either turn on or off the LED/Relay.
To test the code before hooking this thing up to relays, I connected a couple of LED's and sent commands as a broadcast on my local network.
I will be putting in some security mechanisms later on, not sure which ones. Been thinking about restraining it to receive commands only from devices in the whitelist (MAC addresses).
I also have a couple of buffer overflows which need to be taken care of before I hook this thing up.
After some struggle I got the commands to arrive at the NodeMCU, and turn on/off the LED's.
![[Image: agnbpx.png]](https://a.sinister.ly/agnbpx.png)
The resistor on the image is from trying to get a temperature sensor working, but that is a separate expansion I might be doing later on.
In the process of trying to get things to work I accidentally managed to short Voltage In to ground, ending in a nice smell of a burned circuit coming from my keyboard pass-through USB port.
In the future I am also planning on either using lasers and photoresistors, or IR LEDs to count people in different rooms and turn light on/off accordingly.
Next stage is to create the mobile applications to control the NodeMCU, for both Android and IOS. Again, I have no knowledge in that field, so it will be rather interesting.
I would love to get some tips from you guys, as you are most likely way better at this than me.
I have decided to do a home automation project, simply because it seems cool, and I don't trust the big IoT companies with security (Mirai botnet).
This project would also let me learn more about electronics, programming and some networking.
I decided to use a NodeMCU board, which is a development board for the ESP8266 WiFi board, as it can be programmed through the Arduino IDE
and can be controlled over WiFi.
Spoiler:
![[Image: iewcee.png]](https://a.sinister.ly/iewcee.png)
At the time of starting this project, I had absolutely no knowledge of the Arduino/ESP8266 libraries available, so I had do do some research.
The software on the NodeMCU listens on port 1901 UDP for certain commands identifying which GPIO pin to set HIGH, and which to set LOW to either turn on or off the LED/Relay.
To test the code before hooking this thing up to relays, I connected a couple of LED's and sent commands as a broadcast on my local network.
I will be putting in some security mechanisms later on, not sure which ones. Been thinking about restraining it to receive commands only from devices in the whitelist (MAC addresses).
I also have a couple of buffer overflows which need to be taken care of before I hook this thing up.
After some struggle I got the commands to arrive at the NodeMCU, and turn on/off the LED's.
Spoiler:
![[Image: agnbpx.png]](https://a.sinister.ly/agnbpx.png)
The resistor on the image is from trying to get a temperature sensor working, but that is a separate expansion I might be doing later on.
In the process of trying to get things to work I accidentally managed to short Voltage In to ground, ending in a nice smell of a burned circuit coming from my keyboard pass-through USB port.
In the future I am also planning on either using lasers and photoresistors, or IR LEDs to count people in different rooms and turn light on/off accordingly.
Next stage is to create the mobile applications to control the NodeMCU, for both Android and IOS. Again, I have no knowledge in that field, so it will be rather interesting.
I would love to get some tips from you guys, as you are most likely way better at this than me.
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)














![[Image: inkexplosion.jpg]](http://i0.wp.com/techverse.net/wp-content/uploads/2013/09/inkexplosion.jpg)