mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 19:12:10 +01:00
Add support for RTW protocols #38
This commit is contained in:
parent
ac6d6ee34d
commit
65e4caf3b2
10 changed files with 106 additions and 34 deletions
4
Web.cpp
4
Web.cpp
|
|
@ -469,12 +469,14 @@ void Web::begin() {
|
|||
});
|
||||
server.on("/getNextShade", []() {
|
||||
webServer.sendCORSHeaders();
|
||||
StaticJsonDocument<128> doc;
|
||||
StaticJsonDocument<256> doc;
|
||||
uint8_t shadeId = somfy.getNextShadeId();
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
obj["shadeId"] = shadeId;
|
||||
obj["remoteAddress"] = somfy.getNextRemoteAddress(shadeId);
|
||||
obj["bitLength"] = somfy.transceiver.config.type;
|
||||
obj["stepSize"] = 100;
|
||||
obj["proto"] = static_cast<uint8_t>(somfy.transceiver.config.proto);
|
||||
serializeJson(doc, g_content);
|
||||
server.send(200, _encoding_json, g_content);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue