mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
ввел в работу mqtt
This commit is contained in:
@@ -7,5 +7,15 @@
|
|||||||
"timezone": 1,
|
"timezone": 1,
|
||||||
"ntp": "pool.ntp.org",
|
"ntp": "pool.ntp.org",
|
||||||
"weblogin": "admin",
|
"weblogin": "admin",
|
||||||
"webpass": "admin"
|
"webpass": "admin",
|
||||||
|
"mqttServer": "m2.wqtt.ru",
|
||||||
|
"mqttPort": 8021,
|
||||||
|
"mqttPrefix": "/ver4test",
|
||||||
|
"mqttUser": "rise",
|
||||||
|
"mqttPass": "hostel3333",
|
||||||
|
"mqttServer2": "",
|
||||||
|
"mqttPort2": 0,
|
||||||
|
"mqttPrefix2": "",
|
||||||
|
"mqttUser2": "",
|
||||||
|
"mqttPass2": ""
|
||||||
}
|
}
|
||||||
@@ -8,3 +8,4 @@
|
|||||||
#include "classes/SendJson.h"
|
#include "classes/SendJson.h"
|
||||||
#include "classes/NotAsync.h"
|
#include "classes/NotAsync.h"
|
||||||
#include "ESPConfiguration.h"
|
#include "ESPConfiguration.h"
|
||||||
|
#include "MqttClient.h"
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ void setup() {
|
|||||||
standWebSocketsInit();
|
standWebSocketsInit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//инициализация mqtt
|
||||||
|
mqttInit();
|
||||||
|
|
||||||
//создаем объект класса выгружающего json массив из файла
|
//создаем объект класса выгружающего json массив из файла
|
||||||
mySendJson = new SendJson;
|
mySendJson = new SendJson;
|
||||||
|
|
||||||
@@ -70,6 +73,9 @@ void loop() {
|
|||||||
standWebSocket.loop();
|
standWebSocket.loop();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//обновление mqtt
|
||||||
|
mqttLoop();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < iotSensors.size(); i++) {
|
for (unsigned int i = 0; i < iotSensors.size(); i++) {
|
||||||
iotSensors[i]->loop();
|
iotSensors[i]->loop();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user