diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c7c204a0..349a774d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,25 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [11.0.0.6] +## [11.0.0.7] ### Added -- Commands ``Sensor34 10 `` and ``Sensor34 11 `` to use HX711 absolute weight conversion (#15292) +- HX711 command ``Sensor34 10 0|1|`` to set HX711 fixed tare (0 = use auto tare, 1 = use calibrated tare, Any other value is user selected tare) ### Changed -- NeoPool: boost command with redox control state, relay and aux detail display +- HX711 commands ``Sensor34 11 `` and ``Sensor34 12 `` to use HX711 absolute weight conversion (#15292) + +### Fixed +- TasMesh relaunch wifi on esp_now_init failure (#15334) + +### Removed +- HX711 command ``Sensor34 7`` as now active tare is persistent resulting in calculated current weight + +## [11.0.0.6] 20220409 +### Added +- HX711 commands ``Sensor34 10 `` and ``Sensor34 11 `` to use HX711 absolute weight conversion (#15292) + +### Changed +- NeoPool boost command with redox control state, relay and aux detail display ### Fixed - NeoPool filtration state and speed display diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 34ef99c74..9d64b6a78 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -103,7 +103,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v11.0.0.6 +## Changelog v11.0.0.7 ### Added - Command ``SetOption135 1`` to disable LVGL splash screen - Command ``SetOption136 1`` to disable single sensor reports from Tuya devices while keeping teleperiod reports [#15216](https://github.com/arendst/Tasmota/issues/15216) @@ -112,7 +112,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Command ``RfTimeout 100..60000`` to disable duplicate RfReceive. Default 1000 [#15061](https://github.com/arendst/Tasmota/issues/15061) - Command ``IfxSensor 1`` to send non-teleperiod data to influxdb - Commands ``Sensor12 D0 .. D5, S0 .. S5`` allowing differential or single-ended modes [#15001](https://github.com/arendst/Tasmota/issues/15001) -- Commands ``Sensor34 10 `` and ``Sensor34 11 `` to use HX711 absolute weight conversion [#15292](https://github.com/arendst/Tasmota/issues/15292) +- HX711 command ``Sensor34 10 0|1|`` to set HX711 fixed tare (0 = use auto tare, 1 = use calibrated tare, Any other value is user selected tare) +- HX711 commands ``Sensor34 11 `` and ``Sensor34 12 `` to use HX711 absolute weight conversion [#15292](https://github.com/arendst/Tasmota/issues/15292) - NeoPool commands ``NPpHMin``, ``NPpHMax``, ``NPpH``, ``NPRedox``, ``NPHydrolysis``, ``NPIonization``, ``NPChlorine`` and ``NPControl`` [#15015](https://github.com/arendst/Tasmota/issues/15015) - NeoPool system voltages display - TasmotaSerial implement ``end()`` @@ -138,7 +139,6 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Sonoff SPM increase max number of relays supported to 32 (8 SPM-4Relay modules) - Extent number of pulsetimers from 8 to 32 [#8266](https://github.com/arendst/Tasmota/issues/8266) - Consolidate three RTC chip drivers (DS3231, BM8563, PCF85363) into one driver updating RTC as soon as possible after restart -- Removed command ``Sensor33`` and replaced by ``RtcNtpserver`` - Remove support for Internet Explorer by allowing ECMAScript6 syntax using less JavaScript code bytes [#15280](https://github.com/arendst/Tasmota/issues/15280) - DS3231 I2C address define ``USE_RTC_ADDR`` into ``DS3231_ADDRESS`` - Display of energy values in GUI use columns when define ``USE_ENERGY_COLUMN_GUI`` is enabled (default) @@ -150,13 +150,16 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo ### Fixed - SSPM energy yesterday when zero +- NeoPool NPBit and NPRead/NPReadL output +- HX711 false readings by removing large deviations - GPIO OptionE1 selection regression [#14821](https://github.com/arendst/Tasmota/issues/14821) - BL0939, BL0940 and BL0942 energy monitoring buffer miscompares resulting in wrong daily energy values regression from v9.5.0.8 [#14829](https://github.com/arendst/Tasmota/issues/14829) - Wiegand 34-bit rfid reading and presentation [#14834](https://github.com/arendst/Tasmota/issues/14834) - Orno WE517 power meter phase 2 current reactive [#14841](https://github.com/arendst/Tasmota/issues/14841) -- NeoPool NPBit and NPRead/NPReadL output -- HX711 false readings by removing large deviations +- TasMesh relaunch wifi on esp_now_init failure [#15334](https://github.com/arendst/Tasmota/issues/15334) - ESP32 save settings after OTA upload regression from v10.0.0.3 - ESP32 PowerOnState [#15084](https://github.com/arendst/Tasmota/issues/15084) ### Removed +- Command ``Sensor33`` and replaced by ``RtcNtpserver`` +- HX711 command ``Sensor34 7`` as now active tare is persistent resulting in calculated current weight diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index 238b593ca..131766dc5 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index abea293a6..5db48b41a 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index d93f10651..1cc32d0de 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index c01f174f8..cb86d734e 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index cf3ef4931..aa7bf0833 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 472474e41..ac8f8cf76 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index f076bb083..6ed3ac42b 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 7c483afc0..0a0441bec 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h index 04ecce171..ed4abb8d6 100644 --- a/tasmota/language/fy_NL.h +++ b/tasmota/language/fy_NL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index 0d5ddf7a4..173ed83d3 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index 4ce249b76..fbf54cdea 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 65c36e9cd..309df4520 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v10.1.0.6 - Last update 28.03.2022 + * Updated until v11.0.0.7 - Last update 10.04.2022 \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" @@ -1084,13 +1085,13 @@ #define D_NEOPOOL_RELAY_CL "Pompa cloro" #define D_NEOPOOL_RELAY_CD "Conduttività" #define D_NEOPOOL_RELAY_HEATING "Riscaldamento" -#define D_NEOPOOL_RELAY_UV "UV" -#define D_NEOPOOL_RELAY_VALVE "Valve" -#define D_NEOPOOL_RELAY_AUX "Aux" +#define D_NEOPOOL_RELAY_UV "Ultravioletti" +#define D_NEOPOOL_RELAY_VALVE "Valvola" +#define D_NEOPOOL_RELAY_AUX "Ausiliario" #define D_NEOPOOL_TIME "Orario" #define D_NEOPOOL_FILT_MODE "Modalità di filtrazione" #define D_NEOPOOL_CELL_RUNTIME "Cella attiva" -#define D_NEOPOOL_POLARIZATION "Pol" // Sensor status +#define D_NEOPOOL_POLARIZATION "Polarizzazione" // Sensor status #define D_NEOPOOL_PR_OFF "PrOff" #define D_NEOPOOL_SETPOINT_OK "OK" #define D_NEOPOOL_COVER "Copertura" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index 28b2c3429..9495e22dc 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index edcf0d41f..bdc85bb8e 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index f9db22207..b956b6d68 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 921f11098..f2ddd1fc8 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index 7ac2efe39..0829c29be 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 4d4fd355f..c78ebfc71 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 9b5d30470..984186a1c 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index f6082af6b..da5bde22f 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 0afd1b382..bf2bf0822 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index b44b39c99..157b3b65f 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index 601f33dc7..a46af7a69 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index 2c4356408..8320cb52c 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index 2a659da88..c5b52f69f 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 9fb378d58..5b0ff6e43 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -615,6 +615,7 @@ #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_MS01 "MS01" #define D_SENSOR_DS18X20 "DS18x20" #define D_SENSOR_I2C_SCL "I2C SCL" #define D_SENSOR_I2C_SDA "I2C SDA" diff --git a/tasmota/settings.h b/tasmota/settings.h index 1acf9d376..b179e0e14 100644 --- a/tasmota/settings.h +++ b/tasmota/settings.h @@ -486,9 +486,7 @@ typedef struct { int32_t energy_kWhtoday_ph[3]; // 314 int32_t energy_kWhyesterday_ph[3]; // 320 int32_t energy_kWhtotal_ph[3]; // 32C - - uint8_t free_338[4]; // 338 - + int32_t weight_user_tare; // 338 uint8_t web_time_start; // 33C uint8_t web_time_end; // 33D uint8_t sserial_config; // 33E @@ -647,8 +645,9 @@ typedef struct { uint32_t ipv4_rgx_subnetmask; // 55C uint16_t pwm_value_ext[16-5]; // 560 Extension to pwm_value to store up to 16 PWM for ESP32. This array stores values 5..15 - uint8_t free_576[6]; // 576 + uint8_t free_576[2]; // 576 + int32_t weight_offset; // 578 uint16_t pulse_timer[MAX_PULSETIMERS]; // 57C SysMBitfield1 flag2; // 5BC uint32_t pulse_counter[MAX_COUNTERS]; // 5C0 diff --git a/tasmota/settings.ino b/tasmota/settings.ino index eb76cf664..1b4c2763c 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -1520,6 +1520,13 @@ void SettingsDelta(void) { Settings->weight_absconv_a = 0; Settings->weight_absconv_b = 0; } + if (Settings->version < 0x0B000007) { // 11.0.0.7 + Settings->weight_user_tare = 0; + Settings->weight_offset = 0; +#ifdef USE_HX711 + Settings->weight_offset = Settings->energy_frequency_calibration * Settings->weight_calibration; +#endif + } Settings->version = VERSION; SettingsSave(1); diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 8790a91a2..dac7e3416 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -185,6 +185,7 @@ enum UserSelectablePins { GPIO_BL6523_TX, GPIO_BL6523_RX, // BL6523 based Watt meter Serial interface GPIO_ADE7880_IRQ, // ADE7880 IRQ GPIO_RESET, // Generic reset + GPIO_MS01, // Sonoff MS01 Moisture Sensor 1wire interface GPIO_SENSOR_END }; enum ProgramSelectablePins { @@ -409,6 +410,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_BL6523_TX "|" D_SENSOR_BL6523_RX "|" D_SENSOR_ADE7880_IRQ "|" D_SENSOR_RESET "|" + D_SENSOR_MS01 "|" ; const char kSensorNamesFixed[] PROGMEM = @@ -599,6 +601,7 @@ const uint16_t kGpioNiceList[] PROGMEM = { AGPIO(GPIO_DHT11), // DHT11 AGPIO(GPIO_DHT22), // DHT21, DHT22, AM2301, AM2302, AM2321 AGPIO(GPIO_SI7021), // iTead SI7021 + AGPIO(GPIO_MS01), // Sonoff MS01 AGPIO(GPIO_DHT11_OUT), // Pseudo Single wire DHT11, DHT21, DHT22, AM2301, AM2302, AM2321 #endif #ifdef USE_DS18x20 diff --git a/tasmota/tasmota_version.h b/tasmota/tasmota_version.h index f5c1f170e..43aa751a5 100644 --- a/tasmota/tasmota_version.h +++ b/tasmota/tasmota_version.h @@ -20,6 +20,6 @@ #ifndef _TASMOTA_VERSION_H_ #define _TASMOTA_VERSION_H_ -const uint32_t VERSION = 0x0B000006; // 11.0.0.6 +const uint32_t VERSION = 0x0B000007; // 11.0.0.7 #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index f6539799c..444eaa43d 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -3164,14 +3164,23 @@ int WebQuery(char *buffer) // Return received data to the user - Adds 900+ bytes to the code const char* read = http.getString().c_str(); // File found at server - may need lot of ram or trigger out of memory! ResponseClear(); + Response_P(PSTR("{\"" D_CMND_WEBQUERY "\":")); char text[2] = { 0 }; - text[0] = '.'; + text[0] = *read++; + bool assume_json = (text[0] == '{') || (text[0] == '['); + if (!assume_json) { ResponseAppend_P(PSTR("\"")); } while (text[0] != '\0') { - text[0] = *read++; if (text[0] > 31) { // Remove control characters like linefeed - if (ResponseAppend_P(text) == ResponseSize()) { break; }; + if (assume_json) { + if (ResponseAppend_P(text) == ResponseSize()) { break; }; + } else { + if (ResponseAppend_P(EscapeJSONString(text).c_str()) == ResponseSize()) { break; }; + } } + text[0] = *read++; } + if (!assume_json) { ResponseAppend_P(PSTR("\"")); } + ResponseJsonEnd(); #ifdef USE_SCRIPT extern uint8_t tasm_cmd_activ; // recursive call must be possible in this case diff --git a/tasmota/xdrv_57_9_tasmesh.ino b/tasmota/xdrv_57_9_tasmesh.ino index 9e06bc108..f0b18f765 100644 --- a/tasmota/xdrv_57_9_tasmesh.ino +++ b/tasmota/xdrv_57_9_tasmesh.ino @@ -387,6 +387,10 @@ void MESHstartNode(int32_t _channel, uint8_t _role){ //we need a running broker MESHsetWifi(0); if (esp_now_init() != 0) { AddLog(LOG_LEVEL_INFO, PSTR("MSH: Node init failed")); + // try to re-launch wifi + MESH.role = ROLE_NONE; + MESHsetWifi(1); + WifiBegin(3, MESH.channel); return; } diff --git a/tasmota/xsns_06_dht.ino b/tasmota/xsns_06_dht.ino index bd6937f19..c8b209100 100644 --- a/tasmota/xsns_06_dht.ino +++ b/tasmota/xsns_06_dht.ino @@ -87,6 +87,9 @@ bool DhtRead(uint32_t sensor) { case GPIO_SI7021: // iTead SI7021 delayMicroseconds(500); break; + case GPIO_MS01: // Sonoff MS01 + delayMicroseconds(450); + break; } if (!dht_dual_mode) { @@ -101,6 +104,7 @@ bool DhtRead(uint32_t sensor) { delayMicroseconds(50); break; case GPIO_SI7021: // iTead SI7021 + case GPIO_MS01: // Sonoff MS01 delayMicroseconds(30); // See: https://github.com/letscontrolit/ESPEasy/issues/1798 and 20210524: https://github.com/arendst/Tasmota/issues/12180 break; } @@ -152,14 +156,39 @@ bool DhtRead(uint32_t sensor) { */ break; case GPIO_DHT22: // DHT21, DHT22, AM2301, AM2302, AM2321 - case GPIO_SI7021: // iTead SI7021 + case GPIO_SI7021: { // iTead SI7021 humidity = ((dht_data[0] << 8) | dht_data[1]) * 0.1; // DHT21/22 (Adafruit): int16_t temp16 = dht_data[2] << 8 | dht_data[3]; // case 1 : signed 16 bits - if ((dht_data[2] & 0xF0) == 0x80) // case 2 : negative when high nibble = 0x80 + if ((dht_data[2] & 0xF0) == 0x80) { // case 2 : negative when high nibble = 0x80 temp16 = -(0xFFF & temp16); + } temperature = 0.1f * temp16; break; + } + case GPIO_MS01: { // Sonoff MS01 + int32_t voltage = ((dht_data[0] << 8) | dht_data[1]); + +// AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DHT: MS01 %d"), voltage); + + // Rough approximate of soil moisture % (based on values observed in the eWeLink app) + // Observed values are available here: https://gist.github.com/minovap/654cdcd8bc37bb0d2ff338f8d144a509 + + float x; + if (voltage < 15037) { + x = voltage - 15200; + humidity = - FastPrecisePowf(0.0024 * x, 3) - 0.0004 * x + 20.1; + } + else if (voltage < 22300) { + humidity = - 0.00069 * voltage + 30.6; + } + else { + x = voltage - 22800; + humidity = - FastPrecisePowf(0.00046 * x, 3) - 0.0004 * x + 15; + } + temperature = 0; + break; + } } if (isnan(temperature) || isnan(humidity)) { AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_DHT "Invalid reading")); @@ -178,7 +207,8 @@ bool DhtRead(uint32_t sensor) { /********************************************************************************************/ bool DhtPinState() { - if ((XdrvMailbox.index >= AGPIO(GPIO_DHT11)) && (XdrvMailbox.index <= AGPIO(GPIO_SI7021))) { + if (((XdrvMailbox.index >= AGPIO(GPIO_DHT11)) && (XdrvMailbox.index <= AGPIO(GPIO_SI7021))) || + (XdrvMailbox.index == AGPIO(GPIO_MS01))) { if (dht_sensors < DHT_MAX_SENSORS) { Dht[dht_sensors].pin = XdrvMailbox.payload; Dht[dht_sensors].type = BGPIO(XdrvMailbox.index); @@ -232,7 +262,19 @@ void DhtEverySecond(void) { void DhtShow(bool json) { for (uint32_t i = 0; i < dht_sensors; i++) { - TempHumDewShow(json, ((0 == TasmotaGlobal.tele_period) && (0 == i)), Dht[i].stype, Dht[i].t, Dht[i].h); + if (GPIO_MS01 == Dht[i].type) { + if (json) { + ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_HUMIDITY "\":%*_f}"), Dht[i].stype, Settings->flag2.humidity_resolution, &Dht[i].h); +#ifdef USE_WEBSERVER + } else { + char parameter[FLOATSZ]; + dtostrfd(Dht[i].h, Settings->flag2.humidity_resolution, parameter); + WSContentSend_PD(HTTP_SNS_HUM, Dht[i].stype, parameter); +#endif // USE_WEBSERVER + } + } else { + TempHumDewShow(json, ((0 == TasmotaGlobal.tele_period) && (0 == i)), Dht[i].stype, Dht[i].t, Dht[i].h); + } } } diff --git a/tasmota/xsns_127_esp32_sensors.ino b/tasmota/xsns_127_esp32_sensors.ino index 779e24e95..5b6ff3e69 100644 --- a/tasmota/xsns_127_esp32_sensors.ino +++ b/tasmota/xsns_127_esp32_sensors.ino @@ -18,6 +18,7 @@ */ #ifdef ESP32 +#ifndef CONFIG_IDF_TARGET_ESP32S3 /*********************************************************************************************\ * ESP32 CPU Temperature and optional Hall Effect sensor * @@ -138,4 +139,5 @@ bool Xsns127(uint8_t function) { return result; } +#endif // Not CONFIG_IDF_TARGET_ESP32S3 #endif // ESP32 diff --git a/tasmota/xsns_34_hx711.ino b/tasmota/xsns_34_hx711.ino index 332c98c7e..8a051949a 100644 --- a/tasmota/xsns_34_hx711.ino +++ b/tasmota/xsns_34_hx711.ino @@ -53,12 +53,14 @@ #define HX_GAIN_64 3 // Channel A, gain factor 64 #define D_JSON_WEIGHT_RAW "WeightRaw" +#define D_JSON_WEIGHT_RAW_ABS "AbsRaw" #define D_JSON_WEIGHT_REF "Ref" #define D_JSON_WEIGHT_CAL "Cal" #define D_JSON_WEIGHT_MAX "Max" #define D_JSON_WEIGHT_ITEM "Item" #define D_JSON_WEIGHT_CHANGE "Change" #define D_JSON_WEIGHT_DELTA "Delta" +#define D_JSON_WEIGHT_TARE "Tare" #define D_JSON_WEIGHT_ABSC_A "AbsConvA" #define D_JSON_WEIGHT_ABSC_B "AbsConvB" @@ -68,8 +70,10 @@ const char kHxCalibrationStates[] PROGMEM = D_HX_CAL_FAIL "|" D_HX_CAL_DONE "|" struct HX { long reads[HX_SAMPLES]; - long weight = 0; + long raw_empty = 0; + long raw_absolute; long raw = 0; + long weight = 0; long last_weight = 0; long offset = 0; long scale = 1; @@ -134,15 +138,11 @@ long HxRead(void) { /*********************************************************************************************/ -void HxResetPart(void) { - Hx.tare_flg = true; - Hx.sample_count = 0; - Hx.last_weight = 0; -} - -void HxReset(void) { - HxResetPart(); - Settings->energy_frequency_calibration = 0; +void HxTareInit(void) { + Hx.offset = (Settings->weight_user_tare != 0) ? Settings->weight_user_tare * Hx.scale : Settings->weight_offset; + if (0 == Hx.offset) { + Hx.tare_flg = true; + } } void HxCalibrationStateTextJson(uint8_t msg_id) { @@ -174,23 +174,24 @@ void SetWeightDelta(void) { /*********************************************************************************************\ * Supported commands for Sensor34: * + * Sensor34 - Show current settings * Sensor34 1 - Reset display to 0 * Sensor34 2 - Start calibration * Sensor34 2 - Set reference weight and start calibration - * Sensor34 3 - Show reference weight in gram * Sensor34 3 - Set reference weight - * Sensor34 4 - Show calibrated scale value * Sensor34 4 - Set calibrated scale value - * Sensor34 5 - Show max weight in gram * Sensor34 5 - Set max weight - * Sensor34 6 - Show item weight in decigram * Sensor34 6 - Set item weight - * Sensor34 7 - Save current weight to be used as start weight on restart + * Sensor34 7 - Save current weight to be used as start weight on restart (removed v11.0.0.7) * Sensor34 8 0 - Disable JSON weight change message * Sensor34 8 1 - Enable JSON weight change message * Sensor34 9 - Set minimum delta to trigger JSON message - * Sensor34 10 - Set A = a * 10^9 for raw to absolute weight conversion: y=a*x+b - * Sensor34 11 - Set B = b * 10^6 for raw to absolute weight conversion: y=a*x+b + * Sensor34 10 0 - Disable fixed tare and enable auto tare + * Sensor34 10 1 - Set fixed tare offset using current calibrated raw weight value + * Sensor34 10 - Set fixed tare offset + * Sensor34 11 0 - Disable absolute weight conversion + * Sensor34 11 - Set A = a * 10^9 for raw to absolute weight conversion: y=a*x+b + * Sensor34 12 - Set B = b * 10^6 for raw to absolute weight conversion: y=a*x+b \*********************************************************************************************/ bool HxCommand(void) { @@ -207,17 +208,21 @@ bool HxCommand(void) { switch (XdrvMailbox.payload) { case 1: // Reset scale - HxReset(); - Response_P(S_JSON_SENSOR_INDEX_SVALUE, XSNS_34, "Reset"); + if (0 == Settings->weight_user_tare) { + Hx.tare_flg = true; + Response_P(S_JSON_SENSOR_INDEX_SVALUE, XSNS_34, "Reset"); + } show_parms = false; break; case 2: // Calibrate if (any_value) { Settings->weight_reference = value; } - Hx.scale = 1; - HxReset(); + Hx.scale = 1; // Uncalibrated + Hx.sample_count = 0; + Hx.offset = 0; // Disable tare while calibrating Hx.calibrate_step = HX_CAL_START; Hx.calibrate_timer = 1; - HxCalibrationStateTextJson(3); +// HxCalibrationStateTextJson(3); // D_HX_CAL_REMOVE + HxCalibrationStateTextJson(2); // D_HX_CAL_REMOVE show_parms = false; break; case 3: // WeightRef to user reference @@ -237,11 +242,11 @@ bool HxCommand(void) { Settings->weight_item = (unsigned long)(CharToFloat(ArgV(argument, 2)) * 10); } break; - case 7: // WeightSave - Settings->energy_frequency_calibration = Hx.weight; - Response_P(S_JSON_SENSOR_INDEX_SVALUE, XSNS_34, PSTR(D_JSON_DONE)); - show_parms = false; - break; +// case 7: // WeightSave +// Settings->energy_frequency_calibration = Hx.weight; +// Response_P(S_JSON_SENSOR_INDEX_SVALUE, XSNS_34, PSTR(D_JSON_DONE)); +// show_parms = false; +// break; case 8: // Json on weight change if (any_value) { Settings->SensorBits1.hx711_json_weight_change = value &1; } break; @@ -251,10 +256,17 @@ bool HxCommand(void) { SetWeightDelta(); } break; - case 10: // AbsoluteConversion, A + case 10: // Fixed (user) tare + if (any_value) { + Settings->weight_user_tare = (1 == value) ? Hx.raw : value; + HxTareInit(); + Hx.weight_diff = Hx.weight_delta +1; // Force display of current weight + } + break; + case 11: // AbsoluteConversion, A if (any_value) { Settings->weight_absconv_a = value; } break; - case 11: // AbsoluteConversion, B + case 12: // AbsoluteConversion, B if (any_value) { Settings->weight_absconv_b = value; } break; } @@ -264,10 +276,10 @@ bool HxCommand(void) { dtostrfd((float)Settings->weight_item / 10, 1, item); Response_P(PSTR("{\"Sensor34\":{\"" D_JSON_WEIGHT_REF "\":%d,\"" D_JSON_WEIGHT_CAL "\":%d,\"" D_JSON_WEIGHT_MAX "\":%d,\"" D_JSON_WEIGHT_ITEM "\":%s,\"" D_JSON_WEIGHT_CHANGE "\":\"%s\",\"" D_JSON_WEIGHT_DELTA "\":%d,\"" - D_JSON_WEIGHT_ABSC_A "\":%d,\"" D_JSON_WEIGHT_ABSC_B "\":%d}}"), + D_JSON_WEIGHT_TARE "\":%d,\"" D_JSON_WEIGHT_ABSC_A "\":%d,\"" D_JSON_WEIGHT_ABSC_B "\":%d}}"), Settings->weight_reference, Settings->weight_calibration, Settings->weight_max * 1000, item, GetStateText(Settings->SensorBits1.hx711_json_weight_change), Settings->weight_change, - Settings->weight_absconv_a, Settings->weight_absconv_b); + Settings->weight_user_tare, Settings->weight_absconv_a, Settings->weight_absconv_b); } return serviced; @@ -297,8 +309,8 @@ void HxInit(void) { if (!Settings->weight_calibration) { Settings->weight_calibration = HX_SCALE; } if (!Settings->weight_reference) { Settings->weight_reference = HX_REFERENCE; } Hx.scale = Settings->weight_calibration; + HxTareInit(); HxRead(); - HxResetPart(); Hx.type = 1; } } @@ -328,45 +340,44 @@ void HxEvery100mSecond(void) { for (uint32_t i = 2; i < HX_SAMPLES -2; i++) { sum_raw += Hx.reads[i]; } - long average = sum_raw / (HX_SAMPLES -4); // grams + Hx.raw_absolute = sum_raw / (HX_SAMPLES -4); // Uncalibrated value + Hx.raw = Hx.raw_absolute / Hx.scale; // grams - if ((Hx.reads[0] < (average -4)) || (Hx.reads[9] > (average +4))) { - AddLog(LOG_LEVEL_DEBUG, PSTR("HX7: Range %d"), Hx.reads[9] - Hx.reads[0]); -// return; // Consider to drop samples with too much deviation (will fail too on quick load changes like filling a barrel!) - } - - long value = average - Hx.offset; // grams - Hx.weight = value / Hx.scale; // grams - Hx.raw = average / Hx.scale; - if (Hx.weight < 0) { - if (Settings->energy_frequency_calibration) { - long difference = Settings->energy_frequency_calibration + Hx.weight; - Hx.last_weight = difference; - if (difference < 0) { HxReset(); } // Cancel last weight as there seems to be no more weight on the scale - } - Hx.weight = 0; - } else { - Hx.last_weight = Settings->energy_frequency_calibration; - } - - if (Hx.tare_flg) { + if ((0 == Settings->weight_user_tare) && Hx.tare_flg) { // Reset scale based on current load Hx.tare_flg = false; - Hx.offset = average; // grams + Settings->weight_offset = Hx.raw_absolute; // Save for restart use + Hx.offset = Hx.raw_absolute; + } + + long value = Hx.raw_absolute - Hx.offset; // Uncalibrated value + Hx.weight = value / Hx.scale; // grams + if (Hx.weight < 0) { // We currently do not support negative weight + Hx.weight = 0; } if (Hx.calibrate_step) { Hx.calibrate_timer--; +// AddLog(LOG_LEVEL_DEBUG, PSTR("HX7: Step %d, weight %d, last %d, raw %d, empty %d"), Hx.calibrate_step, Hx.weight, Hx.last_weight, Hx.raw, Hx.raw_empty); + if (HX_CAL_START == Hx.calibrate_step) { // Skip reset just initiated - Hx.calibrate_step--; + if (0 == Hx.offset) { + Hx.calibrate_step--; // HX_CAL_RESET + Hx.last_weight = Hx.weight; // Uncalibrated value + Hx.raw_empty = Hx.raw; + } Hx.calibrate_timer = HX_CAL_TIMEOUT * (10 / HX_SAMPLES); } else if (HX_CAL_RESET == Hx.calibrate_step) { // Wait for stable reset if (Hx.calibrate_timer) { - if (Hx.weight < (long)Settings->weight_reference) { - Hx.calibrate_step--; + if (Hx.weight < Hx.last_weight -100) { // Load decrease detected + Hx.last_weight = Hx.weight; + Hx.raw_empty = Hx.raw; +// HxCalibrationStateTextJson(2); // D_HX_CAL_REFERENCE + } + else if (Hx.weight > Hx.last_weight +100) { // Load increase detected + Hx.calibrate_step--; // HX_CAL_FIRST Hx.calibrate_timer = HX_CAL_TIMEOUT * (10 / HX_SAMPLES); - HxCalibrationStateTextJson(2); } } else { Hx.calibrate_step = HX_CAL_FAIL; @@ -374,41 +385,46 @@ void HxEvery100mSecond(void) { } else if (HX_CAL_FIRST == Hx.calibrate_step) { // Wait for first reference weight if (Hx.calibrate_timer) { - if (Hx.weight > (long)Settings->weight_reference) { - Hx.calibrate_step--; + if (Hx.weight > Hx.last_weight +100) { + Hx.calibrate_step--; // HX_CAL_DONE } } else { Hx.calibrate_step = HX_CAL_FAIL; } } else if (HX_CAL_DONE == Hx.calibrate_step) { // Second stable reference weight - if (Hx.weight > (long)Settings->weight_reference) { + if (Hx.weight > Hx.last_weight +100) { Hx.calibrate_step = HX_CAL_FINISH; // Calibration done - Settings->weight_calibration = Hx.weight / Settings->weight_reference; + Settings->weight_offset = Hx.raw_empty; + Hx.offset = Hx.raw_empty; + Settings->weight_calibration = (Hx.weight - Hx.raw_empty) / Settings->weight_reference; // 1 gram Hx.weight = 0; // Reset calibration value - HxCalibrationStateTextJson(1); + HxCalibrationStateTextJson(1); // D_HX_CAL_DONE } else { Hx.calibrate_step = HX_CAL_FAIL; } } - if (HX_CAL_FAIL == Hx.calibrate_step) { // Calibration failed - Hx.calibrate_step--; - Hx.tare_flg = true; // Perform a reset using old scale - HxCalibrationStateTextJson(0); + Hx.calibrate_step--; // HX_CAL_FINISH + HxTareInit(); + HxCalibrationStateTextJson(0); // D_HX_CAL_FAIL } if (HX_CAL_FINISH == Hx.calibrate_step) { // Calibration finished - Hx.calibrate_step--; + Hx.calibrate_step--; // HX_CAL_LIMBO Hx.calibrate_timer = 3 * (10 / HX_SAMPLES); Hx.scale = Settings->weight_calibration; - } + if (Settings->weight_user_tare != 0) { // Re-enable fixed tare if needed + Settings->weight_user_tare = Hx.raw_empty / Hx.scale; + HxTareInit(); + } + + } if (!Hx.calibrate_timer) { Hx.calibrate_step = HX_CAL_END; // End of calibration + Hx.weight_diff = Hx.weight_delta +2; } } else { - Hx.weight += Hx.last_weight; // grams - if (Settings->SensorBits1.hx711_json_weight_change) { if (abs(Hx.weight - Hx.weight_diff) > Hx.weight_delta) { // Use weight_delta threshold to decrease "ghost" weights Hx.weight_diff = Hx.weight; @@ -428,7 +444,6 @@ void HxEvery100mSecond(void) { } void HxSaveBeforeRestart(void) { - Settings->energy_frequency_calibration = Hx.weight; Hx.sample_count = HX_SAMPLES +1; // Stop updating Hx.weight } @@ -448,8 +463,9 @@ void HxShow(bool json) { float weight = 0; if (Hx.calibrate_step < HX_CAL_FAIL) { if ((Settings->weight_absconv_a != 0) && (Settings->weight_absconv_b != 0)) { - weight = (float)Settings->weight_absconv_a / 1e9 * Hx.raw + (float)Settings->weight_absconv_b / 1e6; - } else { + weight = (float)Settings->weight_absconv_a / 1e9 * Hx.raw_absolute + (float)Settings->weight_absconv_b / 1e6; + } + else { if (Hx.weight && Settings->weight_item) { count = (Hx.weight * 10) / Settings->weight_item; if (count > 1) { @@ -463,7 +479,8 @@ void HxShow(bool json) { dtostrfd(weight, Settings->flag2.weight_resolution, weight_chr); if (json) { - ResponseAppend_P(PSTR(",\"HX711\":{\"" D_JSON_WEIGHT "\":%s%s,\"" D_JSON_WEIGHT_RAW "\":%d}"), weight_chr, scount, Hx.raw); + ResponseAppend_P(PSTR(",\"HX711\":{\"" D_JSON_WEIGHT "\":%s%s,\"" D_JSON_WEIGHT_RAW "\":%d,\"" D_JSON_WEIGHT_RAW_ABS "\":%d}"), + weight_chr, scount, Hx.raw, Hx.raw_absolute); #ifdef USE_WEBSERVER } else { WSContentSend_PD(HTTP_HX711_WEIGHT, weight_chr); @@ -582,7 +599,9 @@ bool Xsns34(uint8_t function) { break; #ifdef USE_HX711_GUI case FUNC_WEB_ADD_MAIN_BUTTON: - WSContentSend_P(HTTP_BTN_MENU_MAIN_HX711); + if (0 == Settings->weight_user_tare) { // Allow reset scale when no user tare is defined + WSContentSend_P(HTTP_BTN_MENU_MAIN_HX711); + } break; case FUNC_WEB_ADD_BUTTON: WSContentSend_P(HTTP_BTN_MENU_HX711); diff --git a/tasmota/xsns_83_neopool.ino b/tasmota/xsns_83_neopool.ino index 25b009cb1..e2171bcfb 100644 --- a/tasmota/xsns_83_neopool.ino +++ b/tasmota/xsns_83_neopool.ino @@ -1300,7 +1300,7 @@ uint8_t NeoPoolWriteRegisterWord(uint16_t addr, uint16_t data) } -uint16_t NeoPoolGetDataTO(uint16_t addr, uint32_t timeout) +uint16_t NeoPoolGetDataTO(uint16_t addr, int32_t timeout) { uint16_t data; uint16_t i; diff --git a/tasmota/xsns_87_mcp2515.ino b/tasmota/xsns_87_mcp2515.ino index 3aad58d09..629cb9209 100644 --- a/tasmota/xsns_87_mcp2515.ino +++ b/tasmota/xsns_87_mcp2515.ino @@ -370,12 +370,12 @@ void MCP2515_Show(bool Json) { if (bms.setFields & BMS_CHARGE_VOLT_MAX) { char voltStr[6]; dtostrf((float(bms.chargeVoltLimit) / 10), 5, 1, voltStr); - WSContentSend_PD(PSTR("{s}%s Max Voltage{m}%s " D_UNIT_AMPERE "{e}"), bms.manuf, voltStr); + WSContentSend_PD(PSTR("{s}%s Max Voltage{m}%s " D_UNIT_VOLT "{e}"), bms.manuf, voltStr); } if (bms.setFields & BMS_CHARGE_VOLT_MIN) { char voltStr[6]; dtostrf((float(bms.dischargeVolt) / 10), 5, 1, voltStr); - WSContentSend_PD(PSTR("{s}%s Min Voltage{m}%s " D_UNIT_AMPERE "{e}"), bms.manuf, voltStr); + WSContentSend_PD(PSTR("{s}%s Min Voltage{m}%s " D_UNIT_VOLT "{e}"), bms.manuf, voltStr); } if (bms.setFields & BMS_CHARGE_AMP_MAX) { char ampStr[6]; diff --git a/tools/lv_gpio/lv_gpio_enum.h b/tools/lv_gpio/lv_gpio_enum.h index ab9b92aeb..19e517add 100644 --- a/tools/lv_gpio/lv_gpio_enum.h +++ b/tools/lv_gpio/lv_gpio_enum.h @@ -59,6 +59,7 @@ RFRECV = GPIO_RFRECV DHT11 = GPIO_DHT11 DHT22 = GPIO_DHT22 SI7021 = GPIO_SI7021 +MS01 = GPIO_MS01 DHT11_OUT = GPIO_DHT11_OUT DSB = GPIO_DSB DSB_OUT = GPIO_DSB_OUT