Remove migration support from before 7.0

- Remove support for direct upgrade from Tasmota versions before 7.0
- Remove auto config update for all Friendlynames and Switchtopic from Tasmota versions before 8.0
This commit is contained in:
Theo Arends 2020-10-05 18:12:32 +02:00
parent f0ab0d274d
commit 0eef729d8f
4 changed files with 6 additions and 234 deletions

View File

@ -61,13 +61,15 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
### Version 9.0.0.1
- Remove auto config update for all Friendlynames and Switchtopic from versions before 8.x
- Remove support for direct upgrade from Tasmota versions before 7.0
- Remove auto config update for all Friendlynames and Switchtopic from Tasmota versions before 8.0
- Change redesigning ESP8266 GPIO internal representation in line with ESP32
- Change new IR Raw compact format (#9444)
- Change MAX31865 driver to support up to 6 thermocouples selected by ``MX31865 CS`` instead of ``SSPI CS`` (#9103)
- Change A4988 optional microstep pin selection
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
- Change ``Status`` command output for disabled status types
- Change IRremoteESP8266 library from v2.7.10 to v2.7.11
- Change NeoPixelBus library from v2.5.0.09 to v2.6.0
- Fix template conversion when GPIO17 is 0
- Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292)

View File

@ -2,13 +2,15 @@
### 9.0.0.1 20201002
- Remove auto config update for all Friendlynames and Switchtopic from versions before 8.x
- Remove support for direct upgrade from Tasmota versions before 7.0
- Remove auto config update for all Friendlynames and Switchtopic from Tasmota versions before 8.0
- Change redesigning ESP8266 GPIO internal representation in line with ESP32
- Change new IR Raw compact format (#9444)
- Change MAX31865 driver to support up to 6 thermocouples selected by ``MX31865 CS`` instead of ``SSPI CS`` (#9103)
- Change A4988 optional microstep pin selection
- Change pulsetime to allow use for all relays with 8 interleaved so ``Pulsetime1`` is valid for Relay1, Relay9, Relay17 etc. (#9279)
- Change ``Status`` command output for disabled status types
- Change IRremoteESP8266 library from v2.7.10 to v2.7.11
- Change NeoPixelBus library from v2.5.0.09 to v2.6.0
- Fix template conversion when GPIO17 is 0
- Fix ledlink blink when no network connected regression from 8.3.1.4 (#9292)

View File

@ -47,7 +47,6 @@
#define CFG_HOLDER 4617 // [Reset 1] Change this value (max 32000) to load SECTION1 configuration parameters to flash
// If following define is disabled it increases configuration corruption detection BUT
// it only allows firmware upgrades starting from version 6.6.0.11
//#define CFG_LEGACY_LOAD // Support for firmware upgrades from version 6.0.0
// -- Project -------------------------------------
#define PROJECT "tasmota" // PROJECT is used as the default topic delimiter

View File

@ -571,50 +571,6 @@ void SettingsSave(uint8_t rotate)
void SettingsLoad(void) {
#ifdef ESP8266
// Load configuration from eeprom or one of 7 slots below if first valid load does not stop_flash_rotate
#ifdef CFG_LEGACY_LOAD
// Active until version 8.4.0.2
struct {
uint16_t cfg_holder; // 000
uint16_t cfg_size; // 002
unsigned long save_flag; // 004
} _SettingsH;
unsigned long save_flag = 0;
settings_location = 0;
uint32_t flash_location = SETTINGS_LOCATION +1;
uint16_t cfg_holder = 0;
for (uint32_t i = 0; i < CFG_ROTATES; i++) { // Read all config pages in search of valid and latest
flash_location--;
ESP.flashRead(flash_location * SPI_FLASH_SEC_SIZE, (uint32*)&Settings, sizeof(Settings));
bool valid = false;
if (Settings.version > 0x06000000) {
bool almost_valid = (Settings.cfg_crc32 == GetSettingsCrc32());
if (Settings.version < 0x0606000B) {
almost_valid = (Settings.cfg_crc == GetSettingsCrc());
}
// Sometimes CRC on pages below FB, overwritten by OTA, is fine but Settings are still invalid. So check cfg_holder too
if (almost_valid && (0 == cfg_holder)) { cfg_holder = Settings.cfg_holder; } // At FB always active cfg_holder
valid = (cfg_holder == Settings.cfg_holder);
} else {
ESP.flashRead((flash_location -1) * SPI_FLASH_SEC_SIZE, (uint32*)&_SettingsH, sizeof(_SettingsH));
valid = (Settings.cfg_holder == _SettingsH.cfg_holder);
}
if (valid) {
if (Settings.save_flag > save_flag) { // Find latest page based on incrementing save_flag
save_flag = Settings.save_flag;
settings_location = flash_location;
if (Settings.flag.stop_flash_rotate && (0 == i)) { // Stop if only eeprom area should be used and it is valid
break;
}
}
}
delay(1);
}
if (settings_location > 0) {
ESP.flashRead(settings_location * SPI_FLASH_SEC_SIZE, (uint32*)&Settings, sizeof(Settings));
AddLog_P2(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG D_LOADED_FROM_FLASH_AT " %X, " D_COUNT " %lu"), settings_location, Settings.save_flag);
}
#else // CFG_RESILIENT
// Activated with version 8.4.0.2 - Fails to read any config before version 6.6.0.11
settings_location = 0;
uint32_t save_flag = 0;
@ -637,7 +593,6 @@ void SettingsLoad(void) {
ESP.flashRead(settings_location * SPI_FLASH_SEC_SIZE, (uint32*)&Settings, sizeof(Settings));
AddLog_P2(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG D_LOADED_FROM_FLASH_AT " %X, " D_COUNT " %lu"), settings_location, Settings.save_flag);
}
#endif // CFG_RESILIENT
#else // ESP32
SettingsRead(&Settings, sizeof(Settings));
AddLog_P2(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG "Loaded, " D_COUNT " %lu"), Settings.save_flag);
@ -1179,192 +1134,6 @@ void SettingsDelta(void)
if (Settings.version != VERSION) { // Fix version dependent changes
#ifdef ESP8266
#ifdef CFG_LEGACY_LOAD
if (Settings.version < 0x06000000) {
Settings.cfg_size = sizeof(Settings);
Settings.cfg_crc = GetSettingsCrc();
}
if (Settings.version < 0x06000002) {
for (uint32_t i = 0; i < MAX_SWITCHES; i++) {
if (i < 4) {
Settings.switchmode[i] = Settings.interlock[i];
} else {
Settings.switchmode[i] = SWITCH_MODE;
}
}
for (uint32_t i = 0; i < ARRAY_SIZE(Settings.my_gp.io); i++) {
if (Settings.ex_my_gp8.io[i] >= GPI8_SWT5) { // Move up from GPI8_SWT5 to GPI8_KEY1
Settings.ex_my_gp8.io[i] += 4;
}
}
}
if (Settings.version < 0x06000003) {
Settings.flag.mqtt_serial_raw = 0; // Was rules_enabled until 5.14.0b
Settings.flag.pressure_conversion = 0; // Was rules_once until 5.14.0b
Settings.flag3.data = 0;
}
if (Settings.version < 0x06010103) {
Settings.flag3.timers_enable = 1;
}
if (Settings.version < 0x0601010C) {
Settings.button_debounce = KEY_DEBOUNCE_TIME;
Settings.switch_debounce = SWITCH_DEBOUNCE_TIME;
}
if (Settings.version < 0x0602010A) {
for (uint32_t j = 0; j < 5; j++) {
Settings.rgbwwTable[j] = 255;
}
}
if (Settings.version < 0x06030002) {
Settings.timezone_minutes = 0;
}
if (Settings.version < 0x06030004) {
memset(&Settings.monitors, 0xFF, 20); // Enable all possible monitors, displays and sensors
}
if (Settings.version < 0x0603000E) {
Settings.flag2.calc_resolution = CALC_RESOLUTION;
}
if (Settings.version < 0x0603000F) {
if (Settings.sleep < 50) {
Settings.sleep = 50; // Default to 50 for sleep, for now
}
}
if (Settings.version < 0x06040105) {
Settings.flag3.mdns_enabled = MDNS_ENABLED;
Settings.param[P_MDNS_DELAYED_START] = 0;
}
if (Settings.version < 0x0604010B) {
Settings.flag.interlock = APP_INTERLOCK_MODE;
Settings.interlock[0] = APP_INTERLOCK_GROUP_1;
Settings.interlock[1] = APP_INTERLOCK_GROUP_2;
Settings.interlock[2] = APP_INTERLOCK_GROUP_3;
Settings.interlock[3] = APP_INTERLOCK_GROUP_4;
}
if (Settings.version < 0x0604010D) {
Settings.param[P_BOOT_LOOP_OFFSET] = BOOT_LOOP_OFFSET; // SetOption36
}
if (Settings.version < 0x06040110) {
ModuleDefault(WEMOS);
}
if (Settings.version < 0x06040113) {
Settings.param[P_RGB_REMAP] = RGB_REMAP_RGBW;
}
if (Settings.version < 0x06050003) {
Settings.novasds_startingoffset = STARTING_OFFSET;
}
if (Settings.version < 0x06050006) {
SettingsDefaultWebColor();
}
if (Settings.version < 0x06050007) {
Settings.ledmask = APP_LEDMASK;
}
if (Settings.version < 0x0605000A) {
Settings.ex_my_adc0 = GPIO_NONE;
}
if (Settings.version < 0x0605000D) {
Settings.param[P_IR_UNKNOW_THRESHOLD] = IR_RCV_MIN_UNKNOWN_SIZE;
}
if (Settings.version < 0x06060001) {
Settings.param[P_OVER_TEMP] = ENERGY_OVERTEMP;
}
if (Settings.version < 0x06060007) {
memset((char*)&Settings +0xE00, 0x00, sizeof(Settings) -0xE00);
}
if (Settings.version < 0x06060008) {
// Move current tuya dimmer range to the new param.
if (Settings.flag3.tuya_serial_mqtt_publish) { // ex Settings.flag3.ex_tuya_dimmer_range_255 SetOption
Settings.param[P_ex_DIMMER_MAX] = 100;
} else {
Settings.param[P_ex_DIMMER_MAX] = 255;
}
}
if (Settings.version < 0x06060009) {
Settings.baudrate = APP_BAUDRATE / 300;
Settings.sbaudrate = SOFT_BAUDRATE / 300;
}
if (Settings.version < 0x0606000A) {
uint8_t tuyaindex = 0;
if (Settings.param[P_BACKLOG_DELAY] > 0) { // ex SetOption34
Settings.tuya_fnid_map[tuyaindex].fnid = 21; // TUYA_MCU_FUNC_DIMMER - Move Tuya Dimmer Id to Map
Settings.tuya_fnid_map[tuyaindex].dpid = Settings.param[P_BACKLOG_DELAY];
tuyaindex++;
} else if (Settings.flag3.fast_power_cycle_disable == 1) { // ex SetOption65
Settings.tuya_fnid_map[tuyaindex].fnid = 11; // TUYA_MCU_FUNC_REL1 - Create FnID for Switches
Settings.tuya_fnid_map[tuyaindex].dpid = 1;
tuyaindex++;
}
if (Settings.param[P_ARP_GRATUITOUS] > 0) { // Was P_ex_TUYA_RELAYS
for (uint8_t i = 0 ; i < Settings.param[P_ARP_GRATUITOUS]; i++) { // ex SetOption41
Settings.tuya_fnid_map[tuyaindex].fnid = 12 + i; // TUYA_MCU_FUNC_REL2 - Create FnID for Switches
Settings.tuya_fnid_map[tuyaindex].dpid = i + 2;
tuyaindex++;
}
}
if (Settings.param[P_ex_TUYA_POWER_ID] > 0) { // ex SetOption46
Settings.tuya_fnid_map[tuyaindex].fnid = 31; // TUYA_MCU_FUNC_POWER - Move Tuya Power Id to Map
Settings.tuya_fnid_map[tuyaindex].dpid = Settings.param[P_ex_TUYA_POWER_ID];
tuyaindex++;
}
if (Settings.param[P_ex_TUYA_VOLTAGE_ID] > 0) { // ex SetOption44
Settings.tuya_fnid_map[tuyaindex].fnid = 33; // TUYA_MCU_FUNC_VOLTAGE - Move Tuya Voltage Id to Map
Settings.tuya_fnid_map[tuyaindex].dpid = Settings.param[P_ex_TUYA_VOLTAGE_ID];
tuyaindex++;
}
if (Settings.param[P_ex_TUYA_CURRENT_ID] > 0) { // ex SetOption45
Settings.tuya_fnid_map[tuyaindex].fnid = 32; // TUYA_MCU_FUNC_CURRENT - Move Tuya Current Id to Map
Settings.tuya_fnid_map[tuyaindex].dpid = Settings.param[P_ex_TUYA_CURRENT_ID];
}
}
#endif // CFG_LEGACY_LOAD
if (Settings.version < 0x0606000C) {
memset((char*)&Settings +0x1D6, 0x00, 16);
}
if (Settings.version < 0x0606000F) {
Settings.ex_shutter_accuracy = 0;
Settings.ex_mqttlog_level = MQTT_LOG_LEVEL;
}
if (Settings.version < 0x06060011) {
Settings.param[P_BACKLOG_DELAY] = MIN_BACKLOG_DELAY;
}
if (Settings.version < 0x06060012) {
Settings.dimmer_hw_min = DEFAULT_DIMMER_MIN;
Settings.dimmer_hw_max = DEFAULT_DIMMER_MAX;
if (TUYA_DIMMER == Settings.module) {
if (Settings.flag3.ex_tuya_dimmer_min_limit) {
Settings.dimmer_hw_min = 25;
} else {
Settings.dimmer_hw_min = 1;
}
Settings.dimmer_hw_max = Settings.param[P_ex_DIMMER_MAX];
}
else if (PS_16_DZ == Settings.module) {
Settings.dimmer_hw_min = 10;
Settings.dimmer_hw_max = Settings.param[P_ex_DIMMER_MAX];
}
}
if (Settings.version < 0x06060014) {
// Clear unused parameters for future use
/*
Settings.flag3.tuya_serial_mqtt_publish = 0; // ex Settings.flag3.ex_tuya_dimmer_range_255
Settings.flag3.ex_tuya_dimmer_min_limit = 0;
Settings.param[P_ex_TUYA_RELAYS] = 0;
Settings.param[P_ex_DIMMER_MAX] = 0;
Settings.param[P_ex_TUYA_VOLTAGE_ID] = 0;
Settings.param[P_ex_TUYA_CURRENT_ID] = 0;
Settings.param[P_ex_TUYA_POWER_ID] = 0;
Settings.ex_baudrate = 0;
Settings.ex_sbaudrate = 0;
*/
Settings.flag3.fast_power_cycle_disable = 0;
Settings.hass_new_discovery = Settings.tuyamcu_topic; // replaced ex2_energy_power_delta on 8.5.0.1
Settings.tuyamcu_topic = 0; // replaced ex_energy_power_delta on 8.5.0.1
}
if (Settings.version < 0x06060015) {
if ((EX_WIFI_SMARTCONFIG == Settings.ex_sta_config) || (EX_WIFI_WPSCONFIG == Settings.ex_sta_config)) {
Settings.ex_sta_config = WIFI_MANAGER;
}
}
if (Settings.version < 0x07000002) {
Settings.web_color2[0][0] = Settings.web_color[0][0];
Settings.web_color2[0][1] = Settings.web_color[0][1];