Content lenght is not the problem
out of the box arduino does not seem to support secure connections over https.
http://stackoverflow.com/questions/1583 ... ps-support
Please try to replace https://www.pushsafer.com to http://www.pushsafer.com
Otherwise you have to use a third party library for secure connections:
http://stackoverflow.com/questions/1113 ... on-arduino
arduino pushsafer can't compile
- admin
- Site Admin
- Posts: 1009
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: arduino pushsafer can't compile
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: arduino pushsafer can't compile
ok check this out.
When I write
I get error message 'bad request'
BUT when I write
I get no message at all. Just "Connected"
to make sure http works, I use your code generator like this
and that did work
When I write
Code: Select all
client.println("Host: http://www.pushsafer.com");
BUT when I write
Code: Select all
client.println("Host: www.pushsafer.com");
to make sure http works, I use your code generator like this
Code: Select all
http://www.pushsafer.com/api?k=KEY&d=1422&i=9&v=3&m=Message
- admin
- Site Admin
- Posts: 1009
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: arduino pushsafer can't compile
an pushsafer api request have to sent over a secure connection.
When you do a normal http request (without POST variable) the server make a redirect to a https connection.
But this do not seem to work while using a POST request.
So you have to use a third party library for https connection.
Or you do a GET request by appending all variables to the API URL like the URL generator do.
When you do a normal http request (without POST variable) the server make a redirect to a https connection.
But this do not seem to work while using a POST request.
So you have to use a third party library for https connection.
Or you do a GET request by appending all variables to the API URL like the URL generator do.
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: arduino pushsafer can't compile
ok thanks
I will try the GET since I did make that work on a other project, I was talking to PHP file on my server and he was sending email.
it look like this
in our case we do something like this
will play with that and let you know.
Also went I have time, will try the library for secure connection.
I will try the GET since I did make that work on a other project, I was talking to PHP file on my server and he was sending email.
it look like this
Code: Select all
client.println("GET /send_email.php?temperature="+temperature+"&humidity="+humidity+" HTTP/1.1"); //Send data
Code: Select all
client.println("Host: http://www.pushsafer.com");
client.println("GET /api?k=key&d=1927&i=9&v=3&m=Message HTTP/1.1");
Also went I have time, will try the library for secure connection.
Re: arduino pushsafer can't compile
oh
I now have this message with the GET
when I send to HTTPS
I get this

I now have this message with the GET
Code: Select all
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https:///">here</a>.</p>
<hr>
<address>Apache Server at www.pushsafer.com Port 80</address>
</body></html>
Code: Select all
client.println("Host: https://www.pushsafer.com");
client.println("GET /api?k=key&d=1927&i=9&v=3&m=Message HTTP/1.1");
I get this
Code: Select all
....................................Connected
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>501 Method Not Implemented</title>
</head><body>
<h1>Method Not Implemented</h1>
<p>Host: to /index.html not supported.<br />
</p>
<hr>
<address>Apache Server at default Port 80</address>
</body></html>
- admin
- Site Admin
- Posts: 1009
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: arduino pushsafer can't compile
This message over http
is normal, because the redirecting from http to https
do you get a notification to your device?
Code: Select all
301 Moved Permanently
do you get a notification to your device?
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: arduino pushsafer can't compile
no, trust me, when I get notification, you will be the first to knowadmin wrote:do you get a notification to your device?

I am trying different ways using GET, I am not very familiar with web request, formating, etc.
- admin
- Site Admin
- Posts: 1009
- Joined: 1. Dec 2014, 12:41
- Location: Germany
Re: arduino pushsafer can't compile
Hi robomaniac,
sorry for the late reply.
Now you can access the api via http or https.
Please take a try and give me a feedback!
Thanks Kevin
sorry for the late reply.
Now you can access the api via http or https.
Please take a try and give me a feedback!
Thanks Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Pushsafer EN: You like Service and Support! Then we look forward to your review!
Pushsafer.com Website - iOS - Android - Windows 10
Re: arduino pushsafer can't compile
Hi Kevin,
My name is Jerome btw
I got your message and I am trying hard to get this to work. I have tested lots of stuff so I will clean my code and try again.
Right now, I have this and lots of bad request.
I will focus using this instead, with this, I don't have other bad variable. does it make sense? Is there mistake?
Tonight I will try other things and keep you updated. Thanks.
My name is Jerome btw

I got your message and I am trying hard to get this to work. I have tested lots of stuff so I will clean my code and try again.
Right now, I have this and lots of bad request.
Code: Select all
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.pushsafer.com/data/push-send.php">here</a>.</p>
<hr>
<address>Apache Server at pushsafer.com Port 80</address>
</body></html>
I will focus using this instead, with this, I don't have other bad variable. does it make sense? Is there mistake?
Code: Select all
client.print("Content-Length: ");
client.print(length);
client.println("\r\n");;
client.print("k=insert_my_key");
client.print("&m=message");
client.print("&t=title");
client.print("&s=2");
client.print("&v=3");
client.print("&i=3");
client.print("&d=a");
client.print("&retry=60");
client.print("&expire=3600");
Tonight I will try other things and keep you updated. Thanks.
Re: arduino pushsafer can't compile
oh oh!
I just got message saying "below message limit, to expand your message capacity, go to your pushsafer dashboard..."
I was checking my last code and verifying
with this
to make sure I understand the creating of a link via GET
I just got message saying "below message limit, to expand your message capacity, go to your pushsafer dashboard..."
I was checking my last code and verifying
Code: Select all
https://www.pushsafer.com/api?k=insert_my_key&m=message&t=title&s=2&v=3&i=3&d=a&retry=60&expire=3600
Code: Select all
client.print("k=insert_my_key");
client.print("&m=arduino");
client.print("&t=enfin");
client.print("&s=2");
client.print("&v=3");
client.print("&i=3");
client.print("&d=a");
client.print("&retry=60");
client.print("&expire=3600");
Who is online
Users browsing this forum: No registered users and 33 guests