mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
Merge branch 'development' into release
This commit is contained in:
commit
aa6f3b8f88
@ -20,7 +20,7 @@ In addition to the [release webpage](https://github.com/arendst/Tasmota/releases
|
|||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
[](https://github.com/arendst/Tasmota)
|
[](https://github.com/arendst/Tasmota)
|
||||||
[](http://thehackbox.org/tasmota/)
|
[](http://thehackbox.org/tasmota/)
|
||||||
[](https://travis-ci.org/arendst/Tasmota)
|
[](https://travis-ci.org/arendst/Tasmota)
|
||||||
|
|
||||||
@ -67,6 +67,7 @@ See [wiki migration path](https://tasmota.github.io/docs/#/Upgrading?id=migratio
|
|||||||
3. Migrate to **Sonoff-Tasmota 5.14**
|
3. Migrate to **Sonoff-Tasmota 5.14**
|
||||||
4. Migrate to **Sonoff-Tasmota 6.x**
|
4. Migrate to **Sonoff-Tasmota 6.x**
|
||||||
5. Migrate to **Tasmota 7.x**
|
5. Migrate to **Tasmota 7.x**
|
||||||
|
6. Migrate to **Tasmota 8.x**
|
||||||
|
|
||||||
## Support Information
|
## Support Information
|
||||||
|
|
||||||
|
@ -51,4 +51,5 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
|
|||||||
- Change Settings text handling allowing variable length text within a total text pool of 699 characters
|
- Change Settings text handling allowing variable length text within a total text pool of 699 characters
|
||||||
- Change Smoother ``Fade`` using 100Hz instead of 20Hz animation (#7179)
|
- Change Smoother ``Fade`` using 100Hz instead of 20Hz animation (#7179)
|
||||||
- Change max number of rule ``Mem``s from 5 to 16 (#4933)
|
- Change max number of rule ``Mem``s from 5 to 16 (#4933)
|
||||||
- Add support for max 150 characters in command parameter strings (#3686, #4754)
|
- Change max number of rule ``Var``s from 5 to 16 (#4933)
|
||||||
|
- Add support for max 150 characters in most command parameter strings (#3686, #4754)
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
- Change Settings text handling allowing variable length text within a total text pool of 699 characters
|
- Change Settings text handling allowing variable length text within a total text pool of 699 characters
|
||||||
- Change Smoother ``Fade`` using 100Hz instead of 20Hz animation (#7179)
|
- Change Smoother ``Fade`` using 100Hz instead of 20Hz animation (#7179)
|
||||||
- Change max number of rule ``Mem``s from 5 to 16 (#4933)
|
- Change max number of rule ``Mem``s from 5 to 16 (#4933)
|
||||||
|
- Change max number of rule ``Var``s from 5 to 16 (#4933)
|
||||||
- Add support for max 150 characters in most command parameter strings (#3686, #4754)
|
- Add support for max 150 characters in most command parameter strings (#3686, #4754)
|
||||||
|
|
||||||
### 7.2.0 20191221
|
### 7.2.0 20191221
|
||||||
|
@ -229,6 +229,7 @@ typedef struct {
|
|||||||
uint8_t dpid = 0;
|
uint8_t dpid = 0;
|
||||||
} TuyaFnidDpidMap;
|
} TuyaFnidDpidMap;
|
||||||
|
|
||||||
|
const uint32_t settings_text_size = 699; // Settings.text_pool[size] = Settings.display_model (2D2) - Settings.text_pool (017)
|
||||||
const uint8_t MAX_TUYA_FUNCTIONS = 16;
|
const uint8_t MAX_TUYA_FUNCTIONS = 16;
|
||||||
|
|
||||||
struct SYSCFG {
|
struct SYSCFG {
|
||||||
@ -242,21 +243,19 @@ struct SYSCFG {
|
|||||||
int16_t save_data; // 014
|
int16_t save_data; // 014
|
||||||
int8_t timezone; // 016
|
int8_t timezone; // 016
|
||||||
|
|
||||||
// Start of single char array Settings.text
|
// Start of char array storing all parameter strings
|
||||||
|
|
||||||
char ota_url[101]; // 017
|
char text_pool[101]; // 017 - was ota_url[101] - size is settings_text_size
|
||||||
char mqtt_prefix[3][11]; // 07C
|
|
||||||
|
|
||||||
uint8_t ex_baudrate; // 09D - Free since 6.6.0.9
|
char ex_mqtt_prefix[3][11]; // 07C
|
||||||
|
uint8_t ex_baudrate; // 09D
|
||||||
uint8_t ex_seriallog_level; // 09E
|
uint8_t ex_seriallog_level; // 09E
|
||||||
uint8_t ex_sta_config; // 09F
|
uint8_t ex_sta_config; // 09F
|
||||||
uint8_t ex_sta_active; // 0A0
|
uint8_t ex_sta_active; // 0A0
|
||||||
|
char ex_sta_ssid[2][33]; // 0A1
|
||||||
char sta_ssid[2][33]; // 0A1 - Keep together with sta_pwd as being copied as one chunck with reset 5
|
char ex_sta_pwd[2][65]; // 0E3
|
||||||
char sta_pwd[2][65]; // 0E3 - Keep together with sta_ssid as being copied as one chunck with reset 5
|
char ex_hostname[33]; // 165
|
||||||
char hostname[33]; // 165
|
char ex_syslog_host[33]; // 186
|
||||||
char syslog_host[33]; // 186
|
|
||||||
|
|
||||||
uint8_t ex_rule_stop; // 1A7
|
uint8_t ex_rule_stop; // 1A7
|
||||||
uint16_t ex_syslog_port; // 1A8
|
uint16_t ex_syslog_port; // 1A8
|
||||||
uint8_t ex_syslog_level; // 1AA
|
uint8_t ex_syslog_level; // 1AA
|
||||||
@ -264,28 +263,23 @@ struct SYSCFG {
|
|||||||
uint8_t ex_weblog_level; // 1AC
|
uint8_t ex_weblog_level; // 1AC
|
||||||
uint8_t ex_mqtt_fingerprint[2][20]; // 1AD
|
uint8_t ex_mqtt_fingerprint[2][20]; // 1AD
|
||||||
uint8_t ex_adc_param_type; // 1D5
|
uint8_t ex_adc_param_type; // 1D5
|
||||||
|
|
||||||
uint8_t ex_free_1d6[10]; // 1D6
|
uint8_t ex_free_1d6[10]; // 1D6
|
||||||
|
|
||||||
SysBitfield4 ex_flag4; // 1E0
|
SysBitfield4 ex_flag4; // 1E0
|
||||||
uint8_t ex_serial_config; // 1E4
|
uint8_t ex_serial_config; // 1E4
|
||||||
uint8_t ex_wifi_output_power; // 1E5
|
uint8_t ex_wifi_output_power; // 1E5
|
||||||
uint8_t ex_shutter_accuracy; // 1E6
|
uint8_t ex_shutter_accuracy; // 1E6
|
||||||
uint8_t ex_mqttlog_level; // 1E7
|
uint8_t ex_mqttlog_level; // 1E7
|
||||||
uint8_t ex_sps30_inuse_hours; // 1E8
|
uint8_t ex_sps30_inuse_hours; // 1E8
|
||||||
|
char ex_mqtt_host[33]; // 1E9
|
||||||
|
uint16_t ex_mqtt_port; // 20A
|
||||||
|
char ex_mqtt_client[33]; // 20C
|
||||||
|
char ex_mqtt_user[33]; // 22D
|
||||||
|
char ex_mqtt_pwd[33]; // 24E
|
||||||
|
char ex_mqtt_topic[33]; // 26F
|
||||||
|
char ex_button_topic[33]; // 290
|
||||||
|
char ex_mqtt_grptopic[33]; // 2B1
|
||||||
|
|
||||||
char mqtt_host[33]; // 1E9 - Keep together with below as being copied as one chunck with reset 6
|
// End of single char array of 698 chars max
|
||||||
|
|
||||||
uint16_t ex_mqtt_port; // 20A - Keep together
|
|
||||||
|
|
||||||
char mqtt_client[33]; // 20C - Keep together
|
|
||||||
char mqtt_user[33]; // 22D - Keep together
|
|
||||||
char mqtt_pwd[33]; // 24E - Keep together
|
|
||||||
char mqtt_topic[33]; // 26F - Keep together with above items as being copied as one chunck with reset 6
|
|
||||||
char button_topic[33]; // 290
|
|
||||||
char mqtt_grptopic[33]; // 2B1
|
|
||||||
|
|
||||||
// Optional end of single char array of 698 chars max (phase 5)
|
|
||||||
|
|
||||||
uint8_t display_model; // 2D2
|
uint8_t display_model; // 2D2
|
||||||
uint8_t display_mode; // 2D3
|
uint8_t display_mode; // 2D3
|
||||||
@ -306,8 +300,8 @@ struct SYSCFG {
|
|||||||
uint8_t param[PARAM8_SIZE]; // 2FC SetOption32 .. SetOption49
|
uint8_t param[PARAM8_SIZE]; // 2FC SetOption32 .. SetOption49
|
||||||
int16_t toffset[2]; // 30E
|
int16_t toffset[2]; // 30E
|
||||||
uint8_t display_font; // 312
|
uint8_t display_font; // 312
|
||||||
char state_text[4][11]; // 313
|
|
||||||
|
|
||||||
|
char ex_state_text[4][11]; // 313
|
||||||
uint8_t ex_energy_power_delta; // 33F - Free since 6.6.0.20
|
uint8_t ex_energy_power_delta; // 33F - Free since 6.6.0.20
|
||||||
|
|
||||||
uint16_t domoticz_update_timer; // 340
|
uint16_t domoticz_update_timer; // 340
|
||||||
@ -342,8 +336,10 @@ struct SYSCFG {
|
|||||||
uint16_t light_rotation; // 39E
|
uint16_t light_rotation; // 39E
|
||||||
SysBitfield3 flag3; // 3A0
|
SysBitfield3 flag3; // 3A0
|
||||||
uint8_t switchmode[MAX_SWITCHES]; // 3A4 (6.0.0b - moved from 0x4CA)
|
uint8_t switchmode[MAX_SWITCHES]; // 3A4 (6.0.0b - moved from 0x4CA)
|
||||||
char friendlyname[MAX_FRIENDLYNAMES][33]; // 3AC
|
|
||||||
char switch_topic[33]; // 430
|
char ex_friendlyname[MAX_FRIENDLYNAMES][33]; // 3AC
|
||||||
|
char ex_switch_topic[33]; // 430
|
||||||
|
|
||||||
char serial_delimiter; // 451
|
char serial_delimiter; // 451
|
||||||
uint8_t seriallog_level; // 452
|
uint8_t seriallog_level; // 452
|
||||||
uint8_t sleep; // 453
|
uint8_t sleep; // 453
|
||||||
@ -367,15 +363,21 @@ struct SYSCFG {
|
|||||||
uint8_t knx_GA_registered; // 4A5 Number of Group Address to read
|
uint8_t knx_GA_registered; // 4A5 Number of Group Address to read
|
||||||
uint16_t light_wakeup; // 4A6
|
uint16_t light_wakeup; // 4A6
|
||||||
uint8_t knx_CB_registered; // 4A8 Number of Group Address to write
|
uint8_t knx_CB_registered; // 4A8 Number of Group Address to write
|
||||||
char web_password[33]; // 4A9
|
|
||||||
|
char ex_web_password[33]; // 4A9
|
||||||
|
|
||||||
uint8_t interlock[MAX_INTERLOCKS]; // 4CA
|
uint8_t interlock[MAX_INTERLOCKS]; // 4CA
|
||||||
char ntp_server[3][33]; // 4CE
|
|
||||||
|
char ex_ntp_server[3][33]; // 4CE
|
||||||
|
|
||||||
uint8_t ina219_mode; // 531
|
uint8_t ina219_mode; // 531
|
||||||
uint16_t pulse_timer[MAX_PULSETIMERS]; // 532
|
uint16_t pulse_timer[MAX_PULSETIMERS]; // 532
|
||||||
uint16_t button_debounce; // 542
|
uint16_t button_debounce; // 542
|
||||||
uint32_t ip_address[4]; // 544
|
uint32_t ip_address[4]; // 544
|
||||||
unsigned long energy_kWhtotal; // 554
|
unsigned long energy_kWhtotal; // 554
|
||||||
char mqtt_fulltopic[100]; // 558
|
|
||||||
|
char ex_mqtt_fulltopic[100]; // 558
|
||||||
|
|
||||||
SysBitfield2 flag2; // 5BC
|
SysBitfield2 flag2; // 5BC
|
||||||
unsigned long pulse_counter[MAX_COUNTERS]; // 5C0
|
unsigned long pulse_counter[MAX_COUNTERS]; // 5C0
|
||||||
uint16_t pulse_counter_type; // 5D0
|
uint16_t pulse_counter_type; // 5D0
|
||||||
@ -419,7 +421,7 @@ struct SYSCFG {
|
|||||||
unsigned long weight_calibration; // 7C4
|
unsigned long weight_calibration; // 7C4
|
||||||
unsigned long energy_frequency_calibration; // 7C8 also used by HX711 to save last weight
|
unsigned long energy_frequency_calibration; // 7C8 also used by HX711 to save last weight
|
||||||
uint16_t web_refresh; // 7CC
|
uint16_t web_refresh; // 7CC
|
||||||
char mems[5][10]; // 7CE - Used by scripter as script_pram
|
char script_pram[5][10]; // 7CE
|
||||||
|
|
||||||
char rules[MAX_RULE_SETS][MAX_RULE_SIZE]; // 800 uses 512 bytes in v5.12.0m, 3 x 512 bytes in v5.14.0b
|
char rules[MAX_RULE_SETS][MAX_RULE_SIZE]; // 800 uses 512 bytes in v5.12.0m, 3 x 512 bytes in v5.14.0b
|
||||||
|
|
||||||
@ -443,7 +445,9 @@ struct SYSCFG {
|
|||||||
int8_t temp_comp; // E9E
|
int8_t temp_comp; // E9E
|
||||||
uint8_t weight_change; // E9F
|
uint8_t weight_change; // E9F
|
||||||
uint8_t web_color2[2][3]; // EA0 - Needs to be on integer / 3 distance from web_color
|
uint8_t web_color2[2][3]; // EA0 - Needs to be on integer / 3 distance from web_color
|
||||||
char cors_domain[33]; // EA6
|
|
||||||
|
char ex_cors_domain[33]; // EA6
|
||||||
|
|
||||||
uint8_t sta_config; // EC7
|
uint8_t sta_config; // EC7
|
||||||
uint8_t sta_active; // EC8
|
uint8_t sta_active; // EC8
|
||||||
uint8_t rule_stop; // EC9
|
uint8_t rule_stop; // EC9
|
||||||
|
@ -488,15 +488,13 @@ void UpdateQuickPowerCycle(bool update)
|
|||||||
* Config Settings.text char array support
|
* Config Settings.text char array support
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
const uint32_t settings_text_size = 699; // Settings.display_model (2D2) - Settings.ota_url (017)
|
|
||||||
|
|
||||||
uint32_t GetSettingsTextLen(void)
|
uint32_t GetSettingsTextLen(void)
|
||||||
{
|
{
|
||||||
char* position = Settings.ota_url;
|
char* position = Settings.text_pool;
|
||||||
for (uint32_t size = 0; size < SET_MAX; size++) {
|
for (uint32_t size = 0; size < SET_MAX; size++) {
|
||||||
while (*position++ != '\0') { }
|
while (*position++ != '\0') { }
|
||||||
}
|
}
|
||||||
return position - Settings.ota_url;
|
return position - Settings.text_pool;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SettingsUpdateText(uint32_t index, const char* replace_me)
|
bool SettingsUpdateText(uint32_t index, const char* replace_me)
|
||||||
@ -512,18 +510,18 @@ bool SettingsUpdateText(uint32_t index, const char* replace_me)
|
|||||||
|
|
||||||
uint32_t start_pos = 0;
|
uint32_t start_pos = 0;
|
||||||
uint32_t end_pos = 0;
|
uint32_t end_pos = 0;
|
||||||
char* position = Settings.ota_url;
|
char* position = Settings.text_pool;
|
||||||
for (uint32_t size = 0; size < SET_MAX; size++) {
|
for (uint32_t size = 0; size < SET_MAX; size++) {
|
||||||
while (*position++ != '\0') { }
|
while (*position++ != '\0') { }
|
||||||
if (1 == index) {
|
if (1 == index) {
|
||||||
start_pos = position - Settings.ota_url;
|
start_pos = position - Settings.text_pool;
|
||||||
}
|
}
|
||||||
else if (0 == index) {
|
else if (0 == index) {
|
||||||
end_pos = position - Settings.ota_url -1;
|
end_pos = position - Settings.text_pool -1;
|
||||||
}
|
}
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
uint32_t char_len = position - Settings.ota_url;
|
uint32_t char_len = position - Settings.text_pool;
|
||||||
|
|
||||||
uint32_t current_len = end_pos - start_pos;
|
uint32_t current_len = end_pos - start_pos;
|
||||||
int diff = replace_len - current_len;
|
int diff = replace_len - current_len;
|
||||||
@ -539,12 +537,12 @@ bool SettingsUpdateText(uint32_t index, const char* replace_me)
|
|||||||
|
|
||||||
if (diff != 0) {
|
if (diff != 0) {
|
||||||
// Shift Settings.text up or down
|
// Shift Settings.text up or down
|
||||||
memmove_P(Settings.ota_url + start_pos + replace_len, Settings.ota_url + end_pos, char_len - end_pos);
|
memmove_P(Settings.text_pool + start_pos + replace_len, Settings.text_pool + end_pos, char_len - end_pos);
|
||||||
}
|
}
|
||||||
// Replace text
|
// Replace text
|
||||||
memmove_P(Settings.ota_url + start_pos, replace, replace_len);
|
memmove_P(Settings.text_pool + start_pos, replace, replace_len);
|
||||||
// Fill for future use
|
// Fill for future use
|
||||||
memset(Settings.ota_url + char_len + diff, 0x00, settings_text_size - char_len - diff);
|
memset(Settings.text_pool + char_len + diff, 0x00, settings_text_size - char_len - diff);
|
||||||
|
|
||||||
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_CONFIG "CR %d/%d"), GetSettingsTextLen(), settings_text_size);
|
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_CONFIG "CR %d/%d"), GetSettingsTextLen(), settings_text_size);
|
||||||
|
|
||||||
@ -557,7 +555,7 @@ char* SettingsText(uint32_t index)
|
|||||||
return nullptr; // Setting not supported - internal error
|
return nullptr; // Setting not supported - internal error
|
||||||
}
|
}
|
||||||
|
|
||||||
char* position = Settings.ota_url;
|
char* position = Settings.text_pool;
|
||||||
for (;index > 0; index--) {
|
for (;index > 0; index--) {
|
||||||
while (*position++ != '\0') { }
|
while (*position++ != '\0') { }
|
||||||
}
|
}
|
||||||
@ -1301,9 +1299,9 @@ void SettingsDelta(void)
|
|||||||
}
|
}
|
||||||
if (Settings.version < 0x07010204) {
|
if (Settings.version < 0x07010204) {
|
||||||
if (Settings.flag3.ex_cors_enabled == 1) {
|
if (Settings.flag3.ex_cors_enabled == 1) {
|
||||||
strlcpy(Settings.cors_domain, CORS_ENABLED_ALL, sizeof(Settings.cors_domain));
|
strlcpy(Settings.ex_cors_domain, CORS_ENABLED_ALL, sizeof(Settings.ex_cors_domain));
|
||||||
} else {
|
} else {
|
||||||
Settings.cors_domain[0] = 0;
|
Settings.ex_cors_domain[0] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Settings.version < 0x07010205) {
|
if (Settings.version < 0x07010205) {
|
||||||
@ -1319,25 +1317,25 @@ void SettingsDelta(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.version < 0x08000000) {
|
if (Settings.version < 0x08000000) {
|
||||||
char temp[strlen(Settings.ota_url) +1]; strncpy(temp, Settings.ota_url, sizeof(temp));
|
char temp[strlen(Settings.text_pool) +1]; strncpy(temp, Settings.text_pool, sizeof(temp)); // Was ota_url
|
||||||
char temp21[strlen(Settings.mqtt_prefix[0]) +1]; strncpy(temp21, Settings.mqtt_prefix[0], sizeof(temp21));
|
char temp21[strlen(Settings.ex_mqtt_prefix[0]) +1]; strncpy(temp21, Settings.ex_mqtt_prefix[0], sizeof(temp21));
|
||||||
char temp22[strlen(Settings.mqtt_prefix[1]) +1]; strncpy(temp22, Settings.mqtt_prefix[1], sizeof(temp22));
|
char temp22[strlen(Settings.ex_mqtt_prefix[1]) +1]; strncpy(temp22, Settings.ex_mqtt_prefix[1], sizeof(temp22));
|
||||||
char temp23[strlen(Settings.mqtt_prefix[2]) +1]; strncpy(temp23, Settings.mqtt_prefix[2], sizeof(temp23));
|
char temp23[strlen(Settings.ex_mqtt_prefix[2]) +1]; strncpy(temp23, Settings.ex_mqtt_prefix[2], sizeof(temp23));
|
||||||
char temp31[strlen(Settings.sta_ssid[0]) +1]; strncpy(temp31, Settings.sta_ssid[0], sizeof(temp31));
|
char temp31[strlen(Settings.ex_sta_ssid[0]) +1]; strncpy(temp31, Settings.ex_sta_ssid[0], sizeof(temp31));
|
||||||
char temp32[strlen(Settings.sta_ssid[1]) +1]; strncpy(temp32, Settings.sta_ssid[1], sizeof(temp32));
|
char temp32[strlen(Settings.ex_sta_ssid[1]) +1]; strncpy(temp32, Settings.ex_sta_ssid[1], sizeof(temp32));
|
||||||
char temp41[strlen(Settings.sta_pwd[0]) +1]; strncpy(temp41, Settings.sta_pwd[0], sizeof(temp41));
|
char temp41[strlen(Settings.ex_sta_pwd[0]) +1]; strncpy(temp41, Settings.ex_sta_pwd[0], sizeof(temp41));
|
||||||
char temp42[strlen(Settings.sta_pwd[1]) +1]; strncpy(temp42, Settings.sta_pwd[1], sizeof(temp42));
|
char temp42[strlen(Settings.ex_sta_pwd[1]) +1]; strncpy(temp42, Settings.ex_sta_pwd[1], sizeof(temp42));
|
||||||
char temp5[strlen(Settings.hostname) +1]; strncpy(temp5, Settings.hostname, sizeof(temp5));
|
char temp5[strlen(Settings.ex_hostname) +1]; strncpy(temp5, Settings.ex_hostname, sizeof(temp5));
|
||||||
char temp6[strlen(Settings.syslog_host) +1]; strncpy(temp6, Settings.syslog_host, sizeof(temp6));
|
char temp6[strlen(Settings.ex_syslog_host) +1]; strncpy(temp6, Settings.ex_syslog_host, sizeof(temp6));
|
||||||
char temp7[strlen(Settings.mqtt_host) +1]; strncpy(temp7, Settings.mqtt_host, sizeof(temp7));
|
char temp7[strlen(Settings.ex_mqtt_host) +1]; strncpy(temp7, Settings.ex_mqtt_host, sizeof(temp7));
|
||||||
char temp8[strlen(Settings.mqtt_client) +1]; strncpy(temp8, Settings.mqtt_client, sizeof(temp8));
|
char temp8[strlen(Settings.ex_mqtt_client) +1]; strncpy(temp8, Settings.ex_mqtt_client, sizeof(temp8));
|
||||||
char temp9[strlen(Settings.mqtt_user) +1]; strncpy(temp9, Settings.mqtt_user, sizeof(temp9));
|
char temp9[strlen(Settings.ex_mqtt_user) +1]; strncpy(temp9, Settings.ex_mqtt_user, sizeof(temp9));
|
||||||
char temp10[strlen(Settings.mqtt_pwd) +1]; strncpy(temp10, Settings.mqtt_pwd, sizeof(temp10));
|
char temp10[strlen(Settings.ex_mqtt_pwd) +1]; strncpy(temp10, Settings.ex_mqtt_pwd, sizeof(temp10));
|
||||||
char temp11[strlen(Settings.mqtt_topic) +1]; strncpy(temp11, Settings.mqtt_topic, sizeof(temp11));
|
char temp11[strlen(Settings.ex_mqtt_topic) +1]; strncpy(temp11, Settings.ex_mqtt_topic, sizeof(temp11));
|
||||||
char temp12[strlen(Settings.button_topic) +1]; strncpy(temp12, Settings.button_topic, sizeof(temp12));
|
char temp12[strlen(Settings.ex_button_topic) +1]; strncpy(temp12, Settings.ex_button_topic, sizeof(temp12));
|
||||||
char temp13[strlen(Settings.mqtt_grptopic) +1]; strncpy(temp13, Settings.mqtt_grptopic, sizeof(temp13));
|
char temp13[strlen(Settings.ex_mqtt_grptopic) +1]; strncpy(temp13, Settings.ex_mqtt_grptopic, sizeof(temp13));
|
||||||
|
|
||||||
memset(Settings.ota_url, 0x00, settings_text_size);
|
memset(Settings.text_pool, 0x00, settings_text_size);
|
||||||
SettingsUpdateText(SET_OTAURL, temp);
|
SettingsUpdateText(SET_OTAURL, temp);
|
||||||
SettingsUpdateText(SET_MQTTPREFIX1, temp21);
|
SettingsUpdateText(SET_MQTTPREFIX1, temp21);
|
||||||
SettingsUpdateText(SET_MQTTPREFIX2, temp22);
|
SettingsUpdateText(SET_MQTTPREFIX2, temp22);
|
||||||
@ -1349,7 +1347,7 @@ void SettingsDelta(void)
|
|||||||
SettingsUpdateText(SET_HOSTNAME, temp5);
|
SettingsUpdateText(SET_HOSTNAME, temp5);
|
||||||
SettingsUpdateText(SET_SYSLOG_HOST, temp6);
|
SettingsUpdateText(SET_SYSLOG_HOST, temp6);
|
||||||
#if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT)
|
#if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT)
|
||||||
if (!strlen(Settings.mqtt_user)) {
|
if (!strlen(Settings.ex_mqtt_user)) {
|
||||||
SettingsUpdateText(SET_MQTT_HOST, temp7);
|
SettingsUpdateText(SET_MQTT_HOST, temp7);
|
||||||
SettingsUpdateText(SET_MQTT_USER, temp9);
|
SettingsUpdateText(SET_MQTT_USER, temp9);
|
||||||
} else {
|
} else {
|
||||||
@ -1368,26 +1366,26 @@ void SettingsDelta(void)
|
|||||||
SettingsUpdateText(SET_MQTT_BUTTON_TOPIC, temp12);
|
SettingsUpdateText(SET_MQTT_BUTTON_TOPIC, temp12);
|
||||||
SettingsUpdateText(SET_MQTT_GRP_TOPIC, temp13);
|
SettingsUpdateText(SET_MQTT_GRP_TOPIC, temp13);
|
||||||
|
|
||||||
SettingsUpdateText(SET_WEBPWD, Settings.web_password);
|
SettingsUpdateText(SET_WEBPWD, Settings.ex_web_password);
|
||||||
SettingsUpdateText(SET_CORS, Settings.cors_domain);
|
SettingsUpdateText(SET_CORS, Settings.ex_cors_domain);
|
||||||
SettingsUpdateText(SET_MQTT_FULLTOPIC, Settings.mqtt_fulltopic);
|
SettingsUpdateText(SET_MQTT_FULLTOPIC, Settings.ex_mqtt_fulltopic);
|
||||||
SettingsUpdateText(SET_MQTT_SWITCH_TOPIC, Settings.switch_topic);
|
SettingsUpdateText(SET_MQTT_SWITCH_TOPIC, Settings.ex_switch_topic);
|
||||||
SettingsUpdateText(SET_STATE_TXT1, Settings.state_text[0]);
|
SettingsUpdateText(SET_STATE_TXT1, Settings.ex_state_text[0]);
|
||||||
SettingsUpdateText(SET_STATE_TXT2, Settings.state_text[1]);
|
SettingsUpdateText(SET_STATE_TXT2, Settings.ex_state_text[1]);
|
||||||
SettingsUpdateText(SET_STATE_TXT3, Settings.state_text[2]);
|
SettingsUpdateText(SET_STATE_TXT3, Settings.ex_state_text[2]);
|
||||||
SettingsUpdateText(SET_STATE_TXT4, Settings.state_text[3]);
|
SettingsUpdateText(SET_STATE_TXT4, Settings.ex_state_text[3]);
|
||||||
SettingsUpdateText(SET_NTPSERVER1, Settings.ntp_server[0]);
|
SettingsUpdateText(SET_NTPSERVER1, Settings.ex_ntp_server[0]);
|
||||||
SettingsUpdateText(SET_NTPSERVER2, Settings.ntp_server[1]);
|
SettingsUpdateText(SET_NTPSERVER2, Settings.ex_ntp_server[1]);
|
||||||
SettingsUpdateText(SET_NTPSERVER3, Settings.ntp_server[2]);
|
SettingsUpdateText(SET_NTPSERVER3, Settings.ex_ntp_server[2]);
|
||||||
SettingsUpdateText(SET_MEM1, Settings.mems[0]);
|
SettingsUpdateText(SET_MEM1, Settings.script_pram[0]);
|
||||||
SettingsUpdateText(SET_MEM2, Settings.mems[1]);
|
SettingsUpdateText(SET_MEM2, Settings.script_pram[1]);
|
||||||
SettingsUpdateText(SET_MEM3, Settings.mems[2]);
|
SettingsUpdateText(SET_MEM3, Settings.script_pram[2]);
|
||||||
SettingsUpdateText(SET_MEM4, Settings.mems[3]);
|
SettingsUpdateText(SET_MEM4, Settings.script_pram[3]);
|
||||||
SettingsUpdateText(SET_MEM5, Settings.mems[4]);
|
SettingsUpdateText(SET_MEM5, Settings.script_pram[4]);
|
||||||
SettingsUpdateText(SET_FRIENDLYNAME1, Settings.friendlyname[0]);
|
SettingsUpdateText(SET_FRIENDLYNAME1, Settings.ex_friendlyname[0]);
|
||||||
SettingsUpdateText(SET_FRIENDLYNAME2, Settings.friendlyname[1]);
|
SettingsUpdateText(SET_FRIENDLYNAME2, Settings.ex_friendlyname[1]);
|
||||||
SettingsUpdateText(SET_FRIENDLYNAME3, Settings.friendlyname[2]);
|
SettingsUpdateText(SET_FRIENDLYNAME3, Settings.ex_friendlyname[2]);
|
||||||
SettingsUpdateText(SET_FRIENDLYNAME4, Settings.friendlyname[3]);
|
SettingsUpdateText(SET_FRIENDLYNAME4, Settings.ex_friendlyname[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings.version = VERSION;
|
Settings.version = VERSION;
|
||||||
|
@ -143,7 +143,7 @@ const uint32_t LOOP_SLEEP_DELAY = 50; // Lowest number of milliseconds to
|
|||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
#define MAX_RULE_TIMERS 8 // Max number of rule timers (4 bytes / timer)
|
#define MAX_RULE_TIMERS 8 // Max number of rule timers (4 bytes / timer)
|
||||||
#define MAX_RULE_VARS 5 // Max number of rule variables (10 bytes / variable)
|
#define MAX_RULE_VARS 16 // Max number of rule variables (33 bytes / variable)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Removed from esp8266 core since 20171105
|
// Removed from esp8266 core since 20171105
|
||||||
|
@ -4754,7 +4754,7 @@ bool Xdrv10(uint8_t function)
|
|||||||
glob_script_mem.script_ram=Settings.rules[0];
|
glob_script_mem.script_ram=Settings.rules[0];
|
||||||
glob_script_mem.script_size=MAX_SCRIPT_SIZE;
|
glob_script_mem.script_size=MAX_SCRIPT_SIZE;
|
||||||
glob_script_mem.flags=0;
|
glob_script_mem.flags=0;
|
||||||
glob_script_mem.script_pram=(uint8_t*)Settings.mems[0];
|
glob_script_mem.script_pram=(uint8_t*)Settings.script_pram[0];
|
||||||
glob_script_mem.script_pram_size=5*10;
|
glob_script_mem.script_pram_size=5*10;
|
||||||
|
|
||||||
#ifdef USE_BUTTON_EVENT
|
#ifdef USE_BUTTON_EVENT
|
||||||
|
@ -365,7 +365,6 @@ void HueLightStatus1(uint8_t device, String *response)
|
|||||||
// Any device whose friendly name start with "$" is considered hidden
|
// Any device whose friendly name start with "$" is considered hidden
|
||||||
bool HueActive(uint8_t device) {
|
bool HueActive(uint8_t device) {
|
||||||
if (device > MAX_FRIENDLYNAMES) { device = MAX_FRIENDLYNAMES; }
|
if (device > MAX_FRIENDLYNAMES) { device = MAX_FRIENDLYNAMES; }
|
||||||
// return '$' != Settings.friendlyname[device-1][0];
|
|
||||||
return '$' != *SettingsText(SET_FRIENDLYNAME1 +device -1);
|
return '$' != *SettingsText(SET_FRIENDLYNAME1 +device -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user