-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpushSafer.ino
44 lines (39 loc) · 1.02 KB
/
pushSafer.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Library here:
* https://github.com/appzer/pushsafer-arduino-library
*
*
* Original: by witnessmenow
* https://github.com/witnessmenow/pushsafer-arduino-library
*
* NOTE!! I had to make two changed to use SSL
*
* Pushsafer.h
* Uncomment - define SSL_PORT 443
* Comment - #define PORT 80
*
* Pushsafer.cpp
* Uncomment - if (client->connect(HOST, SSL_PORT)) {
* Comment - if (client->connect(HOST, PORT)) {
*
*/
void pushSafer() {
if (strcmp(config.pushSaferEnable, "t") == 0) {//only if enabled
Serial.println("Sendning Push Safer");
WiFiClientSecure client;
Pushsafer pushsafer(config.pushSaferKey, client);
pushsafer.debug = true;
struct PushSaferInput input;
input.message = pushMessage;
input.title = config.trigName;
input.sound = "1";
input.vibration = "1";
input.icon = "1";
input.iconcolor = "#FFCCCC";
input.priority = "0";
input.device = "a";
Serial.println(pushsafer.sendEvent(input));
Serial.println("Sent");
delay(100);
}
}