What if you are out of your home (and/or in another country) and suddenly realise that you have forgotten to turn off the geyser, lights and other electrical appliances? This costly mistake can increase the electricity bill as well as put your and others lives in danger.
Fear not. We are going to make an IoT-based cellular device for home automation, which will help you in controlling your home appliances, no matter where you are.
Bill Of Material
Install the Adafruit Fona library in Arduino IDE. Inside this library, set the serial and reset pins for the SIM 800L module, and after that, set its baud rate to 4800 in the setup function.
Now, we will create a loop where we check the incoming message and with the help of the if condition, we will set a function for the command to be sent from message. (Refer Fig 2,3,4,5).
Now, we will upload the code to Arduino IDE and connect the components as given in the circuit diagram.
Now connect the components as in pic below
Insert any SIM card (that supports 2G network) in the SIM800L module and connect any appliance through a relay. Now, send the message consisting of commands to the phone number (of the SIM card).
Here, I have used the lights on/off command for turning the lights on or off. You can set any command in the code, which you can control using SMS.