Mógłbyś podać link do EspPush?
Supla Pushover x4 cd
-
- Posts: 2101
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
https://www.facebook.com/groups/supladiy/
-
- Posts: 369
- Joined: Fri Apr 26, 2019 5:32 pm
- Location: Bukowice
biblia
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2101
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
Dzięki.
Czym różni się ta biblioteka od tej https://github.com/ArduinoHannover/Pushover ?
Na tej, co podrzuciłeś program działa płynniej (tak mi się wydaje)
https://www.facebook.com/groups/supladiy/
-
- Posts: 369
- Joined: Fri Apr 26, 2019 5:32 pm
- Location: Bukowice
Jak porównasz to są prawie identyczne. A w działaniu...nie zauważyłem różnicy
-
- Posts: 2101
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
Ok, dzięki.
Czy jest możliwość aby zmiana stanu przekaźnika (a nie przycisk) wyzwalała akcję powiadomienia?klew wrote: ↑Thu Apr 30, 2020 9:40 pm To może wysyłanie PO w każdej iteracji zagładza Suplowe "iterate"? Aktualnie, gdy te GPIO są na "LOW" to w każdej iteracji tam wejdzie i wyśle powiadomienie.
Dorzuć sobie takie coś przed setup():W miejsca tych "Serial.println" wstaw kod z "ifów" wysyłających powiadomienia.Code: Select all
enum MyAction { SEND_PO_1, SEND_PO_2 }; class MyNotif : public Supla::Triggerable { MyNotif(){}; void trigger(int event, int action) { if (action == SEND_PO_1) { Serial.println("SEND_PO_1"); } if (action == SEND_PO_2) { Serial.println("SEND_PO_2"); } } };
Potem dodaj w setupie:Następnie wywal z "iterate" wszystko poza Supla iterateCode: Select all
new MyNotif *notif = new MyNotif; buttonSet->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_1); buttonClear->willTrigger(*notif, Supla::Control::Button::ON_PRESS, SEND_PO_2);
https://www.facebook.com/groups/supladiy/
-
- Posts: 2101
- Joined: Thu Nov 23, 2017 11:33 pm
- Location: Warszawa
-
- Posts: 369
- Joined: Fri Apr 26, 2019 5:32 pm
- Location: Bukowice
Hi GURY. I didn't find the entry "client.setInsecure ();" in the EspPush library or in Pushover (I have 2 versions). Can you explain it to me?
-
- Posts: 1482
- Joined: Wed Jun 27, 2018 5:48 pm
- Location: El Saucejo - Sevilla
your version is probably not there, you use arduino core 2.4.2 which is not compatible with "setInsecure".
the library https://github.com/ArduinoHannover/Pushover was updated a week ago and now allows to define insecure connection:
the library https://github.com/ArduinoHannover/Pushover was updated a week ago and now allows to define insecure connection:
Code: Select all
Pushover po = Pushover("SecureAppToken","UserToken", UNSAFE); //setInsecure --