80-bit and 56-bit protocols on same transceiver

Added the ability to process 80-bit and 56-bit motors on the same ESPSomfy RTS device.
This commit is contained in:
Robert Strouse 2023-03-18 18:41:04 -07:00
parent 3f662b7bd0
commit 370b8f1a23
10 changed files with 314 additions and 107 deletions

View file

@ -348,7 +348,7 @@ void Web::begin() {
// TODO: Do some validation of the file.
Serial.println("Validating restore");
// Go through the uploaded file to determine if it is valid.
somfy.loadShadesFile("/shades.tmp");
if(somfy.loadShadesFile("/shades.tmp")) somfy.commit();
}
});
server.on("/index.js", []() {
@ -471,6 +471,7 @@ void Web::begin() {
JsonObject obj = doc.to<JsonObject>();
obj["shadeId"] = shadeId;
obj["remoteAddress"] = somfy.getNextRemoteAddress(shadeId);
obj["bitLength"] = somfy.transceiver.config.type;
serializeJson(doc, g_content);
server.send(200, _encoding_json, g_content);
});