From 30cffa1acca33c6f1a015f94eb67a03dff3df83d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:13:00 +0200 Subject: [PATCH 001/144] Bump version v14.2.0.1 --- CHANGELOG.md | 18 +++++- RELEASENOTES.md | 93 +------------------------------ tasmota/include/tasmota_version.h | 2 +- 3 files changed, 20 insertions(+), 93 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1749334e..d8498bc8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development +## [14.2.0.1] +### Added + +### Breaking Changed + +### Changed + +### Fixed + +### Removed + +## [Released] + +## [14.2.0] 20240814 +- Release Rita + ## [14.1.0.4] 20240814 ### Added - Support for Sonoff iFan04-H using template (#16402) @@ -128,8 +144,6 @@ All notable changes to this project will be documented in this file. ### Fixed - Berry `input()` returns empty string and does not crash (#21565) -## [Released] - ## [14.1.0] 20240603 - Release Rachel diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6bd9392c2..d0afcf35c 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -80,7 +80,7 @@ Latest released binaries can be downloaded from - http://ota.tasmota.com/tasmota/release Historical binaries can be downloaded from -- http://ota.tasmota.com/tasmota/release-14.1.0 +- http://ota.tasmota.com/tasmota/release-14.2.0 The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz`` @@ -109,7 +109,7 @@ Latest released binaries can be downloaded from - https://ota.tasmota.com/tasmota32/release Historical binaries can be downloaded from -- https://ota.tasmota.com/tasmota32/release-14.1.0 +- https://ota.tasmota.com/tasmota32/release-14.2.0 The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasmota.com/tasmota32/release/tasmota32.bin`` @@ -119,100 +119,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v14.1.0.4 +## Changelog v14.2.0.1 ### Added -- Command ``AdcGpio `` 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 ``AdcGpio ,,,1`` provide direct light control -- Analog GPIO ``ADC Voltage`` with ``AdcGpio ,,,`` provide energy monitoring with dc voltage -- Analog GPIO ``ADC Current`` with ``AdcGpio ,,,`` 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) -- NeoPool command `NPSetOption` to enabled/disable data validation/connection statistics [#21850](https://github.com/arendst/Tasmota/issues/21850) -- NeoPool data validation and communication statistics default enabled for ESP32 only [#21721](https://github.com/arendst/Tasmota/issues/21721) -- ESP32 support for power and energy limit checks, like ``MaxEnergy2`` per phase [#21695](https://github.com/arendst/Tasmota/issues/21695) -- Berry solidification of `bytes` instances [#21558](https://github.com/arendst/Tasmota/issues/21558) -- Berry automatic rounding of float to int when calling C mapped functions [#21601](https://github.com/arendst/Tasmota/issues/21601) -- Berry `math.round` [#21602](https://github.com/arendst/Tasmota/issues/21602) -- Berry `classof` extended to class methods [#21615](https://github.com/arendst/Tasmota/issues/21615) -- Berry `tasmota.rtc("config_time")` [#21698](https://github.com/arendst/Tasmota/issues/21698) -- Berry `math.min()` and `math.max()` [#21705](https://github.com/arendst/Tasmota/issues/21705) -- Berry `FUNC_ANY_KEY` event calling `any_key()` [#21708](https://github.com/arendst/Tasmota/issues/21708) -- Berry `FUNC_BUTTON_MULTI_PRESSED` event and make `FUNC_BUTTON_PRESSED` called only on state changes and once per second [#21711](https://github.com/arendst/Tasmota/issues/21711) -- 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) -- Matter internal debug option [#21634](https://github.com/arendst/Tasmota/issues/21634) -- Matter Fan support (virtual only) [#21637](https://github.com/arendst/Tasmota/issues/21637) -- Matter show event name in logs [#21649](https://github.com/arendst/Tasmota/issues/21649) -- Matter full support of events [#21698](https://github.com/arendst/Tasmota/issues/21698) -- Matter support for 'Generic Switch' based on Tasmota Buttons [#21731](https://github.com/arendst/Tasmota/issues/21731) -- 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.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 to ADC -- 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 -- SerialBridge command ``SSerialSend9`` replaced by ``SSerialMode`` -- SML replace vars in descriptor and line [#21622](https://github.com/arendst/Tasmota/issues/21622) -- NeoPool using temperature as only frequently changing value for NPTeleperiod [#21628](https://github.com/arendst/Tasmota/issues/21628) -- NeoPool make compiler setting available by `user_config_override.h` [#21645](https://github.com/arendst/Tasmota/issues/21645) -- ESP32 support for energy margin checks, like ``MaxPower2`` per phase [#21695](https://github.com/arendst/Tasmota/issues/21695) -- 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) -- Berry `input()` returns empty string and does not crash [#21565](https://github.com/arendst/Tasmota/issues/21565) -- Berry `bytes.resize()` for large sizes [#21716](https://github.com/arendst/Tasmota/issues/21716) -- Berry `light.get` for separate RGB/CT [#21818](https://github.com/arendst/Tasmota/issues/21818) -- Berry `bytes` setters and getters with negative offsets [#21835](https://github.com/arendst/Tasmota/issues/21835) -- Berry `file.write()` raises an exception on failure (ex: disk full) [#21849](https://github.com/arendst/Tasmota/issues/21849) -- Matter interverted attributes 0xFFF9 and 0xFFFB [#21636](https://github.com/arendst/Tasmota/issues/21636) -- Matter CASE Sigma1 resumption mode for faster reconnection [#21644](https://github.com/arendst/Tasmota/issues/21644) -- Matter TLV.U8 unsigned encoding [#21672](https://github.com/arendst/Tasmota/issues/21672) -- Matter resumption final ack [#21673](https://github.com/arendst/Tasmota/issues/21673) ### Removed -- Berry internal: remove class from closure to simplify code [#21839](https://github.com/arendst/Tasmota/issues/21839) diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h index 505cc8b74..e6b23a469 100644 --- a/tasmota/include/tasmota_version.h +++ b/tasmota/include/tasmota_version.h @@ -22,6 +22,6 @@ #define TASMOTA_SHA_SHORT // Filled by Github sed -const uint32_t TASMOTA_VERSION = 0x0E010004; // 14.1.0.4 +const uint32_t TASMOTA_VERSION = 0x0E020001; // 14.2.0.1 #endif // _TASMOTA_VERSION_H_ From 851f11dcdde20f717bdef8862aaa9b755787858f Mon Sep 17 00:00:00 2001 From: stefanbode Date: Thu, 15 Aug 2024 10:08:54 +0200 Subject: [PATCH 002/144] fix potential overflow on uptime (#21965) * fix potential overflow * fix potential overflow * fix potential overflow * fix potential overflow --- tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 10 ++++------ tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 11 +++++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index 2a028bb97..d15bf81e9 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -213,14 +213,12 @@ void ShutterAllowPreStartProcedure(uint8_t i) { // Prestart allow e.g. to release a LOCK or something else before the movement start // Anyway, as long var1 != 99 this is skipped (luckily) #ifdef USE_RULES - uint32_t uptime_Local = 0; AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); - uptime_Local = TasmotaGlobal.uptime; - while (uptime_Local + 10 > TasmotaGlobal.uptime - && (String)rules_vars[i] == "99") { - loop(); + // wait for response from rules + uint32_t start_time = millis(); + while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { + delay(1); } - //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start. Done")); #endif // USE_RULES } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index 776f08a74..6ad2ed327 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -731,13 +731,12 @@ void ShutterAllowPreStartProcedure(uint8_t i) { // What PreStartProcedure do you want to execute here? // Anyway, as long var1 != 99 this is skipped (luckily) #ifdef USE_RULES - uint32_t uptime_Local=0; - AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i+1, rules_vars[i]); - uptime_Local = TasmotaGlobal.uptime; - while (uptime_Local+10 > TasmotaGlobal.uptime && (String)rules_vars[i] == "99") { - loop(); + AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); + // wait for response from rules + uint32_t start_time = millis(); + while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { + delay(1); } - //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start. Done")); #endif // USE_RULES } From 1b24378da5ef1c04e8a47908bce3d1cefd5a701f Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 15 Aug 2024 12:52:12 +0200 Subject: [PATCH 003/144] Free 500 code bytes on ADC/ESP8266 --- tasmota/tasmota_xsns_sensor/xsns_02_analog.ino | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino b/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino index 68754c514..bcd9c358f 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino @@ -71,7 +71,10 @@ \*********************************************************************************************/ #define XSNS_02 2 +#if defined(ESP32) && defined(USE_ENERGY_SENSOR) +// Only ESP32 and up support more than one ADC channel enabling energy driver #define XNRG_33 33 +#endif // ESP32 and USE_ENERGY_SENSOR #ifdef ESP32 #include "esp32-hal-adc.h" @@ -944,7 +947,10 @@ void AdcShow(bool json) { break; } case GPIO_ADC_VOLTAGE: - if (TasmotaGlobal.energy_driver != XNRG_33) { +#if defined(ESP32) && defined(USE_ENERGY_SENSOR) + if (TasmotaGlobal.energy_driver != XNRG_33) +#endif // ESP32 and USE_ENERGY_SENSOR + { float value = AdcGetRange(channel) / 10000; // Volt if (value < 0.0f) { value = 0.0f; } // Disregard negative values if (json) { @@ -959,7 +965,10 @@ void AdcShow(bool json) { } break; case GPIO_ADC_CURRENT: - if (TasmotaGlobal.energy_driver != XNRG_33) { +#if defined(ESP32) && defined(USE_ENERGY_SENSOR) + if (TasmotaGlobal.energy_driver != XNRG_33) +#endif // ESP32 and USE_ENERGY_SENSOR + { float value = AdcGetRange(channel) / 10000; // Ampere if (value < 0.0f) { value = 0.0f; } // Disregard negative values if (json) { @@ -1152,7 +1161,7 @@ void CmndAdcParam(void) { * Energy Interface \*********************************************************************************************/ -#ifdef USE_ENERGY_SENSOR +#if defined(ESP32) && defined(USE_ENERGY_SENSOR) void AdcEnergyEverySecond(void) { uint32_t voltage_count = 0; uint32_t current_count = 0; @@ -1214,7 +1223,7 @@ bool Xnrg33(uint32_t function) { } return result; } -#endif // USE_ENERGY_SENSOR +#endif // ESP32 and USE_ENERGY_SENSOR /*********************************************************************************************\ * Sensor Interface From 6d2647fd5f857c9e1fc8d43fa74259ea530e5cfc Mon Sep 17 00:00:00 2001 From: stefanbode Date: Thu, 15 Aug 2024 14:28:10 +0200 Subject: [PATCH 004/144] fix potential overflow on uptime 2nd try (#21966) * fix potential overflow * fix potential overflow * fix overflow on millis() * fix overflow on millis() * Update xdrv_27_shutter.ino --------- Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com> --- tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 3 ++- tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index d15bf81e9..1841098f0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -1383,7 +1383,8 @@ void ShutterUpdateVelocity(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { - while (millis() < Shutter[i].last_stop_time + ShutterSettings.shutter_motorstop) { + uint32_t start_time = Shutter[i].last_stop_time; + while (TimePassedSince(start_time) < ShutterSettings.shutter_motorstop && TimePassedSince(start_time) > 0) { loop(); } //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done")); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index 6ad2ed327..9209516ac 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -654,7 +654,8 @@ void ShutterWaitForMotorStop(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { - while (millis() < Shutter[i].last_stop_time + Settings->shutter_motorstop) { + uint32_t start_time = Shutter[i].last_stop_time; + while (TimePassedSince(start_time) < Settings->shutter_motorstop && TimePassedSince(start_time) > 0) { loop(); } //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done")); From bb0db6d8f809d4001581f460c774341b367ad2e8 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 15 Aug 2024 15:12:59 +0200 Subject: [PATCH 005/144] Update changelogs --- CHANGELOG.md | 2 ++ RELEASENOTES.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d8498bc8c..edcb5e04c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,10 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed +- Shutter timing registers overflow (#21966) ### Removed +- ESP8266 Analog input support using energy driver as only one channel is available ## [Released] diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d0afcf35c..968f479a4 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -127,5 +127,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Changed ### Fixed +- Shutter timing registers overflow [#21966](https://github.com/arendst/Tasmota/issues/21966) ### Removed +- ESP8266 Analog input support using energy driver as only one channel is available From 652b9cef871277c23410ac52a7e13f7e3eda15b5 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:32:11 +0200 Subject: [PATCH 006/144] Fix PZEM continue energy monitoring when one phase fails (#21968) --- CHANGELOG.md | 1 + RELEASENOTES.md | 1 + tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino | 10 +++++----- tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino | 10 +++++----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edcb5e04c..9bad3eff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Shutter timing registers overflow (#21966) +- PZEM continue energy monitoring when one phase fails (#21968) ### Removed - ESP8266 Analog input support using energy driver as only one channel is available diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 968f479a4..6085369e9 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -128,6 +128,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Fixed - Shutter timing registers overflow [#21966](https://github.com/arendst/Tasmota/issues/21966) +- PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968) ### Removed - ESP8266 Analog input support using energy driver as only one channel is available diff --git a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino index a1ca3c610..e3ef964fd 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino @@ -79,11 +79,11 @@ void PzemAcEverySecond(void) Energy->frequency[PzemAc.phase] = (float)((buffer[17] << 8) + buffer[18]) / 10.0f; // 50.0 Hz Energy->power_factor[PzemAc.phase] = (float)((buffer[19] << 8) + buffer[20]) / 100.0f; // 1.00 Energy->import_active[PzemAc.phase] = (float)((buffer[15] << 24) + (buffer[16] << 16) + (buffer[13] << 8) + buffer[14]) / 1000.0f; // 4294967.295 kWh - if (PzemAc.phase == Energy->phase_count -1) { - if (TasmotaGlobal.uptime > (PZEM_AC_STABILIZE * ENERGY_MAX_PHASES)) { - EnergyUpdateTotal(); - } - } + } + } + if (PzemAc.phase == Energy->phase_count -1) { + if (TasmotaGlobal.uptime > (PZEM_AC_STABILIZE * ENERGY_MAX_PHASES)) { + EnergyUpdateTotal(); } } } diff --git a/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino b/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino index dbf1c9fce..eed7715eb 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_06_pzem_dc.ino @@ -81,11 +81,11 @@ void PzemDcEverySecond(void) Energy->current[PzemDc->channel] = (float)((buffer[5] << 8) + buffer[6]) / 100.0f; // 655.00 A Energy->active_power[PzemDc->channel] = (float)((buffer[9] << 24) + (buffer[10] << 16) + (buffer[7] << 8) + buffer[8]) / 10.0f; // 429496729.0 W Energy->import_active[PzemDc->channel] = (float)((buffer[13] << 24) + (buffer[14] << 16) + (buffer[11] << 8) + buffer[12]) / 1000.0f; // 4294967.295 kWh - if (PzemDc->channel == Energy->phase_count -1) { - if (TasmotaGlobal.uptime > (PZEM_DC_STABILIZE * ENERGY_MAX_PHASES)) { - EnergyUpdateTotal(); - } - } + } + } + if (PzemDc->channel == Energy->phase_count -1) { + if (TasmotaGlobal.uptime > (PZEM_DC_STABILIZE * ENERGY_MAX_PHASES)) { + EnergyUpdateTotal(); } } } From c0eb28dae9eea71954ce838112948c51254e4cb3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:53:58 +0200 Subject: [PATCH 007/144] Harden shutter timeouts --- .../tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 12 ++++++++++++ tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index 1841098f0..95a1272dc 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -215,10 +215,16 @@ void ShutterAllowPreStartProcedure(uint8_t i) { #ifdef USE_RULES AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); // wait for response from rules +/* uint32_t start_time = millis(); while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { delay(1); } +*/ + uint32_t end_time = millis() + 10000; + while (!TimeReached(end_time) && (String)rules_vars[i] == "99") { + delay(1); + } #endif // USE_RULES } @@ -1383,10 +1389,16 @@ void ShutterUpdateVelocity(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { +/* uint32_t start_time = Shutter[i].last_stop_time; while (TimePassedSince(start_time) < ShutterSettings.shutter_motorstop && TimePassedSince(start_time) > 0) { loop(); } +*/ + uint32_t end_time = Shutter[i].last_stop_time + ShutterSettings.shutter_motorstop; + while (!TimeReached(end_time)) { + loop(); + } //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done")); } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index 9209516ac..e019cd2e0 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -654,10 +654,16 @@ void ShutterWaitForMotorStop(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { +/* uint32_t start_time = Shutter[i].last_stop_time; while (TimePassedSince(start_time) < Settings->shutter_motorstop && TimePassedSince(start_time) > 0) { loop(); } +*/ + uint32_t end_time = Shutter[i].last_stop_time + Settings->shutter_motorstop; + while (!TimeReached(end_time)) { + loop(); + } //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Stoptime done")); } @@ -734,10 +740,16 @@ void ShutterAllowPreStartProcedure(uint8_t i) { #ifdef USE_RULES AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); // wait for response from rules +/* uint32_t start_time = millis(); while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { delay(1); } +*/ + uint32_t end_time = millis() + 10000; + while (!TimeReached(end_time) && (String)rules_vars[i] == "99") { + delay(1); + } #endif // USE_RULES } From 903686f7b5d583ded1ce0d1f77c2273f666a68ba Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:56:07 +0200 Subject: [PATCH 008/144] Add 64-bit timing support --- tasmota/tasmota_support/support.ino | 47 ++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/tasmota/tasmota_support/support.ino b/tasmota/tasmota_support/support.ino index 829c3ef4a..fc4ea0c7f 100755 --- a/tasmota/tasmota_support/support.ino +++ b/tasmota/tasmota_support/support.ino @@ -2281,27 +2281,46 @@ void TasShiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t va * Sleep aware time scheduler functions borrowed from ESPEasy \*********************************************************************************************/ -inline int32_t TimeDifference(uint32_t prev, uint32_t next) -{ +inline uint64_t GetMicros64() { +#ifdef ESP8266 + return micros64(); +#endif +#ifdef ESP32 + return esp_timer_get_time(); +#endif +} + +// Return the time difference as a signed value, taking into account the timers may overflow. +// Returned timediff is between -24.9 days and +24.9 days. +// Returned value is positive when "next" is after "prev" +inline int32_t TimeDifference(uint32_t prev, uint32_t next) { return ((int32_t) (next - prev)); } -int32_t TimePassedSince(uint32_t timestamp) -{ +inline int64_t TimeDifference64(uint64_t prev, uint64_t next) { + return ((int64_t) (next - prev)); +} + +int32_t TimePassedSince(uint32_t timestamp) { // Compute the number of milliSeconds passed since timestamp given. // Note: value can be negative if the timestamp has not yet been reached. return TimeDifference(timestamp, millis()); } -bool TimeReached(uint32_t timer) -{ - // Check if a certain timeout has been reached. - const long passed = TimePassedSince(timer); - return (passed >= 0); +int64_t TimePassedSince64(const uint64_t& timestamp) { + return TimeDifference64(timestamp, GetMicros64()); } -void SetNextTimeInterval(uint32_t& timer, const uint32_t step) -{ +bool TimeReached(uint32_t timer) { + // Check if a certain timeout has been reached. + return TimePassedSince(timer) >= 0; +} + +bool TimeReached64(const uint64_t& timer) { + return TimePassedSince64(timer) >= 0; +} + +void SetNextTimeInterval(uint32_t& timer, const uint32_t step) { timer += step; const long passed = TimePassedSince(timer); if (passed < 0) { return; } // Event has not yet happened, which is fine. @@ -2314,13 +2333,11 @@ void SetNextTimeInterval(uint32_t& timer, const uint32_t step) timer = millis() + (step - passed); } -int32_t TimePassedSinceUsec(uint32_t timestamp) -{ +int32_t TimePassedSinceUsec(uint32_t timestamp) { return TimeDifference(timestamp, micros()); } -bool TimeReachedUsec(uint32_t timer) -{ +bool TimeReachedUsec(uint32_t timer) { // Check if a certain timeout has been reached. const long passed = TimePassedSinceUsec(timer); return (passed >= 0); From e74142724cb42f5062fa99cb0b95f9ce4f081d43 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:13:44 +0200 Subject: [PATCH 009/144] Disable 64-bit timing support --- tasmota/tasmota_support/support.ino | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tasmota/tasmota_support/support.ino b/tasmota/tasmota_support/support.ino index fc4ea0c7f..d385ec0ac 100755 --- a/tasmota/tasmota_support/support.ino +++ b/tasmota/tasmota_support/support.ino @@ -2280,7 +2280,8 @@ void TasShiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t va /*********************************************************************************************\ * Sleep aware time scheduler functions borrowed from ESPEasy \*********************************************************************************************/ - +/* +// No need to use 64-bit inline uint64_t GetMicros64() { #ifdef ESP8266 return micros64(); @@ -2290,6 +2291,19 @@ inline uint64_t GetMicros64() { #endif } +inline int64_t TimeDifference64(uint64_t prev, uint64_t next) { + return ((int64_t) (next - prev)); +} + +int64_t TimePassedSince64(const uint64_t& timestamp) { + return TimeDifference64(timestamp, GetMicros64()); +} + +bool TimeReached64(const uint64_t& timer) { + return TimePassedSince64(timer) >= 0; +} +*/ + // Return the time difference as a signed value, taking into account the timers may overflow. // Returned timediff is between -24.9 days and +24.9 days. // Returned value is positive when "next" is after "prev" @@ -2297,29 +2311,18 @@ inline int32_t TimeDifference(uint32_t prev, uint32_t next) { return ((int32_t) (next - prev)); } -inline int64_t TimeDifference64(uint64_t prev, uint64_t next) { - return ((int64_t) (next - prev)); -} - int32_t TimePassedSince(uint32_t timestamp) { // Compute the number of milliSeconds passed since timestamp given. // Note: value can be negative if the timestamp has not yet been reached. return TimeDifference(timestamp, millis()); } -int64_t TimePassedSince64(const uint64_t& timestamp) { - return TimeDifference64(timestamp, GetMicros64()); -} - bool TimeReached(uint32_t timer) { // Check if a certain timeout has been reached. + // This is roll-over proof. return TimePassedSince(timer) >= 0; } -bool TimeReached64(const uint64_t& timer) { - return TimePassedSince64(timer) >= 0; -} - void SetNextTimeInterval(uint32_t& timer, const uint32_t step) { timer += step; const long passed = TimePassedSince(timer); From 4f62a0deab2b5ac52c7c90c48d95c3241abbd029 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:46:23 +0200 Subject: [PATCH 010/144] Refactor to TimeReacged() --- tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino | 4 ++-- .../tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 14 +------------- tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino | 12 ------------ tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino | 8 ++++---- .../tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino | 4 ++-- tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino | 6 +++--- 6 files changed, 12 insertions(+), 36 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino b/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino index adfdec32c..31211fe58 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_07_domoticz.ino @@ -135,7 +135,7 @@ void MqttPublishDomoticzFanState(void) { Response_P(DOMOTICZ_MESSAGE, (int)DomoticzRelayIdx(1), (0 == fan_speed) ? 0 : 2, svalue, DomoticzBatteryQuality(), DomoticzRssiQuality()); MqttPublish(domoticz_in_topic); - Domoticz->fan_debounce = millis(); + Domoticz->fan_debounce = millis() + 1000; // 1 second } } @@ -321,7 +321,7 @@ bool DomoticzMqttData(void) { if (GetFanspeed() == svalue) { return true; // Stop as already set } - if (TimePassedSince(Domoticz->fan_debounce) < 1000) { + if (!TimeReached(Domoticz->fan_debounce)) { return true; // Stop if device in limbo } snprintf_P(XdrvMailbox.topic, XdrvMailbox.index, PSTR("/" D_CMND_FANSPEED)); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index 95a1272dc..ed9dbf9a1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -215,13 +215,7 @@ void ShutterAllowPreStartProcedure(uint8_t i) { #ifdef USE_RULES AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); // wait for response from rules -/* - uint32_t start_time = millis(); - while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { - delay(1); - } -*/ - uint32_t end_time = millis() + 10000; + uint32_t end_time = millis() + 10000; // 10 seconds while (!TimeReached(end_time) && (String)rules_vars[i] == "99") { delay(1); } @@ -1389,12 +1383,6 @@ void ShutterUpdateVelocity(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { -/* - uint32_t start_time = Shutter[i].last_stop_time; - while (TimePassedSince(start_time) < ShutterSettings.shutter_motorstop && TimePassedSince(start_time) > 0) { - loop(); - } -*/ uint32_t end_time = Shutter[i].last_stop_time + ShutterSettings.shutter_motorstop; while (!TimeReached(end_time)) { loop(); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index e019cd2e0..491081904 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -654,12 +654,6 @@ void ShutterWaitForMotorStop(uint8_t i) void ShutterWaitForMotorStart(uint8_t i) { -/* - uint32_t start_time = Shutter[i].last_stop_time; - while (TimePassedSince(start_time) < Settings->shutter_motorstop && TimePassedSince(start_time) > 0) { - loop(); - } -*/ uint32_t end_time = Shutter[i].last_stop_time + Settings->shutter_motorstop; while (!TimeReached(end_time)) { loop(); @@ -740,12 +734,6 @@ void ShutterAllowPreStartProcedure(uint8_t i) { #ifdef USE_RULES AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Delay Start? var%d <99>=<%s>, max10s?"),i + 1, rules_vars[i]); // wait for response from rules -/* - uint32_t start_time = millis(); - while (TimePassedSince(start_time) < 10000 && (String)rules_vars[i] == "99") { - delay(1); - } -*/ uint32_t end_time = millis() + 10000; while (!TimeReached(end_time) && (String)rules_vars[i] == "99") { delay(1); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino index 6b80805c6..38981fecb 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_30_exs_dimmer.ino @@ -135,8 +135,8 @@ void ExsSerialSend(const uint8_t data[] = nullptr, uint16_t len = 0) ExsSerial->flush(); // wait for any response - uint32_t snd_time = millis(); - while ((TimePassedSince(snd_time) < EXS_ACK_TIMEOUT) && + uint32_t snd_time = millis() + EXS_ACK_TIMEOUT; + while ((!TimeReached(snd_time)) && (!ExsSerial->available())) ; @@ -550,8 +550,8 @@ void CmndExsState(void) ExsSendCmd(EXS_GET_VALUES, 0); // wait for data - uint32_t snd_time = millis(); - while ((TimePassedSince(snd_time) < EXS_ACK_TIMEOUT) && + uint32_t snd_time = millis() + EXS_ACK_TIMEOUT; + while ((!TimeReached(snd_time)) && (!ExsSerial->available())) ; ExsSerialInput(); diff --git a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino index 560f2cfbe..0d0f7dbce 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_45_shelly_dimmer.ino @@ -277,8 +277,8 @@ bool ShdSerialSend(const uint8_t data[] = nullptr, uint16_t len = 0) ShdSerial->flush(); // wait for any response - uint32_t snd_time = millis(); - while (TimePassedSince(snd_time) < SHD_ACK_TIMEOUT) + uint32_t snd_time = millis() + SHD_ACK_TIMEOUT; + while (!TimeReached(snd_time)) { if (ShdSerialInput()) return true; diff --git a/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino b/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino index 417aa699d..1e993b219 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino @@ -89,8 +89,8 @@ bool NovaSdsCommand(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint16_t sensor NovaSdsSerial->flush(); // wait for any response - unsigned long cmndtime = millis(); - while ( (TimePassedSince(cmndtime) < NOVA_SDS_RECDATA_TIMEOUT) && ( ! NovaSdsSerial->available() ) ); + unsigned long cmndtime = millis() + NOVA_SDS_RECDATA_TIMEOUT; + while ( (!TimeReached(cmndtime)) && ( ! NovaSdsSerial->available() ) ); if ( ! NovaSdsSerial->available() ) { // timeout return false; @@ -98,7 +98,7 @@ bool NovaSdsCommand(uint8_t byte1, uint8_t byte2, uint8_t byte3, uint16_t sensor uint8_t recbuf[10]; memset(recbuf, 0, sizeof(recbuf)); // sync to 0xAA header - while ( (TimePassedSince(cmndtime) < NOVA_SDS_RECDATA_TIMEOUT) && ( NovaSdsSerial->available() > 0) && (0xAA != (recbuf[0] = NovaSdsSerial->read())) ); + while ( (!TimeReached(cmndtime)) && ( NovaSdsSerial->available() > 0) && (0xAA != (recbuf[0] = NovaSdsSerial->read())) ); if ( 0xAA != recbuf[0] ) { // no head found return false; From c5b92d3ab124bd820b2b79848366c834d13a8861 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 19 Aug 2024 22:31:56 +0200 Subject: [PATCH 011/144] Add Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653) --- CHANGELOG.md | 4 ++++ RELEASENOTES.md | 4 ++++ tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino | 17 +++++++++++++++-- .../xdrv_03_esp32_energy.ino | 17 +++++++++++++++-- tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino | 5 ++--- 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bad3eff4..037cca6ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [14.2.0.1] ### Added +- Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653) ### Breaking Changed @@ -13,9 +14,12 @@ All notable changes to this project will be documented in this file. ### Fixed - Shutter timing registers overflow (#21966) - PZEM continue energy monitoring when one phase fails (#21968) +- Energy calculation (#20653) ### Removed - ESP8266 Analog input support using energy driver as only one channel is available +- Energy force Active Power equals Apparent Power when (Calculated) Apparent Power is less than Active Power (#20653) +- Energy force Power Factor to be always 1 or lower (#20653) ## [Released] diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6085369e9..395314a5b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -121,14 +121,18 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ## Changelog v14.2.0.1 ### Added +- Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration [#20653](https://github.com/arendst/Tasmota/issues/20653) ### Breaking Changed ### Changed ### Fixed +- Energy calculation [#20653](https://github.com/arendst/Tasmota/issues/20653) - Shutter timing registers overflow [#21966](https://github.com/arendst/Tasmota/issues/21966) - PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968) ### Removed +- Energy force Active Power equals Apparent Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653) +- Energy force Power Factor to be always 1 or lower [#20653](https://github.com/arendst/Tasmota/issues/20653) - ESP8266 Analog input support using energy driver as only one channel is available diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index f6229bf4b..d20115a9f 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -1191,17 +1191,30 @@ void EnergyShow(bool json) { else if (0 == Energy->current[i]) { apparent_power[i] = 0; } +/* if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible Energy->active_power[i] = apparent_power[i]; } - power_factor[i] = Energy->power_factor[i]; if (isnan(power_factor[i])) { power_factor[i] = (Energy->active_power[i] && apparent_power[i]) ? Energy->active_power[i] / apparent_power[i] : 0; - if (power_factor[i] > 1) { + if (power_factor[i] > 1) { // Should not happen (Active > Apparent) power_factor[i] = 1; } } +*/ + power_factor[i] = Energy->power_factor[i]; + if (isnan(power_factor[i])) { + power_factor[i] = (Energy->active_power[i] && apparent_power[i]) ? Energy->active_power[i] / apparent_power[i] : 0; + } + if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible + if (apparent_power[i]) { + if ((power_factor[i] > 1.005) && (power_factor[i] < 2.0f)) { // Skip below 0.5% and don't expect 50% differences + AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("NRG: Calibrate as Active %3_fW > Apparent %3_fVA (PF = %4_f)"), + &Energy->active_power[i], &apparent_power[i], &power_factor[i]); + } + } + } reactive_power[i] = Energy->reactive_power[i]; if (isnan(reactive_power[i])) { diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino index a44d804b6..3fc271c60 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino @@ -1533,17 +1533,30 @@ void EnergyShow(bool json) { else if (0 == Energy->current[i]) { apparent_power[i] = 0; } +/* if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible Energy->active_power[i] = apparent_power[i]; } - power_factor[i] = Energy->power_factor[i]; if (isnan(power_factor[i])) { power_factor[i] = (Energy->active_power[i] && apparent_power[i]) ? Energy->active_power[i] / apparent_power[i] : 0; - if (power_factor[i] > 1) { + if (power_factor[i] > 1) { // Should not happen (Active > Apparent) power_factor[i] = 1; } } +*/ + power_factor[i] = Energy->power_factor[i]; + if (isnan(power_factor[i])) { + power_factor[i] = (Energy->active_power[i] && apparent_power[i]) ? Energy->active_power[i] / apparent_power[i] : 0; + } + if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible + if (apparent_power[i]) { + if ((power_factor[i] > 1.005) && (power_factor[i] < 2.0f)) { // Skip below 0.5% and don't expect 50% differences + AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("NRG: Calibrate as Active %3_fW > Apparent %3_fVA (PF = %4_f)"), + &Energy->active_power[i], &apparent_power[i], &power_factor[i]); + } + } + } reactive_power[i] = Energy->reactive_power[i]; if (isnan(reactive_power[i])) { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino b/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino index c54d43dd6..58980fee6 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino @@ -208,16 +208,15 @@ void HlwEverySecond(void) { Hlw.cf1_current_pulse_length = 0; Hlw.cf_power_pulse_length = 0; } else { - uint32_t hlw_len; - if (Hlw.energy_period_counter) { AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("HLW: EPC %u, CFlen %d usec"), Hlw.energy_period_counter, Hlw.cf_pulse_length); - hlw_len = 10000 * 100 / Hlw.energy_period_counter; // Add *100 to fix rounding on loads at 3.6kW (#9160) + uint32_t hlw_len = 10000 * 100 / Hlw.energy_period_counter; // Add *100 to fix rounding on loads at 3.6kW (#9160) Hlw.energy_period_counter = 0; if (hlw_len) { Energy->kWhtoday_delta[0] += (((Hlw.power_ratio * EnergyGetCalibration(ENERGY_POWER_CALIBRATION)) / 36) * 100) / hlw_len; +// Energy->kWhtoday_delta[0] += Energy->active_power[0] * 1000 / 36; EnergyUpdateToday(); } } From ab2d6c1169025cc7434668def509c5d41d169a36 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 20 Aug 2024 13:08:56 +0200 Subject: [PATCH 012/144] Add Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage --- CHANGELOG.md | 5 +- RELEASENOTES.md | 5 +- .../tasmota_xdrv_driver/xdrv_03_energy.ino | 56 ++++++++++++++++++- .../xdrv_03_esp32_energy.ino | 56 ++++++++++++++++++- 4 files changed, 112 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037cca6ce..443243fee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,13 @@ All notable changes to this project will be documented in this file. ## [14.2.0.1] ### Added - Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653) +- Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage +- Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage ### Breaking Changed ### Changed +- Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power (#20653) ### Fixed - Shutter timing registers overflow (#21966) @@ -18,8 +21,6 @@ All notable changes to this project will be documented in this file. ### Removed - ESP8266 Analog input support using energy driver as only one channel is available -- Energy force Active Power equals Apparent Power when (Calculated) Apparent Power is less than Active Power (#20653) -- Energy force Power Factor to be always 1 or lower (#20653) ## [Released] diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 395314a5b..6167cb6cd 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -121,11 +121,14 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ## Changelog v14.2.0.1 ### Added +- Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage +- Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage - Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration [#20653](https://github.com/arendst/Tasmota/issues/20653) ### Breaking Changed ### Changed +- Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653) ### Fixed - Energy calculation [#20653](https://github.com/arendst/Tasmota/issues/20653) @@ -133,6 +136,4 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968) ### Removed -- Energy force Active Power equals Apparent Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653) -- Energy force Power Factor to be always 1 or lower [#20653](https://github.com/arendst/Tasmota/issues/20653) - ESP8266 Analog input support using energy driver as only one channel is available diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index d20115a9f..f8ba97b46 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -974,14 +974,56 @@ void EnergyCommandSetCalResponse(uint32_t cal_type) { } } +void EnergyCommandSetCal(uint32_t cal_type) { + if (XdrvMailbox.data_len) { + // PowerSet 61.2 + // CurrentSet 263 + if (ArgC() > 1) { + // Calibrate current and power using calibrated voltage and known resistive load voltage and power + // PowerSet 60.0,230 + // CurrentSet 60.0,230 + char argument[32]; + float Pgoal = CharToFloat(ArgV(argument, 1)); // 60.0 W + float Ugoal = CharToFloat(ArgV(argument, 2)); // 230 V + float Igoal = Pgoal / Ugoal; // 0.26087 A + float R = Ugoal / Igoal; // 881,666 Ohm + + uint32_t channel = XdrvMailbox.index; + if (channel > Energy->phase_count) { channel = 1; } + channel--; + float Umeas = Energy->voltage[channel]; // 232.0 + // Calculate current and power based on measured voltage + float Ical = Umeas / R; // 0.26306 A + float Pcal = Umeas * Ical; // 61.03 W + Ical *= 1000; // A to mA + + uint32_t cal_type1 = ENERGY_CURRENT_CALIBRATION; + float cal1 = Ical; + float cal2 = Pcal; + if (ENERGY_CURRENT_CALIBRATION == cal_type) { + cal_type1 = ENERGY_POWER_CALIBRATION; + cal1 = Pcal; + cal2 = Ical; + } + XdrvMailbox.data = argument; + ext_snprintf_P(argument, sizeof(argument), PSTR("%5_f"), &cal1); + XdrvMailbox.data_len = strlen(argument); + EnergyCommandSetCalResponse(cal_type1); + ext_snprintf_P(argument, sizeof(argument), PSTR("%5_f"), &cal2); + XdrvMailbox.data_len = strlen(argument); + } + } + EnergyCommandSetCalResponse(cal_type); +} + void CmndPowerSet(void) { - EnergyCommandSetCalResponse(ENERGY_POWER_CALIBRATION); + EnergyCommandSetCal(ENERGY_POWER_CALIBRATION); } void CmndVoltageSet(void) { EnergyCommandSetCalResponse(ENERGY_VOLTAGE_CALIBRATION); } void CmndCurrentSet(void) { - EnergyCommandSetCalResponse(ENERGY_CURRENT_CALIBRATION); + EnergyCommandSetCal(ENERGY_CURRENT_CALIBRATION); } void CmndFrequencySet(void) { EnergyCommandSetCalResponse(ENERGY_FREQUENCY_CALIBRATION); @@ -1184,6 +1226,10 @@ void EnergyShow(bool json) { if (!Energy->type_dc) { if (Energy->current_available && Energy->voltage_available) { for (uint32_t i = 0; i < Energy->phase_count; i++) { + if (0 == Energy->current[i]) { + Energy->active_power[i] = 0; + } + apparent_power[i] = Energy->apparent_power[i]; if (isnan(apparent_power[i])) { apparent_power[i] = Energy->voltage[i] * Energy->current[i]; @@ -1209,11 +1255,15 @@ void EnergyShow(bool json) { } if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible if (apparent_power[i]) { - if ((power_factor[i] > 1.005) && (power_factor[i] < 2.0f)) { // Skip below 0.5% and don't expect 50% differences + if ((power_factor[i] >= 1.02f) && (power_factor[i] < 2.0f)) { // Skip below 2% and don't expect 50% differences AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("NRG: Calibrate as Active %3_fW > Apparent %3_fVA (PF = %4_f)"), &Energy->active_power[i], &apparent_power[i], &power_factor[i]); } } + apparent_power[i] = Energy->active_power[i]; // Force apparent equal to active as mis-calibrated + if (power_factor[i] > 1) { // Should not happen (Active > Apparent) + power_factor[i] = 1; + } } reactive_power[i] = Energy->reactive_power[i]; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino index 3fc271c60..848f99d1c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_esp32_energy.ino @@ -1285,14 +1285,56 @@ void EnergyCommandSetCalResponse(uint32_t cal_type) { } } +void EnergyCommandSetCal(uint32_t cal_type) { + if (XdrvMailbox.data_len && (XdrvMailbox.index > 0)) { + // PowerSet 61.2 + // CurrentSet 263 + if (ArgC() > 1) { + // Calibrate current and power using calibrated voltage and known resistive load voltage and power + // PowerSet 60.0,230 + // CurrentSet 60.0,230 + char argument[32]; + float Pgoal = CharToFloat(ArgV(argument, 1)); // 60.0 W + float Ugoal = CharToFloat(ArgV(argument, 2)); // 230 V + float Igoal = Pgoal / Ugoal; // 0.26087 A + float R = Ugoal / Igoal; // 881,666 Ohm + + uint32_t channel = XdrvMailbox.index; + if (channel > Energy->phase_count) { channel = 1; } + channel--; + float Umeas = Energy->voltage[channel]; // 232.0 + // Calculate current and power based on measured voltage + float Ical = Umeas / R; // 0.26306 A + float Pcal = Umeas * Ical; // 61.03 W + Ical *= 1000; // A to mA + + uint32_t cal_type1 = ENERGY_CURRENT_CALIBRATION; + float cal1 = Ical; + float cal2 = Pcal; + if (ENERGY_CURRENT_CALIBRATION == cal_type) { + cal_type1 = ENERGY_POWER_CALIBRATION; + cal1 = Pcal; + cal2 = Ical; + } + XdrvMailbox.data = argument; + ext_snprintf_P(argument, sizeof(argument), PSTR("%5_f"), &cal1); + XdrvMailbox.data_len = strlen(argument); + EnergyCommandSetCalResponse(cal_type1); + ext_snprintf_P(argument, sizeof(argument), PSTR("%5_f"), &cal2); + XdrvMailbox.data_len = strlen(argument); + } + } + EnergyCommandSetCalResponse(cal_type); +} + void CmndPowerSet(void) { - EnergyCommandSetCalResponse(ENERGY_POWER_CALIBRATION); + EnergyCommandSetCal(ENERGY_POWER_CALIBRATION); } void CmndVoltageSet(void) { EnergyCommandSetCalResponse(ENERGY_VOLTAGE_CALIBRATION); } void CmndCurrentSet(void) { - EnergyCommandSetCalResponse(ENERGY_CURRENT_CALIBRATION); + EnergyCommandSetCal(ENERGY_CURRENT_CALIBRATION); } void CmndFrequencySet(void) { EnergyCommandSetCalResponse(ENERGY_FREQUENCY_CALIBRATION); @@ -1526,6 +1568,10 @@ void EnergyShow(bool json) { if (!Energy->type_dc) { if (Energy->current_available && Energy->voltage_available) { for (uint32_t i = 0; i < Energy->phase_count; i++) { + if (0 == Energy->current[i]) { + Energy->active_power[i] = 0; + } + apparent_power[i] = Energy->apparent_power[i]; if (isnan(apparent_power[i])) { apparent_power[i] = Energy->voltage[i] * Energy->current[i]; @@ -1551,11 +1597,15 @@ void EnergyShow(bool json) { } if (apparent_power[i] < Energy->active_power[i]) { // Should be impossible if (apparent_power[i]) { - if ((power_factor[i] > 1.005) && (power_factor[i] < 2.0f)) { // Skip below 0.5% and don't expect 50% differences + if ((power_factor[i] >= 1.02f) && (power_factor[i] < 2.0f)) { // Skip below 2% and don't expect 50% differences AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("NRG: Calibrate as Active %3_fW > Apparent %3_fVA (PF = %4_f)"), &Energy->active_power[i], &apparent_power[i], &power_factor[i]); } } + apparent_power[i] = Energy->active_power[i]; // Force apparent equal to active as mis-calibrated + if (power_factor[i] > 1) { // Should not happen (Active > Apparent) + power_factor[i] = 1; + } } reactive_power[i] = Energy->reactive_power[i]; From ba7161fb00d7aa65caf328d61f4e1b9cad43622d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 20 Aug 2024 17:30:18 +0200 Subject: [PATCH 013/144] Fix ESP8266 energy cal range chk --- tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino index f8ba97b46..67dc050d1 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino @@ -988,9 +988,7 @@ void EnergyCommandSetCal(uint32_t cal_type) { float Igoal = Pgoal / Ugoal; // 0.26087 A float R = Ugoal / Igoal; // 881,666 Ohm - uint32_t channel = XdrvMailbox.index; - if (channel > Energy->phase_count) { channel = 1; } - channel--; + uint32_t channel = ((1 == XdrvMailbox.index -1) && (2 == Energy->phase_count)) ? 1 : 0; float Umeas = Energy->voltage[channel]; // 232.0 // Calculate current and power based on measured voltage float Ical = Umeas / R; // 0.26306 A From 798edc20c2600aabe1a170a0fedb7d2a728403f6 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:27:43 +0200 Subject: [PATCH 014/144] Version v14.2.0.2 - Changed Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere --- CHANGELOG.md | 16 +++++++++++--- RELEASENOTES.md | 3 ++- tasmota/include/tasmota_version.h | 2 +- .../tasmota_xnrg_energy/xnrg_01_hlw8012.ino | 18 +++++++++------- .../tasmota_xnrg_energy/xnrg_02_cse7766.ino | 18 +++++++++------- .../tasmota_xnrg_energy/xnrg_04_mcp39f501.ino | 12 ++++++----- .../tasmota_xnrg_energy/xnrg_14_bl09xx.ino | 13 ++++++++---- .../tasmota_xnrg_energy/xnrg_19_cse7761.ino | 21 ++++++++----------- .../tasmota_xnrg_energy/xnrg_22_bl6523.ino | 4 +++- tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino | 4 +++- 10 files changed, 69 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 443243fee..d6ea73792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,14 +3,24 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [14.2.0.1] +## [14.2.0.2] +### Added + +### Breaking Changed + +### Changed +- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere + +### Fixed + +### Removed + +## [14.2.0.1] 20240821 ### Added - Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653) - Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage - Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage -### Breaking Changed - ### Changed - Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power (#20653) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6167cb6cd..b398d6ae3 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -119,7 +119,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v14.2.0.1 +## Changelog v14.2.0.2 ### Added - Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage - Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage @@ -128,6 +128,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Breaking Changed ### Changed +- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere - Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653) ### Fixed diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h index e6b23a469..044db53f8 100644 --- a/tasmota/include/tasmota_version.h +++ b/tasmota/include/tasmota_version.h @@ -22,6 +22,6 @@ #define TASMOTA_SHA_SHORT // Filled by Github sed -const uint32_t TASMOTA_VERSION = 0x0E020001; // 14.2.0.1 +const uint32_t TASMOTA_VERSION = 0x0E020002; // 14.2.0.2 #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino b/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino index 58980fee6..71d4fef5c 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_01_hlw8012.ino @@ -284,22 +284,26 @@ void HlwDrvInit(void) { bool HlwCommand(void) { bool serviced = true; - if ((CMND_POWERCAL == Energy->command_code) || (CMND_VOLTAGECAL == Energy->command_code) || (CMND_CURRENTCAL == Energy->command_code)) { + float value = CharToFloat(XdrvMailbox.data); + + if ((CMND_POWERCAL == Energy->command_code) || + (CMND_VOLTAGECAL == Energy->command_code) || + (CMND_CURRENTCAL == Energy->command_code)) { // Service in xdrv_03_energy.ino } - else if (CMND_POWERSET == Energy->command_code) { + else if (CMND_POWERSET == Energy->command_code) { // xxx.x W if (XdrvMailbox.data_len && Hlw.cf_power_pulse_length ) { - XdrvMailbox.payload = ((uint32_t)(CharToFloat(XdrvMailbox.data) * 10) * Hlw.cf_power_pulse_length ) / Hlw.power_ratio; + XdrvMailbox.payload = ((uint32_t)(value * 10) * Hlw.cf_power_pulse_length ) / Hlw.power_ratio; } } - else if (CMND_VOLTAGESET == Energy->command_code) { + else if (CMND_VOLTAGESET == Energy->command_code) { // xxx.x V if (XdrvMailbox.data_len && Hlw.cf1_voltage_pulse_length ) { - XdrvMailbox.payload = ((uint32_t)(CharToFloat(XdrvMailbox.data) * 10) * Hlw.cf1_voltage_pulse_length ) / Hlw.voltage_ratio; + XdrvMailbox.payload = ((uint32_t)(value * 10) * Hlw.cf1_voltage_pulse_length ) / Hlw.voltage_ratio; } } - else if (CMND_CURRENTSET == Energy->command_code) { + else if (CMND_CURRENTSET == Energy->command_code) { // xxx mA if (XdrvMailbox.data_len && Hlw.cf1_current_pulse_length) { - XdrvMailbox.payload = ((uint32_t)(CharToFloat(XdrvMailbox.data)) * Hlw.cf1_current_pulse_length) / Hlw.current_ratio; + XdrvMailbox.payload = ((uint32_t)(value) * Hlw.cf1_current_pulse_length) / Hlw.current_ratio; } } else serviced = false; // Unknown command diff --git a/tasmota/tasmota_xnrg_energy/xnrg_02_cse7766.ino b/tasmota/tasmota_xnrg_energy/xnrg_02_cse7766.ino index 6e33897dd..f2caf1728 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_02_cse7766.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_02_cse7766.ino @@ -258,22 +258,26 @@ void CseDrvInit(void) { bool CseCommand(void) { bool serviced = true; - if ((CMND_POWERCAL == Energy->command_code) || (CMND_VOLTAGECAL == Energy->command_code) || (CMND_CURRENTCAL == Energy->command_code)) { + float value = CharToFloat(XdrvMailbox.data); + + if ((CMND_POWERCAL == Energy->command_code) || + (CMND_VOLTAGECAL == Energy->command_code) || + (CMND_CURRENTCAL == Energy->command_code)) { // Service in xdrv_03_energy.ino } - else if (CMND_POWERSET == Energy->command_code) { + else if (CMND_POWERSET == Energy->command_code) { // xxx W if (XdrvMailbox.data_len && Cse.power_cycle) { - XdrvMailbox.payload = (unsigned long)(CharToFloat(XdrvMailbox.data) * Cse.power_cycle) / CSE_PREF; + XdrvMailbox.payload = (uint32_t)(value * Cse.power_cycle) / CSE_PREF; } } - else if (CMND_VOLTAGESET == Energy->command_code) { + else if (CMND_VOLTAGESET == Energy->command_code) { // xxx V if (XdrvMailbox.data_len && Cse.voltage_cycle) { - XdrvMailbox.payload = (unsigned long)(CharToFloat(XdrvMailbox.data) * Cse.voltage_cycle) / CSE_UREF; + XdrvMailbox.payload = (uint32_t)(value * Cse.voltage_cycle) / CSE_UREF; } } - else if (CMND_CURRENTSET == Energy->command_code) { + else if (CMND_CURRENTSET == Energy->command_code) { // xxx mA if (XdrvMailbox.data_len && Cse.current_cycle) { - XdrvMailbox.payload = (unsigned long)(CharToFloat(XdrvMailbox.data) * Cse.current_cycle) / 1000; + XdrvMailbox.payload = (uint32_t)(value * Cse.current_cycle) / 1000; } } else serviced = false; // Unknown command diff --git a/tasmota/tasmota_xnrg_energy/xnrg_04_mcp39f501.ino b/tasmota/tasmota_xnrg_energy/xnrg_04_mcp39f501.ino index f3b6a580b..f781fff43 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_04_mcp39f501.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_04_mcp39f501.ino @@ -599,11 +599,13 @@ void McpDrvInit(void) bool McpCommand(void) { bool serviced = true; - unsigned long value = 0; + + float value_f = CharToFloat(XdrvMailbox.data); + uint32_t value = 0; if (CMND_POWERSET == Energy->command_code) { if (XdrvMailbox.data_len && mcp_active_power) { - value = (unsigned long)(CharToFloat(XdrvMailbox.data) * 100); + value = (uint32_t)(value_f * 100); if ((value > 100) && (value < 2000000)) { // Between 1W and 20000W XdrvMailbox.payload = value; mcp_calibrate |= MCP_CALIBRATE_POWER; @@ -613,7 +615,7 @@ bool McpCommand(void) } else if (CMND_VOLTAGESET == Energy->command_code) { if (XdrvMailbox.data_len && mcp_voltage_rms) { - value = (unsigned long)(CharToFloat(XdrvMailbox.data) * 10); + value = (uint32_t)(value_f * 10); if ((value > 1000) && (value < 4000)) { // Between 100V and 400V XdrvMailbox.payload = value; mcp_calibrate |= MCP_CALIBRATE_VOLTAGE; @@ -623,7 +625,7 @@ bool McpCommand(void) } else if (CMND_CURRENTSET == Energy->command_code) { if (XdrvMailbox.data_len && mcp_current_rms) { - value = (unsigned long)(CharToFloat(XdrvMailbox.data) * 10); + value = (uint32_t)(value_f * 10); if ((value > 100) && (value < 800000)) { // Between 10mA and 80A XdrvMailbox.payload = value; mcp_calibrate |= MCP_CALIBRATE_CURRENT; @@ -633,7 +635,7 @@ bool McpCommand(void) } else if (CMND_FREQUENCYSET == Energy->command_code) { if (XdrvMailbox.data_len && mcp_line_frequency) { - value = (unsigned long)(CharToFloat(XdrvMailbox.data) * 1000); + value = (uint32_t)(value_f * 1000); if ((value > 45000) && (value < 65000)) { // Between 45Hz and 65Hz XdrvMailbox.payload = value; mcp_calibrate |= MCP_CALIBRATE_FREQUENCY; diff --git a/tasmota/tasmota_xnrg_energy/xnrg_14_bl09xx.ino b/tasmota/tasmota_xnrg_energy/xnrg_14_bl09xx.ino index da66a5cf4..3c49d0913 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_14_bl09xx.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_14_bl09xx.ino @@ -393,19 +393,24 @@ bool Bl09XXCommand(void) { uint32_t channel = (2 == XdrvMailbox.index) && (Energy->phase_count > 1) ? 1 : 0; uint32_t value = (uint32_t)(CharToFloat(XdrvMailbox.data) * 100); // 1.23 = 123 - if (CMND_POWERSET == Energy->command_code) { + if ((CMND_POWERCAL == Energy->command_code) || + (CMND_VOLTAGECAL == Energy->command_code) || + (CMND_CURRENTCAL == Energy->command_code)) { + // Service in xdrv_03_energy.ino + } + else if (CMND_POWERSET == Energy->command_code) { // xxx.xx W if (XdrvMailbox.data_len && Bl09XX.power[channel]) { XdrvMailbox.payload = (Bl09XX.power[channel] * 100) / value; } } - else if (CMND_VOLTAGESET == Energy->command_code) { + else if (CMND_VOLTAGESET == Energy->command_code) { // xxx.xx V if (XdrvMailbox.data_len && Bl09XX.voltage) { XdrvMailbox.payload = (Bl09XX.voltage * 100) / value; } } - else if (CMND_CURRENTSET == Energy->command_code) { + else if (CMND_CURRENTSET == Energy->command_code) { // xxx.xx mA if (XdrvMailbox.data_len && Bl09XX.current[channel]) { - XdrvMailbox.payload = (Bl09XX.current[channel] * 100) / value; + XdrvMailbox.payload = ((Bl09XX.current[channel] * 100) / value) * 1000; } } else serviced = false; // Unknown command diff --git a/tasmota/tasmota_xnrg_energy/xnrg_19_cse7761.ino b/tasmota/tasmota_xnrg_energy/xnrg_19_cse7761.ino index 2f1493c58..1a4bd3002 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_19_cse7761.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_19_cse7761.ino @@ -640,16 +640,21 @@ void Cse7761DrvInit(void) { bool Cse7761Command(void) { bool serviced = true; - uint32_t channel = 0; - if (Energy->phase_count > 1) { - channel = (2 == XdrvMailbox.index) ? 1 : 0; - } + uint32_t channel = (2 == XdrvMailbox.index) && (Energy->phase_count > 1) ? 1 : 0; uint32_t value = (uint32_t)(CharToFloat(XdrvMailbox.data) * 100); // 1.23 = 123 if (CMND_POWERCAL == Energy->command_code) { if (1 == XdrvMailbox.payload) { XdrvMailbox.payload = Cse7761Ref(PowerPAC); } // Service in xdrv_03_energy.ino } + else if (CMND_VOLTAGECAL == Energy->command_code) { + if (1 == XdrvMailbox.payload) { XdrvMailbox.payload = Cse7761Ref(RmsUC); } + // Service in xdrv_03_energy.ino + } + else if (CMND_CURRENTCAL == Energy->command_code) { + if (1 == XdrvMailbox.payload) { XdrvMailbox.payload = Cse7761Ref(RmsIAC); } + // Service in xdrv_03_energy.ino + } else if (CMND_POWERSET == Energy->command_code) { if (XdrvMailbox.data_len && CSE7761Data.active_power[channel]) { if ((value > 100) && (value < 2000000)) { // Between 1W and 20000W @@ -657,10 +662,6 @@ bool Cse7761Command(void) { } } } - else if (CMND_VOLTAGECAL == Energy->command_code) { - if (1 == XdrvMailbox.payload) { XdrvMailbox.payload = Cse7761Ref(RmsUC); } - // Service in xdrv_03_energy.ino - } else if (CMND_VOLTAGESET == Energy->command_code) { if (XdrvMailbox.data_len && CSE7761Data.voltage_rms) { if ((value > 10000) && (value < 40000)) { // Between 100V and 400V @@ -668,10 +669,6 @@ bool Cse7761Command(void) { } } } - else if (CMND_CURRENTCAL == Energy->command_code) { - if (1 == XdrvMailbox.payload) { XdrvMailbox.payload = Cse7761Ref(RmsIAC); } - // Service in xdrv_03_energy.ino - } else if (CMND_CURRENTSET == Energy->command_code) { if (XdrvMailbox.data_len && CSE7761Data.current_rms[channel]) { if ((value > 1000) && (value < 10000000)) { // Between 10mA and 100A diff --git a/tasmota/tasmota_xnrg_energy/xnrg_22_bl6523.ino b/tasmota/tasmota_xnrg_energy/xnrg_22_bl6523.ino index 1e95abf6f..311ea7ffe 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_22_bl6523.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_22_bl6523.ino @@ -259,7 +259,9 @@ bool Bl6523Command(void) { int32_t value = (int32_t)(CharToFloat(XdrvMailbox.data) * 1000); // 1.234 = 1234, -1.234 = -1234 uint32_t abs_value = abs(value) / 10; // 1.23 = 123, -1.23 = 123 - if ((CMND_POWERCAL == Energy->command_code) || (CMND_VOLTAGECAL == Energy->command_code) || (CMND_CURRENTCAL == Energy->command_code)) { + if ((CMND_POWERCAL == Energy->command_code) || + (CMND_VOLTAGECAL == Energy->command_code) || + (CMND_CURRENTCAL == Energy->command_code)) { // Service in xdrv_03_energy.ino } else if (CMND_POWERSET == Energy->command_code) { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino b/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino index 7fe78946f..d12cf89df 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_30_dummy.ino @@ -90,7 +90,9 @@ bool NrgDummyCommand(void) { int32_t value = (int32_t)(CharToFloat(XdrvMailbox.data) * 1000); // 1.234 = 1234, -1.234 = -1234 uint32_t abs_value = abs(value) / 10; // 1.23 = 123, -1.23 = 123 - if ((CMND_POWERCAL == Energy->command_code) || (CMND_VOLTAGECAL == Energy->command_code) || (CMND_CURRENTCAL == Energy->command_code)) { + if ((CMND_POWERCAL == Energy->command_code) || + (CMND_VOLTAGECAL == Energy->command_code) || + (CMND_CURRENTCAL == Energy->command_code)) { // Service in xdrv_03_energy.ino } else if (CMND_POWERSET == Energy->command_code) { From 4144f5c5cab041c539d931366e260d90015a704a Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 22 Aug 2024 18:03:39 +0200 Subject: [PATCH 015/144] Change GPIOViewer from v1.5.5 to v1.5.6 --- CHANGELOG.md | 2 + RELEASENOTES.md | 1 + .../xdrv_121_gpioviewer.ino | 143 ++++++++++++++++-- 3 files changed, 135 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6ea73792..c397a1d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. ### Changed - Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere +- GPIOViewer from v1.5.5 to v1.5.6 ### Fixed @@ -101,6 +102,7 @@ All notable changes to this project will be documented in this file. - ESP32 platform update from 2024.06.11 to 2024.07.10 (#21745) - ESP32 platform update from 2024.07.10 to 2024.07.11 (#21765) - Berry simplified `module persist` (#21812) +- GPIOViewer from v1.5.4 to v1.5.5 (No functional change) ### Fixed - Berry `bytes.resize()` for large sizes (#21716) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b398d6ae3..b390c49ae 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -128,6 +128,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ### Breaking Changed ### Changed +- GPIOViewer from v1.5.5 to v1.5.6 - Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere - Energy force Apparent Power equals Active Power when (Calculated) Apparent Power is less than Active Power [#20653](https://github.com/arendst/Tasmota/issues/20653) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino b/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino index c806d94fe..07a0f79f2 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_121_gpioviewer.ino @@ -30,6 +30,11 @@ * GvUrl 1 - Select default url (GV_BASE_URL) * GvUrl https://thelastoutpostworkshop.github.io/microcontroller_devkit/gpio_viewer_1_5/ * + * Note 20240821 + * - GVRelease 1.5.6 + * - Add ADC pin function information + * - Add ESP32 Touch pin function information + * * Note 20240717 * - GVRelease 1.5.5 * @@ -54,6 +59,7 @@ #define XDRV_121 121 #define GV_USE_ESPINFO // Provide ESP info +//#define GV_DEBUG #ifndef GV_PORT #define GV_PORT 5557 // [GvPort] SSE webserver port @@ -68,7 +74,7 @@ #define GV_KEEP_ALIVE 1000 // milliseconds - If no activity after this do a heap size event anyway -const char *GVRelease = "1.5.5"; +const char *GVRelease = "1.5.6"; /*********************************************************************************************/ @@ -91,7 +97,7 @@ const char *GVRelease = "1.5.5"; #include "./html_compressed/HTTP_GV_PAGE.h" #else #include "./html_uncompressed/HTTP_GV_PAGE.h" -#endif +#endif // USE_UNISHOX_COMPRESSION const char HTTP_GV_EVENT[] PROGMEM = "HTTP/1.1 200 OK\n" @@ -118,6 +124,14 @@ typedef struct { uint16_t sampling; uint16_t init_done; uint16_t port; + uint8_t ADCPinsCount; +#ifdef ESP8266 + uint8_t ADCPins[1]; +#else // ESP32 + uint8_t ADCPins[MAX_GPIO_PIN]; + uint8_t TouchPins[MAX_GPIO_PIN]; + uint8_t TouchPinsCount; +#endif // ESP32 bool mutex; bool sse_ready; } tGV; @@ -145,13 +159,51 @@ int GetPinMode(uint32_t pin) { /*********************************************************************************************/ +#ifdef ESP32 +#ifdef SOC_ADC_SUPPORTED +#include "soc/adc_periph.h" + +int8_t GVDigitalPinToAnalogChannel(uint8_t pin) { + uint8_t channel = 0; + if (pin < SOC_GPIO_PIN_COUNT) { + for (uint8_t j = 0; j < SOC_ADC_MAX_CHANNEL_NUM; j++) { + if (adc_channel_io_map[0][j] == pin) { // Tasmota supports ADC1 only + return channel; + } + channel++; + } + } + return -1; +} +#endif // SOC_ADC_SUPPORTED +#endif // ESP32 + bool GVInit(void) { if (!GV) { + // Executed once GV = (tGV*)calloc(1, sizeof(tGV)); if (GV) { GV->sampling = (GV_SAMPLING_INTERVAL < 20) ? 20 : GV_SAMPLING_INTERVAL; GV->baseUrl = GV_BASE_URL; GV->port = GV_PORT; +#ifdef ESP8266 + GV->ADCPins[0] = 17; + GV->ADCPinsCount = 1; +#else // ESP32 + int8_t channel; + for (int i = 0; i < MAX_GPIO_PIN; i++) { +#ifdef SOC_ADC_SUPPORTED + channel = GVDigitalPinToAnalogChannel(i); + if (channel != -1) { + GV->ADCPins[GV->ADCPinsCount++] = i; + } +#endif // SOC_ADC_SUPPORTED + channel = digitalPinToTouchChannel(i); + if (channel != -1) { + GV->TouchPins[GV->TouchPinsCount++] = i; + } + } +#endif // ESP32 return true; } return false; @@ -181,6 +233,7 @@ void GVBegin(void) { GV->WebServer->on("/espinfo", GVHandleEspInfo); GV->WebServer->on("/partition", GVHandlePartition); GV->WebServer->on("/pinmodes", GVHandlePinModes); + GV->WebServer->on("/pinfunctions", GVHandlePinFunctions); GV->WebServer->on("/events", GVHandleEvents); GV->WebServer->begin(); } @@ -206,6 +259,9 @@ void GVHandleRoot(void) { } void GVWebserverSendJson(String &jsonResponse) { +#ifdef GV_DEBUG + AddLog(LOG_LEVEL_DEBUG, PSTR("IOV: GVWebserverSendJson '%s'"), jsonResponse.c_str()); +#endif // GV_DEBUG GV->WebServer->send(200, "application/json", jsonResponse); } @@ -214,38 +270,45 @@ void GVHandleRelease(void) { GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + void GVHandleFreePSRam(void) { String jsonResponse = "{\"freePSRAM\":\""; #ifdef ESP32 if (UsePSRAM()) { jsonResponse += String(ESP.getFreePsram() / 1024) + " KB\"}"; } else -#endif +#endif // ESP32 jsonResponse += "No PSRAM\"}"; GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + void GVHandleSampling(void) { String jsonResponse = "{\"sampling\":\"" + String(GV->sampling) + "\"}"; GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + void GVHandleEspInfo(void) { #ifdef GV_USE_ESPINFO - const FlashMode_t flashMode = ESP.getFlashChipMode(); // enum - String jsonResponse = "{\"chip_model\":\"" + GetDeviceHardware(); jsonResponse += "\",\"cores_count\":\"" + String(ESP_getChipCores()); jsonResponse += "\",\"chip_revision\":\"" + String(ESP_getChipRevision()); jsonResponse += "\",\"cpu_frequency\":\"" + String(ESP.getCpuFreqMHz()); jsonResponse += "\",\"cycle_count\":" + String(ESP.getCycleCount()); jsonResponse += ",\"mac\":\"" + ESP_getEfuseMac(); + + const FlashMode_t flashMode = ESP.getFlashChipMode(); // enum jsonResponse += "\",\"flash_mode\":" + String(flashMode); + #ifdef ESP8266 jsonResponse += ",\"flash_chip_size\":" + String(ESP.getFlashChipRealSize()); -#else +#else // ESP32 jsonResponse += ",\"flash_chip_size\":" + String(ESP.getFlashChipSize()); -#endif +#endif // ESP32 jsonResponse += ",\"flash_chip_speed\":" + String(ESP.getFlashChipSpeed()); jsonResponse += ",\"heap_size\":" + String(ESP_getHeapSize()); jsonResponse += ",\"heap_max_alloc\":" + String(ESP_getMaxAllocHeap()); @@ -255,14 +318,27 @@ void GVHandleEspInfo(void) { jsonResponse += ",\"free_heap\":" + String(ESP_getFreeHeap()); jsonResponse += ",\"up_time\":\"" + String(millis()); jsonResponse += "\",\"sketch_size\":" + String(ESP_getSketchSize()); - jsonResponse += ",\"free_sketch\":" + String(ESP_getFreeSketchSpace()); + +#ifdef ESP8266 + String arduinoCoreVersion = "2.7.7"; +#else // ESP32 + String arduinoCoreVersion = "3.0.4"; +#endif // ESP32 +#if defined(ESP_ARDUINO_VERSION_MAJOR) && defined(ESP_ARDUINO_VERSION_MINOR) && defined(ESP_ARDUINO_VERSION_PATCH) + arduinoCoreVersion = String(ESP_ARDUINO_VERSION_MAJOR) + "." + String(ESP_ARDUINO_VERSION_MINOR) + "." + String(ESP_ARDUINO_VERSION_PATCH); +#endif // ESP_ARDUINO_VERSION_ + jsonResponse += ",\"arduino_core_version\":\"" + arduinoCoreVersion; + + jsonResponse += "\",\"free_sketch\":" + String(ESP_getFreeSketchSpace()); jsonResponse += "}"; -#else +#else // No GV_USE_ESPINFO String jsonResponse = "{\"chip_model\":\"" + GetDeviceHardware() + "\"}"; #endif // GV_USE_ESPINFO GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + void GVHandlePartition(void) { String jsonResponse = "["; // Start of JSON array #ifdef ESP32 @@ -303,6 +379,8 @@ void GVHandlePartition(void) { GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + void GVHandlePinModes(void) { String jsonResponse = "["; // Start of JSON array bool firstEntry = true; // Used to format the JSON array correctly @@ -324,6 +402,49 @@ void GVHandlePinModes(void) { GVWebserverSendJson(jsonResponse); } +/*-------------------------------------------------------------------------------------------*/ + +void GVStartPinFunction(const char *pinFunction, String *json) { + *json += "{\"name\":\"" + String(pinFunction) + "\",\"functions\":["; +} + +void GVAddPinFunction(const char *pinName, int pin, String *json) { + if (!json->endsWith("[")) + { + *json += ","; + } + + *json += "{\"function\":\"" + String(pinName) + "\",\"pin\":" + String(pin) + "}"; +} + +void GVHandlePinFunctions(void) { + String jsonResponse = "{\"boardpinsfunction\":["; + + // ADC pins + GVStartPinFunction("ADC", &jsonResponse); + for (int i = 0; i < GV->ADCPinsCount; i++) + { + GVAddPinFunction("ADC", GV->ADCPins[i], &jsonResponse); + } + jsonResponse += "]}"; + +#ifdef ESP32 + // Touch pins + jsonResponse += ","; + GVStartPinFunction("Touch", &jsonResponse); + for (int i = 0; i < GV->TouchPinsCount; i++) + { + GVAddPinFunction("Touch", GV->TouchPins[i], &jsonResponse); + } + jsonResponse += "]}"; +#endif // ESP32 + + jsonResponse += "]}"; + GVWebserverSendJson(jsonResponse); +} + +/*-------------------------------------------------------------------------------------------*/ + void GVHandleEvents(void) { GVWebClient = GV->WebServer->client(); GVWebClient.setNoDelay(true); @@ -621,7 +742,7 @@ bool Xdrv121(uint32_t function) { case FUNC_WEB_ADD_HANDLER: WebServer_on(PSTR("/" WEB_HANDLE_GV), GVSetupAndStart); break; -#endif // USE_WEBSERVER +#endif // USE_WEBSERVER } if (GV && (GV->WebServer)) { switch (function) { @@ -644,4 +765,4 @@ bool Xdrv121(uint32_t function) { return result; } -#endif // USE_GPIO_VIEWER +#endif // USE_GPIO_VIEWER From 831597e7d98837428d5815be213d444cc533e0d9 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Fri, 23 Aug 2024 11:22:26 +0200 Subject: [PATCH 016/144] Version v14.2.0.3 - Add command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000) --- CHANGELOG.md | 10 +++++++--- RELEASENOTES.md | 3 ++- tasmota/include/tasmota_types.h | 3 ++- tasmota/include/tasmota_version.h | 2 +- tasmota/tasmota_support/settings.ino | 3 +++ tasmota/tasmota_support/support_command.ino | 3 +++ tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino | 11 ++++++++--- tools/decode-status.py | 4 ++-- 8 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c397a1d30..033d80301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,19 +3,23 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development -## [14.2.0.2] +## [14.2.0.3] ### Added +- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000) ### Breaking Changed ### Changed -- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere -- GPIOViewer from v1.5.5 to v1.5.6 ### Fixed ### Removed +## [14.2.0.2] 20240823 +### Changed +- Energy BL09xx command ``CurrentSet`` input changed from Ampere to milliAmpere +- GPIOViewer from v1.5.5 to v1.5.6 + ## [14.2.0.1] 20240821 ### Added - Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration (#20653) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b390c49ae..b1874d94d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -119,8 +119,9 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm [Complete list](BUILDS.md) of available feature and sensors. -## Changelog v14.2.0.2 +## Changelog v14.2.0.3 ### Added +- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive [#22000](https://github.com/arendst/Tasmota/issues/22000) - Energy command ``PowerSet 60,230`` to calibrate both Current and Power with known resistive load of 60W at 230V using calibrated Voltage - Energy command ``CurrentSet 60,230`` to calibrate both Power and Current with known resistive load of 60W at 230V using calibrated Voltage - Energy Log level 4 message when (Calculated) Apparent Power is less than Active Power indicating wrong calibration [#20653](https://github.com/arendst/Tasmota/issues/20653) diff --git a/tasmota/include/tasmota_types.h b/tasmota/include/tasmota_types.h index ddd0566a6..8e22f4fc6 100755 --- a/tasmota/include/tasmota_types.h +++ b/tasmota/include/tasmota_types.h @@ -82,7 +82,8 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t tuya_serial_mqtt_publish : 1; // bit 16 (v6.6.0.21) - SetOption66 - (Tuya) Enable (1) TuyaMcuReceived messages over Mqtt uint32_t buzzer_enable : 1; // bit 17 (v6.6.0.1) - SetOption67 - (Buzzer) Enable (1) buzzer when available uint32_t pwm_multi_channels : 1; // bit 18 (v6.6.0.3) - SetOption68 - (Light) Enable multi-channels PWM (1) instead of Color PWM (0) - uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (not used) Limits Tuya dimmers to minimum of 10% (25) when enabled +// uint32_t ex_tuya_dimmer_min_limit : 1; // bit 19 (v6.6.0.5) - SetOption69 - (not used) Limits Tuya dimmers to minimum of 10% (25) when enabled + uint32_t sb_receive_invert : 1; // bit 19 (v14.2.0.3) - SetOption69 - (Serial) Invert Serial receive on SerialBridge (1) uint32_t energy_weekend : 1; // bit 20 (v6.6.0.8) - CMND_TARIFF uint32_t dds2382_model : 1; // bit 21 (v6.6.0.14) - SetOption71 - (DDS2382) Select different Modbus registers (1) for Active Energy (#6531) uint32_t hardware_energy_total : 1; // bit 22 (v6.6.0.15) - SetOption72 - (Energy) Enable (1) hardware energy total counter as reference (#6561) diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h index 044db53f8..01493cea3 100644 --- a/tasmota/include/tasmota_version.h +++ b/tasmota/include/tasmota_version.h @@ -22,6 +22,6 @@ #define TASMOTA_SHA_SHORT // Filled by Github sed -const uint32_t TASMOTA_VERSION = 0x0E020002; // 14.2.0.2 +const uint32_t TASMOTA_VERSION = 0x0E020003; // 14.2.0.3 #endif // _TASMOTA_VERSION_H_ diff --git a/tasmota/tasmota_support/settings.ino b/tasmota/tasmota_support/settings.ino index aa1457983..c1aa52a59 100644 --- a/tasmota/tasmota_support/settings.ino +++ b/tasmota/tasmota_support/settings.ino @@ -1829,6 +1829,9 @@ void SettingsDelta(void) { if (Settings->version < 0x0E010002) { // 14.1.0.2 Settings->sserial_mode = Settings->sbflag1.ex_serbridge_console; } + if (Settings->version < 0x0E020003) { // 14.2.0.3 + Settings->flag3.sb_receive_invert = 0; // SetOption69 - (Serial) Invert Serial receive on SerialBridge + } Settings->version = TASMOTA_VERSION; SettingsSave(1); diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index 593bfdac5..f84eab6c8 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1565,6 +1565,9 @@ void CmndSetoptionBase(bool indexed) { WiFiSetSleepMode(); // Update WiFi sleep mode accordingly break; case 18: // SetOption68 for multi-channel PWM, requires a reboot +#ifdef USE_SERIAL_BRIDGE + case 19: // SetOption69 - (Serial) Invert Serial receive on SerialBridge +#endif // USE_SERIAL_BRIDGE case 25: // SetOption75 grouptopic change TasmotaGlobal.restart_flag = 2; break; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino index 938194fc2..0eb9a0c43 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino @@ -179,7 +179,7 @@ void SerialBridgeInput(void) { } #ifdef USE_SERIAL_BRIDGE_TEE - if (SB_TEE == Settings->sserial_mode) { // CMND_SSERIALSEND9 - Enable logging tee to serialbridge + if (SB_TEE == Settings->sserial_mode) { // CMND_SSERIALSEND9 - Enable logging tee to serialbridge return; } #endif // USE_SERIAL_BRIDGE_TEE @@ -240,8 +240,12 @@ void SerialBridgeInput(void) { void SerialBridgeInit(void) { if (PinUsed(GPIO_SBR_RX) || PinUsed(GPIO_SBR_TX)) { -// SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX), Pin(GPIO_SBR_TX), HARDWARE_FALLBACK); // Default TM_SERIAL_BUFFER_SIZE (=64) size - SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX), Pin(GPIO_SBR_TX), HARDWARE_FALLBACK, 0, MIN_INPUT_BUFFER_SIZE); // 256 + SerialBridgeSerial = new TasmotaSerial(Pin(GPIO_SBR_RX), + Pin(GPIO_SBR_TX), + HARDWARE_FALLBACK, + 0, // Software receive mode (FALLING edge) + MIN_INPUT_BUFFER_SIZE, // 256 + Settings->flag3.sb_receive_invert); // SetOption69 - (Serial) Invert Serial receive on SerialBridge if (SetSSerialBegin()) { if (SerialBridgeSerial->hardwareSerial()) { ClaimSerial(); @@ -384,6 +388,7 @@ void CmndSSerialMode(void) { #ifdef USE_SERIAL_BRIDGE_WTS01 case SB_WTS01: Settings->sserial_mode = XdrvMailbox.payload; + Settings->flag3.sb_receive_invert = 0; // SetOption69 - (Serial) Invert Serial receive on SerialBridge Settings->sbaudrate = 9600 / 300; // 9600bps SetSSerialConfig(3); // 8N1 break; diff --git a/tools/decode-status.py b/tools/decode-status.py index 0f55bfbe3..329c9985e 100755 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -121,7 +121,7 @@ a_setoption = [[ "(Tuya) Enable (1) TuyaMcuReceived messages over Mqtt", "(Buzzer) Enable (1) buzzer when available", "(Light) Enable multi-channels PWM (1) instead of Color PWM (0)", - "(not used) Limits Tuya dimmers to minimum of 10% (25) when enabled", + "(Serial) Invert Serial receive on SerialBridge (1)", "(Energy) Enable Weekend Energy Tariff", "(DDS2382) Select different Modbus registers (1) for Active Energy (#6531)", "(Energy) Enable (1) hardware energy total counter as reference (#6561)", @@ -339,7 +339,7 @@ else: obj = json.load(fp) def StartDecode(): - print ("\n*** decode-status.py v14.1.0.1 by Theo Arends and Jacek Ziolkowski ***") + print ("\n*** decode-status.py v14.2.0.3 by Theo Arends and Jacek Ziolkowski ***") # print("Decoding\n{}".format(obj)) From e1434385521b32cc7f08d7d067800c12f4c81aad Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 24 Aug 2024 18:04:28 +0200 Subject: [PATCH 017/144] Matter fixed UI bug when no endpoints configured (#22008) --- CHANGELOG.md | 1 + .../src/embedded/Matter_zz_Device.be | 2 +- .../solidify/solidified_Matter_zz_Device.h | 182 +++++++++--------- 3 files changed, 94 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 033d80301..38cd189f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed +- Matter fixed UI bug when no endpoints configured ### Removed diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be index b63534c1c..1147c9e9b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be @@ -531,7 +531,7 @@ class Matter_Device self.ipv4only = bool(j.find("ipv4only", false)) self.disable_bridge_mode = bool(j.find("disable_bridge_mode", false)) self.next_ep = j.find("nextep", self.next_ep) - self.plugins_config = j.find("config") + self.plugins_config = j.find("config", {}) self.debug = bool(j.find("debug")) # bool converts nil to false if self.plugins_config != nil log(f"MTR: Load_config = {self.plugins_config}", 3) diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h index 4869abc0c..8b881a939 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h @@ -2184,10 +2184,10 @@ be_local_closure(class_Matter_Device_load_param, /* name */ &be_ktab_class_Matter_Device, /* shared constants */ be_str_weak(load_param), &be_const_str_solidified, - ( &(const binstruction[134]) { /* code */ + ( &(const binstruction[136]) { /* code */ 0xA406B000, // 0000 IMPORT R1 K88 0x50080000, // 0001 LDBOOL R2 0 0 - 0xA8020054, // 0002 EXBLK 0 #0058 + 0xA8020056, // 0002 EXBLK 0 #005A 0x600C0011, // 0003 GETGBL R3 G17 0x8810018F, // 0004 GETMBR R4 R0 K143 0x7C0C0200, // 0005 CALL R3 1 @@ -2230,95 +2230,97 @@ be_local_closure(class_Matter_Device_load_param, /* name */ 0x90028E07, // 002A SETMBR R0 K71 R7 0x8C1C0D16, // 002B GETMET R7 R6 K22 0x58240096, // 002C LDCONST R9 K150 - 0x7C1C0400, // 002D CALL R7 2 - 0x90026A07, // 002E SETMBR R0 K53 R7 - 0x601C0017, // 002F GETGBL R7 G23 - 0x8C200D16, // 0030 GETMET R8 R6 K22 - 0x58280097, // 0031 LDCONST R10 K151 - 0x7C200400, // 0032 CALL R8 2 - 0x7C1C0200, // 0033 CALL R7 1 - 0x90032E07, // 0034 SETMBR R0 K151 R7 - 0x881C0135, // 0035 GETMBR R7 R0 K53 - 0x4C200000, // 0036 LDNIL R8 - 0x201C0E08, // 0037 NE R7 R7 R8 - 0x781E000D, // 0038 JMPF R7 #0047 - 0xB81E2E00, // 0039 GETNGBL R7 K23 - 0x60200018, // 003A GETGBL R8 G24 - 0x58240098, // 003B LDCONST R9 K152 - 0x88280135, // 003C GETMBR R10 R0 K53 - 0x7C200400, // 003D CALL R8 2 - 0x58240030, // 003E LDCONST R9 K48 - 0x7C1C0400, // 003F CALL R7 2 - 0x8C1C0137, // 0040 GETMET R7 R0 K55 - 0x7C1C0200, // 0041 CALL R7 1 - 0x8C1C0199, // 0042 GETMET R7 R0 K153 + 0x60280013, // 002D GETGBL R10 G19 + 0x7C280000, // 002E CALL R10 0 + 0x7C1C0600, // 002F CALL R7 3 + 0x90026A07, // 0030 SETMBR R0 K53 R7 + 0x601C0017, // 0031 GETGBL R7 G23 + 0x8C200D16, // 0032 GETMET R8 R6 K22 + 0x58280097, // 0033 LDCONST R10 K151 + 0x7C200400, // 0034 CALL R8 2 + 0x7C1C0200, // 0035 CALL R7 1 + 0x90032E07, // 0036 SETMBR R0 K151 R7 + 0x881C0135, // 0037 GETMBR R7 R0 K53 + 0x4C200000, // 0038 LDNIL R8 + 0x201C0E08, // 0039 NE R7 R7 R8 + 0x781E000D, // 003A JMPF R7 #0049 + 0xB81E2E00, // 003B GETNGBL R7 K23 + 0x60200018, // 003C GETGBL R8 G24 + 0x58240098, // 003D LDCONST R9 K152 + 0x88280135, // 003E GETMBR R10 R0 K53 + 0x7C200400, // 003F CALL R8 2 + 0x58240030, // 0040 LDCONST R9 K48 + 0x7C1C0400, // 0041 CALL R7 2 + 0x8C1C0137, // 0042 GETMET R7 R0 K55 0x7C1C0200, // 0043 CALL R7 1 - 0x5C080E00, // 0044 MOVE R2 R7 - 0x501C0200, // 0045 LDBOOL R7 1 0 - 0x90020E07, // 0046 SETMBR R0 K7 R7 - 0x8C1C0D16, // 0047 GETMET R7 R6 K22 - 0x5824009A, // 0048 LDCONST R9 K154 - 0x60280013, // 0049 GETGBL R10 G19 - 0x7C280000, // 004A CALL R10 0 - 0x7C1C0600, // 004B CALL R7 3 - 0x90022A07, // 004C SETMBR R0 K21 R7 - 0x881C0115, // 004D GETMBR R7 R0 K21 - 0x781E0006, // 004E JMPF R7 #0056 - 0xB81E2E00, // 004F GETNGBL R7 K23 - 0x60200008, // 0050 GETGBL R8 G8 - 0x88240115, // 0051 GETMBR R9 R0 K21 - 0x7C200200, // 0052 CALL R8 1 - 0x00233608, // 0053 ADD R8 K155 R8 - 0x58240030, // 0054 LDCONST R9 K48 - 0x7C1C0400, // 0055 CALL R7 2 - 0xA8040001, // 0056 EXBLK 1 1 - 0x70020011, // 0057 JMP #006A - 0xAC0C0002, // 0058 CATCH R3 0 2 - 0x7002000E, // 0059 JMP #0069 - 0x2014079C, // 005A NE R5 R3 K156 - 0x7816000B, // 005B JMPF R5 #0068 - 0xB8162E00, // 005C GETNGBL R5 K23 - 0x60180008, // 005D GETGBL R6 G8 - 0x5C1C0600, // 005E MOVE R7 R3 - 0x7C180200, // 005F CALL R6 1 - 0x001B3A06, // 0060 ADD R6 K157 R6 - 0x00180D9E, // 0061 ADD R6 R6 K158 - 0x601C0008, // 0062 GETGBL R7 G8 - 0x5C200800, // 0063 MOVE R8 R4 - 0x7C1C0200, // 0064 CALL R7 1 - 0x00180C07, // 0065 ADD R6 R6 R7 - 0x581C001D, // 0066 LDCONST R7 K29 - 0x7C140400, // 0067 CALL R5 2 - 0x70020000, // 0068 JMP #006A - 0xB0080000, // 0069 RAISE 2 R0 R0 - 0x880C0191, // 006A GETMBR R3 R0 K145 - 0x4C100000, // 006B LDNIL R4 - 0x1C0C0604, // 006C EQ R3 R3 R4 - 0x780E000A, // 006D JMPF R3 #0079 - 0x8C0C039F, // 006E GETMET R3 R1 K159 - 0x5814001D, // 006F LDCONST R5 K29 - 0x7C0C0400, // 0070 CALL R3 2 - 0x8C0C0777, // 0071 GETMET R3 R3 K119 - 0x58140006, // 0072 LDCONST R5 K6 - 0x5818001D, // 0073 LDCONST R6 K29 - 0x7C0C0600, // 0074 CALL R3 3 - 0x54120FFE, // 0075 LDINT R4 4095 - 0x2C0C0604, // 0076 AND R3 R3 R4 - 0x90032203, // 0077 SETMBR R0 K145 R3 - 0x50080200, // 0078 LDBOOL R2 1 0 - 0x880C0193, // 0079 GETMBR R3 R0 K147 - 0x4C100000, // 007A LDNIL R4 - 0x1C0C0604, // 007B EQ R3 R3 R4 - 0x780E0004, // 007C JMPF R3 #0082 - 0x880C0109, // 007D GETMBR R3 R0 K9 - 0x8C0C07A0, // 007E GETMET R3 R3 K160 - 0x7C0C0200, // 007F CALL R3 1 - 0x90032603, // 0080 SETMBR R0 K147 R3 - 0x50080200, // 0081 LDBOOL R2 1 0 - 0x780A0001, // 0082 JMPF R2 #0085 - 0x8C0C0108, // 0083 GETMET R3 R0 K8 - 0x7C0C0200, // 0084 CALL R3 1 - 0x80000000, // 0085 RET 0 + 0x8C1C0199, // 0044 GETMET R7 R0 K153 + 0x7C1C0200, // 0045 CALL R7 1 + 0x5C080E00, // 0046 MOVE R2 R7 + 0x501C0200, // 0047 LDBOOL R7 1 0 + 0x90020E07, // 0048 SETMBR R0 K7 R7 + 0x8C1C0D16, // 0049 GETMET R7 R6 K22 + 0x5824009A, // 004A LDCONST R9 K154 + 0x60280013, // 004B GETGBL R10 G19 + 0x7C280000, // 004C CALL R10 0 + 0x7C1C0600, // 004D CALL R7 3 + 0x90022A07, // 004E SETMBR R0 K21 R7 + 0x881C0115, // 004F GETMBR R7 R0 K21 + 0x781E0006, // 0050 JMPF R7 #0058 + 0xB81E2E00, // 0051 GETNGBL R7 K23 + 0x60200008, // 0052 GETGBL R8 G8 + 0x88240115, // 0053 GETMBR R9 R0 K21 + 0x7C200200, // 0054 CALL R8 1 + 0x00233608, // 0055 ADD R8 K155 R8 + 0x58240030, // 0056 LDCONST R9 K48 + 0x7C1C0400, // 0057 CALL R7 2 + 0xA8040001, // 0058 EXBLK 1 1 + 0x70020011, // 0059 JMP #006C + 0xAC0C0002, // 005A CATCH R3 0 2 + 0x7002000E, // 005B JMP #006B + 0x2014079C, // 005C NE R5 R3 K156 + 0x7816000B, // 005D JMPF R5 #006A + 0xB8162E00, // 005E GETNGBL R5 K23 + 0x60180008, // 005F GETGBL R6 G8 + 0x5C1C0600, // 0060 MOVE R7 R3 + 0x7C180200, // 0061 CALL R6 1 + 0x001B3A06, // 0062 ADD R6 K157 R6 + 0x00180D9E, // 0063 ADD R6 R6 K158 + 0x601C0008, // 0064 GETGBL R7 G8 + 0x5C200800, // 0065 MOVE R8 R4 + 0x7C1C0200, // 0066 CALL R7 1 + 0x00180C07, // 0067 ADD R6 R6 R7 + 0x581C001D, // 0068 LDCONST R7 K29 + 0x7C140400, // 0069 CALL R5 2 + 0x70020000, // 006A JMP #006C + 0xB0080000, // 006B RAISE 2 R0 R0 + 0x880C0191, // 006C GETMBR R3 R0 K145 + 0x4C100000, // 006D LDNIL R4 + 0x1C0C0604, // 006E EQ R3 R3 R4 + 0x780E000A, // 006F JMPF R3 #007B + 0x8C0C039F, // 0070 GETMET R3 R1 K159 + 0x5814001D, // 0071 LDCONST R5 K29 + 0x7C0C0400, // 0072 CALL R3 2 + 0x8C0C0777, // 0073 GETMET R3 R3 K119 + 0x58140006, // 0074 LDCONST R5 K6 + 0x5818001D, // 0075 LDCONST R6 K29 + 0x7C0C0600, // 0076 CALL R3 3 + 0x54120FFE, // 0077 LDINT R4 4095 + 0x2C0C0604, // 0078 AND R3 R3 R4 + 0x90032203, // 0079 SETMBR R0 K145 R3 + 0x50080200, // 007A LDBOOL R2 1 0 + 0x880C0193, // 007B GETMBR R3 R0 K147 + 0x4C100000, // 007C LDNIL R4 + 0x1C0C0604, // 007D EQ R3 R3 R4 + 0x780E0004, // 007E JMPF R3 #0084 + 0x880C0109, // 007F GETMBR R3 R0 K9 + 0x8C0C07A0, // 0080 GETMET R3 R3 K160 + 0x7C0C0200, // 0081 CALL R3 1 + 0x90032603, // 0082 SETMBR R0 K147 R3 + 0x50080200, // 0083 LDBOOL R2 1 0 + 0x780A0001, // 0084 JMPF R2 #0087 + 0x8C0C0108, // 0085 GETMET R3 R0 K8 + 0x7C0C0200, // 0086 CALL R3 1 + 0x80000000, // 0087 RET 0 }) ) ); From d084be23db2c243e77edc4f22a510daf9452c5ed Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 24 Aug 2024 18:32:35 +0200 Subject: [PATCH 018/144] Zigbee extend timeout for MCU reboot from 5s to 10s (#22009) --- CHANGELOG.md | 1 + .../tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38cd189f9..f19d0d069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Matter fixed UI bug when no endpoints configured +- Zigbee extend timeout for MCU reboot from 5s to 10s ### Removed diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino index bffd6d1c8..07893a449 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino @@ -453,7 +453,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { ZI_CALL(&ZNP_Reset_Device, 0) // LOW = reset ZI_WAIT(100) // wait for .1 second ZI_CALL(&ZNP_Reset_Device, 1) // HIGH = release reset - ZI_WAIT_RECV_FUNC(5000, ZBR_RESET, &ZNP_Reboot) // timeout 5s + ZI_WAIT_RECV_FUNC(10000, ZBR_RESET, &ZNP_Reboot) // timeout 5s ZI_WAIT(100) ZI_LOG(LOG_LEVEL_DEBUG, kCheckingDeviceConfiguration) // Log Debug: checking device configuration ZI_SEND(ZBS_VERSION) // check ZNP software version @@ -925,7 +925,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { ZI_CALL(&EZ_Reset_Device, 1) // HIGH = release reset // wait for device to start - ZI_WAIT_UNTIL(5000, ZBR_RSTACK) // wait for RSTACK message + ZI_WAIT_UNTIL(10000, ZBR_RSTACK) // wait for RSTACK message // Init device and probe version ZI_SEND(ZBS_VERSION) ZI_WAIT_RECV_FUNC(5000, ZBR_VERSION, &EZ_ReceiveCheckVersion) // check EXT PAN ID From 645ce4a1ee0a68eb98b1a6e715da922760e770bc Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sat, 24 Aug 2024 23:53:42 +0200 Subject: [PATCH 019/144] Zigbee reduce serial logging (#22012) --- tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino index 0f5249258..5decd1e39 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino @@ -103,14 +103,14 @@ void ZigbeeInputLoop(void) { // in this case the first bit (lsb) is missed and Tasmota receives 0xFF instead of 0xFE // We forgive this mistake, and next bytes are automatically resynchronized if (ZIGBEE_SOF_ALT == zigbee_in_byte) { - AddLog(LOG_LEVEL_INFO, PSTR("ZbInput forgiven first byte %02X (only for statistics)"), zigbee_in_byte); + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "ZbInput forgiven first byte %02X (only for statistics)"), zigbee_in_byte); zigbee_in_byte = ZIGBEE_SOF; } } if ((0 == zigbee_buffer->len()) && (ZIGBEE_SOF != zigbee_in_byte)) { // waiting for SOF (Start Of Frame) byte, discard anything else - AddLog(LOG_LEVEL_INFO, PSTR("ZbInput discarding byte %02X"), zigbee_in_byte); + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "ZbInput discarding byte %02X"), zigbee_in_byte); continue; // discard } @@ -140,10 +140,10 @@ void ZigbeeInputLoop(void) { // buffer received, now check integrity if (zigbee_buffer->len() != zigbee_frame_len) { // Len is not correct, log and reject frame - AddLog(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received frame of wrong size %_B, len %d, expected %d"), zigbee_buffer, zigbee_buffer->len(), zigbee_frame_len); + AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED ": received frame of wrong size %_B, len %d, expected %d"), zigbee_buffer, zigbee_buffer->len(), zigbee_frame_len); } else if (0x00 != fcs) { // FCS is wrong, packet is corrupt, log and reject frame - AddLog(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %_B, %d"), zigbee_buffer, fcs); + AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %_B, %d"), zigbee_buffer, fcs); } else { // frame is correct //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char); From 8d6a4bd7be6b74d4b8cae2c7c6791327e38d0158 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 25 Aug 2024 19:33:40 +0200 Subject: [PATCH 020/144] Matter fix when Rules are disabled (#22016) --- CHANGELOG.md | 1 + .../src/embedded/Matter_zz_Device.be | 27 +- .../solidify/solidified_Matter_zz_Device.h | 5661 ++++++++--------- 3 files changed, 2812 insertions(+), 2877 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f19d0d069..ffefd0bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Matter fixed UI bug when no endpoints configured - Zigbee extend timeout for MCU reboot from 5s to 10s +- Matter fix when Rules are disabled ### Removed diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be index 1147c9e9b..4625d5c63 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_zz_Device.be @@ -84,28 +84,22 @@ class Matter_Device self.events = matter.EventHandler(self) self.ui = matter.UI(self) - if tasmota.wifi()['up'] || tasmota.eth()['up'] - self.start() - end - if !tasmota.wifi()['up'] - tasmota.add_rule("Wifi#Connected", def () - self.start() - tasmota.remove_rule("Wifi#Connected", "matter_start") - end, "matter_start") - end - if !tasmota.eth()['up'] - tasmota.add_rule("Eth#Connected", def () - self.start() - tasmota.remove_rule("Eth#Connected", "matter_start") - end, "matter_start") - end - self.commissioning.init_basic_commissioning() tasmota.add_driver(self) self.register_commands() end + ############################################################# + # Check if the network just started + def check_network() + if self.started return end # abort if already started + if tasmota.wifi()['up'] || tasmota.eth()['up'] + self.start() + end + end + + ############################################################# # Start Matter device server when the first network is coming up def start() @@ -255,6 +249,7 @@ class Matter_Device # dispatch every 50ms # ticks def every_50ms() + self.check_network() self.tick += 1 self.message_handler.every_50ms() end diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h index 8b881a939..2dfba3ef7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h @@ -4,232 +4,362 @@ \********************************************************************/ #include "be_constobj.h" extern const bclass be_class_Matter_Device; -// compact class 'Matter_Device' ktab size: 213, total: 455 (saved 1936 bytes) -static const bvalue be_ktab_class_Matter_Device[213] = { - /* K0 */ be_nested_str_weak(udp_server), - /* K1 */ be_nested_str_weak(received_ack), - /* K2 */ be_nested_str_weak(message_handler), - /* K3 */ be_nested_str_weak(msg_received), - /* K4 */ be_nested_str_weak(sessions), - /* K5 */ be_nested_str_weak(count_active_fabrics), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(plugins_persist), - /* K8 */ be_nested_str_weak(save_param), - /* K9 */ be_nested_str_weak(commissioning), - /* K10 */ be_nested_str_weak(stop_basic_commissioning), - /* K11 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), - /* K12 */ be_const_class(be_class_Matter_Device), - /* K13 */ be_nested_str_weak(), - /* K14 */ be_nested_str_weak(k2l), - /* K15 */ be_nested_str_weak(type), - /* K16 */ be_nested_str_weak(_X20_X25s_X3A_X25s), - /* K17 */ be_nested_str_weak(stop_iteration), - /* K18 */ be_nested_str_weak(plugins), - /* K19 */ be_nested_str_weak(get_name), - /* K20 */ be_const_int(1), - /* K21 */ be_nested_str_weak(plugins_config_remotes), - /* K22 */ be_nested_str_weak(find), - /* K23 */ be_nested_str_weak(log), - /* K24 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), - /* K25 */ be_nested_str_weak(get_fabric_id), - /* K26 */ be_nested_str_weak(copy), - /* K27 */ be_nested_str_weak(reverse), - /* K28 */ be_nested_str_weak(tohex), - /* K29 */ be_const_int(2), - /* K30 */ be_nested_str_weak(im), - /* K31 */ be_nested_str_weak(subs_shop), - /* K32 */ be_nested_str_weak(remove_by_fabric), - /* K33 */ be_nested_str_weak(mdns_remove_op_discovery), - /* K34 */ be_nested_str_weak(remove_fabric), - /* K35 */ be_nested_str_weak(save_fabrics), - /* K36 */ be_nested_str_weak(endpoint), - /* K37 */ be_nested_str_weak(cluster), - /* K38 */ be_nested_str_weak(attribute), - /* K39 */ be_nested_str_weak(find_plugin_by_endpoint), - /* K40 */ be_nested_str_weak(status), - /* K41 */ be_nested_str_weak(matter), - /* K42 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), - /* K43 */ be_nested_str_weak(contains_cluster), - /* K44 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), - /* K45 */ be_nested_str_weak(contains_attribute), - /* K46 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), - /* K47 */ be_nested_str_weak(attribute_updated), - /* K48 */ be_const_int(3), - /* K49 */ be_nested_str_weak(AGGREGATOR_ENDPOINT), - /* K50 */ be_nested_str_weak(json), - /* K51 */ be_nested_str_weak(autoconf), - /* K52 */ be_nested_str_weak(Autoconf), - /* K53 */ be_nested_str_weak(plugins_config), - /* K54 */ be_nested_str_weak(autoconf_device_map), - /* K55 */ be_nested_str_weak(adjust_next_ep), - /* K56 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), - /* K57 */ be_nested_str_weak(instantiate_plugins_from_config), - /* K58 */ be_nested_str_weak(tasmota), - /* K59 */ be_nested_str_weak(read_sensors), - /* K60 */ be_nested_str_weak(loglevel), - /* K61 */ be_nested_str_weak(MTR_X3A_X20read_sensors_X3A_X20), - /* K62 */ be_nested_str_weak(load), - /* K63 */ be_nested_str_weak(parse_sensors), - /* K64 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20), - /* K65 */ be_nested_str_weak(get_endpoint), - /* K66 */ be_nested_str_weak(push), - /* K67 */ be_nested_str_weak(send_UDP), - /* K68 */ be_nested_str_weak(remove_driver), - /* K69 */ be_nested_str_weak(stop), - /* K70 */ be_nested_str_weak(keys), - /* K71 */ be_nested_str_weak(next_ep), - /* K72 */ be_nested_str_weak(probe_sensor_time), - /* K73 */ be_nested_str_weak(probe_sensor_timestamp), - /* K74 */ be_nested_str_weak(jitter), - /* K75 */ be_nested_str_weak(button_handler), - /* K76 */ be_nested_str_weak(started), - /* K77 */ be_nested_str_weak(autoconf_device), - /* K78 */ be_nested_str_weak(_start_udp), - /* K79 */ be_nested_str_weak(UDP_PORT), - /* K80 */ be_nested_str_weak(start_mdns_announce_hostnames), - /* K81 */ be_nested_str_weak(plugins_classes), - /* K82 */ be_nested_str_weak(DISPLAY_NAME), - /* K83 */ be_nested_str_weak(remove), - /* K84 */ be_nested_str_weak(MTR_X3A_X20invalid_X20entry_X20with_X20ep_X20_X270_X27), - /* K85 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25s_X20collides_X20wit_X20aggregator_X2C_X20relocating_X20to_X20_X25s), - /* K86 */ be_nested_str_weak(introspect), - /* K87 */ be_nested_str_weak(contains), - /* K88 */ be_nested_str_weak(crypto), - /* K89 */ be_nested_str_weak(get_option), - /* K90 */ be_nested_str_weak(MATTER_OPTION), - /* K91 */ be_nested_str_weak(UI), - /* K92 */ be_nested_str_weak(profiler), - /* K93 */ be_nested_str_weak(Profiler), - /* K94 */ be_nested_str_weak(tick), - /* K95 */ be_nested_str_weak(EP), - /* K96 */ be_nested_str_weak(ipv4only), - /* K97 */ be_nested_str_weak(disable_bridge_mode), - /* K98 */ be_nested_str_weak(Commissioning), - /* K99 */ be_nested_str_weak(load_param), - /* K100 */ be_nested_str_weak(Session_Store), - /* K101 */ be_nested_str_weak(load_fabrics), - /* K102 */ be_nested_str_weak(MessageHandler), - /* K103 */ be_nested_str_weak(events), - /* K104 */ be_nested_str_weak(EventHandler), - /* K105 */ be_nested_str_weak(ui), - /* K106 */ be_nested_str_weak(wifi), - /* K107 */ be_nested_str_weak(up), - /* K108 */ be_nested_str_weak(eth), - /* K109 */ be_nested_str_weak(start), - /* K110 */ be_nested_str_weak(add_rule), - /* K111 */ be_nested_str_weak(Wifi_X23Connected), - /* K112 */ be_nested_str_weak(matter_start), - /* K113 */ be_nested_str_weak(Eth_X23Connected), - /* K114 */ be_nested_str_weak(init_basic_commissioning), - /* K115 */ be_nested_str_weak(add_driver), - /* K116 */ be_nested_str_weak(register_commands), +// compact class 'Matter_Device' ktab size: 210, total: 454 (saved 1952 bytes) +static const bvalue be_ktab_class_Matter_Device[210] = { + /* K0 */ be_nested_str_weak(crypto), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(get_option), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(MATTER_OPTION), + /* K5 */ be_nested_str_weak(UI), + /* K6 */ be_nested_str_weak(profiler), + /* K7 */ be_nested_str_weak(Profiler), + /* K8 */ be_nested_str_weak(started), + /* K9 */ be_nested_str_weak(tick), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(plugins), + /* K12 */ be_nested_str_weak(plugins_persist), + /* K13 */ be_nested_str_weak(plugins_config_remotes), + /* K14 */ be_nested_str_weak(next_ep), + /* K15 */ be_nested_str_weak(EP), + /* K16 */ be_nested_str_weak(ipv4only), + /* K17 */ be_nested_str_weak(disable_bridge_mode), + /* K18 */ be_nested_str_weak(commissioning), + /* K19 */ be_nested_str_weak(Commissioning), + /* K20 */ be_nested_str_weak(load_param), + /* K21 */ be_nested_str_weak(sessions), + /* K22 */ be_nested_str_weak(Session_Store), + /* K23 */ be_nested_str_weak(load_fabrics), + /* K24 */ be_nested_str_weak(message_handler), + /* K25 */ be_nested_str_weak(MessageHandler), + /* K26 */ be_nested_str_weak(events), + /* K27 */ be_nested_str_weak(EventHandler), + /* K28 */ be_nested_str_weak(ui), + /* K29 */ be_nested_str_weak(init_basic_commissioning), + /* K30 */ be_nested_str_weak(add_driver), + /* K31 */ be_nested_str_weak(register_commands), + /* K32 */ be_nested_str_weak(button_handler), + /* K33 */ be_const_int(1), + /* K34 */ be_const_int(2), + /* K35 */ be_nested_str_weak(get_endpoint), + /* K36 */ be_nested_str_weak(get_name), + /* K37 */ be_nested_str_weak(log), + /* K38 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20), + /* K39 */ be_nested_str_weak(get_fabric_id), + /* K40 */ be_nested_str_weak(copy), + /* K41 */ be_nested_str_weak(reverse), + /* K42 */ be_nested_str_weak(tohex), + /* K43 */ be_nested_str_weak(im), + /* K44 */ be_nested_str_weak(subs_shop), + /* K45 */ be_nested_str_weak(remove_by_fabric), + /* K46 */ be_nested_str_weak(mdns_remove_op_discovery), + /* K47 */ be_nested_str_weak(remove_fabric), + /* K48 */ be_nested_str_weak(save_fabrics), + /* K49 */ be_nested_str_weak(msg_received), + /* K50 */ be_nested_str_weak(find), + /* K51 */ be_nested_str_weak(add_cmd), + /* K52 */ be_nested_str_weak(MtrJoin), + /* K53 */ be_nested_str_weak(MtrUpdate), + /* K54 */ be_nested_str_weak(MtrInfo), + /* K55 */ be_const_class(be_class_Matter_Device), + /* K56 */ be_nested_str_weak(keys), + /* K57 */ be_nested_str_weak(push), + /* K58 */ be_nested_str_weak(stop_iteration), + /* K59 */ be_nested_str_weak(start_root_basic_commissioning), + /* K60 */ be_nested_str_weak(stop_basic_commissioning), + /* K61 */ be_nested_str_weak(resp_cmnd_done), + /* K62 */ be_nested_str_weak(Path), + /* K63 */ be_nested_str_weak(endpoint), + /* K64 */ be_nested_str_weak(cluster), + /* K65 */ be_nested_str_weak(attribute), + /* K66 */ be_nested_str_weak(attribute_updated_ctx), + /* K67 */ be_nested_str_weak(json), + /* K68 */ be_nested_str_weak(update_remotes_info), + /* K69 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s_X2C_X22disable_bridge_mode_X22_X3A_X25s_X2C_X22nextep_X22_X3A_X25i), + /* K70 */ be_nested_str_weak(root_discriminator), + /* K71 */ be_nested_str_weak(root_passcode), + /* K72 */ be_nested_str_weak(true), + /* K73 */ be_nested_str_weak(false), + /* K74 */ be_nested_str_weak(debug), + /* K75 */ be_nested_str_weak(_X2C_X22debug_X22_X3Atrue), + /* K76 */ be_nested_str_weak(_X2C_X0A_X22config_X22_X3A), + /* K77 */ be_nested_str_weak(dump), + /* K78 */ be_nested_str_weak(plugins_config), + /* K79 */ be_nested_str_weak(_X2C_X0A_X22remotes_X22_X3A), + /* K80 */ be_nested_str_weak(_X7D), + /* K81 */ be_nested_str_weak(FILENAME), + /* K82 */ be_nested_str_weak(w), + /* K83 */ be_nested_str_weak(write), + /* K84 */ be_nested_str_weak(close), + /* K85 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s), + /* K86 */ be_nested_str_weak(_X20and_X20configuration), + /* K87 */ be_nested_str_weak(), + /* K88 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), + /* K89 */ be_nested_str_weak(_X7C), + /* K90 */ be_nested_str_weak(read), + /* K91 */ be_nested_str_weak(load), + /* K92 */ be_nested_str_weak(distinguish), + /* K93 */ be_nested_str_weak(passcode), + /* K94 */ be_nested_str_weak(nextep), + /* K95 */ be_nested_str_weak(config), + /* K96 */ be_nested_str_weak(MTR_X3A_X20Load_config_X20_X3D_X20_X25s), + /* K97 */ be_const_int(3), + /* K98 */ be_nested_str_weak(adjust_next_ep), + /* K99 */ be_nested_str_weak(check_config_ep), + /* K100 */ be_nested_str_weak(remotes), + /* K101 */ be_nested_str_weak(MTR_X3A_X20load_remotes_X20_X3D_X20), + /* K102 */ be_nested_str_weak(io_error), + /* K103 */ be_nested_str_weak(MTR_X3A_X20load_param_X20Exception_X3A), + /* K104 */ be_nested_str_weak(random), + /* K105 */ be_nested_str_weak(get), + /* K106 */ be_nested_str_weak(generate_random_passcode), + /* K107 */ be_nested_str_weak(save_param), + /* K108 */ be_nested_str_weak(http_remotes), + /* K109 */ be_nested_str_weak(contains), + /* K110 */ be_nested_str_weak(get_timeout), + /* K111 */ be_nested_str_weak(set_timeout), + /* K112 */ be_nested_str_weak(HTTP_remote), + /* K113 */ be_nested_str_weak(set_info), + /* K114 */ be_nested_str_weak(remove), + /* K115 */ be_nested_str_weak(udp_server), + /* K116 */ be_nested_str_weak(received_ack), /* K117 */ be_nested_str_weak(every_second), - /* K118 */ be_nested_str_weak(http_remotes), - /* K119 */ be_nested_str_weak(get), - /* K120 */ be_nested_str_weak(http_remote), - /* K121 */ be_nested_str_weak(MTR_X3A_X20remove_X20unused_X20remote_X3A_X20), - /* K122 */ be_nested_str_weak(addr), - /* K123 */ be_nested_str_weak(close), - /* K124 */ be_nested_str_weak(read_sensors_scheduler), - /* K125 */ be_nested_str_weak(every_250ms), - /* K126 */ be_nested_str_weak(PathGenerator), - /* K127 */ be_nested_str_weak(is_direct), - /* K128 */ be_nested_str_weak(next_attribute), - /* K129 */ be_nested_str_weak(get_pi), - /* K130 */ be_nested_str_weak(Path), - /* K131 */ be_nested_str_weak(attribute_updated_ctx), - /* K132 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), - /* K133 */ be_nested_str_weak(_X27_X20skipping), - /* K134 */ be_nested_str_weak(MTR_X3A_X20adding_X20endpoint_X20_X3D_X20_X25i_X20type_X3A_X25s_X25s), - /* K135 */ be_nested_str_weak(conf_to_log), - /* K136 */ be_nested_str_weak(signal_endpoints_changed), - /* K137 */ be_nested_str_weak(MtrInfo_one), - /* K138 */ be_nested_str_weak(int), - /* K139 */ be_nested_str_weak(find_plugin_by_friendly_name), - /* K140 */ be_nested_str_weak(resp_cmnd_done), - /* K141 */ be_nested_str_weak(MTR_X3A_X20Starting_X20UDP_X20server_X20on_X20port_X3A_X20), - /* K142 */ be_nested_str_weak(UDPServer), - /* K143 */ be_nested_str_weak(FILENAME), - /* K144 */ be_nested_str_weak(read), - /* K145 */ be_nested_str_weak(root_discriminator), - /* K146 */ be_nested_str_weak(distinguish), - /* K147 */ be_nested_str_weak(root_passcode), - /* K148 */ be_nested_str_weak(passcode), - /* K149 */ be_nested_str_weak(nextep), - /* K150 */ be_nested_str_weak(config), - /* K151 */ be_nested_str_weak(debug), - /* K152 */ be_nested_str_weak(MTR_X3A_X20Load_config_X20_X3D_X20_X25s), - /* K153 */ be_nested_str_weak(check_config_ep), - /* K154 */ be_nested_str_weak(remotes), - /* K155 */ be_nested_str_weak(MTR_X3A_X20load_remotes_X20_X3D_X20), - /* K156 */ be_nested_str_weak(io_error), - /* K157 */ be_nested_str_weak(MTR_X3A_X20load_param_X20Exception_X3A), - /* K158 */ be_nested_str_weak(_X7C), - /* K159 */ be_nested_str_weak(random), - /* K160 */ be_nested_str_weak(generate_random_passcode), - /* K161 */ be_nested_str_weak(every_50ms), - /* K162 */ be_nested_str_weak(add_cmd), - /* K163 */ be_nested_str_weak(MtrJoin), - /* K164 */ be_nested_str_weak(MtrUpdate), - /* K165 */ be_nested_str_weak(MtrInfo), - /* K166 */ be_nested_str_weak(update_remotes_info), - /* K167 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s_X2C_X22disable_bridge_mode_X22_X3A_X25s_X2C_X22nextep_X22_X3A_X25i), - /* K168 */ be_nested_str_weak(true), - /* K169 */ be_nested_str_weak(false), - /* K170 */ be_nested_str_weak(_X2C_X22debug_X22_X3Atrue), - /* K171 */ be_nested_str_weak(_X2C_X0A_X22config_X22_X3A), - /* K172 */ be_nested_str_weak(dump), - /* K173 */ be_nested_str_weak(_X2C_X0A_X22remotes_X22_X3A), - /* K174 */ be_nested_str_weak(_X7D), - /* K175 */ be_nested_str_weak(w), - /* K176 */ be_nested_str_weak(write), - /* K177 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s), - /* K178 */ be_nested_str_weak(_X20and_X20configuration), - /* K179 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A), - /* K180 */ be_nested_str_weak(MTR_X3A_X20Cannot_X20remove_X20an_X20enpoint_X20not_X20configured_X3A_X20), - /* K181 */ be_nested_str_weak(MTR_X3A_X20deleting_X20endpoint_X20_X3D_X20_X25i), - /* K182 */ be_nested_str_weak(clean_remotes), - /* K183 */ be_nested_str_weak(invoke_request), - /* K184 */ be_nested_str_weak(time_reached), - /* K185 */ be_nested_str_weak(_trigger_read_sensors), - /* K186 */ be_nested_str_weak(millis), - /* K187 */ be_nested_str_weak(get_timeout), - /* K188 */ be_nested_str_weak(set_timeout), - /* K189 */ be_nested_str_weak(HTTP_remote), - /* K190 */ be_nested_str_weak(set_info), - /* K191 */ be_nested_str_weak(resp_cmnd_str), - /* K192 */ be_nested_str_weak(Invalid_X20JSON), - /* K193 */ be_nested_str_weak(find_key_i), - /* K194 */ be_nested_str_weak(Ep), - /* K195 */ be_nested_str_weak(Name), - /* K196 */ be_nested_str_weak(Invalid_X20_X27Ep_X27_X20attribute), - /* K197 */ be_nested_str_weak(Invalid_X20Device), - /* K198 */ be_nested_str_weak(VIRTUAL), - /* K199 */ be_nested_str_weak(Device_X20is_X20not_X20virtual), - /* K200 */ be_nested_str_weak(consolidate_update_commands), - /* K201 */ be_nested_str_weak(find_list_i), - /* K202 */ be_nested_str_weak(Invalid_X20attribute_X20_X27_X25s_X27), - /* K203 */ be_nested_str_weak(update_virtual), - /* K204 */ be_nested_str_weak(state_json), - /* K205 */ be_nested_str_weak(_X7B_X22_X25s_X22_X3A_X25s_X7D), - /* K206 */ be_nested_str_weak(resp_cmnd), - /* K207 */ be_nested_str_weak(Missing_X20_X27Device_X27_X20attribute), - /* K208 */ be_nested_str_weak(_X7B_X22MtrInfo_X22_X3A_X25s_X7D), - /* K209 */ be_nested_str_weak(publish_result), - /* K210 */ be_nested_str_weak(start_root_basic_commissioning), - /* K211 */ be_nested_str_weak(ARG), - /* K212 */ be_nested_str_weak(get_info), + /* K118 */ be_nested_str_weak(find_plugin_by_endpoint), + /* K119 */ be_nested_str_weak(status), + /* K120 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT), + /* K121 */ be_nested_str_weak(contains_cluster), + /* K122 */ be_nested_str_weak(UNSUPPORTED_CLUSTER), + /* K123 */ be_nested_str_weak(contains_attribute), + /* K124 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE), + /* K125 */ be_nested_str_weak(introspect), + /* K126 */ be_nested_str_weak(http_remote), + /* K127 */ be_nested_str_weak(MTR_X3A_X20remove_X20unused_X20remote_X3A_X20), + /* K128 */ be_nested_str_weak(addr), + /* K129 */ be_nested_str_weak(autoconf_device), + /* K130 */ be_nested_str_weak(_start_udp), + /* K131 */ be_nested_str_weak(UDP_PORT), + /* K132 */ be_nested_str_weak(start_mdns_announce_hostnames), + /* K133 */ be_nested_str_weak(send_UDP), + /* K134 */ be_nested_str_weak(probe_sensor_time), + /* K135 */ be_nested_str_weak(probe_sensor_timestamp), + /* K136 */ be_nested_str_weak(jitter), + /* K137 */ be_nested_str_weak(remove_driver), + /* K138 */ be_nested_str_weak(stop), + /* K139 */ be_nested_str_weak(MTR_X3A_X20Starting_X20UDP_X20server_X20on_X20port_X3A_X20), + /* K140 */ be_nested_str_weak(UDPServer), + /* K141 */ be_nested_str_weak(start), + /* K142 */ be_nested_str_weak(MtrInfo_one), + /* K143 */ be_nested_str_weak(int), + /* K144 */ be_nested_str_weak(find_plugin_by_friendly_name), + /* K145 */ be_nested_str_weak(state_json), + /* K146 */ be_nested_str_weak(_X7B_X22MtrInfo_X22_X3A_X25s_X7D), + /* K147 */ be_nested_str_weak(publish_result), + /* K148 */ be_nested_str_weak(wifi), + /* K149 */ be_nested_str_weak(up), + /* K150 */ be_nested_str_weak(eth), + /* K151 */ be_nested_str_weak(read_sensors), + /* K152 */ be_nested_str_weak(loglevel), + /* K153 */ be_nested_str_weak(MTR_X3A_X20read_sensors_X3A_X20), + /* K154 */ be_nested_str_weak(parse_sensors), + /* K155 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20), + /* K156 */ be_nested_str_weak(plugins_classes), + /* K157 */ be_nested_str_weak(ARG), + /* K158 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27), + /* K159 */ be_nested_str_weak(_X27_X20skipping), + /* K160 */ be_nested_str_weak(type), + /* K161 */ be_nested_str_weak(MTR_X3A_X20adding_X20endpoint_X20_X3D_X20_X25i_X20type_X3A_X25s_X25s), + /* K162 */ be_nested_str_weak(conf_to_log), + /* K163 */ be_nested_str_weak(signal_endpoints_changed), + /* K164 */ be_nested_str_weak(attribute_updated), + /* K165 */ be_nested_str_weak(AGGREGATOR_ENDPOINT), + /* K166 */ be_nested_str_weak(check_network), + /* K167 */ be_nested_str_weak(every_50ms), + /* K168 */ be_nested_str_weak(k2l), + /* K169 */ be_nested_str_weak(_X20_X25s_X3A_X25s), + /* K170 */ be_nested_str_weak(resp_cmnd_str), + /* K171 */ be_nested_str_weak(Invalid_X20JSON), + /* K172 */ be_nested_str_weak(find_key_i), + /* K173 */ be_nested_str_weak(Ep), + /* K174 */ be_nested_str_weak(Name), + /* K175 */ be_nested_str_weak(Invalid_X20_X27Ep_X27_X20attribute), + /* K176 */ be_nested_str_weak(Invalid_X20Device), + /* K177 */ be_nested_str_weak(VIRTUAL), + /* K178 */ be_nested_str_weak(Device_X20is_X20not_X20virtual), + /* K179 */ be_nested_str_weak(consolidate_update_commands), + /* K180 */ be_nested_str_weak(find_list_i), + /* K181 */ be_nested_str_weak(Invalid_X20attribute_X20_X27_X25s_X27), + /* K182 */ be_nested_str_weak(update_virtual), + /* K183 */ be_nested_str_weak(_X7B_X22_X25s_X22_X3A_X25s_X7D), + /* K184 */ be_nested_str_weak(resp_cmnd), + /* K185 */ be_nested_str_weak(Missing_X20_X27Device_X27_X20attribute), + /* K186 */ be_nested_str_weak(count_active_fabrics), + /* K187 */ be_nested_str_weak(PathGenerator), + /* K188 */ be_nested_str_weak(is_direct), + /* K189 */ be_nested_str_weak(next_attribute), + /* K190 */ be_nested_str_weak(get_pi), + /* K191 */ be_nested_str_weak(invoke_request), + /* K192 */ be_nested_str_weak(get_info), + /* K193 */ be_nested_str_weak(DISPLAY_NAME), + /* K194 */ be_nested_str_weak(MTR_X3A_X20Cannot_X20remove_X20an_X20enpoint_X20not_X20configured_X3A_X20), + /* K195 */ be_nested_str_weak(MTR_X3A_X20deleting_X20endpoint_X20_X3D_X20_X25i), + /* K196 */ be_nested_str_weak(clean_remotes), + /* K197 */ be_nested_str_weak(MTR_X3A_X20invalid_X20entry_X20with_X20ep_X20_X270_X27), + /* K198 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25s_X20collides_X20wit_X20aggregator_X2C_X20relocating_X20to_X20_X25s), + /* K199 */ be_nested_str_weak(time_reached), + /* K200 */ be_nested_str_weak(_trigger_read_sensors), + /* K201 */ be_nested_str_weak(millis), + /* K202 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics), + /* K203 */ be_nested_str_weak(read_sensors_scheduler), + /* K204 */ be_nested_str_weak(every_250ms), + /* K205 */ be_nested_str_weak(autoconf), + /* K206 */ be_nested_str_weak(Autoconf), + /* K207 */ be_nested_str_weak(autoconf_device_map), + /* K208 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20), + /* K209 */ be_nested_str_weak(instantiate_plugins_from_config), }; extern const bclass be_class_Matter_Device; /******************************************************************** -** Solidified function: received_ack +** Solidified function: init ********************************************************************/ -be_local_closure(class_Matter_Device_received_ack, /* name */ +be_local_closure(class_Matter_Device_init, /* name */ be_nested_proto( 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[74]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0xB80A0200, // 0001 GETNGBL R2 K1 + 0x8C080502, // 0002 GETMET R2 R2 K2 + 0xB8120600, // 0003 GETNGBL R4 K3 + 0x88100904, // 0004 GETMBR R4 R4 K4 + 0x7C080400, // 0005 CALL R2 2 + 0x740A0004, // 0006 JMPT R2 #000C + 0xB80A0600, // 0007 GETNGBL R2 K3 + 0x8C080505, // 0008 GETMET R2 R2 K5 + 0x5C100000, // 0009 MOVE R4 R0 + 0x7C080400, // 000A CALL R2 2 + 0x80000400, // 000B RET 0 + 0xB80A0600, // 000C GETNGBL R2 K3 + 0xB80E0600, // 000D GETNGBL R3 K3 + 0x8C0C0707, // 000E GETMET R3 R3 K7 + 0x7C0C0200, // 000F CALL R3 1 + 0x900A0C03, // 0010 SETMBR R2 K6 R3 + 0x50080000, // 0011 LDBOOL R2 0 0 + 0x90021002, // 0012 SETMBR R0 K8 R2 + 0x9002130A, // 0013 SETMBR R0 K9 K10 + 0x60080012, // 0014 GETGBL R2 G18 + 0x7C080000, // 0015 CALL R2 0 + 0x90021602, // 0016 SETMBR R0 K11 R2 + 0x50080000, // 0017 LDBOOL R2 0 0 + 0x90021802, // 0018 SETMBR R0 K12 R2 + 0x60080013, // 0019 GETGBL R2 G19 + 0x7C080000, // 001A CALL R2 0 + 0x90021A02, // 001B SETMBR R0 K13 R2 + 0x8808010F, // 001C GETMBR R2 R0 K15 + 0x90021C02, // 001D SETMBR R0 K14 R2 + 0x50080000, // 001E LDBOOL R2 0 0 + 0x90022002, // 001F SETMBR R0 K16 R2 + 0x50080000, // 0020 LDBOOL R2 0 0 + 0x90022202, // 0021 SETMBR R0 K17 R2 + 0xB80A0600, // 0022 GETNGBL R2 K3 + 0x8C080513, // 0023 GETMET R2 R2 K19 + 0x5C100000, // 0024 MOVE R4 R0 + 0x7C080400, // 0025 CALL R2 2 + 0x90022402, // 0026 SETMBR R0 K18 R2 + 0x8C080114, // 0027 GETMET R2 R0 K20 + 0x7C080200, // 0028 CALL R2 1 + 0xB80A0600, // 0029 GETNGBL R2 K3 + 0x8C080516, // 002A GETMET R2 R2 K22 + 0x5C100000, // 002B MOVE R4 R0 + 0x7C080400, // 002C CALL R2 2 + 0x90022A02, // 002D SETMBR R0 K21 R2 + 0x88080115, // 002E GETMBR R2 R0 K21 + 0x8C080517, // 002F GETMET R2 R2 K23 + 0x7C080200, // 0030 CALL R2 1 + 0xB80A0600, // 0031 GETNGBL R2 K3 + 0x8C080519, // 0032 GETMET R2 R2 K25 + 0x5C100000, // 0033 MOVE R4 R0 + 0x7C080400, // 0034 CALL R2 2 + 0x90023002, // 0035 SETMBR R0 K24 R2 + 0xB80A0600, // 0036 GETNGBL R2 K3 + 0x8C08051B, // 0037 GETMET R2 R2 K27 + 0x5C100000, // 0038 MOVE R4 R0 + 0x7C080400, // 0039 CALL R2 2 + 0x90023402, // 003A SETMBR R0 K26 R2 + 0xB80A0600, // 003B GETNGBL R2 K3 + 0x8C080505, // 003C GETMET R2 R2 K5 + 0x5C100000, // 003D MOVE R4 R0 + 0x7C080400, // 003E CALL R2 2 + 0x90023802, // 003F SETMBR R0 K28 R2 + 0x88080112, // 0040 GETMBR R2 R0 K18 + 0x8C08051D, // 0041 GETMET R2 R2 K29 + 0x7C080200, // 0042 CALL R2 1 + 0xB80A0200, // 0043 GETNGBL R2 K1 + 0x8C08051E, // 0044 GETMET R2 R2 K30 + 0x5C100000, // 0045 MOVE R4 R0 + 0x7C080400, // 0046 CALL R2 2 + 0x8C08011F, // 0047 GETMET R2 R0 K31 + 0x7C080200, // 0048 CALL R2 1 + 0x80000000, // 0049 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: button_multi_pressed +********************************************************************/ +be_local_closure(class_Matter_Device_button_multi_pressed, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(button_multi_pressed), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x540E0007, // 0000 LDINT R3 8 + 0x3C0C0403, // 0001 SHR R3 R2 R3 + 0x541200FE, // 0002 LDINT R4 255 + 0x2C0C0604, // 0003 AND R3 R3 R4 + 0x541200FE, // 0004 LDINT R4 255 + 0x2C100404, // 0005 AND R4 R2 R4 + 0x8C140120, // 0006 GETMET R5 R0 K32 + 0x001C0921, // 0007 ADD R7 R4 K33 + 0x58200022, // 0008 LDCONST R8 K34 + 0x5824000A, // 0009 LDCONST R9 K10 + 0x5C280600, // 000A MOVE R10 R3 + 0x7C140A00, // 000B CALL R5 5 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: find_plugin_by_endpoint +********************************************************************/ +be_local_closure(class_Matter_Device_find_plugin_by_endpoint, /* name */ + be_nested_proto( + 6, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -238,156 +368,26 @@ be_local_closure(class_Matter_Device_received_ack, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(received_ack), + be_str_weak(find_plugin_by_endpoint), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: msg_received -********************************************************************/ -be_local_closure(class_Matter_Device_msg_received, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(msg_received), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88100102, // 0000 GETMBR R4 R0 K2 - 0x8C100903, // 0001 GETMET R4 R4 K3 - 0x5C180200, // 0002 MOVE R6 R1 - 0x5C1C0400, // 0003 MOVE R7 R2 - 0x5C200600, // 0004 MOVE R8 R3 - 0x7C100800, // 0005 CALL R4 4 - 0x80040800, // 0006 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_fabrics_saved -********************************************************************/ -be_local_closure(class_Matter_Device_event_fabrics_saved, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(event_fabrics_saved), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C040305, // 0001 GETMET R1 R1 K5 - 0x7C040200, // 0002 CALL R1 1 - 0x24040306, // 0003 GT R1 R1 K6 - 0x78060005, // 0004 JMPF R1 #000B - 0x88040107, // 0005 GETMBR R1 R0 K7 - 0x74060003, // 0006 JMPT R1 #000B - 0x50040200, // 0007 LDBOOL R1 1 0 - 0x90020E01, // 0008 SETMBR R0 K7 R1 - 0x8C040108, // 0009 GETMET R1 R0 K8 - 0x7C040200, // 000A CALL R1 1 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: save_before_restart -********************************************************************/ -be_local_closure(class_Matter_Device_save_before_restart, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(save_before_restart), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88040109, // 0000 GETMBR R1 R0 K9 - 0x8C04030A, // 0001 GETMET R1 R1 K10 - 0x7C040200, // 0002 CALL R1 1 - 0x88040109, // 0003 GETMBR R1 R0 K9 - 0x8C04030B, // 0004 GETMET R1 R1 K11 - 0x7C040200, // 0005 CALL R1 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: conf_to_log -********************************************************************/ -be_local_closure(class_Matter_Device_conf_to_log, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 12, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(conf_to_log), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x5804000C, // 0000 LDCONST R1 K12 - 0x5808000D, // 0001 LDCONST R2 K13 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x8C10030E, // 0003 GETMET R4 R1 K14 - 0x5C180000, // 0004 MOVE R6 R0 - 0x7C100400, // 0005 CALL R4 2 - 0x7C0C0200, // 0006 CALL R3 1 - 0xA802000B, // 0007 EXBLK 0 #0014 - 0x5C100600, // 0008 MOVE R4 R3 - 0x7C100000, // 0009 CALL R4 0 - 0x1C14090F, // 000A EQ R5 R4 K15 - 0x78160000, // 000B JMPF R5 #000D - 0x7001FFFA, // 000C JMP #0008 - 0x60140018, // 000D GETGBL R5 G24 - 0x58180010, // 000E LDCONST R6 K16 - 0x5C1C0800, // 000F MOVE R7 R4 - 0x94200004, // 0010 GETIDX R8 R0 R4 - 0x7C140600, // 0011 CALL R5 3 - 0x00080405, // 0012 ADD R2 R2 R5 - 0x7001FFF3, // 0013 JMP #0008 - 0x580C0011, // 0014 LDCONST R3 K17 - 0xAC0C0200, // 0015 CATCH R3 1 0 - 0xB0080000, // 0016 RAISE 2 R0 R0 - 0x80040400, // 0017 RET 1 R2 + ( &(const binstruction[17]) { /* code */ + 0x5808000A, // 0000 LDCONST R2 K10 + 0x600C000C, // 0001 GETGBL R3 G12 + 0x8810010B, // 0002 GETMBR R4 R0 K11 + 0x7C0C0200, // 0003 CALL R3 1 + 0x140C0403, // 0004 LT R3 R2 R3 + 0x780E0008, // 0005 JMPF R3 #000F + 0x880C010B, // 0006 GETMBR R3 R0 K11 + 0x940C0602, // 0007 GETIDX R3 R3 R2 + 0x8C100723, // 0008 GETMET R4 R3 K35 + 0x7C100200, // 0009 CALL R4 1 + 0x1C100801, // 000A EQ R4 R4 R1 + 0x78120000, // 000B JMPF R4 #000D + 0x80040600, // 000C RET 1 R3 + 0x00080521, // 000D ADD R2 R2 K33 + 0x7001FFF1, // 000E JMP #0001 + 0x4C0C0000, // 000F LDNIL R3 + 0x80040600, // 0010 RET 1 R3 }) ) ); @@ -417,19 +417,19 @@ be_local_closure(class_Matter_Device_find_plugin_by_friendly_name, /* name */ 0x6008000C, // 0003 GETGBL R2 G12 0x5C0C0200, // 0004 MOVE R3 R1 0x7C080200, // 0005 CALL R2 1 - 0x1C080506, // 0006 EQ R2 R2 K6 + 0x1C08050A, // 0006 EQ R2 R2 K10 0x780A0001, // 0007 JMPF R2 #000A 0x4C080000, // 0008 LDNIL R2 0x80040400, // 0009 RET 1 R2 - 0x58080006, // 000A LDCONST R2 K6 + 0x5808000A, // 000A LDCONST R2 K10 0x600C000C, // 000B GETGBL R3 G12 - 0x88100112, // 000C GETMBR R4 R0 K18 + 0x8810010B, // 000C GETMBR R4 R0 K11 0x7C0C0200, // 000D CALL R3 1 0x140C0403, // 000E LT R3 R2 R3 0x780E0010, // 000F JMPF R3 #0021 - 0x880C0112, // 0010 GETMBR R3 R0 K18 + 0x880C010B, // 0010 GETMBR R3 R0 K11 0x940C0602, // 0011 GETIDX R3 R3 R2 - 0x8C100713, // 0012 GETMET R4 R3 K19 + 0x8C100724, // 0012 GETMET R4 R3 K36 0x7C100200, // 0013 CALL R4 1 0x4C140000, // 0014 LDNIL R5 0x20140805, // 0015 NE R5 R4 R5 @@ -437,12 +437,12 @@ be_local_closure(class_Matter_Device_find_plugin_by_friendly_name, /* name */ 0x6014000C, // 0017 GETGBL R5 G12 0x5C180800, // 0018 MOVE R6 R4 0x7C140200, // 0019 CALL R5 1 - 0x24140B06, // 001A GT R5 R5 K6 + 0x24140B0A, // 001A GT R5 R5 K10 0x78160002, // 001B JMPF R5 #001F 0x1C140801, // 001C EQ R5 R4 R1 0x78160000, // 001D JMPF R5 #001F 0x80040600, // 001E RET 1 R3 - 0x00080514, // 001F ADD R2 R2 K20 + 0x00080521, // 001F ADD R2 R2 K33 0x7001FFE9, // 0020 JMP #000B 0x4C0C0000, // 0021 LDNIL R3 0x80040600, // 0022 RET 1 R3 @@ -452,36 +452,6 @@ be_local_closure(class_Matter_Device_find_plugin_by_friendly_name, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: get_plugin_remote_info -********************************************************************/ -be_local_closure(class_Matter_Device_get_plugin_remote_info, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(get_plugin_remote_info), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080115, // 0000 GETMBR R2 R0 K21 - 0x8C080516, // 0001 GETMET R2 R2 K22 - 0x5C100200, // 0002 MOVE R4 R1 - 0x60140013, // 0003 GETGBL R5 G19 - 0x7C140000, // 0004 CALL R5 0 - 0x7C080600, // 0005 CALL R2 3 - 0x80040400, // 0006 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: remove_fabric ********************************************************************/ @@ -502,34 +472,34 @@ be_local_closure(class_Matter_Device_remove_fabric, /* name */ 0x4C080000, // 0000 LDNIL R2 0x20080202, // 0001 NE R2 R1 R2 0x780A0019, // 0002 JMPF R2 #001D - 0xB80A2E00, // 0003 GETNGBL R2 K23 - 0x8C0C0319, // 0004 GETMET R3 R1 K25 + 0xB80A4A00, // 0003 GETNGBL R2 K37 + 0x8C0C0327, // 0004 GETMET R3 R1 K39 0x7C0C0200, // 0005 CALL R3 1 - 0x8C0C071A, // 0006 GETMET R3 R3 K26 + 0x8C0C0728, // 0006 GETMET R3 R3 K40 0x7C0C0200, // 0007 CALL R3 1 - 0x8C0C071B, // 0008 GETMET R3 R3 K27 + 0x8C0C0729, // 0008 GETMET R3 R3 K41 0x7C0C0200, // 0009 CALL R3 1 - 0x8C0C071C, // 000A GETMET R3 R3 K28 + 0x8C0C072A, // 000A GETMET R3 R3 K42 0x7C0C0200, // 000B CALL R3 1 - 0x000E3003, // 000C ADD R3 K24 R3 - 0x5810001D, // 000D LDCONST R4 K29 + 0x000E4C03, // 000C ADD R3 K38 R3 + 0x58100022, // 000D LDCONST R4 K34 0x7C080400, // 000E CALL R2 2 - 0x88080102, // 000F GETMBR R2 R0 K2 - 0x8808051E, // 0010 GETMBR R2 R2 K30 - 0x8808051F, // 0011 GETMBR R2 R2 K31 - 0x8C080520, // 0012 GETMET R2 R2 K32 + 0x88080118, // 000F GETMBR R2 R0 K24 + 0x8808052B, // 0010 GETMBR R2 R2 K43 + 0x8808052C, // 0011 GETMBR R2 R2 K44 + 0x8C08052D, // 0012 GETMET R2 R2 K45 0x5C100200, // 0013 MOVE R4 R1 0x7C080400, // 0014 CALL R2 2 - 0x88080109, // 0015 GETMBR R2 R0 K9 - 0x8C080521, // 0016 GETMET R2 R2 K33 + 0x88080112, // 0015 GETMBR R2 R0 K18 + 0x8C08052E, // 0016 GETMET R2 R2 K46 0x5C100200, // 0017 MOVE R4 R1 0x7C080400, // 0018 CALL R2 2 - 0x88080104, // 0019 GETMBR R2 R0 K4 - 0x8C080522, // 001A GETMET R2 R2 K34 + 0x88080115, // 0019 GETMBR R2 R0 K21 + 0x8C08052F, // 001A GETMET R2 R2 K47 0x5C100200, // 001B MOVE R4 R1 0x7C080400, // 001C CALL R2 2 - 0x88080104, // 001D GETMBR R2 R0 K4 - 0x8C080523, // 001E GETMET R2 R2 K35 + 0x88080115, // 001D GETMBR R2 R0 K21 + 0x8C080530, // 001E GETMET R2 R2 K48 0x7C080200, // 001F CALL R2 1 0x80000000, // 0020 RET 0 }) @@ -539,263 +509,12 @@ be_local_closure(class_Matter_Device_remove_fabric, /* name */ /******************************************************************** -** Solidified function: resolve_attribute_read_solo +** Solidified function: msg_received ********************************************************************/ -be_local_closure(class_Matter_Device_resolve_attribute_read_solo, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(resolve_attribute_read_solo), - &be_const_str_solidified, - ( &(const binstruction[47]) { /* code */ - 0x88080324, // 0000 GETMBR R2 R1 K36 - 0x880C0325, // 0001 GETMBR R3 R1 K37 - 0x88100326, // 0002 GETMBR R4 R1 K38 - 0x4C140000, // 0003 LDNIL R5 - 0x1C140405, // 0004 EQ R5 R2 R5 - 0x74160005, // 0005 JMPT R5 #000C - 0x4C140000, // 0006 LDNIL R5 - 0x1C140605, // 0007 EQ R5 R3 R5 - 0x74160002, // 0008 JMPT R5 #000C - 0x4C140000, // 0009 LDNIL R5 - 0x1C140805, // 000A EQ R5 R4 R5 - 0x78160001, // 000B JMPF R5 #000E - 0x4C140000, // 000C LDNIL R5 - 0x80040A00, // 000D RET 1 R5 - 0x8C140127, // 000E GETMET R5 R0 K39 - 0x5C1C0400, // 000F MOVE R7 R2 - 0x7C140400, // 0010 CALL R5 2 - 0x4C180000, // 0011 LDNIL R6 - 0x1C180A06, // 0012 EQ R6 R5 R6 - 0x781A0005, // 0013 JMPF R6 #001A - 0xB81A5200, // 0014 GETNGBL R6 K41 - 0x88180D2A, // 0015 GETMBR R6 R6 K42 - 0x90065006, // 0016 SETMBR R1 K40 R6 - 0x4C180000, // 0017 LDNIL R6 - 0x80040C00, // 0018 RET 1 R6 - 0x70020013, // 0019 JMP #002E - 0x8C180B2B, // 001A GETMET R6 R5 K43 - 0x5C200600, // 001B MOVE R8 R3 - 0x7C180400, // 001C CALL R6 2 - 0x741A0005, // 001D JMPT R6 #0024 - 0xB81A5200, // 001E GETNGBL R6 K41 - 0x88180D2C, // 001F GETMBR R6 R6 K44 - 0x90065006, // 0020 SETMBR R1 K40 R6 - 0x4C180000, // 0021 LDNIL R6 - 0x80040C00, // 0022 RET 1 R6 - 0x70020009, // 0023 JMP #002E - 0x8C180B2D, // 0024 GETMET R6 R5 K45 - 0x5C200600, // 0025 MOVE R8 R3 - 0x5C240800, // 0026 MOVE R9 R4 - 0x7C180600, // 0027 CALL R6 3 - 0x741A0004, // 0028 JMPT R6 #002E - 0xB81A5200, // 0029 GETNGBL R6 K41 - 0x88180D2E, // 002A GETMBR R6 R6 K46 - 0x90065006, // 002B SETMBR R1 K40 R6 - 0x4C180000, // 002C LDNIL R6 - 0x80040C00, // 002D RET 1 R6 - 0x80040A00, // 002E RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: signal_endpoints_changed -********************************************************************/ -be_local_closure(class_Matter_Device_signal_endpoints_changed, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(signal_endpoints_changed), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C04012F, // 0000 GETMET R1 R0 K47 - 0x580C0006, // 0001 LDCONST R3 K6 - 0x5412001C, // 0002 LDINT R4 29 - 0x58140030, // 0003 LDCONST R5 K48 - 0x50180000, // 0004 LDBOOL R6 0 0 - 0x7C040A00, // 0005 CALL R1 5 - 0x8C04012F, // 0006 GETMET R1 R0 K47 - 0xB80E5200, // 0007 GETNGBL R3 K41 - 0x880C0731, // 0008 GETMBR R3 R3 K49 - 0x5412001C, // 0009 LDINT R4 29 - 0x58140030, // 000A LDCONST R5 K48 - 0x50180000, // 000B LDBOOL R6 0 0 - 0x7C040A00, // 000C CALL R1 5 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: autoconf_device -********************************************************************/ -be_local_closure(class_Matter_Device_autoconf_device, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(autoconf_device), - &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0xA4066400, // 0000 IMPORT R1 K50 - 0x6008000C, // 0001 GETGBL R2 G12 - 0x880C0112, // 0002 GETMBR R3 R0 K18 - 0x7C080200, // 0003 CALL R2 1 - 0x24080506, // 0004 GT R2 R2 K6 - 0x780A0000, // 0005 JMPF R2 #0007 - 0x80000400, // 0006 RET 0 - 0x88080133, // 0007 GETMBR R2 R0 K51 - 0x4C0C0000, // 0008 LDNIL R3 - 0x1C080403, // 0009 EQ R2 R2 R3 - 0x780A0004, // 000A JMPF R2 #0010 - 0xB80A5200, // 000B GETNGBL R2 K41 - 0x8C080534, // 000C GETMET R2 R2 K52 - 0x5C100000, // 000D MOVE R4 R0 - 0x7C080400, // 000E CALL R2 2 - 0x90026602, // 000F SETMBR R0 K51 R2 - 0x88080107, // 0010 GETMBR R2 R0 K7 - 0x740A000F, // 0011 JMPT R2 #0022 - 0x88080133, // 0012 GETMBR R2 R0 K51 - 0x8C080536, // 0013 GETMET R2 R2 K54 - 0x7C080200, // 0014 CALL R2 1 - 0x90026A02, // 0015 SETMBR R0 K53 R2 - 0x60080013, // 0016 GETGBL R2 G19 - 0x7C080000, // 0017 CALL R2 0 - 0x90022A02, // 0018 SETMBR R0 K21 R2 - 0x8C080137, // 0019 GETMET R2 R0 K55 - 0x7C080200, // 001A CALL R2 1 - 0xB80A2E00, // 001B GETNGBL R2 K23 - 0x600C0008, // 001C GETGBL R3 G8 - 0x88100135, // 001D GETMBR R4 R0 K53 - 0x7C0C0200, // 001E CALL R3 1 - 0x000E7003, // 001F ADD R3 K56 R3 - 0x58100030, // 0020 LDCONST R4 K48 - 0x7C080400, // 0021 CALL R2 2 - 0x88080133, // 0022 GETMBR R2 R0 K51 - 0x8C080539, // 0023 GETMET R2 R2 K57 - 0x88100135, // 0024 GETMBR R4 R0 K53 - 0x7C080400, // 0025 CALL R2 2 - 0x88080107, // 0026 GETMBR R2 R0 K7 - 0x740A0008, // 0027 JMPT R2 #0031 - 0x88080104, // 0028 GETMBR R2 R0 K4 - 0x8C080505, // 0029 GETMET R2 R2 K5 - 0x7C080200, // 002A CALL R2 1 - 0x24080506, // 002B GT R2 R2 K6 - 0x780A0003, // 002C JMPF R2 #0031 - 0x50080200, // 002D LDBOOL R2 1 0 - 0x90020E02, // 002E SETMBR R0 K7 R2 - 0x8C080108, // 002F GETMET R2 R0 K8 - 0x7C080200, // 0030 CALL R2 1 - 0x80000000, // 0031 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _trigger_read_sensors -********************************************************************/ -be_local_closure(class_Matter_Device__trigger_read_sensors, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(_trigger_read_sensors), - &be_const_str_solidified, - ( &(const binstruction[48]) { /* code */ - 0xA4066400, // 0000 IMPORT R1 K50 - 0xB80A7400, // 0001 GETNGBL R2 K58 - 0x8C08053B, // 0002 GETMET R2 R2 K59 - 0x7C080200, // 0003 CALL R2 1 - 0xB80E7400, // 0004 GETNGBL R3 K58 - 0x8C0C073C, // 0005 GETMET R3 R3 K60 - 0x58140030, // 0006 LDCONST R5 K48 - 0x7C0C0400, // 0007 CALL R3 2 - 0x780E0006, // 0008 JMPF R3 #0010 - 0xB80E2E00, // 0009 GETNGBL R3 K23 - 0x60100008, // 000A GETGBL R4 G8 - 0x5C140400, // 000B MOVE R5 R2 - 0x7C100200, // 000C CALL R4 1 - 0x00127A04, // 000D ADD R4 K61 R4 - 0x58140030, // 000E LDCONST R5 K48 - 0x7C0C0400, // 000F CALL R3 2 - 0x4C0C0000, // 0010 LDNIL R3 - 0x1C0C0403, // 0011 EQ R3 R2 R3 - 0x780E0000, // 0012 JMPF R3 #0014 - 0x80000600, // 0013 RET 0 - 0x8C0C033E, // 0014 GETMET R3 R1 K62 - 0x5C140400, // 0015 MOVE R5 R2 - 0x7C0C0400, // 0016 CALL R3 2 - 0x4C100000, // 0017 LDNIL R4 - 0x20100604, // 0018 NE R4 R3 R4 - 0x7812000D, // 0019 JMPF R4 #0028 - 0x58100006, // 001A LDCONST R4 K6 - 0x6014000C, // 001B GETGBL R5 G12 - 0x88180112, // 001C GETMBR R6 R0 K18 - 0x7C140200, // 001D CALL R5 1 - 0x14140805, // 001E LT R5 R4 R5 - 0x78160006, // 001F JMPF R5 #0027 - 0x88140112, // 0020 GETMBR R5 R0 K18 - 0x94140A04, // 0021 GETIDX R5 R5 R4 - 0x8C140B3F, // 0022 GETMET R5 R5 K63 - 0x5C1C0600, // 0023 MOVE R7 R3 - 0x7C140400, // 0024 CALL R5 2 - 0x00100914, // 0025 ADD R4 R4 K20 - 0x7001FFF3, // 0026 JMP #001B - 0x70020006, // 0027 JMP #002F - 0xB8122E00, // 0028 GETNGBL R4 K23 - 0x60140008, // 0029 GETGBL R5 G8 - 0x5C180400, // 002A MOVE R6 R2 - 0x7C140200, // 002B CALL R5 1 - 0x00168005, // 002C ADD R5 K64 R5 - 0x58180030, // 002D LDCONST R6 K48 - 0x7C100400, // 002E CALL R4 2 - 0x80000000, // 002F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_active_endpoints -********************************************************************/ -be_local_closure(class_Matter_Device_get_active_endpoints, /* name */ +be_local_closure(class_Matter_Device_msg_received, /* name */ be_nested_proto( 9, /* nstack */ - 2, /* argc */ + 4, /* argc */ 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -803,37 +522,16 @@ be_local_closure(class_Matter_Device_get_active_endpoints, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(get_active_endpoints), + be_str_weak(msg_received), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x88100112, // 0003 GETMBR R4 R0 K18 - 0x7C0C0200, // 0004 CALL R3 1 - 0xA8020011, // 0005 EXBLK 0 #0018 - 0x5C100600, // 0006 MOVE R4 R3 - 0x7C100000, // 0007 CALL R4 0 - 0x8C140941, // 0008 GETMET R5 R4 K65 - 0x7C140200, // 0009 CALL R5 1 - 0x78060002, // 000A JMPF R1 #000E - 0x1C180B06, // 000B EQ R6 R5 K6 - 0x781A0000, // 000C JMPF R6 #000E - 0x7001FFF7, // 000D JMP #0006 - 0x8C180516, // 000E GETMET R6 R2 K22 - 0x5C200A00, // 000F MOVE R8 R5 - 0x7C180400, // 0010 CALL R6 2 - 0x4C1C0000, // 0011 LDNIL R7 - 0x1C180C07, // 0012 EQ R6 R6 R7 - 0x781A0002, // 0013 JMPF R6 #0017 - 0x8C180542, // 0014 GETMET R6 R2 K66 - 0x5C200A00, // 0015 MOVE R8 R5 - 0x7C180400, // 0016 CALL R6 2 - 0x7001FFED, // 0017 JMP #0006 - 0x580C0011, // 0018 LDCONST R3 K17 - 0xAC0C0200, // 0019 CATCH R3 1 0 - 0xB0080000, // 001A RAISE 2 R0 R0 - 0x80040400, // 001B RET 1 R2 + ( &(const binstruction[ 7]) { /* code */ + 0x88100118, // 0000 GETMBR R4 R0 K24 + 0x8C100931, // 0001 GETMET R4 R4 K49 + 0x5C180200, // 0002 MOVE R6 R1 + 0x5C1C0400, // 0003 MOVE R7 R2 + 0x5C200600, // 0004 MOVE R8 R3 + 0x7C100800, // 0005 CALL R4 4 + 0x80040800, // 0006 RET 1 R4 }) ) ); @@ -841,11 +539,11 @@ be_local_closure(class_Matter_Device_get_active_endpoints, /* name */ /******************************************************************** -** Solidified function: msg_send +** Solidified function: get_plugin_remote_info ********************************************************************/ -be_local_closure(class_Matter_Device_msg_send, /* name */ +be_local_closure(class_Matter_Device_get_plugin_remote_info, /* name */ be_nested_proto( - 5, /* nstack */ + 6, /* nstack */ 2, /* argc */ 10, /* varg */ 0, /* has upvals */ @@ -854,128 +552,16 @@ be_local_closure(class_Matter_Device_msg_send, /* name */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(msg_send), + be_str_weak(get_plugin_remote_info), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080543, // 0001 GETMET R2 R2 K67 + ( &(const binstruction[ 7]) { /* code */ + 0x8808010D, // 0000 GETMBR R2 R0 K13 + 0x8C080532, // 0001 GETMET R2 R2 K50 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: stop -********************************************************************/ -be_local_closure(class_Matter_Device_stop, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(stop), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xB8067400, // 0000 GETNGBL R1 K58 - 0x8C040344, // 0001 GETMET R1 R1 K68 - 0x5C0C0000, // 0002 MOVE R3 R0 - 0x7C040400, // 0003 CALL R1 2 - 0x88040100, // 0004 GETMBR R1 R0 K0 - 0x78060002, // 0005 JMPF R1 #0009 - 0x88040100, // 0006 GETMBR R1 R0 K0 - 0x8C040345, // 0007 GETMET R1 R1 K69 - 0x7C040200, // 0008 CALL R1 1 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: adjust_next_ep -********************************************************************/ -be_local_closure(class_Matter_Device_adjust_next_ep, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(adjust_next_ep), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x60040010, // 0000 GETGBL R1 G16 - 0x88080135, // 0001 GETMBR R2 R0 K53 - 0x8C080546, // 0002 GETMET R2 R2 K70 - 0x7C080200, // 0003 CALL R2 1 - 0x7C040200, // 0004 CALL R1 1 - 0xA802000A, // 0005 EXBLK 0 #0011 - 0x5C080200, // 0006 MOVE R2 R1 - 0x7C080000, // 0007 CALL R2 0 - 0x600C0009, // 0008 GETGBL R3 G9 - 0x5C100400, // 0009 MOVE R4 R2 - 0x7C0C0200, // 000A CALL R3 1 - 0x88100147, // 000B GETMBR R4 R0 K71 - 0x28100604, // 000C GE R4 R3 R4 - 0x78120001, // 000D JMPF R4 #0010 - 0x00100714, // 000E ADD R4 R3 K20 - 0x90028E04, // 000F SETMBR R0 K71 R4 - 0x7001FFF4, // 0010 JMP #0006 - 0x58040011, // 0011 LDCONST R1 K17 - 0xAC040200, // 0012 CATCH R1 1 0 - 0xB0080000, // 0013 RAISE 2 R0 R0 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: add_read_sensors_schedule -********************************************************************/ -be_local_closure(class_Matter_Device_add_read_sensors_schedule, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(add_read_sensors_schedule), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x88080148, // 0000 GETMBR R2 R0 K72 - 0x4C0C0000, // 0001 LDNIL R3 - 0x1C080403, // 0002 EQ R2 R2 R3 - 0x740A0002, // 0003 JMPT R2 #0007 - 0x88080148, // 0004 GETMBR R2 R0 K72 - 0x24080401, // 0005 GT R2 R2 R1 - 0x780A0005, // 0006 JMPF R2 #000D - 0x90029001, // 0007 SETMBR R0 K72 R1 - 0xB80A5200, // 0008 GETNGBL R2 K41 - 0x8C08054A, // 0009 GETMET R2 R2 K74 - 0x5C100200, // 000A MOVE R4 R1 - 0x7C080400, // 000B CALL R2 2 - 0x90029202, // 000C SETMBR R0 K73 R2 - 0x80000000, // 000D RET 0 + 0x60140013, // 0003 GETGBL R5 G19 + 0x7C140000, // 0004 CALL R5 0 + 0x7C080600, // 0005 CALL R2 3 + 0x80040400, // 0006 RET 1 R2 }) ) ); @@ -1013,17 +599,17 @@ be_local_closure(class_Matter_Device_button_pressed, /* name */ 0x3C180406, // 000B SHR R6 R2 R6 0x541E00FE, // 000C LDINT R7 255 0x2C180C07, // 000D AND R6 R6 R7 - 0x8C1C014B, // 000E GETMET R7 R0 K75 - 0x00240B14, // 000F ADD R9 R5 K20 + 0x8C1C0120, // 000E GETMET R7 R0 K32 + 0x00240B21, // 000F ADD R9 R5 K33 0x20280604, // 0010 NE R10 R3 R4 0x782A0001, // 0011 JMPF R10 #0014 - 0x58280014, // 0012 LDCONST R10 K20 + 0x58280021, // 0012 LDCONST R10 K33 0x70020000, // 0013 JMP #0015 - 0x58280006, // 0014 LDCONST R10 K6 + 0x5828000A, // 0014 LDCONST R10 K10 0x780E0001, // 0015 JMPF R3 #0018 - 0x582C0006, // 0016 LDCONST R11 K6 + 0x582C000A, // 0016 LDCONST R11 K10 0x70020000, // 0017 JMP #0019 - 0x582C0014, // 0018 LDCONST R11 K20 + 0x582C0021, // 0018 LDCONST R11 K33 0x5C300C00, // 0019 MOVE R12 R6 0x7C1C0A00, // 001A CALL R7 5 0x80000000, // 001B RET 0 @@ -1033,1330 +619,6 @@ be_local_closure(class_Matter_Device_button_pressed, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: start -********************************************************************/ -be_local_closure(class_Matter_Device_start, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(start), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8804014C, // 0000 GETMBR R1 R0 K76 - 0x78060000, // 0001 JMPF R1 #0003 - 0x80000200, // 0002 RET 0 - 0x8C04014D, // 0003 GETMET R1 R0 K77 - 0x7C040200, // 0004 CALL R1 1 - 0x8C04014E, // 0005 GETMET R1 R0 K78 - 0x880C014F, // 0006 GETMBR R3 R0 K79 - 0x7C040400, // 0007 CALL R1 2 - 0x88040109, // 0008 GETMBR R1 R0 K9 - 0x8C040350, // 0009 GETMET R1 R1 K80 - 0x7C040200, // 000A CALL R1 1 - 0x50040200, // 000B LDBOOL R1 1 0 - 0x90029801, // 000C SETMBR R0 K76 R1 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_plugin_class_displayname -********************************************************************/ -be_local_closure(class_Matter_Device_get_plugin_class_displayname, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(get_plugin_class_displayname), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080151, // 0000 GETMBR R2 R0 K81 - 0x8C080516, // 0001 GETMET R2 R2 K22 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x780A0001, // 0004 JMPF R2 #0007 - 0x880C0552, // 0005 GETMBR R3 R2 K82 - 0x70020000, // 0006 JMP #0008 - 0x580C000D, // 0007 LDCONST R3 K13 - 0x80040600, // 0008 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: find_plugin_by_endpoint -********************************************************************/ -be_local_closure(class_Matter_Device_find_plugin_by_endpoint, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(find_plugin_by_endpoint), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x58080006, // 0000 LDCONST R2 K6 - 0x600C000C, // 0001 GETGBL R3 G12 - 0x88100112, // 0002 GETMBR R4 R0 K18 - 0x7C0C0200, // 0003 CALL R3 1 - 0x140C0403, // 0004 LT R3 R2 R3 - 0x780E0008, // 0005 JMPF R3 #000F - 0x880C0112, // 0006 GETMBR R3 R0 K18 - 0x940C0602, // 0007 GETIDX R3 R3 R2 - 0x8C100741, // 0008 GETMET R4 R3 K65 - 0x7C100200, // 0009 CALL R4 1 - 0x1C100801, // 000A EQ R4 R4 R1 - 0x78120000, // 000B JMPF R4 #000D - 0x80040600, // 000C RET 1 R3 - 0x00080514, // 000D ADD R2 R2 K20 - 0x7001FFF1, // 000E JMP #0001 - 0x4C0C0000, // 000F LDNIL R3 - 0x80040600, // 0010 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: sort_distinct -********************************************************************/ -be_local_closure(class_Matter_Device_sort_distinct, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 12, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(sort_distinct), - &be_const_str_solidified, - ( &(const binstruction[53]) { /* code */ - 0x5804000C, // 0000 LDCONST R1 K12 - 0x60080010, // 0001 GETGBL R2 G16 - 0x600C000C, // 0002 GETGBL R3 G12 - 0x5C100000, // 0003 MOVE R4 R0 - 0x7C0C0200, // 0004 CALL R3 1 - 0x040C0714, // 0005 SUB R3 R3 K20 - 0x400E2803, // 0006 CONNECT R3 K20 R3 - 0x7C080200, // 0007 CALL R2 1 - 0xA8020010, // 0008 EXBLK 0 #001A - 0x5C0C0400, // 0009 MOVE R3 R2 - 0x7C0C0000, // 000A CALL R3 0 - 0x94100003, // 000B GETIDX R4 R0 R3 - 0x5C140600, // 000C MOVE R5 R3 - 0x24180B06, // 000D GT R6 R5 K6 - 0x781A0008, // 000E JMPF R6 #0018 - 0x04180B14, // 000F SUB R6 R5 K20 - 0x94180006, // 0010 GETIDX R6 R0 R6 - 0x24180C04, // 0011 GT R6 R6 R4 - 0x781A0004, // 0012 JMPF R6 #0018 - 0x04180B14, // 0013 SUB R6 R5 K20 - 0x94180006, // 0014 GETIDX R6 R0 R6 - 0x98000A06, // 0015 SETIDX R0 R5 R6 - 0x04140B14, // 0016 SUB R5 R5 K20 - 0x7001FFF4, // 0017 JMP #000D - 0x98000A04, // 0018 SETIDX R0 R5 R4 - 0x7001FFEE, // 0019 JMP #0009 - 0x58080011, // 001A LDCONST R2 K17 - 0xAC080200, // 001B CATCH R2 1 0 - 0xB0080000, // 001C RAISE 2 R0 R0 - 0x58080014, // 001D LDCONST R2 K20 - 0x600C000C, // 001E GETGBL R3 G12 - 0x5C100000, // 001F MOVE R4 R0 - 0x7C0C0200, // 0020 CALL R3 1 - 0x180C0714, // 0021 LE R3 R3 K20 - 0x780E0000, // 0022 JMPF R3 #0024 - 0x80040000, // 0023 RET 1 R0 - 0x940C0106, // 0024 GETIDX R3 R0 K6 - 0x6010000C, // 0025 GETGBL R4 G12 - 0x5C140000, // 0026 MOVE R5 R0 - 0x7C100200, // 0027 CALL R4 1 - 0x14100404, // 0028 LT R4 R2 R4 - 0x78120009, // 0029 JMPF R4 #0034 - 0x94100002, // 002A GETIDX R4 R0 R2 - 0x1C100803, // 002B EQ R4 R4 R3 - 0x78120003, // 002C JMPF R4 #0031 - 0x8C100153, // 002D GETMET R4 R0 K83 - 0x5C180400, // 002E MOVE R6 R2 - 0x7C100400, // 002F CALL R4 2 - 0x70020001, // 0030 JMP #0033 - 0x940C0002, // 0031 GETIDX R3 R0 R2 - 0x00080514, // 0032 ADD R2 R2 K20 - 0x7001FFF0, // 0033 JMP #0025 - 0x80040000, // 0034 RET 1 R0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: check_config_ep -********************************************************************/ -be_local_closure(class_Matter_Device_check_config_ep, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(check_config_ep), - &be_const_str_solidified, - ( &(const binstruction[77]) { /* code */ - 0x50040000, // 0000 LDBOOL R1 0 0 - 0x60080012, // 0001 GETGBL R2 G18 - 0x7C080000, // 0002 CALL R2 0 - 0x600C0010, // 0003 GETGBL R3 G16 - 0x88100135, // 0004 GETMBR R4 R0 K53 - 0x8C100946, // 0005 GETMET R4 R4 K70 - 0x7C100200, // 0006 CALL R4 1 - 0x7C0C0200, // 0007 CALL R3 1 - 0xA8020007, // 0008 EXBLK 0 #0011 - 0x5C100600, // 0009 MOVE R4 R3 - 0x7C100000, // 000A CALL R4 0 - 0x8C140542, // 000B GETMET R5 R2 K66 - 0x601C0009, // 000C GETGBL R7 G9 - 0x5C200800, // 000D MOVE R8 R4 - 0x7C1C0200, // 000E CALL R7 1 - 0x7C140400, // 000F CALL R5 2 - 0x7001FFF7, // 0010 JMP #0009 - 0x580C0011, // 0011 LDCONST R3 K17 - 0xAC0C0200, // 0012 CATCH R3 1 0 - 0xB0080000, // 0013 RAISE 2 R0 R0 - 0x600C0010, // 0014 GETGBL R3 G16 - 0x5C100400, // 0015 MOVE R4 R2 - 0x7C0C0200, // 0016 CALL R3 1 - 0xA8020030, // 0017 EXBLK 0 #0049 - 0x5C100600, // 0018 MOVE R4 R3 - 0x7C100000, // 0019 CALL R4 0 - 0x1C140906, // 001A EQ R5 R4 K6 - 0x7816000B, // 001B JMPF R5 #0028 - 0xB8162E00, // 001C GETNGBL R5 K23 - 0x58180054, // 001D LDCONST R6 K84 - 0x581C001D, // 001E LDCONST R7 K29 - 0x7C140400, // 001F CALL R5 2 - 0x88140135, // 0020 GETMBR R5 R0 K53 - 0x8C140B53, // 0021 GETMET R5 R5 K83 - 0x601C0008, // 0022 GETGBL R7 G8 - 0x5C200800, // 0023 MOVE R8 R4 - 0x7C1C0200, // 0024 CALL R7 1 - 0x7C140400, // 0025 CALL R5 2 - 0x50040200, // 0026 LDBOOL R1 1 0 - 0x7002001F, // 0027 JMP #0048 - 0xB8165200, // 0028 GETNGBL R5 K41 - 0x88140B31, // 0029 GETMBR R5 R5 K49 - 0x1C140805, // 002A EQ R5 R4 R5 - 0x7816001B, // 002B JMPF R5 #0048 - 0x50040200, // 002C LDBOOL R1 1 0 - 0xB8162E00, // 002D GETNGBL R5 K23 - 0x60180018, // 002E GETGBL R6 G24 - 0x581C0055, // 002F LDCONST R7 K85 - 0x5C200800, // 0030 MOVE R8 R4 - 0x88240147, // 0031 GETMBR R9 R0 K71 - 0x7C180600, // 0032 CALL R6 3 - 0x581C001D, // 0033 LDCONST R7 K29 - 0x7C140400, // 0034 CALL R5 2 - 0x60140008, // 0035 GETGBL R5 G8 - 0x88180147, // 0036 GETMBR R6 R0 K71 - 0x7C140200, // 0037 CALL R5 1 - 0x88180135, // 0038 GETMBR R6 R0 K53 - 0x601C0008, // 0039 GETGBL R7 G8 - 0x5C200800, // 003A MOVE R8 R4 - 0x7C1C0200, // 003B CALL R7 1 - 0x88200135, // 003C GETMBR R8 R0 K53 - 0x941C1007, // 003D GETIDX R7 R8 R7 - 0x98180A07, // 003E SETIDX R6 R5 R7 - 0x88140135, // 003F GETMBR R5 R0 K53 - 0x8C140B53, // 0040 GETMET R5 R5 K83 - 0x601C0008, // 0041 GETGBL R7 G8 - 0x5C200800, // 0042 MOVE R8 R4 - 0x7C1C0200, // 0043 CALL R7 1 - 0x7C140400, // 0044 CALL R5 2 - 0x88140147, // 0045 GETMBR R5 R0 K71 - 0x00140B14, // 0046 ADD R5 R5 K20 - 0x90028E05, // 0047 SETMBR R0 K71 R5 - 0x7001FFCE, // 0048 JMP #0018 - 0x580C0011, // 0049 LDCONST R3 K17 - 0xAC0C0200, // 004A CATCH R3 1 0 - 0xB0080000, // 004B RAISE 2 R0 R0 - 0x80040200, // 004C RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: button_handler -********************************************************************/ -be_local_closure(class_Matter_Device_button_handler, /* name */ - be_nested_proto( - 14, /* nstack */ - 5, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(button_handler), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x58140006, // 0000 LDCONST R5 K6 - 0xA41AAC00, // 0001 IMPORT R6 K86 - 0x601C000C, // 0002 GETGBL R7 G12 - 0x88200112, // 0003 GETMBR R8 R0 K18 - 0x7C1C0200, // 0004 CALL R7 1 - 0x141C0A07, // 0005 LT R7 R5 R7 - 0x781E0010, // 0006 JMPF R7 #0018 - 0x881C0112, // 0007 GETMBR R7 R0 K18 - 0x941C0E05, // 0008 GETIDX R7 R7 R5 - 0x8C200D57, // 0009 GETMET R8 R6 K87 - 0x5C280E00, // 000A MOVE R10 R7 - 0x582C004B, // 000B LDCONST R11 K75 - 0x7C200600, // 000C CALL R8 3 - 0x78220007, // 000D JMPF R8 #0016 - 0x88200112, // 000E GETMBR R8 R0 K18 - 0x94201005, // 000F GETIDX R8 R8 R5 - 0x8C20114B, // 0010 GETMET R8 R8 K75 - 0x5C280200, // 0011 MOVE R10 R1 - 0x5C2C0400, // 0012 MOVE R11 R2 - 0x5C300600, // 0013 MOVE R12 R3 - 0x5C340800, // 0014 MOVE R13 R4 - 0x7C200A00, // 0015 CALL R8 5 - 0x00140B14, // 0016 ADD R5 R5 K20 - 0x7001FFE9, // 0017 JMP #0002 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(class_Matter_Device_init, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(start), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Wifi_X23Connected), - /* K4 */ be_nested_str_weak(matter_start), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0xB8020200, // 0003 GETNGBL R0 K1 - 0x8C000102, // 0004 GETMET R0 R0 K2 - 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0004, // 0006 LDCONST R3 K4 - 0x7C000600, // 0007 CALL R0 3 - 0x80000000, // 0008 RET 0 - }) - ), - be_nested_proto( - 4, /* nstack */ - 0, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(start), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(remove_rule), - /* K3 */ be_nested_str_weak(Eth_X23Connected), - /* K4 */ be_nested_str_weak(matter_start), - }), - be_str_weak(_anonymous_), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x68000000, // 0000 GETUPV R0 U0 - 0x8C000100, // 0001 GETMET R0 R0 K0 - 0x7C000200, // 0002 CALL R0 1 - 0xB8020200, // 0003 GETNGBL R0 K1 - 0x8C000102, // 0004 GETMET R0 R0 K2 - 0x58080003, // 0005 LDCONST R2 K3 - 0x580C0004, // 0006 LDCONST R3 K4 - 0x7C000600, // 0007 CALL R0 3 - 0x80000000, // 0008 RET 0 - }) - ), - }), - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[109]) { /* code */ - 0xA406B000, // 0000 IMPORT R1 K88 - 0xB80A7400, // 0001 GETNGBL R2 K58 - 0x8C080559, // 0002 GETMET R2 R2 K89 - 0xB8125200, // 0003 GETNGBL R4 K41 - 0x8810095A, // 0004 GETMBR R4 R4 K90 - 0x7C080400, // 0005 CALL R2 2 - 0x740A0004, // 0006 JMPT R2 #000C - 0xB80A5200, // 0007 GETNGBL R2 K41 - 0x8C08055B, // 0008 GETMET R2 R2 K91 - 0x5C100000, // 0009 MOVE R4 R0 - 0x7C080400, // 000A CALL R2 2 - 0x80000400, // 000B RET 0 - 0xB80A5200, // 000C GETNGBL R2 K41 - 0xB80E5200, // 000D GETNGBL R3 K41 - 0x8C0C075D, // 000E GETMET R3 R3 K93 - 0x7C0C0200, // 000F CALL R3 1 - 0x900AB803, // 0010 SETMBR R2 K92 R3 - 0x50080000, // 0011 LDBOOL R2 0 0 - 0x90029802, // 0012 SETMBR R0 K76 R2 - 0x9002BD06, // 0013 SETMBR R0 K94 K6 - 0x60080012, // 0014 GETGBL R2 G18 - 0x7C080000, // 0015 CALL R2 0 - 0x90022402, // 0016 SETMBR R0 K18 R2 - 0x50080000, // 0017 LDBOOL R2 0 0 - 0x90020E02, // 0018 SETMBR R0 K7 R2 - 0x60080013, // 0019 GETGBL R2 G19 - 0x7C080000, // 001A CALL R2 0 - 0x90022A02, // 001B SETMBR R0 K21 R2 - 0x8808015F, // 001C GETMBR R2 R0 K95 - 0x90028E02, // 001D SETMBR R0 K71 R2 - 0x50080000, // 001E LDBOOL R2 0 0 - 0x9002C002, // 001F SETMBR R0 K96 R2 - 0x50080000, // 0020 LDBOOL R2 0 0 - 0x9002C202, // 0021 SETMBR R0 K97 R2 - 0xB80A5200, // 0022 GETNGBL R2 K41 - 0x8C080562, // 0023 GETMET R2 R2 K98 - 0x5C100000, // 0024 MOVE R4 R0 - 0x7C080400, // 0025 CALL R2 2 - 0x90021202, // 0026 SETMBR R0 K9 R2 - 0x8C080163, // 0027 GETMET R2 R0 K99 - 0x7C080200, // 0028 CALL R2 1 - 0xB80A5200, // 0029 GETNGBL R2 K41 - 0x8C080564, // 002A GETMET R2 R2 K100 - 0x5C100000, // 002B MOVE R4 R0 - 0x7C080400, // 002C CALL R2 2 - 0x90020802, // 002D SETMBR R0 K4 R2 - 0x88080104, // 002E GETMBR R2 R0 K4 - 0x8C080565, // 002F GETMET R2 R2 K101 - 0x7C080200, // 0030 CALL R2 1 - 0xB80A5200, // 0031 GETNGBL R2 K41 - 0x8C080566, // 0032 GETMET R2 R2 K102 - 0x5C100000, // 0033 MOVE R4 R0 - 0x7C080400, // 0034 CALL R2 2 - 0x90020402, // 0035 SETMBR R0 K2 R2 - 0xB80A5200, // 0036 GETNGBL R2 K41 - 0x8C080568, // 0037 GETMET R2 R2 K104 - 0x5C100000, // 0038 MOVE R4 R0 - 0x7C080400, // 0039 CALL R2 2 - 0x9002CE02, // 003A SETMBR R0 K103 R2 - 0xB80A5200, // 003B GETNGBL R2 K41 - 0x8C08055B, // 003C GETMET R2 R2 K91 - 0x5C100000, // 003D MOVE R4 R0 - 0x7C080400, // 003E CALL R2 2 - 0x9002D202, // 003F SETMBR R0 K105 R2 - 0xB80A7400, // 0040 GETNGBL R2 K58 - 0x8C08056A, // 0041 GETMET R2 R2 K106 - 0x7C080200, // 0042 CALL R2 1 - 0x9408056B, // 0043 GETIDX R2 R2 K107 - 0x740A0004, // 0044 JMPT R2 #004A - 0xB80A7400, // 0045 GETNGBL R2 K58 - 0x8C08056C, // 0046 GETMET R2 R2 K108 - 0x7C080200, // 0047 CALL R2 1 - 0x9408056B, // 0048 GETIDX R2 R2 K107 - 0x780A0001, // 0049 JMPF R2 #004C - 0x8C08016D, // 004A GETMET R2 R0 K109 - 0x7C080200, // 004B CALL R2 1 - 0xB80A7400, // 004C GETNGBL R2 K58 - 0x8C08056A, // 004D GETMET R2 R2 K106 - 0x7C080200, // 004E CALL R2 1 - 0x9408056B, // 004F GETIDX R2 R2 K107 - 0x740A0005, // 0050 JMPT R2 #0057 - 0xB80A7400, // 0051 GETNGBL R2 K58 - 0x8C08056E, // 0052 GETMET R2 R2 K110 - 0x5810006F, // 0053 LDCONST R4 K111 - 0x84140000, // 0054 CLOSURE R5 P0 - 0x58180070, // 0055 LDCONST R6 K112 - 0x7C080800, // 0056 CALL R2 4 - 0xB80A7400, // 0057 GETNGBL R2 K58 - 0x8C08056C, // 0058 GETMET R2 R2 K108 - 0x7C080200, // 0059 CALL R2 1 - 0x9408056B, // 005A GETIDX R2 R2 K107 - 0x740A0005, // 005B JMPT R2 #0062 - 0xB80A7400, // 005C GETNGBL R2 K58 - 0x8C08056E, // 005D GETMET R2 R2 K110 - 0x58100071, // 005E LDCONST R4 K113 - 0x84140001, // 005F CLOSURE R5 P1 - 0x58180070, // 0060 LDCONST R6 K112 - 0x7C080800, // 0061 CALL R2 4 - 0x88080109, // 0062 GETMBR R2 R0 K9 - 0x8C080572, // 0063 GETMET R2 R2 K114 - 0x7C080200, // 0064 CALL R2 1 - 0xB80A7400, // 0065 GETNGBL R2 K58 - 0x8C080573, // 0066 GETMET R2 R2 K115 - 0x5C100000, // 0067 MOVE R4 R0 - 0x7C080400, // 0068 CALL R2 2 - 0x8C080174, // 0069 GETMET R2 R0 K116 - 0x7C080200, // 006A CALL R2 1 - 0xA0000000, // 006B CLOSE R0 - 0x80000000, // 006C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_second -********************************************************************/ -be_local_closure(class_Matter_Device_every_second, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(every_second), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88040104, // 0000 GETMBR R1 R0 K4 - 0x8C040375, // 0001 GETMET R1 R1 K117 - 0x7C040200, // 0002 CALL R1 1 - 0x88040102, // 0003 GETMBR R1 R0 K2 - 0x8C040375, // 0004 GETMET R1 R1 K117 - 0x7C040200, // 0005 CALL R1 1 - 0x88040167, // 0006 GETMBR R1 R0 K103 - 0x8C040375, // 0007 GETMET R1 R1 K117 - 0x7C040200, // 0008 CALL R1 1 - 0x88040109, // 0009 GETMBR R1 R0 K9 - 0x8C040375, // 000A GETMET R1 R1 K117 - 0x7C040200, // 000B CALL R1 1 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: k2l_num -********************************************************************/ -be_local_closure(class_Matter_Device_k2l_num, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 12, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(k2l_num), - &be_const_str_solidified, - ( &(const binstruction[52]) { /* code */ - 0x5804000C, // 0000 LDCONST R1 K12 - 0x60080012, // 0001 GETGBL R2 G18 - 0x7C080000, // 0002 CALL R2 0 - 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0003, // 0004 EQ R3 R0 R3 - 0x780E0000, // 0005 JMPF R3 #0007 - 0x80040400, // 0006 RET 1 R2 - 0x600C0010, // 0007 GETGBL R3 G16 - 0x8C100146, // 0008 GETMET R4 R0 K70 - 0x7C100200, // 0009 CALL R4 1 - 0x7C0C0200, // 000A CALL R3 1 - 0xA8020007, // 000B EXBLK 0 #0014 - 0x5C100600, // 000C MOVE R4 R3 - 0x7C100000, // 000D CALL R4 0 - 0x8C140542, // 000E GETMET R5 R2 K66 - 0x601C0009, // 000F GETGBL R7 G9 - 0x5C200800, // 0010 MOVE R8 R4 - 0x7C1C0200, // 0011 CALL R7 1 - 0x7C140400, // 0012 CALL R5 2 - 0x7001FFF7, // 0013 JMP #000C - 0x580C0011, // 0014 LDCONST R3 K17 - 0xAC0C0200, // 0015 CATCH R3 1 0 - 0xB0080000, // 0016 RAISE 2 R0 R0 - 0x600C0010, // 0017 GETGBL R3 G16 - 0x6010000C, // 0018 GETGBL R4 G12 - 0x5C140400, // 0019 MOVE R5 R2 - 0x7C100200, // 001A CALL R4 1 - 0x04100914, // 001B SUB R4 R4 K20 - 0x40122804, // 001C CONNECT R4 K20 R4 - 0x7C0C0200, // 001D CALL R3 1 - 0xA8020010, // 001E EXBLK 0 #0030 - 0x5C100600, // 001F MOVE R4 R3 - 0x7C100000, // 0020 CALL R4 0 - 0x94140404, // 0021 GETIDX R5 R2 R4 - 0x5C180800, // 0022 MOVE R6 R4 - 0x241C0D06, // 0023 GT R7 R6 K6 - 0x781E0008, // 0024 JMPF R7 #002E - 0x041C0D14, // 0025 SUB R7 R6 K20 - 0x941C0407, // 0026 GETIDX R7 R2 R7 - 0x241C0E05, // 0027 GT R7 R7 R5 - 0x781E0004, // 0028 JMPF R7 #002E - 0x041C0D14, // 0029 SUB R7 R6 K20 - 0x941C0407, // 002A GETIDX R7 R2 R7 - 0x98080C07, // 002B SETIDX R2 R6 R7 - 0x04180D14, // 002C SUB R6 R6 K20 - 0x7001FFF4, // 002D JMP #0023 - 0x98080C05, // 002E SETIDX R2 R6 R5 - 0x7001FFEE, // 002F JMP #001F - 0x580C0011, // 0030 LDCONST R3 K17 - 0xAC0C0200, // 0031 CATCH R3 1 0 - 0xB0080000, // 0032 RAISE 2 R0 R0 - 0x80040400, // 0033 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: clean_remotes -********************************************************************/ -be_local_closure(class_Matter_Device_clean_remotes, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(clean_remotes), - &be_const_str_solidified, - ( &(const binstruction[80]) { /* code */ - 0xA406AC00, // 0000 IMPORT R1 K86 - 0x88080176, // 0001 GETMBR R2 R0 K118 - 0x780A004B, // 0002 JMPF R2 #004F - 0x60080013, // 0003 GETGBL R2 G19 - 0x7C080000, // 0004 CALL R2 0 - 0x600C0010, // 0005 GETGBL R3 G16 - 0x88100176, // 0006 GETMBR R4 R0 K118 - 0x7C0C0200, // 0007 CALL R3 1 - 0xA8020003, // 0008 EXBLK 0 #000D - 0x5C100600, // 0009 MOVE R4 R3 - 0x7C100000, // 000A CALL R4 0 - 0x98080906, // 000B SETIDX R2 R4 K6 - 0x7001FFFB, // 000C JMP #0009 - 0x580C0011, // 000D LDCONST R3 K17 - 0xAC0C0200, // 000E CATCH R3 1 0 - 0xB0080000, // 000F RAISE 2 R0 R0 - 0x600C0010, // 0010 GETGBL R3 G16 - 0x88100112, // 0011 GETMBR R4 R0 K18 - 0x7C0C0200, // 0012 CALL R3 1 - 0xA802000F, // 0013 EXBLK 0 #0024 - 0x5C100600, // 0014 MOVE R4 R3 - 0x7C100000, // 0015 CALL R4 0 - 0x8C140377, // 0016 GETMET R5 R1 K119 - 0x5C1C0800, // 0017 MOVE R7 R4 - 0x58200078, // 0018 LDCONST R8 K120 - 0x7C140600, // 0019 CALL R5 3 - 0x4C180000, // 001A LDNIL R6 - 0x20180A06, // 001B NE R6 R5 R6 - 0x781A0005, // 001C JMPF R6 #0023 - 0x8C180516, // 001D GETMET R6 R2 K22 - 0x5C200A00, // 001E MOVE R8 R5 - 0x58240006, // 001F LDCONST R9 K6 - 0x7C180600, // 0020 CALL R6 3 - 0x00180D14, // 0021 ADD R6 R6 K20 - 0x98080A06, // 0022 SETIDX R2 R5 R6 - 0x7001FFEF, // 0023 JMP #0014 - 0x580C0011, // 0024 LDCONST R3 K17 - 0xAC0C0200, // 0025 CATCH R3 1 0 - 0xB0080000, // 0026 RAISE 2 R0 R0 - 0x600C0012, // 0027 GETGBL R3 G18 - 0x7C0C0000, // 0028 CALL R3 0 - 0x60100010, // 0029 GETGBL R4 G16 - 0x8C140546, // 002A GETMET R5 R2 K70 - 0x7C140200, // 002B CALL R5 1 - 0x7C100200, // 002C CALL R4 1 - 0xA8020008, // 002D EXBLK 0 #0037 - 0x5C140800, // 002E MOVE R5 R4 - 0x7C140000, // 002F CALL R5 0 - 0x94180405, // 0030 GETIDX R6 R2 R5 - 0x1C180D06, // 0031 EQ R6 R6 K6 - 0x781A0002, // 0032 JMPF R6 #0036 - 0x8C180742, // 0033 GETMET R6 R3 K66 - 0x5C200A00, // 0034 MOVE R8 R5 - 0x7C180400, // 0035 CALL R6 2 - 0x7001FFF6, // 0036 JMP #002E - 0x58100011, // 0037 LDCONST R4 K17 - 0xAC100200, // 0038 CATCH R4 1 0 - 0xB0080000, // 0039 RAISE 2 R0 R0 - 0x60100010, // 003A GETGBL R4 G16 - 0x5C140600, // 003B MOVE R5 R3 - 0x7C100200, // 003C CALL R4 1 - 0xA802000D, // 003D EXBLK 0 #004C - 0x5C140800, // 003E MOVE R5 R4 - 0x7C140000, // 003F CALL R5 0 - 0xB81A2E00, // 0040 GETNGBL R6 K23 - 0x881C0B7A, // 0041 GETMBR R7 R5 K122 - 0x001EF207, // 0042 ADD R7 K121 R7 - 0x58200030, // 0043 LDCONST R8 K48 - 0x7C180400, // 0044 CALL R6 2 - 0x8C180B7B, // 0045 GETMET R6 R5 K123 - 0x7C180200, // 0046 CALL R6 1 - 0x88180176, // 0047 GETMBR R6 R0 K118 - 0x8C180D53, // 0048 GETMET R6 R6 K83 - 0x88200B7A, // 0049 GETMBR R8 R5 K122 - 0x7C180400, // 004A CALL R6 2 - 0x7001FFF1, // 004B JMP #003E - 0x58100011, // 004C LDCONST R4 K17 - 0xAC100200, // 004D CATCH R4 1 0 - 0xB0080000, // 004E RAISE 2 R0 R0 - 0x80000000, // 004F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_250ms -********************************************************************/ -be_local_closure(class_Matter_Device_every_250ms, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(every_250ms), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x8C04017C, // 0000 GETMET R1 R0 K124 - 0x7C040200, // 0001 CALL R1 1 - 0x58040006, // 0002 LDCONST R1 K6 - 0x6008000C, // 0003 GETGBL R2 G12 - 0x880C0112, // 0004 GETMBR R3 R0 K18 - 0x7C080200, // 0005 CALL R2 1 - 0x14080202, // 0006 LT R2 R1 R2 - 0x780A0005, // 0007 JMPF R2 #000E - 0x88080112, // 0008 GETMBR R2 R0 K18 - 0x94080401, // 0009 GETIDX R2 R2 R1 - 0x8C08057D, // 000A GETMET R2 R2 K125 - 0x7C080200, // 000B CALL R2 1 - 0x00040314, // 000C ADD R1 R1 K20 - 0x7001FFF4, // 000D JMP #0003 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: process_attribute_expansion -********************************************************************/ -be_local_closure(class_Matter_Device_process_attribute_expansion, /* name */ - be_nested_proto( - 12, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(process_attribute_expansion), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x880C0324, // 0000 GETMBR R3 R1 K36 - 0x88100325, // 0001 GETMBR R4 R1 K37 - 0x88140326, // 0002 GETMBR R5 R1 K38 - 0xB81A5200, // 0003 GETNGBL R6 K41 - 0x8C180D7E, // 0004 GETMET R6 R6 K126 - 0x5C200000, // 0005 MOVE R8 R0 - 0x7C180400, // 0006 CALL R6 2 - 0x8C1C0D6D, // 0007 GETMET R7 R6 K109 - 0x5C240600, // 0008 MOVE R9 R3 - 0x5C280800, // 0009 MOVE R10 R4 - 0x5C2C0A00, // 000A MOVE R11 R5 - 0x7C1C0800, // 000B CALL R7 4 - 0x8C1C0D7F, // 000C GETMET R7 R6 K127 - 0x7C1C0200, // 000D CALL R7 1 - 0x4C200000, // 000E LDNIL R8 - 0x8C240D80, // 000F GETMET R9 R6 K128 - 0x7C240200, // 0010 CALL R9 1 - 0x5C201200, // 0011 MOVE R8 R9 - 0x4C280000, // 0012 LDNIL R10 - 0x2024120A, // 0013 NE R9 R9 R10 - 0x78260005, // 0014 JMPF R9 #001B - 0x5C240400, // 0015 MOVE R9 R2 - 0x8C280D81, // 0016 GETMET R10 R6 K129 - 0x7C280200, // 0017 CALL R10 1 - 0x5C2C1000, // 0018 MOVE R11 R8 - 0x7C240400, // 0019 CALL R9 2 - 0x7001FFF3, // 001A JMP #000F - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: attribute_updated -********************************************************************/ -be_local_closure(class_Matter_Device_attribute_updated, /* name */ - be_nested_proto( - 10, /* nstack */ - 5, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(attribute_updated), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140805, // 0001 EQ R5 R4 R5 - 0x78160000, // 0002 JMPF R5 #0004 - 0x50100000, // 0003 LDBOOL R4 0 0 - 0xB8165200, // 0004 GETNGBL R5 K41 - 0x8C140B82, // 0005 GETMET R5 R5 K130 - 0x7C140200, // 0006 CALL R5 1 - 0x90164801, // 0007 SETMBR R5 K36 R1 - 0x90164A02, // 0008 SETMBR R5 K37 R2 - 0x90164C03, // 0009 SETMBR R5 K38 R3 - 0x88180102, // 000A GETMBR R6 R0 K2 - 0x88180D1E, // 000B GETMBR R6 R6 K30 - 0x88180D1F, // 000C GETMBR R6 R6 K31 - 0x8C180D83, // 000D GETMET R6 R6 K131 - 0x5C200A00, // 000E MOVE R8 R5 - 0x5C240800, // 000F MOVE R9 R4 - 0x7C180600, // 0010 CALL R6 3 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: reset_param -********************************************************************/ -be_local_closure(class_Matter_Device_reset_param, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(reset_param), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x50040000, // 0000 LDBOOL R1 0 0 - 0x90020E01, // 0001 SETMBR R0 K7 R1 - 0x8804015F, // 0002 GETMBR R1 R0 K95 - 0x90028E01, // 0003 SETMBR R0 K71 R1 - 0x8C040108, // 0004 GETMET R1 R0 K8 - 0x7C040200, // 0005 CALL R1 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: bridge_add_endpoint -********************************************************************/ -be_local_closure(class_Matter_Device_bridge_add_endpoint, /* name */ - be_nested_proto( - 16, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(bridge_add_endpoint), - &be_const_str_solidified, - ( &(const binstruction[68]) { /* code */ - 0x880C0151, // 0000 GETMBR R3 R0 K81 - 0x8C0C0716, // 0001 GETMET R3 R3 K22 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x1C100604, // 0005 EQ R4 R3 R4 - 0x78120008, // 0006 JMPF R4 #0010 - 0xB8122E00, // 0007 GETNGBL R4 K23 - 0x60140008, // 0008 GETGBL R5 G8 - 0x5C180200, // 0009 MOVE R6 R1 - 0x7C140200, // 000A CALL R5 1 - 0x00170805, // 000B ADD R5 K132 R5 - 0x00140B85, // 000C ADD R5 R5 K133 - 0x58180030, // 000D LDCONST R6 K48 - 0x7C100400, // 000E CALL R4 2 - 0x80000800, // 000F RET 0 - 0x88100147, // 0010 GETMBR R4 R0 K71 - 0x60140008, // 0011 GETGBL R5 G8 - 0x5C180800, // 0012 MOVE R6 R4 - 0x7C140200, // 0013 CALL R5 1 - 0x5C180600, // 0014 MOVE R6 R3 - 0x5C1C0000, // 0015 MOVE R7 R0 - 0x5C200800, // 0016 MOVE R8 R4 - 0x5C240400, // 0017 MOVE R9 R2 - 0x7C180600, // 0018 CALL R6 3 - 0x881C0112, // 0019 GETMBR R7 R0 K18 - 0x8C1C0F42, // 001A GETMET R7 R7 K66 - 0x5C240C00, // 001B MOVE R9 R6 - 0x7C1C0400, // 001C CALL R7 2 - 0x601C0013, // 001D GETGBL R7 G19 - 0x7C1C0000, // 001E CALL R7 0 - 0x981E1E01, // 001F SETIDX R7 K15 R1 - 0x60200010, // 0020 GETGBL R8 G16 - 0x8C240546, // 0021 GETMET R9 R2 K70 - 0x7C240200, // 0022 CALL R9 1 - 0x7C200200, // 0023 CALL R8 1 - 0xA8020004, // 0024 EXBLK 0 #002A - 0x5C241000, // 0025 MOVE R9 R8 - 0x7C240000, // 0026 CALL R9 0 - 0x94280409, // 0027 GETIDX R10 R2 R9 - 0x981C120A, // 0028 SETIDX R7 R9 R10 - 0x7001FFFA, // 0029 JMP #0025 - 0x58200011, // 002A LDCONST R8 K17 - 0xAC200200, // 002B CATCH R8 1 0 - 0xB0080000, // 002C RAISE 2 R0 R0 - 0xB8222E00, // 002D GETNGBL R8 K23 - 0x60240018, // 002E GETGBL R9 G24 - 0x58280086, // 002F LDCONST R10 K134 - 0x5C2C0800, // 0030 MOVE R11 R4 - 0x5C300200, // 0031 MOVE R12 R1 - 0x8C340187, // 0032 GETMET R13 R0 K135 - 0x5C3C0400, // 0033 MOVE R15 R2 - 0x7C340400, // 0034 CALL R13 2 - 0x7C240800, // 0035 CALL R9 4 - 0x5828001D, // 0036 LDCONST R10 K29 - 0x7C200400, // 0037 CALL R8 2 - 0x88200135, // 0038 GETMBR R8 R0 K53 - 0x98200A07, // 0039 SETIDX R8 R5 R7 - 0x50200200, // 003A LDBOOL R8 1 0 - 0x90020E08, // 003B SETMBR R0 K7 R8 - 0x88200147, // 003C GETMBR R8 R0 K71 - 0x00201114, // 003D ADD R8 R8 K20 - 0x90028E08, // 003E SETMBR R0 K71 R8 - 0x8C200108, // 003F GETMET R8 R0 K8 - 0x7C200200, // 0040 CALL R8 1 - 0x8C200188, // 0041 GETMET R8 R0 K136 - 0x7C200200, // 0042 CALL R8 1 - 0x80040800, // 0043 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: MtrInfo -********************************************************************/ -be_local_closure(class_Matter_Device_MtrInfo, /* name */ - be_nested_proto( - 10, /* nstack */ - 5, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(MtrInfo), - &be_const_str_solidified, - ( &(const binstruction[40]) { /* code */ - 0x1C14070D, // 0000 EQ R5 R3 K13 - 0x7815FFFF, // 0001 JMPF R5 #0002 - 0x1C14070D, // 0002 EQ R5 R3 K13 - 0x7816000D, // 0003 JMPF R5 #0012 - 0x60140010, // 0004 GETGBL R5 G16 - 0x88180112, // 0005 GETMBR R6 R0 K18 - 0x7C140200, // 0006 CALL R5 1 - 0xA8020005, // 0007 EXBLK 0 #000E - 0x5C180A00, // 0008 MOVE R6 R5 - 0x7C180000, // 0009 CALL R6 0 - 0x8C1C0189, // 000A GETMET R7 R0 K137 - 0x88240D24, // 000B GETMBR R9 R6 K36 - 0x7C1C0400, // 000C CALL R7 2 - 0x7001FFF9, // 000D JMP #0008 - 0x58140011, // 000E LDCONST R5 K17 - 0xAC140200, // 000F CATCH R5 1 0 - 0xB0080000, // 0010 RAISE 2 R0 R0 - 0x70020011, // 0011 JMP #0024 - 0x60140004, // 0012 GETGBL R5 G4 - 0x5C180800, // 0013 MOVE R6 R4 - 0x7C140200, // 0014 CALL R5 1 - 0x1C140B8A, // 0015 EQ R5 R5 K138 - 0x78160003, // 0016 JMPF R5 #001B - 0x8C140189, // 0017 GETMET R5 R0 K137 - 0x5C1C0800, // 0018 MOVE R7 R4 - 0x7C140400, // 0019 CALL R5 2 - 0x70020008, // 001A JMP #0024 - 0x8C14018B, // 001B GETMET R5 R0 K139 - 0x5C1C0600, // 001C MOVE R7 R3 - 0x7C140400, // 001D CALL R5 2 - 0x4C180000, // 001E LDNIL R6 - 0x20180A06, // 001F NE R6 R5 R6 - 0x781A0002, // 0020 JMPF R6 #0024 - 0x8C180189, // 0021 GETMET R6 R0 K137 - 0x88200B24, // 0022 GETMBR R8 R5 K36 - 0x7C180400, // 0023 CALL R6 2 - 0xB8167400, // 0024 GETNGBL R5 K58 - 0x8C140B8C, // 0025 GETMET R5 R5 K140 - 0x7C140200, // 0026 CALL R5 1 - 0x80000000, // 0027 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _start_udp -********************************************************************/ -be_local_closure(class_Matter_Device__start_udp, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 1]) { - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(msg_received), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - }), - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(_start_udp), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0000, // 0001 JMPF R2 #0003 - 0x80000400, // 0002 RET 0 - 0x4C080000, // 0003 LDNIL R2 - 0x1C080202, // 0004 EQ R2 R1 R2 - 0x780A0000, // 0005 JMPF R2 #0007 - 0x540615A3, // 0006 LDINT R1 5540 - 0xB80A2E00, // 0007 GETNGBL R2 K23 - 0x600C0008, // 0008 GETGBL R3 G8 - 0x5C100200, // 0009 MOVE R4 R1 - 0x7C0C0200, // 000A CALL R3 1 - 0x000F1A03, // 000B ADD R3 K141 R3 - 0x5810001D, // 000C LDCONST R4 K29 - 0x7C080400, // 000D CALL R2 2 - 0xB80A5200, // 000E GETNGBL R2 K41 - 0x8C08058E, // 000F GETMET R2 R2 K142 - 0x5C100000, // 0010 MOVE R4 R0 - 0x5814000D, // 0011 LDCONST R5 K13 - 0x5C180200, // 0012 MOVE R6 R1 - 0x7C080800, // 0013 CALL R2 4 - 0x90020002, // 0014 SETMBR R0 K0 R2 - 0x88080100, // 0015 GETMBR R2 R0 K0 - 0x8C08056D, // 0016 GETMET R2 R2 K109 - 0x84100000, // 0017 CLOSURE R4 P0 - 0x7C080400, // 0018 CALL R2 2 - 0xA0000000, // 0019 CLOSE R0 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: load_param -********************************************************************/ -be_local_closure(class_Matter_Device_load_param, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(load_param), - &be_const_str_solidified, - ( &(const binstruction[136]) { /* code */ - 0xA406B000, // 0000 IMPORT R1 K88 - 0x50080000, // 0001 LDBOOL R2 0 0 - 0xA8020056, // 0002 EXBLK 0 #005A - 0x600C0011, // 0003 GETGBL R3 G17 - 0x8810018F, // 0004 GETMBR R4 R0 K143 - 0x7C0C0200, // 0005 CALL R3 1 - 0x8C100790, // 0006 GETMET R4 R3 K144 - 0x7C100200, // 0007 CALL R4 1 - 0x8C14077B, // 0008 GETMET R5 R3 K123 - 0x7C140200, // 0009 CALL R5 1 - 0xA4166400, // 000A IMPORT R5 K50 - 0x8C180B3E, // 000B GETMET R6 R5 K62 - 0x5C200800, // 000C MOVE R8 R4 - 0x7C180400, // 000D CALL R6 2 - 0x8C1C0D16, // 000E GETMET R7 R6 K22 - 0x58240092, // 000F LDCONST R9 K146 - 0x88280191, // 0010 GETMBR R10 R0 K145 - 0x7C1C0600, // 0011 CALL R7 3 - 0x90032207, // 0012 SETMBR R0 K145 R7 - 0x8C1C0D16, // 0013 GETMET R7 R6 K22 - 0x58240094, // 0014 LDCONST R9 K148 - 0x88280193, // 0015 GETMBR R10 R0 K147 - 0x7C1C0600, // 0016 CALL R7 3 - 0x90032607, // 0017 SETMBR R0 K147 R7 - 0x601C0017, // 0018 GETGBL R7 G23 - 0x8C200D16, // 0019 GETMET R8 R6 K22 - 0x58280060, // 001A LDCONST R10 K96 - 0x502C0000, // 001B LDBOOL R11 0 0 - 0x7C200600, // 001C CALL R8 3 - 0x7C1C0200, // 001D CALL R7 1 - 0x9002C007, // 001E SETMBR R0 K96 R7 - 0x601C0017, // 001F GETGBL R7 G23 - 0x8C200D16, // 0020 GETMET R8 R6 K22 - 0x58280061, // 0021 LDCONST R10 K97 - 0x502C0000, // 0022 LDBOOL R11 0 0 - 0x7C200600, // 0023 CALL R8 3 - 0x7C1C0200, // 0024 CALL R7 1 - 0x9002C207, // 0025 SETMBR R0 K97 R7 - 0x8C1C0D16, // 0026 GETMET R7 R6 K22 - 0x58240095, // 0027 LDCONST R9 K149 - 0x88280147, // 0028 GETMBR R10 R0 K71 - 0x7C1C0600, // 0029 CALL R7 3 - 0x90028E07, // 002A SETMBR R0 K71 R7 - 0x8C1C0D16, // 002B GETMET R7 R6 K22 - 0x58240096, // 002C LDCONST R9 K150 - 0x60280013, // 002D GETGBL R10 G19 - 0x7C280000, // 002E CALL R10 0 - 0x7C1C0600, // 002F CALL R7 3 - 0x90026A07, // 0030 SETMBR R0 K53 R7 - 0x601C0017, // 0031 GETGBL R7 G23 - 0x8C200D16, // 0032 GETMET R8 R6 K22 - 0x58280097, // 0033 LDCONST R10 K151 - 0x7C200400, // 0034 CALL R8 2 - 0x7C1C0200, // 0035 CALL R7 1 - 0x90032E07, // 0036 SETMBR R0 K151 R7 - 0x881C0135, // 0037 GETMBR R7 R0 K53 - 0x4C200000, // 0038 LDNIL R8 - 0x201C0E08, // 0039 NE R7 R7 R8 - 0x781E000D, // 003A JMPF R7 #0049 - 0xB81E2E00, // 003B GETNGBL R7 K23 - 0x60200018, // 003C GETGBL R8 G24 - 0x58240098, // 003D LDCONST R9 K152 - 0x88280135, // 003E GETMBR R10 R0 K53 - 0x7C200400, // 003F CALL R8 2 - 0x58240030, // 0040 LDCONST R9 K48 - 0x7C1C0400, // 0041 CALL R7 2 - 0x8C1C0137, // 0042 GETMET R7 R0 K55 - 0x7C1C0200, // 0043 CALL R7 1 - 0x8C1C0199, // 0044 GETMET R7 R0 K153 - 0x7C1C0200, // 0045 CALL R7 1 - 0x5C080E00, // 0046 MOVE R2 R7 - 0x501C0200, // 0047 LDBOOL R7 1 0 - 0x90020E07, // 0048 SETMBR R0 K7 R7 - 0x8C1C0D16, // 0049 GETMET R7 R6 K22 - 0x5824009A, // 004A LDCONST R9 K154 - 0x60280013, // 004B GETGBL R10 G19 - 0x7C280000, // 004C CALL R10 0 - 0x7C1C0600, // 004D CALL R7 3 - 0x90022A07, // 004E SETMBR R0 K21 R7 - 0x881C0115, // 004F GETMBR R7 R0 K21 - 0x781E0006, // 0050 JMPF R7 #0058 - 0xB81E2E00, // 0051 GETNGBL R7 K23 - 0x60200008, // 0052 GETGBL R8 G8 - 0x88240115, // 0053 GETMBR R9 R0 K21 - 0x7C200200, // 0054 CALL R8 1 - 0x00233608, // 0055 ADD R8 K155 R8 - 0x58240030, // 0056 LDCONST R9 K48 - 0x7C1C0400, // 0057 CALL R7 2 - 0xA8040001, // 0058 EXBLK 1 1 - 0x70020011, // 0059 JMP #006C - 0xAC0C0002, // 005A CATCH R3 0 2 - 0x7002000E, // 005B JMP #006B - 0x2014079C, // 005C NE R5 R3 K156 - 0x7816000B, // 005D JMPF R5 #006A - 0xB8162E00, // 005E GETNGBL R5 K23 - 0x60180008, // 005F GETGBL R6 G8 - 0x5C1C0600, // 0060 MOVE R7 R3 - 0x7C180200, // 0061 CALL R6 1 - 0x001B3A06, // 0062 ADD R6 K157 R6 - 0x00180D9E, // 0063 ADD R6 R6 K158 - 0x601C0008, // 0064 GETGBL R7 G8 - 0x5C200800, // 0065 MOVE R8 R4 - 0x7C1C0200, // 0066 CALL R7 1 - 0x00180C07, // 0067 ADD R6 R6 R7 - 0x581C001D, // 0068 LDCONST R7 K29 - 0x7C140400, // 0069 CALL R5 2 - 0x70020000, // 006A JMP #006C - 0xB0080000, // 006B RAISE 2 R0 R0 - 0x880C0191, // 006C GETMBR R3 R0 K145 - 0x4C100000, // 006D LDNIL R4 - 0x1C0C0604, // 006E EQ R3 R3 R4 - 0x780E000A, // 006F JMPF R3 #007B - 0x8C0C039F, // 0070 GETMET R3 R1 K159 - 0x5814001D, // 0071 LDCONST R5 K29 - 0x7C0C0400, // 0072 CALL R3 2 - 0x8C0C0777, // 0073 GETMET R3 R3 K119 - 0x58140006, // 0074 LDCONST R5 K6 - 0x5818001D, // 0075 LDCONST R6 K29 - 0x7C0C0600, // 0076 CALL R3 3 - 0x54120FFE, // 0077 LDINT R4 4095 - 0x2C0C0604, // 0078 AND R3 R3 R4 - 0x90032203, // 0079 SETMBR R0 K145 R3 - 0x50080200, // 007A LDBOOL R2 1 0 - 0x880C0193, // 007B GETMBR R3 R0 K147 - 0x4C100000, // 007C LDNIL R4 - 0x1C0C0604, // 007D EQ R3 R3 R4 - 0x780E0004, // 007E JMPF R3 #0084 - 0x880C0109, // 007F GETMBR R3 R0 K9 - 0x8C0C07A0, // 0080 GETMET R3 R3 K160 - 0x7C0C0200, // 0081 CALL R3 1 - 0x90032603, // 0082 SETMBR R0 K147 R3 - 0x50080200, // 0083 LDBOOL R2 1 0 - 0x780A0001, // 0084 JMPF R2 #0087 - 0x8C0C0108, // 0085 GETMET R3 R0 K8 - 0x7C0C0200, // 0086 CALL R3 1 - 0x80000000, // 0087 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_50ms -********************************************************************/ -be_local_closure(class_Matter_Device_every_50ms, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(every_50ms), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x8804015E, // 0000 GETMBR R1 R0 K94 - 0x00040314, // 0001 ADD R1 R1 K20 - 0x9002BC01, // 0002 SETMBR R0 K94 R1 - 0x88040102, // 0003 GETMBR R1 R0 K2 - 0x8C0403A1, // 0004 GETMET R1 R1 K161 - 0x7C040200, // 0005 CALL R1 1 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: register_commands ********************************************************************/ @@ -2456,19 +718,19 @@ be_local_closure(class_Matter_Device_register_commands, /* name */ be_str_weak(register_commands), &be_const_str_solidified, ( &(const binstruction[17]) { /* code */ - 0xB8067400, // 0000 GETNGBL R1 K58 - 0x8C0403A2, // 0001 GETMET R1 R1 K162 - 0x580C00A3, // 0002 LDCONST R3 K163 + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040333, // 0001 GETMET R1 R1 K51 + 0x580C0034, // 0002 LDCONST R3 K52 0x84100000, // 0003 CLOSURE R4 P0 0x7C040600, // 0004 CALL R1 3 - 0xB8067400, // 0005 GETNGBL R1 K58 - 0x8C0403A2, // 0006 GETMET R1 R1 K162 - 0x580C00A4, // 0007 LDCONST R3 K164 + 0xB8060200, // 0005 GETNGBL R1 K1 + 0x8C040333, // 0006 GETMET R1 R1 K51 + 0x580C0035, // 0007 LDCONST R3 K53 0x84100001, // 0008 CLOSURE R4 P1 0x7C040600, // 0009 CALL R1 3 - 0xB8067400, // 000A GETNGBL R1 K58 - 0x8C0403A2, // 000B GETMET R1 R1 K162 - 0x580C00A5, // 000C LDCONST R3 K165 + 0xB8060200, // 000A GETNGBL R1 K1 + 0x8C040333, // 000B GETMET R1 R1 K51 + 0x580C0036, // 000C LDCONST R3 K54 0x84100002, // 000D CLOSURE R4 P2 0x7C040600, // 000E CALL R1 3 0xA0000000, // 000F CLOSE R0 @@ -2480,568 +742,72 @@ be_local_closure(class_Matter_Device_register_commands, /* name */ /******************************************************************** -** Solidified function: save_param +** Solidified function: k2l ********************************************************************/ -be_local_closure(class_Matter_Device_save_param, /* name */ +be_local_closure(class_Matter_Device_k2l, /* name */ be_nested_proto( - 9, /* nstack */ + 8, /* nstack */ 1, /* argc */ - 10, /* varg */ + 12, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(save_param), + be_str_weak(k2l), &be_const_str_solidified, - ( &(const binstruction[83]) { /* code */ - 0xA4066400, // 0000 IMPORT R1 K50 - 0x8C0801A6, // 0001 GETMET R2 R0 K166 - 0x7C080200, // 0002 CALL R2 1 - 0x60080018, // 0003 GETGBL R2 G24 - 0x580C00A7, // 0004 LDCONST R3 K167 - 0x88100191, // 0005 GETMBR R4 R0 K145 - 0x88140193, // 0006 GETMBR R5 R0 K147 - 0x88180160, // 0007 GETMBR R6 R0 K96 - 0x781A0001, // 0008 JMPF R6 #000B - 0x581800A8, // 0009 LDCONST R6 K168 - 0x70020000, // 000A JMP #000C - 0x581800A9, // 000B LDCONST R6 K169 - 0x881C0161, // 000C GETMBR R7 R0 K97 - 0x781E0001, // 000D JMPF R7 #0010 - 0x581C00A8, // 000E LDCONST R7 K168 - 0x70020000, // 000F JMP #0011 - 0x581C00A9, // 0010 LDCONST R7 K169 - 0x88200147, // 0011 GETMBR R8 R0 K71 - 0x7C080C00, // 0012 CALL R2 6 - 0x880C0197, // 0013 GETMBR R3 R0 K151 - 0x780E0000, // 0014 JMPF R3 #0016 - 0x000805AA, // 0015 ADD R2 R2 K170 - 0x880C0107, // 0016 GETMBR R3 R0 K7 - 0x780E000E, // 0017 JMPF R3 #0027 - 0x000805AB, // 0018 ADD R2 R2 K171 - 0x8C0C03AC, // 0019 GETMET R3 R1 K172 - 0x88140135, // 001A GETMBR R5 R0 K53 - 0x7C0C0400, // 001B CALL R3 2 - 0x00080403, // 001C ADD R2 R2 R3 - 0x600C000C, // 001D GETGBL R3 G12 - 0x88100115, // 001E GETMBR R4 R0 K21 - 0x7C0C0200, // 001F CALL R3 1 - 0x240C0706, // 0020 GT R3 R3 K6 - 0x780E0004, // 0021 JMPF R3 #0027 - 0x000805AD, // 0022 ADD R2 R2 K173 - 0x8C0C03AC, // 0023 GETMET R3 R1 K172 - 0x88140115, // 0024 GETMBR R5 R0 K21 - 0x7C0C0400, // 0025 CALL R3 2 - 0x00080403, // 0026 ADD R2 R2 R3 - 0x000805AE, // 0027 ADD R2 R2 K174 - 0xA8020017, // 0028 EXBLK 0 #0041 - 0x600C0011, // 0029 GETGBL R3 G17 - 0x8810018F, // 002A GETMBR R4 R0 K143 - 0x581400AF, // 002B LDCONST R5 K175 - 0x7C0C0400, // 002C CALL R3 2 - 0x8C1007B0, // 002D GETMET R4 R3 K176 - 0x5C180400, // 002E MOVE R6 R2 - 0x7C100400, // 002F CALL R4 2 - 0x8C10077B, // 0030 GETMET R4 R3 K123 - 0x7C100200, // 0031 CALL R4 1 - 0xB8122E00, // 0032 GETNGBL R4 K23 - 0x60140018, // 0033 GETGBL R5 G24 - 0x581800B1, // 0034 LDCONST R6 K177 - 0x881C0107, // 0035 GETMBR R7 R0 K7 - 0x781E0001, // 0036 JMPF R7 #0039 - 0x581C00B2, // 0037 LDCONST R7 K178 - 0x70020000, // 0038 JMP #003A - 0x581C000D, // 0039 LDCONST R7 K13 - 0x7C140400, // 003A CALL R5 2 - 0x5818001D, // 003B LDCONST R6 K29 - 0x7C100400, // 003C CALL R4 2 - 0xA8040001, // 003D EXBLK 1 1 - 0x80040400, // 003E RET 1 R2 - 0xA8040001, // 003F EXBLK 1 1 - 0x70020010, // 0040 JMP #0052 - 0xAC0C0002, // 0041 CATCH R3 0 2 - 0x7002000D, // 0042 JMP #0051 - 0xB8162E00, // 0043 GETNGBL R5 K23 - 0x60180008, // 0044 GETGBL R6 G8 - 0x5C1C0600, // 0045 MOVE R7 R3 - 0x7C180200, // 0046 CALL R6 1 - 0x001B6606, // 0047 ADD R6 K179 R6 - 0x00180D9E, // 0048 ADD R6 R6 K158 - 0x601C0008, // 0049 GETGBL R7 G8 - 0x5C200800, // 004A MOVE R8 R4 - 0x7C1C0200, // 004B CALL R7 1 - 0x00180C07, // 004C ADD R6 R6 R7 - 0x581C001D, // 004D LDCONST R7 K29 - 0x7C140400, // 004E CALL R5 2 - 0x80040400, // 004F RET 1 R2 - 0x70020000, // 0050 JMP #0052 - 0xB0080000, // 0051 RAISE 2 R0 R0 - 0x80000000, // 0052 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: bridge_remove_endpoint -********************************************************************/ -be_local_closure(class_Matter_Device_bridge_remove_endpoint, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(bridge_remove_endpoint), - &be_const_str_solidified, - ( &(const binstruction[56]) { /* code */ - 0xA40A6400, // 0000 IMPORT R2 K50 - 0x600C0008, // 0001 GETGBL R3 G8 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C0C0200, // 0003 CALL R3 1 - 0x4C100000, // 0004 LDNIL R4 - 0x4C140000, // 0005 LDNIL R5 - 0x88180135, // 0006 GETMBR R6 R0 K53 - 0x8C180D57, // 0007 GETMET R6 R6 K87 - 0x5C200600, // 0008 MOVE R8 R3 - 0x7C180400, // 0009 CALL R6 2 - 0x741A0004, // 000A JMPT R6 #0010 - 0xB81A2E00, // 000B GETNGBL R6 K23 - 0x001F6803, // 000C ADD R7 K180 R3 - 0x58200030, // 000D LDCONST R8 K48 - 0x7C180400, // 000E CALL R6 2 - 0x80000C00, // 000F RET 0 - 0xB81A2E00, // 0010 GETNGBL R6 K23 - 0x601C0018, // 0011 GETGBL R7 G24 - 0x582000B5, // 0012 LDCONST R8 K181 - 0x5C240200, // 0013 MOVE R9 R1 - 0x7C1C0400, // 0014 CALL R7 2 - 0x5820001D, // 0015 LDCONST R8 K29 - 0x7C180400, // 0016 CALL R6 2 - 0x88180135, // 0017 GETMBR R6 R0 K53 - 0x8C180D53, // 0018 GETMET R6 R6 K83 - 0x5C200600, // 0019 MOVE R8 R3 - 0x7C180400, // 001A CALL R6 2 - 0x50180200, // 001B LDBOOL R6 1 0 - 0x90020E06, // 001C SETMBR R0 K7 R6 - 0x58180006, // 001D LDCONST R6 K6 - 0x601C000C, // 001E GETGBL R7 G12 - 0x88200112, // 001F GETMBR R8 R0 K18 - 0x7C1C0200, // 0020 CALL R7 1 - 0x141C0C07, // 0021 LT R7 R6 R7 - 0x781E000D, // 0022 JMPF R7 #0031 - 0x881C0112, // 0023 GETMBR R7 R0 K18 - 0x941C0E06, // 0024 GETIDX R7 R7 R6 - 0x8C1C0F41, // 0025 GETMET R7 R7 K65 - 0x7C1C0200, // 0026 CALL R7 1 - 0x1C1C0207, // 0027 EQ R7 R1 R7 - 0x781E0005, // 0028 JMPF R7 #002F - 0x881C0112, // 0029 GETMBR R7 R0 K18 - 0x8C1C0F53, // 002A GETMET R7 R7 K83 - 0x5C240C00, // 002B MOVE R9 R6 - 0x7C1C0400, // 002C CALL R7 2 - 0x70020002, // 002D JMP #0031 - 0x70020000, // 002E JMP #0030 - 0x00180D14, // 002F ADD R6 R6 K20 - 0x7001FFEC, // 0030 JMP #001E - 0x8C1C01B6, // 0031 GETMET R7 R0 K182 - 0x7C1C0200, // 0032 CALL R7 1 - 0x8C1C0108, // 0033 GETMET R7 R0 K8 - 0x7C1C0200, // 0034 CALL R7 1 - 0x8C1C0188, // 0035 GETMET R7 R0 K136 - 0x7C1C0200, // 0036 CALL R7 1 - 0x80000000, // 0037 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: button_multi_pressed -********************************************************************/ -be_local_closure(class_Matter_Device_button_multi_pressed, /* name */ - be_nested_proto( - 11, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(button_multi_pressed), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x3C0C0403, // 0001 SHR R3 R2 R3 - 0x541200FE, // 0002 LDINT R4 255 - 0x2C0C0604, // 0003 AND R3 R3 R4 - 0x541200FE, // 0004 LDINT R4 255 - 0x2C100404, // 0005 AND R4 R2 R4 - 0x8C14014B, // 0006 GETMET R5 R0 K75 - 0x001C0914, // 0007 ADD R7 R4 K20 - 0x5820001D, // 0008 LDCONST R8 K29 - 0x58240006, // 0009 LDCONST R9 K6 - 0x5C280600, // 000A MOVE R10 R3 - 0x7C140A00, // 000B CALL R5 5 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(class_Matter_Device_invoke_request, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[24]) { /* code */ - 0x58100006, // 0000 LDCONST R4 K6 - 0x88140724, // 0001 GETMBR R5 R3 K36 - 0x6018000C, // 0002 GETGBL R6 G12 - 0x881C0112, // 0003 GETMBR R7 R0 K18 - 0x7C180200, // 0004 CALL R6 1 - 0x14180806, // 0005 LT R6 R4 R6 - 0x781A000C, // 0006 JMPF R6 #0014 - 0x88180112, // 0007 GETMBR R6 R0 K18 - 0x94180C04, // 0008 GETIDX R6 R6 R4 - 0x881C0D24, // 0009 GETMBR R7 R6 K36 - 0x1C1C0E05, // 000A EQ R7 R7 R5 - 0x781E0005, // 000B JMPF R7 #0012 - 0x8C1C0DB7, // 000C GETMET R7 R6 K183 - 0x5C240200, // 000D MOVE R9 R1 - 0x5C280400, // 000E MOVE R10 R2 - 0x5C2C0600, // 000F MOVE R11 R3 - 0x7C1C0800, // 0010 CALL R7 4 - 0x80040E00, // 0011 RET 1 R7 - 0x00100914, // 0012 ADD R4 R4 K20 - 0x7001FFED, // 0013 JMP #0002 - 0xB81A5200, // 0014 GETNGBL R6 K41 - 0x88180D2A, // 0015 GETMBR R6 R6 K42 - 0x900E5006, // 0016 SETMBR R3 K40 R6 - 0x80000000, // 0017 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_sensors_scheduler -********************************************************************/ -be_local_closure(class_Matter_Device_read_sensors_scheduler, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(read_sensors_scheduler), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x88040148, // 0000 GETMBR R1 R0 K72 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060000, // 0003 JMPF R1 #0005 - 0x80000200, // 0004 RET 0 - 0x88040149, // 0005 GETMBR R1 R0 K73 - 0x1C040306, // 0006 EQ R1 R1 K6 - 0x74060004, // 0007 JMPT R1 #000D - 0xB8067400, // 0008 GETNGBL R1 K58 - 0x8C0403B8, // 0009 GETMET R1 R1 K184 - 0x880C0149, // 000A GETMBR R3 R0 K73 - 0x7C040400, // 000B CALL R1 2 - 0x78060006, // 000C JMPF R1 #0014 - 0x8C0401B9, // 000D GETMET R1 R0 K185 - 0x7C040200, // 000E CALL R1 1 - 0xB8067400, // 000F GETNGBL R1 K58 - 0x8C0403BA, // 0010 GETMET R1 R1 K186 - 0x880C0148, // 0011 GETMBR R3 R0 K72 - 0x7C040400, // 0012 CALL R1 2 - 0x90029201, // 0013 SETMBR R0 K73 R1 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_http_remote -********************************************************************/ -be_local_closure(class_Matter_Device_register_http_remote, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(register_http_remote), - &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0x880C0176, // 0000 GETMBR R3 R0 K118 - 0x4C100000, // 0001 LDNIL R4 - 0x1C0C0604, // 0002 EQ R3 R3 R4 - 0x780E0002, // 0003 JMPF R3 #0007 - 0x600C0013, // 0004 GETGBL R3 G19 - 0x7C0C0000, // 0005 CALL R3 0 - 0x9002EC03, // 0006 SETMBR R0 K118 R3 - 0x4C0C0000, // 0007 LDNIL R3 - 0x88100176, // 0008 GETMBR R4 R0 K118 - 0x8C100957, // 0009 GETMET R4 R4 K87 - 0x5C180200, // 000A MOVE R6 R1 - 0x7C100400, // 000B CALL R4 2 - 0x78120009, // 000C JMPF R4 #0017 - 0x88100176, // 000D GETMBR R4 R0 K118 - 0x940C0801, // 000E GETIDX R3 R4 R1 - 0x8C1407BB, // 000F GETMET R5 R3 K187 - 0x7C140200, // 0010 CALL R5 1 - 0x14140405, // 0011 LT R5 R2 R5 - 0x78160002, // 0012 JMPF R5 #0016 - 0x8C1407BC, // 0013 GETMET R5 R3 K188 - 0x5C1C0400, // 0014 MOVE R7 R2 - 0x7C140400, // 0015 CALL R5 2 - 0x70020011, // 0016 JMP #0029 - 0xB8125200, // 0017 GETNGBL R4 K41 - 0x8C1009BD, // 0018 GETMET R4 R4 K189 - 0x5C180000, // 0019 MOVE R6 R0 - 0x5C1C0200, // 001A MOVE R7 R1 - 0x5C200400, // 001B MOVE R8 R2 - 0x7C100800, // 001C CALL R4 4 - 0x5C0C0800, // 001D MOVE R3 R4 - 0x88100115, // 001E GETMBR R4 R0 K21 - 0x8C100957, // 001F GETMET R4 R4 K87 - 0x5C180200, // 0020 MOVE R6 R1 - 0x7C100400, // 0021 CALL R4 2 - 0x78120003, // 0022 JMPF R4 #0027 - 0x8C1007BE, // 0023 GETMET R4 R3 K190 - 0x88180115, // 0024 GETMBR R6 R0 K21 - 0x94180C01, // 0025 GETIDX R6 R6 R1 - 0x7C100400, // 0026 CALL R4 2 - 0x88100176, // 0027 GETMBR R4 R0 K118 - 0x98100203, // 0028 SETIDX R4 R1 R3 - 0x80040600, // 0029 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: MtrUpdate -********************************************************************/ -be_local_closure(class_Matter_Device_MtrUpdate, /* name */ - be_nested_proto( - 18, /* nstack */ - 5, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(MtrUpdate), - &be_const_str_solidified, - ( &(const binstruction[126]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x1C140805, // 0001 EQ R5 R4 R5 - 0x78160004, // 0002 JMPF R5 #0008 - 0xB8167400, // 0003 GETNGBL R5 K58 - 0x8C140BBF, // 0004 GETMET R5 R5 K191 - 0x581C00C0, // 0005 LDCONST R7 K192 - 0x7C140400, // 0006 CALL R5 2 - 0x80040A00, // 0007 RET 1 R5 - 0xB8167400, // 0008 GETNGBL R5 K58 - 0x8C140BC1, // 0009 GETMET R5 R5 K193 - 0x5C1C0800, // 000A MOVE R7 R4 - 0x582000C2, // 000B LDCONST R8 K194 - 0x7C140600, // 000C CALL R5 3 - 0xB81A7400, // 000D GETNGBL R6 K58 - 0x8C180DC1, // 000E GETMET R6 R6 K193 - 0x5C200800, // 000F MOVE R8 R4 - 0x582400C3, // 0010 LDCONST R9 K195 - 0x7C180600, // 0011 CALL R6 3 - 0x74160000, // 0012 JMPT R5 #0014 - 0x781A0064, // 0013 JMPF R6 #0079 - 0x4C1C0000, // 0014 LDNIL R7 - 0x78160010, // 0015 JMPF R5 #0027 - 0x60200009, // 0016 GETGBL R8 G9 - 0x94240805, // 0017 GETIDX R9 R4 R5 - 0x7C200200, // 0018 CALL R8 1 - 0x18241106, // 0019 LE R9 R8 K6 - 0x78260004, // 001A JMPF R9 #0020 - 0xB8267400, // 001B GETNGBL R9 K58 - 0x8C2413BF, // 001C GETMET R9 R9 K191 - 0x582C00C4, // 001D LDCONST R11 K196 - 0x7C240400, // 001E CALL R9 2 - 0x80041200, // 001F RET 1 R9 - 0x8C240127, // 0020 GETMET R9 R0 K39 - 0x5C2C1000, // 0021 MOVE R11 R8 - 0x7C240400, // 0022 CALL R9 2 - 0x5C1C1200, // 0023 MOVE R7 R9 - 0x8C240953, // 0024 GETMET R9 R4 K83 - 0x5C2C0A00, // 0025 MOVE R11 R5 - 0x7C240400, // 0026 CALL R9 2 - 0x781A0009, // 0027 JMPF R6 #0032 - 0x4C200000, // 0028 LDNIL R8 - 0x1C200E08, // 0029 EQ R8 R7 R8 - 0x78220003, // 002A JMPF R8 #002F - 0x8C20018B, // 002B GETMET R8 R0 K139 - 0x94280806, // 002C GETIDX R10 R4 R6 - 0x7C200400, // 002D CALL R8 2 - 0x5C1C1000, // 002E MOVE R7 R8 - 0x8C200953, // 002F GETMET R8 R4 K83 - 0x5C280C00, // 0030 MOVE R10 R6 - 0x7C200400, // 0031 CALL R8 2 - 0x4C200000, // 0032 LDNIL R8 - 0x1C200E08, // 0033 EQ R8 R7 R8 - 0x78220004, // 0034 JMPF R8 #003A - 0xB8227400, // 0035 GETNGBL R8 K58 - 0x8C2011BF, // 0036 GETMET R8 R8 K191 - 0x582800C5, // 0037 LDCONST R10 K197 - 0x7C200400, // 0038 CALL R8 2 - 0x80041000, // 0039 RET 1 R8 - 0x88200FC6, // 003A GETMBR R8 R7 K198 - 0x74220004, // 003B JMPT R8 #0041 - 0xB8227400, // 003C GETNGBL R8 K58 - 0x8C2011BF, // 003D GETMET R8 R8 K191 - 0x582800C7, // 003E LDCONST R10 K199 - 0x7C200400, // 003F CALL R8 2 - 0x80041000, // 0040 RET 1 R8 - 0x8C200FC8, // 0041 GETMET R8 R7 K200 - 0x7C200200, // 0042 CALL R8 1 - 0x60240013, // 0043 GETGBL R9 G19 - 0x7C240000, // 0044 CALL R9 0 - 0x60280010, // 0045 GETGBL R10 G16 - 0x8C2C0946, // 0046 GETMET R11 R4 K70 - 0x7C2C0200, // 0047 CALL R11 1 - 0x7C280200, // 0048 CALL R10 1 - 0xA8020016, // 0049 EXBLK 0 #0061 - 0x5C2C1400, // 004A MOVE R11 R10 - 0x7C2C0000, // 004B CALL R11 0 - 0xB8327400, // 004C GETNGBL R12 K58 - 0x8C3019C9, // 004D GETMET R12 R12 K201 - 0x5C381000, // 004E MOVE R14 R8 - 0x5C3C1600, // 004F MOVE R15 R11 - 0x7C300600, // 0050 CALL R12 3 - 0x4C340000, // 0051 LDNIL R13 - 0x1C34180D, // 0052 EQ R13 R12 R13 - 0x78360008, // 0053 JMPF R13 #005D - 0xB8367400, // 0054 GETNGBL R13 K58 - 0x8C341BBF, // 0055 GETMET R13 R13 K191 - 0x603C0018, // 0056 GETGBL R15 G24 - 0x584000CA, // 0057 LDCONST R16 K202 - 0x5C441600, // 0058 MOVE R17 R11 - 0x7C3C0400, // 0059 CALL R15 2 - 0x7C340400, // 005A CALL R13 2 - 0xA8040001, // 005B EXBLK 1 1 - 0x80001A00, // 005C RET 0 - 0x9434100C, // 005D GETIDX R13 R8 R12 - 0x9438080B, // 005E GETIDX R14 R4 R11 - 0x98241A0E, // 005F SETIDX R9 R13 R14 - 0x7001FFE8, // 0060 JMP #004A - 0x58280011, // 0061 LDCONST R10 K17 - 0xAC280200, // 0062 CATCH R10 1 0 - 0xB0080000, // 0063 RAISE 2 R0 R0 - 0x8C280FCB, // 0064 GETMET R10 R7 K203 - 0x5C301200, // 0065 MOVE R12 R9 - 0x7C280400, // 0066 CALL R10 2 - 0x8C280FCC, // 0067 GETMET R10 R7 K204 - 0x7C280200, // 0068 CALL R10 1 - 0x782A000A, // 0069 JMPF R10 #0075 - 0x602C0018, // 006A GETGBL R11 G24 - 0x583000CD, // 006B LDCONST R12 K205 - 0x5C340200, // 006C MOVE R13 R1 - 0x5C381400, // 006D MOVE R14 R10 - 0x7C2C0600, // 006E CALL R11 3 - 0xB8327400, // 006F GETNGBL R12 K58 - 0x8C3019CE, // 0070 GETMET R12 R12 K206 - 0x5C381600, // 0071 MOVE R14 R11 - 0x7C300400, // 0072 CALL R12 2 - 0x80041800, // 0073 RET 1 R12 - 0x70020003, // 0074 JMP #0079 - 0xB82E7400, // 0075 GETNGBL R11 K58 - 0x8C2C178C, // 0076 GETMET R11 R11 K140 - 0x7C2C0200, // 0077 CALL R11 1 - 0x80041600, // 0078 RET 1 R11 - 0xB81E7400, // 0079 GETNGBL R7 K58 - 0x8C1C0FBF, // 007A GETMET R7 R7 K191 - 0x582400CF, // 007B LDCONST R9 K207 - 0x7C1C0400, // 007C CALL R7 2 - 0x80000000, // 007D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: MtrInfo_one -********************************************************************/ -be_local_closure(class_Matter_Device_MtrInfo_one, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 10, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(MtrInfo_one), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x8C080127, // 0000 GETMET R2 R0 K39 - 0x5C100200, // 0001 MOVE R4 R1 - 0x7C080400, // 0002 CALL R2 2 + ( &(const binstruction[50]) { /* code */ + 0x58040037, // 0000 LDCONST R1 K55 + 0x60080012, // 0001 GETGBL R2 G18 + 0x7C080000, // 0002 CALL R2 0 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0403, // 0004 EQ R3 R2 R3 + 0x1C0C0003, // 0004 EQ R3 R0 R3 0x780E0000, // 0005 JMPF R3 #0007 - 0x80000600, // 0006 RET 0 - 0x8C0C05CC, // 0007 GETMET R3 R2 K204 - 0x7C0C0200, // 0008 CALL R3 1 - 0x780E0008, // 0009 JMPF R3 #0013 - 0x60100018, // 000A GETGBL R4 G24 - 0x581400D0, // 000B LDCONST R5 K208 - 0x5C180600, // 000C MOVE R6 R3 - 0x7C100400, // 000D CALL R4 2 - 0xB8167400, // 000E GETNGBL R5 K58 - 0x8C140BD1, // 000F GETMET R5 R5 K209 - 0x5C1C0800, // 0010 MOVE R7 R4 - 0x5820000D, // 0011 LDCONST R8 K13 - 0x7C140600, // 0012 CALL R5 3 - 0x80000000, // 0013 RET 0 + 0x80040400, // 0006 RET 1 R2 + 0x600C0010, // 0007 GETGBL R3 G16 + 0x8C100138, // 0008 GETMET R4 R0 K56 + 0x7C100200, // 0009 CALL R4 1 + 0x7C0C0200, // 000A CALL R3 1 + 0xA8020005, // 000B EXBLK 0 #0012 + 0x5C100600, // 000C MOVE R4 R3 + 0x7C100000, // 000D CALL R4 0 + 0x8C140539, // 000E GETMET R5 R2 K57 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x7C140400, // 0010 CALL R5 2 + 0x7001FFF9, // 0011 JMP #000C + 0x580C003A, // 0012 LDCONST R3 K58 + 0xAC0C0200, // 0013 CATCH R3 1 0 + 0xB0080000, // 0014 RAISE 2 R0 R0 + 0x600C0010, // 0015 GETGBL R3 G16 + 0x6010000C, // 0016 GETGBL R4 G12 + 0x5C140400, // 0017 MOVE R5 R2 + 0x7C100200, // 0018 CALL R4 1 + 0x04100921, // 0019 SUB R4 R4 K33 + 0x40124204, // 001A CONNECT R4 K33 R4 + 0x7C0C0200, // 001B CALL R3 1 + 0xA8020010, // 001C EXBLK 0 #002E + 0x5C100600, // 001D MOVE R4 R3 + 0x7C100000, // 001E CALL R4 0 + 0x94140404, // 001F GETIDX R5 R2 R4 + 0x5C180800, // 0020 MOVE R6 R4 + 0x241C0D0A, // 0021 GT R7 R6 K10 + 0x781E0008, // 0022 JMPF R7 #002C + 0x041C0D21, // 0023 SUB R7 R6 K33 + 0x941C0407, // 0024 GETIDX R7 R2 R7 + 0x241C0E05, // 0025 GT R7 R7 R5 + 0x781E0004, // 0026 JMPF R7 #002C + 0x041C0D21, // 0027 SUB R7 R6 K33 + 0x941C0407, // 0028 GETIDX R7 R2 R7 + 0x98080C07, // 0029 SETIDX R2 R6 R7 + 0x04180D21, // 002A SUB R6 R6 K33 + 0x7001FFF4, // 002B JMP #0021 + 0x98080C05, // 002C SETIDX R2 R6 R5 + 0x7001FFEE, // 002D JMP #001D + 0x580C003A, // 002E LDCONST R3 K58 + 0xAC0C0200, // 002F CATCH R3 1 0 + 0xB0080000, // 0030 RAISE 2 R0 R0 + 0x80040400, // 0031 RET 1 R2 }) ) ); @@ -3069,15 +835,15 @@ be_local_closure(class_Matter_Device_MtrJoin, /* name */ 0x5C180600, // 0001 MOVE R6 R3 0x7C140200, // 0002 CALL R5 1 0x78160003, // 0003 JMPF R5 #0008 - 0x88180109, // 0004 GETMBR R6 R0 K9 - 0x8C180DD2, // 0005 GETMET R6 R6 K210 + 0x88180112, // 0004 GETMBR R6 R0 K18 + 0x8C180D3B, // 0005 GETMET R6 R6 K59 0x7C180200, // 0006 CALL R6 1 0x70020002, // 0007 JMP #000B - 0x88180109, // 0008 GETMBR R6 R0 K9 - 0x8C180D0A, // 0009 GETMET R6 R6 K10 + 0x88180112, // 0008 GETMBR R6 R0 K18 + 0x8C180D3C, // 0009 GETMET R6 R6 K60 0x7C180200, // 000A CALL R6 1 - 0xB81A7400, // 000B GETNGBL R6 K58 - 0x8C180D8C, // 000C GETMET R6 R6 K140 + 0xB81A0200, // 000B GETNGBL R6 K1 + 0x8C180D3D, // 000C GETMET R6 R6 K61 0x7C180200, // 000D CALL R6 1 0x80000000, // 000E RET 0 }) @@ -3086,6 +852,1217 @@ be_local_closure(class_Matter_Device_MtrJoin, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: attribute_updated +********************************************************************/ +be_local_closure(class_Matter_Device_attribute_updated, /* name */ + be_nested_proto( + 10, /* nstack */ + 5, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(attribute_updated), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140805, // 0001 EQ R5 R4 R5 + 0x78160000, // 0002 JMPF R5 #0004 + 0x50100000, // 0003 LDBOOL R4 0 0 + 0xB8160600, // 0004 GETNGBL R5 K3 + 0x8C140B3E, // 0005 GETMET R5 R5 K62 + 0x7C140200, // 0006 CALL R5 1 + 0x90167E01, // 0007 SETMBR R5 K63 R1 + 0x90168002, // 0008 SETMBR R5 K64 R2 + 0x90168203, // 0009 SETMBR R5 K65 R3 + 0x88180118, // 000A GETMBR R6 R0 K24 + 0x88180D2B, // 000B GETMBR R6 R6 K43 + 0x88180D2C, // 000C GETMBR R6 R6 K44 + 0x8C180D42, // 000D GETMET R6 R6 K66 + 0x5C200A00, // 000E MOVE R8 R5 + 0x5C240800, // 000F MOVE R9 R4 + 0x7C180600, // 0010 CALL R6 3 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save_param +********************************************************************/ +be_local_closure(class_Matter_Device_save_param, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(save_param), + &be_const_str_solidified, + ( &(const binstruction[83]) { /* code */ + 0xA4068600, // 0000 IMPORT R1 K67 + 0x8C080144, // 0001 GETMET R2 R0 K68 + 0x7C080200, // 0002 CALL R2 1 + 0x60080018, // 0003 GETGBL R2 G24 + 0x580C0045, // 0004 LDCONST R3 K69 + 0x88100146, // 0005 GETMBR R4 R0 K70 + 0x88140147, // 0006 GETMBR R5 R0 K71 + 0x88180110, // 0007 GETMBR R6 R0 K16 + 0x781A0001, // 0008 JMPF R6 #000B + 0x58180048, // 0009 LDCONST R6 K72 + 0x70020000, // 000A JMP #000C + 0x58180049, // 000B LDCONST R6 K73 + 0x881C0111, // 000C GETMBR R7 R0 K17 + 0x781E0001, // 000D JMPF R7 #0010 + 0x581C0048, // 000E LDCONST R7 K72 + 0x70020000, // 000F JMP #0011 + 0x581C0049, // 0010 LDCONST R7 K73 + 0x8820010E, // 0011 GETMBR R8 R0 K14 + 0x7C080C00, // 0012 CALL R2 6 + 0x880C014A, // 0013 GETMBR R3 R0 K74 + 0x780E0000, // 0014 JMPF R3 #0016 + 0x0008054B, // 0015 ADD R2 R2 K75 + 0x880C010C, // 0016 GETMBR R3 R0 K12 + 0x780E000E, // 0017 JMPF R3 #0027 + 0x0008054C, // 0018 ADD R2 R2 K76 + 0x8C0C034D, // 0019 GETMET R3 R1 K77 + 0x8814014E, // 001A GETMBR R5 R0 K78 + 0x7C0C0400, // 001B CALL R3 2 + 0x00080403, // 001C ADD R2 R2 R3 + 0x600C000C, // 001D GETGBL R3 G12 + 0x8810010D, // 001E GETMBR R4 R0 K13 + 0x7C0C0200, // 001F CALL R3 1 + 0x240C070A, // 0020 GT R3 R3 K10 + 0x780E0004, // 0021 JMPF R3 #0027 + 0x0008054F, // 0022 ADD R2 R2 K79 + 0x8C0C034D, // 0023 GETMET R3 R1 K77 + 0x8814010D, // 0024 GETMBR R5 R0 K13 + 0x7C0C0400, // 0025 CALL R3 2 + 0x00080403, // 0026 ADD R2 R2 R3 + 0x00080550, // 0027 ADD R2 R2 K80 + 0xA8020017, // 0028 EXBLK 0 #0041 + 0x600C0011, // 0029 GETGBL R3 G17 + 0x88100151, // 002A GETMBR R4 R0 K81 + 0x58140052, // 002B LDCONST R5 K82 + 0x7C0C0400, // 002C CALL R3 2 + 0x8C100753, // 002D GETMET R4 R3 K83 + 0x5C180400, // 002E MOVE R6 R2 + 0x7C100400, // 002F CALL R4 2 + 0x8C100754, // 0030 GETMET R4 R3 K84 + 0x7C100200, // 0031 CALL R4 1 + 0xB8124A00, // 0032 GETNGBL R4 K37 + 0x60140018, // 0033 GETGBL R5 G24 + 0x58180055, // 0034 LDCONST R6 K85 + 0x881C010C, // 0035 GETMBR R7 R0 K12 + 0x781E0001, // 0036 JMPF R7 #0039 + 0x581C0056, // 0037 LDCONST R7 K86 + 0x70020000, // 0038 JMP #003A + 0x581C0057, // 0039 LDCONST R7 K87 + 0x7C140400, // 003A CALL R5 2 + 0x58180022, // 003B LDCONST R6 K34 + 0x7C100400, // 003C CALL R4 2 + 0xA8040001, // 003D EXBLK 1 1 + 0x80040400, // 003E RET 1 R2 + 0xA8040001, // 003F EXBLK 1 1 + 0x70020010, // 0040 JMP #0052 + 0xAC0C0002, // 0041 CATCH R3 0 2 + 0x7002000D, // 0042 JMP #0051 + 0xB8164A00, // 0043 GETNGBL R5 K37 + 0x60180008, // 0044 GETGBL R6 G8 + 0x5C1C0600, // 0045 MOVE R7 R3 + 0x7C180200, // 0046 CALL R6 1 + 0x001AB006, // 0047 ADD R6 K88 R6 + 0x00180D59, // 0048 ADD R6 R6 K89 + 0x601C0008, // 0049 GETGBL R7 G8 + 0x5C200800, // 004A MOVE R8 R4 + 0x7C1C0200, // 004B CALL R7 1 + 0x00180C07, // 004C ADD R6 R6 R7 + 0x581C0022, // 004D LDCONST R7 K34 + 0x7C140400, // 004E CALL R5 2 + 0x80040400, // 004F RET 1 R2 + 0x70020000, // 0050 JMP #0052 + 0xB0080000, // 0051 RAISE 2 R0 R0 + 0x80000000, // 0052 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: load_param +********************************************************************/ +be_local_closure(class_Matter_Device_load_param, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(load_param), + &be_const_str_solidified, + ( &(const binstruction[136]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x50080000, // 0001 LDBOOL R2 0 0 + 0xA8020056, // 0002 EXBLK 0 #005A + 0x600C0011, // 0003 GETGBL R3 G17 + 0x88100151, // 0004 GETMBR R4 R0 K81 + 0x7C0C0200, // 0005 CALL R3 1 + 0x8C10075A, // 0006 GETMET R4 R3 K90 + 0x7C100200, // 0007 CALL R4 1 + 0x8C140754, // 0008 GETMET R5 R3 K84 + 0x7C140200, // 0009 CALL R5 1 + 0xA4168600, // 000A IMPORT R5 K67 + 0x8C180B5B, // 000B GETMET R6 R5 K91 + 0x5C200800, // 000C MOVE R8 R4 + 0x7C180400, // 000D CALL R6 2 + 0x8C1C0D32, // 000E GETMET R7 R6 K50 + 0x5824005C, // 000F LDCONST R9 K92 + 0x88280146, // 0010 GETMBR R10 R0 K70 + 0x7C1C0600, // 0011 CALL R7 3 + 0x90028C07, // 0012 SETMBR R0 K70 R7 + 0x8C1C0D32, // 0013 GETMET R7 R6 K50 + 0x5824005D, // 0014 LDCONST R9 K93 + 0x88280147, // 0015 GETMBR R10 R0 K71 + 0x7C1C0600, // 0016 CALL R7 3 + 0x90028E07, // 0017 SETMBR R0 K71 R7 + 0x601C0017, // 0018 GETGBL R7 G23 + 0x8C200D32, // 0019 GETMET R8 R6 K50 + 0x58280010, // 001A LDCONST R10 K16 + 0x502C0000, // 001B LDBOOL R11 0 0 + 0x7C200600, // 001C CALL R8 3 + 0x7C1C0200, // 001D CALL R7 1 + 0x90022007, // 001E SETMBR R0 K16 R7 + 0x601C0017, // 001F GETGBL R7 G23 + 0x8C200D32, // 0020 GETMET R8 R6 K50 + 0x58280011, // 0021 LDCONST R10 K17 + 0x502C0000, // 0022 LDBOOL R11 0 0 + 0x7C200600, // 0023 CALL R8 3 + 0x7C1C0200, // 0024 CALL R7 1 + 0x90022207, // 0025 SETMBR R0 K17 R7 + 0x8C1C0D32, // 0026 GETMET R7 R6 K50 + 0x5824005E, // 0027 LDCONST R9 K94 + 0x8828010E, // 0028 GETMBR R10 R0 K14 + 0x7C1C0600, // 0029 CALL R7 3 + 0x90021C07, // 002A SETMBR R0 K14 R7 + 0x8C1C0D32, // 002B GETMET R7 R6 K50 + 0x5824005F, // 002C LDCONST R9 K95 + 0x60280013, // 002D GETGBL R10 G19 + 0x7C280000, // 002E CALL R10 0 + 0x7C1C0600, // 002F CALL R7 3 + 0x90029C07, // 0030 SETMBR R0 K78 R7 + 0x601C0017, // 0031 GETGBL R7 G23 + 0x8C200D32, // 0032 GETMET R8 R6 K50 + 0x5828004A, // 0033 LDCONST R10 K74 + 0x7C200400, // 0034 CALL R8 2 + 0x7C1C0200, // 0035 CALL R7 1 + 0x90029407, // 0036 SETMBR R0 K74 R7 + 0x881C014E, // 0037 GETMBR R7 R0 K78 + 0x4C200000, // 0038 LDNIL R8 + 0x201C0E08, // 0039 NE R7 R7 R8 + 0x781E000D, // 003A JMPF R7 #0049 + 0xB81E4A00, // 003B GETNGBL R7 K37 + 0x60200018, // 003C GETGBL R8 G24 + 0x58240060, // 003D LDCONST R9 K96 + 0x8828014E, // 003E GETMBR R10 R0 K78 + 0x7C200400, // 003F CALL R8 2 + 0x58240061, // 0040 LDCONST R9 K97 + 0x7C1C0400, // 0041 CALL R7 2 + 0x8C1C0162, // 0042 GETMET R7 R0 K98 + 0x7C1C0200, // 0043 CALL R7 1 + 0x8C1C0163, // 0044 GETMET R7 R0 K99 + 0x7C1C0200, // 0045 CALL R7 1 + 0x5C080E00, // 0046 MOVE R2 R7 + 0x501C0200, // 0047 LDBOOL R7 1 0 + 0x90021807, // 0048 SETMBR R0 K12 R7 + 0x8C1C0D32, // 0049 GETMET R7 R6 K50 + 0x58240064, // 004A LDCONST R9 K100 + 0x60280013, // 004B GETGBL R10 G19 + 0x7C280000, // 004C CALL R10 0 + 0x7C1C0600, // 004D CALL R7 3 + 0x90021A07, // 004E SETMBR R0 K13 R7 + 0x881C010D, // 004F GETMBR R7 R0 K13 + 0x781E0006, // 0050 JMPF R7 #0058 + 0xB81E4A00, // 0051 GETNGBL R7 K37 + 0x60200008, // 0052 GETGBL R8 G8 + 0x8824010D, // 0053 GETMBR R9 R0 K13 + 0x7C200200, // 0054 CALL R8 1 + 0x0022CA08, // 0055 ADD R8 K101 R8 + 0x58240061, // 0056 LDCONST R9 K97 + 0x7C1C0400, // 0057 CALL R7 2 + 0xA8040001, // 0058 EXBLK 1 1 + 0x70020011, // 0059 JMP #006C + 0xAC0C0002, // 005A CATCH R3 0 2 + 0x7002000E, // 005B JMP #006B + 0x20140766, // 005C NE R5 R3 K102 + 0x7816000B, // 005D JMPF R5 #006A + 0xB8164A00, // 005E GETNGBL R5 K37 + 0x60180008, // 005F GETGBL R6 G8 + 0x5C1C0600, // 0060 MOVE R7 R3 + 0x7C180200, // 0061 CALL R6 1 + 0x001ACE06, // 0062 ADD R6 K103 R6 + 0x00180D59, // 0063 ADD R6 R6 K89 + 0x601C0008, // 0064 GETGBL R7 G8 + 0x5C200800, // 0065 MOVE R8 R4 + 0x7C1C0200, // 0066 CALL R7 1 + 0x00180C07, // 0067 ADD R6 R6 R7 + 0x581C0022, // 0068 LDCONST R7 K34 + 0x7C140400, // 0069 CALL R5 2 + 0x70020000, // 006A JMP #006C + 0xB0080000, // 006B RAISE 2 R0 R0 + 0x880C0146, // 006C GETMBR R3 R0 K70 + 0x4C100000, // 006D LDNIL R4 + 0x1C0C0604, // 006E EQ R3 R3 R4 + 0x780E000A, // 006F JMPF R3 #007B + 0x8C0C0368, // 0070 GETMET R3 R1 K104 + 0x58140022, // 0071 LDCONST R5 K34 + 0x7C0C0400, // 0072 CALL R3 2 + 0x8C0C0769, // 0073 GETMET R3 R3 K105 + 0x5814000A, // 0074 LDCONST R5 K10 + 0x58180022, // 0075 LDCONST R6 K34 + 0x7C0C0600, // 0076 CALL R3 3 + 0x54120FFE, // 0077 LDINT R4 4095 + 0x2C0C0604, // 0078 AND R3 R3 R4 + 0x90028C03, // 0079 SETMBR R0 K70 R3 + 0x50080200, // 007A LDBOOL R2 1 0 + 0x880C0147, // 007B GETMBR R3 R0 K71 + 0x4C100000, // 007C LDNIL R4 + 0x1C0C0604, // 007D EQ R3 R3 R4 + 0x780E0004, // 007E JMPF R3 #0084 + 0x880C0112, // 007F GETMBR R3 R0 K18 + 0x8C0C076A, // 0080 GETMET R3 R3 K106 + 0x7C0C0200, // 0081 CALL R3 1 + 0x90028E03, // 0082 SETMBR R0 K71 R3 + 0x50080200, // 0083 LDBOOL R2 1 0 + 0x780A0001, // 0084 JMPF R2 #0087 + 0x8C0C016B, // 0085 GETMET R3 R0 K107 + 0x7C0C0200, // 0086 CALL R3 1 + 0x80000000, // 0087 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: register_http_remote +********************************************************************/ +be_local_closure(class_Matter_Device_register_http_remote, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(register_http_remote), + &be_const_str_solidified, + ( &(const binstruction[42]) { /* code */ + 0x880C016C, // 0000 GETMBR R3 R0 K108 + 0x4C100000, // 0001 LDNIL R4 + 0x1C0C0604, // 0002 EQ R3 R3 R4 + 0x780E0002, // 0003 JMPF R3 #0007 + 0x600C0013, // 0004 GETGBL R3 G19 + 0x7C0C0000, // 0005 CALL R3 0 + 0x9002D803, // 0006 SETMBR R0 K108 R3 + 0x4C0C0000, // 0007 LDNIL R3 + 0x8810016C, // 0008 GETMBR R4 R0 K108 + 0x8C10096D, // 0009 GETMET R4 R4 K109 + 0x5C180200, // 000A MOVE R6 R1 + 0x7C100400, // 000B CALL R4 2 + 0x78120009, // 000C JMPF R4 #0017 + 0x8810016C, // 000D GETMBR R4 R0 K108 + 0x940C0801, // 000E GETIDX R3 R4 R1 + 0x8C14076E, // 000F GETMET R5 R3 K110 + 0x7C140200, // 0010 CALL R5 1 + 0x14140405, // 0011 LT R5 R2 R5 + 0x78160002, // 0012 JMPF R5 #0016 + 0x8C14076F, // 0013 GETMET R5 R3 K111 + 0x5C1C0400, // 0014 MOVE R7 R2 + 0x7C140400, // 0015 CALL R5 2 + 0x70020011, // 0016 JMP #0029 + 0xB8120600, // 0017 GETNGBL R4 K3 + 0x8C100970, // 0018 GETMET R4 R4 K112 + 0x5C180000, // 0019 MOVE R6 R0 + 0x5C1C0200, // 001A MOVE R7 R1 + 0x5C200400, // 001B MOVE R8 R2 + 0x7C100800, // 001C CALL R4 4 + 0x5C0C0800, // 001D MOVE R3 R4 + 0x8810010D, // 001E GETMBR R4 R0 K13 + 0x8C10096D, // 001F GETMET R4 R4 K109 + 0x5C180200, // 0020 MOVE R6 R1 + 0x7C100400, // 0021 CALL R4 2 + 0x78120003, // 0022 JMPF R4 #0027 + 0x8C100771, // 0023 GETMET R4 R3 K113 + 0x8818010D, // 0024 GETMBR R6 R0 K13 + 0x94180C01, // 0025 GETIDX R6 R6 R1 + 0x7C100400, // 0026 CALL R4 2 + 0x8810016C, // 0027 GETMBR R4 R0 K108 + 0x98100203, // 0028 SETIDX R4 R1 R3 + 0x80040600, // 0029 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: sort_distinct +********************************************************************/ +be_local_closure(class_Matter_Device_sort_distinct, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 12, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(sort_distinct), + &be_const_str_solidified, + ( &(const binstruction[53]) { /* code */ + 0x58040037, // 0000 LDCONST R1 K55 + 0x60080010, // 0001 GETGBL R2 G16 + 0x600C000C, // 0002 GETGBL R3 G12 + 0x5C100000, // 0003 MOVE R4 R0 + 0x7C0C0200, // 0004 CALL R3 1 + 0x040C0721, // 0005 SUB R3 R3 K33 + 0x400E4203, // 0006 CONNECT R3 K33 R3 + 0x7C080200, // 0007 CALL R2 1 + 0xA8020010, // 0008 EXBLK 0 #001A + 0x5C0C0400, // 0009 MOVE R3 R2 + 0x7C0C0000, // 000A CALL R3 0 + 0x94100003, // 000B GETIDX R4 R0 R3 + 0x5C140600, // 000C MOVE R5 R3 + 0x24180B0A, // 000D GT R6 R5 K10 + 0x781A0008, // 000E JMPF R6 #0018 + 0x04180B21, // 000F SUB R6 R5 K33 + 0x94180006, // 0010 GETIDX R6 R0 R6 + 0x24180C04, // 0011 GT R6 R6 R4 + 0x781A0004, // 0012 JMPF R6 #0018 + 0x04180B21, // 0013 SUB R6 R5 K33 + 0x94180006, // 0014 GETIDX R6 R0 R6 + 0x98000A06, // 0015 SETIDX R0 R5 R6 + 0x04140B21, // 0016 SUB R5 R5 K33 + 0x7001FFF4, // 0017 JMP #000D + 0x98000A04, // 0018 SETIDX R0 R5 R4 + 0x7001FFEE, // 0019 JMP #0009 + 0x5808003A, // 001A LDCONST R2 K58 + 0xAC080200, // 001B CATCH R2 1 0 + 0xB0080000, // 001C RAISE 2 R0 R0 + 0x58080021, // 001D LDCONST R2 K33 + 0x600C000C, // 001E GETGBL R3 G12 + 0x5C100000, // 001F MOVE R4 R0 + 0x7C0C0200, // 0020 CALL R3 1 + 0x180C0721, // 0021 LE R3 R3 K33 + 0x780E0000, // 0022 JMPF R3 #0024 + 0x80040000, // 0023 RET 1 R0 + 0x940C010A, // 0024 GETIDX R3 R0 K10 + 0x6010000C, // 0025 GETGBL R4 G12 + 0x5C140000, // 0026 MOVE R5 R0 + 0x7C100200, // 0027 CALL R4 1 + 0x14100404, // 0028 LT R4 R2 R4 + 0x78120009, // 0029 JMPF R4 #0034 + 0x94100002, // 002A GETIDX R4 R0 R2 + 0x1C100803, // 002B EQ R4 R4 R3 + 0x78120003, // 002C JMPF R4 #0031 + 0x8C100172, // 002D GETMET R4 R0 K114 + 0x5C180400, // 002E MOVE R6 R2 + 0x7C100400, // 002F CALL R4 2 + 0x70020001, // 0030 JMP #0033 + 0x940C0002, // 0031 GETIDX R3 R0 R2 + 0x00080521, // 0032 ADD R2 R2 K33 + 0x7001FFF0, // 0033 JMP #0025 + 0x80040000, // 0034 RET 1 R0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: received_ack +********************************************************************/ +be_local_closure(class_Matter_Device_received_ack, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(received_ack), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88080173, // 0000 GETMBR R2 R0 K115 + 0x8C080574, // 0001 GETMET R2 R2 K116 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_second +********************************************************************/ +be_local_closure(class_Matter_Device_every_second, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(every_second), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x88040115, // 0000 GETMBR R1 R0 K21 + 0x8C040375, // 0001 GETMET R1 R1 K117 + 0x7C040200, // 0002 CALL R1 1 + 0x88040118, // 0003 GETMBR R1 R0 K24 + 0x8C040375, // 0004 GETMET R1 R1 K117 + 0x7C040200, // 0005 CALL R1 1 + 0x8804011A, // 0006 GETMBR R1 R0 K26 + 0x8C040375, // 0007 GETMET R1 R1 K117 + 0x7C040200, // 0008 CALL R1 1 + 0x88040112, // 0009 GETMBR R1 R0 K18 + 0x8C040375, // 000A GETMET R1 R1 K117 + 0x7C040200, // 000B CALL R1 1 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_active_endpoints +********************************************************************/ +be_local_closure(class_Matter_Device_get_active_endpoints, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(get_active_endpoints), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x8810010B, // 0003 GETMBR R4 R0 K11 + 0x7C0C0200, // 0004 CALL R3 1 + 0xA8020011, // 0005 EXBLK 0 #0018 + 0x5C100600, // 0006 MOVE R4 R3 + 0x7C100000, // 0007 CALL R4 0 + 0x8C140923, // 0008 GETMET R5 R4 K35 + 0x7C140200, // 0009 CALL R5 1 + 0x78060002, // 000A JMPF R1 #000E + 0x1C180B0A, // 000B EQ R6 R5 K10 + 0x781A0000, // 000C JMPF R6 #000E + 0x7001FFF7, // 000D JMP #0006 + 0x8C180532, // 000E GETMET R6 R2 K50 + 0x5C200A00, // 000F MOVE R8 R5 + 0x7C180400, // 0010 CALL R6 2 + 0x4C1C0000, // 0011 LDNIL R7 + 0x1C180C07, // 0012 EQ R6 R6 R7 + 0x781A0002, // 0013 JMPF R6 #0017 + 0x8C180539, // 0014 GETMET R6 R2 K57 + 0x5C200A00, // 0015 MOVE R8 R5 + 0x7C180400, // 0016 CALL R6 2 + 0x7001FFED, // 0017 JMP #0006 + 0x580C003A, // 0018 LDCONST R3 K58 + 0xAC0C0200, // 0019 CATCH R3 1 0 + 0xB0080000, // 001A RAISE 2 R0 R0 + 0x80040400, // 001B RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: resolve_attribute_read_solo +********************************************************************/ +be_local_closure(class_Matter_Device_resolve_attribute_read_solo, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(resolve_attribute_read_solo), + &be_const_str_solidified, + ( &(const binstruction[47]) { /* code */ + 0x8808033F, // 0000 GETMBR R2 R1 K63 + 0x880C0340, // 0001 GETMBR R3 R1 K64 + 0x88100341, // 0002 GETMBR R4 R1 K65 + 0x4C140000, // 0003 LDNIL R5 + 0x1C140405, // 0004 EQ R5 R2 R5 + 0x74160005, // 0005 JMPT R5 #000C + 0x4C140000, // 0006 LDNIL R5 + 0x1C140605, // 0007 EQ R5 R3 R5 + 0x74160002, // 0008 JMPT R5 #000C + 0x4C140000, // 0009 LDNIL R5 + 0x1C140805, // 000A EQ R5 R4 R5 + 0x78160001, // 000B JMPF R5 #000E + 0x4C140000, // 000C LDNIL R5 + 0x80040A00, // 000D RET 1 R5 + 0x8C140176, // 000E GETMET R5 R0 K118 + 0x5C1C0400, // 000F MOVE R7 R2 + 0x7C140400, // 0010 CALL R5 2 + 0x4C180000, // 0011 LDNIL R6 + 0x1C180A06, // 0012 EQ R6 R5 R6 + 0x781A0005, // 0013 JMPF R6 #001A + 0xB81A0600, // 0014 GETNGBL R6 K3 + 0x88180D78, // 0015 GETMBR R6 R6 K120 + 0x9006EE06, // 0016 SETMBR R1 K119 R6 + 0x4C180000, // 0017 LDNIL R6 + 0x80040C00, // 0018 RET 1 R6 + 0x70020013, // 0019 JMP #002E + 0x8C180B79, // 001A GETMET R6 R5 K121 + 0x5C200600, // 001B MOVE R8 R3 + 0x7C180400, // 001C CALL R6 2 + 0x741A0005, // 001D JMPT R6 #0024 + 0xB81A0600, // 001E GETNGBL R6 K3 + 0x88180D7A, // 001F GETMBR R6 R6 K122 + 0x9006EE06, // 0020 SETMBR R1 K119 R6 + 0x4C180000, // 0021 LDNIL R6 + 0x80040C00, // 0022 RET 1 R6 + 0x70020009, // 0023 JMP #002E + 0x8C180B7B, // 0024 GETMET R6 R5 K123 + 0x5C200600, // 0025 MOVE R8 R3 + 0x5C240800, // 0026 MOVE R9 R4 + 0x7C180600, // 0027 CALL R6 3 + 0x741A0004, // 0028 JMPT R6 #002E + 0xB81A0600, // 0029 GETNGBL R6 K3 + 0x88180D7C, // 002A GETMBR R6 R6 K124 + 0x9006EE06, // 002B SETMBR R1 K119 R6 + 0x4C180000, // 002C LDNIL R6 + 0x80040C00, // 002D RET 1 R6 + 0x80040A00, // 002E RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: clean_remotes +********************************************************************/ +be_local_closure(class_Matter_Device_clean_remotes, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(clean_remotes), + &be_const_str_solidified, + ( &(const binstruction[80]) { /* code */ + 0xA406FA00, // 0000 IMPORT R1 K125 + 0x8808016C, // 0001 GETMBR R2 R0 K108 + 0x780A004B, // 0002 JMPF R2 #004F + 0x60080013, // 0003 GETGBL R2 G19 + 0x7C080000, // 0004 CALL R2 0 + 0x600C0010, // 0005 GETGBL R3 G16 + 0x8810016C, // 0006 GETMBR R4 R0 K108 + 0x7C0C0200, // 0007 CALL R3 1 + 0xA8020003, // 0008 EXBLK 0 #000D + 0x5C100600, // 0009 MOVE R4 R3 + 0x7C100000, // 000A CALL R4 0 + 0x9808090A, // 000B SETIDX R2 R4 K10 + 0x7001FFFB, // 000C JMP #0009 + 0x580C003A, // 000D LDCONST R3 K58 + 0xAC0C0200, // 000E CATCH R3 1 0 + 0xB0080000, // 000F RAISE 2 R0 R0 + 0x600C0010, // 0010 GETGBL R3 G16 + 0x8810010B, // 0011 GETMBR R4 R0 K11 + 0x7C0C0200, // 0012 CALL R3 1 + 0xA802000F, // 0013 EXBLK 0 #0024 + 0x5C100600, // 0014 MOVE R4 R3 + 0x7C100000, // 0015 CALL R4 0 + 0x8C140369, // 0016 GETMET R5 R1 K105 + 0x5C1C0800, // 0017 MOVE R7 R4 + 0x5820007E, // 0018 LDCONST R8 K126 + 0x7C140600, // 0019 CALL R5 3 + 0x4C180000, // 001A LDNIL R6 + 0x20180A06, // 001B NE R6 R5 R6 + 0x781A0005, // 001C JMPF R6 #0023 + 0x8C180532, // 001D GETMET R6 R2 K50 + 0x5C200A00, // 001E MOVE R8 R5 + 0x5824000A, // 001F LDCONST R9 K10 + 0x7C180600, // 0020 CALL R6 3 + 0x00180D21, // 0021 ADD R6 R6 K33 + 0x98080A06, // 0022 SETIDX R2 R5 R6 + 0x7001FFEF, // 0023 JMP #0014 + 0x580C003A, // 0024 LDCONST R3 K58 + 0xAC0C0200, // 0025 CATCH R3 1 0 + 0xB0080000, // 0026 RAISE 2 R0 R0 + 0x600C0012, // 0027 GETGBL R3 G18 + 0x7C0C0000, // 0028 CALL R3 0 + 0x60100010, // 0029 GETGBL R4 G16 + 0x8C140538, // 002A GETMET R5 R2 K56 + 0x7C140200, // 002B CALL R5 1 + 0x7C100200, // 002C CALL R4 1 + 0xA8020008, // 002D EXBLK 0 #0037 + 0x5C140800, // 002E MOVE R5 R4 + 0x7C140000, // 002F CALL R5 0 + 0x94180405, // 0030 GETIDX R6 R2 R5 + 0x1C180D0A, // 0031 EQ R6 R6 K10 + 0x781A0002, // 0032 JMPF R6 #0036 + 0x8C180739, // 0033 GETMET R6 R3 K57 + 0x5C200A00, // 0034 MOVE R8 R5 + 0x7C180400, // 0035 CALL R6 2 + 0x7001FFF6, // 0036 JMP #002E + 0x5810003A, // 0037 LDCONST R4 K58 + 0xAC100200, // 0038 CATCH R4 1 0 + 0xB0080000, // 0039 RAISE 2 R0 R0 + 0x60100010, // 003A GETGBL R4 G16 + 0x5C140600, // 003B MOVE R5 R3 + 0x7C100200, // 003C CALL R4 1 + 0xA802000D, // 003D EXBLK 0 #004C + 0x5C140800, // 003E MOVE R5 R4 + 0x7C140000, // 003F CALL R5 0 + 0xB81A4A00, // 0040 GETNGBL R6 K37 + 0x881C0B80, // 0041 GETMBR R7 R5 K128 + 0x001EFE07, // 0042 ADD R7 K127 R7 + 0x58200061, // 0043 LDCONST R8 K97 + 0x7C180400, // 0044 CALL R6 2 + 0x8C180B54, // 0045 GETMET R6 R5 K84 + 0x7C180200, // 0046 CALL R6 1 + 0x8818016C, // 0047 GETMBR R6 R0 K108 + 0x8C180D72, // 0048 GETMET R6 R6 K114 + 0x88200B80, // 0049 GETMBR R8 R5 K128 + 0x7C180400, // 004A CALL R6 2 + 0x7001FFF1, // 004B JMP #003E + 0x5810003A, // 004C LDCONST R4 K58 + 0xAC100200, // 004D CATCH R4 1 0 + 0xB0080000, // 004E RAISE 2 R0 R0 + 0x80000000, // 004F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: start +********************************************************************/ +be_local_closure(class_Matter_Device_start, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(start), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88040108, // 0000 GETMBR R1 R0 K8 + 0x78060000, // 0001 JMPF R1 #0003 + 0x80000200, // 0002 RET 0 + 0x8C040181, // 0003 GETMET R1 R0 K129 + 0x7C040200, // 0004 CALL R1 1 + 0x8C040182, // 0005 GETMET R1 R0 K130 + 0x880C0183, // 0006 GETMBR R3 R0 K131 + 0x7C040400, // 0007 CALL R1 2 + 0x88040112, // 0008 GETMBR R1 R0 K18 + 0x8C040384, // 0009 GETMET R1 R1 K132 + 0x7C040200, // 000A CALL R1 1 + 0x50040200, // 000B LDBOOL R1 1 0 + 0x90021001, // 000C SETMBR R0 K8 R1 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: msg_send +********************************************************************/ +be_local_closure(class_Matter_Device_msg_send, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(msg_send), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88080173, // 0000 GETMBR R2 R0 K115 + 0x8C080585, // 0001 GETMET R2 R2 K133 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: button_handler +********************************************************************/ +be_local_closure(class_Matter_Device_button_handler, /* name */ + be_nested_proto( + 14, /* nstack */ + 5, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(button_handler), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0x5814000A, // 0000 LDCONST R5 K10 + 0xA41AFA00, // 0001 IMPORT R6 K125 + 0x601C000C, // 0002 GETGBL R7 G12 + 0x8820010B, // 0003 GETMBR R8 R0 K11 + 0x7C1C0200, // 0004 CALL R7 1 + 0x141C0A07, // 0005 LT R7 R5 R7 + 0x781E0010, // 0006 JMPF R7 #0018 + 0x881C010B, // 0007 GETMBR R7 R0 K11 + 0x941C0E05, // 0008 GETIDX R7 R7 R5 + 0x8C200D6D, // 0009 GETMET R8 R6 K109 + 0x5C280E00, // 000A MOVE R10 R7 + 0x582C0020, // 000B LDCONST R11 K32 + 0x7C200600, // 000C CALL R8 3 + 0x78220007, // 000D JMPF R8 #0016 + 0x8820010B, // 000E GETMBR R8 R0 K11 + 0x94201005, // 000F GETIDX R8 R8 R5 + 0x8C201120, // 0010 GETMET R8 R8 K32 + 0x5C280200, // 0011 MOVE R10 R1 + 0x5C2C0400, // 0012 MOVE R11 R2 + 0x5C300600, // 0013 MOVE R12 R3 + 0x5C340800, // 0014 MOVE R13 R4 + 0x7C200A00, // 0015 CALL R8 5 + 0x00140B21, // 0016 ADD R5 R5 K33 + 0x7001FFE9, // 0017 JMP #0002 + 0x80000000, // 0018 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: add_read_sensors_schedule +********************************************************************/ +be_local_closure(class_Matter_Device_add_read_sensors_schedule, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(add_read_sensors_schedule), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88080186, // 0000 GETMBR R2 R0 K134 + 0x4C0C0000, // 0001 LDNIL R3 + 0x1C080403, // 0002 EQ R2 R2 R3 + 0x740A0002, // 0003 JMPT R2 #0007 + 0x88080186, // 0004 GETMBR R2 R0 K134 + 0x24080401, // 0005 GT R2 R2 R1 + 0x780A0005, // 0006 JMPF R2 #000D + 0x90030C01, // 0007 SETMBR R0 K134 R1 + 0xB80A0600, // 0008 GETNGBL R2 K3 + 0x8C080588, // 0009 GETMET R2 R2 K136 + 0x5C100200, // 000A MOVE R4 R1 + 0x7C080400, // 000B CALL R2 2 + 0x90030E02, // 000C SETMBR R0 K135 R2 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: stop +********************************************************************/ +be_local_closure(class_Matter_Device_stop, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(stop), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0xB8060200, // 0000 GETNGBL R1 K1 + 0x8C040389, // 0001 GETMET R1 R1 K137 + 0x5C0C0000, // 0002 MOVE R3 R0 + 0x7C040400, // 0003 CALL R1 2 + 0x88040173, // 0004 GETMBR R1 R0 K115 + 0x78060002, // 0005 JMPF R1 #0009 + 0x88040173, // 0006 GETMBR R1 R0 K115 + 0x8C04038A, // 0007 GETMET R1 R1 K138 + 0x7C040200, // 0008 CALL R1 1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _start_udp +********************************************************************/ +be_local_closure(class_Matter_Device__start_udp, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 1]) { + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(msg_received), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x7C0C0800, // 0005 CALL R3 4 + 0x80040600, // 0006 RET 1 R3 + }) + ), + }), + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(_start_udp), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88080173, // 0000 GETMBR R2 R0 K115 + 0x780A0000, // 0001 JMPF R2 #0003 + 0x80000400, // 0002 RET 0 + 0x4C080000, // 0003 LDNIL R2 + 0x1C080202, // 0004 EQ R2 R1 R2 + 0x780A0000, // 0005 JMPF R2 #0007 + 0x540615A3, // 0006 LDINT R1 5540 + 0xB80A4A00, // 0007 GETNGBL R2 K37 + 0x600C0008, // 0008 GETGBL R3 G8 + 0x5C100200, // 0009 MOVE R4 R1 + 0x7C0C0200, // 000A CALL R3 1 + 0x000F1603, // 000B ADD R3 K139 R3 + 0x58100022, // 000C LDCONST R4 K34 + 0x7C080400, // 000D CALL R2 2 + 0xB80A0600, // 000E GETNGBL R2 K3 + 0x8C08058C, // 000F GETMET R2 R2 K140 + 0x5C100000, // 0010 MOVE R4 R0 + 0x58140057, // 0011 LDCONST R5 K87 + 0x5C180200, // 0012 MOVE R6 R1 + 0x7C080800, // 0013 CALL R2 4 + 0x9002E602, // 0014 SETMBR R0 K115 R2 + 0x88080173, // 0015 GETMBR R2 R0 K115 + 0x8C08058D, // 0016 GETMET R2 R2 K141 + 0x84100000, // 0017 CLOSURE R4 P0 + 0x7C080400, // 0018 CALL R2 2 + 0xA0000000, // 0019 CLOSE R0 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrInfo +********************************************************************/ +be_local_closure(class_Matter_Device_MtrInfo, /* name */ + be_nested_proto( + 10, /* nstack */ + 5, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(MtrInfo), + &be_const_str_solidified, + ( &(const binstruction[40]) { /* code */ + 0x1C140757, // 0000 EQ R5 R3 K87 + 0x7815FFFF, // 0001 JMPF R5 #0002 + 0x1C140757, // 0002 EQ R5 R3 K87 + 0x7816000D, // 0003 JMPF R5 #0012 + 0x60140010, // 0004 GETGBL R5 G16 + 0x8818010B, // 0005 GETMBR R6 R0 K11 + 0x7C140200, // 0006 CALL R5 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C180A00, // 0008 MOVE R6 R5 + 0x7C180000, // 0009 CALL R6 0 + 0x8C1C018E, // 000A GETMET R7 R0 K142 + 0x88240D3F, // 000B GETMBR R9 R6 K63 + 0x7C1C0400, // 000C CALL R7 2 + 0x7001FFF9, // 000D JMP #0008 + 0x5814003A, // 000E LDCONST R5 K58 + 0xAC140200, // 000F CATCH R5 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x70020011, // 0011 JMP #0024 + 0x60140004, // 0012 GETGBL R5 G4 + 0x5C180800, // 0013 MOVE R6 R4 + 0x7C140200, // 0014 CALL R5 1 + 0x1C140B8F, // 0015 EQ R5 R5 K143 + 0x78160003, // 0016 JMPF R5 #001B + 0x8C14018E, // 0017 GETMET R5 R0 K142 + 0x5C1C0800, // 0018 MOVE R7 R4 + 0x7C140400, // 0019 CALL R5 2 + 0x70020008, // 001A JMP #0024 + 0x8C140190, // 001B GETMET R5 R0 K144 + 0x5C1C0600, // 001C MOVE R7 R3 + 0x7C140400, // 001D CALL R5 2 + 0x4C180000, // 001E LDNIL R6 + 0x20180A06, // 001F NE R6 R5 R6 + 0x781A0002, // 0020 JMPF R6 #0024 + 0x8C18018E, // 0021 GETMET R6 R0 K142 + 0x88200B3F, // 0022 GETMBR R8 R5 K63 + 0x7C180400, // 0023 CALL R6 2 + 0xB8160200, // 0024 GETNGBL R5 K1 + 0x8C140B3D, // 0025 GETMET R5 R5 K61 + 0x7C140200, // 0026 CALL R5 1 + 0x80000000, // 0027 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrInfo_one +********************************************************************/ +be_local_closure(class_Matter_Device_MtrInfo_one, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(MtrInfo_one), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x8C080176, // 0000 GETMET R2 R0 K118 + 0x5C100200, // 0001 MOVE R4 R1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0403, // 0004 EQ R3 R2 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80000600, // 0006 RET 0 + 0x8C0C0591, // 0007 GETMET R3 R2 K145 + 0x7C0C0200, // 0008 CALL R3 1 + 0x780E0008, // 0009 JMPF R3 #0013 + 0x60100018, // 000A GETGBL R4 G24 + 0x58140092, // 000B LDCONST R5 K146 + 0x5C180600, // 000C MOVE R6 R3 + 0x7C100400, // 000D CALL R4 2 + 0xB8160200, // 000E GETNGBL R5 K1 + 0x8C140B93, // 000F GETMET R5 R5 K147 + 0x5C1C0800, // 0010 MOVE R7 R4 + 0x58200057, // 0011 LDCONST R8 K87 + 0x7C140600, // 0012 CALL R5 3 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: check_network +********************************************************************/ +be_local_closure(class_Matter_Device_check_network, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(check_network), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x88040108, // 0000 GETMBR R1 R0 K8 + 0x78060000, // 0001 JMPF R1 #0003 + 0x80000200, // 0002 RET 0 + 0xB8060200, // 0003 GETNGBL R1 K1 + 0x8C040394, // 0004 GETMET R1 R1 K148 + 0x7C040200, // 0005 CALL R1 1 + 0x94040395, // 0006 GETIDX R1 R1 K149 + 0x74060004, // 0007 JMPT R1 #000D + 0xB8060200, // 0008 GETNGBL R1 K1 + 0x8C040396, // 0009 GETMET R1 R1 K150 + 0x7C040200, // 000A CALL R1 1 + 0x94040395, // 000B GETIDX R1 R1 K149 + 0x78060001, // 000C JMPF R1 #000F + 0x8C04018D, // 000D GETMET R1 R0 K141 + 0x7C040200, // 000E CALL R1 1 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: _trigger_read_sensors +********************************************************************/ +be_local_closure(class_Matter_Device__trigger_read_sensors, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(_trigger_read_sensors), + &be_const_str_solidified, + ( &(const binstruction[48]) { /* code */ + 0xA4068600, // 0000 IMPORT R1 K67 + 0xB80A0200, // 0001 GETNGBL R2 K1 + 0x8C080597, // 0002 GETMET R2 R2 K151 + 0x7C080200, // 0003 CALL R2 1 + 0xB80E0200, // 0004 GETNGBL R3 K1 + 0x8C0C0798, // 0005 GETMET R3 R3 K152 + 0x58140061, // 0006 LDCONST R5 K97 + 0x7C0C0400, // 0007 CALL R3 2 + 0x780E0006, // 0008 JMPF R3 #0010 + 0xB80E4A00, // 0009 GETNGBL R3 K37 + 0x60100008, // 000A GETGBL R4 G8 + 0x5C140400, // 000B MOVE R5 R2 + 0x7C100200, // 000C CALL R4 1 + 0x00133204, // 000D ADD R4 K153 R4 + 0x58140061, // 000E LDCONST R5 K97 + 0x7C0C0400, // 000F CALL R3 2 + 0x4C0C0000, // 0010 LDNIL R3 + 0x1C0C0403, // 0011 EQ R3 R2 R3 + 0x780E0000, // 0012 JMPF R3 #0014 + 0x80000600, // 0013 RET 0 + 0x8C0C035B, // 0014 GETMET R3 R1 K91 + 0x5C140400, // 0015 MOVE R5 R2 + 0x7C0C0400, // 0016 CALL R3 2 + 0x4C100000, // 0017 LDNIL R4 + 0x20100604, // 0018 NE R4 R3 R4 + 0x7812000D, // 0019 JMPF R4 #0028 + 0x5810000A, // 001A LDCONST R4 K10 + 0x6014000C, // 001B GETGBL R5 G12 + 0x8818010B, // 001C GETMBR R6 R0 K11 + 0x7C140200, // 001D CALL R5 1 + 0x14140805, // 001E LT R5 R4 R5 + 0x78160006, // 001F JMPF R5 #0027 + 0x8814010B, // 0020 GETMBR R5 R0 K11 + 0x94140A04, // 0021 GETIDX R5 R5 R4 + 0x8C140B9A, // 0022 GETMET R5 R5 K154 + 0x5C1C0600, // 0023 MOVE R7 R3 + 0x7C140400, // 0024 CALL R5 2 + 0x00100921, // 0025 ADD R4 R4 K33 + 0x7001FFF3, // 0026 JMP #001B + 0x70020006, // 0027 JMP #002F + 0xB8124A00, // 0028 GETNGBL R4 K37 + 0x60140008, // 0029 GETGBL R5 G8 + 0x5C180400, // 002A MOVE R6 R2 + 0x7C140200, // 002B CALL R5 1 + 0x00173605, // 002C ADD R5 K155 R5 + 0x58180061, // 002D LDCONST R6 K97 + 0x7C100400, // 002E CALL R4 2 + 0x80000000, // 002F RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_plugin_class_arg ********************************************************************/ @@ -3103,14 +2080,14 @@ be_local_closure(class_Matter_Device_get_plugin_class_arg, /* name */ be_str_weak(get_plugin_class_arg), &be_const_str_solidified, ( &(const binstruction[ 9]) { /* code */ - 0x88080151, // 0000 GETMBR R2 R0 K81 - 0x8C080516, // 0001 GETMET R2 R2 K22 + 0x8808019C, // 0000 GETMBR R2 R0 K156 + 0x8C080532, // 0001 GETMET R2 R2 K50 0x5C100200, // 0002 MOVE R4 R1 0x7C080400, // 0003 CALL R2 2 0x780A0001, // 0004 JMPF R2 #0007 - 0x880C05D3, // 0005 GETMBR R3 R2 K211 + 0x880C059D, // 0005 GETMBR R3 R2 K157 0x70020000, // 0006 JMP #0008 - 0x580C000D, // 0007 LDCONST R3 K13 + 0x580C0057, // 0007 LDCONST R3 K87 0x80040600, // 0008 RET 1 R3 }) ) @@ -3118,6 +2095,600 @@ be_local_closure(class_Matter_Device_get_plugin_class_arg, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: bridge_add_endpoint +********************************************************************/ +be_local_closure(class_Matter_Device_bridge_add_endpoint, /* name */ + be_nested_proto( + 16, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(bridge_add_endpoint), + &be_const_str_solidified, + ( &(const binstruction[68]) { /* code */ + 0x880C019C, // 0000 GETMBR R3 R0 K156 + 0x8C0C0732, // 0001 GETMET R3 R3 K50 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x1C100604, // 0005 EQ R4 R3 R4 + 0x78120008, // 0006 JMPF R4 #0010 + 0xB8124A00, // 0007 GETNGBL R4 K37 + 0x60140008, // 0008 GETGBL R5 G8 + 0x5C180200, // 0009 MOVE R6 R1 + 0x7C140200, // 000A CALL R5 1 + 0x00173C05, // 000B ADD R5 K158 R5 + 0x00140B9F, // 000C ADD R5 R5 K159 + 0x58180061, // 000D LDCONST R6 K97 + 0x7C100400, // 000E CALL R4 2 + 0x80000800, // 000F RET 0 + 0x8810010E, // 0010 GETMBR R4 R0 K14 + 0x60140008, // 0011 GETGBL R5 G8 + 0x5C180800, // 0012 MOVE R6 R4 + 0x7C140200, // 0013 CALL R5 1 + 0x5C180600, // 0014 MOVE R6 R3 + 0x5C1C0000, // 0015 MOVE R7 R0 + 0x5C200800, // 0016 MOVE R8 R4 + 0x5C240400, // 0017 MOVE R9 R2 + 0x7C180600, // 0018 CALL R6 3 + 0x881C010B, // 0019 GETMBR R7 R0 K11 + 0x8C1C0F39, // 001A GETMET R7 R7 K57 + 0x5C240C00, // 001B MOVE R9 R6 + 0x7C1C0400, // 001C CALL R7 2 + 0x601C0013, // 001D GETGBL R7 G19 + 0x7C1C0000, // 001E CALL R7 0 + 0x981F4001, // 001F SETIDX R7 K160 R1 + 0x60200010, // 0020 GETGBL R8 G16 + 0x8C240538, // 0021 GETMET R9 R2 K56 + 0x7C240200, // 0022 CALL R9 1 + 0x7C200200, // 0023 CALL R8 1 + 0xA8020004, // 0024 EXBLK 0 #002A + 0x5C241000, // 0025 MOVE R9 R8 + 0x7C240000, // 0026 CALL R9 0 + 0x94280409, // 0027 GETIDX R10 R2 R9 + 0x981C120A, // 0028 SETIDX R7 R9 R10 + 0x7001FFFA, // 0029 JMP #0025 + 0x5820003A, // 002A LDCONST R8 K58 + 0xAC200200, // 002B CATCH R8 1 0 + 0xB0080000, // 002C RAISE 2 R0 R0 + 0xB8224A00, // 002D GETNGBL R8 K37 + 0x60240018, // 002E GETGBL R9 G24 + 0x582800A1, // 002F LDCONST R10 K161 + 0x5C2C0800, // 0030 MOVE R11 R4 + 0x5C300200, // 0031 MOVE R12 R1 + 0x8C3401A2, // 0032 GETMET R13 R0 K162 + 0x5C3C0400, // 0033 MOVE R15 R2 + 0x7C340400, // 0034 CALL R13 2 + 0x7C240800, // 0035 CALL R9 4 + 0x58280022, // 0036 LDCONST R10 K34 + 0x7C200400, // 0037 CALL R8 2 + 0x8820014E, // 0038 GETMBR R8 R0 K78 + 0x98200A07, // 0039 SETIDX R8 R5 R7 + 0x50200200, // 003A LDBOOL R8 1 0 + 0x90021808, // 003B SETMBR R0 K12 R8 + 0x8820010E, // 003C GETMBR R8 R0 K14 + 0x00201121, // 003D ADD R8 R8 K33 + 0x90021C08, // 003E SETMBR R0 K14 R8 + 0x8C20016B, // 003F GETMET R8 R0 K107 + 0x7C200200, // 0040 CALL R8 1 + 0x8C2001A3, // 0041 GETMET R8 R0 K163 + 0x7C200200, // 0042 CALL R8 1 + 0x80040800, // 0043 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: signal_endpoints_changed +********************************************************************/ +be_local_closure(class_Matter_Device_signal_endpoints_changed, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(signal_endpoints_changed), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x8C0401A4, // 0000 GETMET R1 R0 K164 + 0x580C000A, // 0001 LDCONST R3 K10 + 0x5412001C, // 0002 LDINT R4 29 + 0x58140061, // 0003 LDCONST R5 K97 + 0x50180000, // 0004 LDBOOL R6 0 0 + 0x7C040A00, // 0005 CALL R1 5 + 0x8C0401A4, // 0006 GETMET R1 R0 K164 + 0xB80E0600, // 0007 GETNGBL R3 K3 + 0x880C07A5, // 0008 GETMBR R3 R3 K165 + 0x5412001C, // 0009 LDINT R4 29 + 0x58140061, // 000A LDCONST R5 K97 + 0x50180000, // 000B LDBOOL R6 0 0 + 0x7C040A00, // 000C CALL R1 5 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_50ms +********************************************************************/ +be_local_closure(class_Matter_Device_every_50ms, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(every_50ms), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x8C0401A6, // 0000 GETMET R1 R0 K166 + 0x7C040200, // 0001 CALL R1 1 + 0x88040109, // 0002 GETMBR R1 R0 K9 + 0x00040321, // 0003 ADD R1 R1 K33 + 0x90021201, // 0004 SETMBR R0 K9 R1 + 0x88040118, // 0005 GETMBR R1 R0 K24 + 0x8C0403A7, // 0006 GETMET R1 R1 K167 + 0x7C040200, // 0007 CALL R1 1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: reset_param +********************************************************************/ +be_local_closure(class_Matter_Device_reset_param, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(reset_param), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x50040000, // 0000 LDBOOL R1 0 0 + 0x90021801, // 0001 SETMBR R0 K12 R1 + 0x8804010F, // 0002 GETMBR R1 R0 K15 + 0x90021C01, // 0003 SETMBR R0 K14 R1 + 0x8C04016B, // 0004 GETMET R1 R0 K107 + 0x7C040200, // 0005 CALL R1 1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: conf_to_log +********************************************************************/ +be_local_closure(class_Matter_Device_conf_to_log, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 12, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(conf_to_log), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x58040037, // 0000 LDCONST R1 K55 + 0x58080057, // 0001 LDCONST R2 K87 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x8C1003A8, // 0003 GETMET R4 R1 K168 + 0x5C180000, // 0004 MOVE R6 R0 + 0x7C100400, // 0005 CALL R4 2 + 0x7C0C0200, // 0006 CALL R3 1 + 0xA802000B, // 0007 EXBLK 0 #0014 + 0x5C100600, // 0008 MOVE R4 R3 + 0x7C100000, // 0009 CALL R4 0 + 0x1C1409A0, // 000A EQ R5 R4 K160 + 0x78160000, // 000B JMPF R5 #000D + 0x7001FFFA, // 000C JMP #0008 + 0x60140018, // 000D GETGBL R5 G24 + 0x581800A9, // 000E LDCONST R6 K169 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x94200004, // 0010 GETIDX R8 R0 R4 + 0x7C140600, // 0011 CALL R5 3 + 0x00080405, // 0012 ADD R2 R2 R5 + 0x7001FFF3, // 0013 JMP #0008 + 0x580C003A, // 0014 LDCONST R3 K58 + 0xAC0C0200, // 0015 CATCH R3 1 0 + 0xB0080000, // 0016 RAISE 2 R0 R0 + 0x80040400, // 0017 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: k2l_num +********************************************************************/ +be_local_closure(class_Matter_Device_k2l_num, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 12, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(k2l_num), + &be_const_str_solidified, + ( &(const binstruction[52]) { /* code */ + 0x58040037, // 0000 LDCONST R1 K55 + 0x60080012, // 0001 GETGBL R2 G18 + 0x7C080000, // 0002 CALL R2 0 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C0C0003, // 0004 EQ R3 R0 R3 + 0x780E0000, // 0005 JMPF R3 #0007 + 0x80040400, // 0006 RET 1 R2 + 0x600C0010, // 0007 GETGBL R3 G16 + 0x8C100138, // 0008 GETMET R4 R0 K56 + 0x7C100200, // 0009 CALL R4 1 + 0x7C0C0200, // 000A CALL R3 1 + 0xA8020007, // 000B EXBLK 0 #0014 + 0x5C100600, // 000C MOVE R4 R3 + 0x7C100000, // 000D CALL R4 0 + 0x8C140539, // 000E GETMET R5 R2 K57 + 0x601C0009, // 000F GETGBL R7 G9 + 0x5C200800, // 0010 MOVE R8 R4 + 0x7C1C0200, // 0011 CALL R7 1 + 0x7C140400, // 0012 CALL R5 2 + 0x7001FFF7, // 0013 JMP #000C + 0x580C003A, // 0014 LDCONST R3 K58 + 0xAC0C0200, // 0015 CATCH R3 1 0 + 0xB0080000, // 0016 RAISE 2 R0 R0 + 0x600C0010, // 0017 GETGBL R3 G16 + 0x6010000C, // 0018 GETGBL R4 G12 + 0x5C140400, // 0019 MOVE R5 R2 + 0x7C100200, // 001A CALL R4 1 + 0x04100921, // 001B SUB R4 R4 K33 + 0x40124204, // 001C CONNECT R4 K33 R4 + 0x7C0C0200, // 001D CALL R3 1 + 0xA8020010, // 001E EXBLK 0 #0030 + 0x5C100600, // 001F MOVE R4 R3 + 0x7C100000, // 0020 CALL R4 0 + 0x94140404, // 0021 GETIDX R5 R2 R4 + 0x5C180800, // 0022 MOVE R6 R4 + 0x241C0D0A, // 0023 GT R7 R6 K10 + 0x781E0008, // 0024 JMPF R7 #002E + 0x041C0D21, // 0025 SUB R7 R6 K33 + 0x941C0407, // 0026 GETIDX R7 R2 R7 + 0x241C0E05, // 0027 GT R7 R7 R5 + 0x781E0004, // 0028 JMPF R7 #002E + 0x041C0D21, // 0029 SUB R7 R6 K33 + 0x941C0407, // 002A GETIDX R7 R2 R7 + 0x98080C07, // 002B SETIDX R2 R6 R7 + 0x04180D21, // 002C SUB R6 R6 K33 + 0x7001FFF4, // 002D JMP #0023 + 0x98080C05, // 002E SETIDX R2 R6 R5 + 0x7001FFEE, // 002F JMP #001F + 0x580C003A, // 0030 LDCONST R3 K58 + 0xAC0C0200, // 0031 CATCH R3 1 0 + 0xB0080000, // 0032 RAISE 2 R0 R0 + 0x80040400, // 0033 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: MtrUpdate +********************************************************************/ +be_local_closure(class_Matter_Device_MtrUpdate, /* name */ + be_nested_proto( + 18, /* nstack */ + 5, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(MtrUpdate), + &be_const_str_solidified, + ( &(const binstruction[126]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x1C140805, // 0001 EQ R5 R4 R5 + 0x78160004, // 0002 JMPF R5 #0008 + 0xB8160200, // 0003 GETNGBL R5 K1 + 0x8C140BAA, // 0004 GETMET R5 R5 K170 + 0x581C00AB, // 0005 LDCONST R7 K171 + 0x7C140400, // 0006 CALL R5 2 + 0x80040A00, // 0007 RET 1 R5 + 0xB8160200, // 0008 GETNGBL R5 K1 + 0x8C140BAC, // 0009 GETMET R5 R5 K172 + 0x5C1C0800, // 000A MOVE R7 R4 + 0x582000AD, // 000B LDCONST R8 K173 + 0x7C140600, // 000C CALL R5 3 + 0xB81A0200, // 000D GETNGBL R6 K1 + 0x8C180DAC, // 000E GETMET R6 R6 K172 + 0x5C200800, // 000F MOVE R8 R4 + 0x582400AE, // 0010 LDCONST R9 K174 + 0x7C180600, // 0011 CALL R6 3 + 0x74160000, // 0012 JMPT R5 #0014 + 0x781A0064, // 0013 JMPF R6 #0079 + 0x4C1C0000, // 0014 LDNIL R7 + 0x78160010, // 0015 JMPF R5 #0027 + 0x60200009, // 0016 GETGBL R8 G9 + 0x94240805, // 0017 GETIDX R9 R4 R5 + 0x7C200200, // 0018 CALL R8 1 + 0x1824110A, // 0019 LE R9 R8 K10 + 0x78260004, // 001A JMPF R9 #0020 + 0xB8260200, // 001B GETNGBL R9 K1 + 0x8C2413AA, // 001C GETMET R9 R9 K170 + 0x582C00AF, // 001D LDCONST R11 K175 + 0x7C240400, // 001E CALL R9 2 + 0x80041200, // 001F RET 1 R9 + 0x8C240176, // 0020 GETMET R9 R0 K118 + 0x5C2C1000, // 0021 MOVE R11 R8 + 0x7C240400, // 0022 CALL R9 2 + 0x5C1C1200, // 0023 MOVE R7 R9 + 0x8C240972, // 0024 GETMET R9 R4 K114 + 0x5C2C0A00, // 0025 MOVE R11 R5 + 0x7C240400, // 0026 CALL R9 2 + 0x781A0009, // 0027 JMPF R6 #0032 + 0x4C200000, // 0028 LDNIL R8 + 0x1C200E08, // 0029 EQ R8 R7 R8 + 0x78220003, // 002A JMPF R8 #002F + 0x8C200190, // 002B GETMET R8 R0 K144 + 0x94280806, // 002C GETIDX R10 R4 R6 + 0x7C200400, // 002D CALL R8 2 + 0x5C1C1000, // 002E MOVE R7 R8 + 0x8C200972, // 002F GETMET R8 R4 K114 + 0x5C280C00, // 0030 MOVE R10 R6 + 0x7C200400, // 0031 CALL R8 2 + 0x4C200000, // 0032 LDNIL R8 + 0x1C200E08, // 0033 EQ R8 R7 R8 + 0x78220004, // 0034 JMPF R8 #003A + 0xB8220200, // 0035 GETNGBL R8 K1 + 0x8C2011AA, // 0036 GETMET R8 R8 K170 + 0x582800B0, // 0037 LDCONST R10 K176 + 0x7C200400, // 0038 CALL R8 2 + 0x80041000, // 0039 RET 1 R8 + 0x88200FB1, // 003A GETMBR R8 R7 K177 + 0x74220004, // 003B JMPT R8 #0041 + 0xB8220200, // 003C GETNGBL R8 K1 + 0x8C2011AA, // 003D GETMET R8 R8 K170 + 0x582800B2, // 003E LDCONST R10 K178 + 0x7C200400, // 003F CALL R8 2 + 0x80041000, // 0040 RET 1 R8 + 0x8C200FB3, // 0041 GETMET R8 R7 K179 + 0x7C200200, // 0042 CALL R8 1 + 0x60240013, // 0043 GETGBL R9 G19 + 0x7C240000, // 0044 CALL R9 0 + 0x60280010, // 0045 GETGBL R10 G16 + 0x8C2C0938, // 0046 GETMET R11 R4 K56 + 0x7C2C0200, // 0047 CALL R11 1 + 0x7C280200, // 0048 CALL R10 1 + 0xA8020016, // 0049 EXBLK 0 #0061 + 0x5C2C1400, // 004A MOVE R11 R10 + 0x7C2C0000, // 004B CALL R11 0 + 0xB8320200, // 004C GETNGBL R12 K1 + 0x8C3019B4, // 004D GETMET R12 R12 K180 + 0x5C381000, // 004E MOVE R14 R8 + 0x5C3C1600, // 004F MOVE R15 R11 + 0x7C300600, // 0050 CALL R12 3 + 0x4C340000, // 0051 LDNIL R13 + 0x1C34180D, // 0052 EQ R13 R12 R13 + 0x78360008, // 0053 JMPF R13 #005D + 0xB8360200, // 0054 GETNGBL R13 K1 + 0x8C341BAA, // 0055 GETMET R13 R13 K170 + 0x603C0018, // 0056 GETGBL R15 G24 + 0x584000B5, // 0057 LDCONST R16 K181 + 0x5C441600, // 0058 MOVE R17 R11 + 0x7C3C0400, // 0059 CALL R15 2 + 0x7C340400, // 005A CALL R13 2 + 0xA8040001, // 005B EXBLK 1 1 + 0x80001A00, // 005C RET 0 + 0x9434100C, // 005D GETIDX R13 R8 R12 + 0x9438080B, // 005E GETIDX R14 R4 R11 + 0x98241A0E, // 005F SETIDX R9 R13 R14 + 0x7001FFE8, // 0060 JMP #004A + 0x5828003A, // 0061 LDCONST R10 K58 + 0xAC280200, // 0062 CATCH R10 1 0 + 0xB0080000, // 0063 RAISE 2 R0 R0 + 0x8C280FB6, // 0064 GETMET R10 R7 K182 + 0x5C301200, // 0065 MOVE R12 R9 + 0x7C280400, // 0066 CALL R10 2 + 0x8C280F91, // 0067 GETMET R10 R7 K145 + 0x7C280200, // 0068 CALL R10 1 + 0x782A000A, // 0069 JMPF R10 #0075 + 0x602C0018, // 006A GETGBL R11 G24 + 0x583000B7, // 006B LDCONST R12 K183 + 0x5C340200, // 006C MOVE R13 R1 + 0x5C381400, // 006D MOVE R14 R10 + 0x7C2C0600, // 006E CALL R11 3 + 0xB8320200, // 006F GETNGBL R12 K1 + 0x8C3019B8, // 0070 GETMET R12 R12 K184 + 0x5C381600, // 0071 MOVE R14 R11 + 0x7C300400, // 0072 CALL R12 2 + 0x80041800, // 0073 RET 1 R12 + 0x70020003, // 0074 JMP #0079 + 0xB82E0200, // 0075 GETNGBL R11 K1 + 0x8C2C173D, // 0076 GETMET R11 R11 K61 + 0x7C2C0200, // 0077 CALL R11 1 + 0x80041600, // 0078 RET 1 R11 + 0xB81E0200, // 0079 GETNGBL R7 K1 + 0x8C1C0FAA, // 007A GETMET R7 R7 K170 + 0x582400B9, // 007B LDCONST R9 K185 + 0x7C1C0400, // 007C CALL R7 2 + 0x80000000, // 007D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: event_fabrics_saved +********************************************************************/ +be_local_closure(class_Matter_Device_event_fabrics_saved, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(event_fabrics_saved), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040115, // 0000 GETMBR R1 R0 K21 + 0x8C0403BA, // 0001 GETMET R1 R1 K186 + 0x7C040200, // 0002 CALL R1 1 + 0x2404030A, // 0003 GT R1 R1 K10 + 0x78060005, // 0004 JMPF R1 #000B + 0x8804010C, // 0005 GETMBR R1 R0 K12 + 0x74060003, // 0006 JMPT R1 #000B + 0x50040200, // 0007 LDBOOL R1 1 0 + 0x90021801, // 0008 SETMBR R0 K12 R1 + 0x8C04016B, // 0009 GETMET R1 R0 K107 + 0x7C040200, // 000A CALL R1 1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: process_attribute_expansion +********************************************************************/ +be_local_closure(class_Matter_Device_process_attribute_expansion, /* name */ + be_nested_proto( + 12, /* nstack */ + 3, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(process_attribute_expansion), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x880C033F, // 0000 GETMBR R3 R1 K63 + 0x88100340, // 0001 GETMBR R4 R1 K64 + 0x88140341, // 0002 GETMBR R5 R1 K65 + 0xB81A0600, // 0003 GETNGBL R6 K3 + 0x8C180DBB, // 0004 GETMET R6 R6 K187 + 0x5C200000, // 0005 MOVE R8 R0 + 0x7C180400, // 0006 CALL R6 2 + 0x8C1C0D8D, // 0007 GETMET R7 R6 K141 + 0x5C240600, // 0008 MOVE R9 R3 + 0x5C280800, // 0009 MOVE R10 R4 + 0x5C2C0A00, // 000A MOVE R11 R5 + 0x7C1C0800, // 000B CALL R7 4 + 0x8C1C0DBC, // 000C GETMET R7 R6 K188 + 0x7C1C0200, // 000D CALL R7 1 + 0x4C200000, // 000E LDNIL R8 + 0x8C240DBD, // 000F GETMET R9 R6 K189 + 0x7C240200, // 0010 CALL R9 1 + 0x5C201200, // 0011 MOVE R8 R9 + 0x4C280000, // 0012 LDNIL R10 + 0x2024120A, // 0013 NE R9 R9 R10 + 0x78260005, // 0014 JMPF R9 #001B + 0x5C240400, // 0015 MOVE R9 R2 + 0x8C280DBE, // 0016 GETMET R10 R6 K190 + 0x7C280200, // 0017 CALL R10 1 + 0x5C2C1000, // 0018 MOVE R11 R8 + 0x7C240400, // 0019 CALL R9 2 + 0x7001FFF3, // 001A JMP #000F + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(class_Matter_Device_invoke_request, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x5810000A, // 0000 LDCONST R4 K10 + 0x8814073F, // 0001 GETMBR R5 R3 K63 + 0x6018000C, // 0002 GETGBL R6 G12 + 0x881C010B, // 0003 GETMBR R7 R0 K11 + 0x7C180200, // 0004 CALL R6 1 + 0x14180806, // 0005 LT R6 R4 R6 + 0x781A000C, // 0006 JMPF R6 #0014 + 0x8818010B, // 0007 GETMBR R6 R0 K11 + 0x94180C04, // 0008 GETIDX R6 R6 R4 + 0x881C0D3F, // 0009 GETMBR R7 R6 K63 + 0x1C1C0E05, // 000A EQ R7 R7 R5 + 0x781E0005, // 000B JMPF R7 #0012 + 0x8C1C0DBF, // 000C GETMET R7 R6 K191 + 0x5C240200, // 000D MOVE R9 R1 + 0x5C280400, // 000E MOVE R10 R2 + 0x5C2C0600, // 000F MOVE R11 R3 + 0x7C1C0800, // 0010 CALL R7 4 + 0x80040E00, // 0011 RET 1 R7 + 0x00100921, // 0012 ADD R4 R4 K33 + 0x7001FFED, // 0013 JMP #0002 + 0xB81A0600, // 0014 GETNGBL R6 K3 + 0x88180D78, // 0015 GETMBR R6 R6 K120 + 0x900EEE06, // 0016 SETMBR R3 K119 R6 + 0x80000000, // 0017 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_remotes_info ********************************************************************/ @@ -3137,21 +2708,21 @@ be_local_closure(class_Matter_Device_update_remotes_info, /* name */ ( &(const binstruction[33]) { /* code */ 0x60040013, // 0000 GETGBL R1 G19 0x7C040000, // 0001 CALL R1 0 - 0x88080176, // 0002 GETMBR R2 R0 K118 + 0x8808016C, // 0002 GETMBR R2 R0 K108 0x4C0C0000, // 0003 LDNIL R3 0x20080403, // 0004 NE R2 R2 R3 0x780A0018, // 0005 JMPF R2 #001F 0x60080010, // 0006 GETGBL R2 G16 - 0x880C0176, // 0007 GETMBR R3 R0 K118 - 0x8C0C0746, // 0008 GETMET R3 R3 K70 + 0x880C016C, // 0007 GETMBR R3 R0 K108 + 0x8C0C0738, // 0008 GETMET R3 R3 K56 0x7C0C0200, // 0009 CALL R3 1 0x7C080200, // 000A CALL R2 1 0xA802000F, // 000B EXBLK 0 #001C 0x5C0C0400, // 000C MOVE R3 R2 0x7C0C0000, // 000D CALL R3 0 - 0x88100176, // 000E GETMBR R4 R0 K118 + 0x8810016C, // 000E GETMBR R4 R0 K108 0x94100803, // 000F GETIDX R4 R4 R3 - 0x8C1009D4, // 0010 GETMET R4 R4 K212 + 0x8C1009C0, // 0010 GETMET R4 R4 K192 0x7C100200, // 0011 CALL R4 1 0x4C140000, // 0012 LDNIL R5 0x20140805, // 0013 NE R5 R4 R5 @@ -3159,14 +2730,14 @@ be_local_closure(class_Matter_Device_update_remotes_info, /* name */ 0x6014000C, // 0015 GETGBL R5 G12 0x5C180800, // 0016 MOVE R6 R4 0x7C140200, // 0017 CALL R5 1 - 0x24140B06, // 0018 GT R5 R5 K6 + 0x24140B0A, // 0018 GT R5 R5 K10 0x78160000, // 0019 JMPF R5 #001B 0x98040604, // 001A SETIDX R1 R3 R4 0x7001FFEF, // 001B JMP #000C - 0x58080011, // 001C LDCONST R2 K17 + 0x5808003A, // 001C LDCONST R2 K58 0xAC080200, // 001D CATCH R2 1 0 0xB0080000, // 001E RAISE 2 R0 R0 - 0x90022A01, // 001F SETMBR R0 K21 R1 + 0x90021A01, // 001F SETMBR R0 K13 R1 0x80040200, // 0020 RET 1 R1 }) ) @@ -3175,72 +2746,439 @@ be_local_closure(class_Matter_Device_update_remotes_info, /* name */ /******************************************************************** -** Solidified function: k2l +** Solidified function: get_plugin_class_displayname ********************************************************************/ -be_local_closure(class_Matter_Device_k2l, /* name */ +be_local_closure(class_Matter_Device_get_plugin_class_displayname, /* name */ be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 12, /* varg */ + 5, /* nstack */ + 2, /* argc */ + 10, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ &be_ktab_class_Matter_Device, /* shared constants */ - be_str_weak(k2l), + be_str_weak(get_plugin_class_displayname), &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0x5804000C, // 0000 LDCONST R1 K12 + ( &(const binstruction[ 9]) { /* code */ + 0x8808019C, // 0000 GETMBR R2 R0 K156 + 0x8C080532, // 0001 GETMET R2 R2 K50 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x780A0001, // 0004 JMPF R2 #0007 + 0x880C05C1, // 0005 GETMBR R3 R2 K193 + 0x70020000, // 0006 JMP #0008 + 0x580C0057, // 0007 LDCONST R3 K87 + 0x80040600, // 0008 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: bridge_remove_endpoint +********************************************************************/ +be_local_closure(class_Matter_Device_bridge_remove_endpoint, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(bridge_remove_endpoint), + &be_const_str_solidified, + ( &(const binstruction[56]) { /* code */ + 0xA40A8600, // 0000 IMPORT R2 K67 + 0x600C0008, // 0001 GETGBL R3 G8 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C0C0200, // 0003 CALL R3 1 + 0x4C100000, // 0004 LDNIL R4 + 0x4C140000, // 0005 LDNIL R5 + 0x8818014E, // 0006 GETMBR R6 R0 K78 + 0x8C180D6D, // 0007 GETMET R6 R6 K109 + 0x5C200600, // 0008 MOVE R8 R3 + 0x7C180400, // 0009 CALL R6 2 + 0x741A0004, // 000A JMPT R6 #0010 + 0xB81A4A00, // 000B GETNGBL R6 K37 + 0x001F8403, // 000C ADD R7 K194 R3 + 0x58200061, // 000D LDCONST R8 K97 + 0x7C180400, // 000E CALL R6 2 + 0x80000C00, // 000F RET 0 + 0xB81A4A00, // 0010 GETNGBL R6 K37 + 0x601C0018, // 0011 GETGBL R7 G24 + 0x582000C3, // 0012 LDCONST R8 K195 + 0x5C240200, // 0013 MOVE R9 R1 + 0x7C1C0400, // 0014 CALL R7 2 + 0x58200022, // 0015 LDCONST R8 K34 + 0x7C180400, // 0016 CALL R6 2 + 0x8818014E, // 0017 GETMBR R6 R0 K78 + 0x8C180D72, // 0018 GETMET R6 R6 K114 + 0x5C200600, // 0019 MOVE R8 R3 + 0x7C180400, // 001A CALL R6 2 + 0x50180200, // 001B LDBOOL R6 1 0 + 0x90021806, // 001C SETMBR R0 K12 R6 + 0x5818000A, // 001D LDCONST R6 K10 + 0x601C000C, // 001E GETGBL R7 G12 + 0x8820010B, // 001F GETMBR R8 R0 K11 + 0x7C1C0200, // 0020 CALL R7 1 + 0x141C0C07, // 0021 LT R7 R6 R7 + 0x781E000D, // 0022 JMPF R7 #0031 + 0x881C010B, // 0023 GETMBR R7 R0 K11 + 0x941C0E06, // 0024 GETIDX R7 R7 R6 + 0x8C1C0F23, // 0025 GETMET R7 R7 K35 + 0x7C1C0200, // 0026 CALL R7 1 + 0x1C1C0207, // 0027 EQ R7 R1 R7 + 0x781E0005, // 0028 JMPF R7 #002F + 0x881C010B, // 0029 GETMBR R7 R0 K11 + 0x8C1C0F72, // 002A GETMET R7 R7 K114 + 0x5C240C00, // 002B MOVE R9 R6 + 0x7C1C0400, // 002C CALL R7 2 + 0x70020002, // 002D JMP #0031 + 0x70020000, // 002E JMP #0030 + 0x00180D21, // 002F ADD R6 R6 K33 + 0x7001FFEC, // 0030 JMP #001E + 0x8C1C01C4, // 0031 GETMET R7 R0 K196 + 0x7C1C0200, // 0032 CALL R7 1 + 0x8C1C016B, // 0033 GETMET R7 R0 K107 + 0x7C1C0200, // 0034 CALL R7 1 + 0x8C1C01A3, // 0035 GETMET R7 R0 K163 + 0x7C1C0200, // 0036 CALL R7 1 + 0x80000000, // 0037 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: check_config_ep +********************************************************************/ +be_local_closure(class_Matter_Device_check_config_ep, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(check_config_ep), + &be_const_str_solidified, + ( &(const binstruction[77]) { /* code */ + 0x50040000, // 0000 LDBOOL R1 0 0 0x60080012, // 0001 GETGBL R2 G18 0x7C080000, // 0002 CALL R2 0 - 0x4C0C0000, // 0003 LDNIL R3 - 0x1C0C0003, // 0004 EQ R3 R0 R3 - 0x780E0000, // 0005 JMPF R3 #0007 - 0x80040400, // 0006 RET 1 R2 - 0x600C0010, // 0007 GETGBL R3 G16 - 0x8C100146, // 0008 GETMET R4 R0 K70 - 0x7C100200, // 0009 CALL R4 1 + 0x600C0010, // 0003 GETGBL R3 G16 + 0x8810014E, // 0004 GETMBR R4 R0 K78 + 0x8C100938, // 0005 GETMET R4 R4 K56 + 0x7C100200, // 0006 CALL R4 1 + 0x7C0C0200, // 0007 CALL R3 1 + 0xA8020007, // 0008 EXBLK 0 #0011 + 0x5C100600, // 0009 MOVE R4 R3 + 0x7C100000, // 000A CALL R4 0 + 0x8C140539, // 000B GETMET R5 R2 K57 + 0x601C0009, // 000C GETGBL R7 G9 + 0x5C200800, // 000D MOVE R8 R4 + 0x7C1C0200, // 000E CALL R7 1 + 0x7C140400, // 000F CALL R5 2 + 0x7001FFF7, // 0010 JMP #0009 + 0x580C003A, // 0011 LDCONST R3 K58 + 0xAC0C0200, // 0012 CATCH R3 1 0 + 0xB0080000, // 0013 RAISE 2 R0 R0 + 0x600C0010, // 0014 GETGBL R3 G16 + 0x5C100400, // 0015 MOVE R4 R2 + 0x7C0C0200, // 0016 CALL R3 1 + 0xA8020030, // 0017 EXBLK 0 #0049 + 0x5C100600, // 0018 MOVE R4 R3 + 0x7C100000, // 0019 CALL R4 0 + 0x1C14090A, // 001A EQ R5 R4 K10 + 0x7816000B, // 001B JMPF R5 #0028 + 0xB8164A00, // 001C GETNGBL R5 K37 + 0x581800C5, // 001D LDCONST R6 K197 + 0x581C0022, // 001E LDCONST R7 K34 + 0x7C140400, // 001F CALL R5 2 + 0x8814014E, // 0020 GETMBR R5 R0 K78 + 0x8C140B72, // 0021 GETMET R5 R5 K114 + 0x601C0008, // 0022 GETGBL R7 G8 + 0x5C200800, // 0023 MOVE R8 R4 + 0x7C1C0200, // 0024 CALL R7 1 + 0x7C140400, // 0025 CALL R5 2 + 0x50040200, // 0026 LDBOOL R1 1 0 + 0x7002001F, // 0027 JMP #0048 + 0xB8160600, // 0028 GETNGBL R5 K3 + 0x88140BA5, // 0029 GETMBR R5 R5 K165 + 0x1C140805, // 002A EQ R5 R4 R5 + 0x7816001B, // 002B JMPF R5 #0048 + 0x50040200, // 002C LDBOOL R1 1 0 + 0xB8164A00, // 002D GETNGBL R5 K37 + 0x60180018, // 002E GETGBL R6 G24 + 0x581C00C6, // 002F LDCONST R7 K198 + 0x5C200800, // 0030 MOVE R8 R4 + 0x8824010E, // 0031 GETMBR R9 R0 K14 + 0x7C180600, // 0032 CALL R6 3 + 0x581C0022, // 0033 LDCONST R7 K34 + 0x7C140400, // 0034 CALL R5 2 + 0x60140008, // 0035 GETGBL R5 G8 + 0x8818010E, // 0036 GETMBR R6 R0 K14 + 0x7C140200, // 0037 CALL R5 1 + 0x8818014E, // 0038 GETMBR R6 R0 K78 + 0x601C0008, // 0039 GETGBL R7 G8 + 0x5C200800, // 003A MOVE R8 R4 + 0x7C1C0200, // 003B CALL R7 1 + 0x8820014E, // 003C GETMBR R8 R0 K78 + 0x941C1007, // 003D GETIDX R7 R8 R7 + 0x98180A07, // 003E SETIDX R6 R5 R7 + 0x8814014E, // 003F GETMBR R5 R0 K78 + 0x8C140B72, // 0040 GETMET R5 R5 K114 + 0x601C0008, // 0041 GETGBL R7 G8 + 0x5C200800, // 0042 MOVE R8 R4 + 0x7C1C0200, // 0043 CALL R7 1 + 0x7C140400, // 0044 CALL R5 2 + 0x8814010E, // 0045 GETMBR R5 R0 K14 + 0x00140B21, // 0046 ADD R5 R5 K33 + 0x90021C05, // 0047 SETMBR R0 K14 R5 + 0x7001FFCE, // 0048 JMP #0018 + 0x580C003A, // 0049 LDCONST R3 K58 + 0xAC0C0200, // 004A CATCH R3 1 0 + 0xB0080000, // 004B RAISE 2 R0 R0 + 0x80040200, // 004C RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_sensors_scheduler +********************************************************************/ +be_local_closure(class_Matter_Device_read_sensors_scheduler, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(read_sensors_scheduler), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x88040186, // 0000 GETMBR R1 R0 K134 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060000, // 0003 JMPF R1 #0005 + 0x80000200, // 0004 RET 0 + 0x88040187, // 0005 GETMBR R1 R0 K135 + 0x1C04030A, // 0006 EQ R1 R1 K10 + 0x74060004, // 0007 JMPT R1 #000D + 0xB8060200, // 0008 GETNGBL R1 K1 + 0x8C0403C7, // 0009 GETMET R1 R1 K199 + 0x880C0187, // 000A GETMBR R3 R0 K135 + 0x7C040400, // 000B CALL R1 2 + 0x78060006, // 000C JMPF R1 #0014 + 0x8C0401C8, // 000D GETMET R1 R0 K200 + 0x7C040200, // 000E CALL R1 1 + 0xB8060200, // 000F GETNGBL R1 K1 + 0x8C0403C9, // 0010 GETMET R1 R1 K201 + 0x880C0186, // 0011 GETMBR R3 R0 K134 + 0x7C040400, // 0012 CALL R1 2 + 0x90030E01, // 0013 SETMBR R0 K135 R1 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: save_before_restart +********************************************************************/ +be_local_closure(class_Matter_Device_save_before_restart, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(save_before_restart), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88040112, // 0000 GETMBR R1 R0 K18 + 0x8C04033C, // 0001 GETMET R1 R1 K60 + 0x7C040200, // 0002 CALL R1 1 + 0x88040112, // 0003 GETMBR R1 R0 K18 + 0x8C0403CA, // 0004 GETMET R1 R1 K202 + 0x7C040200, // 0005 CALL R1 1 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: adjust_next_ep +********************************************************************/ +be_local_closure(class_Matter_Device_adjust_next_ep, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(adjust_next_ep), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x60040010, // 0000 GETGBL R1 G16 + 0x8808014E, // 0001 GETMBR R2 R0 K78 + 0x8C080538, // 0002 GETMET R2 R2 K56 + 0x7C080200, // 0003 CALL R2 1 + 0x7C040200, // 0004 CALL R1 1 + 0xA802000A, // 0005 EXBLK 0 #0011 + 0x5C080200, // 0006 MOVE R2 R1 + 0x7C080000, // 0007 CALL R2 0 + 0x600C0009, // 0008 GETGBL R3 G9 + 0x5C100400, // 0009 MOVE R4 R2 0x7C0C0200, // 000A CALL R3 1 - 0xA8020005, // 000B EXBLK 0 #0012 - 0x5C100600, // 000C MOVE R4 R3 - 0x7C100000, // 000D CALL R4 0 - 0x8C140542, // 000E GETMET R5 R2 K66 - 0x5C1C0800, // 000F MOVE R7 R4 - 0x7C140400, // 0010 CALL R5 2 - 0x7001FFF9, // 0011 JMP #000C - 0x580C0011, // 0012 LDCONST R3 K17 - 0xAC0C0200, // 0013 CATCH R3 1 0 - 0xB0080000, // 0014 RAISE 2 R0 R0 - 0x600C0010, // 0015 GETGBL R3 G16 - 0x6010000C, // 0016 GETGBL R4 G12 - 0x5C140400, // 0017 MOVE R5 R2 - 0x7C100200, // 0018 CALL R4 1 - 0x04100914, // 0019 SUB R4 R4 K20 - 0x40122804, // 001A CONNECT R4 K20 R4 - 0x7C0C0200, // 001B CALL R3 1 - 0xA8020010, // 001C EXBLK 0 #002E - 0x5C100600, // 001D MOVE R4 R3 - 0x7C100000, // 001E CALL R4 0 - 0x94140404, // 001F GETIDX R5 R2 R4 - 0x5C180800, // 0020 MOVE R6 R4 - 0x241C0D06, // 0021 GT R7 R6 K6 - 0x781E0008, // 0022 JMPF R7 #002C - 0x041C0D14, // 0023 SUB R7 R6 K20 - 0x941C0407, // 0024 GETIDX R7 R2 R7 - 0x241C0E05, // 0025 GT R7 R7 R5 - 0x781E0004, // 0026 JMPF R7 #002C - 0x041C0D14, // 0027 SUB R7 R6 K20 - 0x941C0407, // 0028 GETIDX R7 R2 R7 - 0x98080C07, // 0029 SETIDX R2 R6 R7 - 0x04180D14, // 002A SUB R6 R6 K20 - 0x7001FFF4, // 002B JMP #0021 - 0x98080C05, // 002C SETIDX R2 R6 R5 - 0x7001FFEE, // 002D JMP #001D - 0x580C0011, // 002E LDCONST R3 K17 - 0xAC0C0200, // 002F CATCH R3 1 0 - 0xB0080000, // 0030 RAISE 2 R0 R0 - 0x80040400, // 0031 RET 1 R2 + 0x8810010E, // 000B GETMBR R4 R0 K14 + 0x28100604, // 000C GE R4 R3 R4 + 0x78120001, // 000D JMPF R4 #0010 + 0x00100721, // 000E ADD R4 R3 K33 + 0x90021C04, // 000F SETMBR R0 K14 R4 + 0x7001FFF4, // 0010 JMP #0006 + 0x5804003A, // 0011 LDCONST R1 K58 + 0xAC040200, // 0012 CATCH R1 1 0 + 0xB0080000, // 0013 RAISE 2 R0 R0 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +be_local_closure(class_Matter_Device_every_250ms, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x8C0401CB, // 0000 GETMET R1 R0 K203 + 0x7C040200, // 0001 CALL R1 1 + 0x5804000A, // 0002 LDCONST R1 K10 + 0x6008000C, // 0003 GETGBL R2 G12 + 0x880C010B, // 0004 GETMBR R3 R0 K11 + 0x7C080200, // 0005 CALL R2 1 + 0x14080202, // 0006 LT R2 R1 R2 + 0x780A0005, // 0007 JMPF R2 #000E + 0x8808010B, // 0008 GETMBR R2 R0 K11 + 0x94080401, // 0009 GETIDX R2 R2 R1 + 0x8C0805CC, // 000A GETMET R2 R2 K204 + 0x7C080200, // 000B CALL R2 1 + 0x00040321, // 000C ADD R1 R1 K33 + 0x7001FFF4, // 000D JMP #0003 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: autoconf_device +********************************************************************/ +be_local_closure(class_Matter_Device_autoconf_device, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 10, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + &be_ktab_class_Matter_Device, /* shared constants */ + be_str_weak(autoconf_device), + &be_const_str_solidified, + ( &(const binstruction[50]) { /* code */ + 0xA4068600, // 0000 IMPORT R1 K67 + 0x6008000C, // 0001 GETGBL R2 G12 + 0x880C010B, // 0002 GETMBR R3 R0 K11 + 0x7C080200, // 0003 CALL R2 1 + 0x2408050A, // 0004 GT R2 R2 K10 + 0x780A0000, // 0005 JMPF R2 #0007 + 0x80000400, // 0006 RET 0 + 0x880801CD, // 0007 GETMBR R2 R0 K205 + 0x4C0C0000, // 0008 LDNIL R3 + 0x1C080403, // 0009 EQ R2 R2 R3 + 0x780A0004, // 000A JMPF R2 #0010 + 0xB80A0600, // 000B GETNGBL R2 K3 + 0x8C0805CE, // 000C GETMET R2 R2 K206 + 0x5C100000, // 000D MOVE R4 R0 + 0x7C080400, // 000E CALL R2 2 + 0x90039A02, // 000F SETMBR R0 K205 R2 + 0x8808010C, // 0010 GETMBR R2 R0 K12 + 0x740A000F, // 0011 JMPT R2 #0022 + 0x880801CD, // 0012 GETMBR R2 R0 K205 + 0x8C0805CF, // 0013 GETMET R2 R2 K207 + 0x7C080200, // 0014 CALL R2 1 + 0x90029C02, // 0015 SETMBR R0 K78 R2 + 0x60080013, // 0016 GETGBL R2 G19 + 0x7C080000, // 0017 CALL R2 0 + 0x90021A02, // 0018 SETMBR R0 K13 R2 + 0x8C080162, // 0019 GETMET R2 R0 K98 + 0x7C080200, // 001A CALL R2 1 + 0xB80A4A00, // 001B GETNGBL R2 K37 + 0x600C0008, // 001C GETGBL R3 G8 + 0x8810014E, // 001D GETMBR R4 R0 K78 + 0x7C0C0200, // 001E CALL R3 1 + 0x000FA003, // 001F ADD R3 K208 R3 + 0x58100061, // 0020 LDCONST R4 K97 + 0x7C080400, // 0021 CALL R2 2 + 0x880801CD, // 0022 GETMBR R2 R0 K205 + 0x8C0805D1, // 0023 GETMET R2 R2 K209 + 0x8810014E, // 0024 GETMBR R4 R0 K78 + 0x7C080400, // 0025 CALL R2 2 + 0x8808010C, // 0026 GETMBR R2 R0 K12 + 0x740A0008, // 0027 JMPT R2 #0031 + 0x88080115, // 0028 GETMBR R2 R0 K21 + 0x8C0805BA, // 0029 GETMET R2 R2 K186 + 0x7C080200, // 002A CALL R2 1 + 0x2408050A, // 002B GT R2 R2 K10 + 0x780A0003, // 002C JMPF R2 #0031 + 0x50080200, // 002D LDBOOL R2 1 0 + 0x90021802, // 002E SETMBR R0 K12 R2 + 0x8C08016B, // 002F GETMET R2 R0 K107 + 0x7C080200, // 0030 CALL R2 1 + 0x80000000, // 0031 RET 0 }) ) ); @@ -3253,46 +3191,18 @@ be_local_closure(class_Matter_Device_k2l, /* name */ be_local_class(Matter_Device, 23, NULL, - be_nested_map(79, + be_nested_map(80, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(received_ack, -1), be_const_closure(class_Matter_Device_received_ack_closure) }, - { be_const_key_weak(add_read_sensors_schedule, -1), be_const_closure(class_Matter_Device_add_read_sensors_schedule_closure) }, - { be_const_key_weak(plugins, -1), be_const_var(1) }, - { be_const_key_weak(debug, -1), be_const_var(20) }, - { be_const_key_weak(autoconf, -1), be_const_var(9) }, - { be_const_key_weak(message_handler, -1), be_const_var(7) }, - { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(class_Matter_Device_event_fabrics_saved_closure) }, - { be_const_key_weak(save_before_restart, -1), be_const_closure(class_Matter_Device_save_before_restart_closure) }, - { be_const_key_weak(probe_sensor_time, 63), be_const_var(21) }, - { be_const_key_weak(conf_to_log, 53), be_const_static_closure(class_Matter_Device_conf_to_log_closure) }, - { be_const_key_weak(EP, 72), be_const_int(2) }, - { be_const_key_weak(ui, -1), be_const_var(11) }, - { be_const_key_weak(root_passcode, -1), be_const_var(16) }, - { be_const_key_weak(find_plugin_by_endpoint, -1), be_const_closure(class_Matter_Device_find_plugin_by_endpoint_closure) }, - { be_const_key_weak(UDP_PORT, 40), be_const_int(5540) }, - { be_const_key_weak(disable_bridge_mode, -1), be_const_var(18) }, - { be_const_key_weak(remove_fabric, -1), be_const_closure(class_Matter_Device_remove_fabric_closure) }, - { be_const_key_weak(resolve_attribute_read_solo, 66), be_const_closure(class_Matter_Device_resolve_attribute_read_solo_closure) }, - { be_const_key_weak(signal_endpoints_changed, -1), be_const_closure(class_Matter_Device_signal_endpoints_changed_closure) }, - { be_const_key_weak(autoconf_device, 69), be_const_closure(class_Matter_Device_autoconf_device_closure) }, - { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(class_Matter_Device__trigger_read_sensors_closure) }, - { be_const_key_weak(get_active_endpoints, -1), be_const_closure(class_Matter_Device_get_active_endpoints_closure) }, - { be_const_key_weak(profiler, -1), be_const_var(6) }, - { be_const_key_weak(msg_send, 3), be_const_closure(class_Matter_Device_msg_send_closure) }, - { be_const_key_weak(stop, 31), be_const_closure(class_Matter_Device_stop_closure) }, - { be_const_key_weak(adjust_next_ep, -1), be_const_closure(class_Matter_Device_adjust_next_ep_closure) }, - { be_const_key_weak(msg_received, 50), be_const_closure(class_Matter_Device_msg_received_closure) }, + { be_const_key_weak(probe_sensor_time, 5), be_const_var(21) }, { be_const_key_weak(button_pressed, -1), be_const_closure(class_Matter_Device_button_pressed_closure) }, - { be_const_key_weak(FILENAME, 44), be_nested_str_weak(_matter_device_X2Ejson) }, - { be_const_key_weak(root_discriminator, -1), be_const_var(15) }, - { be_const_key_weak(start, -1), be_const_closure(class_Matter_Device_start_closure) }, - { be_const_key_weak(MtrJoin, 46), be_const_closure(class_Matter_Device_MtrJoin_closure) }, - { be_const_key_weak(MtrInfo_one, -1), be_const_closure(class_Matter_Device_MtrInfo_one_closure) }, - { be_const_key_weak(get_plugin_class_displayname, -1), be_const_closure(class_Matter_Device_get_plugin_class_displayname_closure) }, - { be_const_key_weak(plugins_config, -1), be_const_var(3) }, - { be_const_key_weak(http_remotes, 11), be_const_var(14) }, - { be_const_key_weak(get_plugin_remote_info, 13), be_const_closure(class_Matter_Device_get_plugin_remote_info_closure) }, - { be_const_key_weak(plugins_classes, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(button_multi_pressed, -1), be_const_closure(class_Matter_Device_button_multi_pressed_closure) }, + { be_const_key_weak(root_passcode, -1), be_const_var(16) }, + { be_const_key_weak(find_plugin_by_endpoint, 75), be_const_closure(class_Matter_Device_find_plugin_by_endpoint_closure) }, + { be_const_key_weak(every_250ms, 9), be_const_closure(class_Matter_Device_every_250ms_closure) }, + { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) }, + { be_const_key_weak(remove_fabric, 47), be_const_closure(class_Matter_Device_remove_fabric_closure) }, + { be_const_key_weak(msg_received, 64), be_const_closure(class_Matter_Device_msg_received_closure) }, + { be_const_key_weak(plugins_classes, 61), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(53, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, @@ -3349,47 +3259,76 @@ be_local_class(Matter_Device, { be_const_key_weak(rain, -1), be_const_class(be_class_Matter_Plugin_Sensor_Rain) }, { be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) }, })) ) } )) }, - { be_const_key_weak(tick, 49), be_const_var(12) }, - { be_const_key_weak(check_config_ep, 41), be_const_closure(class_Matter_Device_check_config_ep_closure) }, - { be_const_key_weak(MtrUpdate, 58), be_const_closure(class_Matter_Device_MtrUpdate_closure) }, - { be_const_key_weak(clean_remotes, -1), be_const_closure(class_Matter_Device_clean_remotes_closure) }, - { be_const_key_weak(every_second, -1), be_const_closure(class_Matter_Device_every_second_closure) }, - { be_const_key_weak(udp_server, -1), be_const_var(5) }, + { be_const_key_weak(add_read_sensors_schedule, -1), be_const_closure(class_Matter_Device_add_read_sensors_schedule_closure) }, + { be_const_key_weak(register_commands, 59), be_const_closure(class_Matter_Device_register_commands_closure) }, + { be_const_key_weak(k2l, -1), be_const_static_closure(class_Matter_Device_k2l_closure) }, + { be_const_key_weak(http_remotes, -1), be_const_var(14) }, + { be_const_key_weak(MtrJoin, -1), be_const_closure(class_Matter_Device_MtrJoin_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Device_attribute_updated_closure) }, + { be_const_key_weak(find_plugin_by_friendly_name, 32), be_const_closure(class_Matter_Device_find_plugin_by_friendly_name_closure) }, + { be_const_key_weak(save_before_restart, 57), be_const_closure(class_Matter_Device_save_before_restart_closure) }, + { be_const_key_weak(save_param, 6), be_const_closure(class_Matter_Device_save_param_closure) }, + { be_const_key_weak(load_param, -1), be_const_closure(class_Matter_Device_load_param_closure) }, { be_const_key_weak(register_http_remote, -1), be_const_closure(class_Matter_Device_register_http_remote_closure) }, - { be_const_key_weak(k2l_num, -1), be_const_static_closure(class_Matter_Device_k2l_num_closure) }, - { be_const_key_weak(reset_param, -1), be_const_closure(class_Matter_Device_reset_param_closure) }, - { be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_Device_every_250ms_closure) }, - { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(class_Matter_Device_process_attribute_expansion_closure) }, - { be_const_key_weak(probe_sensor_timestamp, -1), be_const_var(22) }, - { be_const_key_weak(button_multi_pressed, 1), be_const_closure(class_Matter_Device_button_multi_pressed_closure) }, - { be_const_key_weak(VENDOR_ID, 64), be_const_int(65521) }, + { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) }, + { be_const_key_weak(sort_distinct, 77), be_const_static_closure(class_Matter_Device_sort_distinct_closure) }, + { be_const_key_weak(read_sensors_scheduler, -1), be_const_closure(class_Matter_Device_read_sensors_scheduler_closure) }, + { be_const_key_weak(received_ack, -1), be_const_closure(class_Matter_Device_received_ack_closure) }, + { be_const_key_weak(every_second, -1), be_const_closure(class_Matter_Device_every_second_closure) }, + { be_const_key_weak(plugins, -1), be_const_var(1) }, + { be_const_key_weak(get_plugin_remote_info, 54), be_const_closure(class_Matter_Device_get_plugin_remote_info_closure) }, + { be_const_key_weak(sessions, -1), be_const_var(10) }, + { be_const_key_weak(resolve_attribute_read_solo, -1), be_const_closure(class_Matter_Device_resolve_attribute_read_solo_closure) }, + { be_const_key_weak(clean_remotes, -1), be_const_closure(class_Matter_Device_clean_remotes_closure) }, + { be_const_key_weak(start, -1), be_const_closure(class_Matter_Device_start_closure) }, + { be_const_key_weak(next_ep, 1), be_const_var(19) }, + { be_const_key_weak(msg_send, -1), be_const_closure(class_Matter_Device_msg_send_closure) }, + { be_const_key_weak(button_handler, -1), be_const_closure(class_Matter_Device_button_handler_closure) }, + { be_const_key_weak(init, 10), be_const_closure(class_Matter_Device_init_closure) }, + { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, + { be_const_key_weak(stop, -1), be_const_closure(class_Matter_Device_stop_closure) }, + { be_const_key_weak(_start_udp, -1), be_const_closure(class_Matter_Device__start_udp_closure) }, + { be_const_key_weak(probe_sensor_timestamp, 73), be_const_var(22) }, + { be_const_key_weak(ipv4only, 60), be_const_var(17) }, + { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) }, { be_const_key_weak(MtrInfo, -1), be_const_closure(class_Matter_Device_MtrInfo_closure) }, { be_const_key_weak(events, -1), be_const_var(13) }, - { be_const_key_weak(ipv4only, -1), be_const_var(17) }, - { be_const_key_weak(commissioning, -1), be_const_var(8) }, - { be_const_key_weak(load_param, -1), be_const_closure(class_Matter_Device_load_param_closure) }, - { be_const_key_weak(sessions, 55), be_const_var(10) }, - { be_const_key_weak(every_50ms, -1), be_const_closure(class_Matter_Device_every_50ms_closure) }, - { be_const_key_weak(register_commands, -1), be_const_closure(class_Matter_Device_register_commands_closure) }, - { be_const_key_weak(next_ep, -1), be_const_var(19) }, - { be_const_key_weak(save_param, -1), be_const_closure(class_Matter_Device_save_param_closure) }, - { be_const_key_weak(bridge_remove_endpoint, -1), be_const_closure(class_Matter_Device_bridge_remove_endpoint_closure) }, - { be_const_key_weak(_start_udp, -1), be_const_closure(class_Matter_Device__start_udp_closure) }, - { be_const_key_weak(bridge_add_endpoint, -1), be_const_closure(class_Matter_Device_bridge_add_endpoint_closure) }, - { be_const_key_weak(read_sensors_scheduler, -1), be_const_closure(class_Matter_Device_read_sensors_scheduler_closure) }, - { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Device_attribute_updated_closure) }, - { be_const_key_weak(find_plugin_by_friendly_name, 43), be_const_closure(class_Matter_Device_find_plugin_by_friendly_name_closure) }, - { be_const_key_weak(plugins_config_remotes, -1), be_const_var(4) }, - { be_const_key_weak(plugins_persist, -1), be_const_var(2) }, - { be_const_key_weak(sort_distinct, 37), be_const_static_closure(class_Matter_Device_sort_distinct_closure) }, - { be_const_key_weak(started, 32), be_const_var(0) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Device_init_closure) }, - { be_const_key_weak(invoke_request, 22), be_const_closure(class_Matter_Device_invoke_request_closure) }, - { be_const_key_weak(button_handler, 14), be_const_closure(class_Matter_Device_button_handler_closure) }, - { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(class_Matter_Device_get_plugin_class_arg_closure) }, { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) }, + { be_const_key_weak(MtrInfo_one, -1), be_const_closure(class_Matter_Device_MtrInfo_one_closure) }, + { be_const_key_weak(started, 69), be_const_var(0) }, + { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(class_Matter_Device__trigger_read_sensors_closure) }, + { be_const_key_weak(EP, -1), be_const_int(2) }, + { be_const_key_weak(disable_bridge_mode, -1), be_const_var(18) }, + { be_const_key_weak(ui, 76), be_const_var(11) }, + { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(class_Matter_Device_get_plugin_class_arg_closure) }, + { be_const_key_weak(profiler, -1), be_const_var(6) }, + { be_const_key_weak(bridge_add_endpoint, -1), be_const_closure(class_Matter_Device_bridge_add_endpoint_closure) }, + { be_const_key_weak(invoke_request, 50), be_const_closure(class_Matter_Device_invoke_request_closure) }, + { be_const_key_weak(signal_endpoints_changed, -1), be_const_closure(class_Matter_Device_signal_endpoints_changed_closure) }, + { be_const_key_weak(reset_param, -1), be_const_closure(class_Matter_Device_reset_param_closure) }, + { be_const_key_weak(plugins_config, 56), be_const_var(3) }, + { be_const_key_weak(plugins_config_remotes, 17), be_const_var(4) }, + { be_const_key_weak(MtrUpdate, 26), be_const_closure(class_Matter_Device_MtrUpdate_closure) }, + { be_const_key_weak(commissioning, -1), be_const_var(8) }, + { be_const_key_weak(conf_to_log, 53), be_const_static_closure(class_Matter_Device_conf_to_log_closure) }, + { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(class_Matter_Device_event_fabrics_saved_closure) }, + { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(class_Matter_Device_process_attribute_expansion_closure) }, + { be_const_key_weak(every_50ms, -1), be_const_closure(class_Matter_Device_every_50ms_closure) }, { be_const_key_weak(update_remotes_info, -1), be_const_closure(class_Matter_Device_update_remotes_info_closure) }, - { be_const_key_weak(k2l, -1), be_const_static_closure(class_Matter_Device_k2l_closure) }, + { be_const_key_weak(get_plugin_class_displayname, -1), be_const_closure(class_Matter_Device_get_plugin_class_displayname_closure) }, + { be_const_key_weak(bridge_remove_endpoint, -1), be_const_closure(class_Matter_Device_bridge_remove_endpoint_closure) }, + { be_const_key_weak(autoconf, 43), be_const_var(9) }, + { be_const_key_weak(check_network, -1), be_const_closure(class_Matter_Device_check_network_closure) }, + { be_const_key_weak(udp_server, -1), be_const_var(5) }, + { be_const_key_weak(k2l_num, 23), be_const_static_closure(class_Matter_Device_k2l_num_closure) }, + { be_const_key_weak(debug, 21), be_const_var(20) }, + { be_const_key_weak(message_handler, -1), be_const_var(7) }, + { be_const_key_weak(adjust_next_ep, -1), be_const_closure(class_Matter_Device_adjust_next_ep_closure) }, + { be_const_key_weak(tick, -1), be_const_var(12) }, + { be_const_key_weak(get_active_endpoints, -1), be_const_closure(class_Matter_Device_get_active_endpoints_closure) }, + { be_const_key_weak(root_discriminator, -1), be_const_var(15) }, + { be_const_key_weak(check_config_ep, 3), be_const_closure(class_Matter_Device_check_config_ep_closure) }, + { be_const_key_weak(autoconf_device, -1), be_const_closure(class_Matter_Device_autoconf_device_closure) }, })), be_str_weak(Matter_Device) ); From 5c30d9262765a4ce45047cbb05949528ad8e87ab Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 25 Aug 2024 23:10:48 +0200 Subject: [PATCH 021/144] BearSSL panic on ESP8266 in rare conditions (#22017) --- CHANGELOG.md | 1 + .../bearssl-esp8266/src/ec/ec_prime_i15.c | 2 +- .../bearssl-esp8266/src/rsa/rsa_i15_priv.c | 6 ++--- lib/lib_ssl/bearssl-esp8266/src/t_inner.h | 6 ++--- lib/lib_ssl/tls_mini/src/StackThunk_light.cpp | 22 +++++++++++++++++++ lib/lib_ssl/tls_mini/src/StackThunk_light.h | 2 ++ 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffefd0bf0..4c12efde0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. - Matter fixed UI bug when no endpoints configured - Zigbee extend timeout for MCU reboot from 5s to 10s - Matter fix when Rules are disabled +- BearSSL panic on ESP8266 in rare conditions ### Removed diff --git a/lib/lib_ssl/bearssl-esp8266/src/ec/ec_prime_i15.c b/lib/lib_ssl/bearssl-esp8266/src/ec/ec_prime_i15.c index 63d90fcf1..62bf46d05 100644 --- a/lib/lib_ssl/bearssl-esp8266/src/ec/ec_prime_i15.c +++ b/lib/lib_ssl/bearssl-esp8266/src/ec/ec_prime_i15.c @@ -465,7 +465,7 @@ run_code(jacobian *P1, const jacobian *P2, memcpy(t[P1x], P1->c, 3 * I15_LEN * sizeof(uint16_t)); memcpy(t[P2x], P2->c, 3 * I15_LEN * sizeof(uint16_t)); - optimistic_yield(10000); + stack_thunk_yield(); /* * Run formulas. diff --git a/lib/lib_ssl/bearssl-esp8266/src/rsa/rsa_i15_priv.c b/lib/lib_ssl/bearssl-esp8266/src/rsa/rsa_i15_priv.c index 6c09a427c..b456a069e 100644 --- a/lib/lib_ssl/bearssl-esp8266/src/rsa/rsa_i15_priv.c +++ b/lib/lib_ssl/bearssl-esp8266/src/rsa/rsa_i15_priv.c @@ -141,7 +141,7 @@ br_rsa_i15_private(unsigned char *x, const br_rsa_private_key *sk) mp = mq + 2 * fwlen; memmove(mp, t1, fwlen * sizeof *t1); - optimistic_yield(10000); + stack_thunk_yield(); /* * Compute s2 = x^dq mod q. @@ -152,7 +152,7 @@ br_rsa_i15_private(unsigned char *x, const br_rsa_private_key *sk) r &= br_i15_modpow_opt(s2, sk->dq, sk->dqlen, mq, q0i, mq + 3 * fwlen, TLEN - 3 * fwlen); - optimistic_yield(10000); + stack_thunk_yield(); /* * Compute s1 = x^dq mod q. @@ -184,7 +184,7 @@ br_rsa_i15_private(unsigned char *x, const br_rsa_private_key *sk) br_i15_decode_reduce(t1, sk->iq, sk->iqlen, mp); br_i15_montymul(t2, s1, t1, mp, p0i); - optimistic_yield(10000); + stack_thunk_yield(); /* * h is now in t2. We compute the final result: diff --git a/lib/lib_ssl/bearssl-esp8266/src/t_inner.h b/lib/lib_ssl/bearssl-esp8266/src/t_inner.h index d5fecd71b..de08990e5 100644 --- a/lib/lib_ssl/bearssl-esp8266/src/t_inner.h +++ b/lib/lib_ssl/bearssl-esp8266/src/t_inner.h @@ -2598,16 +2598,16 @@ br_cpuid(uint32_t mask_eax, uint32_t mask_ebx, #define _debugBearSSL (0) #ifdef ESP8266 - extern void optimistic_yield(uint32_t); + extern void stack_thunk_yield(void); #else - #define optimistic_yield(ignored) + #define stack_thunk_yield(ignored) #endif #ifdef __cplusplus } #endif #else - #define optimistic_yield(ignored) + #define stack_thunk_yield(ignored) #endif #ifdef ESP32 diff --git a/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp b/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp index f41c8df59..098752c88 100644 --- a/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp +++ b/lib/lib_ssl/tls_mini/src/StackThunk_light.cpp @@ -35,6 +35,9 @@ extern "C" { +extern void yield(); +extern bool can_yield(); + uint32_t *stack_thunk_light_ptr = NULL; uint32_t *stack_thunk_light_top = NULL; uint32_t *stack_thunk_light_save = NULL; /* Saved A1 while in BearSSL */ @@ -48,6 +51,25 @@ uint32_t stack_thunk_light_refcnt = 0; #endif #define _stackPaint 0xdeadbeef +void stack_thunk_yield() +{ + if (can_yield()) { + uint32_t tmp; + register uint32_t* save __asm__("a3") = stack_thunk_light_save; + + __asm__ __volatile__ ( + "mov.n %0, a1\n\t" + "mov.n a1, %1\n\t" + : "=r"(tmp) : "r"(save) : "memory"); + + yield(); + + __asm__ __volatile__ ( + "mov.n a1, %0\n\t" + :: "r"(tmp) : "memory"); + } +} + /* Add a reference, and allocate the stack if necessary */ void stack_thunk_light_add_ref() { diff --git a/lib/lib_ssl/tls_mini/src/StackThunk_light.h b/lib/lib_ssl/tls_mini/src/StackThunk_light.h index 9fa562655..ca6701422 100644 --- a/lib/lib_ssl/tls_mini/src/StackThunk_light.h +++ b/lib/lib_ssl/tls_mini/src/StackThunk_light.h @@ -32,6 +32,8 @@ extern "C" { #endif +extern void stack_thunk_yield(); + extern void stack_thunk_light_add_ref(); extern void stack_thunk_light_del_ref(); extern void stack_thunk_light_repaint(); From c35c493809f3f0cde3a74d7e002c86a782c1c248 Mon Sep 17 00:00:00 2001 From: gemu Date: Mon, 26 Aug 2024 08:48:35 +0200 Subject: [PATCH 022/144] i2s wav player (#22003) * i2s wav player * move framepointer --- .../Display_Renderer-gemu-1.0/src/renderer.h | 1 + lib/lib_display/UDisplay/uDisplay.h | 2 +- .../tasmota_xdrv_driver/xdrv_10_scripter.ino | 209 +++++++++++++++++- 3 files changed, 207 insertions(+), 5 deletions(-) diff --git a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h index a40e28f9f..3515ee008 100644 --- a/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h +++ b/lib/lib_display/Display_Renderer-gemu-1.0/src/renderer.h @@ -106,6 +106,7 @@ public: dim_cb dim_cbp = 0; LVGL_PARAMS lvgl_param; int8_t disp_bpp; + uint16_t *rgb_fb; private: void DrawCharAt(int16_t x, int16_t y, char ascii_char,int16_t colored); inline void drawFastVLineInternal(int16_t x, int16_t y, int16_t h, uint16_t color) __attribute__((always_inline)); diff --git a/lib/lib_display/UDisplay/uDisplay.h b/lib/lib_display/UDisplay/uDisplay.h index c054bd9c6..ca8de0c5f 100755 --- a/lib/lib_display/UDisplay/uDisplay.h +++ b/lib/lib_display/UDisplay/uDisplay.h @@ -396,7 +396,7 @@ class uDisplay : public Renderer { #if ESP_IDF_VERSION_MAJOR < 5 esp_rgb_panel_t *_rgb_panel; #endif //ESP_IDF_VERSION_MAJOR < 5 - uint16_t *rgb_fb; + esp_lcd_i80_bus_handle_t _i80_bus = nullptr; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino index ad5789b9d..6d5e25634 100755 --- a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino @@ -185,6 +185,12 @@ char *Get_esc_char(char *cp, char *esc_chr); #endif #endif // ESP32 +#ifdef ESP32 +#include "driver/i2s_std.h" +#include "driver/i2s_pdm.h" +#endif + + #ifdef SCRIPT_FULL_OPTIONS #undef USE_BUTTON_EVENT @@ -722,8 +728,15 @@ typedef struct { uint16_t ufs_script_size; +#ifdef USE_PLAY_WAVE +#ifdef ESP32 + i2s_chan_handle_t tx_handle; +#endif +#endif + } SCRIPT_MEM; + SCRIPT_MEM glob_script_mem; @@ -792,6 +805,7 @@ int32_t script_ow(uint8_t sel, uint32_t val); int32_t script_logfile_write(char *path, char *payload, uint32_t size); void script_sort_array(TS_FLOAT *array, uint16_t size); uint32_t Touch_Status(int32_t sel); +int32_t play_wave(char *path); void ScriptEverySecond(void) { @@ -4877,7 +4891,7 @@ char *Plugin_Query(uint8_t, uint8_t); len++; goto exit; } -#if defined(ESP32) && (defined(USE_I2S_AUDIO) || defined(USE_TTGO_WATCH) || defined(USE_M5STACK_CORE2)) +#if defined(ESP32) && defined(USE_I2S_AUDIO) if (!strncmp_XP(lp, XPSTR("pl("), 3)) { char path[SCRIPT_MAX_SBSIZE]; lp = GetStringArgument(lp + 3, OPER_EQU, path, 0); @@ -4952,6 +4966,14 @@ char *Plugin_Query(uint8_t, uint8_t); goto exit; } +#ifdef USE_PLAY_WAVE + if (!strncmp_XP(lp, XPSTR("pwav("), 5)) { + char str[SCRIPT_MAX_SBSIZE]; + lp = GetStringArgument(lp + 5, OPER_EQU, str, 0); + fvar = play_wave(str); + goto nfuncexit; + } +#endif // USE_PLAY_WAVE break; case 'r': @@ -6621,6 +6643,169 @@ char *getop(char *lp, uint8_t *operand) { return lp; } + + +#ifdef USE_PLAY_WAVE + +#ifdef ESP8266 +#include +#include +/* +i2S on ESP8266 +dout = 3 (RX) +clk = 15 (D8) +ws = 2 (D4) +*/ +#endif // ESP8266 + + +// RIFF header +typedef struct { + uint32_t ChunkID; //"RIFF" + uint32_t ChunkSize; //"36 + sizeof(wav_data_t) + data" + uint32_t Format; // "WAV" +} wav_riff_t; + +// FMT header +typedef struct { + uint32_t Subchunk1ID; //"fmt " + uint32_t Subchunk1Size; //16 (PCM) + uint16_t AudioFormat; // 1 'cause PCM + uint16_t NumChannels; // mono = 1; stereo = 2 + uint32_t SampleRate; // 8000, 44100, etc. + uint32_t ByteRate; //== SampleRate * NumChannels * byte + uint16_t BlockAlign; //== NumChannels * bytePerSample + uint16_t BytesPerSample; //8 byte = 8, 16 byte = 16, etc. +} wav_fmt_t; + +// Data header +typedef struct { + uint32_t Subchunk2ID; //"data" + uint32_t Subchunk2Size; //== NumSamples * NumChannels * bytePerSample/8 +} wav_data_t; + + +// complete header +typedef struct { + wav_riff_t Riff; + wav_fmt_t Fmt; + wav_data_t Data; +} wav_header_t; + + +// we assume 1 channel with 8khz +int32_t play_wave(char *path) { + + +#ifdef ESP32 + if (path[0] == 'i' && path[1] == ':') { + // get esp32 i2s pins + char *cp = &path[2]; + uint8_t bck = strtol(cp, &cp, 10); + cp++; + uint8_t ws = strtol(cp, &cp, 10); + cp++; + uint8_t dout = strtol(cp, &cp, 10); + cp++; + uint8_t mode = strtol(cp, &cp, 10); + + i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); + i2s_new_channel(&chan_cfg, &glob_script_mem.tx_handle, NULL); + + i2s_std_slot_config_t slot_cfg; + switch (mode) { + case 0: + slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO); + break; + case 1: + slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO); + break; + default: + slot_cfg = I2S_STD_PCM_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO); + break; + } + + i2s_std_config_t std_cfg = { + .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(8000), + .slot_cfg = slot_cfg, + .gpio_cfg = { + .mclk = I2S_GPIO_UNUSED, + .bclk = (gpio_num_t)bck, + .ws = (gpio_num_t)ws, + .dout = (gpio_num_t)dout, + .din = I2S_GPIO_UNUSED, + .invert_flags = { + .mclk_inv = false, + .bclk_inv = false, + .ws_inv = false, + }, + }, + }; + + /* Initialize the channel */ + i2s_channel_init_std_mode(glob_script_mem.tx_handle, &std_cfg); + return 0; + } +#endif + +File wf = ufsp->open(path, FS_FILE_READ); + if (!wf) { + return -1; + } + + int16_t buffer[512]; + + uint32_t fsize = wf.size(); + + // check for RIFF + wf.readBytes((char*)buffer, sizeof(wav_header_t)); + wav_header_t *wh = (wav_header_t *)buffer; + // 0x52494646 + if (wh->Riff.ChunkID != 0x46464952 && wh->Fmt.NumChannels != 1) { + wf.close(); + return -2; + } + fsize -= sizeof(wav_header_t); + +#ifdef ESP8266 + i2s_begin(); + i2s_set_rate(wh->Fmt.SampleRate); + + while (wf.position() < fsize) { + int numBytes = _min(sizeof(buffer), fsize - wf.position() - 1); + int bytesread = wf.readBytes((char*)buffer, numBytes); + if (!bytesread) { + break; + } + for (int i = 0; i < numBytes / 2; i++) { + i2s_write_sample(buffer[i]); + OsWatchLoop(); + } + } + + i2s_end(); +#endif // ESP8266 + +#ifdef ESP32 + i2s_channel_enable(glob_script_mem.tx_handle); + while (wf.position() < fsize) { + int numBytes = _min(sizeof(buffer), fsize - wf.position() - 1); + int bytesread = wf.readBytes((char*)buffer, numBytes); + if (!bytesread) { + break; + } + i2s_channel_write(glob_script_mem.tx_handle, buffer, numBytes, nullptr, 100); + OsWatchLoop(); + } + i2s_channel_disable(glob_script_mem.tx_handle); +#endif // ESP32 + + wf.close(); + return 0; +} +#endif // USE_PLAY_WAVE + + #ifdef USE_SCRIPT_FATFS_EXT #ifdef USE_UFILESYS int32_t script_logfile_write(char *path, char *payload, uint32_t size) { @@ -8823,13 +9008,14 @@ bool Is_gpio_used(uint8_t gpiopin) { } void ScripterEvery100ms(void) { + static uint8_t xsns_index = 0; + if (bitRead(Settings->rule_enabled, 0) && (TasmotaGlobal.uptime > 4)) { if (GetNextSensor()) { //Run_Scripter(">T", 2, ResponseData()); if (glob_script_mem.teleperiod) Run_Scripter(glob_script_mem.teleperiod, 0, ResponseData()); } } - if (bitRead(Settings->rule_enabled, 0)) { if (glob_script_mem.fast_script) Run_Scripter1(glob_script_mem.fast_script, 0, 0); } @@ -10648,9 +10834,10 @@ uint32_t fsize; #define fileHeaderSize 14 #define infoHeaderSize 40 - if (renderer && renderer->framebuffer) { + if (renderer && (renderer->framebuffer || renderer->rgb_fb)) { uint8_t *bp = renderer->framebuffer; - uint8_t *lbuf = (uint8_t*)special_malloc(Settings->display_width * 3 + 2); + uint16_t *dwp = renderer->rgb_fb; + uint8_t *lbuf = (uint8_t*)special_malloc(Settings->display_width * 3 + 6); memset(lbuf, 0, Settings->display_width * 3); if (!lbuf) return -3; uint8_t dmflg = 0; @@ -10728,6 +10915,19 @@ uint32_t fsize; #endif } } + } else if (bpp == 16) { + // RGB displays have RAM display buffer only ESP32 S3 + lbp = lbuf; + dwp = renderer->rgb_fb + ((Settings->display_height - lins - 1) * Settings->display_width); + for (uint32_t cols = 0; cols < Settings->display_width; cols++) { + uint16_t color = *dwp++; + if (renderer->lvgl_pars()->swap_color) { + color = (color >> 8) | (color << 8); + } + *lbp++ = (color &0x001f) << 3; // B (5 bit) + *lbp++ = (color &0x07e0) >> 3; // >> 5 G (6 bit) + *lbp++ = (color &0xf800) >> 8; // >> 10 R (5 bit) + } } else { // one bit for (uint32_t cols = 0; cols < Settings->display_width; cols += 8) { @@ -10748,6 +10948,7 @@ uint32_t fsize; } } client.write((const char*)lbuf, Settings->display_width * 3); + client.flush(); } } if (lbuf) free(lbuf); From 88c9ae3273e782ad08da06c84d9cae78e5839310 Mon Sep 17 00:00:00 2001 From: pkkrusty <79770016+pkkrusty@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:49:48 +0000 Subject: [PATCH 023/144] Clarify MAX7219 display driver (#21977) MAX7219 and MAX7219_MATRIX are different displays and require different defines. DisplayModel19 incorrectly listed for MAX7219 instead of MAX7219_MATRIX. --- tasmota/my_user_config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index d18952b07..27e66f017 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -789,8 +789,9 @@ #endif // USE_I2C // #define USE_DISPLAY // Add I2C/TM1637/MAX7219 Display Support (+2k code) -// #define USE_DISPLAY_TM1637 // [DisplayModel 15] Enable TM1637 Module -// #define USE_DISPLAY_MAX7219 // [DisplayModel 19] Enable MAX7219 Module +// #define USE_DISPLAY_TM1637 // [DisplayModel 15] Enable TM1637 Seven Segment Display Module (4-6 digits) +// #define USE_DISPLAY_MAX7219 // [DisplayModel 15] Enable MAX7219 Seven Segment Display Module (8 digits) +// #define USE_DISPLAY_MAX7219_MATRIX // [DisplayModel 19] Enable MAX7219 8x8 Matrix Display // -- Universal Display Driver --------------------------------- // #define USE_UNIVERSAL_DISPLAY // New universal display driver for both I2C and SPI From 1ad4a1377bbb0edc16838a9d11d7c75dd378f4cd Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:56:20 +0200 Subject: [PATCH 024/144] Update changelogs --- CHANGELOG.md | 8 ++++---- RELEASENOTES.md | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c12efde0..97f30a34c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,10 +12,10 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed -- Matter fixed UI bug when no endpoints configured -- Zigbee extend timeout for MCU reboot from 5s to 10s -- Matter fix when Rules are disabled -- BearSSL panic on ESP8266 in rare conditions +- Matter fixed UI bug when no endpoints configured (#22008) +- Zigbee extend timeout for MCU reboot from 5s to 10s (#22009) +- Matter fix when Rules are disabled (#22016) +- BearSSL panic on ESP8266 in rare conditions (#22017) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index b1874d94d..e3c49447e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -137,6 +137,10 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Energy calculation [#20653](https://github.com/arendst/Tasmota/issues/20653) - Shutter timing registers overflow [#21966](https://github.com/arendst/Tasmota/issues/21966) - PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968) +- BearSSL panic on ESP8266 in rare conditions [#22017](https://github.com/arendst/Tasmota/issues/22017) +- Zigbee extend timeout for MCU reboot from 5s to 10s [#22009](https://github.com/arendst/Tasmota/issues/22009) +- Matter fixed UI bug when no endpoints configured [#22008](https://github.com/arendst/Tasmota/issues/22008) +- Matter fix when Rules are disabled [#22016](https://github.com/arendst/Tasmota/issues/22016) ### Removed - ESP8266 Analog input support using energy driver as only one channel is available From fefd49c66364ddd578ffbc12edbf9ae1c9bc04d3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:14:59 +0200 Subject: [PATCH 025/144] Remove dash from GUI title --- tasmota/html_compressed/HTTP_HEADER1_ES6.h | 20 ++++++++++---------- tasmota/html_uncompressed/HTTP_HEADER1_ES6.h | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tasmota/html_compressed/HTTP_HEADER1_ES6.h b/tasmota/html_compressed/HTTP_HEADER1_ES6.h index 662e6bdce..b92414770 100644 --- a/tasmota/html_compressed/HTTP_HEADER1_ES6.h +++ b/tasmota/html_compressed/HTTP_HEADER1_ES6.h @@ -2,7 +2,7 @@ // compressed by tools/unishox/compress-html-uncompressed.py ///////////////////////////////////////////////////////////////////// -const size_t HTTP_HEADER1_SIZE = 685; +const size_t HTTP_HEADER1_SIZE = 683; const char HTTP_HEADER1_COMPRESSED[] PROGMEM = "\x3D\x0F\xE1\x10\x98\x1D\x19\x0C\x64\x85\x50\xD0\x8F\xC3\xD0\x55\x0D\x09\x05\x7C" "\x3C\x7C\x3D\x87\xD7\x8F\x62\x0C\x2B\xF7\x8F\x87\xB0\xF6\x1F\x87\xA0\xA7\x62\x1F" "\x87\xA0\xD7\x56\x83\x15\x7F\xF3\xA3\xE1\xF6\x2E\x8C\x1D\x67\x3E\x7D\x90\x21\x52" @@ -20,14 +20,14 @@ const char HTTP_HEADER1_COMPRESSED[] PROGMEM = "\x3D\x0F\xE1\x10\x98\x1D\x19\x0C "\xC8\x43\x33\x98\x46\x08\x61\x0C\x1C\x76\xC8\x51\xCD\x2E\x39\x47\x61\x0A\x3B\x08" "\x43\x88\x8C\xCE\x61\x18\x39\xA7\x61\x0E\x3B\x64\xCA\xCA\xCB\x0E\x61\x13\x2B\x2B" "\x21\x05\x90\xE2\xB2\xB2\xB3\x9E\x21\xE2\x35\x02\x5C\xC0\x5B\xB8\x0A\x17\x0F\x61" - "\xF8\x7A\x56\xD0\x4C\xFC\x3E\xBC\x8E\xB4\x7D\x78\xF4\x3B\x01\x06\x59\xE9\xE0\xFF" - "\xA3\x28\xFC\x33\xBF\xA3\x61\xF3\x85\x84\x11\xD4\x15\x1D\x55\x87\x55\x0C\x3A\x86" - "\x06\x7C\x3E\xCF\xB3\xC3\x1C\x7C\xF1\xF0\xFC\x13\x03\x16\x35\xF5\x1D\x07\x9D\x13" - "\x09\x8D\x7D\x44\x38\xC8\xB4\x43\xBB\xE3\xBC\x78\x35\x78\x12\x2E\x9A\x85\xBF\x99" - "\x17\x98\x4C\x3A\xCF\x9D\xDF\x1D\xE3\xC7\x86\x1F\x34\xF8\x7E\x31\xC7\x77\x4E\xF1" - "\xD2\x8C\x86\x33\xE1\xDD\x04\x69\x07\xC3\xE1\xF7\x4C\xD9\x47\xD9\xDA\x3E\xC6\x5F" - "\xBC\x3F\x9F\x10\xFB\x3C\xC1\x06\x71\xDE\x3C\x0F\x84\x7C\x30\x7C\x3F\x07\xF7\x84" - "\xC1\xF3\xA5\x88\x21\x33\x37\xD4\x41\x6F\xA9\xF3\xF9\xDD\x3E\xC2\xCB\x10\xFB\x3A" - "\x8C\x1D\xE3\xC1"; + "\xF8\x7A\x56\xD0\x4C\xFC\x3E\xBC\x8F\xAF\x1E\x87\x60\x20\xC9\x3D\x3C\x1F\xF4\x65" + "\x1F\x86\x77\xF4\x6C\x3E\x70\xB0\x82\x3A\x82\xA3\xAA\xB0\xEA\xA1\x87\x50\xC0\xCF" + "\x87\xD9\xF6\x78\x63\x8F\x9E\x3E\x1F\x82\x60\x62\xC6\xBE\xA3\xA0\xF3\xA2\x61\x31" + "\xAF\xA8\x87\x19\x16\x88\x77\x7C\x77\x8F\x06\xAF\x02\x45\xD3\x50\xB7\xF3\x22\xF3" + "\x09\x87\x59\xF3\xBB\xE3\xBC\x78\xF0\xC3\xE6\x9F\x0F\xC6\x38\xEE\xE9\xDE\x3A\x51" + "\x90\xC6\x7C\x3B\xA0\x8D\x20\xF8\x7C\x3E\xE9\x9B\x28\xFB\x3B\x47\xD8\xCB\xF7\x87" + "\xF3\xE2\x1F\x67\x98\x20\xCE\x3B\xC7\x81\xF0\x8F\x86\x0F\x87\xE0\xFE\xF0\x98\x3E" + "\x74\xB1\x04\x26\x66\xFA\x88\x2D\xF5\x3E\x7F\x3B\xA7\xD8\x59\x62\x1F\x67\x51\x83" + "\xBC\x78"; #define HTTP_HEADER1 Decompress(HTTP_HEADER1_COMPRESSED,HTTP_HEADER1_SIZE).c_str() \ No newline at end of file diff --git a/tasmota/html_uncompressed/HTTP_HEADER1_ES6.h b/tasmota/html_uncompressed/HTTP_HEADER1_ES6.h index 35b38ead0..2aea91e75 100644 --- a/tasmota/html_uncompressed/HTTP_HEADER1_ES6.h +++ b/tasmota/html_uncompressed/HTTP_HEADER1_ES6.h @@ -4,7 +4,7 @@ const char HTTP_HEADER1[] PROGMEM = "" "" "" - "%s - %s" + "%s %s" "