mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
6.3.0.5 Add code image
6.3.0.5 20181107 * Add code image and optional commit number to version
This commit is contained in:
parent
c7d920f1df
commit
c75ae78d88
@ -1,4 +1,7 @@
|
|||||||
/* 6.3.0.4 20181106
|
/* 6.3.0.5 20181107
|
||||||
|
* Add code image and optional commit number to version
|
||||||
|
*
|
||||||
|
* 6.3.0.4 20181106
|
||||||
* Add command SetSensorXX 0/1 to disable/re-enable compiled xsns_XX_sensor.ino driver
|
* Add command SetSensorXX 0/1 to disable/re-enable compiled xsns_XX_sensor.ino driver
|
||||||
*
|
*
|
||||||
* 6.3.0.3 20181105
|
* 6.3.0.3 20181105
|
||||||
|
@ -518,6 +518,8 @@ const char kPrefixes[3][PRFX_MAX_STRING_LENGTH] PROGMEM = {
|
|||||||
D_STAT,
|
D_STAT,
|
||||||
D_TELE };
|
D_TELE };
|
||||||
|
|
||||||
|
const char kCodeImage[] PROGMEM = "sonoff|minimal|classic|sensors|knx|basic|display";
|
||||||
|
|
||||||
// support.ino
|
// support.ino
|
||||||
static const char kMonthNames[] = D_MONTH3LIST;
|
static const char kMonthNames[] = D_MONTH3LIST;
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
* Default sensor states
|
* Default sensor states
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
|
#define CODE_IMAGE 0
|
||||||
|
|
||||||
#define USE_DHT // Default DHT11 sensor needs no external library
|
#define USE_DHT // Default DHT11 sensor needs no external library
|
||||||
#define USE_ENERGY_SENSOR // Use energy sensors (+14k code)
|
#define USE_ENERGY_SENSOR // Use energy sensors (+14k code)
|
||||||
#define USE_HLW8012 // Use energy sensor for Sonoff Pow and WolfBlitz
|
#define USE_HLW8012 // Use energy sensor for Sonoff Pow and WolfBlitz
|
||||||
|
@ -193,6 +193,7 @@ boolean mdns_begun = false; // mDNS active
|
|||||||
mytmplt my_module; // Active copy of Module name and GPIOs (23 x 8 bits)
|
mytmplt my_module; // Active copy of Module name and GPIOs (23 x 8 bits)
|
||||||
StateBitfield global_state; // Global states (currently Wifi and Mqtt) (8 bits)
|
StateBitfield global_state; // Global states (currently Wifi and Mqtt) (8 bits)
|
||||||
char my_version[33]; // Composed version string
|
char my_version[33]; // Composed version string
|
||||||
|
char my_image[33]; // Code image and/or commit
|
||||||
char my_hostname[33]; // Composed Wifi hostname
|
char my_hostname[33]; // Composed Wifi hostname
|
||||||
char mqtt_client[33]; // Composed MQTT Clientname
|
char mqtt_client[33]; // Composed MQTT Clientname
|
||||||
char mqtt_topic[33]; // Composed MQTT topic
|
char mqtt_topic[33]; // Composed MQTT topic
|
||||||
@ -609,7 +610,6 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len)
|
|||||||
// We also need at least 3 chars to make a valid version number string.
|
// We also need at least 3 chars to make a valid version number string.
|
||||||
if (((1 == data_len) && (1 == payload)) || ((data_len >= 3) && NewerVersion(dataBuf))) {
|
if (((1 == data_len) && (1 == payload)) || ((data_len >= 3) && NewerVersion(dataBuf))) {
|
||||||
ota_state_flag = 3;
|
ota_state_flag = 3;
|
||||||
// snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_VERSION " %s " D_JSON_FROM " %s\"}", command, my_version, Settings.ota_url);
|
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_VERSION " %s " D_JSON_FROM " %s\"}", command, my_version, GetOtaUrl(stemp1, sizeof(stemp1)));
|
snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_VERSION " %s " D_JSON_FROM " %s\"}", command, my_version, GetOtaUrl(stemp1, sizeof(stemp1)));
|
||||||
} else {
|
} else {
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_ONE_OR_GT "\"}", command, my_version);
|
snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_ONE_OR_GT "\"}", command, my_version);
|
||||||
@ -1497,8 +1497,8 @@ void PublishStatus(uint8_t payload)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((0 == payload) || (2 == payload)) {
|
if ((0 == payload) || (2 == payload)) {
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\"" D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"),
|
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\"" D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"),
|
||||||
my_version, GetBuildDateAndTime().c_str(), ESP.getBootVersion(), ESP.getSdkVersion());
|
my_version, my_image, GetBuildDateAndTime().c_str(), ESP.getBootVersion(), ESP.getSdkVersion());
|
||||||
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2"));
|
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2610,13 +2610,12 @@ void setup()
|
|||||||
Serial.println();
|
Serial.println();
|
||||||
seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded
|
seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded
|
||||||
|
|
||||||
snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff);
|
snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff); // Release version 6.3.0
|
||||||
if (VERSION & 0xff) {
|
if (VERSION & 0xff) { // Development or patched version 6.3.0.10
|
||||||
snprintf_P(my_version, sizeof(my_version), PSTR("%s.%d"), my_version, VERSION & 0xff);
|
snprintf_P(my_version, sizeof(my_version), PSTR("%s.%d"), my_version, VERSION & 0xff);
|
||||||
}
|
}
|
||||||
#ifdef BE_MINIMAL
|
char code_image[20];
|
||||||
snprintf_P(my_version, sizeof(my_version), PSTR("%s-" D_JSON_MINIMAL), my_version);
|
snprintf_P(my_image, sizeof(my_image), PSTR("(%s)"), GetTextIndexed(code_image, sizeof(code_image), CODE_IMAGE, kCodeImage));
|
||||||
#endif // BE_MINIMAL
|
|
||||||
|
|
||||||
SettingsLoad();
|
SettingsLoad();
|
||||||
SettingsDelta();
|
SettingsDelta();
|
||||||
@ -2731,8 +2730,8 @@ void setup()
|
|||||||
}
|
}
|
||||||
blink_powersave = power;
|
blink_powersave = power;
|
||||||
|
|
||||||
snprintf_P(log_data, sizeof(log_data), PSTR(D_PROJECT " %s %s (" D_CMND_TOPIC " %s, " D_FALLBACK " %s, " D_CMND_GROUPTOPIC " %s) " D_VERSION " %s-" ARDUINO_ESP8266_RELEASE),
|
snprintf_P(log_data, sizeof(log_data), PSTR(D_PROJECT " %s %s (" D_CMND_TOPIC " %s, " D_FALLBACK " %s, " D_CMND_GROUPTOPIC " %s) " D_VERSION " %s%s-" ARDUINO_ESP8266_RELEASE),
|
||||||
PROJECT, Settings.friendlyname[0], mqtt_topic, mqtt_client, Settings.mqtt_grptopic, my_version);
|
PROJECT, Settings.friendlyname[0], mqtt_topic, mqtt_client, Settings.mqtt_grptopic, my_version, my_image);
|
||||||
AddLog(LOG_LEVEL_INFO);
|
AddLog(LOG_LEVEL_INFO);
|
||||||
#ifdef BE_MINIMAL
|
#ifdef BE_MINIMAL
|
||||||
snprintf_P(log_data, sizeof(log_data), PSTR(D_WARNING_MINIMAL_VERSION));
|
snprintf_P(log_data, sizeof(log_data), PSTR(D_WARNING_MINIMAL_VERSION));
|
||||||
|
@ -57,6 +57,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef USE_SENSORS
|
#ifdef USE_SENSORS
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 3
|
||||||
|
|
||||||
#undef USE_ADC_VCC // Add Analog input on selected devices
|
#undef USE_ADC_VCC // Add Analog input on selected devices
|
||||||
#define USE_DS18x20 // For more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
|
#define USE_DS18x20 // For more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code)
|
||||||
//#define USE_DS18x20_LEGACY // For more than one DS18x20 sensors with dynamic scan using library OneWire (+1k5 code)
|
//#define USE_DS18x20_LEGACY // For more than one DS18x20 sensors with dynamic scan using library OneWire (+1k5 code)
|
||||||
@ -134,6 +137,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef USE_CLASSIC
|
#ifdef USE_CLASSIC
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 2
|
||||||
|
|
||||||
#ifndef USE_WPS
|
#ifndef USE_WPS
|
||||||
#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
|
#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
|
||||||
#endif
|
#endif
|
||||||
@ -183,6 +189,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef USE_KNX_NO_EMULATION
|
#ifdef USE_KNX_NO_EMULATION
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 4
|
||||||
|
|
||||||
#ifndef USE_KNX
|
#ifndef USE_KNX
|
||||||
#define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem)
|
#define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem)
|
||||||
#endif
|
#endif
|
||||||
@ -196,6 +205,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef USE_DISPLAYS
|
#ifdef USE_DISPLAYS
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 6
|
||||||
|
|
||||||
#undef USE_ENERGY_SENSOR // Disable energy sensors (-14k code)
|
#undef USE_ENERGY_SENSOR // Disable energy sensors (-14k code)
|
||||||
#undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem)
|
#undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem)
|
||||||
|
|
||||||
@ -229,6 +241,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef USE_BASIC
|
#ifdef USE_BASIC
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 5
|
||||||
|
|
||||||
#undef APP_SLEEP
|
#undef APP_SLEEP
|
||||||
#define APP_SLEEP 1 // Default to sleep = 1 for USE_BASIC
|
#define APP_SLEEP 1 // Default to sleep = 1 for USE_BASIC
|
||||||
|
|
||||||
@ -288,6 +303,9 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||||||
|
|
||||||
#ifdef BE_MINIMAL
|
#ifdef BE_MINIMAL
|
||||||
|
|
||||||
|
#undef CODE_IMAGE
|
||||||
|
#define CODE_IMAGE 1
|
||||||
|
|
||||||
#undef USE_ENERGY_SENSOR // Disable energy sensors
|
#undef USE_ENERGY_SENSOR // Disable energy sensors
|
||||||
#undef USE_ARDUINO_OTA // Disable support for Arduino OTA
|
#undef USE_ARDUINO_OTA // Disable support for Arduino OTA
|
||||||
#undef USE_WPS // Disable support for WPS as initial wifi configuration tool
|
#undef USE_WPS // Disable support for WPS as initial wifi configuration tool
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#ifndef _SONOFF_VERSION_H_
|
#ifndef _SONOFF_VERSION_H_
|
||||||
#define _SONOFF_VERSION_H_
|
#define _SONOFF_VERSION_H_
|
||||||
|
|
||||||
#define VERSION 0x06030004
|
#define VERSION 0x06030005
|
||||||
|
|
||||||
#define D_PROGRAMNAME "Sonoff-Tasmota"
|
#define D_PROGRAMNAME "Sonoff-Tasmota"
|
||||||
#define D_AUTHOR "Theo Arends"
|
#define D_AUTHOR "Theo Arends"
|
||||||
|
@ -1244,7 +1244,7 @@ void HandleInformation()
|
|||||||
// }2 = </th><td>
|
// }2 = </th><td>
|
||||||
String func = FPSTR(HTTP_SCRIPT_INFO_BEGIN);
|
String func = FPSTR(HTTP_SCRIPT_INFO_BEGIN);
|
||||||
func += F("<table style='width:100%'><tr><th>");
|
func += F("<table style='width:100%'><tr><th>");
|
||||||
func += F(D_PROGRAM_VERSION "}2"); func += my_version;
|
func += F(D_PROGRAM_VERSION "}2"); func += my_version; func += my_image;
|
||||||
func += F("}1" D_BUILD_DATE_AND_TIME "}2"); func += GetBuildDateAndTime();
|
func += F("}1" D_BUILD_DATE_AND_TIME "}2"); func += GetBuildDateAndTime();
|
||||||
func += F("}1" D_CORE_AND_SDK_VERSION "}2" ARDUINO_ESP8266_RELEASE "/"); func += String(ESP.getSdkVersion());
|
func += F("}1" D_CORE_AND_SDK_VERSION "}2" ARDUINO_ESP8266_RELEASE "/"); func += String(ESP.getSdkVersion());
|
||||||
func += F("}1" D_UPTIME "}2"); func += GetUptime();
|
func += F("}1" D_UPTIME "}2"); func += GetUptime();
|
||||||
|
@ -404,8 +404,8 @@ void MqttConnected()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mqtt_initial_connection_state) {
|
if (mqtt_initial_connection_state) {
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_MODULE "\":\"%s\",\"" D_JSON_VERSION "\":\"%s\",\"" D_JSON_FALLBACKTOPIC "\":\"%s\",\"" D_CMND_GROUPTOPIC "\":\"%s\"}"),
|
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_MODULE "\":\"%s\",\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_FALLBACKTOPIC "\":\"%s\",\"" D_CMND_GROUPTOPIC "\":\"%s\"}"),
|
||||||
my_module.name, my_version, mqtt_client, Settings.mqtt_grptopic);
|
my_module.name, my_version, my_image, mqtt_client, Settings.mqtt_grptopic);
|
||||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "1"));
|
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "1"));
|
||||||
#ifdef USE_WEBSERVER
|
#ifdef USE_WEBSERVER
|
||||||
if (Settings.webserver) {
|
if (Settings.webserver) {
|
||||||
|
@ -629,7 +629,7 @@ void DisplayLogBufferInit()
|
|||||||
DisplayReAllocLogBuffer();
|
DisplayReAllocLogBuffer();
|
||||||
|
|
||||||
char buffer[40];
|
char buffer[40];
|
||||||
snprintf_P(buffer, sizeof(buffer), PSTR(D_VERSION " %s"), my_version);
|
snprintf_P(buffer, sizeof(buffer), PSTR(D_VERSION " %s%s"), my_version, my_image);
|
||||||
DisplayLogBufferAdd(buffer);
|
DisplayLogBufferAdd(buffer);
|
||||||
snprintf_P(buffer, sizeof(buffer), PSTR("Display mode %d"), Settings.display_mode);
|
snprintf_P(buffer, sizeof(buffer), PSTR("Display mode %d"), Settings.display_mode);
|
||||||
DisplayLogBufferAdd(buffer);
|
DisplayLogBufferAdd(buffer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user