Can I do this with an arduino?(control LEDs with sms/forwarding SMS messages

Hello!

First of all I am very new to all of this arduino stuff, never used it b4 but it fascinates me.

A potential project for me is the following

I would want to control a set of LEDs (or any lights) by SMS.

A light would have to be connected to a certain phone number.

When this phone number sends an SMS (blank preferably) the LED for that number would light up.

This would have to work with around 30 different numbers/LEDs.

The second function would be that when the arduino receives an sms, it would forward that sms to every single of the aforementioned phone numbers.

Does this sound doable with very little previous programming experience?

I am quite "techy" in general and love tinkering around with stuff.

Someone might have guessed what this project is for, its for our volunteer firefigther station.

We are alarmed by phone calls and a good way to know who is coming would be the LED lighting up if the member has acknowledged the alarm by sending a sms to the station.

The other function (the forwarding of sms) would be used for the following:

When the station receives an alarm we can have an sms sent to a number with the details of the alarm written in it. This sms message we would like to forward to every member so they can read the details. This function is secondary though.

Main thing would be to know who is coming so we know to wait for that person.

thanks in advance, Anton 23yo from Finland

I have only played with SMS/GPRS module slightly..

but to touch on some topics (so we're all talking apples here) :)

You can think of your SMS device as a cell phone... in the respect that is will needs its own SIM card..

  • (how you get that, and what plan you end up going with I can not suggest anything, as I have only taken my personal SIM card out of my phone and used for some quick text tests, I do NOT have a dedicated SIM card for this, I'm located in the US)

that also means, you only have one (1) phone number to 'communicate' with this device.

to comment on some of your thoughts:

"A light would have to be connected to a certain phone number."

Well.. technically, every 'led' you use will be connected to the Arduino that your SMS/GPRS device is connected to.

"When this phone number sends an SMS (blank preferably) the LED for that number would light up"

huh? Your SMS device (at this point/aspect) is a RECEIVER.... your volunteers would be sending/replying back to this SMS (alert) device....

Do you want them to NOT respond at all if they are not planning on showing up? or do you want them to reply regardless with a 1 = coming 0 = not available?

Either way you'd have to parse the number/message that the SMS device receives.

"This would have to work with around 30 different numbers/LEDs."

  • I dont think is an issue.. it can 'received' a text from any phone (no limit outside of your SIM card/contract/data usage..etc)..

I also dont think sending out a response to 30+ numbers will be an issue either.. (although some thought on how you plan on keeping this number list up to date might benefit you in the end.... maybe a microSD card that loads up a list of numbers? otherwise.. you'll be stuck hardcoding this list.. and have to 're-program' the Arduino each time it needs updating.

"The second function would be that when the arduino receives an sms, it would forward that sms to every single of the aforementioned phone numbers."

  • I'm not following? (and I dont think you are listening to your own requirements!) (or I'm just confused)

If you (above) stated the INCOMING message to the SMS device would be blank... what exactly do you think you'll be forwarding to this list of numbers? [blank message] that was received?

I dont see any issues with sending out the location either.. you just need to think about how this will work.

Since the location is (more or less) dynamic data, you need a way to get this data TO the SMS device.. so it can be send out to the distribution list.

maybe some sort of code or specific number? if the SMS device gets a message from a specifically 'tagged' number.. it can know to save this 'location data' to a variable.. and use that to pass on/forward to your list of numbers.

Is that feasible for your scenario? (no clue).. maybe it needs to be able to come from ANY phone number? then perhaps a 'code' or something in the message to declare this is a 'location message' that needs to be forwarded?

xxx-xxx-xxxx lm: 1313 Mocking Bird LN

where the "lm:" portion declares the message as being a 'location message' to be forwarded...

(I['m not clear on how and what data you get from the SMS device.. so parsing maybe easier or harder.. cant say for sure right now)

Summary:

  • need a way to declare the SMS is a 'location message' and hence needs forwarding to distribution list
  • need a way to determine an 'alert response' from a member on the recipient list
  • need a way to 'light up some matching leds' that correspond to the 'alert responder'
  • lastly you want to forward the 'responses' to .....where? how is this effect if you are using an LED system to know who is coming or not?

Sorta sounds like a fun project... but you need to talking things out a bit a decide on a path you want to take for certain questions.

xl97: I have only played with SMS/GPRS module slightly..

but to touch on some topics (so we're all talking apples here) :)

You can think of your SMS device as a cell phone... in the respect that is will needs its own SIM card..

  • (how you get that, and what plan you end up going with I can not suggest anything, as I have only taken my personal SIM card out of my phone and used for some quick text tests, I do NOT have a dedicated SIM card for this, I'm located in the US)

that also means, you only have one (1) phone number to 'communicate' with this device.

to comment on some of your thoughts:

"A light would have to be connected to a certain phone number."

Well.. technically, every 'led' you use will be connected to the Arduino that your SMS/GPRS device is connected to.

"When this phone number sends an SMS (blank preferably) the LED for that number would light up"

huh? Your SMS device (at this point/aspect) is a RECEIVER.... your volunteers would be sending/replying back to this SMS (alert) device....

Do you want them to NOT respond at all if they are not planning on showing up? or do you want them to reply regardless with a 1 = coming 0 = not available?

Either way you'd have to parse the number/message that the SMS device receives.

"This would have to work with around 30 different numbers/LEDs."

  • I dont think is an issue.. it can 'received' a text from any phone (no limit outside of your SIM card/contract/data usage..etc)..

I also dont think sending out a response to 30+ numbers will be an issue either.. (although some thought on how you plan on keeping this number list up to date might benefit you in the end.... maybe a microSD card that loads up a list of numbers? otherwise.. you'll be stuck hardcoding this list.. and have to 're-program' the Arduino each time it needs updating.

"The second function would be that when the arduino receives an sms, it would forward that sms to every single of the aforementioned phone numbers."

  • I'm not following? (and I dont think you are listening to your own requirements!) (or I'm just confused)

If you (above) stated the INCOMING message to the SMS device would be blank... what exactly do you think you'll be forwarding to this list of numbers? [blank message] that was received?

I dont see any issues with sending out the location either.. you just need to think about how this will work.

Since the location is (more or less) dynamic data, you need a way to get this data TO the SMS device.. so it can be send out to the distribution list.

maybe some sort of code or specific number? if the SMS device gets a message from a specifically 'tagged' number.. it can know to save this 'location data' to a variable.. and use that to pass on/forward to your list of numbers.

Is that feasible for your scenario? (no clue).. maybe it needs to be able to come from ANY phone number? then perhaps a 'code' or something in the message to declare this is a 'location message' that needs to be forwarded?

xxx-xxx-xxxx lm: 1313 Mocking Bird LN

where the "lm:" portion declares the message as being a 'location message' to be forwarded...

(I['m not clear on how and what data you get from the SMS device.. so parsing maybe easier or harder.. cant say for sure right now)

Summary:

  • need a way to declare the SMS is a 'location message' and hence needs forwarding to distribution list
  • need a way to determine an 'alert response' from a member on the recipient list
  • need a way to 'light up some matching leds' that correspond to the 'alert responder'
  • lastly you want to forward the 'responses' to .....where? how is this effect if you are using an LED system to know who is coming or not?

Sorta sounds like a fun project... but you need to talking things out a bit a decide on a path you want to take for certain questions.

Thank you for taking the time to post all this, i see i have been unclear about my intentions.

So yes the people who arent coming would not send anything, maybe that can be added later like a red light for the ones not coming and green for the ones coming depending on what they write in the message.

But every person would have their own light that would light up when their number sends an sms (or calls?) to the arduino simcard.

The sms plan is no problem, and we have a list of everyones phone numbers and names and so on.

And of course the arduino would need a sim card and a sim module to put the card in, and this sim card number would be the one that everyone would send smses to if they come.

And the confusing forwarding bit, we have the option of letting the centre that alarms us (calls everyones phones) to also send smses with all the specifics about the alarm. This info (when sent to the arduinos simcard) would then be forwarded to every alarm recipient so they can read the info before they arrive.

So they forwarding would be triggered only when it recieves sms from 3-4 specific numbers (the alarming centre), and the alarm messages always follow a certain pattern with the same codes to begin with so identifying them are easy (i guess).

My friend asked me if i should use a raspberry pi for this system, just as a thought but i guess whatever i use its up to me if it works or not. Everything should be possible?

regards, Anton

I would imaging you could use a RPi..

Is there a reason why though? I'm fairly certain this can all be done with an Arduino.

Question:

Do you have this SMS device? If so.. link please?

There is your first step..

getting that up and running with some default/stock example sketches..

then move on to being able to identify the incoming 'alert message' grabbing location data forwarding to one hard coded number

from there I'd say the bulk of the hard part is done.

after then you can re-use the same code/snippets to identify incoming 'responder' replies.. (any number on/in your alarming center number list)

For that many LEDS.. I would suggest using a MAX7219 chip.. as it can control up to 64 leds with one chip..

if you go with the RED/GREEN (RGB) alerting system.... you may need to swap out chips..

xl97: I would imaging you could use a RPi..

Is there a reason why though? I'm fairly certain this can all be done with an Arduino.

Question:

Do you have this SMS device? If so.. link please?

There is your first step..

getting that up and running with some default/stock example sketches..

then move on to being able to identify the incoming 'alert message' grabbing location data forwarding to one hard coded number

from there I'd say the bulk of the hard part is done.

after then you can re-use the same code/snippets to identify incoming 'responder' replies.. (any number on/in your alarming center number list)

For that many LEDS.. I would suggest using a MAX7219 chip.. as it can control up to 64 leds with one chip..

if you go with the RED/GREEN (RGB) alerting system.... you may need to swap out chips..

This sounds like a plan, thank you.

I do not have any hardware yet (except for an old raspberry pi 2b that is in a box somewhere at home).

I was thinking of a sms module something like this, i have no idea if this would work for me.

http://www.ebay.co.uk/itm/NEW-GSM-SIEMENS-TC35-SMS-Wireless-Module-UART-232-Arduino-Enabled-UK-/192118852832?hash=item2cbb2d0ce0:g:zrMAAOSwWxNYuWAW

I believe I have a SEEED Studio version/variant:

similar to: https://www.seeedstudio.com/GPRS-Shield-V2.0-p-1379.html

(actually might be the EXACT one I have... havent played with it in a while)