From 17e5156ebf98531f3d0843a2d69f410bcf1984b6 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Tue, 29 Jan 2019 16:33:53 +0300 Subject: [PATCH] fixup rfbridge ws-data --- code/espurna/rfbridge.ino | 7 ++++--- code/html/custom.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index 7f2f0532..6060aca7 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -92,10 +92,11 @@ void _rfbWebSocketSendCodes() { DynamicJsonBuffer jsonBuffer; JsonObject& root = jsonBuffer.createObject(); - root["size"] = relayCount(); + JsonObject& rfb = root.createObject("rfb"); + rfb["size"] = relayCount(); - JsonArray& on = root.createNestedArray("on"); - JsonArray& off = root.createNestedArray("off"); + JsonArray& on = rfb.createNestedArray("on"); + JsonArray& off = rfb.createNestedArray("off"); for (byte id=0; id