We know how IoT:1 works and we know that it lacks any security. This time we will work on fixing this flaw.
I’m on a project that requires some feedback after the operation is made. I cannot use an LCD because they are only two pins left and almost no memory. So my mind focused on two LEDs but after a while, I made a choice, I will use tricolour LED.
From what I read there are two types, one with a common anode and one with common cathode. We will go with common anode.
Module added to boilerplate
Time is almost over but we have so much more work to do! Of course, we won’t stop our work but let’s summarise was has been done during competition.
The main goal was to build a control node that can gather and display information from different sources/sensors. This node is the Doton project.
In parameters.lua we may set only one access point and a password. But lately, I’m testing my devices in different areas, different APs. Changing passwords all the time is stupid so we need to improve this.
We will allow the table of credentials and boilerplate will iterate over them to get the connection.
Not so long ago I ordered a sound detector based on LM393. Today I thought that maybe it is time to use it. How? Maybe we can do a light-clap module.
With each clap relay will change its state. It is not complicated and may be a good fun 🙂 Naturally, we will use NodeMCU and LUA.
Today we combine the power of HLK-PM01, PIR HC SR-501, DHT11 and a light detector.
Together they create a nice looking multipurpose Node One. I wanted to do it for some time but the last piece was missing. I didn’t have an idea how to create a box for components.
Few days ago I found a perfect case named Z27. It has all I wanted, socket, plug and enough space for NodeMCU v3.
Python code @ GitHub
LUA code @ GitHub
We have a nice node that detects light, it works in toilet @ my work 🙂 It does it jobs almost perfectly. There is still a hack for it – leave a light on when leaving the toilet. I have an idea to fix this but first, let’s reforge a lousy code into a module and a handler. After refactor we may safely add it to the NodeMCU boilerplate.
This is going to be our second data node for display. It will show area lightness and with conjunction with a time, we can tell if an artificial light is on or off.
NodeMCU boilerplate @ GitHub