Skip to content

Commit

Permalink
v4.0.2
Browse files Browse the repository at this point in the history
4.0.2 20170308
* Restore correct seriallog level after Serial logging was disabled
* Add simple dimmer slider to Sonoff Led web page
* Reduced root webpage size by 31%
* Expand Status 2 with Build date/time and core version
* Fix webserver redirection when not in WifiManager mode (#156)
* Add command ButtonRestrict On/Off to restrict access to button hold
and button multi press options above 2 (#161)
* Fix DS18S20 negative temperature readings (#165)
* Fix crlf compilation error due to bad syntax (#144, #167)
  • Loading branch information
arendst committed Mar 8, 2017
1 parent 4797696 commit ac84010
Show file tree
Hide file tree
Showing 14 changed files with 333 additions and 232 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Sonoff-Tasmota
Provide ESP8266 based Sonoff by [iTead Studio](https://www.itead.cc/) and ElectroDragon IoT Relay with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE.

Current version is **4.0.1** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.
Current version is **4.0.2** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.

- This version provides all (Sonoff) modules in one file and starts up with Sonoff Basic.
- Once uploaded select module using the configuration webpage or the commands ```Modules``` and ```Module```.
Expand Down
Binary file modified api/arduino/sonoff-minimal.ino.bin
Binary file not shown.
Binary file modified api/arduino/sonoff.ino.bin
Binary file not shown.
12 changes: 11 additions & 1 deletion sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/* 4.0.1 20170305
/* 4.0.2 20170308
* Restore correct seriallog level after Serial logging was disabled
* Add simple dimmer slider to Sonoff Led web page
* Reduced root webpage size by 31%
* Expand Status 2 with Build date/time and core version
* Fix webserver redirection when not in WifiManager mode (#156)
* Add command ButtonRestrict On/Off to restrict access to button hold and button multi press options above 2 (#161)
* Fix DS18S20 negative temperature readings (#165)
* Fix crlf compilation error due to bad syntax (#144, #167)
*
* 4.0.1 20170305
* Fix char default sizes and set MESSZ to 360 (#143)
* Fix SerialLog setting status
* Disable syslog when emulation is active
Expand Down
9 changes: 4 additions & 5 deletions sonoff/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ struct SYSCFG {
unsigned long saveFlag;
unsigned long version;
unsigned long bootcount;
byte migflg; // Not used since 3.9.1
byte migflg; // Not used since 3.9.1
int16_t savedata;
byte savestate;
byte model; // Not used since 3.9.1
byte model; // Not used since 3.9.1
int8_t timezone;
char otaUrl[101];
char ex_friendlyname[33]; // Not used since 3.2.5 - see below
Expand Down Expand Up @@ -111,12 +111,12 @@ struct SYSCFG {
byte mqtt_button_retain;
byte mqtt_power_retain;
byte value_units;
byte message_format; // Not used since 3.2.6a
byte button_restrict; // Was message_format until 3.2.6a
uint16_t tele_period;

uint8_t power;
uint8_t ledstate;
uint8_t ex_switchmode; // Not used since 3.9.21
uint8_t ex_switchmode; // Not used since 3.9.21

char domoticz_in_topic[33];
char domoticz_out_topic[33];
Expand Down Expand Up @@ -188,7 +188,6 @@ struct SYSCFG {

char web_password[33];
uint8_t switchmode[4];

} sysCfg;

struct RTCMEM {
Expand Down
16 changes: 10 additions & 6 deletions sonoff/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ void CFG_DefaultSet1()

void CFG_DefaultSet2()
{
sysCfg.migflg = 0xA5;
sysCfg.savedata = SAVE_DATA;
sysCfg.savestate = SAVE_STATE;
sysCfg.module = MODULE;
Expand Down Expand Up @@ -449,8 +448,9 @@ void CFG_DefaultSet2()
strlcpy(sysCfg.mqtt_subtopic, MQTT_SUBTOPIC, sizeof(sysCfg.mqtt_subtopic));
sysCfg.mqtt_button_retain = MQTT_BUTTON_RETAIN;
sysCfg.mqtt_power_retain = MQTT_POWER_RETAIN;
sysCfg.value_units = VALUE_UNITS;
sysCfg.message_format = 0;
sysCfg.value_units = 0;
sysCfg.button_restrict = 0;
// sysCfg.message_format = 0;
sysCfg.tele_period = TELE_PERIOD;

sysCfg.power = APP_POWER;
Expand Down Expand Up @@ -614,7 +614,7 @@ void CFG_Migrate_Part2()
sysCfg.hlw_imax = sysCfg2.hlw_imax;
}
if (sysCfg2.version >= 0x02000700) { // 2.0.7
sysCfg.message_format = 0;
// sysCfg.message_format = 0;
strlcpy(sysCfg.domoticz_in_topic, sysCfg2.domoticz_in_topic, sizeof(sysCfg.domoticz_in_topic));
strlcpy(sysCfg.domoticz_out_topic, sysCfg2.domoticz_out_topic, sizeof(sysCfg.domoticz_out_topic));
sysCfg.domoticz_update_timer = sysCfg2.domoticz_update_timer;
Expand Down Expand Up @@ -670,7 +670,7 @@ void CFG_Delta()
sysCfg.blinkcount = APP_BLINKCOUNT;
}
if (sysCfg.version < 0x03011000) { // 3.1.16 - Add parameter
getClient(sysCfg.ex_friendlyname, sysCfg.mqtt_client, sizeof(sysCfg.ex_friendlyname));
getClient(sysCfg.friendlyname[0], sysCfg.mqtt_client, sizeof(sysCfg.friendlyname[0]));
}
if (sysCfg.version < 0x03020400) { // 3.2.4 - Add parameter
sysCfg.ws_pixels = WS2812_LEDS;
Expand All @@ -686,7 +686,7 @@ void CFG_Delta()
sysCfg.ws_wakeup = 0;
}
if (sysCfg.version < 0x03020500) { // 3.2.5 - Add parameter
strlcpy(sysCfg.friendlyname[0], sysCfg.ex_friendlyname, sizeof(sysCfg.friendlyname[0]));
getClient(sysCfg.friendlyname[0], sysCfg.mqtt_client, sizeof(sysCfg.friendlyname[0]));
strlcpy(sysCfg.friendlyname[1], FRIENDLY_NAME"2", sizeof(sysCfg.friendlyname[1]));
strlcpy(sysCfg.friendlyname[2], FRIENDLY_NAME"3", sizeof(sysCfg.friendlyname[2]));
strlcpy(sysCfg.friendlyname[3], FRIENDLY_NAME"4", sizeof(sysCfg.friendlyname[3]));
Expand Down Expand Up @@ -725,8 +725,12 @@ void CFG_Delta()
if (sysCfg.version < 0x03091500) {
for (byte i = 0; i < 4; i++) sysCfg.switchmode[i] = sysCfg.ex_switchmode;
}
if (sysCfg.version < 0x04000200) {
sysCfg.button_restrict = 0;
}

sysCfg.version = VERSION;
}
}


0 comments on commit ac84010

Please sign in to comment.