brunojoyal / pushoveresp32 Goto Github PK
View Code? Open in Web Editor NEWPushover.net client for ESP32, with HTTPS & attachment support.
Pushover.net client for ESP32, with HTTPS & attachment support.
Hello, simple notification without image doesnt work, however with the image it does works:
`#include <FS.h>
#include "SPIFFS.h"
#define TITRE_PROGRAMME "ESP32_TEST"
const char *ssid = "ssid";
const char *password = "password";
// https://github.com/brunojoyal/PushoverESP32
#include <PushoverESP32.h>
Pushover pushoverClientImage("xxx", "yyyy", &SPIFFS);
Pushover pushoverClient("xxx", "yyy");
const char* MON_IMAGE = "/mailbox.jpg";
void SendPushOverMarcWithAttach(const char* titre, const char* msg, const char* sound, const char* img_as_attachment) {
PushoverMessage myMessage;
myMessage.title = titre;
myMessage.message = msg;
myMessage.sound = sound;
File photo = SPIFFS.open(img_as_attachment);
myMessage.attachment = &photo;
pushoverClientImage.send(myMessage);
}
void SendPushOverMarc(const char* titre, const char* msg, const char* sound) {
PushoverMessage myMessage;
myMessage.title = titre;
myMessage.message = msg;
myMessage.sound = sound;
pushoverClient.send(myMessage);
}
void Connect_WiFi() {
WiFi.disconnect();
Serial.println( F("\nConnecting to WiFi...") );
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
Serial.print( F(".") );
delay(500);
}
Serial.println("\nWiFi at: " + WiFi.localIP().toString());
}
// setup
void setup() {
Serial.begin(115200);
Serial.println();
bool spiffsOK = SPIFFS.begin();
Serial.println(spiffsOK ? F("SPIFFS OK") : F("SPIFFS FAILED!!") );
Connect_WiFi();
delay(1000);
char bufferMsg[25];
sprintf(bufferMsg, "http://%s/", WiFi.localIP().toString().c_str());
Serial.printf("\nbufferMsg: %s\n", bufferMsg);
SendPushOverMarc(TITRE_PROGRAMME, bufferMsg, "magic");
}
// loop
void loop() {
// ...
}`
I can't get this library to work on my ESP32 :-(
Pushover pushoverClient(PO_APP_TOKEN, PO_USER);
PushoverMessage myMessage;
myMessage.title = title;
myMessage.message = msg;
myMessage.url = dashLink;
myMessage.url_title = "Dashboard > ";
int responseCode = pushoverClient.send(myMessage);
I get -1 as a response.
Hello,
I have an error when compiling after including PushoverESP32.h
I also have all libraries for LITTLEFS for the ESP32, but still have the issue :
In file included from /Users/me/Arduino/Sources/libraries/PushoverESP32/src/PushoverESP32.h:8, from /Users/me/Arduino/Sources/pushover/pushover.ino:5: /Users/me/Arduino/Sources/libraries/ESP32upload/src/ESP32upload.h:26:21: error: 'LITTLEFS' was not declared in this scope FS *_tempfileFS = &LITTLEFS; ^~~~~~~~
Regards
I have been using this lib for a while now successfully. It stopped working a couple of days ago. It now gives an error code of 400?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.