diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a967035c..68bd6df46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,10 @@ All notable changes to this project will be documented in this file. - Berry driver for AXP2102 and M5CoreS3 (#22878) - GPS driver select baudrate using GPIO GPS_RX1 (9600bps), GPS_RX2 (19200bps) or GPS_RX3 (38400bps) (#22869) - LVLG/HASPmota add color names from OpenHASP (#22879) -- HASPmota support for `buttonmatrix` events -- Berry driver for PN532 NFC/Mifare reader -- Berry `tasmota.add_rule_once` and auto-remove rules with same pattern and id +- HASPmota support for `buttonmatrix` events (#22898) +- 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 ### Breaking Changed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 838172def..a3f978728 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -131,17 +131,21 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - ESP32 expand `Pixels` with reverse, height and alternate [#22755](https://github.com/arendst/Tasmota/issues/22755) - Display template for Waveshare ESP32-C6 LCD 1.47 [#22863](https://github.com/arendst/Tasmota/issues/22863) - Berry `animate.crenel` primitive [#22673](https://github.com/arendst/Tasmota/issues/22673) -- Berry scroll to Leds_matrix [#22693](https://github.com/arendst/Tasmota/issues/22693) -- Berry add unicode encoding to string parsing [#22713](https://github.com/arendst/Tasmota/issues/22713) - Berry `tasmota.int(v, min, max)` function [#22723](https://github.com/arendst/Tasmota/issues/22723) -- Berry driver for M5Stack 8encoder [#22724](https://github.com/arendst/Tasmota/issues/22724) -- Berry add light_pixels values to `tasmota.settings` [#22762](https://github.com/arendst/Tasmota/issues/22762) -- Berry add `bytes().appendhex()` [#22767](https://github.com/arendst/Tasmota/issues/22767) -- Berry WS2812 real-time Leds panel as app [#22788](https://github.com/arendst/Tasmota/issues/22788) +- 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.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) +- Berry driver for PN532 NFC/Mifare reader [#22899](https://github.com/arendst/Tasmota/issues/22899) +- Berry example for HeatFan WiFi Controller +- Berry WS2812 real-time Leds panel as app [#22788](https://github.com/arendst/Tasmota/issues/22788) +- Berry scroll to Leds_matrix [#22693](https://github.com/arendst/Tasmota/issues/22693) +- 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) +- HASPmota support for `buttonmatrix` events [#22898](https://github.com/arendst/Tasmota/issues/22898) ### Breaking Changed diff --git a/tasmota/berry/examples/heatfan_1_2_4.be b/tasmota/berry/examples/heatfan.be similarity index 94% rename from tasmota/berry/examples/heatfan_1_2_4.be rename to tasmota/berry/examples/heatfan.be index 34daacada..891b174f8 100644 --- a/tasmota/berry/examples/heatfan_1_2_4.be +++ b/tasmota/berry/examples/heatfan.be @@ -7,7 +7,7 @@ -# #------------------------------------------------------------ - Version v1.2.4 + Version v1.2.5 ESP32-C2 based HeatFan WiFi Controller using Tasmota and Berry local CH Fan control https://heatfan.eu/product/wifi-controller/ @@ -108,7 +108,7 @@ class heatfan_cls #-----------------------------------------------------------# def init() - self.version = "1.2.4" + self.version = "1.2.5" self.persist_load() self.teleperiod = 0 self.mode_states = 6 # Number of modes (needs var as static doesn't work) @@ -121,7 +121,16 @@ class heatfan_cls tasmota.log(f"HFN: HeatFan {self.version} started on {self.hostname}", 2) - tasmota.add_driver(self) + if global.heatfan_driver + global.heatfan_driver.stop() # Let previous instance bail out cleanly + end + tasmota.add_driver(global.heatfan_driver := self) + tasmota.add_rule("Analog#Range1", / value -> self.rule_range(value)) + end + + def stop() + tasmota.remove_driver(self) + tasmota.remove_rule("Analog#Range1") end #-----------------------------------------------------------# @@ -264,7 +273,8 @@ class heatfan_cls end def web_add_main_button() - webserver.content_send(f"