Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
fda640e713 | |||
648a19775e |
@ -10,7 +10,7 @@
|
||||
|
||||
<body onload="load();">
|
||||
<form class="box">
|
||||
<h1>ESP-NOW Light </h1>
|
||||
<h1>ESP-NOW Light</h1>
|
||||
<div class="wrapper">
|
||||
<p class="text">Firmware:</p>
|
||||
<p class="text" id="version"></p>
|
||||
|
@ -34,7 +34,6 @@ typedef struct
|
||||
|
||||
struct deviceConfig
|
||||
{
|
||||
const String firmware{"1.21"};
|
||||
String espnowNetName{"DEFAULT"};
|
||||
String deviceName = "ESP-NOW light " + String(ESP.getChipId(), HEX);
|
||||
uint8_t ledType{ENLT_NONE};
|
||||
@ -47,6 +46,8 @@ struct deviceConfig
|
||||
|
||||
std::vector<espnow_message_t> espnowMessage;
|
||||
|
||||
const String firmware{"1.21"};
|
||||
|
||||
bool ledStatus{false};
|
||||
uint8_t brightness{255};
|
||||
uint16_t temperature{255};
|
||||
@ -311,7 +312,7 @@ void setupWebServer()
|
||||
{
|
||||
String configJson;
|
||||
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["deviceName"] = config.deviceName;
|
||||
json["ledType"] = config.ledType;
|
||||
@ -349,7 +350,7 @@ void sendAttributesMessage()
|
||||
json["Type"] = "ESP-NOW light";
|
||||
json["MCU"] = "ESP8266";
|
||||
json["MAC"] = myNet.getNodeMac();
|
||||
json["Firmware"] = config.firmware;
|
||||
json["Firmware"] = firmware;
|
||||
json["Library"] = myNet.getFirmwareVersion();
|
||||
json["Uptime"] = "Days:" + String(days) + " Hours:" + String(hours - (days * 24)) + " Mins:" + String(mins - (hours * 60));
|
||||
serializeJsonPretty(json, outgoingData.message);
|
||||
|
Reference in New Issue
Block a user