Merge branch 'development' into pre-release

This commit is contained in:
Theo Arends 2020-05-10 14:59:41 +02:00
commit 878f3da25c
7 changed files with 42 additions and 25 deletions

View File

@ -82,6 +82,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044) - Add command ``SetOption90 1`` to disable non-json MQTT messages (#8044)
- Add command ``SetOption91 1`` to enable fading at startup / power on - Add command ``SetOption91 1`` to enable fading at startup / power on
- Add command ``SetOption92 1`` to set PWM Mode from regular PWM to ColorTemp control (Xiaomi Philips ...) - Add command ``SetOption92 1`` to set PWM Mode from regular PWM to ColorTemp control (Xiaomi Philips ...)
- Add command ``SetOption93 1`` to control caching of compressed rules
- Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016) - Add command ``Sensor10 0/1/2`` to control BH1750 resolution - 0 = High (default), 1 = High2, 2 = Low (#8016)
- Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016) - Add command ``Sensor10 31..254`` to control BH1750 measurement time which defaults to 69 (#8016)
- Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128) - Add command ``Sensor18 0..32000`` to control PMS5003 sensor interval to extend lifetime by Gene Ruebsamen (#8128)
@ -103,5 +104,5 @@ The following binary downloads have been compiled with ESP8266/Arduino library c
- Add support for OpenTherm by Yuriy Sannikov (#8373) - Add support for OpenTherm by Yuriy Sannikov (#8373)
- Add support for Thermostat control by arijav (#8212) - Add support for Thermostat control by arijav (#8212)
- Add experimental basic support for Tasmota on ESP32 based on work by Jörg Schüler-Maroldt - Add experimental basic support for Tasmota on ESP32 based on work by Jörg Schüler-Maroldt
- Add automatic compression of Rules to achieve ~60% compression, added ``SetOption93 1`` to control caching of rules - Add automatic compression of Rules to achieve ~60% compression by Stefan Hadinger
- Add rule trigger at root level like ``on loadavg<50 do power 2 endon`` after ``state`` command - Add rule trigger at root level like ``on loadavg<50 do power 2 endon`` after ``state`` command

View File

@ -12,7 +12,8 @@
- Add support for analog anemometer by Matteo Albinola (#8283) - Add support for analog anemometer by Matteo Albinola (#8283)
- Add support for OpenTherm by Yuriy Sannikov (#8373) - Add support for OpenTherm by Yuriy Sannikov (#8373)
- Add support for Thermostat control by arijav (#8212) - Add support for Thermostat control by arijav (#8212)
- Add automatic compression of Rules to achieve ~60% compression, added ``SetOption93 1`` to control caching of rules - Add automatic compression of Rules to achieve ~60% compression by Stefan Hadinger
- Add command ``SetOption93 1`` to control caching of compressed rules
- Add rule trigger at root level like ``on loadavg<50 do power 2 endon`` after ``state`` command - Add rule trigger at root level like ``on loadavg<50 do power 2 endon`` after ``state`` command
- Change flash access removing support for any Core before 2.6.3 - Change flash access removing support for any Core before 2.6.3
- Change HAss discovery by Federico Leoni (#8370) - Change HAss discovery by Federico Leoni (#8370)

View File

@ -395,9 +395,9 @@
// #define USE_PING // Enable Ping command (+2k code) // #define USE_PING // Enable Ping command (+2k code)
// -- Rules or Script ---------------------------- // -- Rules or Script ----------------------------
// Select none or only one of the below defines // Select none or only one of the below defines USE_RULES or USE_SCRIPT
#define USE_RULES // Add support for rules (+8k code) #define USE_RULES // Add support for rules (+8k code)
// #define USE_RULES_COMPRESSION // Compresses rules in Flash at about ~50% (+3.8k code) #define USE_RULES_COMPRESSION // Compresses rules in Flash at about ~50% (+3.8k code)
//#define USE_SCRIPT // Add support for script (+17k code) //#define USE_SCRIPT // Add support for script (+17k code)
//#define USE_SCRIPT_FATFS 4 // Script: Add FAT FileSystem Support //#define USE_SCRIPT_FATFS 4 // Script: Add FAT FileSystem Support
@ -670,7 +670,7 @@
//#define USE_A4988_STEPPER // Add support for A4988/DRV8825 stepper-motor-driver-circuit (+10k5 code) //#define USE_A4988_STEPPER // Add support for A4988/DRV8825 stepper-motor-driver-circuit (+10k5 code)
// -- Thermostat control ---------------------------- // -- Thermostat control ----------------------------
//#define USE_THERMOSTAT // Add support for Thermostat //#define USE_THERMOSTAT // Add support for Thermostat
#define THERMOSTAT_CONTROLLER_OUTPUTS 1 // Number of outputs to be controlled independently #define THERMOSTAT_CONTROLLER_OUTPUTS 1 // Number of outputs to be controlled independently
#define THERMOSTAT_SENSOR_NAME "DS18B20" // Name of the local sensor to be used #define THERMOSTAT_SENSOR_NAME "DS18B20" // Name of the local sensor to be used
#define THERMOSTAT_RELAY_NUMBER 1 // Default output relay number for the first controller (+i for following ones) #define THERMOSTAT_RELAY_NUMBER 1 // Default output relay number for the first controller (+i for following ones)

View File

@ -477,7 +477,7 @@ void GetFeatures(void)
#ifdef USE_EXS_DIMMER #ifdef USE_EXS_DIMMER
feature5 |= 0x00008000; // xdrv_30_exs_dimmer.ino feature5 |= 0x00008000; // xdrv_30_exs_dimmer.ino
#endif #endif
#ifdef USE_ARDUINO_SLAVE #ifdef USE_TASMOTA_SLAVE
feature5 |= 0x00010000; // xdrv_31_arduino_slave.ino feature5 |= 0x00010000; // xdrv_31_arduino_slave.ino
#endif #endif
#ifdef USE_HIH6 #ifdef USE_HIH6

View File

@ -143,12 +143,15 @@
#define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max) #define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max)
//#define USE_AZ7798 // Add support for AZ-Instrument 7798 CO2 datalogger //#define USE_AZ7798 // Add support for AZ-Instrument 7798 CO2 datalogger
#define USE_PN532_HSU // Add support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem) #define USE_PN532_HSU // Add support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
//#define USE_ZIGBEE // Enable serial communication with Zigbee CC2530 flashed with ZNP
#define USE_RDM6300 // Add support for RDM6300 125kHz RFID Reader (+0k8) #define USE_RDM6300 // Add support for RDM6300 125kHz RFID Reader (+0k8)
#define USE_IBEACON // Add support for bluetooth LE passive scan of ibeacon devices (uses HM17 module) #define USE_IBEACON // Add support for bluetooth LE passive scan of ibeacon devices (uses HM17 module)
//#define USE_GPS // Add support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) //#define USE_GPS // Add support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM)
#define USE_HM10 // (ESP8266 only) Add support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #define USE_HM10 // (ESP8266 only) Add support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code)
//#define USE_MI_ESP32 // (ESP32 only) Add support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) //#define USE_MI_ESP32 // (ESP32 only) Add support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash)
#define USE_HRXL // Add support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7) #define USE_HRXL // Add support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7)
//#define USE_TASMOTA_SLAVE // Add support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem)
//#define USE_OPENTHERM // Add support for OpenTherm (+15k code)
#define USE_ENERGY_SENSOR // Add energy sensors (-14k code) #define USE_ENERGY_SENSOR // Add energy sensors (-14k code)
#define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code)
@ -168,22 +171,20 @@
#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) #define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram)
#define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram) #define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram)
//#define USE_ZIGBEE // Enable serial communication with Zigbee CC2530 flashed with ZNP
#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code) #define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
#define USE_TM1638 // Add support for TM1638 switches copying Switch1 .. Switch8 (+1k code) #define USE_TM1638 // Add support for TM1638 switches copying Switch1 .. Switch8 (+1k code)
#define USE_HX711 // Add support for HX711 load cell (+1k5 code) #define USE_HX711 // Add support for HX711 load cell (+1k5 code)
//#define USE_HX711_GUI // Add optional web GUI to HX711 as scale (+1k8 code) //#define USE_HX711_GUI // Add optional web GUI to HX711 as scale (+1k8 code)
//#define USE_TX20_WIND_SENSOR // Add support for La Crosse TX20 anemometer (+2k6/0k8 code) //#define USE_TX20_WIND_SENSOR // Add support for La Crosse TX20 anemometer (+2k6/0k8 code)
//#define USE_TX23_WIND_SENSOR // Add support for La Crosse TX23 anemometer (+2k7/1k code) //#define USE_TX23_WIND_SENSOR // Add support for La Crosse TX23 anemometer (+2k7/1k code)
//#define USE_WINDMETER // Add support for analog anemometer (+2k2 code)
#define USE_RC_SWITCH // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram) #define USE_RC_SWITCH // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram)
#define USE_RF_SENSOR // Add support for RF sensor receiver (434MHz or 868MHz) (+0k8 code) #define USE_RF_SENSOR // Add support for RF sensor receiver (434MHz or 868MHz) (+0k8 code)
// #define USE_THEO_V2 // Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver (+1k4 code) // #define USE_THEO_V2 // Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver (+1k4 code)
#define USE_ALECTO_V2 // Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver (+1k7 code) #define USE_ALECTO_V2 // Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver (+1k7 code)
#define USE_HRE // Add support for Badger HR-E Water Meter (+1k4 code) #define USE_HRE // Add support for Badger HR-E Water Meter (+1k4 code)
//#define USE_A4988_STEPPER // Add support for A4988/DRV8825 stepper-motor-driver-circuit (+10k5 code) //#define USE_A4988_STEPPER // Add support for A4988/DRV8825 stepper-motor-driver-circuit (+10k5 code)
//#define USE_ARDUINO_SLAVE // Add support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem) //#define USE_THERMOSTAT // Add support for Thermostat
//#define USE_WINDMETER // Add support for analog anemometer
#undef DEBUG_THEO // Disable debug code #undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code #undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_SENSORS #endif // FIRMWARE_SENSORS
@ -366,12 +367,15 @@
#undef USE_MP3_PLAYER // Disable DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop #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_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_PN532_HSU // Disable support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
#undef USE_ZIGBEE // Disable serial communication with Zigbee CC2530 flashed with ZNP
#undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #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_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module)
#undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM)
#undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code)
#undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) #undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash)
#undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7) #undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7)
#undef USE_TASMOTA_SLAVE // Disable support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem)
#undef USE_OPENTHERM // Disable support for OpenTherm (+15k code)
//#define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor //#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_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI
@ -381,11 +385,12 @@
#undef USE_HX711 // Disable support for HX711 load cell #undef USE_HX711 // Disable support for HX711 load cell
#undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer #undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer
#undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer #undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer
#undef USE_WINDMETER // Disable support for analog anemometer (+2k2 code)
#undef USE_RC_SWITCH // Disable support for RF transceiver using library RcSwitch #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_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_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper #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 USE_THERMOSTAT // Disable support for Thermostat
#undef DEBUG_THEO // Disable debug code #undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code #undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_IR #endif // FIRMWARE_IR
@ -467,12 +472,15 @@
#undef USE_MP3_PLAYER // Disable DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop #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_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_PN532_HSU // Disable support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
#undef USE_ZIGBEE // Disable serial communication with Zigbee CC2530 flashed with ZNP
#undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #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_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module)
#undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM)
#undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code)
#undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) #undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash)
#undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7) #undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7)
#undef USE_TASMOTA_SLAVE // Disable support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem)
#undef USE_OPENTHERM // Disable support for OpenTherm (+15k code)
//#undef USE_ENERGY_SENSOR // Disable energy sensors //#undef USE_ENERGY_SENSOR // Disable energy sensors
#undef USE_PZEM004T // Disable PZEM004T energy sensor #undef USE_PZEM004T // Disable PZEM004T energy sensor
@ -491,18 +499,17 @@
#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI #undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI
#undef USE_IR_REMOTE // Disable IR driver #undef USE_IR_REMOTE // Disable IR driver
#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_SR04 // Disable support for for HC-SR04 ultrasonic devices
#undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8 #undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8
#undef USE_HX711 // Disable support for HX711 load cell #undef USE_HX711 // Disable support for HX711 load cell
#undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer #undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer
#undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer #undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer
#undef USE_WINDMETER // Disable support for analog anemometer (+2k2 code)
#undef USE_RC_SWITCH // Disable support for RF transceiver using library RcSwitch #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_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_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper #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 USE_THERMOSTAT // Disable support for Thermostat
#undef DEBUG_THEO // Disable debug code #undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code #undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_LITE #endif // FIRMWARE_LITE
@ -590,12 +597,15 @@
#undef USE_MP3_PLAYER // Disable DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop #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_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_PN532_HSU // Disable support for PN532 using HSU (Serial) interface (+1k8 code, 140 bytes mem)
#undef USE_ZIGBEE // Disable serial communication with Zigbee CC2530 flashed with ZNP
#undef USE_RDM6300 // Disable support for RDM6300 125kHz RFID Reader (+0k8) #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_IBEACON // Disable support for bluetooth LE passive scan of ibeacon devices (uses HM17 module)
#undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM) #undef USE_GPS // Disable support for GPS and NTP Server for becoming Stratus 1 Time Source (+ 3.1kb flash, +132 bytes RAM)
#undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code) #undef USE_HM10 // (ESP8266 only) Disable support for HM-10 as a BLE-bridge for the LYWSD03 (+5k1 code)
#undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash) #undef USE_MI_ESP32 // (ESP32 only) Disable support for ESP32 as a BLE-bridge (+9k2 mem, +292k flash)
#undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7) #undef USE_HRXL // Disable support for MaxBotix HRXL-MaxSonar ultrasonic range finders (+0k7)
#undef USE_TASMOTA_SLAVE // Disable support for Arduino Uno/Pro Mini via serial interface including flashing (+2k3 code, 44 mem)
#undef USE_OPENTHERM // Disable support for OpenTherm (+15k code)
#undef USE_ENERGY_SENSOR // Disable energy sensors #undef USE_ENERGY_SENSOR // Disable energy sensors
#undef USE_PZEM004T // Disable PZEM004T energy sensor #undef USE_PZEM004T // Disable PZEM004T energy sensor
@ -618,11 +628,12 @@
#undef USE_HX711 // Disable support for HX711 load cell #undef USE_HX711 // Disable support for HX711 load cell
#undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer #undef USE_TX20_WIND_SENSOR // Disable support for La Crosse TX20 anemometer
#undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer #undef USE_TX23_WIND_SENSOR // Disable support for La Crosse TX23 anemometer
#undef USE_WINDMETER // Disable support for analog anemometer (+2k2 code)
#undef USE_RC_SWITCH // Disable support for RF transceiver using library RcSwitch #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_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_HRE // Disable support for Badger HR-E Water Meter (+1k4 code)
#undef USE_A4988_STEPPER // Disable support for A4988_Stepper #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 USE_THERMOSTAT // Disable support for Thermostat
#undef DEBUG_THEO // Disable debug code #undef DEBUG_THEO // Disable debug code
#undef USE_DEBUG_DRIVER // Disable debug code #undef USE_DEBUG_DRIVER // Disable debug code
#endif // FIRMWARE_MINIMAL #endif // FIRMWARE_MINIMAL

View File

@ -96,6 +96,7 @@ struct ENERGY {
uint8_t phase_count = 1; // Number of phases active uint8_t phase_count = 1; // Number of phases active
bool voltage_common = false; // Use single voltage and frequency bool voltage_common = false; // Use single voltage and frequency
bool kWhtoday_offset_init = false;
bool voltage_available = true; // Enable if voltage is measured bool voltage_available = true; // Enable if voltage is measured
bool current_available = true; // Enable if current is measured bool current_available = true; // Enable if current is measured
@ -223,6 +224,12 @@ void Energy200ms(void)
XnrgCall(FUNC_ENERGY_EVERY_SECOND); XnrgCall(FUNC_ENERGY_EVERY_SECOND);
if (RtcTime.valid) { if (RtcTime.valid) {
if (!Energy.kWhtoday_offset_init && (RtcTime.day_of_year == Settings.energy_kWhdoy)) {
Energy.kWhtoday_offset = Settings.energy_kWhtoday;
Energy.kWhtoday_offset_init = true;
}
if (LocalTime() == Midnight()) { if (LocalTime() == Midnight()) {
Settings.energy_kWhyesterday = RtcSettings.energy_kWhtoday; Settings.energy_kWhyesterday = RtcSettings.energy_kWhtoday;
@ -827,14 +834,11 @@ void EnergySnsInit(void)
XnrgCall(FUNC_INIT); XnrgCall(FUNC_INIT);
if (energy_flg) { if (energy_flg) {
if (RtcSettingsValid()) { Energy.kWhtoday_offset = 0;
// Do not use at Power On as Rtc was invalid (but has been restored from Settings already)
if ((ResetReason() != REASON_DEFAULT_RST) && RtcSettingsValid()) {
Energy.kWhtoday_offset = RtcSettings.energy_kWhtoday; Energy.kWhtoday_offset = RtcSettings.energy_kWhtoday;
} Energy.kWhtoday_offset_init = true;
else if (RtcTime.day_of_year == Settings.energy_kWhdoy) {
Energy.kWhtoday_offset = Settings.energy_kWhtoday;
}
else {
Energy.kWhtoday_offset = 0;
} }
Energy.kWhtoday = 0; Energy.kWhtoday = 0;
Energy.kWhtoday_delta = 0; Energy.kWhtoday_delta = 0;

View File

@ -47,7 +47,7 @@
* on button1#state do publish cmnd/ring2/power %value% endon on button2#state do publish cmnd/strip1/power %value% endon * on button1#state do publish cmnd/ring2/power %value% endon on button2#state do publish cmnd/strip1/power %value% endon
* on switch1#state do power2 %value% endon * on switch1#state do power2 %value% endon
* on analog#a0div10 do publish cmnd/ring2/dimmer %value% endon * on analog#a0div10 do publish cmnd/ring2/dimmer %value% endon
* on root#loadavg<50 do power 2 endon * on loadavg<50 do power 2 endon
* *
* Notes: * Notes:
* Spaces after <on>, around <do> and before <endon> are mandatory * Spaces after <on>, around <do> and before <endon> are mandatory
@ -203,7 +203,7 @@ char rules_vars[MAX_RULE_VARS][33] = {{ 0 }};
* Rule[x][0] = 0, if firmware is downgraded, the rule will be considered as empty * Rule[x][0] = 0, if firmware is downgraded, the rule will be considered as empty
* *
* The second byte contains the size of uncompressed rule in 8-bytes blocks (i.e. (len+7)/8 ) * The second byte contains the size of uncompressed rule in 8-bytes blocks (i.e. (len+7)/8 )
* Maximum rule size si 2KB (2048 bytes per rule), although there is little chances compression ratio will go down to 75% * Maximum rule size is 2KB (2048 bytes per rule), although there is little chances compression ratio will go down to 75%
* Rule[x][1] = size uncompressed in dwords. If zero, the rule is empty. * Rule[x][1] = size uncompressed in dwords. If zero, the rule is empty.
* *
* The remaining bytes contain the compressed rule, NULL terminated * The remaining bytes contain the compressed rule, NULL terminated
@ -1987,7 +1987,7 @@ void CmndRule(void)
} }
int32_t res = SetRule(index - 1, ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data, append); int32_t res = SetRule(index - 1, ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data, append);
if (res < 0) { if (res < 0) {
AddLog_P2(LOG_LEVEL_ERROR, PSTR("RUL: not enough space")); AddLog_P2(LOG_LEVEL_ERROR, PSTR("RUL: Not enough space"));
} }
} }
Rules.triggers[index -1] = 0; // Reset once flag Rules.triggers[index -1] = 0; // Reset once flag