Pushafer Arduino error

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows 10 Store
Homepage
spiros314
Posts: 6
Joined: 3. Jul 2018, 13:57

Re: Pushafer Arduino error

Postby spiros314 » 4. Jul 2018, 06:42

I tried this example, but neither does it work.
i take this error message:

Code: Select all

Arduino: 1.8.5 (Windows 10),  Board:"Arduino/Genuino Mega or Mega 2560, ATmega1280"

C:\Users\golds\AppData\Local\Temp\arduino_modified_sketch_523580\sketch_jul04b.ino: In function 'byte pushsafer(char*, char*, int, int, int, char*, char, char, int)':

sketch_jul04b:41: error: request for member 'length' in 'sound', which is of non-class type 'int'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                           ^

sketch_jul04b:41: error: request for member 'length' in 'vibration', which is of non-class type 'int'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                ^

sketch_jul04b:41: error: request for member 'length' in 'icon', which is of non-class type 'int'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                                ^

sketch_jul04b:41: error: request for member 'length' in 'url', which is of non-class type 'char'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                                                                 ^

sketch_jul04b:41: error: request for member 'length' in 'urltitle', which is of non-class type 'char'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                                                                                     ^

sketch_jul04b:41: error: request for member 'length' in 'time2live', which is of non-class type 'int'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                                                                                                          ^

sketch_jul04b:41: error: request for member 'length' in 'privatekey', which is of non-class type 'char [26]'

   length = 30 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + url.length() + urltitle.length() + time2live.length() + privatekey.length();

                                                                                                                                                                                                ^

exit status 1
request for member 'length' in 'sound', which is of non-class type 'int'

User avatar
admin
Site Admin
Posts: 331
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 4. Jul 2018, 08:00

Hi,

i updated the script on github, now it should work

https://github.com/appzer/arduino-pushsafer

Kevin
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

spiros314
Posts: 6
Joined: 3. Jul 2018, 13:57

Re: Pushafer Arduino error

Postby spiros314 » 4. Jul 2018, 08:22

i run this example but i take this:
(i tried to arduino mega & to arduino uno with ethernet shield and arduino ide 1.8.5)

Starting ethernet...192.168.1.110
Ready
HTTP/1.1 400 Bad Request
Date: Wed, 04 Jul 2018 08:20:15 GMT
Server: Apache
Content-Length: 347
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<p>Additionally, a 400 Bad Request
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

User avatar
admin
Site Admin
Posts: 331
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 4. Jul 2018, 08:41

this example works for anothoer customer, see the latest post in this thread.

It is better to ask in an arduino board, they can help you a little more than i can do.

You can refer to this thread:
viewtopic.php?p=4538#p4538

Kevin
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

spiros314
Posts: 6
Joined: 3. Jul 2018, 13:57

Re: Pushafer Arduino error

Postby spiros314 » 4. Jul 2018, 09:18

In the site you say that it works for arduino and not that it works in some arduinos.
What is the example that works?

User avatar
admin
Site Admin
Posts: 331
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 4. Jul 2018, 09:53

what device you have? Not an arduino based on esp8266
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

spiros314
Posts: 6
Joined: 3. Jul 2018, 13:57

Re: Pushafer Arduino error

Postby spiros314 » 4. Jul 2018, 10:01

I try to:
arduino uno r3 with arduino ethernet r3 shield(based wizned w5100)
arduino mega (atmega1280) with arduino ethernet r3 shield(based wizned w5100)

User avatar
admin
Site Admin
Posts: 331
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 4. Jul 2018, 19:58

sorry, but i cant help you.
Please try to find an anwser in an ardunio forum, i think they can help you better than i

You can reffer to the thread: viewtopic.php?f=24&t=3215

Kevin
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10

spiros314
Posts: 6
Joined: 3. Jul 2018, 13:57

Solved

Postby spiros314 » 5. Jul 2018, 06:29

i change in code line 50 : client.println("Host: https://www.pushsafer.com"); with client.println("Host: www.pushsafer.com");
and is working!

User avatar
admin
Site Admin
Posts: 331
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 5. Jul 2018, 08:56

great to hear.
You changed the https to http connection, so i think you have to install openssl to work with https connection.

https://www.google.de/search?q=https+arduino

Kevin
DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10


Who is online

Users browsing this forum: No registered users and 2 guests