Bump version 6.6.0.21

* Remove support for WPS and SmartConfig in favour of Web server (!) based WifiManager (#6680)
 * Remove binary sonoff-classic (#6680)
This commit is contained in:
Theo Arends 2019-10-22 16:34:25 +02:00
parent b2d1e385c0
commit b072791426
16 changed files with 193 additions and 483 deletions

View File

@ -16,7 +16,6 @@ env:
- ENV=sonoff
- ENV=sonoff-minimal
- ENV=sonoff-basic
- ENV=sonoff-classic
- ENV=sonoff-knx
- ENV=sonoff-sensors
- ENV=sonoff-display

View File

@ -18,10 +18,8 @@ Although it might still compile on previous Core versions all support will be re
## Support of TLS
To save resources when TLS is enabled mDNS needs to be disabled. In addition to TLS using fingerprints now also user supplied CA certs and AWS IoT is supported. See full documentation on https://github.com/arendst/Sonoff-Tasmota/wiki/AWS-IoT
## Change in default initial configuration tool
Firmware binary **sonoff-classic.bin** supports **WifiManager, Wps and SmartConfig** for initial configuration. The default tool is **Wps**. To save code space all other binaries support **WifiManager only**.
The next release will remove support for **WPS** and **SmartConfig**
## Initial configuration tools
For initial configuration this release supports Webserver based **WifiManager** or **Serial** based command interface only. Support for **WPS** and **SmartConfig** has been removed.
## Supported Modules
The following hardware modules are supported.
@ -104,238 +102,160 @@ Module | Description
## Provided Binary Downloads
The following binary downloads have been compiled with ESP8266/Arduino library core version **pre-2.6.0**.
- **sonoff.bin** = The Sonoff version adds more sensors. **RECOMMENDED RELEASE BINARY**
- **sonoff-basic.bin** = The Basic version without most sensors.
- **sonoff-classic.bin** = The Classic version allows initial installation using either WifiManager, Wps or SmartConfig.
- **sonoff.bin** = The Sonoff version with sensors. **RECOMMENDED RELEASE BINARY**
- **sonoff-BG.bin** to **sonoff-TW.bin** = The Sonoff version in different languages.
- **sonoff-basic.bin** = The Basic version without most sensors.
- **sonoff-knx.bin** = The Knx version without some features but adds KNX support.
- **sonoff-sensors.bin** = The Sensors version adds even more useful sensors.
- **sonoff-sensors.bin** = The Sensors version adds more useful sensors.
- **sonoff-ir** = The InfraRed Receiver and transmitter version allowing all available protocols provided by library IRremoteESP8266 but without most other features.
- **sonoff-display.bin** = The Display version without Energy Monitoring but adds display support.
- **sonoff-minimal.bin** = 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**.
## Available Features and Sensors
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
|-----------------------|---------|-------|---------|--------|-----|---------|----|---------|--------
| MY_LANGUAGE en-GB | x | x | x | x | x | x | x | x |
| USE_WPS | - | - | x | - | - | - | - | - | WPS
| USE_SMARTCONFIG | - | - | x | - | - | - | - | - | SmartConfig
| USE_ARDUINO_OTA | - | - | - | - | - | - | - | - |
| USE_DOMOTICZ | - | - | x | x | x | x | x | - |
| USE_HOME_ASSISTANT | - | - | - | x | x | x | x | - |
| USE_MQTT_TLS | - | - | - | - | - | - | - | - |
| USE_MQTT_TLS_CA_CERT | - | - | - | - | - | - | - | - |
| USE_MQTT_AWS_IOT | - | - | - | - | - | - | - | - |
| USE_KNX | - | - | - | - | x | - | - | - |
| USE_WEBSERVER | x | x | x | x | x | x | x | x | WifiManager
| USE_JAVASCRIPT_ES6 | - | - | - | - | - | - | - | - |
| USE_WEBSEND_RESPONSE | - | - | - | - | - | - | - | - |
| USE_EMULATION_HUE | - | x | x | x | - | x | - | - |
| USE_EMULATION_WEMO | - | x | x | x | - | x | - | - |
| USE_DISCOVERY | - | - | x | x | x | - | - | x |
| WEBSERVER_ADVERTISE | - | - | x | x | x | - | - | x |
| MQTT_HOST_DISCOVERY | - | - | x | x | x | - | - | x |
| USE_TIMERS | - | x | - | x | x | x | x | x |
| USE_TIMERS_WEB | - | x | - | x | x | x | x | x |
| USE_SUNRISE | - | x | - | x | x | x | x | x |
| USE_RULES | - | x | - | x | x | x | x | x |
| USE_SCRIPT | - | - | - | - | - | - | - | - |
| USE_EXPRESSION | - | - | - | - | - | - | - | - |
| SUPPORT_IF_STATEMENT | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
| ROTARY_V1 | - | - | - | - | - | - | - | - |
| USE_SONOFF_RF | - | - | - | x | x | x | - | - |
| USE_RF_FLASH | - | - | - | x | x | x | - | - |
| USE_SONOFF_SC | - | - | - | x | - | x | - | - |
| USE_TUYA_MCU | - | x | - | x | x | x | - | x |
| USE_ARMTRONIX_DIMMERS | - | - | - | x | x | - | - | - |
| USE_PS_16_DZ | - | - | - | x | x | x | - | - |
| USE_SONOFF_IFAN | - | - | - | x | x | x | - | - |
| USE_BUZZER | - | - | - | x | x | x | - | - |
| USE_ARILUX_RF | - | - | - | x | x | x | - | - |
| USE_SHUTTER | - | - | - | - | - | - | - | - |
| USE_DEEPSLEEP | - | - | - | - | - | - | - | - |
| USE_EXS_DIMMER | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
| USE_LIGHT | - | x | x | x | x | x | x | x |
| USE_WS2812 | - | - | x | x | x | x | - | x |
| USE_WS2812_DMA | - | - | - | - | - | - | - | - |
| USE_MY92X1 | - | - | - | x | x | x | - | x |
| USE_SM16716 | - | - | - | x | x | x | - | x |
| USE_SM2135 | - | - | - | x | x | x | - | x |
| USE_SONOFF_L1 | - | - | - | x | x | x | - | x |
| | | | | | | | | |
| USE_ENERGY_SENSOR | - | x | x | x | x | x | - | - |
| USE_PZEM004T | - | - | - | x | x | x | - | - |
| USE_PZEM_AC | - | - | - | x | x | x | - | - |
| USE_PZEM_DC | - | - | - | x | x | x | - | - |
| USE_MCP39F501 | - | x | - | x | x | x | - | - |
| USE_SDM120 | - | - | - | - | - | x | - | - |
| USE_SDM630 | - | - | - | - | - | x | - | - |
| USE_DDS2382 | - | - | - | - | - | x | - | - |
| USE_DDSU666 | - | - | - | - | - | x | - | - |
| USE_SOLAX_X1 | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| USE_ADC_VCC | x | x | x | - | - | - | - | - |
| USE_COUNTER | - | - | - | x | x | x | x | x |
| USE_DS18x20 | - | - | x | x | x | x | - | x |
| USE_DHT | - | - | x | x | x | x | x | x |
| USE_MAX31855 | - | - | - | - | - | x | - | - |
| USE_MAX31865 | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
| USE_I2C | - | - | - | x | x | x | - | x |
| USE_SHT | - | - | - | x | x | x | - | x |
| USE_HTU | - | - | - | x | x | x | - | x |
| USE_BMP | - | - | - | x | x | x | - | x |
| USE_BME680 | - | - | - | - | - | x | - | - |
| USE_BH1750 | - | - | - | x | x | x | - | x |
| USE_VEML6070 | - | - | - | - | - | x | - | - |
| USE_ADS1115 | - | - | - | - | - | x | - | - |
| USE_ADS1115_I2CDEV | - | - | - | - | - | - | - | - |
| USE_INA219 | - | - | - | - | - | x | - | - |
| USE_INA226 | - | - | - | - | - | - | - | - |
| USE_SHT3X | - | - | - | x | x | x | - | x |
| USE_TSL2561 | - | - | - | - | - | x | - | - |
| USE_MGS | - | - | - | - | - | x | - | - |
| USE_SGP30 | - | - | - | x | x | x | - | x |
| USE_SI1145 | - | - | - | - | - | - | - | - |
| USE_LM75AD | - | - | - | x | x | x | - | x |
| USE_APDS9960 | - | - | - | - | - | - | - | - |
| USE_MCP230xx | - | - | - | - | - | - | - | - |
| USE_PCA9685 | - | - | - | - | - | - | - | - |
| USE_MPR121 | - | - | - | - | - | - | - | - |
| USE_CCS811 | - | - | - | - | - | - | - | - |
| USE_MPU6050 | - | - | - | - | - | - | - | - |
| USE_DS3231 | - | - | - | - | - | - | - | - |
| USE_MGC3130 | - | - | - | - | - | - | - | - |
| USE_MAX44009 | - | - | - | - | - | - | - | - |
| USE_SCD30 | - | - | - | - | - | x | - | - |
| USE_SPS30 | - | - | - | - | - | - | - | - |
| USE_ADE7953 | - | - | - | x | x | x | - | x |
| USE_VL53L0X | - | - | - | - | - | - | - | - |
| USE_MLX90614 | - | - | - | - | - | - | - | - |
| USE_CHIRP | - | - | - | - | - | - | - | - |
| USE_PAJ7620 | - | - | - | - | - | - | - | - |
| USE_PCF8574 | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
| USE_SPI | - | - | - | - | - | - | - | x |
| USE_MHZ19 | - | - | - | x | x | x | - | x |
| USE_SENSEAIR | - | - | - | x | x | x | - | x |
| USE_PMS5003 | - | - | - | x | x | x | - | x |
| USE_NOVA_SDS | - | - | - | x | x | x | - | x |
| USE_SERIAL_BRIDGE | - | - | - | x | x | x | - | x |
| USE_MP3_PLAYER | - | - | - | - | - | x | - | - |
| USE_AZ7798 | - | - | - | - | - | - | - | - |
| USE_PN532_HSU | - | - | - | - | - | x | - | - |
| USE_ZIGBEE | - | - | - | - | - | - | - | - | Experimental
| | | | | | | | | |
| USE_IR_REMOTE | - | - | - | x | x | x | x | x |
| USE_IR_HVAC | - | - | - | - | - | x | x | - |
| USE_IR_RECEIVE | - | - | - | x | x | x | x | x |
| | | | | | | | | |
| USE_SR04 | - | - | - | x | x | x | - | x |
| USE_TM1638 | - | - | - | - | - | x | - | - |
| USE_HX711 | - | - | - | x | x | x | - | x |
| USE_TX20_WIND_SENSOR | - | - | - | - | - | x | - | - |
| USE_RC_SWITCH | - | - | - | - | - | x | - | - |
| USE_RF_SENSOR | - | - | - | - | - | x | - | - | AlectoV2 only
| USE_HRE | - | - | - | - | - | x | - | - |
| USE_A4988_STEPPER | - | - | - | - | - | - | - | - |
| USE_ARDUINO_SLAVE | - | - | - | - | - | - | - | - |
| | | | | | | | | |
| Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | ir | display | Remarks
| USE_DISPLAY | - | - | - | - | - | - | - | x |
| USE_DISPLAY_LCD | - | - | - | - | - | - | - | x |
| USE_DISPLAY_SSD1306 | - | - | - | - | - | - | - | x |
| USE_DISPLAY_MATRIX | - | - | - | - | - | - | - | x |
| USE_DISPLAY_SH1106 | - | - | - | - | - | - | - | x |
| USE_DISPLAY_ILI9341 | - | - | - | - | - | - | - | x |
| USE_DISPLAY_EPAPER_29 | - | - | - | - | - | - | - | x | Disabled for core 2.3.0
| USE_DISPLAY_EPAPER_42 | - | - | - | - | - | - | - | x | Disabled for core 2.3.0
| USE_DISPLAY_ILI9488 | - | - | - | - | - | - | - | - |
| USE_DISPLAY_SSD1351 | - | - | - | - | - | - | - | - |
| USE_DISPLAY_RA8876 | - | - | - | - | - | - | - | - |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
|-----------------------|---------|-------|--------|-----|---------|----|---------|--------
| MY_LANGUAGE en-GB | x | x | x | x | x | x | x |
| USE_ARDUINO_OTA | - | - | - | - | - | - | - |
| USE_DOMOTICZ | - | - | x | x | x | x | - |
| USE_HOME_ASSISTANT | - | - | x | x | x | x | - |
| USE_MQTT_TLS | - | - | - | - | - | - | - |
| USE_MQTT_TLS_CA_CERT | - | - | - | - | - | - | - |
| USE_MQTT_AWS_IOT | - | - | - | - | - | - | - |
| USE_KNX | - | - | - | x | - | - | - |
| USE_WEBSERVER | x | x | x | x | x | x | x |
| USE_JAVASCRIPT_ES6 | - | - | - | - | - | - | - |
| USE_WEBSEND_RESPONSE | - | - | - | - | - | - | - |
| USE_EMULATION_HUE | - | x | x | - | x | - | - |
| USE_EMULATION_WEMO | - | x | x | - | x | - | - |
| USE_DISCOVERY | - | - | x | x | - | - | x |
| WEBSERVER_ADVERTISE | - | - | x | x | - | - | x |
| MQTT_HOST_DISCOVERY | - | - | x | x | - | - | x |
| USE_TIMERS | - | x | x | x | x | x | x |
| USE_TIMERS_WEB | - | x | x | x | x | x | x |
| USE_SUNRISE | - | x | x | x | x | x | x |
| USE_RULES | - | x | x | x | x | x | x |
| USE_SCRIPT | - | - | - | - | - | - | - |
| USE_EXPRESSION | - | - | - | - | - | - | - |
| SUPPORT_IF_STATEMENT | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
| ROTARY_V1 | - | - | - | - | - | - | - |
| USE_SONOFF_RF | - | - | x | x | x | - | - |
| USE_RF_FLASH | - | - | x | x | x | - | - |
| USE_SONOFF_SC | - | - | x | - | x | - | - |
| USE_TUYA_MCU | - | x | x | x | x | - | x |
| USE_ARMTRONIX_DIMMERS | - | - | x | x | - | - | - |
| USE_PS_16_DZ | - | - | x | x | x | - | - |
| USE_SONOFF_IFAN | - | - | x | x | x | - | - |
| USE_BUZZER | - | - | x | x | x | - | - |
| USE_ARILUX_RF | - | - | x | x | x | - | - |
| USE_SHUTTER | - | - | - | - | - | - | - |
| USE_DEEPSLEEP | - | - | - | - | - | - | - |
| USE_EXS_DIMMER | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
| USE_LIGHT | - | x | x | x | x | x | x |
| USE_WS2812 | - | - | x | x | x | - | x |
| USE_WS2812_DMA | - | - | - | - | - | - | - |
| USE_MY92X1 | - | - | x | x | x | - | x |
| USE_SM16716 | - | - | x | x | x | - | x |
| USE_SM2135 | - | - | x | x | x | - | x |
| USE_SONOFF_L1 | - | - | x | x | x | - | x |
| | | | | | | | |
| USE_ENERGY_SENSOR | - | x | x | x | x | - | - |
| USE_PZEM004T | - | - | x | x | x | - | - |
| USE_PZEM_AC | - | - | x | x | x | - | - |
| USE_PZEM_DC | - | - | x | x | x | - | - |
| USE_MCP39F501 | - | x | x | x | x | - | - |
| USE_SDM120 | - | - | - | - | x | - | - |
| USE_SDM630 | - | - | - | - | x | - | - |
| USE_DDS2382 | - | - | - | - | x | - | - |
| USE_DDSU666 | - | - | - | - | x | - | - |
| USE_SOLAX_X1 | - | - | - | - | - | - | - |
| | | | | | | | |
| USE_ADC_VCC | x | x | - | - | - | - | - |
| USE_COUNTER | - | - | x | x | x | x | x |
| USE_DS18x20 | - | - | x | x | x | - | x |
| USE_DHT | - | - | x | x | x | x | x |
| USE_MAX31855 | - | - | - | - | x | - | - |
| USE_MAX31865 | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
| USE_I2C | - | - | x | x | x | - | x |
| USE_SHT | - | - | x | x | x | - | x |
| USE_HTU | - | - | x | x | x | - | x |
| USE_BMP | - | - | x | x | x | - | x |
| USE_BME680 | - | - | - | - | x | - | - |
| USE_BH1750 | - | - | x | x | x | - | x |
| USE_VEML6070 | - | - | - | - | x | - | - |
| USE_ADS1115 | - | - | - | - | x | - | - |
| USE_ADS1115_I2CDEV | - | - | - | - | - | - | - |
| USE_INA219 | - | - | - | - | x | - | - |
| USE_INA226 | - | - | - | - | - | - | - |
| USE_SHT3X | - | - | x | x | x | - | x |
| USE_TSL2561 | - | - | - | - | x | - | - |
| USE_MGS | - | - | - | - | x | - | - |
| USE_SGP30 | - | - | x | x | x | - | x |
| USE_SI1145 | - | - | - | - | - | - | - |
| USE_LM75AD | - | - | x | x | x | - | x |
| USE_APDS9960 | - | - | - | - | - | - | - |
| USE_MCP230xx | - | - | - | - | - | - | - |
| USE_PCA9685 | - | - | - | - | - | - | - |
| USE_MPR121 | - | - | - | - | - | - | - |
| USE_CCS811 | - | - | - | - | - | - | - |
| USE_MPU6050 | - | - | - | - | - | - | - |
| USE_DS3231 | - | - | - | - | - | - | - |
| USE_MGC3130 | - | - | - | - | - | - | - |
| USE_MAX44009 | - | - | - | - | - | - | - |
| USE_SCD30 | - | - | - | - | x | - | - |
| USE_SPS30 | - | - | - | - | - | - | - |
| USE_ADE7953 | - | - | x | x | x | - | x |
| USE_VL53L0X | - | - | - | - | - | - | - |
| USE_MLX90614 | - | - | - | - | - | - | - |
| USE_CHIRP | - | - | - | - | - | - | - |
| USE_PAJ7620 | - | - | - | - | - | - | - |
| USE_PCF8574 | - | - | - | - | - | - | - |
| | | | | | | | |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
| USE_SPI | - | - | - | - | - | - | x |
| USE_MHZ19 | - | - | x | x | x | - | x |
| USE_SENSEAIR | - | - | x | x | x | - | x |
| USE_PMS5003 | - | - | x | x | x | - | x |
| USE_NOVA_SDS | - | - | x | x | x | - | x |
| USE_SERIAL_BRIDGE | - | - | x | x | x | - | x |
| USE_MP3_PLAYER | - | - | - | - | x | - | - |
| USE_AZ7798 | - | - | - | - | - | - | - |
| USE_PN532_HSU | - | - | - | - | x | - | - |
| USE_ZIGBEE | - | - | - | - | - | - | - | Experimental
| | | | | | | | |
| USE_IR_REMOTE | - | - | x | x | x | x | x |
| USE_IR_HVAC | - | - | - | - | x | x | - |
| USE_IR_RECEIVE | - | - | x | x | x | x | x |
| | | | | | | | |
| USE_SR04 | - | - | x | x | x | - | x |
| USE_TM1638 | - | - | - | - | x | - | - |
| USE_HX711 | - | - | x | x | x | - | x |
| USE_TX20_WIND_SENSOR | - | - | - | - | x | - | - |
| USE_RC_SWITCH | - | - | - | - | x | - | - |
| USE_RF_SENSOR | - | - | - | - | x | - | - | AlectoV2 only
| USE_HRE | - | - | - | - | x | - | - |
| USE_A4988_STEPPER | - | - | - | - | - | - | - |
| USE_ARDUINO_SLAVE | - | - | - | - | - | - | - | Experimental
| | | | | | | | |
| Feature or Sensor | minimal | basic | sonoff | knx | sensors | ir | display | Remarks
| USE_DISPLAY | - | - | - | - | - | - | x |
| USE_DISPLAY_LCD | - | - | - | - | - | - | x |
| USE_DISPLAY_SSD1306 | - | - | - | - | - | - | x |
| USE_DISPLAY_MATRIX | - | - | - | - | - | - | x |
| USE_DISPLAY_SH1106 | - | - | - | - | - | - | x |
| USE_DISPLAY_ILI9341 | - | - | - | - | - | - | x |
| USE_DISPLAY_EPAPER_29 | - | - | - | - | - | - | x | Disabled for core 2.3.0
| USE_DISPLAY_EPAPER_42 | - | - | - | - | - | - | x | Disabled for core 2.3.0
| USE_DISPLAY_ILI9488 | - | - | - | - | - | - | - |
| USE_DISPLAY_SSD1351 | - | - | - | - | - | - | - |
| USE_DISPLAY_RA8876 | - | - | - | - | - | - | - |
## Changelog
Version 6.6.0 20190707
* Remove support of TLS on core 2.3.0 and extent support on core 2.4.2 and up
* Remove MQTT uptime message every hour
* Refactor some defines to const
* Refactor webserver HTML input, button, textarea, and select name based on id
* Refactor webserver sensor data collection
* Refactor TLS based on BearSSL, warning breaking change for fingerprints validation
* Refactor management of lights, using classes and integers instead of floats
* Refactor UDP initial message handling from string to char using static memory and add debug info (#5505)
* Refactor ``IRsend`` and receive for 64-bit support (#5523)
* Refactor MQTT which might solve issue (#5755)
* Refactor ``IRSend`` by using heap when more than 199 values need to be send. May need increase of define MQTT_MAX_PACKET_SIZE too (#5950)
* Refactor double to float in rules, and replaced trigonometric functions from stdlib with smaller versions (#6005)
* Change pubsubclient MQTT_KEEPALIVE from 10 to 30 seconds for AWS IoT support
* Change gamma correction as default behavior, ie "Ledtable 1"
* Change PWM resolution from 8 to 10 bits for low brightness lights
* Change ``IRSend`` Panasonic protocol to 64-bit (#5523)
* Change ADC0 to enabled by default in my_user_config.h (#5671)
* Change define USE_EMULATION by USE_EMULATION_HUE and USE_EMULATION_WEMO (#5826)
* Change default ``PowerDelta`` from 80% to 0% on new installations (#5858, #5028, #4813, #4130, #4145, #3795, #3778, #3660, #3648)
* Fix display Bug in KNX webmenu for Physical Address
* Fix the Unescape() function and the ``SendSerial3`` behaviour
* Fix webserver multiple Javascript window.onload functionality
* Fix TasmotaSerial at 9600 bps solving DFPlayer comms (#5528)
* Fix Configure Timer Web GUI (#5568)
* Fix Shelly 2.5 I2C address priority issue when VEML6070 code is present by disabling VEML6070 for Shelly 2.5 (#5592)
* Fix use of ``SerialDelimiter`` value 128 (#5634)
* Fix Sonoff Pow R2 / S31 invalid energy increments (#5789)
* Fix core 2.5.x ISR not in IRAM exception (#5837)
* Fix Philips Hue emulation Alexa issue by using part of MAC address for LightId (#5849)
* Fix missing white channel for WS2812 (#5869)
* Fix PZem startup issue (#5875)
* Fix exception 9 when syslog is enabled and NTP is just synced (#5917)
* Fix Toggle functionality to button double press when one button and two devices are detected (#5935)
* Fix command ``Channel`` for dual dimmers (#5940)
* Fix not restoring white value on power off/power on (#5993)
* Add command ``AdcParam`` to control ADC0 Temperature and Light formula parameters
* Add command ``LedMask`` to assign which relay has access to power LED (#5602, #5612)
* Add extended LED power control using command ``LedPowerX`` where X is 1 to 4. Enabled when "LedLink(i)" is configured too (#5709)
* Add command ``Sensor20 1..255`` to change Nova Fitness SDS01 working period in minutes (#5452)
* Add command ``SetOption38 6..255`` to set IRReceive protocol detection sensitivity mimizing UNKNOWN protocols (#5853)
* Add command ``SetOption39 1..255`` to control CSE7766 (Pow R2) or HLW8032 (Blitzwolf SHP5) handling of power loads below 6W. Default setting is 128 (#5756)
* Add command ``SetOption40 0..250`` to disable button functionality if activated for over 0.1 second. Needs SetOption1 1 and SetOption13 0 (#5449)
* Add command ``SetOption63 0/1`` to disable relay state feedback scan at restart (#5594, #5663)
* Add command ``SetOption64 0/1`` to switch between "-" or "_" as sensor index separator impacting DS18X20, DHT, BMP and SHT3X sensor names (#5689)
* Add command ``SetOption65 0/1`` and more Tuya Serial based device support (#5815)
* Add command ``WebColor`` to change GUI colors on the fly
* Add support for AWS IoT with TLS 1.2 on core 2.4.2 and up. Full doc here: https://github.com/arendst/Sonoff-Tasmota/wiki/AWS-IoT
* Add support for Badger HR-E Water Meter (#5539)
* Add support for Shelly 2.5 Energy and overtemp Monitoring (#5592)
* Add support for color and colortone for Philips Hue emulation via Alexa (#5600 #4809)
* Add support for Scripts as replacement for Rules. Default disabled but can be enabled in my_user_config.h (#5689)
* Add support for up to four LEDs related to four power outputs. Enabled when "LedLink(i)" is configured too (#5709)
* Add support for Shelly 1PM Template ``{"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,0,0,0,21,0],"FLAG":2,"BASE":18}`` (#5716)
* Add support for SPS30 Particle sensor thanks to Gerhard Mutz (#5830)
* Add support for VL53L0x time of flight sensor. Might interfere with TSL2561 using same I2C address (#5845)
* Add support for Sonoff L1 thanks to reef-actor (#6002)
* Add rule Http#Initialized
* Add rule System#Save executed just before a planned restart
* Add rule support for single JSON value pair like {"SSerialReceived":"on"} by expanding it to {"SSerialReceived":{"Data":"on"}} allowing for trigger SSerialReceived#Data=on (#5638)
* Add define USE_COUNTER to my_user_config.h to save space in sonoff-basic.bin and sonoff-minimal.bin
* Add define USE_DHT to my_user_config.h to save space in sonoff-basic.bin
* Add defines USE_EMULATION_WEMO and USE_EMULATION_HUE to my_user_config.h to control emulation features at compile time (#5826)
* Add Toggle functionality to button double press when more devices are detected
* Add device OverTemp (>73 Celsius) detection to Energy Monitoring devices with temperature sensor powering off all outputs
* Add Tuya Dimmer 10 second heartbeat serial packet required by some Tuya dimmer secondary MCUs
* Add all temperature, humidity and pressure for global access
* Add validation check when loading settings from flash
* Add HX711 weight restore after controlled restart or after power restore just before executing command Sensor34 7 (#5367, #5786)
* Add GUI hexadecimal color options in my_user_config.h (#5586)
* Add alternative ``IRSend`` command syntax ``IRSend raw,<freq>,<header mark>,<header space>,<bit mark>,<zero space>,<one space>,<bit stream>`` (#5610)
* Add user configurable ADC0 to Module and Template configuration compatible with current FLAG options (#5671)
* Add AriLux RF control GPIO option "ALux IrSel" (159) replacing "Led4i" (59) for full LED control (#5709)
* Add LED GPIO option "LedLink" (157) and "LedLinki" (158) to select dedicated link status LED (#5709)
* Add all 5 PWM channels individually adressable with LEDs. (#5741)
* Add reset of Energy values when connection to sensor is lost for over 4 seconds (#5874, #5881)
* Add checkbox to GUI password field enabling visibility during password entry only (#5934)
Version 6.7.0 20191101
* TBS

View File

@ -17,7 +17,6 @@ build_cache_dir = .cache
;default_envs = sonoff-ircustom ; alternative to 'sonoff' with full IR protocols activated, you will need to disable some features to keep code not too big
;default_envs = sonoff-minimal
;default_envs = sonoff-basic
;default_envs = sonoff-classic
;default_envs = sonoff-knx
;default_envs = sonoff-sensors
;default_envs = sonoff-display
@ -212,7 +211,6 @@ build_flags = ${core_active.build_flags}
; -DDEBUG_TASMOTA_SENSOR
; *** Optional Firmware configurations
; -DFIRMWARE_CLASSIC
; -DFIRMWARE_MINIMAL
; -DFIRMWARE_SENSORS
; -DFIRMWARE_BASIC
@ -290,20 +288,6 @@ upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
extra_scripts = ${common.extra_scripts}
[env:sonoff-classic]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board}
board_build.flash_mode = ${common.board_build.flash_mode}
board_build.f_cpu = ${common.board_build.f_cpu}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} -DFIRMWARE_CLASSIC
monitor_speed = ${common.monitor_speed}
upload_port = ${common.upload_port}
upload_resetmethod = ${common.upload_resetmethod}
upload_speed = ${common.upload_speed}
extra_scripts = ${common.extra_scripts}
[env:sonoff-knx]
platform = ${common.platform}
framework = ${common.framework}

View File

@ -1,4 +1,8 @@
/*********************************************************************************************\
* 6.6.0.21 20191022
* Remove support for WPS and SmartConfig in favour of Web server (!) based WifiManager (#6680)
* Remove binary sonoff-classic (#6680)
*
* 6.6.0.20 20191018
* Add command SetOption65 0/1 to disable (1) fast power cycle detection fixing unwanted brownout trigger
* Add absolute PowerDelta using command PowerDelta 101..32000 where 101 = 101-100 = 1W, 202 = 202-100 = 102W (#5901)

View File

@ -258,9 +258,7 @@
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_WCFG_6_SERIAL "Serial"
@ -599,16 +597,16 @@ const char S_OFFLINE[] PROGMEM = D_OFFLINE;
// sonoff.ino
#define MAX_BUTTON_COMMANDS 5 // Max number of button commands supported
const char kCommands[MAX_BUTTON_COMMANDS][14] PROGMEM = {
D_CMND_WIFICONFIG " 1", // Press button three times
D_CMND_WIFICONFIG " 2", // Press button three times
D_CMND_WIFICONFIG " 2", // Press button four times
D_CMND_WIFICONFIG " 3", // Press button five times
D_CMND_WIFICONFIG " 2", // Press button five times
D_CMND_RESTART " 1", // Press button six times
D_CMND_UPGRADE " 1" }; // Press button seven times
const char kWifiConfig[MAX_WIFI_OPTION][WCFG_MAX_STRING_LENGTH] PROGMEM = {
D_WCFG_0_RESTART,
D_WCFG_1_SMARTCONFIG,
D_WCFG_2_WIFIMANAGER,
D_WCFG_3_WPSCONFIG,
D_WCFG_2_WIFIMANAGER,
D_WCFG_2_WIFIMANAGER,
D_WCFG_4_RETRY,
D_WCFG_5_WAIT,
D_WCFG_6_SERIAL,
@ -618,7 +616,7 @@ const char kPrefixes[3][PRFX_MAX_STRING_LENGTH] PROGMEM = {
D_STAT,
D_TELE };
const char kCodeImage[] PROGMEM = "sonoff|minimal|classic|sensors|knx|basic|display|ir";
const char kCodeImage[] PROGMEM = "sonoff|minimal|sensors|knx|basic|display|ir";
// support.ino
static const char kMonthNames[] = D_MONTH3LIST;

View File

@ -67,13 +67,8 @@
#define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID
#define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password
#define WIFI_CONFIG_TOOL WIFI_RETRY // [WifiConfig] Default tool if wifi fails to connect (default option: 4 - WIFI_RETRY)
// (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY)
// The configuration can be changed after first setup using WifiConfig 0, 1, 2, 3, 4, 5, 6 and 7.
#define WIFI_CONFIG_NO_SSID WIFI_WPSCONFIG // Default tool if wifi fails to connect and no SSID is configured
// (WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_SERIAL)
// *** NOTE: When WPS is disabled by USE_WPS below, WIFI_WPSCONFIG will execute WIFI_MANAGER ***
// *** NOTE: When WIFI_MANAGER is disabled by USE_WEBSERVER below, WIFI_MANAGER will execute WIFI_SMARTCONFIG ***
// *** NOTE: When WIFI_SMARTCONFIG is disabled by USE_SMARTCONFIG below, WIFI_SMARTCONFIG will execute WIFI_SERIAL ***
// (WIFI_RESTART, WIFI_MANAGER, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY)
// The configuration can be changed after first setup using WifiConfig 0, 2, 4, 5, 6 and 7.
// -- Syslog --------------------------------------
#define SYS_LOG_HOST "" // [LogHost] (Linux) syslog host
@ -246,8 +241,6 @@
// -- Wifi Config tools ---------------------------
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI
//#define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+))
//#define USE_SMARTCONFIG // Add support for Wifi SmartConfig as initial wifi configuration tool (+23k code, +0.6k mem)
// -- OTA -----------------------------------------
//#define USE_ARDUINO_OTA // Add optional support for Arduino OTA (+13k code)
@ -562,7 +555,6 @@
* See RELEASENOTES.md for selected features
\*********************************************************************************************/
//#define FIRMWARE_CLASSIC // Create sonoff-classic with initial configuration tools WPS, SmartConfig and WifiManager
//#define FIRMWARE_BASIC // Create sonoff-basic with no sensors
//#define FIRMWARE_SENSORS // Create sonoff-sensors with useful sensors enabled
//#define FIRMWARE_KNX_NO_EMULATION // Create sonoff-knx with KNX but without Emulation

View File

@ -1213,6 +1213,11 @@ void SettingsDelta(void)
Settings.energy_power_delta = Settings.ex_energy_power_delta;
Settings.ex_energy_power_delta = 0;
}
if (Settings.version < 0x06060015) {
if ((EX_WIFI_SMARTCONFIG == Settings.sta_config) || (EX_WIFI_WPSCONFIG == Settings.sta_config)) {
Settings.sta_config = WIFI_MANAGER;
}
}
Settings.version = VERSION;
SettingsSave(1);

View File

@ -145,8 +145,6 @@ const uint32_t LOOP_SLEEP_DELAY = 50; // Lowest number of milliseconds to
#define MAX_RULE_TIMERS 8 // Max number of rule timers (4 bytes / timer)
#define MAX_RULE_VARS 5 // Max number of rule variables (10 bytes / variable)
#define NO_EXTRA_4K_HEAP // Allocate 4k heap for WPS in ESP8166/Arduino core v2.4.2 (was always allocated in previous versions)
/*
// Removed from esp8266 core since 20171105
#define min(a,b) ((a)<(b)?(a):(b))
@ -224,7 +222,7 @@ enum GetDateAndTimeOptions { DT_LOCAL, DT_UTC, DT_RESTART, DT_ENERGY };
enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE, LOG_LEVEL_ALL};
enum WifiConfigOptions {WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY, MAX_WIFI_OPTION};
enum WifiConfigOptions {WIFI_RESTART, EX_WIFI_SMARTCONFIG, WIFI_MANAGER, EX_WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL, WIFI_MANAGER_RESET_ONLY, MAX_WIFI_OPTION};
enum SwitchModeOptions {TOGGLE, FOLLOW, FOLLOW_INV, PUSHBUTTON, PUSHBUTTON_INV, PUSHBUTTONHOLD, PUSHBUTTONHOLD_INV, PUSHBUTTON_TOGGLE, MAX_SWITCH_OPTION};

View File

@ -24,18 +24,17 @@
* Function declarations
\*********************************************************************************************/
/*
#ifdef __cplusplus
extern "C" {
#endif
#include "user_interface.h"
// Function prototypes
void WifiWpsStatusCallback(wps_cb_status status);
#ifdef __cplusplus
}
#endif
*/
//#ifdef USE_KNX // Enabling this will fail compilation. It has no impact if not used. (20180417)
#include <esp-knx-ip.h>
@ -81,7 +80,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#ifdef FIRMWARE_SENSORS
#undef CODE_IMAGE
#define CODE_IMAGE 3
#define CODE_IMAGE 2
#undef USE_DISCOVERY // Disable mDNS (+8k code or +23.5k code with core 2_5_x, +0.3k mem)
@ -217,108 +216,6 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_SENSORS
/*********************************************************************************************\
* [sonoff-classic.bin]
* Provide an image close to version 5.12.0 but still within 499k program space to allow one time OTA
\*********************************************************************************************/
#ifdef FIRMWARE_CLASSIC
#undef CODE_IMAGE
#define CODE_IMAGE 2
#define USE_ADC_VCC // Display Vcc in Power status. Disable for use as Analog input on selected devices
#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 USE_ARDUINO_OTA // Disable support for Arduino OTA
//#undef USE_DOMOTICZ // Disable Domoticz
#undef USE_HOME_ASSISTANT // Disable Home Assistant
#undef USE_KNX // Disable KNX IP Protocol Support
#undef USE_CUSTOM // Disable Custom features
#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_SCRIPT // Disable support for script (+17k code)
// -- Optional modules ----------------------------
#undef ROTARY_V1 // Disable support for MI Desk Lamp
#undef USE_SONOFF_RF // Disable support for Sonoff Rf Bridge (+3k2 code)
#undef USE_RF_FLASH // Disable support for flashing the EFM8BB1 chip on the Sonoff RF Bridge. C2CK must be connected to GPIO4, C2D to GPIO5 on the PCB
#undef USE_SONOFF_SC // Disable support for Sonoff Sc (+1k1 code)
#undef USE_TUYA_MCU // Disable support for Tuya Serial MCU
#undef USE_ARMTRONIX_DIMMERS // Disable support for Armtronix Dimmers (+1k4 code)
#undef USE_PS_16_DZ // Disable support for PS-16-DZ Dimmer and Sonoff L1 (+2k code)
#undef USE_SONOFF_IFAN // Disable support for Sonoff iFan02 and iFan03 (+2k code)
#undef USE_BUZZER // Disable support for a buzzer (+0k6 code)
#undef USE_ARILUX_RF // Disable support for Arilux RF remote controller
#undef USE_SHUTTER // Disable Shutter support for up to 4 shutter with different motortypes (+6k code)
#undef USE_DEEPSLEEP // Disable support for deepsleep (+1k code)
#undef USE_EXS_DIMMER // Disable support for EX-Store WiFi Dimmer
// -- Optional light modules ----------------------
//#undef USE_LIGHT // Disable Dimmer/Light support
#define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
// #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow
#define USE_WS2812_HARDWARE NEO_HW_WS2812 // Hardware type (NEO_HW_WS2812, NEO_HW_WS2812X, NEO_HW_WS2813, NEO_HW_SK6812, NEO_HW_LC8812, NEO_HW_APA106)
#define USE_WS2812_CTYPE NEO_GRB // Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW)
#undef USE_MY92X1 // Disable support for MY92X1 RGBCW led controller as used in Sonoff B1, Ailight and Lohas
#undef USE_SM16716 // Disable support for SM16716 RGB LED controller (+0k7 code)
#undef USE_SM2135 // Disable support for SM2135 RGBCW led control as used in Action LSC (+0k6 code)
#undef USE_SONOFF_L1 // Disable support for Sonoff L1 led control
#undef USE_COUNTER // Disable counters
#define USE_DS18x20 // Add support for DS18x20 sensors with id sort, single scan and read retry (+2k6 code)
#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_SERIAL_BRIDGE // Disable support for software Serial Bridge
#undef USE_MP3_PLAYER // Disable DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop
#undef USE_AZ7798 // Disable support for AZ-Instrument 7798 CO2 datalogger
#undef USE_PN532_HSU // Disable support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
#undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8)
#undef USE_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module)
//#undef USE_ENERGY_SENSOR // Disable energy sensors (-14k code)
#undef USE_PZEM004T // Disable PZEM004T energy sensor
#undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor
#undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor
#undef USE_MCP39F501 // Disable support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code)
#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter
#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code)
#undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code)
#undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code)
#undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code)
#define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor
#undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI
#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI
#undef USE_IR_REMOTE // Disable IR remote commands using library IRremoteESP8266 and ArduinoJson
#undef USE_IR_RECEIVE // Disable support for IR receiver
#undef USE_ZIGBEE // Disable serial communication with Zigbee CC2530 flashed with ZNP
#undef USE_SR04 // Disable support for for HC-SR04 ultrasonic devices
#undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8
#undef USE_HX711 // Disable support for HX711 load cell
#undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer
#undef USE_RC_SWITCH // Disable support for RF transceiver using library RcSwitch
#undef USE_RF_SENSOR // Disable support for RF sensor receiver (434MHz or 868MHz) (+0k8 code)
#undef USE_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper
#undef USE_ARDUINO_SLAVE // Disable support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem)
#undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_CLASSIC
/*********************************************************************************************\
* [sonoff-knx.bin]
* Provide a dedicated KNX image allowing enough code and memory space
@ -327,7 +224,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#ifdef FIRMWARE_KNX_NO_EMULATION
#undef CODE_IMAGE
#define CODE_IMAGE 4
#define CODE_IMAGE 3
#ifndef USE_KNX
#define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem)
@ -347,7 +244,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#ifdef FIRMWARE_DISPLAYS
#undef CODE_IMAGE
#define CODE_IMAGE 6
#define CODE_IMAGE 5
#undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem)
#undef USE_EMULATION_HUE // Disable Hue Bridge emulation for Alexa (+14k code, +2k mem common)
@ -411,7 +308,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#ifdef FIRMWARE_IR
#undef CODE_IMAGE
#define CODE_IMAGE 7
#define CODE_IMAGE 6
#undef USE_EMULATION
#undef USE_EMULATION_HUE // Disable Hue emulation - only for lights and relays
@ -501,13 +398,11 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#ifdef FIRMWARE_BASIC
#undef CODE_IMAGE
#define CODE_IMAGE 5
#define CODE_IMAGE 4
#undef APP_SLEEP
#define APP_SLEEP 1 // Default to sleep = 1 for FIRMWARE_BASIC
#undef USE_WPS // Disable support for WPS as initial wifi configuration tool
#undef USE_SMARTCONFIG // Disable support for Wifi SmartConfig as initial wifi configuration tool
#undef USE_ARDUINO_OTA // Disable support for Arduino OTA
#undef USE_DOMOTICZ // Disable Domoticz
#undef USE_HOME_ASSISTANT // Disable Home Assistant
@ -607,8 +502,6 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#undef CODE_IMAGE
#define CODE_IMAGE 1
#undef USE_WPS // Disable support for WPS as initial wifi configuration tool
#undef USE_SMARTCONFIG // Disable support for Wifi SmartConfig as initial wifi configuration tool
#undef USE_ARDUINO_OTA // Disable support for Arduino OTA
#undef USE_DOMOTICZ // Disable Domoticz
#undef USE_HOME_ASSISTANT // Disable Home Assistant
@ -701,9 +594,8 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
* Mandatory defines satisfying possible disabled defines
\*********************************************************************************************/
#ifndef USE_WPS // See https://github.com/esp8266/Arduino/pull/4889
// See https://github.com/esp8266/Arduino/pull/4889
#undef NO_EXTRA_4K_HEAP // Allocate 4k heap for WPS in ESP8166/Arduino core v2.4.2 (was always allocated in previous versions)
#endif
#ifndef USE_SONOFF_RF
#undef USE_RF_FLASH // Disable RF firmware flash when SOnoff Rf is disabled
@ -714,7 +606,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c
#endif
#ifndef STARTING_OFFSET // NOVA SDS parameter used in settings
#define STARTING_OFFSET 30
#define STARTING_OFFSET 30
#endif
#ifndef MQTT_FINGERPRINT1

View File

@ -20,6 +20,6 @@
#ifndef _SONOFF_VERSION_H_
#define _SONOFF_VERSION_H_
const uint32_t VERSION = 0x06060014;
const uint32_t VERSION = 0x06060015;
#endif // _SONOFF_VERSION_H_

View File

@ -224,7 +224,7 @@ void ButtonHandler(void)
} else {
if (!restart_flag && !Button.hold_timer[button_index] && (Button.press_counter[button_index] > 0) && (Button.press_counter[button_index] < MAX_BUTTON_COMMANDS +3)) {
bool single_press = false;
if (Button.press_counter[button_index] < 3) { // Single or Double press
if (Button.press_counter[button_index] < 3) { // Single or Double press
if ((SONOFF_DUAL_R2 == my_module_type) || (SONOFF_DUAL == my_module_type) || (CH4 == my_module_type)) {
single_press = true;
} else {
@ -244,8 +244,8 @@ void ButtonHandler(void)
if (single_press && SendKey(KEY_BUTTON, button_index + Button.press_counter[button_index], POWER_TOGGLE)) { // Execute Toggle command via MQTT if ButtonTopic is set
// Success
} else {
if (Button.press_counter[button_index] < 3) { // Single or Double press
if (WifiState() > WIFI_RESTART) { // WPSconfig, Smartconfig or Wifimanager active
if (Button.press_counter[button_index] < 3) { // Single or Double press
if (WifiState() > WIFI_RESTART) { // Wifimanager active
restart_flag = 1;
} else {
ExecuteCommandPower(button_index + Button.press_counter[button_index], POWER_TOGGLE, SRC_BUTTON); // Execute Toggle command internally

View File

@ -113,10 +113,10 @@ void GetFeatures(void)
feature_drv1 |= 0x10000000; // xdrv_11_knx.ino
#endif
#ifdef USE_WPS
feature_drv1 |= 0x20000000; // support.ino
feature_drv1 |= 0x20000000; // support.ino - removed with version 6.6.0.21
#endif
#ifdef USE_SMARTCONFIG
feature_drv1 |= 0x40000000; // support.ino
feature_drv1 |= 0x40000000; // support.ino - removed with version 6.6.0.21
#endif
#ifdef USE_ENERGY_POWER_LIMIT
feature_drv1 |= 0x80000000; // xdrv_03_energy.ino

View File

@ -45,7 +45,6 @@ struct WIFI {
uint8_t retry_init;
uint8_t retry;
uint8_t status;
uint8_t wps_result;
uint8_t config_type = 0;
uint8_t config_counter = 0;
uint8_t mdns_begun = 0; // mDNS active
@ -75,46 +74,9 @@ bool WifiConfigCounter(void)
return (Wifi.config_counter);
}
extern "C" {
#include "user_interface.h"
}
void WifiWpsStatusCallback(wps_cb_status status);
void WifiWpsStatusCallback(wps_cb_status status)
{
/* from user_interface.h:
enum wps_cb_status {
WPS_CB_ST_SUCCESS = 0,
WPS_CB_ST_FAILED,
WPS_CB_ST_TIMEOUT,
WPS_CB_ST_WEP, // WPS failed because that WEP is not supported
WPS_CB_ST_SCAN_ERR, // can not find the target WPS AP
};
*/
Wifi.wps_result = status;
if (WPS_CB_ST_SUCCESS == Wifi.wps_result) {
wifi_wps_disable();
} else {
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_WIFI D_WPS_FAILED_WITH_STATUS " %d"), Wifi.wps_result);
Wifi.config_counter = 2;
}
}
bool WifiWpsConfigDone(void)
{
return (!Wifi.wps_result);
}
bool WifiWpsConfigBegin(void)
{
Wifi.wps_result = 99;
if (!wifi_wps_disable()) { return false; }
if (!wifi_wps_enable(WPS_TYPE_PBC)) { return false; } // so far only WPS_TYPE_PBC is supported (SDK 2.0.0)
if (!wifi_set_wps_cb((wps_st_cb_t) &WifiWpsStatusCallback)) { return false; }
if (!wifi_wps_start()) { return false; }
return true;
}
//extern "C" {
//#include "user_interface.h"
//}
void WifiConfig(uint8_t type)
{
@ -126,15 +88,11 @@ void WifiConfig(uint8_t type)
WiFi.disconnect(); // Solve possible Wifi hangs
Wifi.config_type = type;
#ifndef USE_WPS
if (WIFI_WPSCONFIG == Wifi.config_type) { Wifi.config_type = WIFI_MANAGER; }
#endif // USE_WPS
#ifndef USE_WEBSERVER
if (WIFI_MANAGER == Wifi.config_type) { Wifi.config_type = WIFI_SMARTCONFIG; }
if (WIFI_MANAGER == Wifi.config_type) {
Wifi.config_type = WIFI_SERIAL;
}
#endif // USE_WEBSERVER
#ifndef USE_SMARTCONFIG
if (WIFI_SMARTCONFIG == Wifi.config_type) { Wifi.config_type = WIFI_SERIAL; }
#endif // USE_SMARTCONFIG
Wifi.config_counter = WIFI_CONFIG_SEC; // Allow up to WIFI_CONFIG_SECS seconds for phone to provide ssid/pswd
Wifi.counter = Wifi.config_counter +5;
@ -145,23 +103,6 @@ void WifiConfig(uint8_t type)
else if (WIFI_SERIAL == Wifi.config_type) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_6_SERIAL " " D_ACTIVE_FOR_3_MINUTES));
}
#ifdef USE_SMARTCONFIG
else if (WIFI_SMARTCONFIG == Wifi.config_type) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_1_SMARTCONFIG " " D_ACTIVE_FOR_3_MINUTES));
WiFi.mode(WIFI_STA); // Disable AP mode
WiFi.beginSmartConfig();
}
#endif // USE_SMARTCONFIG
#ifdef USE_WPS
else if (WIFI_WPSCONFIG == Wifi.config_type) {
if (WifiWpsConfigBegin()) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_ACTIVE_FOR_3_MINUTES));
} else {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_FAILED_TO_START));
Wifi.config_counter = 3;
}
}
#endif // USE_WPS
#ifdef USE_WEBSERVER
else if (WIFI_MANAGER == Wifi.config_type || WIFI_MANAGER_RESET_ONLY == Wifi.config_type) {
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_2_WIFIMANAGER " " D_ACTIVE_FOR_3_MINUTES));
@ -452,7 +393,7 @@ void WifiCheckIp(void)
AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_TIMEOUT));
} else {
if (('\0' == Settings.sta_ssid[0][0]) && ('\0' == Settings.sta_ssid[1][0])) {
wifi_config_tool = WIFI_CONFIG_NO_SSID; // Skip empty SSIDs and start Wifi config tool
wifi_config_tool = WIFI_MANAGER; // Skip empty SSIDs and start Wifi config tool
Wifi.retry = 0;
} else {
AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR(D_ATTEMPTING_CONNECTION));
@ -487,9 +428,7 @@ void WifiCheck(uint8_t param)
Wifi.counter--;
switch (param) {
case WIFI_SERIAL:
case WIFI_SMARTCONFIG:
case WIFI_MANAGER:
case WIFI_WPSCONFIG:
WifiConfig(param);
break;
default:
@ -497,16 +436,6 @@ void WifiCheck(uint8_t param)
Wifi.config_counter--;
Wifi.counter = Wifi.config_counter +5;
if (Wifi.config_counter) {
#ifdef USE_SMARTCONFIG
if ((WIFI_SMARTCONFIG == Wifi.config_type) && WiFi.smartConfigDone()) {
Wifi.config_counter = 0;
}
#endif // USE_SMARTCONFIG
#ifdef USE_WPS
if ((WIFI_WPSCONFIG == Wifi.config_type) && WifiWpsConfigDone()) {
Wifi.config_counter = 0;
}
#endif // USE_WPS
if (!Wifi.config_counter) {
if (strlen(WiFi.SSID().c_str())) {
strlcpy(Settings.sta_ssid[0], WiFi.SSID().c_str(), sizeof(Settings.sta_ssid[0]));
@ -515,13 +444,10 @@ void WifiCheck(uint8_t param)
strlcpy(Settings.sta_pwd[0], WiFi.psk().c_str(), sizeof(Settings.sta_pwd[0]));
}
Settings.sta_active = 0;
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_WIFI D_WCFG_1_SMARTCONFIG D_CMND_SSID "1 %s"), Settings.sta_ssid[0]);
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_WIFI D_WCFG_2_WIFIMANAGER D_CMND_SSID "1 %s"), Settings.sta_ssid[0]);
}
}
if (!Wifi.config_counter) {
#ifdef USE_SMARTCONFIG
if (WIFI_SMARTCONFIG == Wifi.config_type) { WiFi.stopSmartConfig(); }
#endif // USE_SMARTCONFIG
// SettingsSdkErase(); // Disabled v6.1.0b due to possible bad wifi connects
restart_flag = 2;
}

View File

@ -28,7 +28,7 @@
#define XDRV_01 1
#ifndef WIFI_SOFT_AP_CHANNEL
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 11 as used by SmartConfig web GUI
#define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 11 as used by WifiManager web GUI
#endif
const uint16_t CHUNKED_BUFFER_SIZE = 400; // Chunk buffer size (should be smaller than half mqtt_date size)
@ -2043,9 +2043,9 @@ void HandleUploadDone(void)
} else { // It was a normal firmware file, or we are ready to restart device
restart_flag = 2;
}
#else
#else
restart_flag = 2; // Always restart to re-enable disabled features during update
#endif
#endif
}
SettingsBufferFree();
WSContentSend_P(PSTR("</div><br>"));
@ -2055,7 +2055,7 @@ void HandleUploadDone(void)
if (ArduinoSlave_GetFlagFlashing()) {
ArduinoSlave_Flash();
}
#endif
#endif
}
void HandleUploadLoop(void)

View File

@ -575,11 +575,7 @@ void TuyaSetWifiLed(void)
{
uint8_t wifi_state = 0x02;
switch(WifiState()){
case WIFI_SMARTCONFIG:
wifi_state = 0x00;
break;
case WIFI_MANAGER:
case WIFI_WPSCONFIG:
wifi_state = 0x01;
break;
case WIFI_RESTART:

View File

@ -140,11 +140,7 @@ void ArmtronixSetWifiLed(void)
uint8_t wifi_state = 0x02;
switch (WifiState()) {
case WIFI_SMARTCONFIG:
wifi_state = 0x00;
break;
case WIFI_MANAGER:
case WIFI_WPSCONFIG:
wifi_state = 0x01;
break;
case WIFI_RESTART: