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 Store
Homepage
User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: Pushafer Arduino error

Postby admin » 16. Apr 2018, 19:12

please replace this

Code: Select all

  pushsafer("It works!!!","Test",1,1,1,"a");  
by this

Code: Select all

  pushsafer("It works!!!","Test","1","1","1","a");  
and try again
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

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

Re: Pushafer Arduino error

Postby admin » 17. Apr 2018, 14:50

please change this line

Code: Select all

byte pushsafer(char *pushsafermessage, char *pushsafertitle, int sound, int vibration, int icon, char *psdevice)
to this

Code: Select all

byte pushsafer(char *pushsafermessage, char *pushsafertitle, char sound, char vibration, char icon, char *psdevice)
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

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

Re: Pushafer Arduino error

Postby admin » 20. Apr 2018, 21:33

Please use this

Code: Select all

/*
   Pushsafer.ino
   Pushsafer.com sketch by Appzer.de Kevin Siml 2016-08-08
   Send pushsafer.com messages from the arduino
*/

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0xDE,0xAC,0xBF,0xEF,0xFE,0xAA};

// pushsafer settings
char privatekey[] = "your20characterPrivateKey";

int length;

EthernetClient client;

void setup()
{
  Serial.begin(9600);
  Serial.print(F("Starting ethernet..."));
  if(!Ethernet.begin(mac)) Serial.println("failed");
  else Serial.println(Ethernet.localIP());

  delay(5000);
  Serial.println("Ready");
}

void loop()
{
  pushsafer("It works!!!","Test","1","1","1","a");  
  delay(60000); 
}

byte pushsafer(char *pushsafermessage, char *pushsafertitle, char *pssound, char *psvibration, char *psicon, char *psdevice)
{
  String title = pushsafertitle;
  String message = pushsafermessage;
  String device = psdevice;
  String sound = pssound;
  String vibration = psvibration;
  String icon = psicon;

  length = 41 + message.length() + title.length() + sound.length() + vibration.length() + icon.length() + device.length() + privatekey.length();

  if(client.connect("pushsafer.com",80))
  {
    client.println("POST /api HTTP/1.1");
    client.println("Host: https://www.pushsafer.com");
    client.println("Connection: close\r\nContent-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.print(length);
    client.println("\r\n");;
    client.print("k=");
    client.print(privatekey);
    client.print("&m=");
    client.print(message);
    client.print("&t=");
    client.print(title);	
    client.print("&s=");
    client.print(sound);
    client.print("&v=");
    client.print(vibration);	
    client.print("&i=");
    client.print(icon);
    client.print("&d=");
    client.print(device);	
    client.print("&retry=60");
    client.print("&expire=3600");
    while(client.connected())  
    {
      while(client.available())
      {
        char ch = client.read();
        Serial.write(ch);
      }
    }
    client.stop();
  }  
}
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

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

Re: Pushafer Arduino error

Postby admin » 25. Apr 2018, 18:50

Hi,

sorry, but i can not test the script. So we have to test!

Please change this line

Code: Select all

char privatekey[] = "your20characterPrivateKey";
to this

Code: Select all

String privatekey[] = "your20characterPrivateKey";
or this

Code: Select all

String privatekey = "your20characterPrivateKey";
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

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

Re: Pushafer Arduino error

Postby admin » 26. Apr 2018, 16:32

great to hear :-)
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

User avatar
admin
Site Admin
Posts: 943
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
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

User avatar
admin
Site Admin
Posts: 943
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
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

User avatar
admin
Site Admin
Posts: 943
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
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

User avatar
admin
Site Admin
Posts: 943
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
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

User avatar
admin
Site Admin
Posts: 943
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
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


Who is online

Users browsing this forum: No registered users and 39 guests