From 9244e664ca7a77d2b7a573f1b6e4f6b306130021 Mon Sep 17 00:00:00 2001 From: Tobias Blum Date: Wed, 20 Jun 2018 01:07:46 +0200 Subject: [PATCH] Added some internal variables to /esp_status --- Arduino/McLighting/McLighting.ino | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index 1ac4f2c..fe582db 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -498,6 +498,15 @@ void setup() { json["HOSTNAME"] = HOSTNAME; json["version"] = SKETCH_VERSION; 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 json["animation_lib"] = "WS2812FX"; json["pin"] = PIN; @@ -512,15 +521,33 @@ void setup() { json["button_mode"] = "OFF"; #endif #ifdef ENABLE_AMQTT + json["amqtt"] = "ON"; + #endif + #ifdef ENABLE_MQTT json["mqtt"] = "ON"; - #else - json["mqtt"] = "OFF"; #endif #ifdef ENABLE_HOMEASSISTANT json["home_assistant"] = "ON"; #else json["home_assistant"] = "OFF"; #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; serializeJson(json, json_str);