1 parent
e364b37173
commit
159376b819
1 file changed
+3
-2
+3
-2
@@ -52,8 +52,9 @@ void pilightCallback(const String &protocol, const String &message, int status,
|
|||||||
trc(F("Creating RF PiLight buffer"));
|
trc(F("Creating RF PiLight buffer"));
|
||||||
StaticJsonBuffer<JSON_MSG_BUFFER> jsonBuffer;
|
StaticJsonBuffer<JSON_MSG_BUFFER> jsonBuffer;
|
||||||
JsonObject& RFPiLightdata = jsonBuffer.createObject();
|
JsonObject& RFPiLightdata = jsonBuffer.createObject();
|
||||||
trc(F("Rcv. Pilight"));
|
StaticJsonBuffer<JSON_MSG_BUFFER> jsonBuffer2;
|
||||||
RFPiLightdata.set("message", (char *)message.c_str());
|
JsonObject& msg = jsonBuffer2.parseObject(message);
|
||||||
|
RFPiLightdata.set("message", msg);
|
||||||
RFPiLightdata.set("protocol",(char *)protocol.c_str());
|
RFPiLightdata.set("protocol",(char *)protocol.c_str());
|
||||||
RFPiLightdata.set("length", (char *)deviceID.c_str());
|
RFPiLightdata.set("length", (char *)deviceID.c_str());
|
||||||
RFPiLightdata.set("repeats", (int)repeats);
|
RFPiLightdata.set("repeats", (int)repeats);
|
||||||
|
|||||||
Reference in new issue
Block a user