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