3#ifdef PROCESS_SMART_BUTTON_JSON
6char *_SMARTButton = NULL;
7void runSMARTButton(
char *SMAddress)
15boolean processJSONSMARTButton(DynamicJsonDocument smartJSONObject)
17 SerialTemp.printf(
"processJSONSMARTButton: ");
18 serializeJsonPretty(smartJSONObject, Serial);
19 SerialTemp.println(
"");
21 StaticJsonDocument<2024> flows;
22 DynamicJsonDocument smartButtonObject(1024);
26 const char *dev = smartJSONObject[
"dev"];
27 SerialTemp.printf(
"dev = %s\n", dev?dev:
"NULL");
29 deserializeJson(smartButtonObject, smartJSONObject[
"SMARTButton"]);
31 serializeJsonPretty(smartButtonObject, Serial);
32 SerialTemp.println(
"");
35 SerialTemp.printf(
"step2\n");
41 const char* name = smartButtonObject[
"name"];
42 const char* uuid = smartButtonObject[
"uuid"];
43 const char* flowNum = smartButtonObject[
"flowNum"];
44 SerialTemp.printf(
"processJSONSMARTButton: %s, %s, %s\n", name?name:
"NULL", uuid?uuid:
"NULL", flowNum?flowNum:
"NULL");
46 deserializeJson(flows, smartButtonObject[
"flow"]);
48 SerialTemp.printf(
"step3\n");