Files
IoTManager/src/Global.cpp

80 lines
1.8 KiB
C++
Raw Normal View History

2020-09-02 22:34:49 +03:00
#include "Global.h"
#ifdef WS_enable
AsyncWebSocket ws;
//AsyncEventSource events;
#endif
2020-10-20 23:58:23 +03:00
2020-11-19 04:14:52 +03:00
TickerScheduler ts(SYGNAL + 1);
2020-09-02 22:34:49 +03:00
WiFiClient espClient;
PubSubClient mqtt(espClient);
StringCommand sCmd;
AsyncWebServer server(80);
2020-12-18 14:28:31 +01:00
OneWire* oneWire;
2020-09-02 22:34:49 +03:00
DallasTemperature sensors;
/*
* Global vars
*/
boolean just_load = true;
2020-11-05 02:23:08 +03:00
boolean telegramInitBeen = false;
2020-09-02 22:34:49 +03:00
// Json
String configSetupJson = "{}";
String configLiveJson = "{}";
2020-11-16 18:47:09 +03:00
String configStoreJson = "{}";
2020-09-02 22:34:49 +03:00
String configOptionJson = "{}";
2020-12-18 14:28:31 +01:00
String telegramMsgJson = "{}";
2020-09-02 22:34:49 +03:00
// Mqtt
String chipId = "";
String prex = "";
String all_widgets = "";
String scenario = "";
//orders and events
String orderBuf = "";
String eventBuf = "";
String itemsFile = "";
String itemsLine = "";
2020-11-02 01:21:51 +03:00
//key lists and numbers
//=========================================
String impuls_KeyList = "";
int impuls_EnterCounter = -1;
//=========================================
String buttonOut_KeyList = "";
int buttonOut_EnterCounter = -1;
//=========================================
2020-11-17 01:01:42 +03:00
String inOutput_KeyList = "";
int inOutput_EnterCounter = -1;
//=========================================
String pwmOut_KeyList = "";
int pwmOut_EnterCounter = -1;
2020-11-15 01:44:25 +03:00
//=========================================
2020-11-18 03:25:05 +03:00
String countDown_KeyList = "";
int countDown_EnterCounter = -1;
//=========================================
2020-12-09 04:08:36 +03:00
String logging_KeyList = "";
int logging_EnterCounter = -1;
//=========================================
2020-12-22 12:38:05 +01:00
int dht_EnterCounter = -1;
2020-12-21 01:46:11 +01:00
//=========================================
2020-11-02 01:21:51 +03:00
2020-09-02 22:34:49 +03:00
2020-12-09 04:08:36 +03:00
String itemName;
String presetName;
2020-09-02 22:34:49 +03:00
2020-10-31 21:07:49 +03:00
// Upgrade
2020-11-01 02:52:57 +03:00
String serverIP;
2020-10-31 21:07:49 +03:00
2020-09-02 22:34:49 +03:00
// Scenario
2020-12-18 14:28:31 +01:00
int scenario_line_status[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
2020-09-17 21:33:54 +03:00
int lastVersion;
2020-09-03 23:29:34 +03:00
2020-09-02 22:34:49 +03:00
boolean busScanFlag = false;
boolean fsCheckFlag = false;
boolean delElementFlag = false;