send alarm sms via voipgain through internet

Hi
I have a Duemilanove and an internet shield
I want to attach it to my burglar alarm which has 4 outputs (Burglar, Fire, Tamper, Personal attack) which go high depending on the output alarm state.
What I would like to do is that if my input 1 on my arduino goes high that it sends this https message to the web
"https://www.voipgain.com/myaccount/sendsms.php?username=xxxxxxxxxx?&password=xxxxxxxxxx&from=xxxxxxxxxx&to=xxxxxxxxxx&text=alarm_1_high"

I am using instructions from http://www.voipgain.com/en/sms_instructions.html

I have tried searching this forum and all I can see is alarm & twitter & sms, however twitterSMS doesn't support my carrier.

Maybe this is impossible or maybe I am going in the wrong direction
Any thoughts greatfully appreciated
Maurice

https is heavy (too heavy?) for arduino.

If you have a small server at home you might send a message to your server, and let a PHP script forward it.

Thanks Rob,
that explains why I couldn't find any info on it

The advantage of sending it first to your server is that you can test the Arduino code extensively without getting 234 SMS-es, Furthemore you can do extensive logging on your server, maybe you might do temperature readings or humidity simultaneously so if there is an fire alarm you can see what happend just before..

enough said, if you have more questions don't hesitate to ask

beannacht :slight_smile: (thanks to google translate)

In the US you can have the arduino ethernet shield send an email to a cell phone provider sms email gateway so it will appear as a text message on a cell phone.

Thanks Rob & Zoom for your replies.
I have searched a lot since I posted last.
Like what you suggested Zoomkat there is a method on this side of the pond to send an SMS via email which I propose to use, however I am trying to get the email working before taking out a subscription.

By using Post by eguld on 27.02.2009 at 04:29:10 http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?action=print;num=1235534880

*
SEND AN EMAIL WITH ARDUINO

This code was created by modifying the connect example from arduino.cc and with the help of the YABB forums and their very helpful members.
This code sends an email to any email address and then disconnects.  It will also print on screen (in the serial monitor) the data the server sends the Arduino.  Make sure to replace all the *'s with your own information.
*/
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xBE }; // Arduino's artificial mac address
byte ip[] = { 192, 168, 1, 25 }; // my ip
byte server[] = { 213, 46, 255, 2 }; // my smtp server ip  THIS IS MY UPC.ie MAIL SERVER ADDRESS got by pinging upcmail.ie
int time = 5000;
int wait = 2000;


Client client(server, 25);

void setup()
{
 delay(time);
 
 Ethernet.begin(mac, ip);
 Serial.begin(9600);
 
 delay(1000);
 
 Serial.println("connecting...");
 
 if (client.connect()) {
    Serial.println("connected");
    
    
    client.println("HELO itismeletschat"); /* say hello (statement after helo is needed but irrelevant)*/
    delay(wait); /* wait for a response */
    delay(5000);
    
    client.println("MAIL From: ma@upcmail.ie"); /* identify sender, this should be the same as the smtp server you are using */
    delay(wait); /* wait for a response */
    delay(5000);  
    
    client.println("RCPT To: ma@gmail.com"); /* identify recipient */
    delay(wait); /* wait for a response */
    delay(3000);
    
    client.println("DATA"); 
    delay(wait); /* wait for a response */
    delay(3000);
    
    client.println("To: ma@gmail.com"); /* identify recipient */
    client.println("Subject: You Have Mail!!"); /* insert subject */

    client.println("Please let me know it worked!!!"); /* insert body */
    client.println("."); /* end email */

    client.println("QUIT"); /* terminate connection */
    delay(wait); /* wait for a response */


    client.println();

  } 
  else {
    Serial.println("connection failed");
 }
}

void loop()
{
 while (client.available()) {
   char c = client.read();
   Serial.print(c);
 }
 
 if (!client.connected()) {
   Serial.println();
   Serial.println("disconnecting.");
   client.stop();
   for(;;)
     ;
 }
}

When I set this going I get this response from serial:
connecting...
connected
554 edge01.upcmail.net edge ESMTP you talked too early
disconnecting.

I added in all the delay(3000); hoping not to "talk too soon"

any ideas gratefully received

"dank u" Rob, I used to live in Antwerpen

Please modify your post, select the code part and press the # button to get proper formatting,

Looking at your code, first thing noticed is:

if (!client.connected())   << the ! means NOT, so it says if not connected you disconnect, that will not work I assume ...,

{
   Serial.println();
   Serial.println("disconnecting.");
   client.stop();
   for( ; ; );
 }

Furthermore in your "main" code

delay(wait); /* wait for a response */

But you don't read the response

Most of these "delays" should wait for a response for a certain time or get a timeout. The code will become something like this ...

unsigned long timeout = millis();
while (client.available() == 0 && millis() - timeout < 5000) ;
if (client.available() == 0)
{
  // error message
  // break; close socket etc.
  return;
} 
// read response and act in a proper way - e.g. Serial.print() it

You also need to send a blank line after the Subject: and before the body of the message.

client.println("Subject: You Have Mail!!"); /* insert subject */
client.println(""); /* signify end of mail headers */
client.println("Please let me know it worked!!!"); /* insert body */

Not to drag up an old thread... But has anybody got this to work reliably? I am building a alarm for my house and would like for it to alert me via SMS in case of intrusion. If someone cold post some working code, that would be great. Thanks.