diff --git a/README.md b/README.md index 8af552b2b..7773a5c9b 100644 --- a/README.md +++ b/README.md @@ -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.7.1j** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. +Current version is **5.8.0a** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information. ### ATTENTION All versions diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 7e686ae6b..8e54a7f4f 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -1,47 +1,34 @@ -/* 5.7.1j +/* 5.8.0a + * Add translations to I2Cscan + * Add translation to BH1750 unit lx + * Set default WS2812 pixel count to WS2812_LEDS + * Fix GPIOx JSON response (#897) + * + * 5.8.0 20170918 * Remove the need for NeoPixelBus library for Hue support - * Reintroduce xdrv_ws2812 for flexible future library changes - * Fix basic On, Off, Toggle, Blink and BlinkOff commands when other language is selected (#874) - * - * 5.7.1i - * Add blink to WS2812 and Sonoff Led (#643) - * - * 5.7.1h - * Consolidate WS2812 (xdrv_ws2812) into Sonoff Led (xdrv_snfled) + * Consolidate WS2812 into Sonoff Led for flexible future led strip library changes * Invert WS2812 fade speed to align with Sonoff led (Speed 1 = fast, Speed 8 = slow) * Remove upper case MQTT receive buffer - * - * 5.7.1g - * Add option WIFI_WAIT (5) to command WifiConfig to allow connection retry to same AP without restart or update flash (#772, #869) - * - * 5.7.1f * Reduce code and string length for output of commands Modules and GPIOs - * Add optional dimmer parameter to command Wakeup for AiLight, Sonoff B1, Led and BN-SZ01 (#867) - * - * 5.7.1e * Add Sonoff SC debug information * Change syslog service - * - * 5.7.1d - * Fix watchdog timeout caused by lack of stack space by now using global buffers (#853) * Removed webserver syslog disable as now no longer needed * Increased default MQTT message size from 368 to 405 bytes while keeping MQTT_MAX_PACKET_SIZE = 512 (because we can) * Fix MQTT Offline or Remove MQTT retained topic code - * Allow command SwitchTopic in group mode (#861) - * Allow command SwitchMode if no switches are defined (#861) - * - * 5.7.1c - * Allow LogPort and MqttPort up to 65535 and add LogPort tot Status 3 (#859) - * - * 5.7.1b - * Add timeout to DHT and DS18B20 sensors (#852) - * - * 5.7.1a * Fix Domoticz loop when Emulation is selected - * Add GPIO14 to Sonoff Dual (#797, #839) + * Add blink to WS2812 and Sonoff Led (#643) + * Add option WIFI_WAIT (5) to command WifiConfig to allow connection retry to same AP without restart or update flash (#772, #869) * Add support for Witty Cloud (#794) + * Add GPIO14 to Sonoff Dual (#797, #839) * Add support for Yunshan Wifi Relay (#802) * Add GPIO16 input pulldown (#827) + * Add timeout to DHT and DS18B20 sensors (#852) + * Fix watchdog timeout caused by lack of stack space by moving to heap (#853) + * Allow LogPort and MqttPort up to 65535 and add LogPort tot Status 3 (#859) + * Allow command SwitchTopic in group mode (#861) + * Allow command SwitchMode if no switches are defined (#861) + * Add optional dimmer parameter to command Wakeup for WS2812, AiLight, Sonoff B1, Led and BN-SZ01 (#867) + * Fix basic On, Off, Toggle, Blink and BlinkOff commands when other language is selected (#874) * * 5.7.1 20170909 * Remove leading spaces from MQTT data diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index d5acc0fc0..9663b3cc9 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -459,11 +459,15 @@ #define D_SENSOR_LED "Led" // Suffix "1I" #define D_SENSOR_PWM "PWM" // Suffix "1" #define D_SENSOR_COUNTER "Counter" // Suffix "1" +#define D_SENSOR_SPI_CS "SPI CS" +#define D_SENSOR_SPI_DC "SPI DC" +#define D_SENSOR_BACKLIGHT "BLight" // Units #define D_UNIT_AMPERE "A" #define D_UNIT_HOUR "Hr" #define D_UNIT_KILOWATTHOUR "kWh" +#define D_UNIT_LUX "lx" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" #define D_UNIT_MILLISECOND "ms" @@ -491,11 +495,11 @@ #define D_LOG_MQTT "MQT: " #define D_LOG_OTHER "OTH: " #define D_LOG_RESULT "RSL: " +#define D_LOG_SERIAL "SER: " #define D_LOG_SHT1 "SHT: " #define D_LOG_UPLOAD "UPL: " #define D_LOG_UPNP "UPP: " #define D_LOG_WIFI "WIF: " -#define D_LOG_SERIAL "SER: " // Result #define D_RSLT_RESULT "RESULT" diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index 9e39fc2e4..8e66c1eb4 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -459,11 +459,15 @@ #define D_SENSOR_LED "Led" // Suffix "1I" #define D_SENSOR_PWM "PWM" // Suffix "1" #define D_SENSOR_COUNTER "Teller" // Suffix "1" +#define D_SENSOR_SPI_CS "SPI CS" +#define D_SENSOR_SPI_DC "SPI DC" +#define D_SENSOR_BACKLIGHT "BLight" // Units #define D_UNIT_AMPERE "A" #define D_UNIT_HOUR "Hr" #define D_UNIT_KILOWATTHOUR "kWh" +#define D_UNIT_LUX "lx" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" #define D_UNIT_MILLISECOND "ms" @@ -491,11 +495,11 @@ #define D_LOG_MQTT "MQT: " #define D_LOG_OTHER "OTH: " #define D_LOG_RESULT "RSL: " +#define D_LOG_SERIAL "SER: " #define D_LOG_SHT1 "SHT: " #define D_LOG_UPLOAD "UPL: " #define D_LOG_UPNP "UPP: " #define D_LOG_WIFI "WIF: " -#define D_LOG_SERIAL "SER: " // Result #define D_RSLT_RESULT "RESULTAAT" diff --git a/sonoff/settings.ino b/sonoff/settings.ino index bc866bc18..333d2fa3f 100644 --- a/sonoff/settings.ino +++ b/sonoff/settings.ino @@ -500,9 +500,8 @@ void CFG_DefaultSet2() // 5.4.1 memcpy_P(sysCfg.sfb_code[0], sfb_codeDefault, 9); - // 5.7.1g + // 5.8.0 sysCfg.led_pixels = WS2812_LEDS; - } /********************************************************************************************/ @@ -711,7 +710,7 @@ void CFG_Delta() } memcpy_P(sysCfg.sfb_code[0], sfb_codeDefault, 9); } - if (sysCfg.version < 0x05070108) { + if (sysCfg.version < 0x05080000) { uint8_t cfg_wsflg = 0; for (byte i = 0; i < MAX_GPIO_PIN; i++) { if (GPIO_WS2812 == sysCfg.my_module.gp.io[i]) { diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index a9544b662..66a516547 100644 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -25,7 +25,7 @@ - Select IDE Tools - Flash Size: "1M (no SPIFFS)" ====================================================*/ -#define VERSION 0x0507010A // 5.7.1j +#define VERSION 0x05080001 // 5.8.0a enum log_t {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE, LOG_LEVEL_ALL}; enum week_t {Last, First, Second, Third, Fourth}; @@ -1213,7 +1213,7 @@ void mqttDataCb(char* topic, byte* data, unsigned int data_len) } jsflg = 1; snprintf_P(stemp1, sizeof(stemp1), sensors[sysCfg.my_module.gp.io[i]]); - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s\"" D_CMND_GPIO "%d\":%d (%s)"), mqtt_data, i, sysCfg.my_module.gp.io[i], stemp1); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s\"" D_CMND_GPIO "%d\":\"%d (%s)\""), mqtt_data, i, sysCfg.my_module.gp.io[i], stemp1); } } if (jsflg) { diff --git a/sonoff/support.ino b/sonoff/support.ino index 9c65d3513..4e13a20c8 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -790,7 +790,7 @@ void i2c_scan(char *devs, unsigned int devs_len) byte any = 0; char tstr[10]; - snprintf_P(devs, devs_len, PSTR("{\"I2Cscan\":\"Device(s) found at")); + snprintf_P(devs, devs_len, PSTR("{\"" D_CMND_I2CSCAN "\":\"" D_I2CSCAN_DEVICES_FOUND_AT)); for (address = 1; address <= 127; address++) { Wire.beginTransmission(address); error = Wire.endTransmission(); @@ -800,13 +800,13 @@ void i2c_scan(char *devs, unsigned int devs_len) any = 1; } else if (4 == error) { - snprintf_P(devs, devs_len, PSTR("{\"I2Cscan\":\"Unknown error at 0x%2x\"}"), address); + snprintf_P(devs, devs_len, PSTR("{\"" D_CMND_I2CSCAN "\":\"" D_I2CSCAN_UNKNOWN_ERROR_AT " 0x%2x\"}"), address); } } if (any) { strncat(devs, "\"}", devs_len); } else { - snprintf_P(devs, devs_len, PSTR("{\"I2Cscan\":\"No devices found\"}")); + snprintf_P(devs, devs_len, PSTR("{\"" D_CMND_I2CSCAN "\":\"" D_I2CSCAN_NO_DEVICES_FOUND "\"}")); } } #endif // USE_I2C diff --git a/sonoff/xsns_bh1750.ino b/sonoff/xsns_bh1750.ino index e0a96ca61..310302bdb 100644 --- a/sonoff/xsns_bh1750.ino +++ b/sonoff/xsns_bh1750.ino @@ -94,7 +94,7 @@ void bh1750_mqttPresent(uint8_t* djson) #ifdef USE_WEBSERVER const char HTTP_SNS_ILLUMINANCE[] PROGMEM = - "