Skip to content

Commit

Permalink
v5.1.7
Browse files Browse the repository at this point in the history
5.1.7 20170616
* Prep removal of SetOptions alternatives
* Restore webpage upgrade error messages removed in 5.1.5
* Add hold button functionality to buttons 2 to 4
* Add command SetOption32 1..100 to set Key Hold Time from 0.1 seconds
to 10 seconds (#200)
* Allow slashes in Topic, GroupTopic, ButtonTopic and SwitchTopic (#507)
* Changed webpage form actions from post to get and use relative path
url (#434, #522)
  • Loading branch information
arendst committed Jun 16, 2017
1 parent 98d06e8 commit d763fd5
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 121 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.1.6** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.
Current version is **5.1.7** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/master/sonoff/_releasenotes.ino) for change information.

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

Expand Down
10 changes: 9 additions & 1 deletion sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/* 5.1.6 20170606
/* 5.1.7 20170616
* Prep removal of SetOptions alternatives
* Restore webpage upgrade error messages removed in 5.1.5
* Add hold button functionality to buttons 2 to 4
* Add command SetOption32 1..100 to set Key Hold Time from 0.1 seconds to 10 seconds (#200)
* Allow slashes in Topic, GroupTopic, ButtonTopic and SwitchTopic (#507)
* Changed webpage form actions from post to get and use relative path url (#434, #522)
*
* 5.1.6 20170606
* Shrink code
* Removed online configuration of Domoticz In and Domoticz Out MQTT strings
* Removed commands DomoticzInTopic and DomoticzOutTopic
Expand Down
7 changes: 4 additions & 3 deletions sonoff/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#define PARAM8_SIZE 23 // Number of param bytes

typedef union { // Restricted by MISRA-C Rule 18.4 but so usefull...
uint32_t data; // Allow bit manipulation using SetOption
struct {
uint32_t savestate : 1; // bit 0
uint32_t button_restrict : 1; // bit 1
uint32_t value_units : 1; // bit 2
uint32_t mqtt_enabled : 1;
uint32_t mqtt_enabled : 1; // bit 3
uint32_t mqtt_response : 1; // bit 4
uint32_t mqtt_power_retain : 1;
uint32_t mqtt_button_retain : 1;
Expand Down Expand Up @@ -93,9 +95,8 @@ struct SYSCFG {

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

char ex_domoticz_in_topic[22]; // Not used since 5.1.6
uint8_t param[PARAM8_SIZE]; // was domoticz_in_topic until 5.1.6
char state_text[4][11]; // was domoticz_out_topic until 5.1.6

uint16_t domoticz_update_timer;
Expand Down
9 changes: 8 additions & 1 deletion sonoff/settings.ino
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ void CFG_DefaultSet2()

// 5.0.6
sysCfg.mqtt_retry = MQTT_RETRY_SECS;

// 5.1.7
sysCfg.param[P_HOLD_TIME] = KEY_HOLD_TIME; // Default 4 seconds hold time

}

/********************************************************************************************/
Expand Down Expand Up @@ -589,7 +593,7 @@ void CFG_Delta()
strlcpy(sysCfg.web_password, WEB_PASSWORD, sizeof(sysCfg.web_password));
}
if (sysCfg.version < 0x03091500) {
for (byte i = 0; i < 4; i++) sysCfg.switchmode[i] = sysCfg.ex_switchmode;
for (byte i = 0; i < 4; i++) sysCfg.switchmode[i] = SWITCH_MODE;
}
if (sysCfg.version < 0x04000200) {
sysCfg.ex_button_restrict = 0;
Expand Down Expand Up @@ -650,6 +654,9 @@ void CFG_Delta()
memcpy(sysCfg.state_text, sysCfg.ex_state_text, 33);
strlcpy(sysCfg.state_text[3], MQTT_CMND_HOLD, sizeof(sysCfg.state_text[3]));
}
if (sysCfg.version < 0x05010700) {
sysCfg.param[P_HOLD_TIME] = KEY_HOLD_TIME; // Default 4 seconds hold time
}

sysCfg.version = VERSION;
}
Expand Down
Loading

0 comments on commit d763fd5

Please sign in to comment.