print config in a more useful way
This commit is contained in:
parent
bde1b9b36f
commit
89ac7b2dc9
14
things.ino
14
things.ino
@ -421,12 +421,14 @@ void setup() {
|
|||||||
read_sensor();
|
read_sensor();
|
||||||
DynamicJsonBuffer jsonBuffer;
|
DynamicJsonBuffer jsonBuffer;
|
||||||
JsonObject& json = jsonBuffer.createObject();
|
JsonObject& json = jsonBuffer.createObject();
|
||||||
json["mqtt_server"] = mqtt_server;
|
JsonObject& mqtt = json.createNestedObject("mqtt");
|
||||||
json["mqtt_port"] = mqtt_port;
|
mqtt["server"] = mqtt_server;
|
||||||
json["mqtt_topic"] = mqtt_topic;
|
mqtt["port"] = mqtt_port;
|
||||||
json["capability_dht"] = capability_dht;
|
mqtt["topic"] = mqtt_topic;
|
||||||
json["capability_ldr"] = capability_ldr;
|
JsonObject& capability = json.createNestedObject("capability");
|
||||||
json["capability_rgb"] = capability_rgb;
|
capability["dht"] = capability_dht;
|
||||||
|
capability["ldr"] = capability_ldr;
|
||||||
|
capability["rgb"] = capability_rgb;
|
||||||
String response;
|
String response;
|
||||||
json.printTo(response);
|
json.printTo(response);
|
||||||
http_server.send(200, "text/plain", response);
|
http_server.send(200, "text/plain", response);
|
||||||
|
Loading…
Reference in New Issue
Block a user