Skip to content

Commit

Permalink
v3.2.9
Browse files Browse the repository at this point in the history
3.2.9 20170124
* Fix compile error when MQTT is disabled (#269)
* Change PowerOnState function to only trigger when Power On (and not on
restart) (#238)
* Add command LedPower On|Off to control main led (#247)
* Add charset=utf-8 to webpages (#266)
* Update Hue emulation (#268)
* Rewrite WS2812 code and prep for 4.0
* Add support for domoticz Dimmer on WS2812
* Add commands SwitchTopic and SwitchRetain On|Off to be used with
external switch instead of ButtonTopic and ButtonRetain
* Enforce at least IDE 1.6.10 and ESP8266 2.3.0
  • Loading branch information
arendst committed Jan 24, 2017
1 parent e392ed6 commit 5e95085
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Sonoff-MQTT-OTA-Arduino - 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 **3.2.8** - See ```sonoff/_releasenotes.ino``` for change information.
Current version is **3.2.9** - See ```sonoff/_releasenotes.ino``` for change information.

<img alt="Sonoff" src="https://github.com/arendst/arendst.github.io/blob/master/media/sonoffbasic.jpg" width="250" align="right" />
See [Wiki](https://github.com/arendst/Sonoff-MQTT-OTA-Arduino/wiki) for more information.<br />
Expand Down
5 changes: 4 additions & 1 deletion sonoff/_releasenotes.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* 3.2.8 20170124
/* 3.2.9 20170124
* Fix compile error when MQTT is disabled (#269)
*
* 3.2.8 20170124
* Change PowerOnState function to only trigger when Power On (and not on restart) (#238)
* Add command LedPower On|Off to control main led (#247)
* Add charset=utf-8 to webpages (#266)
Expand Down
22 changes: 17 additions & 5 deletions sonoff/sonoff.ino
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* ====================================================
*/

#define VERSION 0x03020800 // 3.2.8
#define VERSION 0x03020900 // 3.2.9

#define SONOFF 1 // Sonoff, Sonoff RF, Sonoff SV, Sonoff Dual, Sonoff TH, S20 Smart Socket, 4 Channel
#define SONOFF_POW 9 // Sonoff Pow
Expand Down Expand Up @@ -2452,9 +2452,12 @@ void stateloop()
if (Maxdevice > 1) {
button = digitalRead(KEY2_PIN);
if ((button == PRESSED) && (lastbutton2 == NOT_PRESSED)) {
#ifdef USE_MQTT
if (mqttClient.connected() && strcmp(sysCfg.button_topic, "0")) {
send_button_power(0, 2, 2); // Execute commend via MQTT
} else {
} else
#endif // USE_MQTT
{
do_cmnd_power(2, 2); // Execute command internally
}
}
Expand All @@ -2466,9 +2469,12 @@ void stateloop()
if (Maxdevice > 2) {
button = digitalRead(KEY3_PIN);
if ((button == PRESSED) && (lastbutton3 == NOT_PRESSED)) {
#ifdef USE_MQTT
if (mqttClient.connected() && strcmp(sysCfg.button_topic, "0")) {
send_button_power(0, 3, 2); // Execute commend via MQTT
} else {
} else
#endif // USE_MQTT
{
do_cmnd_power(3, 2); // Execute command internally
}
}
Expand All @@ -2480,9 +2486,12 @@ void stateloop()
if (Maxdevice > 3) {
button = digitalRead(KEY4_PIN);
if ((button == PRESSED) && (lastbutton4 == NOT_PRESSED)) {
#ifdef USE_MQTT
if (mqttClient.connected() && strcmp(sysCfg.button_topic, "0")) {
send_button_power(0, 4, 2); // Execute commend via MQTT
} else {
} else
#endif // USE_MQTT
{
do_cmnd_power(4, 2); // Execute command internally
}
}
Expand Down Expand Up @@ -2511,9 +2520,12 @@ void stateloop()
if ((button == NOT_PRESSED) && (lastwallswitch == PRESSED)) switchflag = 2; // Toggle with releasing pushbutton from Gnd
}
if (switchflag < 3) {
#ifdef USE_MQTT
if (mqttClient.connected() && strcmp(sysCfg.switch_topic,"0")) {
send_button_power(1, 1, switchflag); // Execute commend via MQTT
} else {
} else
#endif // USE_MQTT
{
do_cmnd_power(1, switchflag); // Execute command internally
}
}
Expand Down

0 comments on commit 5e95085

Please sign in to comment.