Skip to content

Commit

Permalink
update from arendst
Browse files Browse the repository at this point in the history
  • Loading branch information
gemu2015 committed Aug 13, 2024
1 parent 1d1e121 commit 8d7a2c0
Show file tree
Hide file tree
Showing 58 changed files with 12,535 additions and 11,604 deletions.
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,36 @@ All notable changes to this project will be documented in this file.
- Matter support for split lights (`SetOption68 1` and `SetOption37 128`) (#21834)
- Berry `webserver_async` (#21836)
- NeoPool command `NPSetOption<x>` to enabled/disable data validation/connection statistics (#21850)
- Analog GPIO ``ADC Input`` with ``AdcParam<x> 1,<start_range>,<end_range>,<margin>,1`` provide direct light control
- Analog GPIO ``ADC Voltage`` with ``AdcParam<x> 11,<start_range>,<end_range>,<lowest_voltage>,<highest_voltage>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Current`` with ``AdcParam<x> 12,<start_range>,<end_range>,<lowest_current>,<highest_current>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Input`` with ``AdcGpio<pin> <start_range>,<end_range>,<margin>,1`` provide direct light control
- Analog GPIO ``ADC Voltage`` with ``AdcGpio<pin> <start_range>,<end_range>,<lowest_voltage>,<highest_voltage>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Current`` with ``AdcGpio<pin> <start_range>,<end_range>,<lowest_current>,<highest_current>`` provide energy monitoring with dc voltage
- Berry new type "addr" to ctypes mapping (#21883)
- Berry `file.savecode()` (#21884)
- Berry `solidify.nocompact()` and reduce size of Matter UI (#21885)
- Berry `zigbee.find()` (#21889)
- Berry `zigbee.started()` (#21895)
- Command ``AdcGpio<gpio> <parameters>`` to better support ADC configuration
- Rule and Scripter xdrv sensor polling

### Breaking Changed
- Berry `energy` module support for 8 phases and move to pseudo-arrays (#21887)

### Changed
- Berry consolidated constants for solidified classes reduces Flash size (#2185)
- Berry updated precompiled Windows binary (#21858)
- Matter improve encoding of attributes to reduce flash size (#21864)
- ESP32 platform update from 2024.07.11 to 2024.08.10 (#21893)
- ESP32 Framework (Arduino Core) from v3.0.2 to v3.0.4 (#21893)
- Refactored Analog driver to better support multiple channels
- Zigbee loads device data early before MCU startup (#21917)
- Rule and Scripter sensor polling
- GUI name of Analog<x> to ADC<x>

### Fixed
- Berry `light.get` for separate RGB/CT (#21818)
- Berry `bytes` setters and getters with negative offsets (#21835)
- Berry `file.write()` raises an exception on failure (ex: disk full) (#21849)
- Filesystem SD MMC free space display (#21869)

### Removed
- Berry internal: remove class from closure to simplify code (#21839)
Expand Down
32 changes: 24 additions & 8 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ While fallback or downgrading is common practice it was never supported due to S

This release will be supported from ESP8266/Arduino library Core version **2.7.7** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.

This release will be supported from ESP32/Arduino library Core version **3.0.2**.
This release will be supported from ESP32/Arduino library Core version **3.0.4**.

Support of ESP8266 Core versions before 2.7.7 and ESP32 Core versions before 3.0.2 have been removed.
Support of ESP8266 Core versions before 2.7.7 and ESP32 Core versions before 3.0.4 have been removed.

### Known issues with v14.1.0

Expand Down Expand Up @@ -85,7 +85,7 @@ Historical binaries can be downloaded from
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``

### ESP32, ESP32-C2, ESP32-C3, ESP32-C6, ESP32-S2 and ESP32-S3 based
The following binary downloads have been compiled with ESP32/Arduino library core version **3.0.2**.
The following binary downloads have been compiled with ESP32/Arduino library core version **3.0.4**.

- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
- **tasmota32solo1.bin** = The Tasmota version with most drivers including additional sensors and KNX for single core ESP32 and 4M+ flash.
Expand Down Expand Up @@ -121,14 +121,16 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm

## Changelog v14.1.0.4
### Added
- Command ``AdcGpio<gpio> <parameters>`` to better support ADC configuration
- Support for QMP6988 temperature and pressure sensor
- Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3``
- Support for Sonoff iFan04-H using template [#16402](https://github.com/arendst/Tasmota/issues/16402)
- Support for Sonoff POWCT Ring [#21131](https://github.com/arendst/Tasmota/issues/21131)
- Support for Wooliis Hall Effect Coulometer or Battery capacity monitor [#21732](https://github.com/arendst/Tasmota/issues/21732)
- Analog GPIO ``ADC Input`` with ``AdcParam<x> 1,<start_range>,<end_range>,<margin>,1`` provide direct light control
- Analog GPIO ``ADC Voltage`` with ``AdcParam<x> 11,<start_range>,<end_range>,<lowest_voltage>,<highest_voltage>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Current`` with ``AdcParam<x> 12,<start_range>,<end_range>,<lowest_current>,<highest_current>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Input`` with ``AdcGpio<pin> <start_range>,<end_range>,<margin>,1`` provide direct light control
- Analog GPIO ``ADC Voltage`` with ``AdcGpio<pin> <start_range>,<end_range>,<lowest_voltage>,<highest_voltage>`` provide energy monitoring with dc voltage
- Analog GPIO ``ADC Current`` with ``AdcGpio<pin> <start_range>,<end_range>,<lowest_current>,<highest_current>`` provide energy monitoring with dc voltage
- Rule and Scripter xdrv sensor polling
- Skip MQTT response if command is prefixed with underscore [#21740](https://github.com/arendst/Tasmota/issues/21740)
- Skip MQTT response if commands are executed prefixed with ``Backlog2`` (no delay) or ``Backlog3`` [#21740](https://github.com/arendst/Tasmota/issues/21740)
- Extend command ``SetOption147 1`` to disable publish of IRReceived MQTT messages [#21574](https://github.com/arendst/Tasmota/issues/21574)
Expand All @@ -146,6 +148,11 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Berry `int64` added `low32()` and `high32()` methods, used in Matter [#21728](https://github.com/arendst/Tasmota/issues/21728)
- Berry `webserver_async` [#21836](https://github.com/arendst/Tasmota/issues/21836)
- Berry cam module and img class [#21743](https://github.com/arendst/Tasmota/issues/21743)
- Berry new type "addr" to ctypes mapping [#21883](https://github.com/arendst/Tasmota/issues/21883)
- Berry `file.savecode()` [#21884](https://github.com/arendst/Tasmota/issues/21884)
- Berry `solidify.nocompact()` and reduce size of Matter UI [#21885](https://github.com/arendst/Tasmota/issues/21885)
- Berry `zigbee.find()` [#21889](https://github.com/arendst/Tasmota/issues/21889)
- Berry `zigbee.started()` [#21895](https://github.com/arendst/Tasmota/issues/21895)
- HASPmota rounds to nearest int values passed as 'real' [#21599](https://github.com/arendst/Tasmota/issues/21599)
- Matter support for Air Quality sensors [#21559](https://github.com/arendst/Tasmota/issues/21559)
- Matter support for bridged Air Quality [#21597](https://github.com/arendst/Tasmota/issues/21597)
Expand All @@ -157,11 +164,17 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Matter improve internal `inspect`for superclasses [#21824](https://github.com/arendst/Tasmota/issues/21824)
- Matter support for split lights (`SetOption68 1` and `SetOption37 128`) [#21834](https://github.com/arendst/Tasmota/issues/21834)

### Breaking Changed
- Berry `energy` module support for 8 phases and move to pseudo-arrays [#21887](https://github.com/arendst/Tasmota/issues/21887)

### Changed
- ESP8266 platform update from 2024.01.01 to 2024.06.00 [#21668](https://github.com/arendst/Tasmota/issues/21668)
- ESP8266 Framework (Arduino Core) from v2.7.6 to v2.7.7 [#21668](https://github.com/arendst/Tasmota/issues/21668)
- ESP32 platform update from 2024.05.13 to 2024.07.11 [#21765](https://github.com/arendst/Tasmota/issues/21765)
- ESP32 Framework (Arduino Core) from v3.0.0 to v3.0.2 [#21694](https://github.com/arendst/Tasmota/issues/21694)
- ESP32 platform update from 2024.05.13 to 2024.08.10 [#21893](https://github.com/arendst/Tasmota/issues/21893)
- ESP32 Framework (Arduino Core) from v3.0.0 to v3.0.4 [#21893](https://github.com/arendst/Tasmota/issues/21893)
- Rule and Scripter sensor polling
- Refactored Analog driver to better support multiple channels
- GUI name of Analog<x> to ADC<x>
- Optional MQTT_TELE_RETAIN to Energy Margins message replaced by ``SensorRetain``
- Display timing splash screen with display modes 1 to 5
- Allow receive or send using SerialBridge
Expand All @@ -173,18 +186,21 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- ESP32 MI32 refactoring, bugfixes, generic device scanning [#21603](https://github.com/arendst/Tasmota/issues/21603)
- ESP32 MI32 improve parser [#21648](https://github.com/arendst/Tasmota/issues/21648)
- ESP32 TM1621 number overflow from "9999" to "12E3" [#21131](https://github.com/arendst/Tasmota/issues/21131)
- Zigbee loads device data early before MCU startup [#21917](https://github.com/arendst/Tasmota/issues/21917)
- Berry updated precompiled Windows binary [#21858](https://github.com/arendst/Tasmota/issues/21858)
- Berry simplified `module persist` [#21812](https://github.com/arendst/Tasmota/issues/21812)
- Berry consolidated constants for solidified classes reduces Flash size [#2185](https://github.com/arendst/Tasmota/issues/2185)
- Matter refactoring of bridged devices [#21575](https://github.com/arendst/Tasmota/issues/21575)
- Matter filter suffix automatically added for sensors [#21589](https://github.com/arendst/Tasmota/issues/21589)
- Matter support for Rain sensor [#21633](https://github.com/arendst/Tasmota/issues/21633)
- Matter refactor reading of multiple attributes to reduce memory pressure [#21675](https://github.com/arendst/Tasmota/issues/21675)
- Matter improve encoding of attributes to reduce flash size [#21864](https://github.com/arendst/Tasmota/issues/21864)

### Fixed
- On universal display remove default backlight power if a single PWM channel is used for backlight. Regression from 14.0.0.1 [#21726](https://github.com/arendst/Tasmota/issues/21726)
- Shutter MQTT on inverted shutter [#21663](https://github.com/arendst/Tasmota/issues/21663)
- Scripter TCP server [#21660](https://github.com/arendst/Tasmota/issues/21660)
- Filesystem SD MMC free space display [#21869](https://github.com/arendst/Tasmota/issues/21869)
- ESP32 allow use of UART0 with enabled USB_CDC_CONSOLE [#21496](https://github.com/arendst/Tasmota/issues/21496)
- ESP32 I2S fixes [#21770](https://github.com/arendst/Tasmota/issues/21770)
- ESP32 Resistive Touch xpt for 2 spi busses [#21814](https://github.com/arendst/Tasmota/issues/21814)
Expand Down
11 changes: 8 additions & 3 deletions lib/libesp32/Berry/src/be_bytecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,21 @@ static void save_global_info(bvm *vm, void *fp)
}
}

void be_bytecode_save_to_fs(bvm *vm, void *fp, bproto *proto)
{
save_header(fp);
save_global_info(vm, fp);
save_proto(vm, fp, proto);
}

void be_bytecode_save(bvm *vm, const char *filename, bproto *proto)
{
void *fp = be_fopen(filename, "wb");
if (fp == NULL) {
bytecode_error(vm, be_pushfstring(vm,
"can not open file '%s'.", filename));
} else {
save_header(fp);
save_global_info(vm, fp);
save_proto(vm, fp, proto);
be_bytecode_save_to_fs(vm, fp, proto);
be_fclose(fp);
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/libesp32/Berry/src/be_bytecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "be_object.h"

void be_bytecode_save(bvm *vm, const char *filename, bproto *proto);
void be_bytecode_save_to_fs(bvm *vm, void *fp, bproto *proto);
bclosure* be_bytecode_load(bvm *vm, const char *filename);
bclosure* be_bytecode_load_from_fs(bvm *vm, void *fp);
bbool be_bytecode_check(const char *path);
Expand Down
22 changes: 22 additions & 0 deletions lib/libesp32/Berry/src/be_filelib.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "be_mem.h"
#include "be_sys.h"
#include "be_gc.h"
#include "be_bytecode.h"
#include <string.h>

#define READLINE_STEP 100
Expand Down Expand Up @@ -181,6 +182,26 @@ static int i_close(bvm *vm)
be_return_nil(vm);
}

static int i_savecode(bvm *vm)
{
int argc = be_top(vm);
if (argc >= 2 && be_isclosure(vm, 2)) {
be_getmember(vm, 1, ".p");
if (be_iscomptr(vm, -1)) {
void *fh = be_tocomptr(vm, -1);
bvalue *v = be_indexof(vm, 2);
if (var_isclosure(v)) {
bclosure *cl = var_toobj(v);
bproto *pr = cl->proto;
be_bytecode_save_to_fs(vm, fh, pr);
}
}
} else {
be_raise(vm, "type_error", "closure expected");
}
be_return_nil(vm);
}

#if !BE_USE_PRECOMPILED_OBJECT
static int m_open(bvm *vm)
#else
Expand All @@ -201,6 +222,7 @@ int be_nfunc_open(bvm *vm)
{ "flush", i_flush },
{ "close", i_close },
{ "deinit", i_close },
{ "savecode", i_savecode },
{ NULL, NULL }
};
fname = argc >= 1 && be_isstring(vm, 1) ? be_tostring(vm, 1) : NULL;
Expand Down
1 change: 1 addition & 0 deletions lib/libesp32/Berry/src/be_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#define BE_VA_METHOD (1 << 1) /* function is a method (this is only a hint) */
#define BE_VA_STATICMETHOD (1 << 2) /* the function is a static method and has the class as implicit '_class' variable */
#define BE_VA_SHARED_KTAB (1 << 3) /* the funciton has a shared consolidated ktab */
#define BE_VA_NOCOMPACT (1 << 4) /* the funciton has a shared consolidated ktab */
#define array_count(a) (sizeof(a) / sizeof((a)[0]))

#define bcommon_header \
Expand Down
Loading

0 comments on commit 8d7a2c0

Please sign in to comment.