Home Automation using Node-RED
Node-RED can be used for simulating a home automation system online. In this case, I am considering three appliances connected to the home automation system - fan, light and power.
For fan, I have used a function named fan controller that gets the user input from the inject node, processes the data and displays the output as a gauge (similar to a pie chart) in the output screen.
For light, I have added switch and button nodes in addition to the function node named Lights, which is used to provide the output as an audio message.
For Power, I have added a button and a function node to get input and process the data. I have used two methods to provide the output, one being the audio message and the other one being a pop up notification.
Now we can deploy the flow and navigate to the output screen to see the output of the system.
First we can see a gauge that shows the value of the fan. The value displayed at the moment is 24.
Next we can see a button, light switch in the output window. An automated audio message will be played as output each time the switch gets turned off or on.
Then, for the power button, Once the power button is clicked, a pop up notification and an audio message will be shown at the same time that informs the message about out power usage.
Comments
Post a Comment