Skip to content

Commit

Permalink
v5.0.6
Browse files Browse the repository at this point in the history
5.0.6 20170510
* Remove hyphen in case of a single DHT sensor connecetd (#427)
* Add command MqttRetry <seconds> to change default MQTT reconnect retry
timer from minimal 10 seconds (#429)
  • Loading branch information
arendst committed May 10, 2017
1 parent bc9d44d commit 32c3a66
Show file tree
Hide file tree
Showing 12 changed files with 195 additions and 174 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 **5.0.5** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.
Current version is **5.0.6** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.

### **** ATTENTION Version 5.0.x specific information ****

Expand Down
Binary file modified api/arduino/sonoff.ino.bin
Binary file not shown.
6 changes: 5 additions & 1 deletion sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/* 5.0.5 20170508
/* 5.0.6 20170510
* Remove hyphen in case of a single DHT sensor connecetd (#427)
* Add command MqttRetry <seconds> to change default MQTT reconnect retry timer from minimal 10 seconds (#429)
*
* 5.0.5 20170508
* Add command FullTopic with tokens %topic% (replaced by command Topic value) and
* %prefix% (replaced by command Prefix<x> values) for more flexible topic definitions (#244)
* See wiki > MQTT Features https://github.com/arendst/Sonoff-Tasmota/wiki/MQTT-Features for more information
Expand Down
4 changes: 2 additions & 2 deletions sonoff/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct SYSCFG {
uint16_t hlw_mkwhs; // MaxEnergyStart

// 3.0.6
uint16_t ex_pulsetime; // Not used since 4.0.4
uint16_t mqtt_retry; // was ex_pulsetime until 4.0.4

// 3.1.1
uint8_t poweronstate;
Expand Down Expand Up @@ -176,7 +176,7 @@ struct SYSCFG {
unsigned long hlw_kWhtotal;

// 5.0.4a
char mqtt_fulltopic[101];
char mqtt_fulltopic[101];

} sysCfg;

Expand Down
12 changes: 7 additions & 5 deletions sonoff/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,11 @@ void CFG_DefaultSet2()
// sysCfg.hlw_kWhtotal = 0;
rtcMem.hlw_kWhtotal = 0;

// 5.0.4a
// 5.0.5
strlcpy(sysCfg.mqtt_fulltopic, MQTT_FULLTOPIC, sizeof(sysCfg.mqtt_fulltopic));

// 5.0.6
sysCfg.mqtt_retry = MQTT_RETRY_SECS;
}

/********************************************************************************************/
Expand Down Expand Up @@ -516,7 +518,7 @@ void CFG_DefaultSet_4_0_4()
}
}
}
sysCfg.pulsetime[0] = sysCfg.ex_pulsetime;
sysCfg.pulsetime[0] = APP_PULSETIME;
for (byte i = 1; i < MAX_PULSETIMERS; i++) {
sysCfg.pulsetime[i] = 0;
}
Expand Down Expand Up @@ -554,9 +556,6 @@ void CFG_DefaultSet_5_0_2()
void CFG_Delta()
{
if (sysCfg.version != VERSION) { // Fix version dependent changes
if (sysCfg.version < 0x03000600) { // 3.0.6 - Add parameter
sysCfg.ex_pulsetime = APP_PULSETIME;
}
if (sysCfg.version < 0x03010200) { // 3.1.2 - Add parameter
sysCfg.poweronstate = APP_POWERON_STATE;
}
Expand Down Expand Up @@ -637,6 +636,9 @@ void CFG_Delta()
if (sysCfg.version < 0x05000500) {
strlcpy(sysCfg.mqtt_fulltopic, MQTT_FULLTOPIC, sizeof(sysCfg.mqtt_fulltopic));
}
if (sysCfg.version < 0x05000600) {
sysCfg.mqtt_retry = MQTT_RETRY_SECS;
}
sysCfg.version = VERSION;
}
}
Expand Down
Loading

0 comments on commit 32c3a66

Please sign in to comment.