From 3181a59769855753e1691cdb9c9ab50aa593c383 Mon Sep 17 00:00:00 2001 From: arendst Date: Sun, 18 Dec 2016 18:30:04 +0100 Subject: [PATCH] v3.0.9 3.0.9 * Add Sonoff Pow voltage reading when relay is on but no load present --- README.md | 2 +- api/arduino/sonoff.ino.bin | Bin 393680 -> 393680 bytes sonoff/_releasenotes.ino | 7 +++++-- sonoff/sonoff.ino | 2 +- sonoff/xsns_hlw8012.ino | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1098507..b2d53a6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Sonoff-MQTT-OTA-Arduino Provide ESP8266 based itead Sonoff with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE. -Current version is **3.0.8** - See ```sonoff/_releasenotes.ino``` for change information. +Current version is **3.0.9** - See ```sonoff/_releasenotes.ino``` for change information. Starting with version 2.0.0 the following hardware devices are supported: - itead Sonoff diff --git a/api/arduino/sonoff.ino.bin b/api/arduino/sonoff.ino.bin index 6686bba3784fbc695f7776ffce1cbe27eeb97234..6f3505975bfe5c90b0f960819bd9a4dde9c3d7a3 100644 GIT binary patch delta 43 tcmcc6EODV(V#7=&M$XN%l@f8W&&bnAZFQK>B<_u2LNe%53v9M delta 43 tcmcc6EODV(V#7=&Mvl$1l@f8W&&bnAZFQK>B<_u2LNe653c|K diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 9ce81ec..b473093 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,6 +1,9 @@ -/* 3.0.8 20161218 - * Add temperature conversion to Fahrenheit as option in user_config.h (TEMP_CONVERSION) +/* 3.0.9 + * Add Sonoff Pow voltage reading when relay is on but no load present * + * 3.0.8 20161218 + * Add temperature conversion to Fahrenheit as option in user_config.h (TEMP_CONVERSION) + * * 3.0.7 20161217 * Add user_config_override.h to be used by user to override some defaults in user_config.h * Fix Sonoff Pow low power (down to 4W) intermittent measurements diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index be86677..6fc594f 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -10,7 +10,7 @@ * ==================================================== */ -#define VERSION 0x03000800 // 3.0.8 +#define VERSION 0x03000900 // 3.0.9 #define SONOFF 1 // Sonoff, Sonoff SV, Sonoff Dual, Sonoff TH 10A/16A, S20 Smart Socket, 4 Channel #define SONOFF_POW 9 // Sonoff Pow diff --git a/sonoff/xsns_hlw8012.ino b/sonoff/xsns_hlw8012.ino index 59507e0..1fa6eda 100644 --- a/sonoff/xsns_hlw8012.ino +++ b/sonoff/xsns_hlw8012.ino @@ -152,7 +152,7 @@ boolean hlw_readEnergy(byte option, float &ed, uint16_t &e, uint16_t &w, uint16_ } else { w = 0; } - if (hlw_cf1u_plen && w) { + if (hlw_cf1u_plen && (w || (power &1))) { hlw_u = (HLW_UREF * sysCfg.hlw_ucal) / hlw_cf1u_plen; u = hlw_u / 10; } else {