Added some internal variables to /esp_status
This commit is contained in:
parent
4bdde7daa0
commit
9244e664ca
1 changed files with 29 additions and 2 deletions
|
@ -498,6 +498,15 @@ void setup() {
|
||||||
json["HOSTNAME"] = HOSTNAME;
|
json["HOSTNAME"] = HOSTNAME;
|
||||||
json["version"] = SKETCH_VERSION;
|
json["version"] = SKETCH_VERSION;
|
||||||
json["heap"] = ESP.getFreeHeap();
|
json["heap"] = ESP.getFreeHeap();
|
||||||
|
json["sketch_size"] = ESP.getSketchSize();
|
||||||
|
json["free_sketch_space"] = ESP.getFreeSketchSpace();
|
||||||
|
json["flash_chip_size"] = ESP.getFlashChipSize();
|
||||||
|
json["flash_chip_real_size"] = ESP.getFlashChipRealSize();
|
||||||
|
json["flash_chip_speed"] = ESP.getFlashChipSpeed();
|
||||||
|
json["sdk_version"] = ESP.getSdkVersion();
|
||||||
|
json["core_version"] = ESP.getCoreVersion();
|
||||||
|
json["cpu_freq"] = ESP.getCpuFreqMHz();
|
||||||
|
json["chip_id"] = ESP.getFlashChipId();
|
||||||
#ifndef USE_NEOANIMATIONFX
|
#ifndef USE_NEOANIMATIONFX
|
||||||
json["animation_lib"] = "WS2812FX";
|
json["animation_lib"] = "WS2812FX";
|
||||||
json["pin"] = PIN;
|
json["pin"] = PIN;
|
||||||
|
@ -512,15 +521,33 @@ void setup() {
|
||||||
json["button_mode"] = "OFF";
|
json["button_mode"] = "OFF";
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_AMQTT
|
#ifdef ENABLE_AMQTT
|
||||||
|
json["amqtt"] = "ON";
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_MQTT
|
||||||
json["mqtt"] = "ON";
|
json["mqtt"] = "ON";
|
||||||
#else
|
|
||||||
json["mqtt"] = "OFF";
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_HOMEASSISTANT
|
#ifdef ENABLE_HOMEASSISTANT
|
||||||
json["home_assistant"] = "ON";
|
json["home_assistant"] = "ON";
|
||||||
#else
|
#else
|
||||||
json["home_assistant"] = "OFF";
|
json["home_assistant"] = "OFF";
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_LEGACY_ANIMATIONS
|
||||||
|
json["legacy_animations"] = "ON";
|
||||||
|
#else
|
||||||
|
json["legacy_animations"] = "OFF";
|
||||||
|
#endif
|
||||||
|
#ifdef HTTP_OTA
|
||||||
|
json["esp8266_http_updateserver"] = "ON";
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_OTA
|
||||||
|
json["arduino_ota"] = "ON";
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_STATE_SAVE_SPIFFS
|
||||||
|
json["state_save"] = "SPIFFS";
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_STATE_SAVE_EEPROM
|
||||||
|
json["state_save"] = "EEPROM";
|
||||||
|
#endif
|
||||||
|
|
||||||
String json_str;
|
String json_str;
|
||||||
serializeJson(json, json_str);
|
serializeJson(json, json_str);
|
||||||
|
|
Loading…
Reference in a new issue