From 624ee28db39084fcf2058d22882317bc200187bf Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 28 Aug 2018 14:28:36 +0200 Subject: [PATCH] Revisit naming and features Revisit naming and features in preparation to release --- README.md | 61 ++++++++++++++++++------------ platformio.ini | 8 ++-- sonoff/_changelog.ino | 1 + sonoff/sonoff_post.h | 27 +++++++++---- sonoff/support.ino | 2 +- sonoff/user_config.h | 4 +- tools/decode-status.py | 2 +- tools/{ => fw_server}/fw-server.py | 0 tools/{ => fw_server}/fw/README | 0 9 files changed, 64 insertions(+), 41 deletions(-) rename tools/{ => fw_server}/fw-server.py (100%) rename tools/{ => fw_server}/fw/README (100%) diff --git a/README.md b/README.md index 3576e6bcb..811580e9c 100644 --- a/README.md +++ b/README.md @@ -91,16 +91,25 @@ The following devices are supported: - Wemos D1 mini, NodeMcu and Ledunia ### Firmware Release Information -Different firmware images are released based on Features and Sensors selection guided by code and memory usage. +Different firmware images are released based on Features and Sensors selection guided by code and memory usage. All versions support web based WIFI manager configuration. -- The Minimal version allows intermediate OTA uploads to support larger versions and does NOT change any persistent parameter. -- The Classic version allows single OTA uploads as did the previous Sonoff-Tasmota versions. +- The Minimal version allows intermediate OTA uploads to support larger versions and does NOT change any persistent parameter. This version should **NOT be used for initial installation**. +- The Classic version allows **initial installation** and single OTA uploads. +- The Sonoff version removes WPS and SmartConfig configuration and allows more sensors. +- The Sensors version removes WPS and SmartConfig configuration and allows more usefull sensors. +- The Knx version removes WPS and SmartConfig configuration and some other features but adds KNX support. #### Available Features and Sensors -| Feature or Sensor | sonoff | classic | minimal | knx | allsensors | -|--------------------------------|--------|---------|---------|-----|------------| +| Feature or Sensor | sonoff | classic | minimal | knx | sensors | +|--------------------------------|--------|---------|---------|------|---------| +| ESP/Arduino lib v2.3.0 | 472k | 476k | 340k | 491k | 497k | +| ESP/Arduino lib v2.4.2 | 490k | 490k | 360k | 508k | 513k | +| | | | | | | | MY_LANGUAGE en-GB | x | x | x | x | x | +| USE_WPS | - | x | - | - | - | +| USE_SMARTCONFIG | - | x | - | - | - | +| USE_ARDUINO_OTA | - | - | - | - | - | | MQTT_LIBRARY_TYPE PUBSUBCLIENT | x | x | x | x | x | | USE_DOMOTICZ | x | x | - | x | x | | USE_HOME_ASSISTANT | x | x | - | x | x | @@ -116,28 +125,37 @@ Different firmware images are released based on Features and Sensors selection g | USE_SUNRISE | x | - | - | x | x | | USE_RULES | x | - | - | x | x | | | | | | | | +| Feature or Sensor | sonoff | classic | minimal | knx | sensors | | USE_ADC_VCC | x | x | x | x | x | | USE_DS18B20 | x | x | - | x | - | | USE_DS18x20 | - | - | - | - | x | | USE_DS18x20_LEGACY | - | - | - | - | - | -| USE_I2C | x | x | - | x | x | -| USE_SHT | x | x | - | x | x | -| USE_SHT3X | x | x | - | x | x | -| USE_HTU | x | x | - | x | x | -| USE_LM75AD | x | - | - | x | x | -| USE_BMP | x | x | - | x | x | +| | | | | | | +| USE_I2C | x | - | - | x | x | +| USE_SHT | x | - | - | x | x | +| USE_HTU | x | - | - | x | x | +| USE_BMP | x | - | - | x | x | | USE_BME680 | - | - | - | - | x | -| USE_SGP30 | x | - | - | x | x | -| USE_BH1750 | x | x | - | x | x | +| USE_BH1750 | x | - | - | x | x | | USE_VEML6070 | - | - | - | - | x | -| USE_TSL2561 | - | - | - | - | x | -| USE_SI1145 | - | - | - | - | x | | USE_ADS1115 | - | - | - | - | x | | USE_ADS1115_I2CDEV | - | - | - | - | - | | USE_INA219 | - | - | - | - | x | +| USE_SHT3X | x | - | - | x | x | +| USE_TSL2561 | - | - | - | - | x | | USE_MGS | - | - | - | - | x | +| USE_SGP30 | x | - | - | x | x | +| USE_SI1145 | - | - | - | - | x | +| USE_LM75AD | x | - | - | x | x | +| USE_APDS9960 | - | - | - | - | - | +| USE_MCP230xx | - | - | - | - | - | +| USE_MPR121 | - | - | - | - | - | +| USE_CCS811 | - | - | - | - | - | +| USE_MPU6050 | - | - | - | - | - | +| | | | | | | +| Feature or Sensor | sonoff | classic | minimal | knx | sensors | | USE_SPI | - | - | - | - | - | -| USE_MHZ19 | x | x | - | x | x | +| USE_MHZ19 | x | - | - | x | x | | USE_SENSEAIR | x | - | - | x | x | | USE_PMS5003 | x | - | - | x | x | | USE_NOVA_SDS | x | - | - | x | x | @@ -145,23 +163,16 @@ Different firmware images are released based on Features and Sensors selection g | USE_SERIAL_BRIDGE | x | - | - | x | x | | USE_SDM120 | - | - | - | - | x | | USE_SDM630 | - | - | - | - | x | -| USE_IR_REMOTE | x | x | - | x | x | +| USE_IR_REMOTE | x | - | - | x | x | | USE_IR_HVAC | - | - | - | - | x | | USE_IR_RECEIVE | x | - | - | x | x | | USE_WS2812 | x | x | - | x | x | | USE_WS2812_DMA | - | - | - | - | - | | USE_ARILUX_RF | x | - | - | x | x | | USE_SR04 | x | - | - | x | x | +| USE_TM1638 | - | - | - | - | - | | USE_RF_FLASH | x | - | - | x | x | -#### Typical file size - -| ESP/Arduino library version | sonoff | classic | minimal | knx | allsensors | -|-----------------------------|--------|---------|---------|------|------------| -| ESP/Arduino lib v2.3.0 | 538k | 490k | 407k | 548k | 562k | -| ESP/Arduino lib v2.4.0 | 543k | 498k | 414k | 553k | 565k | -| ESP/Arduino lib v2.4.1 | 544k | 500k | 416k | 555k | 567k | - See [Tasmota ESP/Arduino library version related issues](https://github.com/arendst/Sonoff-Tasmota/wiki/Theo's-Tasmota-Tips#20180523---relation-tasmota-and-esp8266arduino-core-version) for more information. ### Contribute diff --git a/platformio.ini b/platformio.ini index d385873f4..4cda52b6f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -15,7 +15,7 @@ env_default = sonoff ;env_default = sonoff-minimal ;env_default = sonoff-classic ;env_default = sonoff-knx -;env_default = sonoff-allsensors +;env_default = sonoff-sensors ;env_default = sonoff-BG ;env_default = sonoff-BR ;env_default = sonoff-CN @@ -63,11 +63,11 @@ build_flags = -Wl,-Tesp8266.flash.1m0.ld ; -DUSE_CONFIG_OVERRIDE ; lwIP 1.4 (Default) - -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH +; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH ; lwIP 2 - Low Memory ; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY ; lwIP 2 - Higher Bandwitdh -; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH + -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH ; VTABLES in Flash (default) -DVTABLES_IN_FLASH ; VTABLES in Heap @@ -152,7 +152,7 @@ upload_resetmethod = ${common.upload_resetmethod} upload_speed = ${common.upload_speed} extra_scripts = ${common.extra_scripts} -[env:sonoff-allsensors] +[env:sonoff-sensors] platform = ${common.platform} framework = ${common.framework} board = ${common.board} diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 046e19a39..0629de523 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,6 +1,7 @@ /* 6.1.1.13 20180828 * Fix 6.1.1.12 regression of Mem and Var default handling (#3618) * Optimizations + * Change define USE_ALL_SENSORS to USE_SENSORS as it doesn't contain all sensors due to duplicate I2C addresses * * 6.1.1.12 20180827 * Add commands ButtonDebounce 40..1000 and SwitchDebounce 40..1000 to have user control over debounce timing. Default is 50mS (#3594) diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index faff45c05..0b1ab1451 100755 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -54,11 +54,11 @@ void KNX_CB_Action(message_t const &msg, void *arg); #define USE_ENERGY_SENSOR // Use energy sensors /*********************************************************************************************\ - * [sonoff-allsensors.bin] - * Provide an image with all supported sensors enabled + * [sonoff-sensors.bin] + * Provide an image with usefull supported sensors enabled \*********************************************************************************************/ -#ifdef USE_ALL_SENSORS +#ifdef USE_SENSORS #define USE_ADC_VCC // Display Vcc in Power status. Disable for use as Analog input on selected devices #define USE_DS18x20 // For more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code) @@ -105,7 +105,7 @@ void KNX_CB_Action(message_t const &msg, void *arg); // #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow #define USE_ARILUX_RF // Add support for Arilux RF remote controller (+0k8 code, 252 iram (non 2.3.0)) #define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code) -#endif // USE_ALL_SENSORS +#endif // USE_SENSORS /*********************************************************************************************\ * [sonoff-classic.bin] @@ -114,21 +114,32 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_CLASSIC +#ifndef USE_WPS +#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+)) +#endif +#ifndef USE_SMARTCONFIG +#define USE_SMARTCONFIG // Add support for Wifi SmartConfig as initial wifi configuration tool (+23k code, +0.6k mem) +#endif +#undef MQTT_LIBRARY_TYPE +#define MQTT_LIBRARY_TYPE MQTT_PUBSUBCLIENT // Use PubSubClient library +#undef USE_ARDUINO_OTA // Disable support for Arduino OTA #undef USE_KNX // Disable KNX IP Protocol Support #undef USE_TIMERS // Disable support for up to 16 timers #undef USE_TIMERS_WEB // Disable support for timer webpage #undef USE_SUNRISE // Disable support for Sunrise and sunset tools #undef USE_RULES // Disable support for rules -#undef USE_LM75AD // Disable sensor -#undef USE_BME680 // Disable sensor -#undef USE_SGP30 // Disable sensor +#undef USE_I2C // Disable all I2C sensors +#undef USE_SPI // Disable all SPI devices +#undef USE_MHZ19 // Disable support for MH-Z19 CO2 sensor #undef USE_SENSEAIR // Disable support for SenseAir K30, K70 and S8 CO2 sensor +#undef USE_PMS5003 // Disable support for PMS5003 and PMS7003 particle concentration sensor #undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor #undef USE_PZEM004T // Disable PZEM004T energy sensor -#undef USE_IR_RECEIVE // Disable support for IR receiver #undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge #undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter #undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter +#undef USE_IR_REMOTE // Disable IR remote commands using library IRremoteESP8266 and ArduinoJson +#undef USE_IR_RECEIVE // Disable support for IR receiver #undef USE_ARILUX_RF // Disable support for Arilux RF remote controller #undef USE_SR04 // Disable support for for HC-SR04 ultrasonic devices #undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8 diff --git a/sonoff/support.ino b/sonoff/support.ino index e7cfa6177..87cd49edb 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -889,7 +889,7 @@ void GetFeatures() #ifdef BE_MINIMAL feature_drv2 |= 0x00000002; // user_config(_override).h #endif -#ifdef USE_ALL_SENSORS +#ifdef USE_SENSORS feature_drv2 |= 0x00000004; // user_config(_override).h #endif #ifdef USE_CLASSIC diff --git a/sonoff/user_config.h b/sonoff/user_config.h index 3988bd8be..6092f9ad3 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -373,10 +373,10 @@ //#define USE_CLASSIC // Create sonoff-classic (See sonoff_post.h for selected features) /*********************************************************************************************\ - * Select all sensors - overrides above undefines!! + * Select usefull sensors - overrides above undefines!! \*********************************************************************************************/ -//#define USE_ALL_SENSORS // Create sonoff-allsensors with all sensors enabled (See sonoff_post.h for selected sensors) +//#define USE_SENSORS // Create sonoff-sensors with usefull sensors enabled (See sonoff_post.h for selected sensors) /*********************************************************************************************\ * Select KNX without Emulation to save space diff --git a/tools/decode-status.py b/tools/decode-status.py index 749d81455..7f06b674b 100644 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -103,7 +103,7 @@ a_features = [[ "USE_TIMERS","USE_SUNRISE","USE_TIMERS_WEB","USE_RULES", "USE_KNX","USE_WPS","USE_SMARTCONFIG","" ],[ - "USE_CONFIG_OVERRIDE","BE_MINIMAL","USE_ALL_SENSORS","USE_CLASSIC", + "USE_CONFIG_OVERRIDE","BE_MINIMAL","USE_SENSORS","USE_CLASSIC", "USE_KNX_NO_EMULATION","USE_DISPLAY_MODES1TO5","USE_DISPLAY_GRAPH","USE_DISPLAY_LCD", "USE_DISPLAY_SSD1306","USE_DISPLAY_MATRIX","USE_DISPLAY_ILI9341","USE_DISPLAY_EPAPER", "USE_DISPLAY_SH1106","","","", diff --git a/tools/fw-server.py b/tools/fw_server/fw-server.py similarity index 100% rename from tools/fw-server.py rename to tools/fw_server/fw-server.py diff --git a/tools/fw/README b/tools/fw_server/fw/README similarity index 100% rename from tools/fw/README rename to tools/fw_server/fw/README