mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
feat: socket protocol 2 core on ws://host/ws
The /ws endpoint runs next to the old socket on port 8080. The handshake checks the token under security, the device sends hello, then a sync of the schema (unless the client has it), header, rooms, shades, groups, repeaters and status, paced by the client's next. Events go out with the old ones: shadeState or the whole shade on a config change, groups, rooms, removals, orders, repeaters, shadeCommand, memory, wifi, ethernet, and the frames and frequencyScan feeds. The table of types, fields, errors and feeds is defined once and is sent as the schema. The writer, item writers, sync and client frame parser are pure and natively tested. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a36888f8a1
commit
482e495678
24 changed files with 1839 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "SomfyShadeOps.h"
|
||||
#include "Somfy.h"
|
||||
#include "ShadeChanges.h"
|
||||
|
||||
extern SomfyShadeController somfy;
|
||||
|
||||
|
|
@ -47,6 +48,7 @@ void SomfyShadeOps::setUnpaired(uint8_t shadeId) {
|
|||
SomfyShade *shade = somfy.getShadeById(shadeId);
|
||||
shade->paired = false;
|
||||
shade->save();
|
||||
shade->changed |= SHADE_CHANGED_CONFIG;
|
||||
}
|
||||
void SomfyShadeOps::setRollingCode(uint8_t shadeId, uint16_t code) { somfy.getShadeById(shadeId)->setRollingCode(code); }
|
||||
bool SomfyShadeOps::sendGroupCommand(uint8_t groupId, somfy_commands cmd, uint8_t repeat, uint8_t stepSize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue