Skip to content

ryansamaeian/arduino-sim800

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIM800 Light manager

This was a hobby project from 2 years ago. I believe this is among the worst components i've delt with and i would generally not recommend this to anybody. This was developed to manage your home lights via SMS in a secure fashion. This code for me personally was quite reliable, though i must admit it was poorly written.

Features

  • SMS Control
  • Light status checking
  • DTMF tone
  • Password protection
  • Voice feedback
  • Auto retry

My hardware

This code was made for the following hardware, but as a tinkerer you should be easily able to configure it for your own personal usecase

  • Arduino due
  • SIM800 GSM module
  • 2 Channel relay module

and the pinout follows:

  • RELAY 1 (52)
  • RELAY 2 (53)
  • SIM800 TX (Serial3 RX)
  • SiM800 RX (Serial3 TX)

Structure of commands

password=YOUR_PASSWORD*COMMAND>PHONE_NUMBER

PHONE_NUMBER is used for feedback via sending an SMS/calling to your phone number

here is an example

password=YOUR_PASSWORD\*r1=t

This sets relay1 to turn on

or

password=YOUR_PASSWORD*statust>+1234567890

you'll get a response of

r1=on
r2=off

even more

password=YOUR_PASSWORD*statusc>+1234567890
  1. The system calls your phone number
  2. Waits 45 seconds to answer
  3. Upon answering it tells you "relay one on" (or "off") and same for relay two

interactive control

password=YOUR_PASSWORD*statusct>+1234567890
  1. System calls your phone number
  2. Upon answering you can use your phone keypad to 2.1. Press 1 => toggle relay 1 and the same for relay 2

Configuration

Set

if (text.indexOf("PASSWORD") != -1)

to your password of choice

Docs

Main Functions

relayManager(String info)

Parses SMS commands Updates relay states Controls GPIO pins

callStatusManager()

Initiates automated status call Announces relay states via TTS Handles call failures with retry logic

liveCallStatusManager()

Initiates interactive control call Listens for DTMF tones (keypad presses) Toggles relays based on user input Provides voice feedback

relayManager(ATManager &atManager, HardwareSerial &serial)

Main SMS processing loop Password verification Command routing

About

Control your IOT devices via the SIM800 arduino module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages