Go Down

Topic: HELP on pushingbox HTTP request (Read 4781 times) previous topic - next topic


Hi All,

I'm totally new in this Arduino and pushing box. Managed to find the officiall code from pushingbox.com  via http://makeprojects.com/Project/Notifying-Doorbell-with-PushingBox/2165/2

and try out step by step of hardware/software set up, but still could not get notified sms when pressed the doorbell. Can you all help me with it?

Follow the instruction, i changed the mac address which found at the sticker of ethernet shield, and copy/paste the devid code from senarios, please guide me beside these 2, whereelse i need to change?

In Serial Monitor show:
Ethernet ready
pinDevid1 is HIGH
sending request

pinDevid1 is LOW
Thus, I'm thinking the problem should be Http request part from Pushingbox to Prowl, and wondering if anyone has the same issue as mine. And you help to solve it please or any suggestion to check on the setting,etc?

Thanks for your help, and any guides/suggestion will be much appreciated.


Hi All,

Seem noone encounter similar problem like me.

By looking at the serial monitor display, it's seem to me the connection between Arduino and Pushingbox got issue. Hmm...Any ideas on what i should check to find out the problem?

Please helpppppp



Pushingbox to Prowl

Never heard of any of that. Perhaps you have links to what ever those are?
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.


I just started with this and found the same problem. After a lot of trial and error and research I found a bit of info on the Arduino reference pages.
I made the following change and all works now.
#define DEVID1 "Your DEVID"
String DEVID1 = "Your DEVID";

Your DEVID needs to be set to the DEVID from pushingbox.

This is the info I found in the reference section on the Arduino site http://arduino.cc/en/Reference/Define
"This can have some unwanted side effects though, if for example, a constant name that had been #defined is included in some other constant or variable name. In that case the text would be replaced by the #defined number (or text)."


I am having the same problem, but I did not try your solution of using the "string".  I will try that and post my results.


Well, my compiler did not like replacing the #define with the string.  I think it was because of the location in the program.

But the #define thing seems to be working fine.  However, when I push the button, I get the correct text output on my serial output, but no e-mail.

When I try the e-mail test feature on pushingbox, it works only sometimes also.  Is there some kind of limit on how may requests can be sent in a given period of time?

Still having trouble.  Only getting an infrequent number of successful e-mail.


I'm having exactly the same issue. Sometimes it works for days. Then it stops working or only few mails go through.
Each time the Arduino reports a correct connection. When I try with cURL or with a browser, it works OK.
I tried a lot of different things:
- another Arduino and Ethernet card. Network is OK on both, I can brwse to them perfectly (they're server as well).
- putting \r\n as end of line instead of just \n
- change #define to const String..., but this is just cosmetics
- start the card with or witout mentionning dns, gateway. No difference.
Here the code:
void sendToPushingBox(String devid){
    Serial << F("Connecting to PushingBox") << newLineSerial;
  if (client.connect(serverName, 80)) {
    #ifdef DEBUG_SERIAL
        Serial << F("client connected to PushingBox") << newLineSerial;
        Serial << F("client NOT connected to PushingBox") << newLineSerial;
      Serial << F("sending GET request") << newLineSerial;
    Serial << F("GET /pushingbox?devid=") << devid << F(" HTTP/1.1\r\n");
    Serial << F("Host: ") << serverName << F("\r\n");
    Serial << F("User-Agent: Arduino\r\n");
    Serial << F("\r\n");
    client << F("GET /pushingbox?devid=") << devid << F(" HTTP/1.1\r\n");
    client << F("Host: ") << serverName << F("\r\n");
    client << F("User-Agent: Arduino\r\n");
    client << F("\r\n");
  else {
    Serial << F("PushingBox connection failed") << newLineSerial;
  // if there are incoming bytes available from the server, read and print them:
    if (client.available()) {
      char c = client.read();
      Serial << c;
    Serial << F("disconnecting") << newLineSerial;

Here the debug-info:
Setting up Ethernet card
Ready, delay 5 sec to setup Ethernet card
Connecting to PushingBox
client connected to PushingBox
sending GET request
GET /pushingbox?devid=vDCC7D695F4F8672 HTTP/1.1
Host: api.pushingbox.com
User-Agent: Arduino


I guess it's more a network issue, but I can't put my hands on it. Does someone have an idea? If not I'll need to put a sniffer to see what exactly is going over the network.


Same issue on my side or even worse. My sketch (the GET request pretty much as the official one) worked now for about 3 month well. Now it doesn't work any more and the official one doesn't work either.

From the browser or with curl it works perfect on my PC.

What makes it really strange: My sketch places a GET request to an other server at the same time. This works as it should.


Nov 27, 2012, 01:05 pm Last Edit: Nov 27, 2012, 01:09 pm by SurferTim Reason: 1
Have you tried reading the response from the server? Maybe it is trying to tell you something and you are ignoring it.
Code: [Select]
// if there are incoming bytes available from the server, read and print them:
   while(client.connected()) {
     while(client.available()) {
       char c = client.read();
       Serial << c;
   Serial << F("disconnecting") << newLineSerial;

edit: Here is my client code on the playground. It has this and a timeout disconnect.
Watch for me on National Geographic Wild "When Sharks Attack: Gulf Coast Killers". Airs on June 22nd.


Yes you would be right. Often the answer on the problem is in the response. But not here as I don't get any response at all. It seams that the server doesn't simply understand anything after get connected.

I found a kind of solution which makes it working now but it isn't really a sadifying solution:

The official example is like this: (and doesn't work)
Code: [Select]

    if(DEBUG){Serial.println("sendind request");}
    client.print("GET /pushingbox?devid=");
    client.println(" HTTP/1.1");
    client.print("Host: ");
    client.println("User-Agent: Arduino");

If I replace it and write everything in one line to the client it works
Code: [Select]
if(DEBUG){Serial.println("sendind request");}
    client.println("GET /pushingbox?devid=vXXXXXXXXXXXXXXX HTTP/1.1");
    client.print("Host: ");
    client.println("User-Agent: Arduino");

What is going wrong here??


Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.


Yes. devid is an array of char which contains the API - Key (I use different Pushingbox messages):

char devid[]


I have it working at the moment by replacing: void sendToPushingBox(String devid) with void sendToPushingBox(char devid[]) although I think both should work fine. It also worked before with String, and when I send exactly the same text to serial, I se it 100% correct as it should be. Anyway it seems to work now. Reply from the server is OK as well.
I don't need to put all Serial.prints on 1 line, it works as the api-example as well. I have the impression that somewhere in Ethernet.client something is a bit unstable.
The issue I have now is that mails arrive only after several hours. I asked people from Pushingbox how this is possible. Before it was instantanious.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131