Fixed one bug
This commit is contained in:
parent
ceb80d8bd7
commit
1d8d8e3f7d
@ -35,7 +35,6 @@ typedef struct
|
|||||||
|
|
||||||
struct deviceConfig
|
struct deviceConfig
|
||||||
{
|
{
|
||||||
const String firmware{"1.41"};
|
|
||||||
String espnowNetName{"DEFAULT"};
|
String espnowNetName{"DEFAULT"};
|
||||||
uint8_t workMode{0};
|
uint8_t workMode{0};
|
||||||
String deviceName = "ESP-NOW switch " + String(ESP.getChipId(), HEX);
|
String deviceName = "ESP-NOW switch " + String(ESP.getChipId(), HEX);
|
||||||
@ -53,6 +52,8 @@ struct deviceConfig
|
|||||||
|
|
||||||
std::vector<espnow_message_t> espnowMessage;
|
std::vector<espnow_message_t> espnowMessage;
|
||||||
|
|
||||||
|
const String firmware{"1.41"};
|
||||||
|
|
||||||
bool relayStatus{false};
|
bool relayStatus{false};
|
||||||
|
|
||||||
bool wasMqttAvailable{false};
|
bool wasMqttAvailable{false};
|
||||||
@ -341,7 +342,7 @@ void setupWebServer()
|
|||||||
{
|
{
|
||||||
String configJson;
|
String configJson;
|
||||||
DynamicJsonDocument json(384); // To calculate the buffer size uses https://arduinojson.org/v6/assistant.
|
DynamicJsonDocument json(384); // To calculate the buffer size uses https://arduinojson.org/v6/assistant.
|
||||||
json["firmware"] = config.firmware;
|
json["firmware"] = firmware;
|
||||||
json["espnowNetName"] = config.espnowNetName;
|
json["espnowNetName"] = config.espnowNetName;
|
||||||
json["deviceName"] = config.deviceName;
|
json["deviceName"] = config.deviceName;
|
||||||
json["relayPin"] = config.relayPin;
|
json["relayPin"] = config.relayPin;
|
||||||
@ -417,7 +418,7 @@ void sendAttributesMessage(const uint8_t type)
|
|||||||
}
|
}
|
||||||
json["MCU"] = "ESP8266";
|
json["MCU"] = "ESP8266";
|
||||||
json["MAC"] = myNet.getNodeMac();
|
json["MAC"] = myNet.getNodeMac();
|
||||||
json["Firmware"] = config.firmware;
|
json["Firmware"] = firmware;
|
||||||
json["Library"] = myNet.getFirmwareVersion();
|
json["Library"] = myNet.getFirmwareVersion();
|
||||||
json["Uptime"] = "Days:" + String(days) + " Hours:" + String(hours - (days * 24)) + " Mins:" + String(mins - (hours * 60));
|
json["Uptime"] = "Days:" + String(days) + " Hours:" + String(hours - (days * 24)) + " Mins:" + String(mins - (hours * 60));
|
||||||
serializeJsonPretty(json, outgoingData.message);
|
serializeJsonPretty(json, outgoingData.message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user