|
...
|
...
|
@@ -8,13 +8,13 @@
|
|
8
|
8
|
#include <ESP8266HTTPClient.h>
|
|
9
|
9
|
#include <ESP8266httpUpdate.h>
|
|
10
|
10
|
|
|
11
|
|
-#define DEBUG 1 //0=off 1=on
|
|
|
11
|
+#define DEBUG 0 //0=off 1=on
|
|
12
|
12
|
#define PIR D1 // pinul de date D1 la care se conecteaza PIRul
|
|
13
|
13
|
|
|
14
|
14
|
bool ARM,lastPIR;
|
|
15
|
15
|
unsigned int interval_alarma = 60000; // la ce interval sa trimita notificarile 60 sec = 60000 in cazul in care a re doua alarme consecutive
|
|
16
|
16
|
unsigned long t_alarma=0;
|
|
17
|
|
-const unsigned long interval_update=1000*60*60; // face update la 60 min
|
|
|
17
|
+const unsigned long interval_update=1000*60*5; // face update la 5 min
|
|
18
|
18
|
unsigned long t_update=0;
|
|
19
|
19
|
|
|
20
|
20
|
char mqtt_user[9]; //le va lua din FS
|
|
...
|
...
|
@@ -29,7 +29,7 @@ char mqttLWT[22];
|
|
29
|
29
|
char mqttSTA[24];
|
|
30
|
30
|
|
|
31
|
31
|
const String model = "NodeMCU PIR";
|
|
32
|
|
-const String ver = "v2.1.0";
|
|
|
32
|
+const String ver = "v2.1.1";
|
|
33
|
33
|
const char* mqttServer = "mqtt.clickhome.ro";
|
|
34
|
34
|
const int mqttPort = 1883;
|
|
35
|
35
|
String mqttMessage;
|