From 943a0b1e6c4816688e020a87eb9b0914cfc24388 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:45:10 +0100 Subject: [PATCH] Update changelogs --- CHANGELOG.md | 7 +++--- RELEASENOTES.md | 4 +++ tasmota/berry/examples/heatfan.be | 41 +++++++++++++++---------------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 295bddaaa..a8cfd9257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,8 +20,9 @@ All notable changes to this project will be documented in this file. - Berry driver for PN532 NFC/Mifare reader (#22899) - Berry `tasmota.add_rule_once` and auto-remove rules with same pattern and id (#22900) - Berry example for HeatFan WiFi Controller -- LVGL add `lv.set_paint_cb()` to register a callback when screen is refreshed -- Berry `tasmota.settings` entries for PixelType +- LVGL `lv.set_paint_cb()` to register a callback when screen is refreshed (#22909) +- Berry `tasmota.settings` entries for PixelType (#22912) +- Support for C8-CO2-5K CO2 sensor (#22905) ### Breaking Changed @@ -32,7 +33,7 @@ All notable changes to this project will be documented in this file. - ESP32 Platform from 2025.01.30 to 2025.01.31 (#22832) - Berry `gpio.pin_mode` frees PWM on pin - GPIOViewer from v1.6.0 to v1.6.1 (No functional change) -- Berry callback now passes 5 arguments instead of 4 (in line with documentation) +- Berry callback now passes 5 arguments instead of 4 (in line with documentation) (#22908) ### Fixed - Sonoff SPM `PowerOnState` overrules `SSPMPowerOnState` in mixed 4Relay setup with 4Relay version 1.0.0 diff --git a/RELEASENOTES.md b/RELEASENOTES.md index a3f978728..e4fe27c8a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -122,6 +122,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Command I2sLoop [#22807](https://github.com/arendst/Tasmota/issues/22807) - Support for PCF85063 RTC [#22727](https://github.com/arendst/Tasmota/issues/22727) - Support for Senseair S88 CO2 sensor [#22733](https://github.com/arendst/Tasmota/issues/22733) +- Support for C8-CO2-5K CO2 sensor [#22905](https://github.com/arendst/Tasmota/issues/22905) - Support for ESP32 Two-Wire Automotive Interface (TWAI) or Controller Area Network (CAN) busses - GPS driver select baudrate using GPIO GPS_RX1 (9600bps), GPS_RX2 (19200bps) or GPS_RX3 (38400bps) [#22869](https://github.com/arendst/Tasmota/issues/22869) - I2S AAC support for web radio [#22787](https://github.com/arendst/Tasmota/issues/22787) @@ -135,6 +136,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Berry `bytes().appendhex()` [#22767](https://github.com/arendst/Tasmota/issues/22767) - Berry `serial.read()` read only `n` bytes [#22835](https://github.com/arendst/Tasmota/issues/22835) - Berry `tasmota.global.tele_period` and `tasmota.settings.tele_period` [#22865](https://github.com/arendst/Tasmota/issues/22865) +- Berry `tasmota.settings` entries for PixelType [#22912](https://github.com/arendst/Tasmota/issues/22912) - Berry `tasmota.add_rule_once` and auto-remove rules with same pattern and id [#22900](https://github.com/arendst/Tasmota/issues/22900) - Berry driver for M5Stack 8encoder [#22724](https://github.com/arendst/Tasmota/issues/22724) - Berry driver for AXP2102 and M5CoreS3 [#22878](https://github.com/arendst/Tasmota/issues/22878) @@ -145,6 +147,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Berry unicode encoding to string parsing [#22713](https://github.com/arendst/Tasmota/issues/22713) - Berry light_pixels values to `tasmota.settings` [#22762](https://github.com/arendst/Tasmota/issues/22762) - LVLG/HASPmota add color names from OpenHASP [#22879](https://github.com/arendst/Tasmota/issues/22879) +- LVGL `lv.set_paint_cb()` to register a callback when screen is refreshed [#22909](https://github.com/arendst/Tasmota/issues/22909) - HASPmota support for `buttonmatrix` events [#22898](https://github.com/arendst/Tasmota/issues/22898) ### Breaking Changed @@ -158,6 +161,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - ESP32 disable PSRAM check (and on restart some relay toggles) with `#define DISABLE_PSRAMCHECK true` [#21266](https://github.com/arendst/Tasmota/issues/21266) - Berry `gpio.pin_mode` frees PWM on pin - Berry bit-shift operators to `int64` [#22709](https://github.com/arendst/Tasmota/issues/22709) +- Berry callback now passes 5 arguments instead of 4 (in line with documentation) [#22908](https://github.com/arendst/Tasmota/issues/22908) - HASPmota use 'roboto.ttf' for automatic sizing of default font [#22697](https://github.com/arendst/Tasmota/issues/22697) - HASPmota add 'tag' attribute for free-form JSON [#22698](https://github.com/arendst/Tasmota/issues/22698) - HASPmota support for `tabview` [#22707](https://github.com/arendst/Tasmota/issues/22707) diff --git a/tasmota/berry/examples/heatfan.be b/tasmota/berry/examples/heatfan.be index 13cece8bc..b0b23bda4 100644 --- a/tasmota/berry/examples/heatfan.be +++ b/tasmota/berry/examples/heatfan.be @@ -7,16 +7,15 @@ SPDX-License-Identifier: GPL-3.0-only -# #-------------------------------------------------------------- -Version v1.2.6 +Version v1.2.8 ESP32-C2 based HeatFan WiFi Controller using Tasmota and Berry local CH Fan control https://heatfan.eu/product/wifi-controller/ Template {"NAME":"HeatFan","GPIO":[4864,229,228,4737,4738,224,0,225,32,448,226,0,0,0,0,0,0,0,227,0,0],"FLAG":0,"BASE":1} Module 0 # Enable above template -SO15 1 # (Light) COLOR/DIMMER/CT/CHANNEL (1) -SO68 0 # (Light) Enable Color PWM (0) -GroupTopic2 heatfans # Allow MQTT group topic control using buttons "Copy Mode" and "Rotate Mode" +SO15 0 # Disable light and enable PWM control +GroupTopic2 heatfans # Allow MQTT group topic control using buttons "Send Mode" and "Next Mode" Relay1 to Relay6 control Leds for Modes 1 to 6 (interlocked) @@ -81,7 +80,7 @@ class heatfan_cls # bool var teleperiod # int - var mode, mode_persist, mode_states, speed, dimmer_change + var mode, mode_persist, mode_states, speed, pwm_fan_change # float var temp_ext, last_temp_ext, dz_temp_ext # string @@ -108,7 +107,7 @@ class heatfan_cls #-----------------------------------------------------------# def init() - self.version = "1.2.6" + self.version = "1.2.8" self.persist_load() self.teleperiod = 0 self.mode_states = 6 # Number of modes (needs var as static doesn't work) @@ -116,7 +115,7 @@ class heatfan_cls self.temp_ext = 0 self.last_temp_ext = 0 self.dz_temp_ext = 0 - self.dimmer_change = -1 + self.pwm_fan_change = -1 self.hostname = tasmota.cmd('Hostname')['Hostname'] tasmota.log(f"HFN: HeatFan {self.version} started on {self.hostname}", 2) @@ -207,22 +206,22 @@ class heatfan_cls self.speed = 0 end - var dimmer = 0 + var pwm_fan = 0 if self.speed > 0 - dimmer = 30 + (self.speed * 6) + pwm_fan = 24 + (self.speed * 6) # 30% .. 84% end -# tasmota.log(f"HFN: Range1 {self.temp_ext}, Mode {self.mode}, Speeds {speeds}, Step {temp_step}, Speed {self.speed}, Dimmer {dimmer}", 3) +# tasmota.log(f"HFN: Range1 {self.temp_ext}, Mode {self.mode}, Speeds {speeds}, Step {temp_step}, Speed {self.speed}, PwmFan {pwm_fan}", 3) - if dimmer != self.dimmer_change - if dimmer > 0 - tasmota.cmd('Dimmer ' .. dimmer) # Set fan speed + if pwm_fan != self.pwm_fan_change + if pwm_fan > 0 + var duty = (1023 * pwm_fan) / 100 + gpio.set_pwm(9, duty) # Set fan speed self.set_pin(6, 1) # GPIO_FANS_EN else self.set_pin(6, 0) # GPIO_FANS_EN - tasmota.set_power(6, false) # Set Power7 off (power offset from 0) end - self.dimmer_change = dimmer + self.pwm_fan_change = pwm_fan end if self.teleperiod == 1 # Needs to be executed here as tasmota.cmd destroys Response @@ -262,14 +261,14 @@ class heatfan_cls self.speed, max_speed) tasmota.web_send_decimal(msg) - if webserver.has_arg("m_group_copy") + if webserver.has_arg("m_grp_send") # Send current mode to group topic if 0 == self.mode tasmota.cmd("Publish cmnd/heatfans/Power0 0") else tasmota.cmd(f"Publish cmnd/heatfans/Power{self.mode} 1") end - elif webserver.has_arg("m_group_rotate") + elif webserver.has_arg("m_grp_next") # Rotate group topic mode from off,1,2,3,4,5,6,off... if self.mode == self.mode_states tasmota.cmd(f"Publish cmnd/heatfans/Power{self.mode_states} 0") @@ -281,8 +280,8 @@ class heatfan_cls def web_add_main_button() webserver.content_send("") - webserver.content_send("") - webserver.content_send("") + webserver.content_send("") + webserver.content_send("") webserver.content_send("
") webserver.content_send(f"
HeatFan {self.version}
") end @@ -301,8 +300,8 @@ tasmota.cmd("SO13 1") # (Button) Support only single press (1) tasmota.cmd("SO73 1") # (Button) Detach buttons from relays (1) tasmota.cmd("SO146 1") # (ESP32) Show ESP32 internal temperature sensor tasmota.cmd("SO161 1") # (GUI) Disable display of state text (1) -tasmota.cmd("PwmFrequency 20000") # Fan frequency to 20kHz -tasmota.cmd("LedTable 0") # Disable gamma correction +tasmota.cmd("PwmRange 1023") # Fan PWM duty cycle +tasmota.cmd("PwmFrequency 20000") # Fan PWM frequency to 20kHz tasmota.cmd("webtime 11,19") # Enable GUI time HH:MM:SS tasmota.cmd("websensor2 0") # Disable display of ADC information in GUI tasmota.cmd("webrefresh 1000") # Update GUI every second