From 05f6bcf211a52848f89b6f2b85b7d6e00ad0e305 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Mon, 17 Apr 2023 10:10:55 +0200
Subject: [PATCH 001/289] Bump v12.5.0.1
---
CHANGELOG.md | 22 ++++++++++-----
README.md | 2 +-
RELEASENOTES.md | 45 +++----------------------------
tasmota/include/tasmota_version.h | 2 +-
4 files changed, 21 insertions(+), 50 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a04170531..852b29bbe 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
+## [12.5.0.1]
+### Added
+
+### Breaking Changed
+
+### Changed
+
+### Fixed
+
+### Removed
+
+## [Released]
+
+## [12.5.0] 20230417
+- Release Peyton
+
## [12.4.0.5] 20230417
### Added
- Matter support for Light and Relays on ESP32 by Stephan Hadinger (#18320)
@@ -14,8 +30,6 @@ All notable changes to this project will be documented in this file.
- Berry add `searchall()` and `matchall()` to `re` module and pre-compiled patterns (#18429)
- Matter automatically exposes all detected Temperature sensors (#18430)
-### Breaking Changed
-
### Changed
- ESP32 LVGL library from v8.3.5 to v8.3.6 (no functional change)
@@ -23,8 +37,6 @@ All notable changes to this project will be documented in this file.
- ESP32 ``Upload``, ``Upgrade``, ``WebGetConfig``, ``WebQuery`` and ``WebSend`` random HTTP(S) connection timeout set to 5 sec (commit 542eca3)
- ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 (#18385)
-### Removed
-
## [12.4.0.4] 20230403
### Added
- Matter support simple Relay on Apple Homekit by Stephan Hadinger (#18239)
@@ -96,8 +108,6 @@ All notable changes to this project will be documented in this file.
- IR panasonic protocol regression from v12.0.2.4 (#18013)
- EnergyTotal divided twice during minimal upgrade step regression from v12.3.1.3 (#18024)
-## [Released]
-
## [12.4.0] 20230216
- Release Peter
diff --git a/README.md b/README.md
index e41499fbf..efbfc44a9 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Firmware binaries can be downloaded from http://ota.tasmota.com/tasmota/release/
## Development
-[](https://github.com/arendst/Tasmota)
+[](https://github.com/arendst/Tasmota)
[](http://ota.tasmota.com/tasmota/)
[](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml)
[](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml)
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index efe231a86..ac781716f 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -75,7 +75,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-12.4.0
+- http://ota.tasmota.com/tasmota/release-12.5.0
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
@@ -100,7 +100,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-12.4.0
+- https://ota.tasmota.com/tasmota32/release-12.5.0
The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasmota.com/tasmota32/release/tasmota32.bin``
@@ -110,50 +110,11 @@ 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 v12.4.0.5
+## Changelog v12.5.0.1
### Added
-- Command ``SwitchMode0`` to show or set all SwitchModes
-- Support for multiple MCP23008/MCP23017/MCP23S17 as switch/button/relay if enabled with `#define USE_MCP23XXX_DRV`
-- Support for multiple PCF8574 as switch/button/relay if enabled with `#define USE_PCF8574` and `#define USE_PCF8574_MODE2`
-- Support for PMSA003I Air Quality Sensor by Jean-Pierre Deschamps [#18214](https://github.com/arendst/Tasmota/issues/18214)
-- Support for DingTian virtual switch/button/relay [#18223](https://github.com/arendst/Tasmota/issues/18223)
-- Support for GDK101 gamma radiation sensor by Petr Novacek [#18390](https://github.com/arendst/Tasmota/issues/18390)
-- NTP time request from gateway [#17984](https://github.com/arendst/Tasmota/issues/17984)
-- Extended Tariff command for forced tariff [#18080](https://github.com/arendst/Tasmota/issues/18080)
-- Display TM1650 commands like TM1637 [#18109](https://github.com/arendst/Tasmota/issues/18109)
-- VSC Pio menu bar extensions by @Jason2866 [#18233](https://github.com/arendst/Tasmota/issues/18233)
-- Zigbee send Tuya 'magic spell' to unlock devices when pairing [#18144](https://github.com/arendst/Tasmota/issues/18144)
-- ESP32 WIP support for 16 shutters using `#define USE_SHUTTER_ESP32` in addition to `USE_SHUTTER` by Stefan Bode [#18295](https://github.com/arendst/Tasmota/issues/18295)
-- Berry support for Tensorflow Lite (TFL) by Christiaan Baars [#18119](https://github.com/arendst/Tasmota/issues/18119)
-- Berry `webclient` features
-- Berry `instrospect.name()` to get names of functions, modules and classes [#18422](https://github.com/arendst/Tasmota/issues/18422)
-- Berry add `searchall()` and `matchall()` to `re` module and pre-compiled patterns [#18429](https://github.com/arendst/Tasmota/issues/18429)
-- Matter support for Light and Relays by Stephan Hadinger [#18320](https://github.com/arendst/Tasmota/issues/18320)
-- Matter automatically exposes all detected Temperature sensors [#18430](https://github.com/arendst/Tasmota/issues/18430)
### Breaking Changed
-- Shelly Pro 4PM using standard MCP23xxx driver and needs one time Auto-Configuration
### Changed
-- ESP32 Framework (Core) from v2.0.6 to v2.0.7
-- ESP32 LVGL library from v8.3.3 to v8.3.6 (no functional change)
-- LibTeleinfo from v1.1.3 to v1.1.5 [#18050](https://github.com/arendst/Tasmota/issues/18050)
-- Increase number of (virtual)relays and (virtual)buttons to 32
-- ADC Range oversample from 2 to 32 [#17975](https://github.com/arendst/Tasmota/issues/17975)
-- Move #define OTA_URL from user_config.h to board files for better inital support [#18008](https://github.com/arendst/Tasmota/issues/18008)
-- Removed absolute url from filesystem [#18148](https://github.com/arendst/Tasmota/issues/18148)
### Fixed
-- TuyaMcu v1 sequence fix [#17625](https://github.com/arendst/Tasmota/issues/17625)
-- SEN5X floats and units [#17961](https://github.com/arendst/Tasmota/issues/17961)
-- Energytotals cannot be set to negative values [#17965](https://github.com/arendst/Tasmota/issues/17965)
-- SR04 driver single pin ultrasonic sensor detection [#17966](https://github.com/arendst/Tasmota/issues/17966)
-- IR panasonic protocol regression from v12.0.2.4 [#18013](https://github.com/arendst/Tasmota/issues/18013)
-- EnergyTotal divided twice during minimal upgrade step regression from v12.3.1.3 [#18024](https://github.com/arendst/Tasmota/issues/18024)
-- TuyaMcu v1 timer integer overflow [#18048](https://github.com/arendst/Tasmota/issues/18048)
-- PZEM energy monitor stabilize period on larger configs [#18103](https://github.com/arendst/Tasmota/issues/18103)
-- Rule topic comparison [#18144](https://github.com/arendst/Tasmota/issues/18144)
-- Refactor energy monitoring reducing stack usage and solve inherent exceptions and watchdogs [#18164](https://github.com/arendst/Tasmota/issues/18164)
-- ESP32 ``Upload``, ``Upgrade``, ``WebGetConfig``, ``WebQuery`` and ``WebSend`` random HTTP(S) connection timeout set to 5 sec (commit 542eca3)
-- ESP32 energy period shows kWh value instead of Wh regression from v12.3.1.5 [#15856](https://github.com/arendst/Tasmota/issues/15856)
-- ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 [#18385](https://github.com/arendst/Tasmota/issues/18385)
\ No newline at end of file
diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h
index 8a905cbe8..5d31fe5bd 100644
--- a/tasmota/include/tasmota_version.h
+++ b/tasmota/include/tasmota_version.h
@@ -20,6 +20,6 @@
#ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_
-const uint32_t VERSION = 0x0C040005; // 12.4.0.5
+const uint32_t VERSION = 0x0C050001; // 12.5.0.1
#endif // _TASMOTA_VERSION_H_
From 9150de9df8fe7cba4923b815b03ae8d9ec76273a Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Mon, 17 Apr 2023 20:58:34 +0200
Subject: [PATCH 002/289] Matter try workaround for iOS 16.5beta1 (#18440)
---
.../src/embedded/Matter_Commissioning.be | 5 ++++
.../solidified_Matter_Commissioning.h | 29 ++++++++++++++++---
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
index 87c9b2881..546c05fb4 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
@@ -304,6 +304,11 @@ class Matter_Commisioning_Context
return fabric
end
end
+ # TODO if there is only 1 fabric, we can try to use it anyways
+ if size(self.device.sessions.fabrics) == 1
+ tasmota.log("MTR: *** Could not find fabric, trying only fabric in store", 2)
+ return self.device.sessions.fabrics[0]
+ end
return nil
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
index af2acb9fa..486fbdcdf 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
@@ -66,7 +66,7 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[21]) { /* constants */
+ ( &(const bvalue[25]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
@@ -88,10 +88,14 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
/* K18 */ be_nested_str_weak(out),
/* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D),
/* K20 */ be_nested_str_weak(stop_iteration),
+ /* K21 */ be_const_int(1),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Could_X20not_X20find_X20fabric_X2C_X20trying_X20only_X20fabric_X20in_X20store),
+ /* K23 */ be_const_int(2),
+ /* K24 */ be_const_int(0),
}),
be_str_weak(find_fabric_by_destination_id),
&be_const_str_solidified,
- ( &(const binstruction[77]) { /* code */
+ ( &(const binstruction[94]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x8C100902, // 0002 GETMET R4 R4 K2
@@ -167,8 +171,25 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
0x58100014, // 0048 LDCONST R4 K20
0xAC100200, // 0049 CATCH R4 1 0
0xB0080000, // 004A RAISE 2 R0 R0
- 0x4C100000, // 004B LDNIL R4
- 0x80040800, // 004C RET 1 R4
+ 0x6010000C, // 004B GETGBL R4 G12
+ 0x88140106, // 004C GETMBR R5 R0 K6
+ 0x88140B07, // 004D GETMBR R5 R5 K7
+ 0x88140B08, // 004E GETMBR R5 R5 K8
+ 0x7C100200, // 004F CALL R4 1
+ 0x1C100915, // 0050 EQ R4 R4 K21
+ 0x78120009, // 0051 JMPF R4 #005C
+ 0xB8120200, // 0052 GETNGBL R4 K1
+ 0x8C100902, // 0053 GETMET R4 R4 K2
+ 0x58180016, // 0054 LDCONST R6 K22
+ 0x581C0017, // 0055 LDCONST R7 K23
+ 0x7C100600, // 0056 CALL R4 3
+ 0x88100106, // 0057 GETMBR R4 R0 K6
+ 0x88100907, // 0058 GETMBR R4 R4 K7
+ 0x88100908, // 0059 GETMBR R4 R4 K8
+ 0x94100918, // 005A GETIDX R4 R4 K24
+ 0x80040800, // 005B RET 1 R4
+ 0x4C100000, // 005C LDNIL R4
+ 0x80040800, // 005D RET 1 R4
})
)
);
From 4bac940a407c68bca1c6ee2cc4d34bd7f0bb7087 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Mon, 17 Apr 2023 21:49:12 +0200
Subject: [PATCH 003/289] Matter add sensors: Humidity, Pressure, Illuminance;
optimize memory (#18441)
---
CHANGELOG.md | 1 +
lib/libesp32/berry/default/berry_conf.h | 2 +-
.../berry_matter/src/be_matter_module.c | 12 +-
.../src/embedded/Matter_Commissioning.be | 8 +-
.../src/embedded/Matter_Device.be | 55 ++-
.../berry_matter/src/embedded/Matter_IM.be | 44 +-
.../src/embedded/Matter_IM_Message.be | 23 +-
.../src/embedded/Matter_Plugin_Sensor.be | 76 ++++
.../embedded/Matter_Plugin_Sensor_Humidity.be | 84 ++++
.../embedded/Matter_Plugin_Sensor_Light.be | 84 ++++
.../embedded/Matter_Plugin_Sensor_Pressure.be | 84 ++++
...Sensor.be => Matter_Plugin_Sensor_Temp.be} | 69 +---
.../berry_matter/src/embedded/Matter_TLV.be | 16 +-
.../solidified_Matter_Commissioning.h | 29 +-
.../src/solidify/solidified_Matter_Device.h | 295 +++++++++++---
.../src/solidify/solidified_Matter_IM.h | 376 ++++++++++--------
.../solidify/solidified_Matter_IM_Message.h | 287 ++++++-------
.../solidified_Matter_Plugin_Sensor.h | 179 +++++++++
...solidified_Matter_Plugin_Sensor_Humidity.h | 220 ++++++++++
.../solidified_Matter_Plugin_Sensor_Light.h | 219 ++++++++++
...solidified_Matter_Plugin_Sensor_Pressure.h | 219 ++++++++++
.../solidified_Matter_Plugin_Sensor_Temp.h | 215 ++++++++++
.../solidified_Matter_Plugin_Temp_Sensor.h | 295 --------------
.../src/solidify/solidified_Matter_TLV.h | 75 ++--
24 files changed, 2135 insertions(+), 832 deletions(-)
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_Temp_Sensor.be => Matter_Plugin_Sensor_Temp.be} (51%)
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Temp_Sensor.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 852b29bbe..d1a2655cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ All notable changes to this project will be documented in this file.
- Berry `instrospect.name()` to get names of functions, modules and classes (#18422)
- Berry add `searchall()` and `matchall()` to `re` module and pre-compiled patterns (#18429)
- Matter automatically exposes all detected Temperature sensors (#18430)
+- Matter add sensors: Humidity, Pressure, Illuminance; optimize memory
### Changed
- ESP32 LVGL library from v8.3.5 to v8.3.6 (no functional change)
diff --git a/lib/libesp32/berry/default/berry_conf.h b/lib/libesp32/berry/default/berry_conf.h
index 18d64ad81..d4aa71573 100644
--- a/lib/libesp32/berry/default/berry_conf.h
+++ b/lib/libesp32/berry/default/berry_conf.h
@@ -226,7 +226,7 @@
#define BE_USE_OS_MODULE 0
#define BE_USE_GLOBAL_MODULE 1
#define BE_USE_SYS_MODULE 1
- #define BE_USE_DEBUG_MODULE 0
+ #define BE_USE_DEBUG_MODULE 1
#define BE_USE_GC_MODULE 1
#define BE_USE_SOLIDIFY_MODULE 0
#define BE_USE_INTROSPECT_MODULE 1
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 8b5d31b5c..8dbccd3a9 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -159,7 +159,11 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Light1.h"
#include "solidify/solidified_Matter_Plugin_Light2.h"
#include "solidify/solidified_Matter_Plugin_Light3.h"
-#include "solidify/solidified_Matter_Plugin_Temp_Sensor.h"
+#include "solidify/solidified_Matter_Plugin_Sensor.h"
+#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
+#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
+#include "solidify/solidified_Matter_Plugin_Sensor_Light.h"
+#include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h"
/*********************************************************************************************\
* Get a bytes() object of the certificate DAC/PAI_Cert
@@ -333,7 +337,11 @@ module matter (scope: global, strings: weak) {
Plugin_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
- Plugin_Temp_Sensor, class(be_class_Matter_Plugin_Temp_Sensor) // Temperature Sensor
+ Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
+ Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
+ Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
+ Plugin_Sensor_Light, class(be_class_Matter_Plugin_Sensor_Light) // Light Sensor
+ Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor
}
@const_object_info_end */
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
index 546c05fb4..7235186e4 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
@@ -305,10 +305,10 @@ class Matter_Commisioning_Context
end
end
# TODO if there is only 1 fabric, we can try to use it anyways
- if size(self.device.sessions.fabrics) == 1
- tasmota.log("MTR: *** Could not find fabric, trying only fabric in store", 2)
- return self.device.sessions.fabrics[0]
- end
+ # if size(self.device.sessions.fabrics) == 1
+ # tasmota.log("MTR: *** Could not find fabric, trying only fabric in store", 2)
+ # return self.device.sessions.fabrics[0]
+ # end
return nil
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index fddeea62e..f4ce634a9 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -147,6 +147,10 @@ class Matter_Device
var pairing_code = self.compute_manual_pairing_code()
tasmota.log(string.format("MTR: Manual pairing code: %s-%s-%s", pairing_code[0..3], pairing_code[4..6], pairing_code[7..]), 2)
+ # output MQTT
+ var qr_code = self.compute_qrcode_content()
+ tasmota.publish_result(string.format('{"Matter":{"Commissioning":1,"PairingCode":"%s","QRCode":"%s"}}', pairing_code, qr_code), 'Matter')
+
# compute PBKDF
self._compute_pbkdf(self.root_passcode, self.root_iterations, self.root_salt)
self.start_basic_commissioning(timeout_s, self.root_iterations, self.root_discriminator, self.root_salt, self.root_w0, #-self.root_w1,-# self.root_L, nil)
@@ -202,6 +206,9 @@ class Matter_Device
#############################################################
# Stop PASE commissioning, mostly called when CASE is about to start
def stop_basic_commissioning()
+ if self.is_root_commissioning_open()
+ tasmota.publish_result('{"Matter":{"Commissioning":0}}', 'Matter')
+ end
self.commissioning_open = nil
self.mdns_remove_PASE()
@@ -548,6 +555,7 @@ class Matter_Device
ctx.cluster = cl
ctx.attribute = at
var finished = cb(pi, ctx, direct) # call the callback with the plugin and the context
+ # tasmota.log("MTR: gc="+str(tasmota.gc()), 2)
if direct && finished return end
end
end
@@ -955,13 +963,55 @@ class Matter_Device
var sensor_2 = sensors[k1]
if isinstance(sensor_2, map) && sensor_2.contains("Temperature")
var temp_rule = k1 + "#Temperature"
- self.plugins.push(matter.Plugin_Temp_Sensor(self, endpoint, temp_rule))
+ self.plugins.push(matter.Plugin_Sensor_Temp(self, endpoint, temp_rule))
tasmota.log(string.format("MTR: Endpoint:%i Temperature (%s)", endpoint, temp_rule), 2)
endpoint += 1
end
if endpoint > 0x28 break end
end
+ # pressure sensors
+ # they are starting at endpoint `40..47` (8 max)
+ endpoint = 0x28
+ for k1:self.k2l(sensors)
+ var sensor_2 = sensors[k1]
+ if isinstance(sensor_2, map) && sensor_2.contains("Pressure")
+ var temp_rule = k1 + "#Pressure"
+ self.plugins.push(matter.Plugin_Sensor_Pressure(self, endpoint, temp_rule))
+ tasmota.log(string.format("MTR: Endpoint:%i Pressure (%s)", endpoint, temp_rule), 2)
+ endpoint += 1
+ end
+ if endpoint > 0x2F break end
+ end
+
+ # light sensors
+ # they are starting at endpoint `48..55` (8 max)
+ endpoint = 0x30
+ for k1:self.k2l(sensors)
+ var sensor_2 = sensors[k1]
+ if isinstance(sensor_2, map) && sensor_2.contains("Illuminance")
+ var temp_rule = k1 + "#Illuminance"
+ self.plugins.push(matter.Plugin_Sensor_Light(self, endpoint, temp_rule))
+ tasmota.log(string.format("MTR: Endpoint:%i Light (%s)", endpoint, temp_rule), 2)
+ endpoint += 1
+ end
+ if endpoint > 0x38 break end
+ end
+
+ # huidity sensors
+ # they are starting at endpoint `56..63` (8 max)
+ endpoint = 0x38
+ for k1:self.k2l(sensors)
+ var sensor_2 = sensors[k1]
+ if isinstance(sensor_2, map) && sensor_2.contains("Humidity")
+ var temp_rule = k1 + "#Humidity"
+ self.plugins.push(matter.Plugin_Sensor_Humidity(self, endpoint, temp_rule))
+ tasmota.log(string.format("MTR: Endpoint:%i Humidity (%s)", endpoint, temp_rule), 2)
+ endpoint += 1
+ end
+ if endpoint > 0x40 break end
+ end
+
end
# get keys of a map in sorted order
@@ -969,9 +1019,6 @@ class Matter_Device
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
end
-
- # keys to llist
-
end
matter.Device = Matter_Device
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be
index ca6e2efcc..50c17bd82 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_IM.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM.be
@@ -221,7 +221,11 @@ class Matter_IM
attr_name = attr_name ? " (" + attr_name + ")" : ""
# Special case to report unsupported item, if pi==nil
var res = (pi != nil) ? pi.read_attribute(session, ctx) : nil
+ var found = true # stop expansion since we have a value
+ var a1_raw # this is the bytes() block we need to add to response (or nil)
if res != nil
+ var res_str = str(res) # get the value with anonymous tag before it is tagged, for logging
+
var a1 = matter.AttributeReportIB()
a1.attribute_data = matter.AttributeDataIB()
a1.attribute_data.data_version = 1
@@ -233,16 +237,15 @@ class Matter_IM
var a1_tlv = a1.to_TLV()
var a1_len = a1_tlv.encode_len()
- var a1_bytes = bytes(a1_len)
- var a2 = TLV.create_TLV(TLV.RAW, a1_tlv.tlv2raw(a1_bytes))
+ var a1_bytes = bytes(a1_len) # pre-size bytes() to the actual size
+ a1_raw = a1_tlv.tlv2raw(a1_bytes)
+ # tasmota.log(string.format("MTR: guessed len=%i actual=%i '%s'", a1_len, size(a1_raw), a1_raw.tohex()), 2)
- ret.attribute_reports.push(a2)
if !no_log
- tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - %s", session.local_session_id, str(ctx), attr_name, str(res)), 2)
- end
- return true # stop expansion since we have a value
+ tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - %s", session.local_session_id, str(ctx), attr_name, res_str), 2)
+ end
elif ctx.status != nil
- if direct
+ if direct # we report an error only if a concrete direct read, not with wildcards
var a1 = matter.AttributeReportIB()
a1.attribute_status = matter.AttributeStatusIB()
a1.attribute_status.path = matter.AttributePathIB()
@@ -254,18 +257,33 @@ class Matter_IM
var a1_tlv = a1.to_TLV()
var a1_len = a1_tlv.encode_len()
- var a1_bytes = bytes(a1_len)
- var a2 = TLV.create_TLV(TLV.RAW, a1_tlv.tlv2raw(a1_bytes))
-
- ret.attribute_reports.push(a2)
+ var a1_bytes = bytes(a1_len) # pre-size bytes() to the actual size
+ a1_raw = a1_tlv.tlv2raw(a1_bytes)
+
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - STATUS: 0x%02X %s", session.local_session_id, str(ctx), attr_name, ctx.status, ctx.status == matter.UNSUPPORTED_ATTRIBUTE ? "UNSUPPORTED_ATTRIBUTE" : ""), 2)
- return true
end
else
tasmota.log(string.format("MTR: >Read_Attr (%6i) %s%s - IGNORED", session.local_session_id, str(ctx), attr_name), 2)
# ignore if content is nil and status is undefined
- return false
+ found = false
end
+
+ # check if we still have enough room in last block
+ if a1_raw # do we have bytes to add, and it's not zero size
+ if size(ret.attribute_reports) == 0
+ ret.attribute_reports.push(a1_raw) # push raw binary instead of a TLV
+ else # already blocks present, see if we can add to the latest, or need to create a new block
+ var last_block = ret.attribute_reports[-1]
+ if size(last_block) + size(a1_raw) <= matter.IM_ReportData.MAX_MESSAGE
+ # add to last block
+ last_block .. a1_raw
+ else
+ ret.attribute_reports.push(a1_raw) # push raw binary instead of a TLV
+ end
+ end
+ end
+
+ return found # return true if we had a match
end
var endpoints = self.device.get_active_endpoints()
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
index 4b3f3f219..b0cdaa32a 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_IM_Message.be
@@ -171,26 +171,11 @@ class Matter_IM_ReportData : Matter_IM_Message
var data = self.data # TLV data of the response (if any)
var was_chunked = data.more_chunked_messages # is this following a chunked packet?
- # compute the acceptable size
- var msg_sz = 0 # message size up to now
- var elements = 0 # number of elements added
- var sz_attribute_reports = (data.attribute_reports != nil) ? size(data.attribute_reports) : 0
- if sz_attribute_reports > 0
- msg_sz = data.attribute_reports[0].to_TLV().encode_len()
- elements = 1
- end
- while msg_sz < self.MAX_MESSAGE && elements < sz_attribute_reports
- var next_sz = data.attribute_reports[elements].to_TLV().encode_len()
- if msg_sz + next_sz < self.MAX_MESSAGE
- msg_sz += next_sz
- elements += 1
- else
- break
- end
- end
+ # the message were grouped by right-sized binaries upfront, we just need to send one block at time
+ var elements = 1 # number of elements added
# tasmota.log(string.format("MTR: exch=%i elements=%i msg_sz=%i total=%i", self.get_exchangeid(), elements, msg_sz, sz_attribute_reports), 3)
- var next_elemnts = []
+ var next_elemnts
if data.attribute_reports != nil
next_elemnts = data.attribute_reports[elements .. ]
data.attribute_reports = data.attribute_reports[0 .. elements - 1]
@@ -222,7 +207,7 @@ class Matter_IM_ReportData : Matter_IM_Message
responder.send_response_frame(resp)
self.last_counter = resp.message_counter
- if size(next_elemnts) > 0
+ if next_elemnts != nil && size(next_elemnts) > 0
data.attribute_reports = next_elemnts
tasmota.log(string.format("MTR: to_be_sent_later size=%i exch=%i", size(data.attribute_reports), resp.exchange_id), 3)
self.ready = false # wait for Status Report before continuing sending
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
new file mode 100644
index 000000000..740b34c46
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
@@ -0,0 +1,76 @@
+#
+# Matter_Plugin_Sensor.be - implements the behavior for a generic Sensor
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Device end
+
+#@ solidify:Matter_Plugin_Sensor,weak
+
+class Matter_Plugin_Sensor : Matter_Plugin_Device
+ var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
+ var tasmota_sensor_matcher # Actual matcher object
+ var shadow_value # Last known value
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, sensor_filter)
+ super(self).init(device, endpoint)
+ self.tasmota_sensor_filter = sensor_filter
+ self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(sensor_filter)
+ end
+
+ #############################################################
+ # parse sensor
+ #
+ # The device calls regularly `tasmota.read_sensors()` and converts
+ # it to json.
+ def parse_sensors(payload)
+ if self.tasmota_sensor_matcher
+ var val = self.pre_value(real(self.tasmota_sensor_matcher.match(payload)))
+ if val != nil
+ if val != self.shadow_value
+ self.valued_changed(val)
+ end
+ self.shadow_value = val
+ end
+ end
+ end
+
+ #############################################################
+ # Called when the value changed compared to shadow value
+ #
+ # This must be overriden.
+ # This is where you call `self.attribute_updated(nil, , )`
+ def valued_changed(val)
+ # self.attribute_updated(nil, 0x0402, 0x0000)
+ end
+
+ #############################################################
+ # Pre-process value
+ #
+ # This must be overriden.
+ # This allows to convert the raw sensor value to the target one, typically int
+ def pre_value(val)
+ return val
+ end
+
+end
+matter.Plugin_Sensor = Matter_Plugin_Sensor
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
new file mode 100644
index 000000000..e06a9b54a
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
@@ -0,0 +1,84 @@
+#
+# Matter_Plugin_Sensor_Pressure.be - implements the behavior for a Pressure Sensor
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Sensor end
+
+#@ solidify:Matter_Plugin_Sensor_Humidity,weak
+
+class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
+ static var CLUSTERS = {
+ 0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
+ }
+ static var TYPES = { 0x0307: 2 } # Humidity Sensor, rev 2
+
+ #############################################################
+ # Pre-process value
+ #
+ # This must be overriden.
+ # This allows to convert the raw sensor value to the target one, typically int
+ def pre_value(val)
+ return int(val * 100) # 1/100th of percentage
+ end
+
+ #############################################################
+ # Called when the value changed compared to shadow value
+ #
+ # This must be overriden.
+ # This is where you call `self.attribute_updated(nil, , )`
+ def valued_changed(val)
+ self.attribute_updated(nil, 0x0405, 0x0000)
+ end
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0405 # ========== Humidity Measurement 2.4 p.98 ==========
+ if attribute == 0x0000 # ---------- Humidity / u16 ----------
+ if self.shadow_value != nil
+ return TLV.create_TLV(TLV.U2, int(self.shadow_value))
+ else
+ return TLV.create_TLV(TLV.NULL, nil)
+ end
+ elif attribute == 0x0001 # ---------- MinMeasuredValue / u16 ----------
+ return TLV.create_TLV(TLV.U2, 500) # 0%
+ elif attribute == 0x0002 # ---------- MaxMeasuredValue / u16 ----------
+ return TLV.create_TLV(TLV.U2, 10000) # 100%
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+end
+matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be
new file mode 100644
index 000000000..27faeef9b
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be
@@ -0,0 +1,84 @@
+#
+# Matter_Plugin_Sensor_Light.be - implements the behavior for a Light Sensor
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Sensor end
+
+#@ solidify:Matter_Plugin_Sensor_Light,weak
+
+class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
+ static var CLUSTERS = {
+ 0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
+ }
+ static var TYPES = { 0x0106: 2 } # Temperature Sensor, rev 2
+
+ #############################################################
+ # Pre-process value
+ #
+ # This must be overriden.
+ # This allows to convert the raw sensor value to the target one, typically int
+ def pre_value(val)
+ return int(val) # value in lux
+ end
+
+ #############################################################
+ # Called when the value changed compared to shadow value
+ #
+ # This must be overriden.
+ # This is where you call `self.attribute_updated(nil, , )`
+ def valued_changed(val)
+ self.attribute_updated(nil, 0x0400, 0x0000)
+ end
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0400 # ========== Illuminance Measurement 2.2 p.95 ==========
+ if attribute == 0x0000 # ---------- MeasuredValue / i16 ----------
+ if self.shadow_value != nil
+ return TLV.create_TLV(TLV.I2, int(self.shadow_value))
+ else
+ return TLV.create_TLV(TLV.NULL, nil)
+ end
+ elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
+ return TLV.create_TLV(TLV.I2, 0) # 0 lux
+ elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
+ return TLV.create_TLV(TLV.I2, 10000) # 10000 lux
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0)
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+end
+matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
new file mode 100644
index 000000000..aa6366ce2
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
@@ -0,0 +1,84 @@
+#
+# Matter_Plugin_Sensor_Pressure.be - implements the behavior for a Pressure Sensor
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Sensor end
+
+#@ solidify:Matter_Plugin_Sensor_Pressure,weak
+
+class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
+ static var CLUSTERS = {
+ 0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
+ }
+ static var TYPES = { 0x0305: 2 } # Temperature Sensor, rev 2
+
+ #############################################################
+ # Pre-process value
+ #
+ # This must be overriden.
+ # This allows to convert the raw sensor value to the target one, typically int
+ def pre_value(val)
+ return int(val)
+ end
+
+ #############################################################
+ # Called when the value changed compared to shadow value
+ #
+ # This must be overriden.
+ # This is where you call `self.attribute_updated(nil, , )`
+ def valued_changed(val)
+ self.attribute_updated(nil, 0x0403, 0x0000)
+ end
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0403 # ========== Pressure Measurement 2.4 p.98 ==========
+ if attribute == 0x0000 # ---------- MeasuredValue / i16 ----------
+ if self.shadow_value != nil
+ return TLV.create_TLV(TLV.I2, int(self.shadow_value))
+ else
+ return TLV.create_TLV(TLV.NULL, nil)
+ end
+ elif attribute == 0x0001 # ---------- MinMeasuredValue / i16 ----------
+ return TLV.create_TLV(TLV.I2, 500) # 500 hPA
+ elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 ----------
+ return TLV.create_TLV(TLV.I2, 1500) # 1500 hPA
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0) # 0 = no Extended Range
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 3) # 3 = New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+end
+matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Temp_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
similarity index 51%
rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Temp_Sensor.be
rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
index 3375bce6d..2ef420a94 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Temp_Sensor.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
@@ -1,5 +1,5 @@
#
-# Matter_Plugin_Temp_Sensor.be - implements the behavior for a Temperature Sensor
+# Matter_Plugin_Sensor_Temp.be - implements the behavior for a Temperature Sensor
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@@ -20,56 +20,32 @@
# Matter plug-in for core behavior
# dummy declaration for solidification
-class Matter_Plugin_Device end
+class Matter_Plugin_Sensor end
-#@ solidify:Matter_Plugin_Temp_Sensor,weak
+#@ solidify:Matter_Plugin_Sensor_Temp,weak
-class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
+class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
static var CLUSTERS = {
- # 0x001D: inherited # Descriptor Cluster 9.5 p.453
- # 0x0003: inherited # Identify 1.2 p.16
- # 0x0004: inherited # Groups 1.3 p.21
0x0402: [0,1,2], # Temperature Measurement p.97 - no writable
}
static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2
- var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
- var tasmota_sensor_matcher # Actual matcher object
- var shadow_temperature # fake status for now # TODO
-
#############################################################
- # Constructor
- def init(device, endpoint, sensor_filter)
- super(self).init(device, endpoint)
- self.tasmota_sensor_filter = sensor_filter
- self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(sensor_filter)
+ # Pre-process value
+ #
+ # This must be overriden.
+ # This allows to convert the raw sensor value to the target one, typically int
+ def pre_value(val)
+ return int(val * 100)
end
#############################################################
- # parse sensor
+ # Called when the value changed compared to shadow value
#
- # The device calls regularly `tasmota.read_sensors()` and converts
- # it to json.
- def parse_sensors(payload)
- if self.tasmota_sensor_matcher
- var val = real(self.tasmota_sensor_matcher.match(payload))
- if val != nil
- # import string
- # tasmota.log(string.format("MTR: update temperature for endpoint %i - %.1f C", self.endpoint,), 3)
- if val != self.shadow_temperature
- self.attribute_updated(nil, 0x0402, 0x0000)
- end
- self.shadow_temperature = val
- end
- end
- end
-
- #############################################################
- # get_temperature
- #
- # Update shadow and signal any change
- def get_temperature()
- return self.shadow_temperature
+ # This must be overriden.
+ # This is where you call `self.attribute_updated(nil, , )`
+ def valued_changed(val)
+ self.attribute_updated(nil, 0x0402, 0x0000)
end
#############################################################
@@ -84,8 +60,8 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
# ====================================================================================================
if cluster == 0x0402 # ========== Temperature Measurement 2.3 p.97 ==========
if attribute == 0x0000 # ---------- MeasuredValue / i16 (*100) ----------
- if self.shadow_temperature != nil
- return TLV.create_TLV(TLV.I2, int(self.shadow_temperature * 100))
+ if self.shadow_value != nil
+ return TLV.create_TLV(TLV.I2, self.shadow_value)
else
return TLV.create_TLV(TLV.NULL, nil)
end
@@ -93,6 +69,10 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
return TLV.create_TLV(TLV.I2, -5000) # -50 °C
elif attribute == 0x0002 # ---------- MaxMeasuredValue / i16 (*100) ----------
return TLV.create_TLV(TLV.I2, 15000) # 150 °C
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0)
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 4) # 4 = New data model format and notation
end
else
@@ -100,10 +80,5 @@ class Matter_Plugin_Temp_Sensor : Matter_Plugin_Device
end
end
- #############################################################
- # every_second
- def every_second()
- self.get_temperature() # force reading value and sending subscriptions
- end
end
-matter.Plugin_Temp_Sensor = Matter_Plugin_Temp_Sensor
+matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be
index 084548102..24c4567e2 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_TLV.be
@@ -637,7 +637,11 @@ class Matter_TLV
# output each one after the other
for v : val_list
- v.tlv2raw(b)
+ if isinstance(v, bytes)
+ b .. v
+ else
+ v.tlv2raw(b)
+ end
end
# add 'end of container'
@@ -728,9 +732,13 @@ class Matter_TLV
# returns `self` to allow calls to be chained
def add_obj(tag, obj)
if obj != nil
- var value = obj.to_TLV()
- value.tag_sub = tag
- self.val.push(value)
+ if isinstance(obj, bytes)
+ self.val.push(obj)
+ else
+ var value = obj.to_TLV()
+ value.tag_sub = tag
+ self.val.push(value)
+ end
end
return self
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
index 486fbdcdf..af2acb9fa 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
@@ -66,7 +66,7 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[25]) { /* constants */
+ ( &(const bvalue[21]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
@@ -88,14 +88,10 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
/* K18 */ be_nested_str_weak(out),
/* K19 */ be_nested_str_weak(MTR_X3A_X20SIGMA1_X3A_X20candidateDestinationId_X3D),
/* K20 */ be_nested_str_weak(stop_iteration),
- /* K21 */ be_const_int(1),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Could_X20not_X20find_X20fabric_X2C_X20trying_X20only_X20fabric_X20in_X20store),
- /* K23 */ be_const_int(2),
- /* K24 */ be_const_int(0),
}),
be_str_weak(find_fabric_by_destination_id),
&be_const_str_solidified,
- ( &(const binstruction[94]) { /* code */
+ ( &(const binstruction[77]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x8C100902, // 0002 GETMET R4 R4 K2
@@ -171,25 +167,8 @@ be_local_closure(Matter_Commisioning_Context_find_fabric_by_destination_id, /*
0x58100014, // 0048 LDCONST R4 K20
0xAC100200, // 0049 CATCH R4 1 0
0xB0080000, // 004A RAISE 2 R0 R0
- 0x6010000C, // 004B GETGBL R4 G12
- 0x88140106, // 004C GETMBR R5 R0 K6
- 0x88140B07, // 004D GETMBR R5 R5 K7
- 0x88140B08, // 004E GETMBR R5 R5 K8
- 0x7C100200, // 004F CALL R4 1
- 0x1C100915, // 0050 EQ R4 R4 K21
- 0x78120009, // 0051 JMPF R4 #005C
- 0xB8120200, // 0052 GETNGBL R4 K1
- 0x8C100902, // 0053 GETMET R4 R4 K2
- 0x58180016, // 0054 LDCONST R6 K22
- 0x581C0017, // 0055 LDCONST R7 K23
- 0x7C100600, // 0056 CALL R4 3
- 0x88100106, // 0057 GETMBR R4 R0 K6
- 0x88100907, // 0058 GETMBR R4 R4 K7
- 0x88100908, // 0059 GETMBR R4 R4 K8
- 0x94100918, // 005A GETIDX R4 R4 K24
- 0x80040800, // 005B RET 1 R4
- 0x4C100000, // 005C LDNIL R4
- 0x80040800, // 005D RET 1 R4
+ 0x4C100000, // 004B LDNIL R4
+ 0x80040800, // 004C RET 1 R4
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index c7b55883b..ba71e5d7c 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -898,7 +898,7 @@ be_local_closure(Matter_Device_sort_distinct, /* name */
********************************************************************/
be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
be_nested_proto(
- 3, /* nstack */
+ 5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -906,36 +906,49 @@ be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(mdns_remove_PASE),
- /* K2 */ be_nested_str_weak(commissioning_iterations),
- /* K3 */ be_nested_str_weak(commissioning_discriminator),
- /* K4 */ be_nested_str_weak(commissioning_salt),
- /* K5 */ be_nested_str_weak(commissioning_w0),
- /* K6 */ be_nested_str_weak(commissioning_L),
- /* K7 */ be_nested_str_weak(commissioning_admin_fabric),
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(publish_result),
+ /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(commissioning_open),
+ /* K6 */ be_nested_str_weak(mdns_remove_PASE),
+ /* K7 */ be_nested_str_weak(commissioning_iterations),
+ /* K8 */ be_nested_str_weak(commissioning_discriminator),
+ /* K9 */ be_nested_str_weak(commissioning_salt),
+ /* K10 */ be_nested_str_weak(commissioning_w0),
+ /* K11 */ be_nested_str_weak(commissioning_L),
+ /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
}),
be_str_weak(stop_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0x4C040000, // 0000 LDNIL R1
- 0x90020001, // 0001 SETMBR R0 K0 R1
- 0x8C040101, // 0002 GETMET R1 R0 K1
- 0x7C040200, // 0003 CALL R1 1
- 0x4C040000, // 0004 LDNIL R1
- 0x90020401, // 0005 SETMBR R0 K2 R1
- 0x4C040000, // 0006 LDNIL R1
- 0x90020601, // 0007 SETMBR R0 K3 R1
+ ( &(const binstruction[25]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x78060004, // 0002 JMPF R1 #0008
+ 0xB8060200, // 0003 GETNGBL R1 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0x580C0003, // 0005 LDCONST R3 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C040600, // 0007 CALL R1 3
0x4C040000, // 0008 LDNIL R1
- 0x90020801, // 0009 SETMBR R0 K4 R1
- 0x4C040000, // 000A LDNIL R1
- 0x90020A01, // 000B SETMBR R0 K5 R1
+ 0x90020A01, // 0009 SETMBR R0 K5 R1
+ 0x8C040106, // 000A GETMET R1 R0 K6
+ 0x7C040200, // 000B CALL R1 1
0x4C040000, // 000C LDNIL R1
- 0x90020C01, // 000D SETMBR R0 K6 R1
+ 0x90020E01, // 000D SETMBR R0 K7 R1
0x4C040000, // 000E LDNIL R1
- 0x90020E01, // 000F SETMBR R0 K7 R1
- 0x80000000, // 0010 RET 0
+ 0x90021001, // 000F SETMBR R0 K8 R1
+ 0x4C040000, // 0010 LDNIL R1
+ 0x90021201, // 0011 SETMBR R0 K9 R1
+ 0x4C040000, // 0012 LDNIL R1
+ 0x90021401, // 0013 SETMBR R0 K10 R1
+ 0x4C040000, // 0014 LDNIL R1
+ 0x90021601, // 0015 SETMBR R0 K11 R1
+ 0x4C040000, // 0016 LDNIL R1
+ 0x90021801, // 0017 SETMBR R0 K12 R1
+ 0x80000000, // 0018 RET 0
})
)
);
@@ -1067,7 +1080,7 @@ be_local_closure(Matter_Device_every_250ms, /* name */
********************************************************************/
be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
be_nested_proto(
- 13, /* nstack */
+ 14, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -1075,7 +1088,7 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[19]) { /* constants */
+ ( &(const bvalue[23]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(PASE_TIMEOUT),
/* K2 */ be_nested_str_weak(compute_manual_pairing_code),
@@ -1087,18 +1100,22 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
/* K8 */ be_const_int(3),
/* K9 */ be_const_int(2147483647),
/* K10 */ be_const_int(2),
- /* K11 */ be_nested_str_weak(_compute_pbkdf),
- /* K12 */ be_nested_str_weak(root_passcode),
- /* K13 */ be_nested_str_weak(root_iterations),
- /* K14 */ be_nested_str_weak(root_salt),
- /* K15 */ be_nested_str_weak(start_basic_commissioning),
- /* K16 */ be_nested_str_weak(root_discriminator),
- /* K17 */ be_nested_str_weak(root_w0),
- /* K18 */ be_nested_str_weak(root_L),
+ /* K11 */ be_nested_str_weak(compute_qrcode_content),
+ /* K12 */ be_nested_str_weak(publish_result),
+ /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
+ /* K14 */ be_nested_str_weak(Matter),
+ /* K15 */ be_nested_str_weak(_compute_pbkdf),
+ /* K16 */ be_nested_str_weak(root_passcode),
+ /* K17 */ be_nested_str_weak(root_iterations),
+ /* K18 */ be_nested_str_weak(root_salt),
+ /* K19 */ be_nested_str_weak(start_basic_commissioning),
+ /* K20 */ be_nested_str_weak(root_discriminator),
+ /* K21 */ be_nested_str_weak(root_w0),
+ /* K22 */ be_nested_str_weak(root_L),
}),
be_str_weak(start_root_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[38]) { /* code */
+ ( &(const binstruction[49]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x4C0C0000, // 0001 LDNIL R3
0x1C0C0203, // 0002 EQ R3 R1 R3
@@ -1123,20 +1140,31 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
0x581C000A, // 0015 LDCONST R7 K10
0x7C100600, // 0016 CALL R4 3
0x8C10010B, // 0017 GETMET R4 R0 K11
- 0x8818010C, // 0018 GETMBR R6 R0 K12
- 0x881C010D, // 0019 GETMBR R7 R0 K13
- 0x8820010E, // 001A GETMBR R8 R0 K14
- 0x7C100800, // 001B CALL R4 4
- 0x8C10010F, // 001C GETMET R4 R0 K15
- 0x5C180200, // 001D MOVE R6 R1
- 0x881C010D, // 001E GETMBR R7 R0 K13
- 0x88200110, // 001F GETMBR R8 R0 K16
- 0x8824010E, // 0020 GETMBR R9 R0 K14
- 0x88280111, // 0021 GETMBR R10 R0 K17
- 0x882C0112, // 0022 GETMBR R11 R0 K18
- 0x4C300000, // 0023 LDNIL R12
- 0x7C101000, // 0024 CALL R4 8
- 0x80000000, // 0025 RET 0
+ 0x7C100200, // 0018 CALL R4 1
+ 0xB8160600, // 0019 GETNGBL R5 K3
+ 0x8C140B0C, // 001A GETMET R5 R5 K12
+ 0x8C1C0505, // 001B GETMET R7 R2 K5
+ 0x5824000D, // 001C LDCONST R9 K13
+ 0x5C280600, // 001D MOVE R10 R3
+ 0x5C2C0800, // 001E MOVE R11 R4
+ 0x7C1C0800, // 001F CALL R7 4
+ 0x5820000E, // 0020 LDCONST R8 K14
+ 0x7C140600, // 0021 CALL R5 3
+ 0x8C14010F, // 0022 GETMET R5 R0 K15
+ 0x881C0110, // 0023 GETMBR R7 R0 K16
+ 0x88200111, // 0024 GETMBR R8 R0 K17
+ 0x88240112, // 0025 GETMBR R9 R0 K18
+ 0x7C140800, // 0026 CALL R5 4
+ 0x8C140113, // 0027 GETMET R5 R0 K19
+ 0x5C1C0200, // 0028 MOVE R7 R1
+ 0x88200111, // 0029 GETMBR R8 R0 K17
+ 0x88240114, // 002A GETMBR R9 R0 K20
+ 0x88280112, // 002B GETMBR R10 R0 K18
+ 0x882C0115, // 002C GETMBR R11 R0 K21
+ 0x88300116, // 002D GETMBR R12 R0 K22
+ 0x4C340000, // 002E LDNIL R13
+ 0x7C141000, // 002F CALL R5 8
+ 0x80000000, // 0030 RET 0
})
)
);
@@ -3294,7 +3322,7 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[34]) { /* constants */
+ ( &(const bvalue[46]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(json),
/* K2 */ be_const_int(1),
@@ -3326,13 +3354,25 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
/* K28 */ be_nested_str_weak(contains),
/* K29 */ be_nested_str_weak(Temperature),
/* K30 */ be_nested_str_weak(_X23Temperature),
- /* K31 */ be_nested_str_weak(Plugin_Temp_Sensor),
+ /* K31 */ be_nested_str_weak(Plugin_Sensor_Temp),
/* K32 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Temperature_X20_X28_X25s_X29),
/* K33 */ be_nested_str_weak(stop_iteration),
+ /* K34 */ be_nested_str_weak(Pressure),
+ /* K35 */ be_nested_str_weak(_X23Pressure),
+ /* K36 */ be_nested_str_weak(Plugin_Sensor_Pressure),
+ /* K37 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Pressure_X20_X28_X25s_X29),
+ /* K38 */ be_nested_str_weak(Illuminance),
+ /* K39 */ be_nested_str_weak(_X23Illuminance),
+ /* K40 */ be_nested_str_weak(Plugin_Sensor_Light),
+ /* K41 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_X20_X28_X25s_X29),
+ /* K42 */ be_nested_str_weak(Humidity),
+ /* K43 */ be_nested_str_weak(_X23Humidity),
+ /* K44 */ be_nested_str_weak(Plugin_Sensor_Humidity),
+ /* K45 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Humidity_X20_X28_X25s_X29),
}),
be_str_weak(autoconf_device),
&be_const_str_solidified,
- ( &(const binstruction[160]) { /* code */
+ ( &(const binstruction[307]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x580C0002, // 0002 LDCONST R3 K2
@@ -3492,7 +3532,154 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
0x58280021, // 009C LDCONST R10 K33
0xAC280200, // 009D CATCH R10 1 0
0xB0080000, // 009E RAISE 2 R0 R0
- 0x80000000, // 009F RET 0
+ 0x540E0027, // 009F LDINT R3 40
+ 0x60280010, // 00A0 GETGBL R10 G16
+ 0x8C2C011B, // 00A1 GETMET R11 R0 K27
+ 0x5C341200, // 00A2 MOVE R13 R9
+ 0x7C2C0400, // 00A3 CALL R11 2
+ 0x7C280200, // 00A4 CALL R10 1
+ 0xA8020026, // 00A5 EXBLK 0 #00CD
+ 0x5C2C1400, // 00A6 MOVE R11 R10
+ 0x7C2C0000, // 00A7 CALL R11 0
+ 0x9430120B, // 00A8 GETIDX R12 R9 R11
+ 0x6034000F, // 00A9 GETGBL R13 G15
+ 0x5C381800, // 00AA MOVE R14 R12
+ 0x603C0013, // 00AB GETGBL R15 G19
+ 0x7C340400, // 00AC CALL R13 2
+ 0x78360017, // 00AD JMPF R13 #00C6
+ 0x8C34191C, // 00AE GETMET R13 R12 K28
+ 0x583C0022, // 00AF LDCONST R15 K34
+ 0x7C340400, // 00B0 CALL R13 2
+ 0x78360013, // 00B1 JMPF R13 #00C6
+ 0x00341723, // 00B2 ADD R13 R11 K35
+ 0x88380109, // 00B3 GETMBR R14 R0 K9
+ 0x8C381D0A, // 00B4 GETMET R14 R14 K10
+ 0xB8421600, // 00B5 GETNGBL R16 K11
+ 0x8C402124, // 00B6 GETMET R16 R16 K36
+ 0x5C480000, // 00B7 MOVE R18 R0
+ 0x5C4C0600, // 00B8 MOVE R19 R3
+ 0x5C501A00, // 00B9 MOVE R20 R13
+ 0x7C400800, // 00BA CALL R16 4
+ 0x7C380400, // 00BB CALL R14 2
+ 0xB83A1A00, // 00BC GETNGBL R14 K13
+ 0x8C381D0E, // 00BD GETMET R14 R14 K14
+ 0x8C40030F, // 00BE GETMET R16 R1 K15
+ 0x58480025, // 00BF LDCONST R18 K37
+ 0x5C4C0600, // 00C0 MOVE R19 R3
+ 0x5C501A00, // 00C1 MOVE R20 R13
+ 0x7C400800, // 00C2 CALL R16 4
+ 0x58440011, // 00C3 LDCONST R17 K17
+ 0x7C380600, // 00C4 CALL R14 3
+ 0x000C0702, // 00C5 ADD R3 R3 K2
+ 0x5436002E, // 00C6 LDINT R13 47
+ 0x2434060D, // 00C7 GT R13 R3 R13
+ 0x78360000, // 00C8 JMPF R13 #00CA
+ 0x70020000, // 00C9 JMP #00CB
+ 0x7001FFDA, // 00CA JMP #00A6
+ 0xA8040001, // 00CB EXBLK 1 1
+ 0x70020002, // 00CC JMP #00D0
+ 0x58280021, // 00CD LDCONST R10 K33
+ 0xAC280200, // 00CE CATCH R10 1 0
+ 0xB0080000, // 00CF RAISE 2 R0 R0
+ 0x540E002F, // 00D0 LDINT R3 48
+ 0x60280010, // 00D1 GETGBL R10 G16
+ 0x8C2C011B, // 00D2 GETMET R11 R0 K27
+ 0x5C341200, // 00D3 MOVE R13 R9
+ 0x7C2C0400, // 00D4 CALL R11 2
+ 0x7C280200, // 00D5 CALL R10 1
+ 0xA8020026, // 00D6 EXBLK 0 #00FE
+ 0x5C2C1400, // 00D7 MOVE R11 R10
+ 0x7C2C0000, // 00D8 CALL R11 0
+ 0x9430120B, // 00D9 GETIDX R12 R9 R11
+ 0x6034000F, // 00DA GETGBL R13 G15
+ 0x5C381800, // 00DB MOVE R14 R12
+ 0x603C0013, // 00DC GETGBL R15 G19
+ 0x7C340400, // 00DD CALL R13 2
+ 0x78360017, // 00DE JMPF R13 #00F7
+ 0x8C34191C, // 00DF GETMET R13 R12 K28
+ 0x583C0026, // 00E0 LDCONST R15 K38
+ 0x7C340400, // 00E1 CALL R13 2
+ 0x78360013, // 00E2 JMPF R13 #00F7
+ 0x00341727, // 00E3 ADD R13 R11 K39
+ 0x88380109, // 00E4 GETMBR R14 R0 K9
+ 0x8C381D0A, // 00E5 GETMET R14 R14 K10
+ 0xB8421600, // 00E6 GETNGBL R16 K11
+ 0x8C402128, // 00E7 GETMET R16 R16 K40
+ 0x5C480000, // 00E8 MOVE R18 R0
+ 0x5C4C0600, // 00E9 MOVE R19 R3
+ 0x5C501A00, // 00EA MOVE R20 R13
+ 0x7C400800, // 00EB CALL R16 4
+ 0x7C380400, // 00EC CALL R14 2
+ 0xB83A1A00, // 00ED GETNGBL R14 K13
+ 0x8C381D0E, // 00EE GETMET R14 R14 K14
+ 0x8C40030F, // 00EF GETMET R16 R1 K15
+ 0x58480029, // 00F0 LDCONST R18 K41
+ 0x5C4C0600, // 00F1 MOVE R19 R3
+ 0x5C501A00, // 00F2 MOVE R20 R13
+ 0x7C400800, // 00F3 CALL R16 4
+ 0x58440011, // 00F4 LDCONST R17 K17
+ 0x7C380600, // 00F5 CALL R14 3
+ 0x000C0702, // 00F6 ADD R3 R3 K2
+ 0x54360037, // 00F7 LDINT R13 56
+ 0x2434060D, // 00F8 GT R13 R3 R13
+ 0x78360000, // 00F9 JMPF R13 #00FB
+ 0x70020000, // 00FA JMP #00FC
+ 0x7001FFDA, // 00FB JMP #00D7
+ 0xA8040001, // 00FC EXBLK 1 1
+ 0x70020002, // 00FD JMP #0101
+ 0x58280021, // 00FE LDCONST R10 K33
+ 0xAC280200, // 00FF CATCH R10 1 0
+ 0xB0080000, // 0100 RAISE 2 R0 R0
+ 0x540E0037, // 0101 LDINT R3 56
+ 0x60280010, // 0102 GETGBL R10 G16
+ 0x8C2C011B, // 0103 GETMET R11 R0 K27
+ 0x5C341200, // 0104 MOVE R13 R9
+ 0x7C2C0400, // 0105 CALL R11 2
+ 0x7C280200, // 0106 CALL R10 1
+ 0xA8020026, // 0107 EXBLK 0 #012F
+ 0x5C2C1400, // 0108 MOVE R11 R10
+ 0x7C2C0000, // 0109 CALL R11 0
+ 0x9430120B, // 010A GETIDX R12 R9 R11
+ 0x6034000F, // 010B GETGBL R13 G15
+ 0x5C381800, // 010C MOVE R14 R12
+ 0x603C0013, // 010D GETGBL R15 G19
+ 0x7C340400, // 010E CALL R13 2
+ 0x78360017, // 010F JMPF R13 #0128
+ 0x8C34191C, // 0110 GETMET R13 R12 K28
+ 0x583C002A, // 0111 LDCONST R15 K42
+ 0x7C340400, // 0112 CALL R13 2
+ 0x78360013, // 0113 JMPF R13 #0128
+ 0x0034172B, // 0114 ADD R13 R11 K43
+ 0x88380109, // 0115 GETMBR R14 R0 K9
+ 0x8C381D0A, // 0116 GETMET R14 R14 K10
+ 0xB8421600, // 0117 GETNGBL R16 K11
+ 0x8C40212C, // 0118 GETMET R16 R16 K44
+ 0x5C480000, // 0119 MOVE R18 R0
+ 0x5C4C0600, // 011A MOVE R19 R3
+ 0x5C501A00, // 011B MOVE R20 R13
+ 0x7C400800, // 011C CALL R16 4
+ 0x7C380400, // 011D CALL R14 2
+ 0xB83A1A00, // 011E GETNGBL R14 K13
+ 0x8C381D0E, // 011F GETMET R14 R14 K14
+ 0x8C40030F, // 0120 GETMET R16 R1 K15
+ 0x5848002D, // 0121 LDCONST R18 K45
+ 0x5C4C0600, // 0122 MOVE R19 R3
+ 0x5C501A00, // 0123 MOVE R20 R13
+ 0x7C400800, // 0124 CALL R16 4
+ 0x58440011, // 0125 LDCONST R17 K17
+ 0x7C380600, // 0126 CALL R14 3
+ 0x000C0702, // 0127 ADD R3 R3 K2
+ 0x5436003F, // 0128 LDINT R13 64
+ 0x2434060D, // 0129 GT R13 R3 R13
+ 0x78360000, // 012A JMPF R13 #012C
+ 0x70020000, // 012B JMP #012D
+ 0x7001FFDA, // 012C JMP #0108
+ 0xA8040001, // 012D EXBLK 1 1
+ 0x70020002, // 012E JMP #0132
+ 0x58280021, // 012F LDCONST R10 K33
+ 0xAC280200, // 0130 CATCH R10 1 0
+ 0xB0080000, // 0131 RAISE 2 R0 R0
+ 0x80000000, // 0132 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h
index 0246ef549..df537be23 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM.h
@@ -1371,7 +1371,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
1, /* has sup protos */
( &(const struct bproto*[ 2]) {
be_nested_proto(
- 23, /* nstack */
+ 25, /* nstack */
4, /* argc */
0, /* varg */
1, /* has upvals */
@@ -1382,7 +1382,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[39]) { /* constants */
+ ( &(const bvalue[40]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -1404,28 +1404,29 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
/* K18 */ be_nested_str_weak(data),
/* K19 */ be_nested_str_weak(to_TLV),
/* K20 */ be_nested_str_weak(encode_len),
- /* K21 */ be_nested_str_weak(create_TLV),
- /* K22 */ be_nested_str_weak(RAW),
- /* K23 */ be_nested_str_weak(tlv2raw),
- /* K24 */ be_nested_str_weak(attribute_reports),
- /* K25 */ be_nested_str_weak(push),
- /* K26 */ be_nested_str_weak(tasmota),
- /* K27 */ be_nested_str_weak(log),
- /* K28 */ be_nested_str_weak(format),
- /* K29 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20_X25s),
- /* K30 */ be_nested_str_weak(local_session_id),
- /* K31 */ be_const_int(2),
- /* K32 */ be_nested_str_weak(status),
- /* K33 */ be_nested_str_weak(attribute_status),
- /* K34 */ be_nested_str_weak(AttributeStatusIB),
- /* K35 */ be_nested_str_weak(StatusIB),
- /* K36 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20STATUS_X3A_X200x_X2502X_X20_X25s),
- /* K37 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
- /* K38 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20IGNORED),
+ /* K21 */ be_nested_str_weak(tlv2raw),
+ /* K22 */ be_nested_str_weak(tasmota),
+ /* K23 */ be_nested_str_weak(log),
+ /* K24 */ be_nested_str_weak(format),
+ /* K25 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20_X25s),
+ /* K26 */ be_nested_str_weak(local_session_id),
+ /* K27 */ be_const_int(2),
+ /* K28 */ be_nested_str_weak(status),
+ /* K29 */ be_nested_str_weak(attribute_status),
+ /* K30 */ be_nested_str_weak(AttributeStatusIB),
+ /* K31 */ be_nested_str_weak(StatusIB),
+ /* K32 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20STATUS_X3A_X200x_X2502X_X20_X25s),
+ /* K33 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
+ /* K34 */ be_nested_str_weak(MTR_X3A_X20_X3ERead_Attr_X20_X28_X256i_X29_X20_X25s_X25s_X20_X2D_X20IGNORED),
+ /* K35 */ be_nested_str_weak(attribute_reports),
+ /* K36 */ be_const_int(0),
+ /* K37 */ be_nested_str_weak(push),
+ /* K38 */ be_nested_str_weak(IM_ReportData),
+ /* K39 */ be_nested_str_weak(MAX_MESSAGE),
}),
be_str_weak(read_single_attribute),
&be_const_str_solidified,
- ( &(const binstruction[175]) { /* code */
+ ( &(const binstruction[206]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -1449,158 +1450,189 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
0x7C1C0600, // 0014 CALL R7 3
0x70020000, // 0015 JMP #0017
0x4C1C0000, // 0016 LDNIL R7
- 0x4C200000, // 0017 LDNIL R8
- 0x20200E08, // 0018 NE R8 R7 R8
- 0x78220041, // 0019 JMPF R8 #005C
- 0xB8220200, // 001A GETNGBL R8 K1
- 0x8C20110A, // 001B GETMET R8 R8 K10
- 0x7C200200, // 001C CALL R8 1
- 0xB8260200, // 001D GETNGBL R9 K1
- 0x8C24130C, // 001E GETMET R9 R9 K12
- 0x7C240200, // 001F CALL R9 1
- 0x90221609, // 0020 SETMBR R8 K11 R9
- 0x8824110B, // 0021 GETMBR R9 R8 K11
- 0x90261B0E, // 0022 SETMBR R9 K13 K14
- 0x8824110B, // 0023 GETMBR R9 R8 K11
- 0xB82A0200, // 0024 GETNGBL R10 K1
- 0x8C281510, // 0025 GETMET R10 R10 K16
- 0x7C280200, // 0026 CALL R10 1
- 0x90261E0A, // 0027 SETMBR R9 K15 R10
- 0x8824110B, // 0028 GETMBR R9 R8 K11
- 0x8824130F, // 0029 GETMBR R9 R9 K15
- 0x88280511, // 002A GETMBR R10 R2 K17
- 0x9026220A, // 002B SETMBR R9 K17 R10
- 0x8824110B, // 002C GETMBR R9 R8 K11
- 0x8824130F, // 002D GETMBR R9 R9 K15
- 0x88280504, // 002E GETMBR R10 R2 K4
- 0x9026080A, // 002F SETMBR R9 K4 R10
- 0x8824110B, // 0030 GETMBR R9 R8 K11
- 0x8824130F, // 0031 GETMBR R9 R9 K15
- 0x88280505, // 0032 GETMBR R10 R2 K5
- 0x90260A0A, // 0033 SETMBR R9 K5 R10
- 0x8824110B, // 0034 GETMBR R9 R8 K11
- 0x90262407, // 0035 SETMBR R9 K18 R7
- 0x8C241113, // 0036 GETMET R9 R8 K19
- 0x7C240200, // 0037 CALL R9 1
- 0x8C281314, // 0038 GETMET R10 R9 K20
- 0x7C280200, // 0039 CALL R10 1
- 0x602C0015, // 003A GETGBL R11 G21
- 0x5C301400, // 003B MOVE R12 R10
- 0x7C2C0200, // 003C CALL R11 1
- 0x8C300B15, // 003D GETMET R12 R5 K21
- 0x88380B16, // 003E GETMBR R14 R5 K22
- 0x8C3C1317, // 003F GETMET R15 R9 K23
- 0x5C441600, // 0040 MOVE R17 R11
- 0x7C3C0400, // 0041 CALL R15 2
- 0x7C300600, // 0042 CALL R12 3
- 0x88340118, // 0043 GETMBR R13 R0 K24
- 0x8C341B19, // 0044 GETMET R13 R13 K25
- 0x5C3C1800, // 0045 MOVE R15 R12
- 0x7C340400, // 0046 CALL R13 2
- 0x68340001, // 0047 GETUPV R13 U1
- 0x7436000F, // 0048 JMPT R13 #0059
- 0xB8363400, // 0049 GETNGBL R13 K26
- 0x8C341B1B, // 004A GETMET R13 R13 K27
- 0x8C3C091C, // 004B GETMET R15 R4 K28
- 0x5844001D, // 004C LDCONST R17 K29
- 0x68480000, // 004D GETUPV R18 U0
- 0x8848251E, // 004E GETMBR R18 R18 K30
- 0x604C0008, // 004F GETGBL R19 G8
- 0x5C500400, // 0050 MOVE R20 R2
- 0x7C4C0200, // 0051 CALL R19 1
- 0x5C500C00, // 0052 MOVE R20 R6
- 0x60540008, // 0053 GETGBL R21 G8
- 0x5C580E00, // 0054 MOVE R22 R7
- 0x7C540200, // 0055 CALL R21 1
- 0x7C3C0C00, // 0056 CALL R15 6
- 0x5840001F, // 0057 LDCONST R16 K31
- 0x7C340600, // 0058 CALL R13 3
- 0x50340200, // 0059 LDBOOL R13 1 0
- 0x80041A00, // 005A RET 1 R13
- 0x70020051, // 005B JMP #00AE
- 0x88200520, // 005C GETMBR R8 R2 K32
- 0x4C240000, // 005D LDNIL R9
- 0x20201009, // 005E NE R8 R8 R9
- 0x7822003E, // 005F JMPF R8 #009F
- 0x780E003C, // 0060 JMPF R3 #009E
- 0xB8220200, // 0061 GETNGBL R8 K1
- 0x8C20110A, // 0062 GETMET R8 R8 K10
- 0x7C200200, // 0063 CALL R8 1
- 0xB8260200, // 0064 GETNGBL R9 K1
- 0x8C241322, // 0065 GETMET R9 R9 K34
- 0x7C240200, // 0066 CALL R9 1
- 0x90224209, // 0067 SETMBR R8 K33 R9
- 0x88241121, // 0068 GETMBR R9 R8 K33
- 0xB82A0200, // 0069 GETNGBL R10 K1
- 0x8C281510, // 006A GETMET R10 R10 K16
- 0x7C280200, // 006B CALL R10 1
- 0x90261E0A, // 006C SETMBR R9 K15 R10
- 0x88241121, // 006D GETMBR R9 R8 K33
- 0xB82A0200, // 006E GETNGBL R10 K1
- 0x8C281523, // 006F GETMET R10 R10 K35
- 0x7C280200, // 0070 CALL R10 1
- 0x9026400A, // 0071 SETMBR R9 K32 R10
- 0x88241121, // 0072 GETMBR R9 R8 K33
- 0x8824130F, // 0073 GETMBR R9 R9 K15
- 0x88280511, // 0074 GETMBR R10 R2 K17
- 0x9026220A, // 0075 SETMBR R9 K17 R10
- 0x88241121, // 0076 GETMBR R9 R8 K33
- 0x8824130F, // 0077 GETMBR R9 R9 K15
- 0x88280504, // 0078 GETMBR R10 R2 K4
- 0x9026080A, // 0079 SETMBR R9 K4 R10
- 0x88241121, // 007A GETMBR R9 R8 K33
- 0x8824130F, // 007B GETMBR R9 R9 K15
- 0x88280505, // 007C GETMBR R10 R2 K5
- 0x90260A0A, // 007D SETMBR R9 K5 R10
- 0x88241121, // 007E GETMBR R9 R8 K33
- 0x88241320, // 007F GETMBR R9 R9 K32
- 0x88280520, // 0080 GETMBR R10 R2 K32
- 0x9026400A, // 0081 SETMBR R9 K32 R10
- 0x88240118, // 0082 GETMBR R9 R0 K24
- 0x8C241319, // 0083 GETMET R9 R9 K25
- 0x5C2C1000, // 0084 MOVE R11 R8
- 0x7C240400, // 0085 CALL R9 2
- 0xB8263400, // 0086 GETNGBL R9 K26
- 0x8C24131B, // 0087 GETMET R9 R9 K27
- 0x8C2C091C, // 0088 GETMET R11 R4 K28
- 0x58340024, // 0089 LDCONST R13 K36
- 0x68380000, // 008A GETUPV R14 U0
- 0x88381D1E, // 008B GETMBR R14 R14 K30
- 0x603C0008, // 008C GETGBL R15 G8
- 0x5C400400, // 008D MOVE R16 R2
- 0x7C3C0200, // 008E CALL R15 1
- 0x5C400C00, // 008F MOVE R16 R6
- 0x88440520, // 0090 GETMBR R17 R2 K32
- 0x88480520, // 0091 GETMBR R18 R2 K32
- 0xB84E0200, // 0092 GETNGBL R19 K1
- 0x884C2725, // 0093 GETMBR R19 R19 K37
- 0x1C482413, // 0094 EQ R18 R18 R19
- 0x784A0001, // 0095 JMPF R18 #0098
- 0x58480025, // 0096 LDCONST R18 K37
- 0x70020000, // 0097 JMP #0099
- 0x58480008, // 0098 LDCONST R18 K8
- 0x7C2C0E00, // 0099 CALL R11 7
- 0x5830001F, // 009A LDCONST R12 K31
- 0x7C240600, // 009B CALL R9 3
- 0x50240200, // 009C LDBOOL R9 1 0
- 0x80041200, // 009D RET 1 R9
- 0x7002000E, // 009E JMP #00AE
- 0xB8223400, // 009F GETNGBL R8 K26
- 0x8C20111B, // 00A0 GETMET R8 R8 K27
- 0x8C28091C, // 00A1 GETMET R10 R4 K28
- 0x58300026, // 00A2 LDCONST R12 K38
- 0x68340000, // 00A3 GETUPV R13 U0
- 0x88341B1E, // 00A4 GETMBR R13 R13 K30
- 0x60380008, // 00A5 GETGBL R14 G8
- 0x5C3C0400, // 00A6 MOVE R15 R2
- 0x7C380200, // 00A7 CALL R14 1
- 0x5C3C0C00, // 00A8 MOVE R15 R6
- 0x7C280A00, // 00A9 CALL R10 5
- 0x582C001F, // 00AA LDCONST R11 K31
- 0x7C200600, // 00AB CALL R8 3
+ 0x50200200, // 0017 LDBOOL R8 1 0
+ 0x4C240000, // 0018 LDNIL R9
+ 0x4C280000, // 0019 LDNIL R10
+ 0x20280E0A, // 001A NE R10 R7 R10
+ 0x782A003A, // 001B JMPF R10 #0057
+ 0x60280008, // 001C GETGBL R10 G8
+ 0x5C2C0E00, // 001D MOVE R11 R7
+ 0x7C280200, // 001E CALL R10 1
+ 0xB82E0200, // 001F GETNGBL R11 K1
+ 0x8C2C170A, // 0020 GETMET R11 R11 K10
+ 0x7C2C0200, // 0021 CALL R11 1
+ 0xB8320200, // 0022 GETNGBL R12 K1
+ 0x8C30190C, // 0023 GETMET R12 R12 K12
+ 0x7C300200, // 0024 CALL R12 1
+ 0x902E160C, // 0025 SETMBR R11 K11 R12
+ 0x8830170B, // 0026 GETMBR R12 R11 K11
+ 0x90321B0E, // 0027 SETMBR R12 K13 K14
+ 0x8830170B, // 0028 GETMBR R12 R11 K11
+ 0xB8360200, // 0029 GETNGBL R13 K1
+ 0x8C341B10, // 002A GETMET R13 R13 K16
+ 0x7C340200, // 002B CALL R13 1
+ 0x90321E0D, // 002C SETMBR R12 K15 R13
+ 0x8830170B, // 002D GETMBR R12 R11 K11
+ 0x8830190F, // 002E GETMBR R12 R12 K15
+ 0x88340511, // 002F GETMBR R13 R2 K17
+ 0x9032220D, // 0030 SETMBR R12 K17 R13
+ 0x8830170B, // 0031 GETMBR R12 R11 K11
+ 0x8830190F, // 0032 GETMBR R12 R12 K15
+ 0x88340504, // 0033 GETMBR R13 R2 K4
+ 0x9032080D, // 0034 SETMBR R12 K4 R13
+ 0x8830170B, // 0035 GETMBR R12 R11 K11
+ 0x8830190F, // 0036 GETMBR R12 R12 K15
+ 0x88340505, // 0037 GETMBR R13 R2 K5
+ 0x90320A0D, // 0038 SETMBR R12 K5 R13
+ 0x8830170B, // 0039 GETMBR R12 R11 K11
+ 0x90322407, // 003A SETMBR R12 K18 R7
+ 0x8C301713, // 003B GETMET R12 R11 K19
+ 0x7C300200, // 003C CALL R12 1
+ 0x8C341914, // 003D GETMET R13 R12 K20
+ 0x7C340200, // 003E CALL R13 1
+ 0x60380015, // 003F GETGBL R14 G21
+ 0x5C3C1A00, // 0040 MOVE R15 R13
+ 0x7C380200, // 0041 CALL R14 1
+ 0x8C3C1915, // 0042 GETMET R15 R12 K21
+ 0x5C441C00, // 0043 MOVE R17 R14
+ 0x7C3C0400, // 0044 CALL R15 2
+ 0x5C241E00, // 0045 MOVE R9 R15
+ 0x683C0001, // 0046 GETUPV R15 U1
+ 0x743E000D, // 0047 JMPT R15 #0056
+ 0xB83E2C00, // 0048 GETNGBL R15 K22
+ 0x8C3C1F17, // 0049 GETMET R15 R15 K23
+ 0x8C440918, // 004A GETMET R17 R4 K24
+ 0x584C0019, // 004B LDCONST R19 K25
+ 0x68500000, // 004C GETUPV R20 U0
+ 0x8850291A, // 004D GETMBR R20 R20 K26
+ 0x60540008, // 004E GETGBL R21 G8
+ 0x5C580400, // 004F MOVE R22 R2
+ 0x7C540200, // 0050 CALL R21 1
+ 0x5C580C00, // 0051 MOVE R22 R6
+ 0x5C5C1400, // 0052 MOVE R23 R10
+ 0x7C440C00, // 0053 CALL R17 6
+ 0x5848001B, // 0054 LDCONST R18 K27
+ 0x7C3C0600, // 0055 CALL R15 3
+ 0x70020055, // 0056 JMP #00AD
+ 0x8828051C, // 0057 GETMBR R10 R2 K28
+ 0x4C2C0000, // 0058 LDNIL R11
+ 0x2028140B, // 0059 NE R10 R10 R11
+ 0x782A0043, // 005A JMPF R10 #009F
+ 0x780E0041, // 005B JMPF R3 #009E
+ 0xB82A0200, // 005C GETNGBL R10 K1
+ 0x8C28150A, // 005D GETMET R10 R10 K10
+ 0x7C280200, // 005E CALL R10 1
+ 0xB82E0200, // 005F GETNGBL R11 K1
+ 0x8C2C171E, // 0060 GETMET R11 R11 K30
+ 0x7C2C0200, // 0061 CALL R11 1
+ 0x902A3A0B, // 0062 SETMBR R10 K29 R11
+ 0x882C151D, // 0063 GETMBR R11 R10 K29
+ 0xB8320200, // 0064 GETNGBL R12 K1
+ 0x8C301910, // 0065 GETMET R12 R12 K16
+ 0x7C300200, // 0066 CALL R12 1
+ 0x902E1E0C, // 0067 SETMBR R11 K15 R12
+ 0x882C151D, // 0068 GETMBR R11 R10 K29
+ 0xB8320200, // 0069 GETNGBL R12 K1
+ 0x8C30191F, // 006A GETMET R12 R12 K31
+ 0x7C300200, // 006B CALL R12 1
+ 0x902E380C, // 006C SETMBR R11 K28 R12
+ 0x882C151D, // 006D GETMBR R11 R10 K29
+ 0x882C170F, // 006E GETMBR R11 R11 K15
+ 0x88300511, // 006F GETMBR R12 R2 K17
+ 0x902E220C, // 0070 SETMBR R11 K17 R12
+ 0x882C151D, // 0071 GETMBR R11 R10 K29
+ 0x882C170F, // 0072 GETMBR R11 R11 K15
+ 0x88300504, // 0073 GETMBR R12 R2 K4
+ 0x902E080C, // 0074 SETMBR R11 K4 R12
+ 0x882C151D, // 0075 GETMBR R11 R10 K29
+ 0x882C170F, // 0076 GETMBR R11 R11 K15
+ 0x88300505, // 0077 GETMBR R12 R2 K5
+ 0x902E0A0C, // 0078 SETMBR R11 K5 R12
+ 0x882C151D, // 0079 GETMBR R11 R10 K29
+ 0x882C171C, // 007A GETMBR R11 R11 K28
+ 0x8830051C, // 007B GETMBR R12 R2 K28
+ 0x902E380C, // 007C SETMBR R11 K28 R12
+ 0x8C2C1513, // 007D GETMET R11 R10 K19
+ 0x7C2C0200, // 007E CALL R11 1
+ 0x8C301714, // 007F GETMET R12 R11 K20
+ 0x7C300200, // 0080 CALL R12 1
+ 0x60340015, // 0081 GETGBL R13 G21
+ 0x5C381800, // 0082 MOVE R14 R12
+ 0x7C340200, // 0083 CALL R13 1
+ 0x8C381715, // 0084 GETMET R14 R11 K21
+ 0x5C401A00, // 0085 MOVE R16 R13
+ 0x7C380400, // 0086 CALL R14 2
+ 0x5C241C00, // 0087 MOVE R9 R14
+ 0xB83A2C00, // 0088 GETNGBL R14 K22
+ 0x8C381D17, // 0089 GETMET R14 R14 K23
+ 0x8C400918, // 008A GETMET R16 R4 K24
+ 0x58480020, // 008B LDCONST R18 K32
+ 0x684C0000, // 008C GETUPV R19 U0
+ 0x884C271A, // 008D GETMBR R19 R19 K26
+ 0x60500008, // 008E GETGBL R20 G8
+ 0x5C540400, // 008F MOVE R21 R2
+ 0x7C500200, // 0090 CALL R20 1
+ 0x5C540C00, // 0091 MOVE R21 R6
+ 0x8858051C, // 0092 GETMBR R22 R2 K28
+ 0x885C051C, // 0093 GETMBR R23 R2 K28
+ 0xB8620200, // 0094 GETNGBL R24 K1
+ 0x88603121, // 0095 GETMBR R24 R24 K33
+ 0x1C5C2E18, // 0096 EQ R23 R23 R24
+ 0x785E0001, // 0097 JMPF R23 #009A
+ 0x585C0021, // 0098 LDCONST R23 K33
+ 0x70020000, // 0099 JMP #009B
+ 0x585C0008, // 009A LDCONST R23 K8
+ 0x7C400E00, // 009B CALL R16 7
+ 0x5844001B, // 009C LDCONST R17 K27
+ 0x7C380600, // 009D CALL R14 3
+ 0x7002000D, // 009E JMP #00AD
+ 0xB82A2C00, // 009F GETNGBL R10 K22
+ 0x8C281517, // 00A0 GETMET R10 R10 K23
+ 0x8C300918, // 00A1 GETMET R12 R4 K24
+ 0x58380022, // 00A2 LDCONST R14 K34
+ 0x683C0000, // 00A3 GETUPV R15 U0
+ 0x883C1F1A, // 00A4 GETMBR R15 R15 K26
+ 0x60400008, // 00A5 GETGBL R16 G8
+ 0x5C440400, // 00A6 MOVE R17 R2
+ 0x7C400200, // 00A7 CALL R16 1
+ 0x5C440C00, // 00A8 MOVE R17 R6
+ 0x7C300A00, // 00A9 CALL R12 5
+ 0x5834001B, // 00AA LDCONST R13 K27
+ 0x7C280600, // 00AB CALL R10 3
0x50200000, // 00AC LDBOOL R8 0 0
- 0x80041000, // 00AD RET 1 R8
- 0x80000000, // 00AE RET 0
+ 0x7826001E, // 00AD JMPF R9 #00CD
+ 0x6028000C, // 00AE GETGBL R10 G12
+ 0x882C0123, // 00AF GETMBR R11 R0 K35
+ 0x7C280200, // 00B0 CALL R10 1
+ 0x1C281524, // 00B1 EQ R10 R10 K36
+ 0x782A0004, // 00B2 JMPF R10 #00B8
+ 0x88280123, // 00B3 GETMBR R10 R0 K35
+ 0x8C281525, // 00B4 GETMET R10 R10 K37
+ 0x5C301200, // 00B5 MOVE R12 R9
+ 0x7C280400, // 00B6 CALL R10 2
+ 0x70020014, // 00B7 JMP #00CD
+ 0x5429FFFE, // 00B8 LDINT R10 -1
+ 0x882C0123, // 00B9 GETMBR R11 R0 K35
+ 0x9428160A, // 00BA GETIDX R10 R11 R10
+ 0x6030000C, // 00BB GETGBL R12 G12
+ 0x5C341400, // 00BC MOVE R13 R10
+ 0x7C300200, // 00BD CALL R12 1
+ 0x6034000C, // 00BE GETGBL R13 G12
+ 0x5C381200, // 00BF MOVE R14 R9
+ 0x7C340200, // 00C0 CALL R13 1
+ 0x0030180D, // 00C1 ADD R12 R12 R13
+ 0xB8360200, // 00C2 GETNGBL R13 K1
+ 0x88341B26, // 00C3 GETMBR R13 R13 K38
+ 0x88341B27, // 00C4 GETMBR R13 R13 K39
+ 0x1830180D, // 00C5 LE R12 R12 R13
+ 0x78320001, // 00C6 JMPF R12 #00C9
+ 0x40301409, // 00C7 CONNECT R12 R10 R9
+ 0x70020003, // 00C8 JMP #00CD
+ 0x882C0123, // 00C9 GETMBR R11 R0 K35
+ 0x8C2C1725, // 00CA GETMET R11 R11 K37
+ 0x5C341200, // 00CB MOVE R13 R9
+ 0x7C2C0400, // 00CC CALL R11 2
+ 0x80041000, // 00CD RET 1 R8
})
),
be_nested_proto(
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
index e476fbf5c..b1b6f21da 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_IM_Message.h
@@ -529,7 +529,7 @@ extern const bclass be_class_Matter_IM_ReportData;
********************************************************************/
be_local_closure(Matter_IM_ReportData_send_im, /* name */
be_nested_proto(
- 21, /* nstack */
+ 19, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -537,43 +537,42 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[32]) { /* constants */
+ ( &(const bvalue[31]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(ready),
/* K2 */ be_nested_str_weak(resp),
/* K3 */ be_nested_str_weak(data),
/* K4 */ be_nested_str_weak(more_chunked_messages),
- /* K5 */ be_const_int(0),
+ /* K5 */ be_const_int(1),
/* K6 */ be_nested_str_weak(attribute_reports),
- /* K7 */ be_nested_str_weak(to_TLV),
- /* K8 */ be_nested_str_weak(encode_len),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(MAX_MESSAGE),
- /* K11 */ be_const_int(2147483647),
- /* K12 */ be_nested_str_weak(tasmota),
- /* K13 */ be_nested_str_weak(log),
- /* K14 */ be_nested_str_weak(format),
- /* K15 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20next_chunk_X20exch_X3D_X25i),
- /* K16 */ be_nested_str_weak(get_exchangeid),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20first_chunk_X20exch_X3D_X25i),
- /* K19 */ be_nested_str_weak(tlv2raw),
- /* K20 */ be_nested_str_weak(encode_frame),
- /* K21 */ be_nested_str_weak(encrypt),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20_X3Csnd_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20id_X3D_X25i_X20exch_X3D_X25i_X20rack_X3D_X25s),
- /* K23 */ be_nested_str_weak(session),
- /* K24 */ be_nested_str_weak(local_session_id),
- /* K25 */ be_nested_str_weak(message_counter),
- /* K26 */ be_nested_str_weak(exchange_id),
- /* K27 */ be_nested_str_weak(ack_message_counter),
- /* K28 */ be_nested_str_weak(send_response_frame),
- /* K29 */ be_nested_str_weak(last_counter),
- /* K30 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i),
- /* K31 */ be_nested_str_weak(finish),
+ /* K7 */ be_const_int(2147483647),
+ /* K8 */ be_const_int(0),
+ /* K9 */ be_nested_str_weak(tasmota),
+ /* K10 */ be_nested_str_weak(log),
+ /* K11 */ be_nested_str_weak(format),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20next_chunk_X20exch_X3D_X25i),
+ /* K13 */ be_nested_str_weak(get_exchangeid),
+ /* K14 */ be_const_int(3),
+ /* K15 */ be_nested_str_weak(MTR_X3A_X20_X2ERead_Attr_X20first_chunk_X20exch_X3D_X25i),
+ /* K16 */ be_nested_str_weak(to_TLV),
+ /* K17 */ be_nested_str_weak(tlv2raw),
+ /* K18 */ be_nested_str_weak(MAX_MESSAGE),
+ /* K19 */ be_nested_str_weak(encode_frame),
+ /* K20 */ be_nested_str_weak(encrypt),
+ /* K21 */ be_nested_str_weak(MTR_X3A_X20_X3Csnd_X20_X20_X20_X20_X20_X20_X20_X28_X256i_X29_X20id_X3D_X25i_X20exch_X3D_X25i_X20rack_X3D_X25s),
+ /* K22 */ be_nested_str_weak(session),
+ /* K23 */ be_nested_str_weak(local_session_id),
+ /* K24 */ be_nested_str_weak(message_counter),
+ /* K25 */ be_nested_str_weak(exchange_id),
+ /* K26 */ be_nested_str_weak(ack_message_counter),
+ /* K27 */ be_nested_str_weak(send_response_frame),
+ /* K28 */ be_nested_str_weak(last_counter),
+ /* K29 */ be_nested_str_weak(MTR_X3A_X20to_be_sent_later_X20size_X3D_X25i_X20exch_X3D_X25i),
+ /* K30 */ be_nested_str_weak(finish),
}),
be_str_weak(send_im),
&be_const_str_solidified,
- ( &(const binstruction[147]) { /* code */
+ ( &(const binstruction[109]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x880C0101, // 0001 GETMBR R3 R0 K1
0x740E0001, // 0002 JMPT R3 #0005
@@ -583,144 +582,106 @@ be_local_closure(Matter_IM_ReportData_send_im, /* name */
0x88100103, // 0006 GETMBR R4 R0 K3
0x88140904, // 0007 GETMBR R5 R4 K4
0x58180005, // 0008 LDCONST R6 K5
- 0x581C0005, // 0009 LDCONST R7 K5
+ 0x4C1C0000, // 0009 LDNIL R7
0x88200906, // 000A GETMBR R8 R4 K6
0x4C240000, // 000B LDNIL R9
0x20201009, // 000C NE R8 R8 R9
- 0x78220003, // 000D JMPF R8 #0012
- 0x6020000C, // 000E GETGBL R8 G12
+ 0x7822000D, // 000D JMPF R8 #001C
+ 0x40200D07, // 000E CONNECT R8 R6 K7
0x88240906, // 000F GETMBR R9 R4 K6
- 0x7C200200, // 0010 CALL R8 1
- 0x70020000, // 0011 JMP #0013
- 0x58200005, // 0012 LDCONST R8 K5
- 0x24241105, // 0013 GT R9 R8 K5
- 0x78260007, // 0014 JMPF R9 #001D
- 0x88240906, // 0015 GETMBR R9 R4 K6
- 0x94241305, // 0016 GETIDX R9 R9 K5
- 0x8C241307, // 0017 GETMET R9 R9 K7
- 0x7C240200, // 0018 CALL R9 1
- 0x8C241308, // 0019 GETMET R9 R9 K8
- 0x7C240200, // 001A CALL R9 1
- 0x5C181200, // 001B MOVE R6 R9
- 0x581C0009, // 001C LDCONST R7 K9
- 0x8824010A, // 001D GETMBR R9 R0 K10
- 0x14240C09, // 001E LT R9 R6 R9
- 0x78260010, // 001F JMPF R9 #0031
- 0x14240E08, // 0020 LT R9 R7 R8
- 0x7826000E, // 0021 JMPF R9 #0031
- 0x88240906, // 0022 GETMBR R9 R4 K6
- 0x94241207, // 0023 GETIDX R9 R9 R7
- 0x8C241307, // 0024 GETMET R9 R9 K7
- 0x7C240200, // 0025 CALL R9 1
- 0x8C241308, // 0026 GETMET R9 R9 K8
- 0x7C240200, // 0027 CALL R9 1
- 0x00280C09, // 0028 ADD R10 R6 R9
- 0x882C010A, // 0029 GETMBR R11 R0 K10
- 0x1428140B, // 002A LT R10 R10 R11
- 0x782A0002, // 002B JMPF R10 #002F
- 0x00180C09, // 002C ADD R6 R6 R9
- 0x001C0F09, // 002D ADD R7 R7 K9
- 0x70020000, // 002E JMP #0030
- 0x70020000, // 002F JMP #0031
- 0x7001FFEB, // 0030 JMP #001D
- 0x60240012, // 0031 GETGBL R9 G18
- 0x7C240000, // 0032 CALL R9 0
- 0x88280906, // 0033 GETMBR R10 R4 K6
- 0x4C2C0000, // 0034 LDNIL R11
- 0x2028140B, // 0035 NE R10 R10 R11
- 0x782A000D, // 0036 JMPF R10 #0045
- 0x40280F0B, // 0037 CONNECT R10 R7 K11
- 0x882C0906, // 0038 GETMBR R11 R4 K6
- 0x9424160A, // 0039 GETIDX R9 R11 R10
- 0x04300F09, // 003A SUB R12 R7 K9
- 0x40320A0C, // 003B CONNECT R12 K5 R12
- 0x88340906, // 003C GETMBR R13 R4 K6
- 0x94301A0C, // 003D GETIDX R12 R13 R12
- 0x90120C0C, // 003E SETMBR R4 K6 R12
- 0x6030000C, // 003F GETGBL R12 G12
- 0x5C341200, // 0040 MOVE R13 R9
- 0x7C300200, // 0041 CALL R12 1
- 0x24301905, // 0042 GT R12 R12 K5
- 0x9012080C, // 0043 SETMBR R4 K4 R12
- 0x70020001, // 0044 JMP #0047
- 0x50280000, // 0045 LDBOOL R10 0 0
- 0x9012080A, // 0046 SETMBR R4 K4 R10
- 0x78160008, // 0047 JMPF R5 #0051
- 0xB82A1800, // 0048 GETNGBL R10 K12
- 0x8C28150D, // 0049 GETMET R10 R10 K13
- 0x8C30050E, // 004A GETMET R12 R2 K14
- 0x5838000F, // 004B LDCONST R14 K15
- 0x8C3C0110, // 004C GETMET R15 R0 K16
- 0x7C3C0200, // 004D CALL R15 1
- 0x7C300600, // 004E CALL R12 3
- 0x58340011, // 004F LDCONST R13 K17
- 0x7C280600, // 0050 CALL R10 3
- 0x88280904, // 0051 GETMBR R10 R4 K4
- 0x782A000A, // 0052 JMPF R10 #005E
- 0x5C280A00, // 0053 MOVE R10 R5
- 0x742A0008, // 0054 JMPT R10 #005E
- 0xB82A1800, // 0055 GETNGBL R10 K12
- 0x8C28150D, // 0056 GETMET R10 R10 K13
- 0x8C30050E, // 0057 GETMET R12 R2 K14
- 0x58380012, // 0058 LDCONST R14 K18
- 0x8C3C0110, // 0059 GETMET R15 R0 K16
- 0x7C3C0200, // 005A CALL R15 1
- 0x7C300600, // 005B CALL R12 3
- 0x58340011, // 005C LDCONST R13 K17
- 0x7C280600, // 005D CALL R10 3
- 0x88280103, // 005E GETMBR R10 R0 K3
- 0x8C281507, // 005F GETMET R10 R10 K7
- 0x7C280200, // 0060 CALL R10 1
- 0x8C2C1513, // 0061 GETMET R11 R10 K19
- 0x60340015, // 0062 GETGBL R13 G21
- 0x8838010A, // 0063 GETMBR R14 R0 K10
- 0x7C340200, // 0064 CALL R13 1
- 0x7C2C0400, // 0065 CALL R11 2
- 0x8C300714, // 0066 GETMET R12 R3 K20
- 0x5C381600, // 0067 MOVE R14 R11
- 0x7C300400, // 0068 CALL R12 2
- 0x8C300715, // 0069 GETMET R12 R3 K21
- 0x7C300200, // 006A CALL R12 1
- 0xB8321800, // 006B GETNGBL R12 K12
- 0x8C30190D, // 006C GETMET R12 R12 K13
- 0x8C38050E, // 006D GETMET R14 R2 K14
- 0x58400016, // 006E LDCONST R16 K22
- 0x88440717, // 006F GETMBR R17 R3 K23
- 0x88442318, // 0070 GETMBR R17 R17 K24
- 0x88480719, // 0071 GETMBR R18 R3 K25
- 0x884C071A, // 0072 GETMBR R19 R3 K26
- 0x8850071B, // 0073 GETMBR R20 R3 K27
- 0x7C380C00, // 0074 CALL R14 6
- 0x583C0011, // 0075 LDCONST R15 K17
- 0x7C300600, // 0076 CALL R12 3
- 0x8C30031C, // 0077 GETMET R12 R1 K28
- 0x5C380600, // 0078 MOVE R14 R3
- 0x7C300400, // 0079 CALL R12 2
- 0x88300719, // 007A GETMBR R12 R3 K25
- 0x90023A0C, // 007B SETMBR R0 K29 R12
- 0x6030000C, // 007C GETGBL R12 G12
- 0x5C341200, // 007D MOVE R13 R9
- 0x7C300200, // 007E CALL R12 1
- 0x24301905, // 007F GT R12 R12 K5
- 0x7832000E, // 0080 JMPF R12 #0090
- 0x90120C09, // 0081 SETMBR R4 K6 R9
- 0xB8321800, // 0082 GETNGBL R12 K12
- 0x8C30190D, // 0083 GETMET R12 R12 K13
- 0x8C38050E, // 0084 GETMET R14 R2 K14
- 0x5840001E, // 0085 LDCONST R16 K30
- 0x6044000C, // 0086 GETGBL R17 G12
- 0x88480906, // 0087 GETMBR R18 R4 K6
- 0x7C440200, // 0088 CALL R17 1
- 0x8848071A, // 0089 GETMBR R18 R3 K26
- 0x7C380800, // 008A CALL R14 4
- 0x583C0011, // 008B LDCONST R15 K17
- 0x7C300600, // 008C CALL R12 3
- 0x50300000, // 008D LDBOOL R12 0 0
- 0x9002020C, // 008E SETMBR R0 K1 R12
- 0x70020001, // 008F JMP #0092
- 0x50300200, // 0090 LDBOOL R12 1 0
- 0x90023E0C, // 0091 SETMBR R0 K31 R12
- 0x80000000, // 0092 RET 0
+ 0x941C1208, // 0010 GETIDX R7 R9 R8
+ 0x04280D05, // 0011 SUB R10 R6 K5
+ 0x402A100A, // 0012 CONNECT R10 K8 R10
+ 0x882C0906, // 0013 GETMBR R11 R4 K6
+ 0x9428160A, // 0014 GETIDX R10 R11 R10
+ 0x90120C0A, // 0015 SETMBR R4 K6 R10
+ 0x6028000C, // 0016 GETGBL R10 G12
+ 0x5C2C0E00, // 0017 MOVE R11 R7
+ 0x7C280200, // 0018 CALL R10 1
+ 0x24281508, // 0019 GT R10 R10 K8
+ 0x9012080A, // 001A SETMBR R4 K4 R10
+ 0x70020001, // 001B JMP #001E
+ 0x50200000, // 001C LDBOOL R8 0 0
+ 0x90120808, // 001D SETMBR R4 K4 R8
+ 0x78160008, // 001E JMPF R5 #0028
+ 0xB8221200, // 001F GETNGBL R8 K9
+ 0x8C20110A, // 0020 GETMET R8 R8 K10
+ 0x8C28050B, // 0021 GETMET R10 R2 K11
+ 0x5830000C, // 0022 LDCONST R12 K12
+ 0x8C34010D, // 0023 GETMET R13 R0 K13
+ 0x7C340200, // 0024 CALL R13 1
+ 0x7C280600, // 0025 CALL R10 3
+ 0x582C000E, // 0026 LDCONST R11 K14
+ 0x7C200600, // 0027 CALL R8 3
+ 0x88200904, // 0028 GETMBR R8 R4 K4
+ 0x7822000A, // 0029 JMPF R8 #0035
+ 0x5C200A00, // 002A MOVE R8 R5
+ 0x74220008, // 002B JMPT R8 #0035
+ 0xB8221200, // 002C GETNGBL R8 K9
+ 0x8C20110A, // 002D GETMET R8 R8 K10
+ 0x8C28050B, // 002E GETMET R10 R2 K11
+ 0x5830000F, // 002F LDCONST R12 K15
+ 0x8C34010D, // 0030 GETMET R13 R0 K13
+ 0x7C340200, // 0031 CALL R13 1
+ 0x7C280600, // 0032 CALL R10 3
+ 0x582C000E, // 0033 LDCONST R11 K14
+ 0x7C200600, // 0034 CALL R8 3
+ 0x88200103, // 0035 GETMBR R8 R0 K3
+ 0x8C201110, // 0036 GETMET R8 R8 K16
+ 0x7C200200, // 0037 CALL R8 1
+ 0x8C241111, // 0038 GETMET R9 R8 K17
+ 0x602C0015, // 0039 GETGBL R11 G21
+ 0x88300112, // 003A GETMBR R12 R0 K18
+ 0x7C2C0200, // 003B CALL R11 1
+ 0x7C240400, // 003C CALL R9 2
+ 0x8C280713, // 003D GETMET R10 R3 K19
+ 0x5C301200, // 003E MOVE R12 R9
+ 0x7C280400, // 003F CALL R10 2
+ 0x8C280714, // 0040 GETMET R10 R3 K20
+ 0x7C280200, // 0041 CALL R10 1
+ 0xB82A1200, // 0042 GETNGBL R10 K9
+ 0x8C28150A, // 0043 GETMET R10 R10 K10
+ 0x8C30050B, // 0044 GETMET R12 R2 K11
+ 0x58380015, // 0045 LDCONST R14 K21
+ 0x883C0716, // 0046 GETMBR R15 R3 K22
+ 0x883C1F17, // 0047 GETMBR R15 R15 K23
+ 0x88400718, // 0048 GETMBR R16 R3 K24
+ 0x88440719, // 0049 GETMBR R17 R3 K25
+ 0x8848071A, // 004A GETMBR R18 R3 K26
+ 0x7C300C00, // 004B CALL R12 6
+ 0x5834000E, // 004C LDCONST R13 K14
+ 0x7C280600, // 004D CALL R10 3
+ 0x8C28031B, // 004E GETMET R10 R1 K27
+ 0x5C300600, // 004F MOVE R12 R3
+ 0x7C280400, // 0050 CALL R10 2
+ 0x88280718, // 0051 GETMBR R10 R3 K24
+ 0x9002380A, // 0052 SETMBR R0 K28 R10
+ 0x4C280000, // 0053 LDNIL R10
+ 0x20280E0A, // 0054 NE R10 R7 R10
+ 0x782A0013, // 0055 JMPF R10 #006A
+ 0x6028000C, // 0056 GETGBL R10 G12
+ 0x5C2C0E00, // 0057 MOVE R11 R7
+ 0x7C280200, // 0058 CALL R10 1
+ 0x24281508, // 0059 GT R10 R10 K8
+ 0x782A000E, // 005A JMPF R10 #006A
+ 0x90120C07, // 005B SETMBR R4 K6 R7
+ 0xB82A1200, // 005C GETNGBL R10 K9
+ 0x8C28150A, // 005D GETMET R10 R10 K10
+ 0x8C30050B, // 005E GETMET R12 R2 K11
+ 0x5838001D, // 005F LDCONST R14 K29
+ 0x603C000C, // 0060 GETGBL R15 G12
+ 0x88400906, // 0061 GETMBR R16 R4 K6
+ 0x7C3C0200, // 0062 CALL R15 1
+ 0x88400719, // 0063 GETMBR R16 R3 K25
+ 0x7C300800, // 0064 CALL R12 4
+ 0x5834000E, // 0065 LDCONST R13 K14
+ 0x7C280600, // 0066 CALL R10 3
+ 0x50280000, // 0067 LDBOOL R10 0 0
+ 0x9002020A, // 0068 SETMBR R0 K1 R10
+ 0x70020001, // 0069 JMP #006C
+ 0x50280200, // 006A LDBOOL R10 1 0
+ 0x90023C0A, // 006B SETMBR R0 K30 R10
+ 0x80000000, // 006C RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
new file mode 100644
index 000000000..f38d1d6d6
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
@@ -0,0 +1,179 @@
+/* Solidification of Matter_Plugin_Sensor.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor;
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80040200, // 0000 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
+ /* K1 */ be_nested_str_weak(pre_value),
+ /* K2 */ be_nested_str_weak(match),
+ /* K3 */ be_nested_str_weak(shadow_value),
+ /* K4 */ be_nested_str_weak(valued_changed),
+ }),
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x780A0011, // 0001 JMPF R2 #0014
+ 0x8C080101, // 0002 GETMET R2 R0 K1
+ 0x6010000A, // 0003 GETGBL R4 G10
+ 0x88140100, // 0004 GETMBR R5 R0 K0
+ 0x8C140B02, // 0005 GETMET R5 R5 K2
+ 0x5C1C0200, // 0006 MOVE R7 R1
+ 0x7C140400, // 0007 CALL R5 2
+ 0x7C100200, // 0008 CALL R4 1
+ 0x7C080400, // 0009 CALL R2 2
+ 0x4C0C0000, // 000A LDNIL R3
+ 0x200C0403, // 000B NE R3 R2 R3
+ 0x780E0006, // 000C JMPF R3 #0014
+ 0x880C0103, // 000D GETMBR R3 R0 K3
+ 0x200C0403, // 000E NE R3 R2 R3
+ 0x780E0002, // 000F JMPF R3 #0013
+ 0x8C0C0104, // 0010 GETMET R3 R0 K4
+ 0x5C140400, // 0011 MOVE R5 R2
+ 0x7C0C0400, // 0012 CALL R3 2
+ 0x90020602, // 0013 SETMBR R0 K3 R2
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_init, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(tasmota_sensor_filter),
+ /* K2 */ be_nested_str_weak(tasmota_sensor_matcher),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(Rule_Matcher),
+ /* K5 */ be_nested_str_weak(parse),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[15]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x7C100600, // 0006 CALL R4 3
+ 0x90020203, // 0007 SETMBR R0 K1 R3
+ 0xB8120600, // 0008 GETNGBL R4 K3
+ 0x88100904, // 0009 GETMBR R4 R4 K4
+ 0x8C100905, // 000A GETMET R4 R4 K5
+ 0x5C180600, // 000B MOVE R6 R3
+ 0x7C100400, // 000C CALL R4 2
+ 0x90020404, // 000D SETMBR R0 K2 R4
+ 0x80000000, // 000E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Device;
+be_local_class(Matter_Plugin_Sensor,
+ 3,
+ &be_class_Matter_Plugin_Device,
+ be_nested_map(7,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
+ { be_const_key_weak(pre_value, 2), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
+ { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
+ { be_const_key_weak(shadow_value, -1), be_const_var(2) },
+ { be_const_key_weak(tasmota_sensor_filter, 3), be_const_var(0) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
+ { be_const_key_weak(valued_changed, 0), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor);
+ be_setglobal(vm, "Matter_Plugin_Sensor");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
new file mode 100644
index 000000000..88c5d7c55
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
@@ -0,0 +1,220 @@
+/* Solidification of Matter_Plugin_Sensor_Humidity.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160404, // 0002 LDINT R5 1029
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(shadow_value),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U2),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_const_int(3),
+ /* K14 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[71]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0404, // 0005 LDINT R7 1029
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0035, // 0007 JMPF R7 #003E
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0011, // 0009 JMPF R7 #001C
+ 0x881C0106, // 000A GETMBR R7 R0 K6
+ 0x4C200000, // 000B LDNIL R8
+ 0x201C0E08, // 000C NE R7 R7 R8
+ 0x781E0007, // 000D JMPF R7 #0016
+ 0x8C1C0907, // 000E GETMET R7 R4 K7
+ 0x88240908, // 000F GETMBR R9 R4 K8
+ 0x60280009, // 0010 GETGBL R10 G9
+ 0x882C0106, // 0011 GETMBR R11 R0 K6
+ 0x7C280200, // 0012 CALL R10 1
+ 0x7C1C0600, // 0013 CALL R7 3
+ 0x80040E00, // 0014 RET 1 R7
+ 0x70020004, // 0015 JMP #001B
+ 0x8C1C0907, // 0016 GETMET R7 R4 K7
+ 0x88240909, // 0017 GETMBR R9 R4 K9
+ 0x4C280000, // 0018 LDNIL R10
+ 0x7C1C0600, // 0019 CALL R7 3
+ 0x80040E00, // 001A RET 1 R7
+ 0x70020020, // 001B JMP #003D
+ 0x1C1C0D0A, // 001C EQ R7 R6 K10
+ 0x781E0005, // 001D JMPF R7 #0024
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x88240908, // 001F GETMBR R9 R4 K8
+ 0x542A01F3, // 0020 LDINT R10 500
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020018, // 0023 JMP #003D
+ 0x1C1C0D0B, // 0024 EQ R7 R6 K11
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0907, // 0026 GETMET R7 R4 K7
+ 0x88240908, // 0027 GETMBR R9 R4 K8
+ 0x542A270F, // 0028 LDINT R10 10000
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x70020010, // 002B JMP #003D
+ 0x541EFFFB, // 002C LDINT R7 65532
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0005, // 002E JMPF R7 #0035
+ 0x8C1C0907, // 002F GETMET R7 R4 K7
+ 0x8824090C, // 0030 GETMBR R9 R4 K12
+ 0x58280005, // 0031 LDCONST R10 K5
+ 0x7C1C0600, // 0032 CALL R7 3
+ 0x80040E00, // 0033 RET 1 R7
+ 0x70020007, // 0034 JMP #003D
+ 0x541EFFFC, // 0035 LDINT R7 65533
+ 0x1C1C0C07, // 0036 EQ R7 R6 R7
+ 0x781E0004, // 0037 JMPF R7 #003D
+ 0x8C1C0907, // 0038 GETMET R7 R4 K7
+ 0x8824090C, // 0039 GETMBR R9 R4 K12
+ 0x5828000D, // 003A LDCONST R10 K13
+ 0x7C1C0600, // 003B CALL R7 3
+ 0x80040E00, // 003C RET 1 R7
+ 0x70020007, // 003D JMP #0046
+ 0x601C0003, // 003E GETGBL R7 G3
+ 0x5C200000, // 003F MOVE R8 R0
+ 0x7C1C0200, // 0040 CALL R7 1
+ 0x8C1C0F0E, // 0041 GETMET R7 R7 K14
+ 0x5C240200, // 0042 MOVE R9 R1
+ 0x5C280400, // 0043 MOVE R10 R2
+ 0x7C1C0600, // 0044 CALL R7 3
+ 0x80040E00, // 0045 RET 1 R7
+ 0x80000000, // 0046 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor_Humidity
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Sensor;
+be_local_class(Matter_Plugin_Sensor_Humidity,
+ 0,
+ &be_class_Matter_Plugin_Sensor,
+ be_nested_map(5,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(775, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(1029, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(5,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(1),
+ be_const_int(2),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
+ })) ) } )) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor_Humidity)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_Humidity_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Humidity);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Humidity");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h
new file mode 100644
index 000000000..4cc5a9cd9
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h
@@ -0,0 +1,219 @@
+/* Solidification of Matter_Plugin_Sensor_Light.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor_Light;
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Light_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x541603FF, // 0002 LDINT R5 1024
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Light_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Light_read_attribute, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(shadow_value),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(I2),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_const_int(3),
+ /* K14 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[71]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E03FF, // 0005 LDINT R7 1024
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0035, // 0007 JMPF R7 #003E
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0011, // 0009 JMPF R7 #001C
+ 0x881C0106, // 000A GETMBR R7 R0 K6
+ 0x4C200000, // 000B LDNIL R8
+ 0x201C0E08, // 000C NE R7 R7 R8
+ 0x781E0007, // 000D JMPF R7 #0016
+ 0x8C1C0907, // 000E GETMET R7 R4 K7
+ 0x88240908, // 000F GETMBR R9 R4 K8
+ 0x60280009, // 0010 GETGBL R10 G9
+ 0x882C0106, // 0011 GETMBR R11 R0 K6
+ 0x7C280200, // 0012 CALL R10 1
+ 0x7C1C0600, // 0013 CALL R7 3
+ 0x80040E00, // 0014 RET 1 R7
+ 0x70020004, // 0015 JMP #001B
+ 0x8C1C0907, // 0016 GETMET R7 R4 K7
+ 0x88240909, // 0017 GETMBR R9 R4 K9
+ 0x4C280000, // 0018 LDNIL R10
+ 0x7C1C0600, // 0019 CALL R7 3
+ 0x80040E00, // 001A RET 1 R7
+ 0x70020020, // 001B JMP #003D
+ 0x1C1C0D0A, // 001C EQ R7 R6 K10
+ 0x781E0005, // 001D JMPF R7 #0024
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x88240908, // 001F GETMBR R9 R4 K8
+ 0x58280005, // 0020 LDCONST R10 K5
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020018, // 0023 JMP #003D
+ 0x1C1C0D0B, // 0024 EQ R7 R6 K11
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0907, // 0026 GETMET R7 R4 K7
+ 0x88240908, // 0027 GETMBR R9 R4 K8
+ 0x542A270F, // 0028 LDINT R10 10000
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x70020010, // 002B JMP #003D
+ 0x541EFFFB, // 002C LDINT R7 65532
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0005, // 002E JMPF R7 #0035
+ 0x8C1C0907, // 002F GETMET R7 R4 K7
+ 0x8824090C, // 0030 GETMBR R9 R4 K12
+ 0x58280005, // 0031 LDCONST R10 K5
+ 0x7C1C0600, // 0032 CALL R7 3
+ 0x80040E00, // 0033 RET 1 R7
+ 0x70020007, // 0034 JMP #003D
+ 0x541EFFFC, // 0035 LDINT R7 65533
+ 0x1C1C0C07, // 0036 EQ R7 R6 R7
+ 0x781E0004, // 0037 JMPF R7 #003D
+ 0x8C1C0907, // 0038 GETMET R7 R4 K7
+ 0x8824090C, // 0039 GETMBR R9 R4 K12
+ 0x5828000D, // 003A LDCONST R10 K13
+ 0x7C1C0600, // 003B CALL R7 3
+ 0x80040E00, // 003C RET 1 R7
+ 0x70020007, // 003D JMP #0046
+ 0x601C0003, // 003E GETGBL R7 G3
+ 0x5C200000, // 003F MOVE R8 R0
+ 0x7C1C0200, // 0040 CALL R7 1
+ 0x8C1C0F0E, // 0041 GETMET R7 R7 K14
+ 0x5C240200, // 0042 MOVE R9 R1
+ 0x5C280400, // 0043 MOVE R10 R2
+ 0x7C1C0600, // 0044 CALL R7 3
+ 0x80040E00, // 0045 RET 1 R7
+ 0x80000000, // 0046 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor_Light
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Sensor;
+be_local_class(Matter_Plugin_Sensor_Light,
+ 0,
+ &be_class_Matter_Plugin_Sensor,
+ be_nested_map(5,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Light_valued_changed_closure) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Light_pre_value_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Light_read_attribute_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(262, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(1024, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(5,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(1),
+ be_const_int(2),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
+ })) ) } )) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor_Light)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_Light_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Light);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Light");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
new file mode 100644
index 000000000..7918e7e0d
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
@@ -0,0 +1,219 @@
+/* Solidification of Matter_Plugin_Sensor_Pressure.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160402, // 0002 LDINT R5 1027
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(shadow_value),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(I2),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_const_int(3),
+ /* K14 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[71]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0402, // 0005 LDINT R7 1027
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0035, // 0007 JMPF R7 #003E
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0011, // 0009 JMPF R7 #001C
+ 0x881C0106, // 000A GETMBR R7 R0 K6
+ 0x4C200000, // 000B LDNIL R8
+ 0x201C0E08, // 000C NE R7 R7 R8
+ 0x781E0007, // 000D JMPF R7 #0016
+ 0x8C1C0907, // 000E GETMET R7 R4 K7
+ 0x88240908, // 000F GETMBR R9 R4 K8
+ 0x60280009, // 0010 GETGBL R10 G9
+ 0x882C0106, // 0011 GETMBR R11 R0 K6
+ 0x7C280200, // 0012 CALL R10 1
+ 0x7C1C0600, // 0013 CALL R7 3
+ 0x80040E00, // 0014 RET 1 R7
+ 0x70020004, // 0015 JMP #001B
+ 0x8C1C0907, // 0016 GETMET R7 R4 K7
+ 0x88240909, // 0017 GETMBR R9 R4 K9
+ 0x4C280000, // 0018 LDNIL R10
+ 0x7C1C0600, // 0019 CALL R7 3
+ 0x80040E00, // 001A RET 1 R7
+ 0x70020020, // 001B JMP #003D
+ 0x1C1C0D0A, // 001C EQ R7 R6 K10
+ 0x781E0005, // 001D JMPF R7 #0024
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x88240908, // 001F GETMBR R9 R4 K8
+ 0x542A01F3, // 0020 LDINT R10 500
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020018, // 0023 JMP #003D
+ 0x1C1C0D0B, // 0024 EQ R7 R6 K11
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0907, // 0026 GETMET R7 R4 K7
+ 0x88240908, // 0027 GETMBR R9 R4 K8
+ 0x542A05DB, // 0028 LDINT R10 1500
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x70020010, // 002B JMP #003D
+ 0x541EFFFB, // 002C LDINT R7 65532
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0005, // 002E JMPF R7 #0035
+ 0x8C1C0907, // 002F GETMET R7 R4 K7
+ 0x8824090C, // 0030 GETMBR R9 R4 K12
+ 0x58280005, // 0031 LDCONST R10 K5
+ 0x7C1C0600, // 0032 CALL R7 3
+ 0x80040E00, // 0033 RET 1 R7
+ 0x70020007, // 0034 JMP #003D
+ 0x541EFFFC, // 0035 LDINT R7 65533
+ 0x1C1C0C07, // 0036 EQ R7 R6 R7
+ 0x781E0004, // 0037 JMPF R7 #003D
+ 0x8C1C0907, // 0038 GETMET R7 R4 K7
+ 0x8824090C, // 0039 GETMBR R9 R4 K12
+ 0x5828000D, // 003A LDCONST R10 K13
+ 0x7C1C0600, // 003B CALL R7 3
+ 0x80040E00, // 003C RET 1 R7
+ 0x70020007, // 003D JMP #0046
+ 0x601C0003, // 003E GETGBL R7 G3
+ 0x5C200000, // 003F MOVE R8 R0
+ 0x7C1C0200, // 0040 CALL R7 1
+ 0x8C1C0F0E, // 0041 GETMET R7 R7 K14
+ 0x5C240200, // 0042 MOVE R9 R1
+ 0x5C280400, // 0043 MOVE R10 R2
+ 0x7C1C0600, // 0044 CALL R7 3
+ 0x80040E00, // 0045 RET 1 R7
+ 0x80000000, // 0046 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor_Pressure
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Sensor;
+be_local_class(Matter_Plugin_Sensor_Pressure,
+ 0,
+ &be_class_Matter_Plugin_Sensor,
+ be_nested_map(5,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(773, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(1027, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(5,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(1),
+ be_const_int(2),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
+ })) ) } )) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor_Pressure)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_Pressure_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Pressure);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Pressure");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
new file mode 100644
index 000000000..99d00d696
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
@@ -0,0 +1,215 @@
+/* Solidification of Matter_Plugin_Sensor_Temp.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor_Temp;
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160401, // 0002 LDINT R5 1026
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(shadow_value),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(I2),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[69]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0401, // 0005 LDINT R7 1026
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0033, // 0007 JMPF R7 #003C
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E000F, // 0009 JMPF R7 #001A
+ 0x881C0106, // 000A GETMBR R7 R0 K6
+ 0x4C200000, // 000B LDNIL R8
+ 0x201C0E08, // 000C NE R7 R7 R8
+ 0x781E0005, // 000D JMPF R7 #0014
+ 0x8C1C0907, // 000E GETMET R7 R4 K7
+ 0x88240908, // 000F GETMBR R9 R4 K8
+ 0x88280106, // 0010 GETMBR R10 R0 K6
+ 0x7C1C0600, // 0011 CALL R7 3
+ 0x80040E00, // 0012 RET 1 R7
+ 0x70020004, // 0013 JMP #0019
+ 0x8C1C0907, // 0014 GETMET R7 R4 K7
+ 0x88240909, // 0015 GETMBR R9 R4 K9
+ 0x4C280000, // 0016 LDNIL R10
+ 0x7C1C0600, // 0017 CALL R7 3
+ 0x80040E00, // 0018 RET 1 R7
+ 0x70020020, // 0019 JMP #003B
+ 0x1C1C0D0A, // 001A EQ R7 R6 K10
+ 0x781E0005, // 001B JMPF R7 #0022
+ 0x8C1C0907, // 001C GETMET R7 R4 K7
+ 0x88240908, // 001D GETMBR R9 R4 K8
+ 0x5429EC77, // 001E LDINT R10 -5000
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x80040E00, // 0020 RET 1 R7
+ 0x70020018, // 0021 JMP #003B
+ 0x1C1C0D0B, // 0022 EQ R7 R6 K11
+ 0x781E0005, // 0023 JMPF R7 #002A
+ 0x8C1C0907, // 0024 GETMET R7 R4 K7
+ 0x88240908, // 0025 GETMBR R9 R4 K8
+ 0x542A3A97, // 0026 LDINT R10 15000
+ 0x7C1C0600, // 0027 CALL R7 3
+ 0x80040E00, // 0028 RET 1 R7
+ 0x70020010, // 0029 JMP #003B
+ 0x541EFFFB, // 002A LDINT R7 65532
+ 0x1C1C0C07, // 002B EQ R7 R6 R7
+ 0x781E0005, // 002C JMPF R7 #0033
+ 0x8C1C0907, // 002D GETMET R7 R4 K7
+ 0x8824090C, // 002E GETMBR R9 R4 K12
+ 0x58280005, // 002F LDCONST R10 K5
+ 0x7C1C0600, // 0030 CALL R7 3
+ 0x80040E00, // 0031 RET 1 R7
+ 0x70020007, // 0032 JMP #003B
+ 0x541EFFFC, // 0033 LDINT R7 65533
+ 0x1C1C0C07, // 0034 EQ R7 R6 R7
+ 0x781E0004, // 0035 JMPF R7 #003B
+ 0x8C1C0907, // 0036 GETMET R7 R4 K7
+ 0x8824090C, // 0037 GETMBR R9 R4 K12
+ 0x542A0003, // 0038 LDINT R10 4
+ 0x7C1C0600, // 0039 CALL R7 3
+ 0x80040E00, // 003A RET 1 R7
+ 0x70020007, // 003B JMP #0044
+ 0x601C0003, // 003C GETGBL R7 G3
+ 0x5C200000, // 003D MOVE R8 R0
+ 0x7C1C0200, // 003E CALL R7 1
+ 0x8C1C0F0D, // 003F GETMET R7 R7 K13
+ 0x5C240200, // 0040 MOVE R9 R1
+ 0x5C280400, // 0041 MOVE R10 R2
+ 0x7C1C0600, // 0042 CALL R7 3
+ 0x80040E00, // 0043 RET 1 R7
+ 0x80000000, // 0044 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor_Temp
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Sensor;
+be_local_class(Matter_Plugin_Sensor_Temp,
+ 0,
+ &be_class_Matter_Plugin_Sensor,
+ be_nested_map(5,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(770, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(3,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(1),
+ be_const_int(2),
+ })) ) } )) },
+ })) ) } )) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor_Temp)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_Temp_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Temp);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Temp");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Temp_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Temp_Sensor.h
deleted file mode 100644
index 0c91b56c3..000000000
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Temp_Sensor.h
+++ /dev/null
@@ -1,295 +0,0 @@
-/* Solidification of Matter_Plugin_Temp_Sensor.h */
-/********************************************************************\
-* Generated code, don't edit *
-\********************************************************************/
-#include "be_constobj.h"
-
-extern const bclass be_class_Matter_Plugin_Temp_Sensor;
-
-/********************************************************************
-** Solidified function: get_temperature
-********************************************************************/
-be_local_closure(Matter_Plugin_Temp_Sensor_get_temperature, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(shadow_temperature),
- }),
- be_str_weak(get_temperature),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Plugin_Temp_Sensor_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(get_temperature),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: parse_sensors
-********************************************************************/
-be_local_closure(Matter_Plugin_Temp_Sensor_parse_sensors, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
- /* K1 */ be_nested_str_weak(match),
- /* K2 */ be_nested_str_weak(shadow_temperature),
- /* K3 */ be_nested_str_weak(attribute_updated),
- /* K4 */ be_const_int(0),
- }),
- be_str_weak(parse_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[21]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x780A0011, // 0001 JMPF R2 #0014
- 0x6008000A, // 0002 GETGBL R2 G10
- 0x880C0100, // 0003 GETMBR R3 R0 K0
- 0x8C0C0701, // 0004 GETMET R3 R3 K1
- 0x5C140200, // 0005 MOVE R5 R1
- 0x7C0C0400, // 0006 CALL R3 2
- 0x7C080200, // 0007 CALL R2 1
- 0x4C0C0000, // 0008 LDNIL R3
- 0x200C0403, // 0009 NE R3 R2 R3
- 0x780E0008, // 000A JMPF R3 #0014
- 0x880C0102, // 000B GETMBR R3 R0 K2
- 0x200C0403, // 000C NE R3 R2 R3
- 0x780E0004, // 000D JMPF R3 #0013
- 0x8C0C0103, // 000E GETMET R3 R0 K3
- 0x4C140000, // 000F LDNIL R5
- 0x541A0401, // 0010 LDINT R6 1026
- 0x581C0004, // 0011 LDCONST R7 K4
- 0x7C0C0800, // 0012 CALL R3 4
- 0x90020402, // 0013 SETMBR R0 K2 R2
- 0x80000000, // 0014 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Temp_Sensor_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(tasmota_sensor_filter),
- /* K2 */ be_nested_str_weak(tasmota_sensor_matcher),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(Rule_Matcher),
- /* K5 */ be_nested_str_weak(parse),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x7C100600, // 0006 CALL R4 3
- 0x90020203, // 0007 SETMBR R0 K1 R3
- 0xB8120600, // 0008 GETNGBL R4 K3
- 0x88100904, // 0009 GETMBR R4 R4 K4
- 0x8C100905, // 000A GETMET R4 R4 K5
- 0x5C180600, // 000B MOVE R6 R3
- 0x7C100400, // 000C CALL R4 2
- 0x90020404, // 000D SETMBR R0 K2 R4
- 0x80000000, // 000E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Temp_Sensor_read_attribute, /* name */
- be_nested_proto(
- 13, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(shadow_temperature),
- /* K7 */ be_nested_str_weak(create_TLV),
- /* K8 */ be_nested_str_weak(I2),
- /* K9 */ be_nested_str_weak(NULL),
- /* K10 */ be_const_int(1),
- /* K11 */ be_const_int(2),
- /* K12 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[55]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E0401, // 0005 LDINT R7 1026
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E0025, // 0007 JMPF R7 #002E
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0013, // 0009 JMPF R7 #001E
- 0x881C0106, // 000A GETMBR R7 R0 K6
- 0x4C200000, // 000B LDNIL R8
- 0x201C0E08, // 000C NE R7 R7 R8
- 0x781E0009, // 000D JMPF R7 #0018
- 0x8C1C0907, // 000E GETMET R7 R4 K7
- 0x88240908, // 000F GETMBR R9 R4 K8
- 0x60280009, // 0010 GETGBL R10 G9
- 0x882C0106, // 0011 GETMBR R11 R0 K6
- 0x54320063, // 0012 LDINT R12 100
- 0x082C160C, // 0013 MUL R11 R11 R12
- 0x7C280200, // 0014 CALL R10 1
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x70020004, // 0017 JMP #001D
- 0x8C1C0907, // 0018 GETMET R7 R4 K7
- 0x88240909, // 0019 GETMBR R9 R4 K9
- 0x4C280000, // 001A LDNIL R10
- 0x7C1C0600, // 001B CALL R7 3
- 0x80040E00, // 001C RET 1 R7
- 0x7002000E, // 001D JMP #002D
- 0x1C1C0D0A, // 001E EQ R7 R6 K10
- 0x781E0005, // 001F JMPF R7 #0026
- 0x8C1C0907, // 0020 GETMET R7 R4 K7
- 0x88240908, // 0021 GETMBR R9 R4 K8
- 0x5429EC77, // 0022 LDINT R10 -5000
- 0x7C1C0600, // 0023 CALL R7 3
- 0x80040E00, // 0024 RET 1 R7
- 0x70020006, // 0025 JMP #002D
- 0x1C1C0D0B, // 0026 EQ R7 R6 K11
- 0x781E0004, // 0027 JMPF R7 #002D
- 0x8C1C0907, // 0028 GETMET R7 R4 K7
- 0x88240908, // 0029 GETMBR R9 R4 K8
- 0x542A3A97, // 002A LDINT R10 15000
- 0x7C1C0600, // 002B CALL R7 3
- 0x80040E00, // 002C RET 1 R7
- 0x70020007, // 002D JMP #0036
- 0x601C0003, // 002E GETGBL R7 G3
- 0x5C200000, // 002F MOVE R8 R0
- 0x7C1C0200, // 0030 CALL R7 1
- 0x8C1C0F0C, // 0031 GETMET R7 R7 K12
- 0x5C240200, // 0032 MOVE R9 R1
- 0x5C280400, // 0033 MOVE R10 R2
- 0x7C1C0600, // 0034 CALL R7 3
- 0x80040E00, // 0035 RET 1 R7
- 0x80000000, // 0036 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified class: Matter_Plugin_Temp_Sensor
-********************************************************************/
-extern const bclass be_class_Matter_Plugin_Device;
-be_local_class(Matter_Plugin_Temp_Sensor,
- 3,
- &be_class_Matter_Plugin_Device,
- be_nested_map(10,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(770, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Temp_Sensor_read_attribute_closure) },
- { be_const_key_weak(get_temperature, 1), be_const_closure(Matter_Plugin_Temp_Sensor_get_temperature_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Temp_Sensor_init_closure) },
- { be_const_key_weak(CLUSTERS, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(3,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(1),
- be_const_int(2),
- })) ) } )) },
- })) ) } )) },
- { be_const_key_weak(every_second, 3), be_const_closure(Matter_Plugin_Temp_Sensor_every_second_closure) },
- { be_const_key_weak(tasmota_sensor_filter, 8), be_const_var(0) },
- { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
- { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Temp_Sensor_parse_sensors_closure) },
- { be_const_key_weak(shadow_temperature, -1), be_const_var(2) },
- })),
- be_str_weak(Matter_Plugin_Temp_Sensor)
-);
-/*******************************************************************/
-
-void be_load_Matter_Plugin_Temp_Sensor_class(bvm *vm) {
- be_pushntvclass(vm, &be_class_Matter_Plugin_Temp_Sensor);
- be_setglobal(vm, "Matter_Plugin_Temp_Sensor");
- be_pop(vm, 1);
-}
-/********************************************************************/
-/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
index b29cd7a2f..6cc6300b0 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
@@ -1861,25 +1861,35 @@ be_local_closure(Matter_TLV_list_add_obj, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(to_TLV),
- /* K1 */ be_nested_str_weak(tag_sub),
- /* K2 */ be_nested_str_weak(val),
- /* K3 */ be_nested_str_weak(push),
+ /* K0 */ be_nested_str_weak(val),
+ /* K1 */ be_nested_str_weak(push),
+ /* K2 */ be_nested_str_weak(to_TLV),
+ /* K3 */ be_nested_str_weak(tag_sub),
}),
be_str_weak(add_obj),
&be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
+ ( &(const binstruction[21]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x200C0403, // 0001 NE R3 R2 R3
- 0x780E0006, // 0002 JMPF R3 #000A
- 0x8C0C0500, // 0003 GETMET R3 R2 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x900E0201, // 0005 SETMBR R3 K1 R1
- 0x88100102, // 0006 GETMBR R4 R0 K2
- 0x8C100903, // 0007 GETMET R4 R4 K3
- 0x5C180600, // 0008 MOVE R6 R3
- 0x7C100400, // 0009 CALL R4 2
- 0x80040000, // 000A RET 1 R0
+ 0x780E0010, // 0002 JMPF R3 #0014
+ 0x600C000F, // 0003 GETGBL R3 G15
+ 0x5C100400, // 0004 MOVE R4 R2
+ 0x60140015, // 0005 GETGBL R5 G21
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x780E0004, // 0007 JMPF R3 #000D
+ 0x880C0100, // 0008 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0009 GETMET R3 R3 K1
+ 0x5C140400, // 000A MOVE R5 R2
+ 0x7C0C0400, // 000B CALL R3 2
+ 0x70020006, // 000C JMP #0014
+ 0x8C0C0502, // 000D GETMET R3 R2 K2
+ 0x7C0C0200, // 000E CALL R3 1
+ 0x900E0601, // 000F SETMBR R3 K3 R1
+ 0x88100100, // 0010 GETMBR R4 R0 K0
+ 0x8C100901, // 0011 GETMET R4 R4 K1
+ 0x5C180600, // 0012 MOVE R6 R3
+ 0x7C100400, // 0013 CALL R4 2
+ 0x80040000, // 0014 RET 1 R0
})
)
);
@@ -2516,7 +2526,7 @@ be_local_closure(Matter_TLV_list_tlv2raw, /* name */
}),
be_str_weak(tlv2raw),
&be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
+ ( &(const binstruction[44]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x1C080202, // 0001 EQ R2 R1 R2
0x780A0002, // 0002 JMPF R2 #0006
@@ -2538,22 +2548,29 @@ be_local_closure(Matter_TLV_list_tlv2raw, /* name */
0x600C0010, // 0012 GETGBL R3 G16
0x5C100400, // 0013 MOVE R4 R2
0x7C0C0200, // 0014 CALL R3 1
- 0xA8020005, // 0015 EXBLK 0 #001C
+ 0xA802000C, // 0015 EXBLK 0 #0023
0x5C100600, // 0016 MOVE R4 R3
0x7C100000, // 0017 CALL R4 0
- 0x8C140905, // 0018 GETMET R5 R4 K5
- 0x5C1C0200, // 0019 MOVE R7 R1
- 0x7C140400, // 001A CALL R5 2
- 0x7001FFF9, // 001B JMP #0016
- 0x580C0006, // 001C LDCONST R3 K6
- 0xAC0C0200, // 001D CATCH R3 1 0
- 0xB0080000, // 001E RAISE 2 R0 R0
- 0x8C0C0307, // 001F GETMET R3 R1 K7
- 0x88140108, // 0020 GETMBR R5 R0 K8
- 0x88140B09, // 0021 GETMBR R5 R5 K9
- 0x5818000A, // 0022 LDCONST R6 K10
- 0x7C0C0600, // 0023 CALL R3 3
- 0x80040200, // 0024 RET 1 R1
+ 0x6014000F, // 0018 GETGBL R5 G15
+ 0x5C180800, // 0019 MOVE R6 R4
+ 0x601C0015, // 001A GETGBL R7 G21
+ 0x7C140400, // 001B CALL R5 2
+ 0x78160001, // 001C JMPF R5 #001F
+ 0x40140204, // 001D CONNECT R5 R1 R4
+ 0x70020002, // 001E JMP #0022
+ 0x8C140905, // 001F GETMET R5 R4 K5
+ 0x5C1C0200, // 0020 MOVE R7 R1
+ 0x7C140400, // 0021 CALL R5 2
+ 0x7001FFF2, // 0022 JMP #0016
+ 0x580C0006, // 0023 LDCONST R3 K6
+ 0xAC0C0200, // 0024 CATCH R3 1 0
+ 0xB0080000, // 0025 RAISE 2 R0 R0
+ 0x8C0C0307, // 0026 GETMET R3 R1 K7
+ 0x88140108, // 0027 GETMBR R5 R0 K8
+ 0x88140B09, // 0028 GETMBR R5 R5 K9
+ 0x5818000A, // 0029 LDCONST R6 K10
+ 0x7C0C0600, // 002A CALL R3 3
+ 0x80040200, // 002B RET 1 R1
})
)
);
From c5e09ef76d0072d058ff45824725ed3c7804e057 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Tue, 18 Apr 2023 13:37:55 +0200
Subject: [PATCH 004/289] Update changelogs
---
CHANGELOG.md | 2 +-
RELEASENOTES.md | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1a2655cc..721b2a5f4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
## [12.5.0.1]
### Added
+- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
### Breaking Changed
@@ -29,7 +30,6 @@ All notable changes to this project will be documented in this file.
- Berry `instrospect.name()` to get names of functions, modules and classes (#18422)
- Berry add `searchall()` and `matchall()` to `re` module and pre-compiled patterns (#18429)
- Matter automatically exposes all detected Temperature sensors (#18430)
-- Matter add sensors: Humidity, Pressure, Illuminance; optimize memory
### Changed
- ESP32 LVGL library from v8.3.5 to v8.3.6 (no functional change)
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index ac781716f..fdbfb0cf8 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -112,6 +112,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v12.5.0.1
### Added
+- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
### Breaking Changed
From 2684141722f874540a549326c37646b9c7aa1f36 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Tue, 18 Apr 2023 15:34:19 +0200
Subject: [PATCH 005/289] Fix ESP8266 Energy Export Active
Fix ESP8266 Energy Export Active no update regression from v12.3.1.3
---
CHANGELOG.md | 1 +
RELEASENOTES.md | 1 +
tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino | 8 +++++++-
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 721b2a5f4..3c71fbfaa 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
+- ESP8266 Energy Export Active no update regression from v12.3.1.3
### Removed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index fdbfb0cf8..9281f00d4 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -119,3 +119,4 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
### Changed
### Fixed
+- ESP8266 Energy Export Active no update regression from v12.3.1.3
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
index ebbad0f72..6fc75ec08 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_03_energy.ino
@@ -99,6 +99,7 @@ typedef struct {
int32_t kWhtoday_delta[ENERGY_MAX_PHASES]; // 1212312345 Wh 10^-5 (deca micro Watt hours) - Overflows to Energy->kWhtoday (HLW and CSE only)
int32_t kWhtoday_offset[ENERGY_MAX_PHASES]; // 12312312 Wh * 10^-2 (deca milli Watt hours) - 5764 = 0.05764 kWh = 0.058 kWh = Energy->daily
int32_t kWhtoday[ENERGY_MAX_PHASES]; // 12312312 Wh * 10^-2 (deca milli Watt hours) - 5764 = 0.05764 kWh = 0.058 kWh = Energy->daily
+ int32_t kWhtoday_export[ENERGY_MAX_PHASES]; // 12312312 Wh * 10^-2 (deca milli Watt hours) - 5764 = 0.05764 kWh = 0.058 kWh = Energy->daily
int32_t period[ENERGY_MAX_PHASES]; // 12312312 Wh * 10^-2 (deca milli Watt hours) - 5764 = 0.05764 kWh = 0.058 kWh = Energy->daily
char* value;
@@ -278,7 +279,12 @@ void EnergyUpdateToday(void) {
Energy->kWhtoday_delta[i] -= (delta * 1000);
Energy->kWhtoday[i] += delta;
if (delta < 0) { // Export energy
- RtcSettings.energy_kWhexport_ph[i] += ((delta / 100) *-1);
+ Energy->kWhtoday_export[i] += (delta *-1);
+ if (Energy->kWhtoday_export[i] > 100) {
+ int32_t delta_export = Energy->kWhtoday_export[i] / 100;
+ Energy->kWhtoday_export[i] -= (delta_export * 100);
+ RtcSettings.energy_kWhexport_ph[i] += delta_export;
+ }
}
}
From 6f6c43a724839786aa42551bf1961e1310ac14f6 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Tue, 18 Apr 2023 17:16:29 +0200
Subject: [PATCH 006/289] Add command ``SetOption152 0/1``
Add command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
---
CHANGELOG.md | 1 +
RELEASENOTES.md | 1 +
tasmota/include/tasmota_types.h | 2 +-
tasmota/tasmota.ino | 2 ++
tasmota/tasmota_support/support_command.ino | 1 +
tasmota/tasmota_support/support_tasmota.ino | 33 +++++++++++++++++----
tools/decode-status.py | 5 ++--
7 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c71fbfaa..f095fdb9f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
## [12.5.0.1]
### Added
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
+- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
### Breaking Changed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 9281f00d4..e7c1949ab 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -112,6 +112,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v12.5.0.1
### Added
+- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
### Breaking Changed
diff --git a/tasmota/include/tasmota_types.h b/tasmota/include/tasmota_types.h
index 7f947a51d..004b6602b 100644
--- a/tasmota/include/tasmota_types.h
+++ b/tasmota/include/tasmota_types.h
@@ -185,7 +185,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t dns_ipv6_priority : 1; // bit 3 (v12.2.0.6) - SetOption149 - (Wifi) prefer IPv6 DNS resolution to IPv4 address when available. Requires `#define USE_IPV6`
uint32_t no_voltage_common : 1; // bit 4 (v12.3.1.5) - SetOption150 - (Energy) Force no voltage/frequency common
uint32_t matter_enabled : 1; // bit 5 (v12.3.1.5) - SetOption151 - (Matter) Enable Matter protocol over Wifi
- uint32_t spare06 : 1; // bit 6
+ uint32_t bistable_single_pin : 1; // bit 6 (v12.5.0.1) - SetOption152 - (Power) Switch between two (0) or one (1) pin bistable relay control
uint32_t spare07 : 1; // bit 7
uint32_t spare08 : 1; // bit 8
uint32_t spare09 : 1; // bit 9
diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino
index 85c0f0d72..cdba8af55 100644
--- a/tasmota/tasmota.ino
+++ b/tasmota/tasmota.ino
@@ -254,6 +254,7 @@ struct TasmotaGlobal_t {
void *log_buffer_mutex; // Control access to log buffer
power_t power; // Current copy of Settings->power
+ power_t power_bistable; // Current state of single pin bistable power
power_t rel_inverted; // Relay inverted flag (1 = (0 = On, 1 = Off))
power_t rel_bistable; // Relay bistable bitmap
power_t last_power; // Last power set state
@@ -430,6 +431,7 @@ void setup(void) {
TasmotaGlobal.global_state.data = 0xF; // Init global state (wifi_down, mqtt_down) to solve possible network issues
TasmotaGlobal.enable_logging = 1;
TasmotaGlobal.seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded
+ TasmotaGlobal.power_bistable = 0x80000000;
RtcRebootLoad();
if (!RtcRebootValid()) {
diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino
index 4637cd09c..a5926b353 100644
--- a/tasmota/tasmota_support/support_command.ino
+++ b/tasmota/tasmota_support/support_command.ino
@@ -1472,6 +1472,7 @@ void CmndSetoptionBase(bool indexed) {
bitWrite(Settings->flag6.data, pindex, XdrvMailbox.payload);
switch (pindex) {
case 5: // SetOption151 - Matter enabled
+ case 6: // SetOption152 - (Power) Use single pin bistable
TasmotaGlobal.restart_flag = 2;
break;
}
diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino
index 845f18766..432f7682e 100644
--- a/tasmota/tasmota_support/support_tasmota.ino
+++ b/tasmota/tasmota_support/support_tasmota.ino
@@ -309,6 +309,7 @@ void SetDevicePower(power_t rpower, uint32_t source) {
else {
uint32_t port = 0;
uint32_t port_next;
+ power_t bistable = 0;
ZeroCrossMomentStart();
@@ -316,12 +317,25 @@ void SetDevicePower(power_t rpower, uint32_t source) {
power_t state = rpower &1;
port_next = 1; // Select next relay
+ bool update = true;
if (bitRead(TasmotaGlobal.rel_bistable, port)) {
- if (!state) { port_next = 2; } // Skip highest relay
- port += state; // Relay = Off, Relay = On
+ if (Settings->flag6.bistable_single_pin) { // SetOption152 - (Power) Use single pin bistable
+ if (0x80000000 == TasmotaGlobal.power_bistable) {
+ TasmotaGlobal.power_bistable = TasmotaGlobal.power; // Init last known state
+ }
+ update = (bitRead(TasmotaGlobal.power_bistable, port) != state);
+ if (update) {
+ bitWrite(TasmotaGlobal.power_bistable, port, state);
+ bitSet(bistable, port);
+ }
+
+ } else {
+ if (!state) { port_next = 2; } // Skip highest relay
+ port += state; // Relay = Off, Relay = On
+ }
state = 1; // Set pulse
}
- if (i < MAX_RELAYS) {
+ if (update && (i < MAX_RELAYS)) {
DigitalWrite(GPIO_REL1, port, bitRead(TasmotaGlobal.rel_inverted, port) ? !state : state);
}
port += port_next; // Select next relay
@@ -335,6 +349,11 @@ void SetDevicePower(power_t rpower, uint32_t source) {
delay(Settings->param[P_BISTABLE_PULSE]); // SetOption45 - Keep energized for about 5 x operation time
for (uint32_t i = 0; i < port; i++) { // Reset up to detected amount of ports
if (bitRead(TasmotaGlobal.rel_bistable, i)) {
+ if (Settings->flag6.bistable_single_pin) { // SetOption152 - (Power) Use single pin bistable
+ if (!bitRead(bistable, i)) {
+ continue;
+ }
+ }
DigitalWrite(GPIO_REL1, i, bitRead(TasmotaGlobal.rel_inverted, i) ? 1 : 0);
}
}
@@ -2218,8 +2237,12 @@ void GpioInit(void)
if (i &1) { TasmotaGlobal.devices_present--; }
}
#endif // ESP8266
- if (bitRead(TasmotaGlobal.rel_bistable, i)) {
- if (bi_device &1) { TasmotaGlobal.devices_present--; }
+ if (!Settings->flag6.bistable_single_pin) { // SetOption152 - (Power) Use single pin bistable
+ if (bitRead(TasmotaGlobal.rel_bistable, i)) {
+ if (bi_device &1) {
+ TasmotaGlobal.devices_present--;
+ }
+ }
bi_device++;
}
}
diff --git a/tools/decode-status.py b/tools/decode-status.py
index 490e8e79a..ebe18e460 100755
--- a/tools/decode-status.py
+++ b/tools/decode-status.py
@@ -207,7 +207,8 @@ a_setoption = [[
"(Wifi) prefer IPv6 DNS resolution to IPv4 address when available. Requires `#define USE_IPV6`",
"(Energy) Force no voltage/frequency common",
"(Matter) Enable Matter protocol over Wifi",
- "","",
+ "(Power) Switch between two (0) or one (1) pin bistable relay control",
+ "",
"","","","",
"","","","",
"","","","",
@@ -324,7 +325,7 @@ else:
obj = json.load(fp)
def StartDecode():
- print ("\n*** decode-status.py v12.4.0.5 by Theo Arends and Jacek Ziolkowski ***")
+ print ("\n*** decode-status.py v12.5.0.1 by Theo Arends and Jacek Ziolkowski ***")
# print("Decoding\n{}".format(obj))
From eb40496e4bf347a5aa86d482554aefcf5d014df5 Mon Sep 17 00:00:00 2001
From: InHi66 <38803741+InHi66@users.noreply.github.com>
Date: Tue, 18 Apr 2023 17:20:47 +0200
Subject: [PATCH 007/289] Update xsns_20_novasds.ino (#18444)
---
tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino b/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino
index 3bd0d3933..20f6d8e30 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_20_novasds.ino
@@ -231,8 +231,8 @@ void NovaSdsShow(bool json) {
#endif // USE_DOMOTICZ
#ifdef USE_WEBSERVER
} else {
- WSContentSend_PD(HTTP_SNS_F_ENVIRONMENTAL_CONCENTRATION, types, "2.5", pm2_5);
- WSContentSend_PD(HTTP_SNS_F_ENVIRONMENTAL_CONCENTRATION, types, "10", pm10);
+ WSContentSend_PD(HTTP_SNS_F_ENVIRONMENTAL_CONCENTRATION, types, "2.5", &pm2_5);
+ WSContentSend_PD(HTTP_SNS_F_ENVIRONMENTAL_CONCENTRATION, types, "10", &pm10);
#endif // USE_WEBSERVER
}
}
From fb98d8954ad7d37a7ac3ecf39a2aa9bc018a145f Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Tue, 18 Apr 2023 17:23:37 +0200
Subject: [PATCH 008/289] Update changelogs
---
CHANGELOG.md | 1 +
RELEASENOTES.md | 1 +
2 files changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f095fdb9f..4e35bbded 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
+- NovaSDS GUI values (#18444)
### Removed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index e7c1949ab..0c0f50aad 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -121,3 +121,4 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
+- NovaSDS GUI values [#18444](https://github.com/arendst/Tasmota/issues/18444)
\ No newline at end of file
From a85412fce285e4a8285c4ca95895467a0cb3a90b Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Tue, 18 Apr 2023 22:27:27 +0200
Subject: [PATCH 009/289] Matter allow `Matter#Initialized` rule once the
device is configured (#18451)
---
CHANGELOG.md | 1 +
.../src/embedded/Matter_Device.be | 28 +-
.../src/solidify/solidified_Matter_Device.h | 6344 +++++++++--------
3 files changed, 3258 insertions(+), 3115 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e35bbded..fe36cd2e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
+- Matter allow `Matter#Initialized` rule once the device is configured
### Breaking Changed
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index f4ce634a9..2e0da6cdf 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -104,6 +104,8 @@ class Matter_Device
self._init_basic_commissioning()
tasmota.add_driver(self)
+
+ self.register_commands()
end
#############################################################
@@ -1011,7 +1013,7 @@ class Matter_Device
end
if endpoint > 0x40 break end
end
-
+ tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
end
# get keys of a map in sorted order
@@ -1019,6 +1021,30 @@ class Matter_Device
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
end
+ #####################################################################
+ # Commands `Mtr___`
+ #####################################################################
+ #
+ def register_commands()
+ tasmota.add_cmd("MtrJoin", /cmd_found, idx, payload, payload_json -> self.MtrJoin(cmd_found, idx, payload, payload_json))
+ end
+
+ #####################################################################
+ # `MtrJoin`
+ #
+ # Open or close commissioning
+ #
+ def MtrJoin(cmd_found, idx, payload, payload_json)
+ var payload_int = int(payload)
+ if payload_int
+ self.start_root_basic_commissioning()
+ else
+ self.stop_basic_commissioning()
+ end
+ tasmota.resp_cmnd_done()
+ end
+
+
end
matter.Device = Matter_Device
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index ba71e5d7c..813942de2 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -57,9 +57,288 @@ be_local_closure(Matter_Device_start_operational_discovery, /* name */
/********************************************************************
-** Solidified function: is_commissioning_open
+** Solidified function: start
********************************************************************/
-be_local_closure(Matter_Device_is_commissioning_open, /* name */
+be_local_closure(Matter_Device_start, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(_trigger_read_sensors),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80000000, // 0003 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(started),
+ /* K1 */ be_nested_str_weak(plugins),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(matter),
+ /* K4 */ be_nested_str_weak(Plugin_Root),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(autoconf_device),
+ /* K7 */ be_nested_str_weak(tasmota),
+ /* K8 */ be_nested_str_weak(add_cron),
+ /* K9 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
+ /* K10 */ be_nested_str_weak(matter_sensors_30s),
+ /* K11 */ be_nested_str_weak(_start_udp),
+ /* K12 */ be_nested_str_weak(UDP_PORT),
+ /* K13 */ be_nested_str_weak(start_mdns_announce_hostnames),
+ }),
+ be_str_weak(start),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x78060000, // 0001 JMPF R1 #0003
+ 0x80000200, // 0002 RET 0
+ 0x88040101, // 0003 GETMBR R1 R0 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0xB80E0600, // 0005 GETNGBL R3 K3
+ 0x8C0C0704, // 0006 GETMET R3 R3 K4
+ 0x5C140000, // 0007 MOVE R5 R0
+ 0x58180005, // 0008 LDCONST R6 K5
+ 0x7C0C0600, // 0009 CALL R3 3
+ 0x7C040400, // 000A CALL R1 2
+ 0x8C040106, // 000B GETMET R1 R0 K6
+ 0x7C040200, // 000C CALL R1 1
+ 0xB8060E00, // 000D GETNGBL R1 K7
+ 0x8C040308, // 000E GETMET R1 R1 K8
+ 0x580C0009, // 000F LDCONST R3 K9
+ 0x84100000, // 0010 CLOSURE R4 P0
+ 0x5814000A, // 0011 LDCONST R5 K10
+ 0x7C040800, // 0012 CALL R1 4
+ 0x8C04010B, // 0013 GETMET R1 R0 K11
+ 0x880C010C, // 0014 GETMBR R3 R0 K12
+ 0x7C040400, // 0015 CALL R1 2
+ 0x8C04010D, // 0016 GETMET R1 R0 K13
+ 0x7C040200, // 0017 CALL R1 1
+ 0x50040200, // 0018 LDBOOL R1 1 0
+ 0x90020001, // 0019 SETMBR R0 K0 R1
+ 0xA0000000, // 001A CLOSE R0
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_PASE
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(mdns_pase_eth),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K7 */ be_nested_str_weak(_matterc),
+ /* K8 */ be_nested_str_weak(_udp),
+ /* K9 */ be_nested_str_weak(commissioning_instance_eth),
+ /* K10 */ be_nested_str_weak(hostname_eth),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K13 */ be_nested_str_weak(eth),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(remove_service),
+ /* K16 */ be_nested_str_weak(mdns_pase_wifi),
+ /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
+ /* K18 */ be_nested_str_weak(hostname_wifi),
+ /* K19 */ be_nested_str_weak(wifi),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K21 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(mdns_remove_PASE),
+ &be_const_str_solidified,
+ ( &(const binstruction[83]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA802003D, // 0002 EXBLK 0 #0041
+ 0x880C0102, // 0003 GETMBR R3 R0 K2
+ 0x780E001B, // 0004 JMPF R3 #0021
+ 0xB80E0600, // 0005 GETNGBL R3 K3
+ 0x8C0C0704, // 0006 GETMET R3 R3 K4
+ 0x8C140505, // 0007 GETMET R5 R2 K5
+ 0x581C0006, // 0008 LDCONST R7 K6
+ 0x58200007, // 0009 LDCONST R8 K7
+ 0x58240008, // 000A LDCONST R9 K8
+ 0x88280109, // 000B GETMBR R10 R0 K9
+ 0x882C010A, // 000C GETMBR R11 R0 K10
+ 0x7C140C00, // 000D CALL R5 6
+ 0x5818000B, // 000E LDCONST R6 K11
+ 0x7C0C0600, // 000F CALL R3 3
+ 0xB80E0600, // 0010 GETNGBL R3 K3
+ 0x8C0C0704, // 0011 GETMET R3 R3 K4
+ 0x8C140505, // 0012 GETMET R5 R2 K5
+ 0x581C000C, // 0013 LDCONST R7 K12
+ 0x5820000D, // 0014 LDCONST R8 K13
+ 0x88240109, // 0015 GETMBR R9 R0 K9
+ 0x7C140800, // 0016 CALL R5 4
+ 0x5818000E, // 0017 LDCONST R6 K14
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x500C0000, // 0019 LDBOOL R3 0 0
+ 0x90020403, // 001A SETMBR R0 K2 R3
+ 0x8C0C030F, // 001B GETMET R3 R1 K15
+ 0x58140007, // 001C LDCONST R5 K7
+ 0x58180008, // 001D LDCONST R6 K8
+ 0x881C0109, // 001E GETMBR R7 R0 K9
+ 0x8820010A, // 001F GETMBR R8 R0 K10
+ 0x7C0C0A00, // 0020 CALL R3 5
+ 0x880C0110, // 0021 GETMBR R3 R0 K16
+ 0x780E001B, // 0022 JMPF R3 #003F
+ 0xB80E0600, // 0023 GETNGBL R3 K3
+ 0x8C0C0704, // 0024 GETMET R3 R3 K4
+ 0x8C140505, // 0025 GETMET R5 R2 K5
+ 0x581C0006, // 0026 LDCONST R7 K6
+ 0x58200007, // 0027 LDCONST R8 K7
+ 0x58240008, // 0028 LDCONST R9 K8
+ 0x88280111, // 0029 GETMBR R10 R0 K17
+ 0x882C0112, // 002A GETMBR R11 R0 K18
+ 0x7C140C00, // 002B CALL R5 6
+ 0x5818000B, // 002C LDCONST R6 K11
+ 0x7C0C0600, // 002D CALL R3 3
+ 0xB80E0600, // 002E GETNGBL R3 K3
+ 0x8C0C0704, // 002F GETMET R3 R3 K4
+ 0x8C140505, // 0030 GETMET R5 R2 K5
+ 0x581C000C, // 0031 LDCONST R7 K12
+ 0x58200013, // 0032 LDCONST R8 K19
+ 0x88240111, // 0033 GETMBR R9 R0 K17
+ 0x7C140800, // 0034 CALL R5 4
+ 0x5818000E, // 0035 LDCONST R6 K14
+ 0x7C0C0600, // 0036 CALL R3 3
+ 0x500C0000, // 0037 LDBOOL R3 0 0
+ 0x90022003, // 0038 SETMBR R0 K16 R3
+ 0x8C0C030F, // 0039 GETMET R3 R1 K15
+ 0x58140007, // 003A LDCONST R5 K7
+ 0x58180008, // 003B LDCONST R6 K8
+ 0x881C0111, // 003C GETMBR R7 R0 K17
+ 0x88200112, // 003D GETMBR R8 R0 K18
+ 0x7C0C0A00, // 003E CALL R3 5
+ 0xA8040001, // 003F EXBLK 1 1
+ 0x70020010, // 0040 JMP #0052
+ 0xAC0C0002, // 0041 CATCH R3 0 2
+ 0x7002000D, // 0042 JMP #0051
+ 0xB8160600, // 0043 GETNGBL R5 K3
+ 0x8C140B04, // 0044 GETMET R5 R5 K4
+ 0x601C0008, // 0045 GETGBL R7 G8
+ 0x5C200600, // 0046 MOVE R8 R3
+ 0x7C1C0200, // 0047 CALL R7 1
+ 0x001E2807, // 0048 ADD R7 K20 R7
+ 0x001C0F15, // 0049 ADD R7 R7 K21
+ 0x60200008, // 004A GETGBL R8 G8
+ 0x5C240800, // 004B MOVE R9 R4
+ 0x7C200200, // 004C CALL R8 1
+ 0x001C0E08, // 004D ADD R7 R7 R8
+ 0x5820000E, // 004E LDCONST R8 K14
+ 0x7C140600, // 004F CALL R5 3
+ 0x70020000, // 0050 JMP #0052
+ 0xB0080000, // 0051 RAISE 2 R0 R0
+ 0x80000000, // 0052 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_commissioning_complete_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_commissioning_complete),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_commissioning_complete_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: save_before_restart
+********************************************************************/
+be_local_closure(Matter_Device_save_before_restart, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -69,16 +348,18 @@ be_local_closure(Matter_Device_is_commissioning_open, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
}),
- be_str_weak(is_commissioning_open),
+ be_str_weak(save_before_restart),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x80040200, // 0003 RET 1 R1
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x8C040101, // 0002 GETMET R1 R0 K1
+ 0x7C040200, // 0003 CALL R1 1
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -86,9 +367,1170 @@ be_local_closure(Matter_Device_is_commissioning_open, /* name */
/********************************************************************
-** Solidified function: received_ack
+** Solidified function: _start_udp
********************************************************************/
-be_local_closure(Matter_Device_received_ack, /* name */
+be_local_closure(Matter_Device__start_udp, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* 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 */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(log),
+ /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
+ /* K4 */ be_const_int(2),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(UDPServer),
+ /* K7 */ be_nested_str_weak(),
+ /* K8 */ be_nested_str_weak(start),
+ }),
+ 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
+ 0xB80A0200, // 0007 GETNGBL R2 K1
+ 0x8C080502, // 0008 GETMET R2 R2 K2
+ 0x60100008, // 0009 GETGBL R4 G8
+ 0x5C140200, // 000A MOVE R5 R1
+ 0x7C100200, // 000B CALL R4 1
+ 0x00120604, // 000C ADD R4 K3 R4
+ 0x58140004, // 000D LDCONST R5 K4
+ 0x7C080600, // 000E CALL R2 3
+ 0xB80A0A00, // 000F GETNGBL R2 K5
+ 0x8C080506, // 0010 GETMET R2 R2 K6
+ 0x58100007, // 0011 LDCONST R4 K7
+ 0x5C140200, // 0012 MOVE R5 R1
+ 0x7C080600, // 0013 CALL R2 3
+ 0x90020002, // 0014 SETMBR R0 K0 R2
+ 0x88080100, // 0015 GETMBR R2 R0 K0
+ 0x8C080508, // 0016 GETMET R2 R2 K8
+ 0x84100000, // 0017 CLOSURE R4 P0
+ 0x7C080400, // 0018 CALL R2 2
+ 0xA0000000, // 0019 CLOSE R0
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_commands
+********************************************************************/
+be_local_closure(Matter_Device_register_commands, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* 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(MtrJoin),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x68100000, // 0000 GETUPV R4 U0
+ 0x8C100900, // 0001 GETMET R4 R4 K0
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80040800, // 0007 RET 1 R4
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(add_cmd),
+ /* K2 */ be_nested_str_weak(MtrJoin),
+ }),
+ be_str_weak(register_commands),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x84100000, // 0003 CLOSURE R4 P0
+ 0x7C040600, // 0004 CALL R1 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_basic_commissioning, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 8, /* argc */
+ 2, /* 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Wifi_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 0x7C000600, // 0007 CALL R0 3
+ 0x80000000, // 0008 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[16]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(millis),
+ /* K3 */ be_nested_str_weak(commissioning_iterations),
+ /* K4 */ be_nested_str_weak(commissioning_discriminator),
+ /* K5 */ be_nested_str_weak(commissioning_salt),
+ /* K6 */ be_nested_str_weak(commissioning_w0),
+ /* K7 */ be_nested_str_weak(commissioning_L),
+ /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
+ /* K9 */ be_nested_str_weak(wifi),
+ /* K10 */ be_nested_str_weak(up),
+ /* K11 */ be_nested_str_weak(eth),
+ /* K12 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K13 */ be_nested_str_weak(add_rule),
+ /* K14 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K15 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ be_str_weak(start_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[40]) { /* code */
+ 0xB8220200, // 0000 GETNGBL R8 K1
+ 0x8C201102, // 0001 GETMET R8 R8 K2
+ 0x7C200200, // 0002 CALL R8 1
+ 0x542603E7, // 0003 LDINT R9 1000
+ 0x08240209, // 0004 MUL R9 R1 R9
+ 0x00201009, // 0005 ADD R8 R8 R9
+ 0x90020008, // 0006 SETMBR R0 K0 R8
+ 0x90020602, // 0007 SETMBR R0 K3 R2
+ 0x90020803, // 0008 SETMBR R0 K4 R3
+ 0x90020A04, // 0009 SETMBR R0 K5 R4
+ 0x90020C05, // 000A SETMBR R0 K6 R5
+ 0x90020E06, // 000B SETMBR R0 K7 R6
+ 0x90021007, // 000C SETMBR R0 K8 R7
+ 0xB8220200, // 000D GETNGBL R8 K1
+ 0x8C201109, // 000E GETMET R8 R8 K9
+ 0x7C200200, // 000F CALL R8 1
+ 0x9420110A, // 0010 GETIDX R8 R8 K10
+ 0x74220004, // 0011 JMPT R8 #0017
+ 0xB8220200, // 0012 GETNGBL R8 K1
+ 0x8C20110B, // 0013 GETMET R8 R8 K11
+ 0x7C200200, // 0014 CALL R8 1
+ 0x9420110A, // 0015 GETIDX R8 R8 K10
+ 0x78220002, // 0016 JMPF R8 #001A
+ 0x8C20010C, // 0017 GETMET R8 R0 K12
+ 0x7C200200, // 0018 CALL R8 1
+ 0x7002000B, // 0019 JMP #0026
+ 0xB8220200, // 001A GETNGBL R8 K1
+ 0x8C20110D, // 001B GETMET R8 R8 K13
+ 0x5828000E, // 001C LDCONST R10 K14
+ 0x842C0000, // 001D CLOSURE R11 P0
+ 0x5830000C, // 001E LDCONST R12 K12
+ 0x7C200800, // 001F CALL R8 4
+ 0xB8220200, // 0020 GETNGBL R8 K1
+ 0x8C20110D, // 0021 GETMET R8 R8 K13
+ 0x5828000F, // 0022 LDCONST R10 K15
+ 0x842C0001, // 0023 CLOSURE R11 P1
+ 0x5830000C, // 0024 LDCONST R12 K12
+ 0x7C200800, // 0025 CALL R8 4
+ 0xA0000000, // 0026 CLOSE R0
+ 0x80000000, // 0027 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: remove_fabric
+********************************************************************/
+be_local_closure(Matter_Device_remove_fabric, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(find_children_fabrics),
+ /* K2 */ be_nested_str_weak(get_fabric_index),
+ /* K3 */ be_nested_str_weak(find_fabric_by_index),
+ /* K4 */ be_nested_str_weak(message_handler),
+ /* K5 */ be_nested_str_weak(im),
+ /* K6 */ be_nested_str_weak(subs_shop),
+ /* K7 */ be_nested_str_weak(remove_by_fabric),
+ /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K9 */ be_nested_str_weak(remove_fabric),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(save_fabrics),
+ }),
+ be_str_weak(remove_fabric),
+ &be_const_str_solidified,
+ ( &(const binstruction[43]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x8C100302, // 0002 GETMET R4 R1 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0x7C080400, // 0004 CALL R2 2
+ 0x4C0C0000, // 0005 LDNIL R3
+ 0x1C0C0403, // 0006 EQ R3 R2 R3
+ 0x780E0000, // 0007 JMPF R3 #0009
+ 0x80000600, // 0008 RET 0
+ 0x600C0010, // 0009 GETGBL R3 G16
+ 0x5C100400, // 000A MOVE R4 R2
+ 0x7C0C0200, // 000B CALL R3 1
+ 0xA8020016, // 000C EXBLK 0 #0024
+ 0x5C100600, // 000D MOVE R4 R3
+ 0x7C100000, // 000E CALL R4 0
+ 0x88140100, // 000F GETMBR R5 R0 K0
+ 0x8C140B03, // 0010 GETMET R5 R5 K3
+ 0x5C1C0800, // 0011 MOVE R7 R4
+ 0x7C140400, // 0012 CALL R5 2
+ 0x4C180000, // 0013 LDNIL R6
+ 0x20180A06, // 0014 NE R6 R5 R6
+ 0x781A000C, // 0015 JMPF R6 #0023
+ 0x88180104, // 0016 GETMBR R6 R0 K4
+ 0x88180D05, // 0017 GETMBR R6 R6 K5
+ 0x88180D06, // 0018 GETMBR R6 R6 K6
+ 0x8C180D07, // 0019 GETMET R6 R6 K7
+ 0x5C200A00, // 001A MOVE R8 R5
+ 0x7C180400, // 001B CALL R6 2
+ 0x8C180108, // 001C GETMET R6 R0 K8
+ 0x5C200A00, // 001D MOVE R8 R5
+ 0x7C180400, // 001E CALL R6 2
+ 0x88180100, // 001F GETMBR R6 R0 K0
+ 0x8C180D09, // 0020 GETMET R6 R6 K9
+ 0x5C200A00, // 0021 MOVE R8 R5
+ 0x7C180400, // 0022 CALL R6 2
+ 0x7001FFE8, // 0023 JMP #000D
+ 0x580C000A, // 0024 LDCONST R3 K10
+ 0xAC0C0200, // 0025 CATCH R3 1 0
+ 0xB0080000, // 0026 RAISE 2 R0 R0
+ 0x880C0100, // 0027 GETMBR R3 R0 K0
+ 0x8C0C070B, // 0028 GETMET R3 R3 K11
+ 0x7C0C0200, // 0029 CALL R3 1
+ 0x80000000, // 002A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: attribute_updated
+********************************************************************/
+be_local_closure(Matter_Device_attribute_updated, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(Path),
+ /* K2 */ be_nested_str_weak(endpoint),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(message_handler),
+ /* K6 */ be_nested_str_weak(im),
+ /* K7 */ be_nested_str_weak(subs_shop),
+ /* K8 */ be_nested_str_weak(attribute_updated_ctx),
+ }),
+ 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
+ 0xB8160000, // 0004 GETNGBL R5 K0
+ 0x8C140B01, // 0005 GETMET R5 R5 K1
+ 0x7C140200, // 0006 CALL R5 1
+ 0x90160401, // 0007 SETMBR R5 K2 R1
+ 0x90160602, // 0008 SETMBR R5 K3 R2
+ 0x90160803, // 0009 SETMBR R5 K4 R3
+ 0x88180105, // 000A GETMBR R6 R0 K5
+ 0x88180D06, // 000B GETMBR R6 R6 K6
+ 0x88180D07, // 000C GETMBR R6 R6 K7
+ 0x8C180D08, // 000D GETMET R6 R6 K8
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x5C240800, // 000F MOVE R9 R4
+ 0x7C180600, // 0010 CALL R6 3
+ 0x80000000, // 0011 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _mdns_announce_hostname
+********************************************************************/
+be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(start),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(eth),
+ /* K5 */ be_nested_str_weak(hostname_eth),
+ /* K6 */ be_nested_str_weak(replace),
+ /* K7 */ be_nested_str_weak(find),
+ /* K8 */ be_nested_str_weak(mac),
+ /* K9 */ be_nested_str_weak(_X3A),
+ /* K10 */ be_nested_str_weak(),
+ /* K11 */ be_nested_str_weak(ipv4only),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K15 */ be_nested_str_weak(ip6local),
+ /* K16 */ be_nested_str_weak(ip),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(add_hostname),
+ /* K19 */ be_nested_str_weak(ip6),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
+ /* K21 */ be_nested_str_weak(wifi),
+ /* K22 */ be_nested_str_weak(hostname_wifi),
+ /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
+ /* K24 */ be_const_int(2),
+ /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K26 */ be_nested_str_weak(_X7C),
+ /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
+ }),
+ be_str_weak(_mdns_announce_hostname),
+ &be_const_str_solidified,
+ ( &(const binstruction[172]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0x8C100502, // 0002 GETMET R4 R2 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0xA8020092, // 0004 EXBLK 0 #0098
+ 0x78060040, // 0005 JMPF R1 #0047
+ 0xB8120600, // 0006 GETNGBL R4 K3
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140706, // 0009 GETMET R5 R3 K6
+ 0x8C1C0907, // 000A GETMET R7 R4 K7
+ 0x58240008, // 000B LDCONST R9 K8
+ 0x7C1C0400, // 000C CALL R7 2
+ 0x58200009, // 000D LDCONST R8 K9
+ 0x5824000A, // 000E LDCONST R9 K10
+ 0x7C140800, // 000F CALL R5 4
+ 0x90020A05, // 0010 SETMBR R0 K5 R5
+ 0x8814010B, // 0011 GETMBR R5 R0 K11
+ 0x7416001F, // 0012 JMPT R5 #0033
+ 0xB8160600, // 0013 GETNGBL R5 K3
+ 0x8C140B0C, // 0014 GETMET R5 R5 K12
+ 0x8C1C070D, // 0015 GETMET R7 R3 K13
+ 0x5824000E, // 0016 LDCONST R9 K14
+ 0x88280105, // 0017 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0018 GETMET R11 R4 K7
+ 0x5834000F, // 0019 LDCONST R13 K15
+ 0x5838000A, // 001A LDCONST R14 K10
+ 0x7C2C0600, // 001B CALL R11 3
+ 0x8C300907, // 001C GETMET R12 R4 K7
+ 0x58380010, // 001D LDCONST R14 K16
+ 0x583C000A, // 001E LDCONST R15 K10
+ 0x7C300600, // 001F CALL R12 3
+ 0x7C1C0A00, // 0020 CALL R7 5
+ 0x58200011, // 0021 LDCONST R8 K17
+ 0x7C140600, // 0022 CALL R5 3
+ 0x8C140512, // 0023 GETMET R5 R2 K18
+ 0x881C0105, // 0024 GETMBR R7 R0 K5
+ 0x8C200907, // 0025 GETMET R8 R4 K7
+ 0x5828000F, // 0026 LDCONST R10 K15
+ 0x582C000A, // 0027 LDCONST R11 K10
+ 0x7C200600, // 0028 CALL R8 3
+ 0x8C240907, // 0029 GETMET R9 R4 K7
+ 0x582C0010, // 002A LDCONST R11 K16
+ 0x5830000A, // 002B LDCONST R12 K10
+ 0x7C240600, // 002C CALL R9 3
+ 0x8C280907, // 002D GETMET R10 R4 K7
+ 0x58300013, // 002E LDCONST R12 K19
+ 0x5834000A, // 002F LDCONST R13 K10
+ 0x7C280600, // 0030 CALL R10 3
+ 0x7C140A00, // 0031 CALL R5 5
+ 0x70020012, // 0032 JMP #0046
+ 0xB8160600, // 0033 GETNGBL R5 K3
+ 0x8C140B0C, // 0034 GETMET R5 R5 K12
+ 0x8C1C070D, // 0035 GETMET R7 R3 K13
+ 0x58240014, // 0036 LDCONST R9 K20
+ 0x88280105, // 0037 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0038 GETMET R11 R4 K7
+ 0x58340010, // 0039 LDCONST R13 K16
+ 0x5838000A, // 003A LDCONST R14 K10
+ 0x7C2C0600, // 003B CALL R11 3
+ 0x7C1C0800, // 003C CALL R7 4
+ 0x58200011, // 003D LDCONST R8 K17
+ 0x7C140600, // 003E CALL R5 3
+ 0x8C140512, // 003F GETMET R5 R2 K18
+ 0x881C0105, // 0040 GETMBR R7 R0 K5
+ 0x8C200907, // 0041 GETMET R8 R4 K7
+ 0x58280010, // 0042 LDCONST R10 K16
+ 0x582C000A, // 0043 LDCONST R11 K10
+ 0x7C200600, // 0044 CALL R8 3
+ 0x7C140600, // 0045 CALL R5 3
+ 0x7002003F, // 0046 JMP #0087
+ 0xB8120600, // 0047 GETNGBL R4 K3
+ 0x8C100915, // 0048 GETMET R4 R4 K21
+ 0x7C100200, // 0049 CALL R4 1
+ 0x8C140706, // 004A GETMET R5 R3 K6
+ 0x8C1C0907, // 004B GETMET R7 R4 K7
+ 0x58240008, // 004C LDCONST R9 K8
+ 0x7C1C0400, // 004D CALL R7 2
+ 0x58200009, // 004E LDCONST R8 K9
+ 0x5824000A, // 004F LDCONST R9 K10
+ 0x7C140800, // 0050 CALL R5 4
+ 0x90022C05, // 0051 SETMBR R0 K22 R5
+ 0x8814010B, // 0052 GETMBR R5 R0 K11
+ 0x7416001F, // 0053 JMPT R5 #0074
+ 0xB8160600, // 0054 GETNGBL R5 K3
+ 0x8C140B0C, // 0055 GETMET R5 R5 K12
+ 0x8C1C070D, // 0056 GETMET R7 R3 K13
+ 0x5824000E, // 0057 LDCONST R9 K14
+ 0x88280116, // 0058 GETMBR R10 R0 K22
+ 0x8C2C0907, // 0059 GETMET R11 R4 K7
+ 0x5834000F, // 005A LDCONST R13 K15
+ 0x5838000A, // 005B LDCONST R14 K10
+ 0x7C2C0600, // 005C CALL R11 3
+ 0x8C300907, // 005D GETMET R12 R4 K7
+ 0x58380010, // 005E LDCONST R14 K16
+ 0x583C000A, // 005F LDCONST R15 K10
+ 0x7C300600, // 0060 CALL R12 3
+ 0x7C1C0A00, // 0061 CALL R7 5
+ 0x58200011, // 0062 LDCONST R8 K17
+ 0x7C140600, // 0063 CALL R5 3
+ 0x8C140512, // 0064 GETMET R5 R2 K18
+ 0x881C0116, // 0065 GETMBR R7 R0 K22
+ 0x8C200907, // 0066 GETMET R8 R4 K7
+ 0x5828000F, // 0067 LDCONST R10 K15
+ 0x582C000A, // 0068 LDCONST R11 K10
+ 0x7C200600, // 0069 CALL R8 3
+ 0x8C240907, // 006A GETMET R9 R4 K7
+ 0x582C0010, // 006B LDCONST R11 K16
+ 0x5830000A, // 006C LDCONST R12 K10
+ 0x7C240600, // 006D CALL R9 3
+ 0x8C280907, // 006E GETMET R10 R4 K7
+ 0x58300013, // 006F LDCONST R12 K19
+ 0x5834000A, // 0070 LDCONST R13 K10
+ 0x7C280600, // 0071 CALL R10 3
+ 0x7C140A00, // 0072 CALL R5 5
+ 0x70020012, // 0073 JMP #0087
+ 0xB8160600, // 0074 GETNGBL R5 K3
+ 0x8C140B0C, // 0075 GETMET R5 R5 K12
+ 0x8C1C070D, // 0076 GETMET R7 R3 K13
+ 0x58240014, // 0077 LDCONST R9 K20
+ 0x88280105, // 0078 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0079 GETMET R11 R4 K7
+ 0x58340010, // 007A LDCONST R13 K16
+ 0x5838000A, // 007B LDCONST R14 K10
+ 0x7C2C0600, // 007C CALL R11 3
+ 0x7C1C0800, // 007D CALL R7 4
+ 0x58200011, // 007E LDCONST R8 K17
+ 0x7C140600, // 007F CALL R5 3
+ 0x8C140512, // 0080 GETMET R5 R2 K18
+ 0x881C0116, // 0081 GETMBR R7 R0 K22
+ 0x8C200907, // 0082 GETMET R8 R4 K7
+ 0x58280010, // 0083 LDCONST R10 K16
+ 0x582C000A, // 0084 LDCONST R11 K10
+ 0x7C200600, // 0085 CALL R8 3
+ 0x7C140600, // 0086 CALL R5 3
+ 0xB8120600, // 0087 GETNGBL R4 K3
+ 0x8C10090C, // 0088 GETMET R4 R4 K12
+ 0x8C18070D, // 0089 GETMET R6 R3 K13
+ 0x58200017, // 008A LDCONST R8 K23
+ 0x78060001, // 008B JMPF R1 #008E
+ 0x58240004, // 008C LDCONST R9 K4
+ 0x70020000, // 008D JMP #008F
+ 0x58240015, // 008E LDCONST R9 K21
+ 0x78060001, // 008F JMPF R1 #0092
+ 0x88280105, // 0090 GETMBR R10 R0 K5
+ 0x70020000, // 0091 JMP #0093
+ 0x88280116, // 0092 GETMBR R10 R0 K22
+ 0x7C180800, // 0093 CALL R6 4
+ 0x581C0018, // 0094 LDCONST R7 K24
+ 0x7C100600, // 0095 CALL R4 3
+ 0xA8040001, // 0096 EXBLK 1 1
+ 0x70020010, // 0097 JMP #00A9
+ 0xAC100002, // 0098 CATCH R4 0 2
+ 0x7002000D, // 0099 JMP #00A8
+ 0xB81A0600, // 009A GETNGBL R6 K3
+ 0x8C180D0C, // 009B GETMET R6 R6 K12
+ 0x60200008, // 009C GETGBL R8 G8
+ 0x5C240800, // 009D MOVE R9 R4
+ 0x7C200200, // 009E CALL R8 1
+ 0x00223208, // 009F ADD R8 K25 R8
+ 0x0020111A, // 00A0 ADD R8 R8 K26
+ 0x60240008, // 00A1 GETGBL R9 G8
+ 0x5C280A00, // 00A2 MOVE R10 R5
+ 0x7C240200, // 00A3 CALL R9 1
+ 0x00201009, // 00A4 ADD R8 R8 R9
+ 0x58240018, // 00A5 LDCONST R9 K24
+ 0x7C180600, // 00A6 CALL R6 3
+ 0x70020000, // 00A7 JMP #00A9
+ 0xB0080000, // 00A8 RAISE 2 R0 R0
+ 0x8C10011B, // 00A9 GETMET R4 R0 K27
+ 0x7C100200, // 00AA CALL R4 1
+ 0x80000000, // 00AB RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: autoconf_device
+********************************************************************/
+be_local_closure(Matter_Device_autoconf_device, /* name */
+ be_nested_proto(
+ 21, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[49]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_const_int(1),
+ /* K3 */ be_nested_str_weak(light),
+ /* K4 */ be_nested_str_weak(get),
+ /* K5 */ be_nested_str_weak(find),
+ /* K6 */ be_nested_str_weak(channels),
+ /* K7 */ be_nested_str_weak(),
+ /* K8 */ be_const_int(0),
+ /* K9 */ be_nested_str_weak(plugins),
+ /* K10 */ be_nested_str_weak(push),
+ /* K11 */ be_nested_str_weak(matter),
+ /* K12 */ be_nested_str_weak(Plugin_Light1),
+ /* K13 */ be_nested_str_weak(tasmota),
+ /* K14 */ be_nested_str_weak(log),
+ /* K15 */ be_nested_str_weak(format),
+ /* K16 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_Dimmer),
+ /* K17 */ be_const_int(2),
+ /* K18 */ be_nested_str_weak(Plugin_Light2),
+ /* K19 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_CT),
+ /* K20 */ be_nested_str_weak(Plugin_Light3),
+ /* K21 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_RGB),
+ /* K22 */ be_nested_str_weak(get_power),
+ /* K23 */ be_nested_str_weak(Plugin_OnOff),
+ /* K24 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Relay__X25i),
+ /* K25 */ be_nested_str_weak(load),
+ /* K26 */ be_nested_str_weak(read_sensors),
+ /* K27 */ be_nested_str_weak(k2l),
+ /* K28 */ be_nested_str_weak(contains),
+ /* K29 */ be_nested_str_weak(Temperature),
+ /* K30 */ be_nested_str_weak(_X23Temperature),
+ /* K31 */ be_nested_str_weak(Plugin_Sensor_Temp),
+ /* K32 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Temperature_X20_X28_X25s_X29),
+ /* K33 */ be_nested_str_weak(stop_iteration),
+ /* K34 */ be_nested_str_weak(Pressure),
+ /* K35 */ be_nested_str_weak(_X23Pressure),
+ /* K36 */ be_nested_str_weak(Plugin_Sensor_Pressure),
+ /* K37 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Pressure_X20_X28_X25s_X29),
+ /* K38 */ be_nested_str_weak(Illuminance),
+ /* K39 */ be_nested_str_weak(_X23Illuminance),
+ /* K40 */ be_nested_str_weak(Plugin_Sensor_Light),
+ /* K41 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_X20_X28_X25s_X29),
+ /* K42 */ be_nested_str_weak(Humidity),
+ /* K43 */ be_nested_str_weak(_X23Humidity),
+ /* K44 */ be_nested_str_weak(Plugin_Sensor_Humidity),
+ /* K45 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Humidity_X20_X28_X25s_X29),
+ /* K46 */ be_nested_str_weak(publish_result),
+ /* K47 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D),
+ /* K48 */ be_nested_str_weak(Matter),
+ }),
+ be_str_weak(autoconf_device),
+ &be_const_str_solidified,
+ ( &(const binstruction[312]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x50100000, // 0003 LDBOOL R4 0 0
+ 0xA4160600, // 0004 IMPORT R5 K3
+ 0x8C180B04, // 0005 GETMET R6 R5 K4
+ 0x7C180200, // 0006 CALL R6 1
+ 0x4C1C0000, // 0007 LDNIL R7
+ 0x201C0C07, // 0008 NE R7 R6 R7
+ 0x781E003F, // 0009 JMPF R7 #004A
+ 0x601C000C, // 000A GETGBL R7 G12
+ 0x8C200D05, // 000B GETMET R8 R6 K5
+ 0x58280006, // 000C LDCONST R10 K6
+ 0x582C0007, // 000D LDCONST R11 K7
+ 0x7C200600, // 000E CALL R8 3
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x24200F08, // 0010 GT R8 R7 K8
+ 0x78220037, // 0011 JMPF R8 #004A
+ 0x1C200F02, // 0012 EQ R8 R7 K2
+ 0x78220010, // 0013 JMPF R8 #0025
+ 0x88200109, // 0014 GETMBR R8 R0 K9
+ 0x8C20110A, // 0015 GETMET R8 R8 K10
+ 0xB82A1600, // 0016 GETNGBL R10 K11
+ 0x8C28150C, // 0017 GETMET R10 R10 K12
+ 0x5C300000, // 0018 MOVE R12 R0
+ 0x5C340600, // 0019 MOVE R13 R3
+ 0x7C280600, // 001A CALL R10 3
+ 0x7C200400, // 001B CALL R8 2
+ 0xB8221A00, // 001C GETNGBL R8 K13
+ 0x8C20110E, // 001D GETMET R8 R8 K14
+ 0x8C28030F, // 001E GETMET R10 R1 K15
+ 0x58300010, // 001F LDCONST R12 K16
+ 0x5C340600, // 0020 MOVE R13 R3
+ 0x7C280600, // 0021 CALL R10 3
+ 0x582C0011, // 0022 LDCONST R11 K17
+ 0x7C200600, // 0023 CALL R8 3
+ 0x70020022, // 0024 JMP #0048
+ 0x1C200F11, // 0025 EQ R8 R7 K17
+ 0x78220010, // 0026 JMPF R8 #0038
+ 0x88200109, // 0027 GETMBR R8 R0 K9
+ 0x8C20110A, // 0028 GETMET R8 R8 K10
+ 0xB82A1600, // 0029 GETNGBL R10 K11
+ 0x8C281512, // 002A GETMET R10 R10 K18
+ 0x5C300000, // 002B MOVE R12 R0
+ 0x5C340600, // 002C MOVE R13 R3
+ 0x7C280600, // 002D CALL R10 3
+ 0x7C200400, // 002E CALL R8 2
+ 0xB8221A00, // 002F GETNGBL R8 K13
+ 0x8C20110E, // 0030 GETMET R8 R8 K14
+ 0x8C28030F, // 0031 GETMET R10 R1 K15
+ 0x58300013, // 0032 LDCONST R12 K19
+ 0x5C340600, // 0033 MOVE R13 R3
+ 0x7C280600, // 0034 CALL R10 3
+ 0x582C0011, // 0035 LDCONST R11 K17
+ 0x7C200600, // 0036 CALL R8 3
+ 0x7002000F, // 0037 JMP #0048
+ 0x88200109, // 0038 GETMBR R8 R0 K9
+ 0x8C20110A, // 0039 GETMET R8 R8 K10
+ 0xB82A1600, // 003A GETNGBL R10 K11
+ 0x8C281514, // 003B GETMET R10 R10 K20
+ 0x5C300000, // 003C MOVE R12 R0
+ 0x5C340600, // 003D MOVE R13 R3
+ 0x7C280600, // 003E CALL R10 3
+ 0x7C200400, // 003F CALL R8 2
+ 0xB8221A00, // 0040 GETNGBL R8 K13
+ 0x8C20110E, // 0041 GETMET R8 R8 K14
+ 0x8C28030F, // 0042 GETMET R10 R1 K15
+ 0x58300015, // 0043 LDCONST R12 K21
+ 0x5C340600, // 0044 MOVE R13 R3
+ 0x7C280600, // 0045 CALL R10 3
+ 0x582C0011, // 0046 LDCONST R11 K17
+ 0x7C200600, // 0047 CALL R8 3
+ 0x50100200, // 0048 LDBOOL R4 1 0
+ 0x000C0702, // 0049 ADD R3 R3 K2
+ 0x601C000C, // 004A GETGBL R7 G12
+ 0xB8221A00, // 004B GETNGBL R8 K13
+ 0x8C201116, // 004C GETMET R8 R8 K22
+ 0x7C200200, // 004D CALL R8 1
+ 0x7C1C0200, // 004E CALL R7 1
+ 0x58200008, // 004F LDCONST R8 K8
+ 0x78120000, // 0050 JMPF R4 #0052
+ 0x041C0F02, // 0051 SUB R7 R7 K2
+ 0x14241007, // 0052 LT R9 R8 R7
+ 0x78260014, // 0053 JMPF R9 #0069
+ 0x88240109, // 0054 GETMBR R9 R0 K9
+ 0x8C24130A, // 0055 GETMET R9 R9 K10
+ 0xB82E1600, // 0056 GETNGBL R11 K11
+ 0x8C2C1717, // 0057 GETMET R11 R11 K23
+ 0x5C340000, // 0058 MOVE R13 R0
+ 0x5C380600, // 0059 MOVE R14 R3
+ 0x5C3C1000, // 005A MOVE R15 R8
+ 0x7C2C0800, // 005B CALL R11 4
+ 0x7C240400, // 005C CALL R9 2
+ 0xB8261A00, // 005D GETNGBL R9 K13
+ 0x8C24130E, // 005E GETMET R9 R9 K14
+ 0x8C2C030F, // 005F GETMET R11 R1 K15
+ 0x58340018, // 0060 LDCONST R13 K24
+ 0x5C380600, // 0061 MOVE R14 R3
+ 0x003C1102, // 0062 ADD R15 R8 K2
+ 0x7C2C0800, // 0063 CALL R11 4
+ 0x58300011, // 0064 LDCONST R12 K17
+ 0x7C240600, // 0065 CALL R9 3
+ 0x00201102, // 0066 ADD R8 R8 K2
+ 0x000C0702, // 0067 ADD R3 R3 K2
+ 0x7001FFE8, // 0068 JMP #0052
+ 0x8C240519, // 0069 GETMET R9 R2 K25
+ 0xB82E1A00, // 006A GETNGBL R11 K13
+ 0x8C2C171A, // 006B GETMET R11 R11 K26
+ 0x7C2C0200, // 006C CALL R11 1
+ 0x7C240400, // 006D CALL R9 2
+ 0x540E001F, // 006E LDINT R3 32
+ 0x60280010, // 006F GETGBL R10 G16
+ 0x8C2C011B, // 0070 GETMET R11 R0 K27
+ 0x5C341200, // 0071 MOVE R13 R9
+ 0x7C2C0400, // 0072 CALL R11 2
+ 0x7C280200, // 0073 CALL R10 1
+ 0xA8020026, // 0074 EXBLK 0 #009C
+ 0x5C2C1400, // 0075 MOVE R11 R10
+ 0x7C2C0000, // 0076 CALL R11 0
+ 0x9430120B, // 0077 GETIDX R12 R9 R11
+ 0x6034000F, // 0078 GETGBL R13 G15
+ 0x5C381800, // 0079 MOVE R14 R12
+ 0x603C0013, // 007A GETGBL R15 G19
+ 0x7C340400, // 007B CALL R13 2
+ 0x78360017, // 007C JMPF R13 #0095
+ 0x8C34191C, // 007D GETMET R13 R12 K28
+ 0x583C001D, // 007E LDCONST R15 K29
+ 0x7C340400, // 007F CALL R13 2
+ 0x78360013, // 0080 JMPF R13 #0095
+ 0x0034171E, // 0081 ADD R13 R11 K30
+ 0x88380109, // 0082 GETMBR R14 R0 K9
+ 0x8C381D0A, // 0083 GETMET R14 R14 K10
+ 0xB8421600, // 0084 GETNGBL R16 K11
+ 0x8C40211F, // 0085 GETMET R16 R16 K31
+ 0x5C480000, // 0086 MOVE R18 R0
+ 0x5C4C0600, // 0087 MOVE R19 R3
+ 0x5C501A00, // 0088 MOVE R20 R13
+ 0x7C400800, // 0089 CALL R16 4
+ 0x7C380400, // 008A CALL R14 2
+ 0xB83A1A00, // 008B GETNGBL R14 K13
+ 0x8C381D0E, // 008C GETMET R14 R14 K14
+ 0x8C40030F, // 008D GETMET R16 R1 K15
+ 0x58480020, // 008E LDCONST R18 K32
+ 0x5C4C0600, // 008F MOVE R19 R3
+ 0x5C501A00, // 0090 MOVE R20 R13
+ 0x7C400800, // 0091 CALL R16 4
+ 0x58440011, // 0092 LDCONST R17 K17
+ 0x7C380600, // 0093 CALL R14 3
+ 0x000C0702, // 0094 ADD R3 R3 K2
+ 0x54360027, // 0095 LDINT R13 40
+ 0x2434060D, // 0096 GT R13 R3 R13
+ 0x78360000, // 0097 JMPF R13 #0099
+ 0x70020000, // 0098 JMP #009A
+ 0x7001FFDA, // 0099 JMP #0075
+ 0xA8040001, // 009A EXBLK 1 1
+ 0x70020002, // 009B JMP #009F
+ 0x58280021, // 009C LDCONST R10 K33
+ 0xAC280200, // 009D CATCH R10 1 0
+ 0xB0080000, // 009E RAISE 2 R0 R0
+ 0x540E0027, // 009F LDINT R3 40
+ 0x60280010, // 00A0 GETGBL R10 G16
+ 0x8C2C011B, // 00A1 GETMET R11 R0 K27
+ 0x5C341200, // 00A2 MOVE R13 R9
+ 0x7C2C0400, // 00A3 CALL R11 2
+ 0x7C280200, // 00A4 CALL R10 1
+ 0xA8020026, // 00A5 EXBLK 0 #00CD
+ 0x5C2C1400, // 00A6 MOVE R11 R10
+ 0x7C2C0000, // 00A7 CALL R11 0
+ 0x9430120B, // 00A8 GETIDX R12 R9 R11
+ 0x6034000F, // 00A9 GETGBL R13 G15
+ 0x5C381800, // 00AA MOVE R14 R12
+ 0x603C0013, // 00AB GETGBL R15 G19
+ 0x7C340400, // 00AC CALL R13 2
+ 0x78360017, // 00AD JMPF R13 #00C6
+ 0x8C34191C, // 00AE GETMET R13 R12 K28
+ 0x583C0022, // 00AF LDCONST R15 K34
+ 0x7C340400, // 00B0 CALL R13 2
+ 0x78360013, // 00B1 JMPF R13 #00C6
+ 0x00341723, // 00B2 ADD R13 R11 K35
+ 0x88380109, // 00B3 GETMBR R14 R0 K9
+ 0x8C381D0A, // 00B4 GETMET R14 R14 K10
+ 0xB8421600, // 00B5 GETNGBL R16 K11
+ 0x8C402124, // 00B6 GETMET R16 R16 K36
+ 0x5C480000, // 00B7 MOVE R18 R0
+ 0x5C4C0600, // 00B8 MOVE R19 R3
+ 0x5C501A00, // 00B9 MOVE R20 R13
+ 0x7C400800, // 00BA CALL R16 4
+ 0x7C380400, // 00BB CALL R14 2
+ 0xB83A1A00, // 00BC GETNGBL R14 K13
+ 0x8C381D0E, // 00BD GETMET R14 R14 K14
+ 0x8C40030F, // 00BE GETMET R16 R1 K15
+ 0x58480025, // 00BF LDCONST R18 K37
+ 0x5C4C0600, // 00C0 MOVE R19 R3
+ 0x5C501A00, // 00C1 MOVE R20 R13
+ 0x7C400800, // 00C2 CALL R16 4
+ 0x58440011, // 00C3 LDCONST R17 K17
+ 0x7C380600, // 00C4 CALL R14 3
+ 0x000C0702, // 00C5 ADD R3 R3 K2
+ 0x5436002E, // 00C6 LDINT R13 47
+ 0x2434060D, // 00C7 GT R13 R3 R13
+ 0x78360000, // 00C8 JMPF R13 #00CA
+ 0x70020000, // 00C9 JMP #00CB
+ 0x7001FFDA, // 00CA JMP #00A6
+ 0xA8040001, // 00CB EXBLK 1 1
+ 0x70020002, // 00CC JMP #00D0
+ 0x58280021, // 00CD LDCONST R10 K33
+ 0xAC280200, // 00CE CATCH R10 1 0
+ 0xB0080000, // 00CF RAISE 2 R0 R0
+ 0x540E002F, // 00D0 LDINT R3 48
+ 0x60280010, // 00D1 GETGBL R10 G16
+ 0x8C2C011B, // 00D2 GETMET R11 R0 K27
+ 0x5C341200, // 00D3 MOVE R13 R9
+ 0x7C2C0400, // 00D4 CALL R11 2
+ 0x7C280200, // 00D5 CALL R10 1
+ 0xA8020026, // 00D6 EXBLK 0 #00FE
+ 0x5C2C1400, // 00D7 MOVE R11 R10
+ 0x7C2C0000, // 00D8 CALL R11 0
+ 0x9430120B, // 00D9 GETIDX R12 R9 R11
+ 0x6034000F, // 00DA GETGBL R13 G15
+ 0x5C381800, // 00DB MOVE R14 R12
+ 0x603C0013, // 00DC GETGBL R15 G19
+ 0x7C340400, // 00DD CALL R13 2
+ 0x78360017, // 00DE JMPF R13 #00F7
+ 0x8C34191C, // 00DF GETMET R13 R12 K28
+ 0x583C0026, // 00E0 LDCONST R15 K38
+ 0x7C340400, // 00E1 CALL R13 2
+ 0x78360013, // 00E2 JMPF R13 #00F7
+ 0x00341727, // 00E3 ADD R13 R11 K39
+ 0x88380109, // 00E4 GETMBR R14 R0 K9
+ 0x8C381D0A, // 00E5 GETMET R14 R14 K10
+ 0xB8421600, // 00E6 GETNGBL R16 K11
+ 0x8C402128, // 00E7 GETMET R16 R16 K40
+ 0x5C480000, // 00E8 MOVE R18 R0
+ 0x5C4C0600, // 00E9 MOVE R19 R3
+ 0x5C501A00, // 00EA MOVE R20 R13
+ 0x7C400800, // 00EB CALL R16 4
+ 0x7C380400, // 00EC CALL R14 2
+ 0xB83A1A00, // 00ED GETNGBL R14 K13
+ 0x8C381D0E, // 00EE GETMET R14 R14 K14
+ 0x8C40030F, // 00EF GETMET R16 R1 K15
+ 0x58480029, // 00F0 LDCONST R18 K41
+ 0x5C4C0600, // 00F1 MOVE R19 R3
+ 0x5C501A00, // 00F2 MOVE R20 R13
+ 0x7C400800, // 00F3 CALL R16 4
+ 0x58440011, // 00F4 LDCONST R17 K17
+ 0x7C380600, // 00F5 CALL R14 3
+ 0x000C0702, // 00F6 ADD R3 R3 K2
+ 0x54360037, // 00F7 LDINT R13 56
+ 0x2434060D, // 00F8 GT R13 R3 R13
+ 0x78360000, // 00F9 JMPF R13 #00FB
+ 0x70020000, // 00FA JMP #00FC
+ 0x7001FFDA, // 00FB JMP #00D7
+ 0xA8040001, // 00FC EXBLK 1 1
+ 0x70020002, // 00FD JMP #0101
+ 0x58280021, // 00FE LDCONST R10 K33
+ 0xAC280200, // 00FF CATCH R10 1 0
+ 0xB0080000, // 0100 RAISE 2 R0 R0
+ 0x540E0037, // 0101 LDINT R3 56
+ 0x60280010, // 0102 GETGBL R10 G16
+ 0x8C2C011B, // 0103 GETMET R11 R0 K27
+ 0x5C341200, // 0104 MOVE R13 R9
+ 0x7C2C0400, // 0105 CALL R11 2
+ 0x7C280200, // 0106 CALL R10 1
+ 0xA8020026, // 0107 EXBLK 0 #012F
+ 0x5C2C1400, // 0108 MOVE R11 R10
+ 0x7C2C0000, // 0109 CALL R11 0
+ 0x9430120B, // 010A GETIDX R12 R9 R11
+ 0x6034000F, // 010B GETGBL R13 G15
+ 0x5C381800, // 010C MOVE R14 R12
+ 0x603C0013, // 010D GETGBL R15 G19
+ 0x7C340400, // 010E CALL R13 2
+ 0x78360017, // 010F JMPF R13 #0128
+ 0x8C34191C, // 0110 GETMET R13 R12 K28
+ 0x583C002A, // 0111 LDCONST R15 K42
+ 0x7C340400, // 0112 CALL R13 2
+ 0x78360013, // 0113 JMPF R13 #0128
+ 0x0034172B, // 0114 ADD R13 R11 K43
+ 0x88380109, // 0115 GETMBR R14 R0 K9
+ 0x8C381D0A, // 0116 GETMET R14 R14 K10
+ 0xB8421600, // 0117 GETNGBL R16 K11
+ 0x8C40212C, // 0118 GETMET R16 R16 K44
+ 0x5C480000, // 0119 MOVE R18 R0
+ 0x5C4C0600, // 011A MOVE R19 R3
+ 0x5C501A00, // 011B MOVE R20 R13
+ 0x7C400800, // 011C CALL R16 4
+ 0x7C380400, // 011D CALL R14 2
+ 0xB83A1A00, // 011E GETNGBL R14 K13
+ 0x8C381D0E, // 011F GETMET R14 R14 K14
+ 0x8C40030F, // 0120 GETMET R16 R1 K15
+ 0x5848002D, // 0121 LDCONST R18 K45
+ 0x5C4C0600, // 0122 MOVE R19 R3
+ 0x5C501A00, // 0123 MOVE R20 R13
+ 0x7C400800, // 0124 CALL R16 4
+ 0x58440011, // 0125 LDCONST R17 K17
+ 0x7C380600, // 0126 CALL R14 3
+ 0x000C0702, // 0127 ADD R3 R3 K2
+ 0x5436003F, // 0128 LDINT R13 64
+ 0x2434060D, // 0129 GT R13 R3 R13
+ 0x78360000, // 012A JMPF R13 #012C
+ 0x70020000, // 012B JMP #012D
+ 0x7001FFDA, // 012C JMP #0108
+ 0xA8040001, // 012D EXBLK 1 1
+ 0x70020002, // 012E JMP #0132
+ 0x58280021, // 012F LDCONST R10 K33
+ 0xAC280200, // 0130 CATCH R10 1 0
+ 0xB0080000, // 0131 RAISE 2 R0 R0
+ 0xB82A1A00, // 0132 GETNGBL R10 K13
+ 0x8C28152E, // 0133 GETMET R10 R10 K46
+ 0x5830002F, // 0134 LDCONST R12 K47
+ 0x58340030, // 0135 LDCONST R13 K48
+ 0x7C280600, // 0136 CALL R10 3
+ 0x80000000, // 0137 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _trigger_read_sensors
+********************************************************************/
+be_local_closure(Matter_Device__trigger_read_sensors, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(json),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(read_sensors),
+ /* K3 */ be_nested_str_weak(load),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(plugins),
+ /* K6 */ be_nested_str_weak(parse_sensors),
+ /* K7 */ be_const_int(1),
+ /* K8 */ be_nested_str_weak(log),
+ /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
+ /* K10 */ be_const_int(3),
+ }),
+ be_str_weak(_trigger_read_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[37]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xB80A0200, // 0001 GETNGBL R2 K1
+ 0x8C080502, // 0002 GETMET R2 R2 K2
+ 0x7C080200, // 0003 CALL R2 1
+ 0x4C0C0000, // 0004 LDNIL R3
+ 0x1C0C0403, // 0005 EQ R3 R2 R3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0303, // 0008 GETMET R3 R1 K3
+ 0x5C140400, // 0009 MOVE R5 R2
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x4C100000, // 000B LDNIL R4
+ 0x20100604, // 000C NE R4 R3 R4
+ 0x7812000D, // 000D JMPF R4 #001C
+ 0x58100004, // 000E LDCONST R4 K4
+ 0x6014000C, // 000F GETGBL R5 G12
+ 0x88180105, // 0010 GETMBR R6 R0 K5
+ 0x7C140200, // 0011 CALL R5 1
+ 0x14140805, // 0012 LT R5 R4 R5
+ 0x78160006, // 0013 JMPF R5 #001B
+ 0x88140105, // 0014 GETMBR R5 R0 K5
+ 0x94140A04, // 0015 GETIDX R5 R5 R4
+ 0x8C140B06, // 0016 GETMET R5 R5 K6
+ 0x5C1C0600, // 0017 MOVE R7 R3
+ 0x7C140400, // 0018 CALL R5 2
+ 0x00100907, // 0019 ADD R4 R4 K7
+ 0x7001FFF3, // 001A JMP #000F
+ 0x70020007, // 001B JMP #0024
+ 0xB8120200, // 001C GETNGBL R4 K1
+ 0x8C100908, // 001D GETMET R4 R4 K8
+ 0x60180008, // 001E GETGBL R6 G8
+ 0x5C1C0400, // 001F MOVE R7 R2
+ 0x7C180200, // 0020 CALL R6 1
+ 0x001A1206, // 0021 ADD R6 K9 R6
+ 0x581C000A, // 0022 LDCONST R7 K10
+ 0x7C100600, // 0023 CALL R4 3
+ 0x80000000, // 0024 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_active_endpoints
+********************************************************************/
+be_local_closure(Matter_Device_get_active_endpoints, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins),
+ /* K1 */ be_nested_str_weak(get_endpoint),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(push),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ 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
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0xA8020011, // 0005 EXBLK 0 #0018
+ 0x5C100600, // 0006 MOVE R4 R3
+ 0x7C100000, // 0007 CALL R4 0
+ 0x8C140901, // 0008 GETMET R5 R4 K1
+ 0x7C140200, // 0009 CALL R5 1
+ 0x78060002, // 000A JMPF R1 #000E
+ 0x1C180B02, // 000B EQ R6 R5 K2
+ 0x781A0000, // 000C JMPF R6 #000E
+ 0x7001FFF7, // 000D JMP #0006
+ 0x8C180503, // 000E GETMET R6 R2 K3
+ 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
+ 0x8C180504, // 0014 GETMET R6 R2 K4
+ 0x5C200A00, // 0015 MOVE R8 R5
+ 0x7C180400, // 0016 CALL R6 2
+ 0x7001FFED, // 0017 JMP #0006
+ 0x580C0005, // 0018 LDCONST R3 K5
+ 0xAC0C0200, // 0019 CATCH R3 1 0
+ 0xB0080000, // 001A RAISE 2 R0 R0
+ 0x80040400, // 001B RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_send
+********************************************************************/
+be_local_closure(Matter_Device_msg_send, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
@@ -100,9 +1542,9 @@ be_local_closure(Matter_Device_received_ack, /* name */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(received_ack),
+ /* K1 */ be_nested_str_weak(send_UDP),
}),
- be_str_weak(received_ack),
+ be_str_weak(msg_send),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
@@ -117,11 +1559,11 @@ be_local_closure(Matter_Device_received_ack, /* name */
/********************************************************************
-** Solidified function: compute_manual_pairing_code
+** Solidified function: stop
********************************************************************/
-be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
+be_local_closure(Matter_Device_stop, /* name */
be_nested_proto(
- 11, /* nstack */
+ 4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -129,50 +1571,1256 @@ be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(root_discriminator),
- /* K2 */ be_nested_str_weak(root_passcode),
- /* K3 */ be_nested_str_weak(format),
- /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(Verhoeff),
- /* K7 */ be_nested_str_weak(checksum),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(remove_driver),
+ /* K2 */ be_nested_str_weak(udp_server),
+ /* K3 */ be_nested_str_weak(stop),
}),
- be_str_weak(compute_manual_pairing_code),
+ be_str_weak(stop),
&be_const_str_solidified,
- ( &(const binstruction[31]) { /* code */
+ ( &(const binstruction[10]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x5C0C0000, // 0002 MOVE R3 R0
+ 0x7C040400, // 0003 CALL R1 2
+ 0x88040102, // 0004 GETMBR R1 R0 K2
+ 0x78060002, // 0005 JMPF R1 #0009
+ 0x88040102, // 0006 GETMBR R1 R0 K2
+ 0x8C040303, // 0007 GETMET R1 R1 K3
+ 0x7C040200, // 0008 CALL R1 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_received
+********************************************************************/
+be_local_closure(Matter_Device_msg_received, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(msg_received),
+ }),
+ be_str_weak(msg_received),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 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: start_operational_discovery_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_operational_discovery),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_operational_discovery_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: compute_qrcode_content
+********************************************************************/
+be_local_closure(Matter_Device_compute_qrcode_content, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(resize),
+ /* K1 */ be_nested_str_weak(setbits),
+ /* K2 */ be_const_int(3),
+ /* K3 */ be_nested_str_weak(vendorid),
+ /* K4 */ be_nested_str_weak(productid),
+ /* K5 */ be_nested_str_weak(root_discriminator),
+ /* K6 */ be_nested_str_weak(root_passcode),
+ /* K7 */ be_const_int(134217727),
+ /* K8 */ be_nested_str_weak(MT_X3A),
+ /* K9 */ be_nested_str_weak(matter),
+ /* K10 */ be_nested_str_weak(Base38),
+ /* K11 */ be_nested_str_weak(encode),
+ }),
+ be_str_weak(compute_qrcode_content),
+ &be_const_str_solidified,
+ ( &(const binstruction[40]) { /* code */
+ 0x60040015, // 0000 GETGBL R1 G21
+ 0x7C040000, // 0001 CALL R1 0
+ 0x8C040300, // 0002 GETMET R1 R1 K0
+ 0x540E000A, // 0003 LDINT R3 11
+ 0x7C040400, // 0004 CALL R1 2
+ 0x8C080301, // 0005 GETMET R2 R1 K1
+ 0x58100002, // 0006 LDCONST R4 K2
+ 0x5416000F, // 0007 LDINT R5 16
+ 0x88180103, // 0008 GETMBR R6 R0 K3
+ 0x7C080800, // 0009 CALL R2 4
+ 0x8C080301, // 000A GETMET R2 R1 K1
+ 0x54120012, // 000B LDINT R4 19
+ 0x5416000F, // 000C LDINT R5 16
+ 0x88180104, // 000D GETMBR R6 R0 K4
+ 0x7C080800, // 000E CALL R2 4
+ 0x8C080301, // 000F GETMET R2 R1 K1
+ 0x54120024, // 0010 LDINT R4 37
+ 0x54160007, // 0011 LDINT R5 8
+ 0x541A0003, // 0012 LDINT R6 4
+ 0x7C080800, // 0013 CALL R2 4
+ 0x8C080301, // 0014 GETMET R2 R1 K1
+ 0x5412002C, // 0015 LDINT R4 45
+ 0x5416000B, // 0016 LDINT R5 12
+ 0x88180105, // 0017 GETMBR R6 R0 K5
+ 0x541E0FFE, // 0018 LDINT R7 4095
+ 0x2C180C07, // 0019 AND R6 R6 R7
+ 0x7C080800, // 001A CALL R2 4
+ 0x8C080301, // 001B GETMET R2 R1 K1
+ 0x54120038, // 001C LDINT R4 57
+ 0x5416001A, // 001D LDINT R5 27
+ 0x88180106, // 001E GETMBR R6 R0 K6
+ 0x2C180D07, // 001F AND R6 R6 K7
+ 0x7C080800, // 0020 CALL R2 4
+ 0xB80A1200, // 0021 GETNGBL R2 K9
+ 0x8808050A, // 0022 GETMBR R2 R2 K10
+ 0x8C08050B, // 0023 GETMET R2 R2 K11
+ 0x5C100200, // 0024 MOVE R4 R1
+ 0x7C080400, // 0025 CALL R2 2
+ 0x000A1002, // 0026 ADD R2 K8 R2
+ 0x80040400, // 0027 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: sort_distinct
+********************************************************************/
+be_local_closure(Matter_Device_sort_distinct, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_const_int(1),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_nested_str_weak(remove),
+ }),
+ be_str_weak(sort_distinct),
+ &be_const_str_solidified,
+ ( &(const binstruction[53]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 0x60080010, // 0001 GETGBL R2 G16
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x040C0701, // 0005 SUB R3 R3 K1
+ 0x400E0203, // 0006 CONNECT R3 K1 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
+ 0x24180B02, // 000D GT R6 R5 K2
+ 0x781A0008, // 000E JMPF R6 #0018
+ 0x04180B01, // 000F SUB R6 R5 K1
+ 0x94180006, // 0010 GETIDX R6 R0 R6
+ 0x24180C04, // 0011 GT R6 R6 R4
+ 0x781A0004, // 0012 JMPF R6 #0018
+ 0x04180B01, // 0013 SUB R6 R5 K1
+ 0x94180006, // 0014 GETIDX R6 R0 R6
+ 0x98000A06, // 0015 SETIDX R0 R5 R6
+ 0x04140B01, // 0016 SUB R5 R5 K1
+ 0x7001FFF4, // 0017 JMP #000D
+ 0x98000A04, // 0018 SETIDX R0 R5 R4
+ 0x7001FFEE, // 0019 JMP #0009
+ 0x58080003, // 001A LDCONST R2 K3
+ 0xAC080200, // 001B CATCH R2 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x58080001, // 001D LDCONST R2 K1
+ 0x600C000C, // 001E GETGBL R3 G12
+ 0x5C100000, // 001F MOVE R4 R0
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x180C0701, // 0021 LE R3 R3 K1
+ 0x780E0000, // 0022 JMPF R3 #0024
+ 0x80040000, // 0023 RET 1 R0
+ 0x940C0102, // 0024 GETIDX R3 R0 K2
+ 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
+ 0x8C100104, // 002D GETMET R4 R0 K4
+ 0x5C180400, // 002E MOVE R6 R2
+ 0x7C100400, // 002F CALL R4 2
+ 0x70020001, // 0030 JMP #0033
+ 0x940C0002, // 0031 GETIDX R3 R0 R2
+ 0x00080501, // 0032 ADD R2 R2 K1
+ 0x7001FFF0, // 0033 JMP #0025
+ 0x80040000, // 0034 RET 1 R0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_mdns_announce_hostnames
+********************************************************************/
+be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* 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(_mdns_announce_hostname),
+ /* 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_mdns_host),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x50080000, // 0002 LDBOOL R2 0 0
+ 0x7C000400, // 0003 CALL R0 2
+ 0xB8020200, // 0004 GETNGBL R0 K1
+ 0x8C000102, // 0005 GETMET R0 R0 K2
+ 0x58080003, // 0006 LDCONST R2 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x7C000600, // 0008 CALL R0 3
+ 0x80000000, // 0009 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(_mdns_announce_hostname),
+ /* 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_mdns_host),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x50080200, // 0002 LDBOOL R2 1 0
+ 0x7C000400, // 0003 CALL R0 2
+ 0xB8020200, // 0004 GETNGBL R0 K1
+ 0x8C000102, // 0005 GETMET R0 R0 K2
+ 0x58080003, // 0006 LDCONST R2 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x7C000600, // 0008 CALL R0 3
+ 0x80000000, // 0009 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(wifi),
+ /* K2 */ be_nested_str_weak(up),
+ /* K3 */ be_nested_str_weak(_mdns_announce_hostname),
+ /* K4 */ be_nested_str_weak(add_rule),
+ /* K5 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K6 */ be_nested_str_weak(matter_mdns_host),
+ /* K7 */ be_nested_str_weak(eth),
+ /* K8 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ be_str_weak(start_mdns_announce_hostnames),
+ &be_const_str_solidified,
+ ( &(const binstruction[32]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x94040302, // 0003 GETIDX R1 R1 K2
+ 0x78060003, // 0004 JMPF R1 #0009
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x500C0000, // 0006 LDBOOL R3 0 0
+ 0x7C040400, // 0007 CALL R1 2
+ 0x70020005, // 0008 JMP #000F
+ 0xB8060000, // 0009 GETNGBL R1 K0
+ 0x8C040304, // 000A GETMET R1 R1 K4
+ 0x580C0005, // 000B LDCONST R3 K5
+ 0x84100000, // 000C CLOSURE R4 P0
+ 0x58140006, // 000D LDCONST R5 K6
+ 0x7C040800, // 000E CALL R1 4
+ 0xB8060000, // 000F GETNGBL R1 K0
+ 0x8C040307, // 0010 GETMET R1 R1 K7
+ 0x7C040200, // 0011 CALL R1 1
+ 0x94040302, // 0012 GETIDX R1 R1 K2
+ 0x78060003, // 0013 JMPF R1 #0018
+ 0x8C040103, // 0014 GETMET R1 R0 K3
+ 0x500C0200, // 0015 LDBOOL R3 1 0
+ 0x7C040400, // 0016 CALL R1 2
+ 0x70020005, // 0017 JMP #001E
+ 0xB8060000, // 0018 GETNGBL R1 K0
+ 0x8C040304, // 0019 GETMET R1 R1 K4
+ 0x580C0008, // 001A LDCONST R3 K8
+ 0x84100001, // 001B CLOSURE R4 P1
+ 0x58140006, // 001C LDCONST R5 K6
+ 0x7C040800, // 001D CALL R1 4
+ 0xA0000000, // 001E CLOSE R0
+ 0x80000000, // 001F RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Device_every_second, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(every_second),
+ /* K2 */ be_nested_str_weak(message_handler),
+ /* K3 */ be_nested_str_weak(commissioning_open),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(time_reached),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(plugins),
+ /* K8 */ be_const_int(1),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[30]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x88040102, // 0003 GETMBR R1 R0 K2
+ 0x8C040301, // 0004 GETMET R1 R1 K1
+ 0x7C040200, // 0005 CALL R1 1
+ 0x88040103, // 0006 GETMBR R1 R0 K3
+ 0x4C080000, // 0007 LDNIL R2
+ 0x20040202, // 0008 NE R1 R1 R2
+ 0x78060006, // 0009 JMPF R1 #0011
+ 0xB8060800, // 000A GETNGBL R1 K4
+ 0x8C040305, // 000B GETMET R1 R1 K5
+ 0x880C0103, // 000C GETMBR R3 R0 K3
+ 0x7C040400, // 000D CALL R1 2
+ 0x78060001, // 000E JMPF R1 #0011
+ 0x4C040000, // 000F LDNIL R1
+ 0x90020601, // 0010 SETMBR R0 K3 R1
+ 0x58040006, // 0011 LDCONST R1 K6
+ 0x6008000C, // 0012 GETGBL R2 G12
+ 0x880C0107, // 0013 GETMBR R3 R0 K7
+ 0x7C080200, // 0014 CALL R2 1
+ 0x14080202, // 0015 LT R2 R1 R2
+ 0x780A0005, // 0016 JMPF R2 #001D
+ 0x88080107, // 0017 GETMBR R2 R0 K7
+ 0x94080401, // 0018 GETIDX R2 R2 R1
+ 0x8C080501, // 0019 GETMET R2 R2 K1
+ 0x7C080200, // 001A CALL R2 1
+ 0x00040308, // 001B ADD R1 R1 K8
+ 0x7001FFF4, // 001C JMP #0012
+ 0x80000000, // 001D RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_root_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[23]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
+ /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_const_int(3),
+ /* K9 */ be_const_int(2147483647),
+ /* K10 */ be_const_int(2),
+ /* K11 */ be_nested_str_weak(compute_qrcode_content),
+ /* K12 */ be_nested_str_weak(publish_result),
+ /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
+ /* K14 */ be_nested_str_weak(Matter),
+ /* K15 */ be_nested_str_weak(_compute_pbkdf),
+ /* K16 */ be_nested_str_weak(root_passcode),
+ /* K17 */ be_nested_str_weak(root_iterations),
+ /* K18 */ be_nested_str_weak(root_salt),
+ /* K19 */ be_nested_str_weak(start_basic_commissioning),
+ /* K20 */ be_nested_str_weak(root_discriminator),
+ /* K21 */ be_nested_str_weak(root_w0),
+ /* K22 */ be_nested_str_weak(root_L),
+ }),
+ be_str_weak(start_root_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[49]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0x1C0C0203, // 0002 EQ R3 R1 R3
+ 0x780E0000, // 0003 JMPF R3 #0005
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x8C0C0102, // 0005 GETMET R3 R0 K2
+ 0x7C0C0200, // 0006 CALL R3 1
+ 0xB8120600, // 0007 GETNGBL R4 K3
+ 0x8C100904, // 0008 GETMET R4 R4 K4
+ 0x8C180505, // 0009 GETMET R6 R2 K5
+ 0x58200006, // 000A LDCONST R8 K6
+ 0x40260F08, // 000B CONNECT R9 K7 K8
+ 0x94240609, // 000C GETIDX R9 R3 R9
+ 0x542A0003, // 000D LDINT R10 4
+ 0x542E0005, // 000E LDINT R11 6
+ 0x4028140B, // 000F CONNECT R10 R10 R11
+ 0x9428060A, // 0010 GETIDX R10 R3 R10
+ 0x542E0006, // 0011 LDINT R11 7
+ 0x402C1709, // 0012 CONNECT R11 R11 K9
+ 0x942C060B, // 0013 GETIDX R11 R3 R11
+ 0x7C180A00, // 0014 CALL R6 5
+ 0x581C000A, // 0015 LDCONST R7 K10
+ 0x7C100600, // 0016 CALL R4 3
+ 0x8C10010B, // 0017 GETMET R4 R0 K11
+ 0x7C100200, // 0018 CALL R4 1
+ 0xB8160600, // 0019 GETNGBL R5 K3
+ 0x8C140B0C, // 001A GETMET R5 R5 K12
+ 0x8C1C0505, // 001B GETMET R7 R2 K5
+ 0x5824000D, // 001C LDCONST R9 K13
+ 0x5C280600, // 001D MOVE R10 R3
+ 0x5C2C0800, // 001E MOVE R11 R4
+ 0x7C1C0800, // 001F CALL R7 4
+ 0x5820000E, // 0020 LDCONST R8 K14
+ 0x7C140600, // 0021 CALL R5 3
+ 0x8C14010F, // 0022 GETMET R5 R0 K15
+ 0x881C0110, // 0023 GETMBR R7 R0 K16
+ 0x88200111, // 0024 GETMBR R8 R0 K17
+ 0x88240112, // 0025 GETMBR R9 R0 K18
+ 0x7C140800, // 0026 CALL R5 4
+ 0x8C140113, // 0027 GETMET R5 R0 K19
+ 0x5C1C0200, // 0028 MOVE R7 R1
+ 0x88200111, // 0029 GETMBR R8 R0 K17
+ 0x88240114, // 002A GETMBR R9 R0 K20
+ 0x88280112, // 002B GETMBR R10 R0 K18
+ 0x882C0115, // 002C GETMBR R11 R0 K21
+ 0x88300116, // 002D GETMBR R12 R0 K22
+ 0x4C340000, // 002E LDNIL R13
+ 0x7C141000, // 002F CALL R5 8
+ 0x80000000, // 0030 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _init_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device__init_basic_commissioning, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
+ }),
+ be_str_weak(_init_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x1C040302, // 0003 EQ R1 R1 K2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x7C040200, // 0006 CALL R1 1
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Device_init, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* 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 */
+ ( &(const bvalue[36]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(UI),
+ /* K7 */ be_nested_str_weak(started),
+ /* K8 */ be_nested_str_weak(plugins),
+ /* K9 */ be_nested_str_weak(vendorid),
+ /* K10 */ be_nested_str_weak(VENDOR_ID),
+ /* K11 */ be_nested_str_weak(productid),
+ /* K12 */ be_nested_str_weak(PRODUCT_ID),
+ /* K13 */ be_nested_str_weak(root_iterations),
+ /* K14 */ be_nested_str_weak(PBKDF_ITERATIONS),
+ /* K15 */ be_nested_str_weak(root_salt),
+ /* K16 */ be_nested_str_weak(random),
+ /* K17 */ be_nested_str_weak(ipv4only),
+ /* K18 */ be_nested_str_weak(load_param),
+ /* K19 */ be_nested_str_weak(sessions),
+ /* K20 */ be_nested_str_weak(Session_Store),
+ /* K21 */ be_nested_str_weak(load_fabrics),
+ /* K22 */ be_nested_str_weak(message_handler),
+ /* K23 */ be_nested_str_weak(MessageHandler),
+ /* K24 */ be_nested_str_weak(ui),
+ /* K25 */ be_nested_str_weak(wifi),
+ /* K26 */ be_nested_str_weak(up),
+ /* K27 */ be_nested_str_weak(eth),
+ /* K28 */ be_nested_str_weak(start),
+ /* K29 */ be_nested_str_weak(add_rule),
+ /* K30 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K31 */ be_nested_str_weak(matter_start),
+ /* K32 */ be_nested_str_weak(Eth_X23Connected),
+ /* K33 */ be_nested_str_weak(_init_basic_commissioning),
+ /* K34 */ be_nested_str_weak(add_driver),
+ /* K35 */ be_nested_str_weak(register_commands),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[93]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
- 0x88080101, // 0001 GETMBR R2 R0 K1
- 0x540E0FFE, // 0002 LDINT R3 4095
- 0x2C080403, // 0003 AND R2 R2 R3
- 0x540E0009, // 0004 LDINT R3 10
- 0x3C080403, // 0005 SHR R2 R2 R3
- 0x880C0101, // 0006 GETMBR R3 R0 K1
- 0x541202FF, // 0007 LDINT R4 768
- 0x2C0C0604, // 0008 AND R3 R3 R4
- 0x54120005, // 0009 LDINT R4 6
- 0x380C0604, // 000A SHL R3 R3 R4
- 0x88100102, // 000B GETMBR R4 R0 K2
- 0x54163FFE, // 000C LDINT R5 16383
- 0x2C100805, // 000D AND R4 R4 R5
- 0x300C0604, // 000E OR R3 R3 R4
- 0x88100102, // 000F GETMBR R4 R0 K2
- 0x5416000D, // 0010 LDINT R5 14
- 0x3C100805, // 0011 SHR R4 R4 R5
- 0x8C140303, // 0012 GETMET R5 R1 K3
- 0x581C0004, // 0013 LDCONST R7 K4
- 0x5C200400, // 0014 MOVE R8 R2
- 0x5C240600, // 0015 MOVE R9 R3
- 0x5C280800, // 0016 MOVE R10 R4
- 0x7C140A00, // 0017 CALL R5 5
- 0xB81A0A00, // 0018 GETNGBL R6 K5
- 0x88180D06, // 0019 GETMBR R6 R6 K6
- 0x8C180D07, // 001A GETMET R6 R6 K7
- 0x5C200A00, // 001B MOVE R8 R5
- 0x7C180400, // 001C CALL R6 2
- 0x00140A06, // 001D ADD R5 R5 R6
- 0x80040A00, // 001E RET 1 R5
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xB80E0400, // 0002 GETNGBL R3 K2
+ 0x8C0C0703, // 0003 GETMET R3 R3 K3
+ 0xB8160800, // 0004 GETNGBL R5 K4
+ 0x88140B05, // 0005 GETMBR R5 R5 K5
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x740E0004, // 0007 JMPT R3 #000D
+ 0xB80E0800, // 0008 GETNGBL R3 K4
+ 0x8C0C0706, // 0009 GETMET R3 R3 K6
+ 0x5C140000, // 000A MOVE R5 R0
+ 0x7C0C0400, // 000B CALL R3 2
+ 0x80000600, // 000C RET 0
+ 0x500C0000, // 000D LDBOOL R3 0 0
+ 0x90020E03, // 000E SETMBR R0 K7 R3
+ 0x600C0012, // 000F GETGBL R3 G18
+ 0x7C0C0000, // 0010 CALL R3 0
+ 0x90021003, // 0011 SETMBR R0 K8 R3
+ 0x880C010A, // 0012 GETMBR R3 R0 K10
+ 0x90021203, // 0013 SETMBR R0 K9 R3
+ 0x880C010C, // 0014 GETMBR R3 R0 K12
+ 0x90021603, // 0015 SETMBR R0 K11 R3
+ 0x880C010E, // 0016 GETMBR R3 R0 K14
+ 0x90021A03, // 0017 SETMBR R0 K13 R3
+ 0x8C0C0310, // 0018 GETMET R3 R1 K16
+ 0x5416000F, // 0019 LDINT R5 16
+ 0x7C0C0400, // 001A CALL R3 2
+ 0x90021E03, // 001B SETMBR R0 K15 R3
+ 0x500C0000, // 001C LDBOOL R3 0 0
+ 0x90022203, // 001D SETMBR R0 K17 R3
+ 0x8C0C0112, // 001E GETMET R3 R0 K18
+ 0x7C0C0200, // 001F CALL R3 1
+ 0xB80E0800, // 0020 GETNGBL R3 K4
+ 0x8C0C0714, // 0021 GETMET R3 R3 K20
+ 0x7C0C0200, // 0022 CALL R3 1
+ 0x90022603, // 0023 SETMBR R0 K19 R3
+ 0x880C0113, // 0024 GETMBR R3 R0 K19
+ 0x8C0C0715, // 0025 GETMET R3 R3 K21
+ 0x7C0C0200, // 0026 CALL R3 1
+ 0xB80E0800, // 0027 GETNGBL R3 K4
+ 0x8C0C0717, // 0028 GETMET R3 R3 K23
+ 0x5C140000, // 0029 MOVE R5 R0
+ 0x7C0C0400, // 002A CALL R3 2
+ 0x90022C03, // 002B SETMBR R0 K22 R3
+ 0xB80E0800, // 002C GETNGBL R3 K4
+ 0x8C0C0706, // 002D GETMET R3 R3 K6
+ 0x5C140000, // 002E MOVE R5 R0
+ 0x7C0C0400, // 002F CALL R3 2
+ 0x90023003, // 0030 SETMBR R0 K24 R3
+ 0xB80E0400, // 0031 GETNGBL R3 K2
+ 0x8C0C0719, // 0032 GETMET R3 R3 K25
+ 0x7C0C0200, // 0033 CALL R3 1
+ 0x940C071A, // 0034 GETIDX R3 R3 K26
+ 0x740E0004, // 0035 JMPT R3 #003B
+ 0xB80E0400, // 0036 GETNGBL R3 K2
+ 0x8C0C071B, // 0037 GETMET R3 R3 K27
+ 0x7C0C0200, // 0038 CALL R3 1
+ 0x940C071A, // 0039 GETIDX R3 R3 K26
+ 0x780E0001, // 003A JMPF R3 #003D
+ 0x8C0C011C, // 003B GETMET R3 R0 K28
+ 0x7C0C0200, // 003C CALL R3 1
+ 0xB80E0400, // 003D GETNGBL R3 K2
+ 0x8C0C0719, // 003E GETMET R3 R3 K25
+ 0x7C0C0200, // 003F CALL R3 1
+ 0x940C071A, // 0040 GETIDX R3 R3 K26
+ 0x740E0005, // 0041 JMPT R3 #0048
+ 0xB80E0400, // 0042 GETNGBL R3 K2
+ 0x8C0C071D, // 0043 GETMET R3 R3 K29
+ 0x5814001E, // 0044 LDCONST R5 K30
+ 0x84180000, // 0045 CLOSURE R6 P0
+ 0x581C001F, // 0046 LDCONST R7 K31
+ 0x7C0C0800, // 0047 CALL R3 4
+ 0xB80E0400, // 0048 GETNGBL R3 K2
+ 0x8C0C071B, // 0049 GETMET R3 R3 K27
+ 0x7C0C0200, // 004A CALL R3 1
+ 0x940C071A, // 004B GETIDX R3 R3 K26
+ 0x740E0005, // 004C JMPT R3 #0053
+ 0xB80E0400, // 004D GETNGBL R3 K2
+ 0x8C0C071D, // 004E GETMET R3 R3 K29
+ 0x58140020, // 004F LDCONST R5 K32
+ 0x84180001, // 0050 CLOSURE R6 P1
+ 0x581C001F, // 0051 LDCONST R7 K31
+ 0x7C0C0800, // 0052 CALL R3 4
+ 0x8C0C0121, // 0053 GETMET R3 R0 K33
+ 0x7C0C0200, // 0054 CALL R3 1
+ 0xB80E0400, // 0055 GETNGBL R3 K2
+ 0x8C0C0722, // 0056 GETMET R3 R3 K34
+ 0x5C140000, // 0057 MOVE R5 R0
+ 0x7C0C0400, // 0058 CALL R3 2
+ 0x8C0C0123, // 0059 GETMET R3 R0 K35
+ 0x7C0C0200, // 005A CALL R3 1
+ 0xA0000000, // 005B CLOSE R0
+ 0x80000000, // 005C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _compute_pbkdf
+********************************************************************/
+be_local_closure(Matter_Device__compute_pbkdf, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(add),
+ /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
+ /* K4 */ be_nested_str_weak(derive),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(root_w0),
+ /* K7 */ be_nested_str_weak(EC_P256),
+ /* K8 */ be_nested_str_weak(mod),
+ /* K9 */ be_nested_str_weak(root_L),
+ /* K10 */ be_nested_str_weak(public_key),
+ }),
+ be_str_weak(_compute_pbkdf),
+ &be_const_str_solidified,
+ ( &(const binstruction[41]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xA4160200, // 0001 IMPORT R5 K1
+ 0x60180015, // 0002 GETGBL R6 G21
+ 0x7C180000, // 0003 CALL R6 0
+ 0x8C180D02, // 0004 GETMET R6 R6 K2
+ 0x5C200200, // 0005 MOVE R8 R1
+ 0x54260003, // 0006 LDINT R9 4
+ 0x7C180600, // 0007 CALL R6 3
+ 0x8C1C0903, // 0008 GETMET R7 R4 K3
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x8C1C0F04, // 000A GETMET R7 R7 K4
+ 0x5C240C00, // 000B MOVE R9 R6
+ 0x5C280600, // 000C MOVE R10 R3
+ 0x5C2C0400, // 000D MOVE R11 R2
+ 0x5432004F, // 000E LDINT R12 80
+ 0x7C1C0A00, // 000F CALL R7 5
+ 0x54220026, // 0010 LDINT R8 39
+ 0x40220A08, // 0011 CONNECT R8 K5 R8
+ 0x94200E08, // 0012 GETIDX R8 R7 R8
+ 0x54260027, // 0013 LDINT R9 40
+ 0x542A004E, // 0014 LDINT R10 79
+ 0x4024120A, // 0015 CONNECT R9 R9 R10
+ 0x94240E09, // 0016 GETIDX R9 R7 R9
+ 0x8C280907, // 0017 GETMET R10 R4 K7
+ 0x7C280200, // 0018 CALL R10 1
+ 0x8C281508, // 0019 GETMET R10 R10 K8
+ 0x5C301000, // 001A MOVE R12 R8
+ 0x7C280400, // 001B CALL R10 2
+ 0x90020C0A, // 001C SETMBR R0 K6 R10
+ 0x8C280907, // 001D GETMET R10 R4 K7
+ 0x7C280200, // 001E CALL R10 1
+ 0x8C281508, // 001F GETMET R10 R10 K8
+ 0x5C301200, // 0020 MOVE R12 R9
+ 0x7C280400, // 0021 CALL R10 2
+ 0x8C2C0907, // 0022 GETMET R11 R4 K7
+ 0x7C2C0200, // 0023 CALL R11 1
+ 0x8C2C170A, // 0024 GETMET R11 R11 K10
+ 0x5C341400, // 0025 MOVE R13 R10
+ 0x7C2C0400, // 0026 CALL R11 2
+ 0x9002120B, // 0027 SETMBR R0 K9 R11
+ 0x80000000, // 0028 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_250ms
+********************************************************************/
+be_local_closure(Matter_Device_every_250ms, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(every_250ms),
+ }),
+ be_str_weak(every_250ms),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: process_attribute_expansion
+********************************************************************/
+be_local_closure(Matter_Device_process_attribute_expansion, /* name */
+ be_nested_proto(
+ 29, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(keys),
+ /* K1 */ be_nested_str_weak(push),
+ /* K2 */ be_nested_str_weak(stop_iteration),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_const_int(0),
+ }),
+ be_str_weak(keys_sorted),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0x60040012, // 0000 GETGBL R1 G18
+ 0x7C040000, // 0001 CALL R1 0
+ 0x60080010, // 0002 GETGBL R2 G16
+ 0x8C0C0100, // 0003 GETMET R3 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x7C080200, // 0005 CALL R2 1
+ 0xA8020005, // 0006 EXBLK 0 #000D
+ 0x5C0C0400, // 0007 MOVE R3 R2
+ 0x7C0C0000, // 0008 CALL R3 0
+ 0x8C100301, // 0009 GETMET R4 R1 K1
+ 0x5C180600, // 000A MOVE R6 R3
+ 0x7C100400, // 000B CALL R4 2
+ 0x7001FFF9, // 000C JMP #0007
+ 0x58080002, // 000D LDCONST R2 K2
+ 0xAC080200, // 000E CATCH R2 1 0
+ 0xB0080000, // 000F RAISE 2 R0 R0
+ 0x60080010, // 0010 GETGBL R2 G16
+ 0x600C000C, // 0011 GETGBL R3 G12
+ 0x5C100200, // 0012 MOVE R4 R1
+ 0x7C0C0200, // 0013 CALL R3 1
+ 0x040C0703, // 0014 SUB R3 R3 K3
+ 0x400E0603, // 0015 CONNECT R3 K3 R3
+ 0x7C080200, // 0016 CALL R2 1
+ 0xA8020010, // 0017 EXBLK 0 #0029
+ 0x5C0C0400, // 0018 MOVE R3 R2
+ 0x7C0C0000, // 0019 CALL R3 0
+ 0x94100203, // 001A GETIDX R4 R1 R3
+ 0x5C140600, // 001B MOVE R5 R3
+ 0x24180B04, // 001C GT R6 R5 K4
+ 0x781A0008, // 001D JMPF R6 #0027
+ 0x04180B03, // 001E SUB R6 R5 K3
+ 0x94180206, // 001F GETIDX R6 R1 R6
+ 0x24180C04, // 0020 GT R6 R6 R4
+ 0x781A0004, // 0021 JMPF R6 #0027
+ 0x04180B03, // 0022 SUB R6 R5 K3
+ 0x94180206, // 0023 GETIDX R6 R1 R6
+ 0x98040A06, // 0024 SETIDX R1 R5 R6
+ 0x04140B03, // 0025 SUB R5 R5 K3
+ 0x7001FFF4, // 0026 JMP #001C
+ 0x98040A04, // 0027 SETIDX R1 R5 R4
+ 0x7001FFEE, // 0028 JMP #0018
+ 0x58080002, // 0029 LDCONST R2 K2
+ 0xAC080200, // 002A CATCH R2 1 0
+ 0xB0080000, // 002B RAISE 2 R0 R0
+ 0x80040200, // 002C RET 1 R1
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(attribute),
+ /* K4 */ be_nested_str_weak(plugins),
+ /* K5 */ be_nested_str_weak(get_endpoint),
+ /* K6 */ be_nested_str_weak(contains),
+ /* K7 */ be_nested_str_weak(get_cluster_list),
+ /* K8 */ be_nested_str_weak(get_attribute_list),
+ /* K9 */ be_nested_str_weak(push),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
+ /* K15 */ be_const_int(3),
+ /* K16 */ be_nested_str_weak(status),
+ /* K17 */ be_nested_str_weak(matter),
+ /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
+ /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
+ /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
+ /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
+ }),
+ be_str_weak(process_attribute_expansion),
+ &be_const_str_solidified,
+ ( &(const binstruction[216]) { /* code */
+ 0x840C0000, // 0000 CLOSURE R3 P0
+ 0xA4120000, // 0001 IMPORT R4 K0
+ 0x88140301, // 0002 GETMBR R5 R1 K1
+ 0x50180000, // 0003 LDBOOL R6 0 0
+ 0x881C0302, // 0004 GETMBR R7 R1 K2
+ 0x50200000, // 0005 LDBOOL R8 0 0
+ 0x88240303, // 0006 GETMBR R9 R1 K3
+ 0x50280000, // 0007 LDBOOL R10 0 0
+ 0x882C0301, // 0008 GETMBR R11 R1 K1
+ 0x4C300000, // 0009 LDNIL R12
+ 0x202C160C, // 000A NE R11 R11 R12
+ 0x782E0007, // 000B JMPF R11 #0014
+ 0x882C0302, // 000C GETMBR R11 R1 K2
+ 0x4C300000, // 000D LDNIL R12
+ 0x202C160C, // 000E NE R11 R11 R12
+ 0x782E0003, // 000F JMPF R11 #0014
+ 0x882C0303, // 0010 GETMBR R11 R1 K3
+ 0x4C300000, // 0011 LDNIL R12
+ 0x202C160C, // 0012 NE R11 R11 R12
+ 0x742E0000, // 0013 JMPT R11 #0015
+ 0x502C0001, // 0014 LDBOOL R11 0 1
+ 0x502C0200, // 0015 LDBOOL R11 1 0
+ 0x60300013, // 0016 GETGBL R12 G19
+ 0x7C300000, // 0017 CALL R12 0
+ 0x60340010, // 0018 GETGBL R13 G16
+ 0x88380104, // 0019 GETMBR R14 R0 K4
+ 0x7C340200, // 001A CALL R13 1
+ 0xA8020055, // 001B EXBLK 0 #0072
+ 0x5C381A00, // 001C MOVE R14 R13
+ 0x7C380000, // 001D CALL R14 0
+ 0x8C3C1D05, // 001E GETMET R15 R14 K5
+ 0x7C3C0200, // 001F CALL R15 1
+ 0x4C400000, // 0020 LDNIL R16
+ 0x20400A10, // 0021 NE R16 R5 R16
+ 0x78420002, // 0022 JMPF R16 #0026
+ 0x20401E05, // 0023 NE R16 R15 R5
+ 0x78420000, // 0024 JMPF R16 #0026
+ 0x7001FFF5, // 0025 JMP #001C
+ 0x8C401906, // 0026 GETMET R16 R12 K6
+ 0x5C481E00, // 0027 MOVE R18 R15
+ 0x7C400400, // 0028 CALL R16 2
+ 0x74420002, // 0029 JMPT R16 #002D
+ 0x60400013, // 002A GETGBL R16 G19
+ 0x7C400000, // 002B CALL R16 0
+ 0x98301E10, // 002C SETIDX R12 R15 R16
+ 0x50180200, // 002D LDBOOL R6 1 0
+ 0x8C401D07, // 002E GETMET R16 R14 K7
+ 0x5C481E00, // 002F MOVE R18 R15
+ 0x7C400400, // 0030 CALL R16 2
+ 0x60440010, // 0031 GETGBL R17 G16
+ 0x5C482000, // 0032 MOVE R18 R16
+ 0x7C440200, // 0033 CALL R17 1
+ 0xA8020038, // 0034 EXBLK 0 #006E
+ 0x5C482200, // 0035 MOVE R18 R17
+ 0x7C480000, // 0036 CALL R18 0
+ 0x4C4C0000, // 0037 LDNIL R19
+ 0x204C0E13, // 0038 NE R19 R7 R19
+ 0x784E0002, // 0039 JMPF R19 #003D
+ 0x204C2407, // 003A NE R19 R18 R7
+ 0x784E0000, // 003B JMPF R19 #003D
+ 0x7001FFF7, // 003C JMP #0035
+ 0x944C180F, // 003D GETIDX R19 R12 R15
+ 0x8C4C2706, // 003E GETMET R19 R19 K6
+ 0x5C542400, // 003F MOVE R21 R18
+ 0x7C4C0400, // 0040 CALL R19 2
+ 0x744E0003, // 0041 JMPT R19 #0046
+ 0x944C180F, // 0042 GETIDX R19 R12 R15
+ 0x60500013, // 0043 GETGBL R20 G19
+ 0x7C500000, // 0044 CALL R20 0
+ 0x984C2414, // 0045 SETIDX R19 R18 R20
+ 0x50200200, // 0046 LDBOOL R8 1 0
+ 0x8C4C1D08, // 0047 GETMET R19 R14 K8
+ 0x5C541E00, // 0048 MOVE R21 R15
+ 0x5C582400, // 0049 MOVE R22 R18
+ 0x7C4C0600, // 004A CALL R19 3
+ 0x60500010, // 004B GETGBL R20 G16
+ 0x5C542600, // 004C MOVE R21 R19
+ 0x7C500200, // 004D CALL R20 1
+ 0xA802001A, // 004E EXBLK 0 #006A
+ 0x5C542800, // 004F MOVE R21 R20
+ 0x7C540000, // 0050 CALL R21 0
+ 0x4C580000, // 0051 LDNIL R22
+ 0x20581216, // 0052 NE R22 R9 R22
+ 0x785A0002, // 0053 JMPF R22 #0057
+ 0x20582A09, // 0054 NE R22 R21 R9
+ 0x785A0000, // 0055 JMPF R22 #0057
+ 0x7001FFF7, // 0056 JMP #004F
+ 0x9458180F, // 0057 GETIDX R22 R12 R15
+ 0x94582C12, // 0058 GETIDX R22 R22 R18
+ 0x8C582D06, // 0059 GETMET R22 R22 K6
+ 0x5C602A00, // 005A MOVE R24 R21
+ 0x7C580400, // 005B CALL R22 2
+ 0x745A0004, // 005C JMPT R22 #0062
+ 0x9458180F, // 005D GETIDX R22 R12 R15
+ 0x94582C12, // 005E GETIDX R22 R22 R18
+ 0x605C0012, // 005F GETGBL R23 G18
+ 0x7C5C0000, // 0060 CALL R23 0
+ 0x98582A17, // 0061 SETIDX R22 R21 R23
+ 0x50280200, // 0062 LDBOOL R10 1 0
+ 0x9458180F, // 0063 GETIDX R22 R12 R15
+ 0x94582C12, // 0064 GETIDX R22 R22 R18
+ 0x94582C15, // 0065 GETIDX R22 R22 R21
+ 0x8C582D09, // 0066 GETMET R22 R22 K9
+ 0x5C601C00, // 0067 MOVE R24 R14
+ 0x7C580400, // 0068 CALL R22 2
+ 0x7001FFE4, // 0069 JMP #004F
+ 0x5850000A, // 006A LDCONST R20 K10
+ 0xAC500200, // 006B CATCH R20 1 0
+ 0xB0080000, // 006C RAISE 2 R0 R0
+ 0x7001FFC6, // 006D JMP #0035
+ 0x5844000A, // 006E LDCONST R17 K10
+ 0xAC440200, // 006F CATCH R17 1 0
+ 0xB0080000, // 0070 RAISE 2 R0 R0
+ 0x7001FFA9, // 0071 JMP #001C
+ 0x5834000A, // 0072 LDCONST R13 K10
+ 0xAC340200, // 0073 CATCH R13 1 0
+ 0xB0080000, // 0074 RAISE 2 R0 R0
+ 0x60340010, // 0075 GETGBL R13 G16
+ 0x5C380600, // 0076 MOVE R14 R3
+ 0x5C3C1800, // 0077 MOVE R15 R12
+ 0x7C380200, // 0078 CALL R14 1
+ 0x7C340200, // 0079 CALL R13 1
+ 0xA802003D, // 007A EXBLK 0 #00B9
+ 0x5C381A00, // 007B MOVE R14 R13
+ 0x7C380000, // 007C CALL R14 0
+ 0x603C0010, // 007D GETGBL R15 G16
+ 0x5C400600, // 007E MOVE R16 R3
+ 0x9444180E, // 007F GETIDX R17 R12 R14
+ 0x7C400200, // 0080 CALL R16 1
+ 0x7C3C0200, // 0081 CALL R15 1
+ 0xA8020031, // 0082 EXBLK 0 #00B5
+ 0x5C401E00, // 0083 MOVE R16 R15
+ 0x7C400000, // 0084 CALL R16 0
+ 0x60440010, // 0085 GETGBL R17 G16
+ 0x5C480600, // 0086 MOVE R18 R3
+ 0x944C180E, // 0087 GETIDX R19 R12 R14
+ 0x944C2610, // 0088 GETIDX R19 R19 R16
+ 0x7C480200, // 0089 CALL R18 1
+ 0x7C440200, // 008A CALL R17 1
+ 0xA8020024, // 008B EXBLK 0 #00B1
+ 0x5C482200, // 008C MOVE R18 R17
+ 0x7C480000, // 008D CALL R18 0
+ 0x604C0010, // 008E GETGBL R19 G16
+ 0x9450180E, // 008F GETIDX R20 R12 R14
+ 0x94502810, // 0090 GETIDX R20 R20 R16
+ 0x94502812, // 0091 GETIDX R20 R20 R18
+ 0x7C4C0200, // 0092 CALL R19 1
+ 0xA8020018, // 0093 EXBLK 0 #00AD
+ 0x5C502600, // 0094 MOVE R20 R19
+ 0x7C500000, // 0095 CALL R20 0
+ 0xB8561600, // 0096 GETNGBL R21 K11
+ 0x8C542B0C, // 0097 GETMET R21 R21 K12
+ 0x8C5C090D, // 0098 GETMET R23 R4 K13
+ 0x5864000E, // 0099 LDCONST R25 K14
+ 0x5C681C00, // 009A MOVE R26 R14
+ 0x5C6C2000, // 009B MOVE R27 R16
+ 0x5C702400, // 009C MOVE R28 R18
+ 0x7C5C0A00, // 009D CALL R23 5
+ 0x5860000F, // 009E LDCONST R24 K15
+ 0x7C540600, // 009F CALL R21 3
+ 0x9006020E, // 00A0 SETMBR R1 K1 R14
+ 0x90060410, // 00A1 SETMBR R1 K2 R16
+ 0x90060612, // 00A2 SETMBR R1 K3 R18
+ 0x5C540400, // 00A3 MOVE R21 R2
+ 0x5C582800, // 00A4 MOVE R22 R20
+ 0x5C5C0200, // 00A5 MOVE R23 R1
+ 0x5C601600, // 00A6 MOVE R24 R11
+ 0x7C540600, // 00A7 CALL R21 3
+ 0x782E0002, // 00A8 JMPF R11 #00AC
+ 0x78560001, // 00A9 JMPF R21 #00AC
+ 0xA8040004, // 00AA EXBLK 1 4
+ 0x80002C00, // 00AB RET 0
+ 0x7001FFE6, // 00AC JMP #0094
+ 0x584C000A, // 00AD LDCONST R19 K10
+ 0xAC4C0200, // 00AE CATCH R19 1 0
+ 0xB0080000, // 00AF RAISE 2 R0 R0
+ 0x7001FFDA, // 00B0 JMP #008C
+ 0x5844000A, // 00B1 LDCONST R17 K10
+ 0xAC440200, // 00B2 CATCH R17 1 0
+ 0xB0080000, // 00B3 RAISE 2 R0 R0
+ 0x7001FFCD, // 00B4 JMP #0083
+ 0x583C000A, // 00B5 LDCONST R15 K10
+ 0xAC3C0200, // 00B6 CATCH R15 1 0
+ 0xB0080000, // 00B7 RAISE 2 R0 R0
+ 0x7001FFC1, // 00B8 JMP #007B
+ 0x5834000A, // 00B9 LDCONST R13 K10
+ 0xAC340200, // 00BA CATCH R13 1 0
+ 0xB0080000, // 00BB RAISE 2 R0 R0
+ 0x782E0019, // 00BC JMPF R11 #00D7
+ 0x5C340C00, // 00BD MOVE R13 R6
+ 0x74360003, // 00BE JMPT R13 #00C3
+ 0xB8362200, // 00BF GETNGBL R13 K17
+ 0x88341B12, // 00C0 GETMBR R13 R13 K18
+ 0x9006200D, // 00C1 SETMBR R1 K16 R13
+ 0x7002000E, // 00C2 JMP #00D2
+ 0x5C341000, // 00C3 MOVE R13 R8
+ 0x74360003, // 00C4 JMPT R13 #00C9
+ 0xB8362200, // 00C5 GETNGBL R13 K17
+ 0x88341B13, // 00C6 GETMBR R13 R13 K19
+ 0x9006200D, // 00C7 SETMBR R1 K16 R13
+ 0x70020008, // 00C8 JMP #00D2
+ 0x5C341400, // 00C9 MOVE R13 R10
+ 0x74360003, // 00CA JMPT R13 #00CF
+ 0xB8362200, // 00CB GETNGBL R13 K17
+ 0x88341B14, // 00CC GETMBR R13 R13 K20
+ 0x9006200D, // 00CD SETMBR R1 K16 R13
+ 0x70020002, // 00CE JMP #00D2
+ 0xB8362200, // 00CF GETNGBL R13 K17
+ 0x88341B15, // 00D0 GETMBR R13 R13 K21
+ 0x9006200D, // 00D1 SETMBR R1 K16 R13
+ 0x5C340400, // 00D2 MOVE R13 R2
+ 0x4C380000, // 00D3 LDNIL R14
+ 0x5C3C0200, // 00D4 MOVE R15 R1
+ 0x50400200, // 00D5 LDBOOL R16 1 0
+ 0x7C340600, // 00D6 CALL R13 3
+ 0x80000000, // 00D7 RET 0
})
)
);
@@ -515,11 +3163,11 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */
/********************************************************************
-** Solidified function: every_second
+** Solidified function: stop_basic_commissioning
********************************************************************/
-be_local_closure(Matter_Device_every_second, /* name */
+be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
be_nested_proto(
- 4, /* nstack */
+ 5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -527,50 +3175,49 @@ be_local_closure(Matter_Device_every_second, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(every_second),
- /* K2 */ be_nested_str_weak(message_handler),
- /* K3 */ be_nested_str_weak(commissioning_open),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(time_reached),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(plugins),
- /* K8 */ be_const_int(1),
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(publish_result),
+ /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(commissioning_open),
+ /* K6 */ be_nested_str_weak(mdns_remove_PASE),
+ /* K7 */ be_nested_str_weak(commissioning_iterations),
+ /* K8 */ be_nested_str_weak(commissioning_discriminator),
+ /* K9 */ be_nested_str_weak(commissioning_salt),
+ /* K10 */ be_nested_str_weak(commissioning_w0),
+ /* K11 */ be_nested_str_weak(commissioning_L),
+ /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
}),
- be_str_weak(every_second),
+ be_str_weak(stop_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x88040102, // 0003 GETMBR R1 R0 K2
- 0x8C040301, // 0004 GETMET R1 R1 K1
- 0x7C040200, // 0005 CALL R1 1
- 0x88040103, // 0006 GETMBR R1 R0 K3
- 0x4C080000, // 0007 LDNIL R2
- 0x20040202, // 0008 NE R1 R1 R2
- 0x78060006, // 0009 JMPF R1 #0011
- 0xB8060800, // 000A GETNGBL R1 K4
- 0x8C040305, // 000B GETMET R1 R1 K5
- 0x880C0103, // 000C GETMBR R3 R0 K3
- 0x7C040400, // 000D CALL R1 2
- 0x78060001, // 000E JMPF R1 #0011
- 0x4C040000, // 000F LDNIL R1
- 0x90020601, // 0010 SETMBR R0 K3 R1
- 0x58040006, // 0011 LDCONST R1 K6
- 0x6008000C, // 0012 GETGBL R2 G12
- 0x880C0107, // 0013 GETMBR R3 R0 K7
- 0x7C080200, // 0014 CALL R2 1
- 0x14080202, // 0015 LT R2 R1 R2
- 0x780A0005, // 0016 JMPF R2 #001D
- 0x88080107, // 0017 GETMBR R2 R0 K7
- 0x94080401, // 0018 GETIDX R2 R2 R1
- 0x8C080501, // 0019 GETMET R2 R2 K1
- 0x7C080200, // 001A CALL R2 1
- 0x00040308, // 001B ADD R1 R1 K8
- 0x7001FFF4, // 001C JMP #0012
- 0x80000000, // 001D RET 0
+ ( &(const binstruction[25]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x78060004, // 0002 JMPF R1 #0008
+ 0xB8060200, // 0003 GETNGBL R1 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0x580C0003, // 0005 LDCONST R3 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C040600, // 0007 CALL R1 3
+ 0x4C040000, // 0008 LDNIL R1
+ 0x90020A01, // 0009 SETMBR R0 K5 R1
+ 0x8C040106, // 000A GETMET R1 R0 K6
+ 0x7C040200, // 000B CALL R1 1
+ 0x4C040000, // 000C LDNIL R1
+ 0x90020E01, // 000D SETMBR R0 K7 R1
+ 0x4C040000, // 000E LDNIL R1
+ 0x90021001, // 000F SETMBR R0 K8 R1
+ 0x4C040000, // 0010 LDNIL R1
+ 0x90021201, // 0011 SETMBR R0 K9 R1
+ 0x4C040000, // 0012 LDNIL R1
+ 0x90021401, // 0013 SETMBR R0 K10 R1
+ 0x4C040000, // 0014 LDNIL R1
+ 0x90021601, // 0015 SETMBR R0 K11 R1
+ 0x4C040000, // 0016 LDNIL R1
+ 0x90021801, // 0017 SETMBR R0 K12 R1
+ 0x80000000, // 0018 RET 0
})
)
);
@@ -578,95 +3225,30 @@ be_local_closure(Matter_Device_every_second, /* name */
/********************************************************************
-** Solidified function: _init_basic_commissioning
+** Solidified function: received_ack
********************************************************************/
-be_local_closure(Matter_Device__init_basic_commissioning, /* name */
+be_local_closure(Matter_Device_received_ack, /* name */
be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
- }),
- be_str_weak(_init_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x1C040302, // 0003 EQ R1 R1 K2
- 0x78060001, // 0004 JMPF R1 #0007
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x7C040200, // 0006 CALL R1 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_operational_discovery_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
+ 5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_operational_discovery),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(received_ack),
}),
- be_str_weak(start_operational_discovery_deferred),
+ be_str_weak(received_ack),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
+ ( &(const binstruction[ 5]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
+ 0x5C100200, // 0002 MOVE R4 R1
+ 0x7C080400, // 0003 CALL R2 2
+ 0x80040400, // 0004 RET 1 R2
})
)
);
@@ -674,9 +3256,136 @@ be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name *
/********************************************************************
-** Solidified function: mdns_announce_op_discovery_all_fabrics
+** Solidified function: load_param
********************************************************************/
-be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
+be_local_closure(Matter_Device_load_param, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[24]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(crypto),
+ /* K2 */ be_nested_str_weak(FILENAME),
+ /* K3 */ be_nested_str_weak(read),
+ /* K4 */ be_nested_str_weak(close),
+ /* K5 */ be_nested_str_weak(json),
+ /* K6 */ be_nested_str_weak(load),
+ /* K7 */ be_nested_str_weak(root_discriminator),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(distinguish),
+ /* K10 */ be_nested_str_weak(root_passcode),
+ /* K11 */ be_nested_str_weak(passcode),
+ /* K12 */ be_nested_str_weak(ipv4only),
+ /* K13 */ be_nested_str_weak(io_error),
+ /* K14 */ be_nested_str_weak(tasmota),
+ /* K15 */ be_nested_str_weak(log),
+ /* K16 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
+ /* K17 */ be_nested_str_weak(_X7C),
+ /* K18 */ be_const_int(2),
+ /* K19 */ be_nested_str_weak(random),
+ /* K20 */ be_nested_str_weak(get),
+ /* K21 */ be_const_int(0),
+ /* K22 */ be_nested_str_weak(PASSCODE_DEFAULT),
+ /* K23 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(load_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[79]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA802001D, // 0002 EXBLK 0 #0021
+ 0x600C0011, // 0003 GETGBL R3 G17
+ 0x88100102, // 0004 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x8C100703, // 0006 GETMET R4 R3 K3
+ 0x7C100200, // 0007 CALL R4 1
+ 0x8C140704, // 0008 GETMET R5 R3 K4
+ 0x7C140200, // 0009 CALL R5 1
+ 0xA4160A00, // 000A IMPORT R5 K5
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x5C200800, // 000C MOVE R8 R4
+ 0x7C180400, // 000D CALL R6 2
+ 0x8C1C0D08, // 000E GETMET R7 R6 K8
+ 0x58240009, // 000F LDCONST R9 K9
+ 0x88280107, // 0010 GETMBR R10 R0 K7
+ 0x7C1C0600, // 0011 CALL R7 3
+ 0x90020E07, // 0012 SETMBR R0 K7 R7
+ 0x8C1C0D08, // 0013 GETMET R7 R6 K8
+ 0x5824000B, // 0014 LDCONST R9 K11
+ 0x8828010A, // 0015 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0016 CALL R7 3
+ 0x90021407, // 0017 SETMBR R0 K10 R7
+ 0x601C0017, // 0018 GETGBL R7 G23
+ 0x8C200D08, // 0019 GETMET R8 R6 K8
+ 0x5828000C, // 001A LDCONST R10 K12
+ 0x502C0000, // 001B LDBOOL R11 0 0
+ 0x7C200600, // 001C CALL R8 3
+ 0x7C1C0200, // 001D CALL R7 1
+ 0x90021807, // 001E SETMBR R0 K12 R7
+ 0xA8040001, // 001F EXBLK 1 1
+ 0x70020012, // 0020 JMP #0034
+ 0xAC0C0002, // 0021 CATCH R3 0 2
+ 0x7002000F, // 0022 JMP #0033
+ 0x2014070D, // 0023 NE R5 R3 K13
+ 0x7816000C, // 0024 JMPF R5 #0032
+ 0xB8161C00, // 0025 GETNGBL R5 K14
+ 0x8C140B0F, // 0026 GETMET R5 R5 K15
+ 0x601C0008, // 0027 GETGBL R7 G8
+ 0x5C200600, // 0028 MOVE R8 R3
+ 0x7C1C0200, // 0029 CALL R7 1
+ 0x001E2007, // 002A ADD R7 K16 R7
+ 0x001C0F11, // 002B ADD R7 R7 K17
+ 0x60200008, // 002C GETGBL R8 G8
+ 0x5C240800, // 002D MOVE R9 R4
+ 0x7C200200, // 002E CALL R8 1
+ 0x001C0E08, // 002F ADD R7 R7 R8
+ 0x58200012, // 0030 LDCONST R8 K18
+ 0x7C140600, // 0031 CALL R5 3
+ 0x70020000, // 0032 JMP #0034
+ 0xB0080000, // 0033 RAISE 2 R0 R0
+ 0x500C0000, // 0034 LDBOOL R3 0 0
+ 0x88100107, // 0035 GETMBR R4 R0 K7
+ 0x4C140000, // 0036 LDNIL R5
+ 0x1C100805, // 0037 EQ R4 R4 R5
+ 0x7812000A, // 0038 JMPF R4 #0044
+ 0x8C100513, // 0039 GETMET R4 R2 K19
+ 0x58180012, // 003A LDCONST R6 K18
+ 0x7C100400, // 003B CALL R4 2
+ 0x8C100914, // 003C GETMET R4 R4 K20
+ 0x58180015, // 003D LDCONST R6 K21
+ 0x581C0012, // 003E LDCONST R7 K18
+ 0x7C100600, // 003F CALL R4 3
+ 0x54160FFE, // 0040 LDINT R5 4095
+ 0x2C100805, // 0041 AND R4 R4 R5
+ 0x90020E04, // 0042 SETMBR R0 K7 R4
+ 0x500C0200, // 0043 LDBOOL R3 1 0
+ 0x8810010A, // 0044 GETMBR R4 R0 K10
+ 0x4C140000, // 0045 LDNIL R5
+ 0x1C100805, // 0046 EQ R4 R4 R5
+ 0x78120002, // 0047 JMPF R4 #004B
+ 0x88100116, // 0048 GETMBR R4 R0 K22
+ 0x90021404, // 0049 SETMBR R0 K10 R4
+ 0x500C0200, // 004A LDBOOL R3 1 0
+ 0x780E0001, // 004B JMPF R3 #004E
+ 0x8C100117, // 004C GETMET R4 R0 K23
+ 0x7C100200, // 004D CALL R4 1
+ 0x80000000, // 004E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
@@ -691,10 +3400,10 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name
/* K1 */ be_nested_str_weak(active_fabrics),
/* K2 */ be_nested_str_weak(get_device_id),
/* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
/* K5 */ be_nested_str_weak(stop_iteration),
}),
- be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ be_str_weak(mdns_remove_op_discovery_all_fabrics),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x60040010, // 0000 GETGBL R1 G16
@@ -811,1594 +3520,6 @@ be_local_closure(Matter_Device_save_param, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: sort_distinct
-********************************************************************/
-be_local_closure(Matter_Device_sort_distinct, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 4, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_const_int(1),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_nested_str_weak(remove),
- }),
- be_str_weak(sort_distinct),
- &be_const_str_solidified,
- ( &(const binstruction[53]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 0x60080010, // 0001 GETGBL R2 G16
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x040C0701, // 0005 SUB R3 R3 K1
- 0x400E0203, // 0006 CONNECT R3 K1 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
- 0x24180B02, // 000D GT R6 R5 K2
- 0x781A0008, // 000E JMPF R6 #0018
- 0x04180B01, // 000F SUB R6 R5 K1
- 0x94180006, // 0010 GETIDX R6 R0 R6
- 0x24180C04, // 0011 GT R6 R6 R4
- 0x781A0004, // 0012 JMPF R6 #0018
- 0x04180B01, // 0013 SUB R6 R5 K1
- 0x94180006, // 0014 GETIDX R6 R0 R6
- 0x98000A06, // 0015 SETIDX R0 R5 R6
- 0x04140B01, // 0016 SUB R5 R5 K1
- 0x7001FFF4, // 0017 JMP #000D
- 0x98000A04, // 0018 SETIDX R0 R5 R4
- 0x7001FFEE, // 0019 JMP #0009
- 0x58080003, // 001A LDCONST R2 K3
- 0xAC080200, // 001B CATCH R2 1 0
- 0xB0080000, // 001C RAISE 2 R0 R0
- 0x58080001, // 001D LDCONST R2 K1
- 0x600C000C, // 001E GETGBL R3 G12
- 0x5C100000, // 001F MOVE R4 R0
- 0x7C0C0200, // 0020 CALL R3 1
- 0x180C0701, // 0021 LE R3 R3 K1
- 0x780E0000, // 0022 JMPF R3 #0024
- 0x80040000, // 0023 RET 1 R0
- 0x940C0102, // 0024 GETIDX R3 R0 K2
- 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
- 0x8C100104, // 002D GETMET R4 R0 K4
- 0x5C180400, // 002E MOVE R6 R2
- 0x7C100400, // 002F CALL R4 2
- 0x70020001, // 0030 JMP #0033
- 0x940C0002, // 0031 GETIDX R3 R0 R2
- 0x00080501, // 0032 ADD R2 R2 K1
- 0x7001FFF0, // 0033 JMP #0025
- 0x80040000, // 0034 RET 1 R0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(is_root_commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(publish_result),
- /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(commissioning_open),
- /* K6 */ be_nested_str_weak(mdns_remove_PASE),
- /* K7 */ be_nested_str_weak(commissioning_iterations),
- /* K8 */ be_nested_str_weak(commissioning_discriminator),
- /* K9 */ be_nested_str_weak(commissioning_salt),
- /* K10 */ be_nested_str_weak(commissioning_w0),
- /* K11 */ be_nested_str_weak(commissioning_L),
- /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(stop_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x78060004, // 0002 JMPF R1 #0008
- 0xB8060200, // 0003 GETNGBL R1 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0x580C0003, // 0005 LDCONST R3 K3
- 0x58100004, // 0006 LDCONST R4 K4
- 0x7C040600, // 0007 CALL R1 3
- 0x4C040000, // 0008 LDNIL R1
- 0x90020A01, // 0009 SETMBR R0 K5 R1
- 0x8C040106, // 000A GETMET R1 R0 K6
- 0x7C040200, // 000B CALL R1 1
- 0x4C040000, // 000C LDNIL R1
- 0x90020E01, // 000D SETMBR R0 K7 R1
- 0x4C040000, // 000E LDNIL R1
- 0x90021001, // 000F SETMBR R0 K8 R1
- 0x4C040000, // 0010 LDNIL R1
- 0x90021201, // 0011 SETMBR R0 K9 R1
- 0x4C040000, // 0012 LDNIL R1
- 0x90021401, // 0013 SETMBR R0 K10 R1
- 0x4C040000, // 0014 LDNIL R1
- 0x90021601, // 0015 SETMBR R0 K11 R1
- 0x4C040000, // 0016 LDNIL R1
- 0x90021801, // 0017 SETMBR R0 K12 R1
- 0x80000000, // 0018 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start
-********************************************************************/
-be_local_closure(Matter_Device_start, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(_trigger_read_sensors),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80000000, // 0003 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(started),
- /* K1 */ be_nested_str_weak(plugins),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(matter),
- /* K4 */ be_nested_str_weak(Plugin_Root),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(autoconf_device),
- /* K7 */ be_nested_str_weak(tasmota),
- /* K8 */ be_nested_str_weak(add_cron),
- /* K9 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
- /* K10 */ be_nested_str_weak(matter_sensors_30s),
- /* K11 */ be_nested_str_weak(_start_udp),
- /* K12 */ be_nested_str_weak(UDP_PORT),
- /* K13 */ be_nested_str_weak(start_mdns_announce_hostnames),
- }),
- be_str_weak(start),
- &be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x78060000, // 0001 JMPF R1 #0003
- 0x80000200, // 0002 RET 0
- 0x88040101, // 0003 GETMBR R1 R0 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x5C140000, // 0007 MOVE R5 R0
- 0x58180005, // 0008 LDCONST R6 K5
- 0x7C0C0600, // 0009 CALL R3 3
- 0x7C040400, // 000A CALL R1 2
- 0x8C040106, // 000B GETMET R1 R0 K6
- 0x7C040200, // 000C CALL R1 1
- 0xB8060E00, // 000D GETNGBL R1 K7
- 0x8C040308, // 000E GETMET R1 R1 K8
- 0x580C0009, // 000F LDCONST R3 K9
- 0x84100000, // 0010 CLOSURE R4 P0
- 0x5814000A, // 0011 LDCONST R5 K10
- 0x7C040800, // 0012 CALL R1 4
- 0x8C04010B, // 0013 GETMET R1 R0 K11
- 0x880C010C, // 0014 GETMBR R3 R0 K12
- 0x7C040400, // 0015 CALL R1 2
- 0x8C04010D, // 0016 GETMET R1 R0 K13
- 0x7C040200, // 0017 CALL R1 1
- 0x50040200, // 0018 LDBOOL R1 1 0
- 0x90020001, // 0019 SETMBR R0 K0 R1
- 0xA0000000, // 001A CLOSE R0
- 0x80000000, // 001B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_250ms
-********************************************************************/
-be_local_closure(Matter_Device_every_250ms, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(every_250ms),
- }),
- be_str_weak(every_250ms),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_root_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
- be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[23]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
- /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
- /* K7 */ be_const_int(0),
- /* K8 */ be_const_int(3),
- /* K9 */ be_const_int(2147483647),
- /* K10 */ be_const_int(2),
- /* K11 */ be_nested_str_weak(compute_qrcode_content),
- /* K12 */ be_nested_str_weak(publish_result),
- /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
- /* K14 */ be_nested_str_weak(Matter),
- /* K15 */ be_nested_str_weak(_compute_pbkdf),
- /* K16 */ be_nested_str_weak(root_passcode),
- /* K17 */ be_nested_str_weak(root_iterations),
- /* K18 */ be_nested_str_weak(root_salt),
- /* K19 */ be_nested_str_weak(start_basic_commissioning),
- /* K20 */ be_nested_str_weak(root_discriminator),
- /* K21 */ be_nested_str_weak(root_w0),
- /* K22 */ be_nested_str_weak(root_L),
- }),
- be_str_weak(start_root_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[49]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C0C0203, // 0002 EQ R3 R1 R3
- 0x780E0000, // 0003 JMPF R3 #0005
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x8C0C0102, // 0005 GETMET R3 R0 K2
- 0x7C0C0200, // 0006 CALL R3 1
- 0xB8120600, // 0007 GETNGBL R4 K3
- 0x8C100904, // 0008 GETMET R4 R4 K4
- 0x8C180505, // 0009 GETMET R6 R2 K5
- 0x58200006, // 000A LDCONST R8 K6
- 0x40260F08, // 000B CONNECT R9 K7 K8
- 0x94240609, // 000C GETIDX R9 R3 R9
- 0x542A0003, // 000D LDINT R10 4
- 0x542E0005, // 000E LDINT R11 6
- 0x4028140B, // 000F CONNECT R10 R10 R11
- 0x9428060A, // 0010 GETIDX R10 R3 R10
- 0x542E0006, // 0011 LDINT R11 7
- 0x402C1709, // 0012 CONNECT R11 R11 K9
- 0x942C060B, // 0013 GETIDX R11 R3 R11
- 0x7C180A00, // 0014 CALL R6 5
- 0x581C000A, // 0015 LDCONST R7 K10
- 0x7C100600, // 0016 CALL R4 3
- 0x8C10010B, // 0017 GETMET R4 R0 K11
- 0x7C100200, // 0018 CALL R4 1
- 0xB8160600, // 0019 GETNGBL R5 K3
- 0x8C140B0C, // 001A GETMET R5 R5 K12
- 0x8C1C0505, // 001B GETMET R7 R2 K5
- 0x5824000D, // 001C LDCONST R9 K13
- 0x5C280600, // 001D MOVE R10 R3
- 0x5C2C0800, // 001E MOVE R11 R4
- 0x7C1C0800, // 001F CALL R7 4
- 0x5820000E, // 0020 LDCONST R8 K14
- 0x7C140600, // 0021 CALL R5 3
- 0x8C14010F, // 0022 GETMET R5 R0 K15
- 0x881C0110, // 0023 GETMBR R7 R0 K16
- 0x88200111, // 0024 GETMBR R8 R0 K17
- 0x88240112, // 0025 GETMBR R9 R0 K18
- 0x7C140800, // 0026 CALL R5 4
- 0x8C140113, // 0027 GETMET R5 R0 K19
- 0x5C1C0200, // 0028 MOVE R7 R1
- 0x88200111, // 0029 GETMBR R8 R0 K17
- 0x88240114, // 002A GETMBR R9 R0 K20
- 0x88280112, // 002B GETMBR R10 R0 K18
- 0x882C0115, // 002C GETMBR R11 R0 K21
- 0x88300116, // 002D GETMBR R12 R0 K22
- 0x4C340000, // 002E LDNIL R13
- 0x7C141000, // 002F CALL R5 8
- 0x80000000, // 0030 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: k2l
-********************************************************************/
-be_local_closure(Matter_Device_k2l, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 4, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_const_int(1),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(k2l),
- &be_const_str_solidified,
- ( &(const binstruction[50]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 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
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 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
- 0x8C140502, // 000E GETMET R5 R2 K2
- 0x5C1C0800, // 000F MOVE R7 R4
- 0x7C140400, // 0010 CALL R5 2
- 0x7001FFF9, // 0011 JMP #000C
- 0x580C0003, // 0012 LDCONST R3 K3
- 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
- 0x04100904, // 0019 SUB R4 R4 K4
- 0x40120804, // 001A CONNECT R4 K4 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
- 0x241C0D05, // 0021 GT R7 R6 K5
- 0x781E0008, // 0022 JMPF R7 #002C
- 0x041C0D04, // 0023 SUB R7 R6 K4
- 0x941C0407, // 0024 GETIDX R7 R2 R7
- 0x241C0E05, // 0025 GT R7 R7 R5
- 0x781E0004, // 0026 JMPF R7 #002C
- 0x041C0D04, // 0027 SUB R7 R6 K4
- 0x941C0407, // 0028 GETIDX R7 R2 R7
- 0x98080C07, // 0029 SETIDX R2 R6 R7
- 0x04180D04, // 002A SUB R6 R6 K4
- 0x7001FFF4, // 002B JMP #0021
- 0x98080C05, // 002C SETIDX R2 R6 R5
- 0x7001FFEE, // 002D JMP #001D
- 0x580C0003, // 002E LDCONST R3 K3
- 0xAC0C0200, // 002F CATCH R3 1 0
- 0xB0080000, // 0030 RAISE 2 R0 R0
- 0x80040400, // 0031 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: attribute_updated
-********************************************************************/
-be_local_closure(Matter_Device_attribute_updated, /* name */
- be_nested_proto(
- 10, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(Path),
- /* K2 */ be_nested_str_weak(endpoint),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(message_handler),
- /* K6 */ be_nested_str_weak(im),
- /* K7 */ be_nested_str_weak(subs_shop),
- /* K8 */ be_nested_str_weak(attribute_updated_ctx),
- }),
- 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
- 0xB8160000, // 0004 GETNGBL R5 K0
- 0x8C140B01, // 0005 GETMET R5 R5 K1
- 0x7C140200, // 0006 CALL R5 1
- 0x90160401, // 0007 SETMBR R5 K2 R1
- 0x90160602, // 0008 SETMBR R5 K3 R2
- 0x90160803, // 0009 SETMBR R5 K4 R3
- 0x88180105, // 000A GETMBR R6 R0 K5
- 0x88180D06, // 000B GETMBR R6 R6 K6
- 0x88180D07, // 000C GETMBR R6 R6 K7
- 0x8C180D08, // 000D GETMET R6 R6 K8
- 0x5C200A00, // 000E MOVE R8 R5
- 0x5C240800, // 000F MOVE R9 R4
- 0x7C180600, // 0010 CALL R6 3
- 0x80000000, // 0011 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _compute_pbkdf
-********************************************************************/
-be_local_closure(Matter_Device__compute_pbkdf, /* name */
- be_nested_proto(
- 14, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(add),
- /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
- /* K4 */ be_nested_str_weak(derive),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(root_w0),
- /* K7 */ be_nested_str_weak(EC_P256),
- /* K8 */ be_nested_str_weak(mod),
- /* K9 */ be_nested_str_weak(root_L),
- /* K10 */ be_nested_str_weak(public_key),
- }),
- be_str_weak(_compute_pbkdf),
- &be_const_str_solidified,
- ( &(const binstruction[41]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xA4160200, // 0001 IMPORT R5 K1
- 0x60180015, // 0002 GETGBL R6 G21
- 0x7C180000, // 0003 CALL R6 0
- 0x8C180D02, // 0004 GETMET R6 R6 K2
- 0x5C200200, // 0005 MOVE R8 R1
- 0x54260003, // 0006 LDINT R9 4
- 0x7C180600, // 0007 CALL R6 3
- 0x8C1C0903, // 0008 GETMET R7 R4 K3
- 0x7C1C0200, // 0009 CALL R7 1
- 0x8C1C0F04, // 000A GETMET R7 R7 K4
- 0x5C240C00, // 000B MOVE R9 R6
- 0x5C280600, // 000C MOVE R10 R3
- 0x5C2C0400, // 000D MOVE R11 R2
- 0x5432004F, // 000E LDINT R12 80
- 0x7C1C0A00, // 000F CALL R7 5
- 0x54220026, // 0010 LDINT R8 39
- 0x40220A08, // 0011 CONNECT R8 K5 R8
- 0x94200E08, // 0012 GETIDX R8 R7 R8
- 0x54260027, // 0013 LDINT R9 40
- 0x542A004E, // 0014 LDINT R10 79
- 0x4024120A, // 0015 CONNECT R9 R9 R10
- 0x94240E09, // 0016 GETIDX R9 R7 R9
- 0x8C280907, // 0017 GETMET R10 R4 K7
- 0x7C280200, // 0018 CALL R10 1
- 0x8C281508, // 0019 GETMET R10 R10 K8
- 0x5C301000, // 001A MOVE R12 R8
- 0x7C280400, // 001B CALL R10 2
- 0x90020C0A, // 001C SETMBR R0 K6 R10
- 0x8C280907, // 001D GETMET R10 R4 K7
- 0x7C280200, // 001E CALL R10 1
- 0x8C281508, // 001F GETMET R10 R10 K8
- 0x5C301200, // 0020 MOVE R12 R9
- 0x7C280400, // 0021 CALL R10 2
- 0x8C2C0907, // 0022 GETMET R11 R4 K7
- 0x7C2C0200, // 0023 CALL R11 1
- 0x8C2C170A, // 0024 GETMET R11 R11 K10
- 0x5C341400, // 0025 MOVE R13 R10
- 0x7C2C0400, // 0026 CALL R11 2
- 0x9002120B, // 0027 SETMBR R0 K9 R11
- 0x80000000, // 0028 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Device_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* 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 */
- ( &(const bvalue[35]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(UI),
- /* K7 */ be_nested_str_weak(started),
- /* K8 */ be_nested_str_weak(plugins),
- /* K9 */ be_nested_str_weak(vendorid),
- /* K10 */ be_nested_str_weak(VENDOR_ID),
- /* K11 */ be_nested_str_weak(productid),
- /* K12 */ be_nested_str_weak(PRODUCT_ID),
- /* K13 */ be_nested_str_weak(root_iterations),
- /* K14 */ be_nested_str_weak(PBKDF_ITERATIONS),
- /* K15 */ be_nested_str_weak(root_salt),
- /* K16 */ be_nested_str_weak(random),
- /* K17 */ be_nested_str_weak(ipv4only),
- /* K18 */ be_nested_str_weak(load_param),
- /* K19 */ be_nested_str_weak(sessions),
- /* K20 */ be_nested_str_weak(Session_Store),
- /* K21 */ be_nested_str_weak(load_fabrics),
- /* K22 */ be_nested_str_weak(message_handler),
- /* K23 */ be_nested_str_weak(MessageHandler),
- /* K24 */ be_nested_str_weak(ui),
- /* K25 */ be_nested_str_weak(wifi),
- /* K26 */ be_nested_str_weak(up),
- /* K27 */ be_nested_str_weak(eth),
- /* K28 */ be_nested_str_weak(start),
- /* K29 */ be_nested_str_weak(add_rule),
- /* K30 */ be_nested_str_weak(Wifi_X23Connected),
- /* K31 */ be_nested_str_weak(matter_start),
- /* K32 */ be_nested_str_weak(Eth_X23Connected),
- /* K33 */ be_nested_str_weak(_init_basic_commissioning),
- /* K34 */ be_nested_str_weak(add_driver),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[91]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xB80E0400, // 0002 GETNGBL R3 K2
- 0x8C0C0703, // 0003 GETMET R3 R3 K3
- 0xB8160800, // 0004 GETNGBL R5 K4
- 0x88140B05, // 0005 GETMBR R5 R5 K5
- 0x7C0C0400, // 0006 CALL R3 2
- 0x740E0004, // 0007 JMPT R3 #000D
- 0xB80E0800, // 0008 GETNGBL R3 K4
- 0x8C0C0706, // 0009 GETMET R3 R3 K6
- 0x5C140000, // 000A MOVE R5 R0
- 0x7C0C0400, // 000B CALL R3 2
- 0x80000600, // 000C RET 0
- 0x500C0000, // 000D LDBOOL R3 0 0
- 0x90020E03, // 000E SETMBR R0 K7 R3
- 0x600C0012, // 000F GETGBL R3 G18
- 0x7C0C0000, // 0010 CALL R3 0
- 0x90021003, // 0011 SETMBR R0 K8 R3
- 0x880C010A, // 0012 GETMBR R3 R0 K10
- 0x90021203, // 0013 SETMBR R0 K9 R3
- 0x880C010C, // 0014 GETMBR R3 R0 K12
- 0x90021603, // 0015 SETMBR R0 K11 R3
- 0x880C010E, // 0016 GETMBR R3 R0 K14
- 0x90021A03, // 0017 SETMBR R0 K13 R3
- 0x8C0C0310, // 0018 GETMET R3 R1 K16
- 0x5416000F, // 0019 LDINT R5 16
- 0x7C0C0400, // 001A CALL R3 2
- 0x90021E03, // 001B SETMBR R0 K15 R3
- 0x500C0000, // 001C LDBOOL R3 0 0
- 0x90022203, // 001D SETMBR R0 K17 R3
- 0x8C0C0112, // 001E GETMET R3 R0 K18
- 0x7C0C0200, // 001F CALL R3 1
- 0xB80E0800, // 0020 GETNGBL R3 K4
- 0x8C0C0714, // 0021 GETMET R3 R3 K20
- 0x7C0C0200, // 0022 CALL R3 1
- 0x90022603, // 0023 SETMBR R0 K19 R3
- 0x880C0113, // 0024 GETMBR R3 R0 K19
- 0x8C0C0715, // 0025 GETMET R3 R3 K21
- 0x7C0C0200, // 0026 CALL R3 1
- 0xB80E0800, // 0027 GETNGBL R3 K4
- 0x8C0C0717, // 0028 GETMET R3 R3 K23
- 0x5C140000, // 0029 MOVE R5 R0
- 0x7C0C0400, // 002A CALL R3 2
- 0x90022C03, // 002B SETMBR R0 K22 R3
- 0xB80E0800, // 002C GETNGBL R3 K4
- 0x8C0C0706, // 002D GETMET R3 R3 K6
- 0x5C140000, // 002E MOVE R5 R0
- 0x7C0C0400, // 002F CALL R3 2
- 0x90023003, // 0030 SETMBR R0 K24 R3
- 0xB80E0400, // 0031 GETNGBL R3 K2
- 0x8C0C0719, // 0032 GETMET R3 R3 K25
- 0x7C0C0200, // 0033 CALL R3 1
- 0x940C071A, // 0034 GETIDX R3 R3 K26
- 0x740E0004, // 0035 JMPT R3 #003B
- 0xB80E0400, // 0036 GETNGBL R3 K2
- 0x8C0C071B, // 0037 GETMET R3 R3 K27
- 0x7C0C0200, // 0038 CALL R3 1
- 0x940C071A, // 0039 GETIDX R3 R3 K26
- 0x780E0001, // 003A JMPF R3 #003D
- 0x8C0C011C, // 003B GETMET R3 R0 K28
- 0x7C0C0200, // 003C CALL R3 1
- 0xB80E0400, // 003D GETNGBL R3 K2
- 0x8C0C0719, // 003E GETMET R3 R3 K25
- 0x7C0C0200, // 003F CALL R3 1
- 0x940C071A, // 0040 GETIDX R3 R3 K26
- 0x740E0005, // 0041 JMPT R3 #0048
- 0xB80E0400, // 0042 GETNGBL R3 K2
- 0x8C0C071D, // 0043 GETMET R3 R3 K29
- 0x5814001E, // 0044 LDCONST R5 K30
- 0x84180000, // 0045 CLOSURE R6 P0
- 0x581C001F, // 0046 LDCONST R7 K31
- 0x7C0C0800, // 0047 CALL R3 4
- 0xB80E0400, // 0048 GETNGBL R3 K2
- 0x8C0C071B, // 0049 GETMET R3 R3 K27
- 0x7C0C0200, // 004A CALL R3 1
- 0x940C071A, // 004B GETIDX R3 R3 K26
- 0x740E0005, // 004C JMPT R3 #0053
- 0xB80E0400, // 004D GETNGBL R3 K2
- 0x8C0C071D, // 004E GETMET R3 R3 K29
- 0x58140020, // 004F LDCONST R5 K32
- 0x84180001, // 0050 CLOSURE R6 P1
- 0x581C001F, // 0051 LDCONST R7 K31
- 0x7C0C0800, // 0052 CALL R3 4
- 0x8C0C0121, // 0053 GETMET R3 R0 K33
- 0x7C0C0200, // 0054 CALL R3 1
- 0xB80E0400, // 0055 GETNGBL R3 K2
- 0x8C0C0722, // 0056 GETMET R3 R3 K34
- 0x5C140000, // 0057 MOVE R5 R0
- 0x7C0C0400, // 0058 CALL R3 2
- 0xA0000000, // 0059 CLOSE R0
- 0x80000000, // 005A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _start_udp
-********************************************************************/
-be_local_closure(Matter_Device__start_udp, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* 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 */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(log),
- /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
- /* K4 */ be_const_int(2),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(UDPServer),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_nested_str_weak(start),
- }),
- 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
- 0xB80A0200, // 0007 GETNGBL R2 K1
- 0x8C080502, // 0008 GETMET R2 R2 K2
- 0x60100008, // 0009 GETGBL R4 G8
- 0x5C140200, // 000A MOVE R5 R1
- 0x7C100200, // 000B CALL R4 1
- 0x00120604, // 000C ADD R4 K3 R4
- 0x58140004, // 000D LDCONST R5 K4
- 0x7C080600, // 000E CALL R2 3
- 0xB80A0A00, // 000F GETNGBL R2 K5
- 0x8C080506, // 0010 GETMET R2 R2 K6
- 0x58100007, // 0011 LDCONST R4 K7
- 0x5C140200, // 0012 MOVE R5 R1
- 0x7C080600, // 0013 CALL R2 3
- 0x90020002, // 0014 SETMBR R0 K0 R2
- 0x88080100, // 0015 GETMBR R2 R0 K0
- 0x8C080508, // 0016 GETMET R2 R2 K8
- 0x84100000, // 0017 CLOSURE R4 P0
- 0x7C080400, // 0018 CALL R2 2
- 0xA0000000, // 0019 CLOSE R0
- 0x80000000, // 001A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: compute_qrcode_content
-********************************************************************/
-be_local_closure(Matter_Device_compute_qrcode_content, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(resize),
- /* K1 */ be_nested_str_weak(setbits),
- /* K2 */ be_const_int(3),
- /* K3 */ be_nested_str_weak(vendorid),
- /* K4 */ be_nested_str_weak(productid),
- /* K5 */ be_nested_str_weak(root_discriminator),
- /* K6 */ be_nested_str_weak(root_passcode),
- /* K7 */ be_const_int(134217727),
- /* K8 */ be_nested_str_weak(MT_X3A),
- /* K9 */ be_nested_str_weak(matter),
- /* K10 */ be_nested_str_weak(Base38),
- /* K11 */ be_nested_str_weak(encode),
- }),
- be_str_weak(compute_qrcode_content),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0x60040015, // 0000 GETGBL R1 G21
- 0x7C040000, // 0001 CALL R1 0
- 0x8C040300, // 0002 GETMET R1 R1 K0
- 0x540E000A, // 0003 LDINT R3 11
- 0x7C040400, // 0004 CALL R1 2
- 0x8C080301, // 0005 GETMET R2 R1 K1
- 0x58100002, // 0006 LDCONST R4 K2
- 0x5416000F, // 0007 LDINT R5 16
- 0x88180103, // 0008 GETMBR R6 R0 K3
- 0x7C080800, // 0009 CALL R2 4
- 0x8C080301, // 000A GETMET R2 R1 K1
- 0x54120012, // 000B LDINT R4 19
- 0x5416000F, // 000C LDINT R5 16
- 0x88180104, // 000D GETMBR R6 R0 K4
- 0x7C080800, // 000E CALL R2 4
- 0x8C080301, // 000F GETMET R2 R1 K1
- 0x54120024, // 0010 LDINT R4 37
- 0x54160007, // 0011 LDINT R5 8
- 0x541A0003, // 0012 LDINT R6 4
- 0x7C080800, // 0013 CALL R2 4
- 0x8C080301, // 0014 GETMET R2 R1 K1
- 0x5412002C, // 0015 LDINT R4 45
- 0x5416000B, // 0016 LDINT R5 12
- 0x88180105, // 0017 GETMBR R6 R0 K5
- 0x541E0FFE, // 0018 LDINT R7 4095
- 0x2C180C07, // 0019 AND R6 R6 R7
- 0x7C080800, // 001A CALL R2 4
- 0x8C080301, // 001B GETMET R2 R1 K1
- 0x54120038, // 001C LDINT R4 57
- 0x5416001A, // 001D LDINT R5 27
- 0x88180106, // 001E GETMBR R6 R0 K6
- 0x2C180D07, // 001F AND R6 R6 K7
- 0x7C080800, // 0020 CALL R2 4
- 0xB80A1200, // 0021 GETNGBL R2 K9
- 0x8808050A, // 0022 GETMBR R2 R2 K10
- 0x8C08050B, // 0023 GETMET R2 R2 K11
- 0x5C100200, // 0024 MOVE R4 R1
- 0x7C080400, // 0025 CALL R2 2
- 0x000A1002, // 0026 ADD R2 K8 R2
- 0x80040400, // 0027 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop
-********************************************************************/
-be_local_closure(Matter_Device_stop, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(remove_driver),
- /* K2 */ be_nested_str_weak(udp_server),
- /* K3 */ be_nested_str_weak(stop),
- }),
- be_str_weak(stop),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C040400, // 0003 CALL R1 2
- 0x88040102, // 0004 GETMBR R1 R0 K2
- 0x78060002, // 0005 JMPF R1 #0009
- 0x88040102, // 0006 GETMBR R1 R0 K2
- 0x8C040303, // 0007 GETMET R1 R1 K3
- 0x7C040200, // 0008 CALL R1 1
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_basic_commissioning, /* name */
- be_nested_proto(
- 13, /* nstack */
- 8, /* argc */
- 2, /* 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Wifi_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Eth_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 0x7C000600, // 0007 CALL R0 3
- 0x80000000, // 0008 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[16]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(millis),
- /* K3 */ be_nested_str_weak(commissioning_iterations),
- /* K4 */ be_nested_str_weak(commissioning_discriminator),
- /* K5 */ be_nested_str_weak(commissioning_salt),
- /* K6 */ be_nested_str_weak(commissioning_w0),
- /* K7 */ be_nested_str_weak(commissioning_L),
- /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
- /* K9 */ be_nested_str_weak(wifi),
- /* K10 */ be_nested_str_weak(up),
- /* K11 */ be_nested_str_weak(eth),
- /* K12 */ be_nested_str_weak(mdns_announce_PASE),
- /* K13 */ be_nested_str_weak(add_rule),
- /* K14 */ be_nested_str_weak(Wifi_X23Connected),
- /* K15 */ be_nested_str_weak(Eth_X23Connected),
- }),
- be_str_weak(start_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0xB8220200, // 0000 GETNGBL R8 K1
- 0x8C201102, // 0001 GETMET R8 R8 K2
- 0x7C200200, // 0002 CALL R8 1
- 0x542603E7, // 0003 LDINT R9 1000
- 0x08240209, // 0004 MUL R9 R1 R9
- 0x00201009, // 0005 ADD R8 R8 R9
- 0x90020008, // 0006 SETMBR R0 K0 R8
- 0x90020602, // 0007 SETMBR R0 K3 R2
- 0x90020803, // 0008 SETMBR R0 K4 R3
- 0x90020A04, // 0009 SETMBR R0 K5 R4
- 0x90020C05, // 000A SETMBR R0 K6 R5
- 0x90020E06, // 000B SETMBR R0 K7 R6
- 0x90021007, // 000C SETMBR R0 K8 R7
- 0xB8220200, // 000D GETNGBL R8 K1
- 0x8C201109, // 000E GETMET R8 R8 K9
- 0x7C200200, // 000F CALL R8 1
- 0x9420110A, // 0010 GETIDX R8 R8 K10
- 0x74220004, // 0011 JMPT R8 #0017
- 0xB8220200, // 0012 GETNGBL R8 K1
- 0x8C20110B, // 0013 GETMET R8 R8 K11
- 0x7C200200, // 0014 CALL R8 1
- 0x9420110A, // 0015 GETIDX R8 R8 K10
- 0x78220002, // 0016 JMPF R8 #001A
- 0x8C20010C, // 0017 GETMET R8 R0 K12
- 0x7C200200, // 0018 CALL R8 1
- 0x7002000B, // 0019 JMP #0026
- 0xB8220200, // 001A GETNGBL R8 K1
- 0x8C20110D, // 001B GETMET R8 R8 K13
- 0x5828000E, // 001C LDCONST R10 K14
- 0x842C0000, // 001D CLOSURE R11 P0
- 0x5830000C, // 001E LDCONST R12 K12
- 0x7C200800, // 001F CALL R8 4
- 0xB8220200, // 0020 GETNGBL R8 K1
- 0x8C20110D, // 0021 GETMET R8 R8 K13
- 0x5828000F, // 0022 LDCONST R10 K15
- 0x842C0001, // 0023 CLOSURE R11 P1
- 0x5830000C, // 0024 LDCONST R12 K12
- 0x7C200800, // 0025 CALL R8 4
- 0xA0000000, // 0026 CLOSE R0
- 0x80000000, // 0027 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_fabric
-********************************************************************/
-be_local_closure(Matter_Device_remove_fabric, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(find_children_fabrics),
- /* K2 */ be_nested_str_weak(get_fabric_index),
- /* K3 */ be_nested_str_weak(find_fabric_by_index),
- /* K4 */ be_nested_str_weak(message_handler),
- /* K5 */ be_nested_str_weak(im),
- /* K6 */ be_nested_str_weak(subs_shop),
- /* K7 */ be_nested_str_weak(remove_by_fabric),
- /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K9 */ be_nested_str_weak(remove_fabric),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(save_fabrics),
- }),
- be_str_weak(remove_fabric),
- &be_const_str_solidified,
- ( &(const binstruction[43]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x8C100302, // 0002 GETMET R4 R1 K2
- 0x7C100200, // 0003 CALL R4 1
- 0x7C080400, // 0004 CALL R2 2
- 0x4C0C0000, // 0005 LDNIL R3
- 0x1C0C0403, // 0006 EQ R3 R2 R3
- 0x780E0000, // 0007 JMPF R3 #0009
- 0x80000600, // 0008 RET 0
- 0x600C0010, // 0009 GETGBL R3 G16
- 0x5C100400, // 000A MOVE R4 R2
- 0x7C0C0200, // 000B CALL R3 1
- 0xA8020016, // 000C EXBLK 0 #0024
- 0x5C100600, // 000D MOVE R4 R3
- 0x7C100000, // 000E CALL R4 0
- 0x88140100, // 000F GETMBR R5 R0 K0
- 0x8C140B03, // 0010 GETMET R5 R5 K3
- 0x5C1C0800, // 0011 MOVE R7 R4
- 0x7C140400, // 0012 CALL R5 2
- 0x4C180000, // 0013 LDNIL R6
- 0x20180A06, // 0014 NE R6 R5 R6
- 0x781A000C, // 0015 JMPF R6 #0023
- 0x88180104, // 0016 GETMBR R6 R0 K4
- 0x88180D05, // 0017 GETMBR R6 R6 K5
- 0x88180D06, // 0018 GETMBR R6 R6 K6
- 0x8C180D07, // 0019 GETMET R6 R6 K7
- 0x5C200A00, // 001A MOVE R8 R5
- 0x7C180400, // 001B CALL R6 2
- 0x8C180108, // 001C GETMET R6 R0 K8
- 0x5C200A00, // 001D MOVE R8 R5
- 0x7C180400, // 001E CALL R6 2
- 0x88180100, // 001F GETMBR R6 R0 K0
- 0x8C180D09, // 0020 GETMET R6 R6 K9
- 0x5C200A00, // 0021 MOVE R8 R5
- 0x7C180400, // 0022 CALL R6 2
- 0x7001FFE8, // 0023 JMP #000D
- 0x580C000A, // 0024 LDCONST R3 K10
- 0xAC0C0200, // 0025 CATCH R3 1 0
- 0xB0080000, // 0026 RAISE 2 R0 R0
- 0x880C0100, // 0027 GETMBR R3 R0 K0
- 0x8C0C070B, // 0028 GETMET R3 R3 K11
- 0x7C0C0200, // 0029 CALL R3 1
- 0x80000000, // 002A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Device_invoke_request, /* name */
- be_nested_proto(
- 12, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(plugins),
- /* K3 */ be_nested_str_weak(invoke_request),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(status),
- /* K6 */ be_nested_str_weak(matter),
- /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[24]) { /* code */
- 0x58100000, // 0000 LDCONST R4 K0
- 0x88140701, // 0001 GETMBR R5 R3 K1
- 0x6018000C, // 0002 GETGBL R6 G12
- 0x881C0102, // 0003 GETMBR R7 R0 K2
- 0x7C180200, // 0004 CALL R6 1
- 0x14180806, // 0005 LT R6 R4 R6
- 0x781A000C, // 0006 JMPF R6 #0014
- 0x88180102, // 0007 GETMBR R6 R0 K2
- 0x94180C04, // 0008 GETIDX R6 R6 R4
- 0x881C0D01, // 0009 GETMBR R7 R6 K1
- 0x1C1C0E05, // 000A EQ R7 R7 R5
- 0x781E0005, // 000B JMPF R7 #0012
- 0x8C1C0D03, // 000C GETMET R7 R6 K3
- 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
- 0x00100904, // 0012 ADD R4 R4 K4
- 0x7001FFED, // 0013 JMP #0002
- 0xB81A0C00, // 0014 GETNGBL R6 K6
- 0x88180D07, // 0015 GETMBR R6 R6 K7
- 0x900E0A06, // 0016 SETMBR R3 K5 R6
- 0x80000000, // 0017 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: save_before_restart
-********************************************************************/
-be_local_closure(Matter_Device_save_before_restart, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(stop_basic_commissioning),
- /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
- }),
- be_str_weak(save_before_restart),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x8C040101, // 0002 GETMET R1 R0 K1
- 0x7C040200, // 0003 CALL R1 1
- 0x80000000, // 0004 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _mdns_announce_hostname
-********************************************************************/
-be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
- be_nested_proto(
- 16, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(start),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(eth),
- /* K5 */ be_nested_str_weak(hostname_eth),
- /* K6 */ be_nested_str_weak(replace),
- /* K7 */ be_nested_str_weak(find),
- /* K8 */ be_nested_str_weak(mac),
- /* K9 */ be_nested_str_weak(_X3A),
- /* K10 */ be_nested_str_weak(),
- /* K11 */ be_nested_str_weak(ipv4only),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K15 */ be_nested_str_weak(ip6local),
- /* K16 */ be_nested_str_weak(ip),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(add_hostname),
- /* K19 */ be_nested_str_weak(ip6),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
- /* K21 */ be_nested_str_weak(wifi),
- /* K22 */ be_nested_str_weak(hostname_wifi),
- /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
- /* K24 */ be_const_int(2),
- /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K26 */ be_nested_str_weak(_X7C),
- /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
- }),
- be_str_weak(_mdns_announce_hostname),
- &be_const_str_solidified,
- ( &(const binstruction[172]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100502, // 0002 GETMET R4 R2 K2
- 0x7C100200, // 0003 CALL R4 1
- 0xA8020092, // 0004 EXBLK 0 #0098
- 0x78060040, // 0005 JMPF R1 #0047
- 0xB8120600, // 0006 GETNGBL R4 K3
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140706, // 0009 GETMET R5 R3 K6
- 0x8C1C0907, // 000A GETMET R7 R4 K7
- 0x58240008, // 000B LDCONST R9 K8
- 0x7C1C0400, // 000C CALL R7 2
- 0x58200009, // 000D LDCONST R8 K9
- 0x5824000A, // 000E LDCONST R9 K10
- 0x7C140800, // 000F CALL R5 4
- 0x90020A05, // 0010 SETMBR R0 K5 R5
- 0x8814010B, // 0011 GETMBR R5 R0 K11
- 0x7416001F, // 0012 JMPT R5 #0033
- 0xB8160600, // 0013 GETNGBL R5 K3
- 0x8C140B0C, // 0014 GETMET R5 R5 K12
- 0x8C1C070D, // 0015 GETMET R7 R3 K13
- 0x5824000E, // 0016 LDCONST R9 K14
- 0x88280105, // 0017 GETMBR R10 R0 K5
- 0x8C2C0907, // 0018 GETMET R11 R4 K7
- 0x5834000F, // 0019 LDCONST R13 K15
- 0x5838000A, // 001A LDCONST R14 K10
- 0x7C2C0600, // 001B CALL R11 3
- 0x8C300907, // 001C GETMET R12 R4 K7
- 0x58380010, // 001D LDCONST R14 K16
- 0x583C000A, // 001E LDCONST R15 K10
- 0x7C300600, // 001F CALL R12 3
- 0x7C1C0A00, // 0020 CALL R7 5
- 0x58200011, // 0021 LDCONST R8 K17
- 0x7C140600, // 0022 CALL R5 3
- 0x8C140512, // 0023 GETMET R5 R2 K18
- 0x881C0105, // 0024 GETMBR R7 R0 K5
- 0x8C200907, // 0025 GETMET R8 R4 K7
- 0x5828000F, // 0026 LDCONST R10 K15
- 0x582C000A, // 0027 LDCONST R11 K10
- 0x7C200600, // 0028 CALL R8 3
- 0x8C240907, // 0029 GETMET R9 R4 K7
- 0x582C0010, // 002A LDCONST R11 K16
- 0x5830000A, // 002B LDCONST R12 K10
- 0x7C240600, // 002C CALL R9 3
- 0x8C280907, // 002D GETMET R10 R4 K7
- 0x58300013, // 002E LDCONST R12 K19
- 0x5834000A, // 002F LDCONST R13 K10
- 0x7C280600, // 0030 CALL R10 3
- 0x7C140A00, // 0031 CALL R5 5
- 0x70020012, // 0032 JMP #0046
- 0xB8160600, // 0033 GETNGBL R5 K3
- 0x8C140B0C, // 0034 GETMET R5 R5 K12
- 0x8C1C070D, // 0035 GETMET R7 R3 K13
- 0x58240014, // 0036 LDCONST R9 K20
- 0x88280105, // 0037 GETMBR R10 R0 K5
- 0x8C2C0907, // 0038 GETMET R11 R4 K7
- 0x58340010, // 0039 LDCONST R13 K16
- 0x5838000A, // 003A LDCONST R14 K10
- 0x7C2C0600, // 003B CALL R11 3
- 0x7C1C0800, // 003C CALL R7 4
- 0x58200011, // 003D LDCONST R8 K17
- 0x7C140600, // 003E CALL R5 3
- 0x8C140512, // 003F GETMET R5 R2 K18
- 0x881C0105, // 0040 GETMBR R7 R0 K5
- 0x8C200907, // 0041 GETMET R8 R4 K7
- 0x58280010, // 0042 LDCONST R10 K16
- 0x582C000A, // 0043 LDCONST R11 K10
- 0x7C200600, // 0044 CALL R8 3
- 0x7C140600, // 0045 CALL R5 3
- 0x7002003F, // 0046 JMP #0087
- 0xB8120600, // 0047 GETNGBL R4 K3
- 0x8C100915, // 0048 GETMET R4 R4 K21
- 0x7C100200, // 0049 CALL R4 1
- 0x8C140706, // 004A GETMET R5 R3 K6
- 0x8C1C0907, // 004B GETMET R7 R4 K7
- 0x58240008, // 004C LDCONST R9 K8
- 0x7C1C0400, // 004D CALL R7 2
- 0x58200009, // 004E LDCONST R8 K9
- 0x5824000A, // 004F LDCONST R9 K10
- 0x7C140800, // 0050 CALL R5 4
- 0x90022C05, // 0051 SETMBR R0 K22 R5
- 0x8814010B, // 0052 GETMBR R5 R0 K11
- 0x7416001F, // 0053 JMPT R5 #0074
- 0xB8160600, // 0054 GETNGBL R5 K3
- 0x8C140B0C, // 0055 GETMET R5 R5 K12
- 0x8C1C070D, // 0056 GETMET R7 R3 K13
- 0x5824000E, // 0057 LDCONST R9 K14
- 0x88280116, // 0058 GETMBR R10 R0 K22
- 0x8C2C0907, // 0059 GETMET R11 R4 K7
- 0x5834000F, // 005A LDCONST R13 K15
- 0x5838000A, // 005B LDCONST R14 K10
- 0x7C2C0600, // 005C CALL R11 3
- 0x8C300907, // 005D GETMET R12 R4 K7
- 0x58380010, // 005E LDCONST R14 K16
- 0x583C000A, // 005F LDCONST R15 K10
- 0x7C300600, // 0060 CALL R12 3
- 0x7C1C0A00, // 0061 CALL R7 5
- 0x58200011, // 0062 LDCONST R8 K17
- 0x7C140600, // 0063 CALL R5 3
- 0x8C140512, // 0064 GETMET R5 R2 K18
- 0x881C0116, // 0065 GETMBR R7 R0 K22
- 0x8C200907, // 0066 GETMET R8 R4 K7
- 0x5828000F, // 0067 LDCONST R10 K15
- 0x582C000A, // 0068 LDCONST R11 K10
- 0x7C200600, // 0069 CALL R8 3
- 0x8C240907, // 006A GETMET R9 R4 K7
- 0x582C0010, // 006B LDCONST R11 K16
- 0x5830000A, // 006C LDCONST R12 K10
- 0x7C240600, // 006D CALL R9 3
- 0x8C280907, // 006E GETMET R10 R4 K7
- 0x58300013, // 006F LDCONST R12 K19
- 0x5834000A, // 0070 LDCONST R13 K10
- 0x7C280600, // 0071 CALL R10 3
- 0x7C140A00, // 0072 CALL R5 5
- 0x70020012, // 0073 JMP #0087
- 0xB8160600, // 0074 GETNGBL R5 K3
- 0x8C140B0C, // 0075 GETMET R5 R5 K12
- 0x8C1C070D, // 0076 GETMET R7 R3 K13
- 0x58240014, // 0077 LDCONST R9 K20
- 0x88280105, // 0078 GETMBR R10 R0 K5
- 0x8C2C0907, // 0079 GETMET R11 R4 K7
- 0x58340010, // 007A LDCONST R13 K16
- 0x5838000A, // 007B LDCONST R14 K10
- 0x7C2C0600, // 007C CALL R11 3
- 0x7C1C0800, // 007D CALL R7 4
- 0x58200011, // 007E LDCONST R8 K17
- 0x7C140600, // 007F CALL R5 3
- 0x8C140512, // 0080 GETMET R5 R2 K18
- 0x881C0116, // 0081 GETMBR R7 R0 K22
- 0x8C200907, // 0082 GETMET R8 R4 K7
- 0x58280010, // 0083 LDCONST R10 K16
- 0x582C000A, // 0084 LDCONST R11 K10
- 0x7C200600, // 0085 CALL R8 3
- 0x7C140600, // 0086 CALL R5 3
- 0xB8120600, // 0087 GETNGBL R4 K3
- 0x8C10090C, // 0088 GETMET R4 R4 K12
- 0x8C18070D, // 0089 GETMET R6 R3 K13
- 0x58200017, // 008A LDCONST R8 K23
- 0x78060001, // 008B JMPF R1 #008E
- 0x58240004, // 008C LDCONST R9 K4
- 0x70020000, // 008D JMP #008F
- 0x58240015, // 008E LDCONST R9 K21
- 0x78060001, // 008F JMPF R1 #0092
- 0x88280105, // 0090 GETMBR R10 R0 K5
- 0x70020000, // 0091 JMP #0093
- 0x88280116, // 0092 GETMBR R10 R0 K22
- 0x7C180800, // 0093 CALL R6 4
- 0x581C0018, // 0094 LDCONST R7 K24
- 0x7C100600, // 0095 CALL R4 3
- 0xA8040001, // 0096 EXBLK 1 1
- 0x70020010, // 0097 JMP #00A9
- 0xAC100002, // 0098 CATCH R4 0 2
- 0x7002000D, // 0099 JMP #00A8
- 0xB81A0600, // 009A GETNGBL R6 K3
- 0x8C180D0C, // 009B GETMET R6 R6 K12
- 0x60200008, // 009C GETGBL R8 G8
- 0x5C240800, // 009D MOVE R9 R4
- 0x7C200200, // 009E CALL R8 1
- 0x00223208, // 009F ADD R8 K25 R8
- 0x0020111A, // 00A0 ADD R8 R8 K26
- 0x60240008, // 00A1 GETGBL R9 G8
- 0x5C280A00, // 00A2 MOVE R10 R5
- 0x7C240200, // 00A3 CALL R9 1
- 0x00201009, // 00A4 ADD R8 R8 R9
- 0x58240018, // 00A5 LDCONST R9 K24
- 0x7C180600, // 00A6 CALL R6 3
- 0x70020000, // 00A7 JMP #00A9
- 0xB0080000, // 00A8 RAISE 2 R0 R0
- 0x8C10011B, // 00A9 GETMET R4 R0 K27
- 0x7C100200, // 00AA CALL R4 1
- 0x80000000, // 00AB RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _trigger_read_sensors
-********************************************************************/
-be_local_closure(Matter_Device__trigger_read_sensors, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(read_sensors),
- /* K3 */ be_nested_str_weak(load),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(plugins),
- /* K6 */ be_nested_str_weak(parse_sensors),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str_weak(log),
- /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
- /* K10 */ be_const_int(3),
- }),
- be_str_weak(_trigger_read_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xB80A0200, // 0001 GETNGBL R2 K1
- 0x8C080502, // 0002 GETMET R2 R2 K2
- 0x7C080200, // 0003 CALL R2 1
- 0x4C0C0000, // 0004 LDNIL R3
- 0x1C0C0403, // 0005 EQ R3 R2 R3
- 0x780E0000, // 0006 JMPF R3 #0008
- 0x80000600, // 0007 RET 0
- 0x8C0C0303, // 0008 GETMET R3 R1 K3
- 0x5C140400, // 0009 MOVE R5 R2
- 0x7C0C0400, // 000A CALL R3 2
- 0x4C100000, // 000B LDNIL R4
- 0x20100604, // 000C NE R4 R3 R4
- 0x7812000D, // 000D JMPF R4 #001C
- 0x58100004, // 000E LDCONST R4 K4
- 0x6014000C, // 000F GETGBL R5 G12
- 0x88180105, // 0010 GETMBR R6 R0 K5
- 0x7C140200, // 0011 CALL R5 1
- 0x14140805, // 0012 LT R5 R4 R5
- 0x78160006, // 0013 JMPF R5 #001B
- 0x88140105, // 0014 GETMBR R5 R0 K5
- 0x94140A04, // 0015 GETIDX R5 R5 R4
- 0x8C140B06, // 0016 GETMET R5 R5 K6
- 0x5C1C0600, // 0017 MOVE R7 R3
- 0x7C140400, // 0018 CALL R5 2
- 0x00100907, // 0019 ADD R4 R4 K7
- 0x7001FFF3, // 001A JMP #000F
- 0x70020007, // 001B JMP #0024
- 0xB8120200, // 001C GETNGBL R4 K1
- 0x8C100908, // 001D GETMET R4 R4 K8
- 0x60180008, // 001E GETGBL R6 G8
- 0x5C1C0400, // 001F MOVE R7 R2
- 0x7C180200, // 0020 CALL R6 1
- 0x001A1206, // 0021 ADD R6 K9 R6
- 0x581C000A, // 0022 LDCONST R7 K10
- 0x7C100600, // 0023 CALL R4 3
- 0x80000000, // 0024 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: mdns_remove_op_discovery
********************************************************************/
@@ -2529,12 +3650,12 @@ be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
/********************************************************************
-** Solidified function: msg_received
+** Solidified function: is_root_commissioning_open
********************************************************************/
-be_local_closure(Matter_Device_msg_received, /* name */
+be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
+ 3, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -2542,19 +3663,52 @@ be_local_closure(Matter_Device_msg_received, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(msg_received),
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
}),
- be_str_weak(msg_received),
+ be_str_weak(is_root_commissioning_open),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x88100100, // 0000 GETMBR R4 R0 K0
- 0x8C100901, // 0001 GETMET R4 R4 K1
- 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
+ ( &(const binstruction[11]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x78060003, // 0003 JMPF R1 #0008
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x4C080000, // 0005 LDNIL R2
+ 0x1C040202, // 0006 EQ R1 R1 R2
+ 0x74060000, // 0007 JMPT R1 #0009
+ 0x50040001, // 0008 LDBOOL R1 0 1
+ 0x50040200, // 0009 LDBOOL R1 1 0
+ 0x80040200, // 000A RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_commissioning_open
+********************************************************************/
+be_local_closure(Matter_Device_is_commissioning_open, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ }),
+ be_str_weak(is_commissioning_open),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
})
)
);
@@ -2599,11 +3753,11 @@ be_local_closure(Matter_Device_start_commissioning_complete, /* name */
/********************************************************************
-** Solidified function: mdns_remove_PASE
+** Solidified function: mdns_announce_op_discovery_all_fabrics
********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
be_nested_proto(
- 12, /* nstack */
+ 6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -2611,242 +3765,39 @@ be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(mdns_pase_eth),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K7 */ be_nested_str_weak(_matterc),
- /* K8 */ be_nested_str_weak(_udp),
- /* K9 */ be_nested_str_weak(commissioning_instance_eth),
- /* K10 */ be_nested_str_weak(hostname_eth),
- /* K11 */ be_const_int(3),
- /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K13 */ be_nested_str_weak(eth),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(remove_service),
- /* K16 */ be_nested_str_weak(mdns_pase_wifi),
- /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
- /* K18 */ be_nested_str_weak(hostname_wifi),
- /* K19 */ be_nested_str_weak(wifi),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K21 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(mdns_remove_PASE),
- &be_const_str_solidified,
- ( &(const binstruction[83]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802003D, // 0002 EXBLK 0 #0041
- 0x880C0102, // 0003 GETMBR R3 R0 K2
- 0x780E001B, // 0004 JMPF R3 #0021
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x8C140505, // 0007 GETMET R5 R2 K5
- 0x581C0006, // 0008 LDCONST R7 K6
- 0x58200007, // 0009 LDCONST R8 K7
- 0x58240008, // 000A LDCONST R9 K8
- 0x88280109, // 000B GETMBR R10 R0 K9
- 0x882C010A, // 000C GETMBR R11 R0 K10
- 0x7C140C00, // 000D CALL R5 6
- 0x5818000B, // 000E LDCONST R6 K11
- 0x7C0C0600, // 000F CALL R3 3
- 0xB80E0600, // 0010 GETNGBL R3 K3
- 0x8C0C0704, // 0011 GETMET R3 R3 K4
- 0x8C140505, // 0012 GETMET R5 R2 K5
- 0x581C000C, // 0013 LDCONST R7 K12
- 0x5820000D, // 0014 LDCONST R8 K13
- 0x88240109, // 0015 GETMBR R9 R0 K9
- 0x7C140800, // 0016 CALL R5 4
- 0x5818000E, // 0017 LDCONST R6 K14
- 0x7C0C0600, // 0018 CALL R3 3
- 0x500C0000, // 0019 LDBOOL R3 0 0
- 0x90020403, // 001A SETMBR R0 K2 R3
- 0x8C0C030F, // 001B GETMET R3 R1 K15
- 0x58140007, // 001C LDCONST R5 K7
- 0x58180008, // 001D LDCONST R6 K8
- 0x881C0109, // 001E GETMBR R7 R0 K9
- 0x8820010A, // 001F GETMBR R8 R0 K10
- 0x7C0C0A00, // 0020 CALL R3 5
- 0x880C0110, // 0021 GETMBR R3 R0 K16
- 0x780E001B, // 0022 JMPF R3 #003F
- 0xB80E0600, // 0023 GETNGBL R3 K3
- 0x8C0C0704, // 0024 GETMET R3 R3 K4
- 0x8C140505, // 0025 GETMET R5 R2 K5
- 0x581C0006, // 0026 LDCONST R7 K6
- 0x58200007, // 0027 LDCONST R8 K7
- 0x58240008, // 0028 LDCONST R9 K8
- 0x88280111, // 0029 GETMBR R10 R0 K17
- 0x882C0112, // 002A GETMBR R11 R0 K18
- 0x7C140C00, // 002B CALL R5 6
- 0x5818000B, // 002C LDCONST R6 K11
- 0x7C0C0600, // 002D CALL R3 3
- 0xB80E0600, // 002E GETNGBL R3 K3
- 0x8C0C0704, // 002F GETMET R3 R3 K4
- 0x8C140505, // 0030 GETMET R5 R2 K5
- 0x581C000C, // 0031 LDCONST R7 K12
- 0x58200013, // 0032 LDCONST R8 K19
- 0x88240111, // 0033 GETMBR R9 R0 K17
- 0x7C140800, // 0034 CALL R5 4
- 0x5818000E, // 0035 LDCONST R6 K14
- 0x7C0C0600, // 0036 CALL R3 3
- 0x500C0000, // 0037 LDBOOL R3 0 0
- 0x90022003, // 0038 SETMBR R0 K16 R3
- 0x8C0C030F, // 0039 GETMET R3 R1 K15
- 0x58140007, // 003A LDCONST R5 K7
- 0x58180008, // 003B LDCONST R6 K8
- 0x881C0111, // 003C GETMBR R7 R0 K17
- 0x88200112, // 003D GETMBR R8 R0 K18
- 0x7C0C0A00, // 003E CALL R3 5
- 0xA8040001, // 003F EXBLK 1 1
- 0x70020010, // 0040 JMP #0052
- 0xAC0C0002, // 0041 CATCH R3 0 2
- 0x7002000D, // 0042 JMP #0051
- 0xB8160600, // 0043 GETNGBL R5 K3
- 0x8C140B04, // 0044 GETMET R5 R5 K4
- 0x601C0008, // 0045 GETGBL R7 G8
- 0x5C200600, // 0046 MOVE R8 R3
- 0x7C1C0200, // 0047 CALL R7 1
- 0x001E2807, // 0048 ADD R7 K20 R7
- 0x001C0F15, // 0049 ADD R7 R7 K21
- 0x60200008, // 004A GETGBL R8 G8
- 0x5C240800, // 004B MOVE R9 R4
- 0x7C200200, // 004C CALL R8 1
- 0x001C0E08, // 004D ADD R7 R7 R8
- 0x5820000E, // 004E LDCONST R8 K14
- 0x7C140600, // 004F CALL R5 3
- 0x70020000, // 0050 JMP #0052
- 0xB0080000, // 0051 RAISE 2 R0 R0
- 0x80000000, // 0052 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: msg_send
-********************************************************************/
-be_local_closure(Matter_Device_msg_send, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(send_UDP),
- }),
- be_str_weak(msg_send),
- &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: is_root_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(is_root_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x78060003, // 0003 JMPF R1 #0008
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x4C080000, // 0005 LDNIL R2
- 0x1C040202, // 0006 EQ R1 R1 R2
- 0x74060000, // 0007 JMPT R1 #0009
- 0x50040001, // 0008 LDBOOL R1 0 1
- 0x50040200, // 0009 LDBOOL R1 1 0
- 0x80040200, // 000A RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_active_endpoints
-********************************************************************/
-be_local_closure(Matter_Device_get_active_endpoints, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins),
- /* K1 */ be_nested_str_weak(get_endpoint),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(push),
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
/* K5 */ be_nested_str_weak(stop_iteration),
}),
- be_str_weak(get_active_endpoints),
+ be_str_weak(mdns_announce_op_discovery_all_fabrics),
&be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0x60080012, // 0000 GETGBL R2 G18
- 0x7C080000, // 0001 CALL R2 0
- 0x600C0010, // 0002 GETGBL R3 G16
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0xA8020011, // 0005 EXBLK 0 #0018
- 0x5C100600, // 0006 MOVE R4 R3
- 0x7C100000, // 0007 CALL R4 0
- 0x8C140901, // 0008 GETMET R5 R4 K1
- 0x7C140200, // 0009 CALL R5 1
- 0x78060002, // 000A JMPF R1 #000E
- 0x1C180B02, // 000B EQ R6 R5 K2
- 0x781A0000, // 000C JMPF R6 #000E
- 0x7001FFF7, // 000D JMP #0006
- 0x8C180503, // 000E GETMET R6 R2 K3
- 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
- 0x8C180504, // 0014 GETMET R6 R2 K4
- 0x5C200A00, // 0015 MOVE R8 R5
- 0x7C180400, // 0016 CALL R6 2
- 0x7001FFED, // 0017 JMP #0006
- 0x580C0005, // 0018 LDCONST R3 K5
- 0xAC0C0200, // 0019 CATCH R3 1 0
- 0xB0080000, // 001A RAISE 2 R0 R0
- 0x80040400, // 001B RET 1 R2
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
})
)
);
@@ -2854,455 +3805,96 @@ be_local_closure(Matter_Device_get_active_endpoints, /* name */
/********************************************************************
-** Solidified function: load_param
+** Solidified function: MtrJoin
********************************************************************/
-be_local_closure(Matter_Device_load_param, /* name */
+be_local_closure(Matter_Device_MtrJoin, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K1 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(resp_cmnd_done),
+ }),
+ be_str_weak(MtrJoin),
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x60140009, // 0000 GETGBL R5 G9
+ 0x5C180600, // 0001 MOVE R6 R3
+ 0x7C140200, // 0002 CALL R5 1
+ 0x78160002, // 0003 JMPF R5 #0007
+ 0x8C180100, // 0004 GETMET R6 R0 K0
+ 0x7C180200, // 0005 CALL R6 1
+ 0x70020001, // 0006 JMP #0009
+ 0x8C180101, // 0007 GETMET R6 R0 K1
+ 0x7C180200, // 0008 CALL R6 1
+ 0xB81A0400, // 0009 GETNGBL R6 K2
+ 0x8C180D03, // 000A GETMET R6 R6 K3
+ 0x7C180200, // 000B CALL R6 1
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Device_invoke_request, /* name */
be_nested_proto(
12, /* nstack */
- 1, /* argc */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(crypto),
- /* K2 */ be_nested_str_weak(FILENAME),
- /* K3 */ be_nested_str_weak(read),
- /* K4 */ be_nested_str_weak(close),
- /* K5 */ be_nested_str_weak(json),
- /* K6 */ be_nested_str_weak(load),
- /* K7 */ be_nested_str_weak(root_discriminator),
- /* K8 */ be_nested_str_weak(find),
- /* K9 */ be_nested_str_weak(distinguish),
- /* K10 */ be_nested_str_weak(root_passcode),
- /* K11 */ be_nested_str_weak(passcode),
- /* K12 */ be_nested_str_weak(ipv4only),
- /* K13 */ be_nested_str_weak(io_error),
- /* K14 */ be_nested_str_weak(tasmota),
- /* K15 */ be_nested_str_weak(log),
- /* K16 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
- /* K17 */ be_nested_str_weak(_X7C),
- /* K18 */ be_const_int(2),
- /* K19 */ be_nested_str_weak(random),
- /* K20 */ be_nested_str_weak(get),
- /* K21 */ be_const_int(0),
- /* K22 */ be_nested_str_weak(PASSCODE_DEFAULT),
- /* K23 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(load_param),
- &be_const_str_solidified,
- ( &(const binstruction[79]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802001D, // 0002 EXBLK 0 #0021
- 0x600C0011, // 0003 GETGBL R3 G17
- 0x88100102, // 0004 GETMBR R4 R0 K2
- 0x7C0C0200, // 0005 CALL R3 1
- 0x8C100703, // 0006 GETMET R4 R3 K3
- 0x7C100200, // 0007 CALL R4 1
- 0x8C140704, // 0008 GETMET R5 R3 K4
- 0x7C140200, // 0009 CALL R5 1
- 0xA4160A00, // 000A IMPORT R5 K5
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x5C200800, // 000C MOVE R8 R4
- 0x7C180400, // 000D CALL R6 2
- 0x8C1C0D08, // 000E GETMET R7 R6 K8
- 0x58240009, // 000F LDCONST R9 K9
- 0x88280107, // 0010 GETMBR R10 R0 K7
- 0x7C1C0600, // 0011 CALL R7 3
- 0x90020E07, // 0012 SETMBR R0 K7 R7
- 0x8C1C0D08, // 0013 GETMET R7 R6 K8
- 0x5824000B, // 0014 LDCONST R9 K11
- 0x8828010A, // 0015 GETMBR R10 R0 K10
- 0x7C1C0600, // 0016 CALL R7 3
- 0x90021407, // 0017 SETMBR R0 K10 R7
- 0x601C0017, // 0018 GETGBL R7 G23
- 0x8C200D08, // 0019 GETMET R8 R6 K8
- 0x5828000C, // 001A LDCONST R10 K12
- 0x502C0000, // 001B LDBOOL R11 0 0
- 0x7C200600, // 001C CALL R8 3
- 0x7C1C0200, // 001D CALL R7 1
- 0x90021807, // 001E SETMBR R0 K12 R7
- 0xA8040001, // 001F EXBLK 1 1
- 0x70020012, // 0020 JMP #0034
- 0xAC0C0002, // 0021 CATCH R3 0 2
- 0x7002000F, // 0022 JMP #0033
- 0x2014070D, // 0023 NE R5 R3 K13
- 0x7816000C, // 0024 JMPF R5 #0032
- 0xB8161C00, // 0025 GETNGBL R5 K14
- 0x8C140B0F, // 0026 GETMET R5 R5 K15
- 0x601C0008, // 0027 GETGBL R7 G8
- 0x5C200600, // 0028 MOVE R8 R3
- 0x7C1C0200, // 0029 CALL R7 1
- 0x001E2007, // 002A ADD R7 K16 R7
- 0x001C0F11, // 002B ADD R7 R7 K17
- 0x60200008, // 002C GETGBL R8 G8
- 0x5C240800, // 002D MOVE R9 R4
- 0x7C200200, // 002E CALL R8 1
- 0x001C0E08, // 002F ADD R7 R7 R8
- 0x58200012, // 0030 LDCONST R8 K18
- 0x7C140600, // 0031 CALL R5 3
- 0x70020000, // 0032 JMP #0034
- 0xB0080000, // 0033 RAISE 2 R0 R0
- 0x500C0000, // 0034 LDBOOL R3 0 0
- 0x88100107, // 0035 GETMBR R4 R0 K7
- 0x4C140000, // 0036 LDNIL R5
- 0x1C100805, // 0037 EQ R4 R4 R5
- 0x7812000A, // 0038 JMPF R4 #0044
- 0x8C100513, // 0039 GETMET R4 R2 K19
- 0x58180012, // 003A LDCONST R6 K18
- 0x7C100400, // 003B CALL R4 2
- 0x8C100914, // 003C GETMET R4 R4 K20
- 0x58180015, // 003D LDCONST R6 K21
- 0x581C0012, // 003E LDCONST R7 K18
- 0x7C100600, // 003F CALL R4 3
- 0x54160FFE, // 0040 LDINT R5 4095
- 0x2C100805, // 0041 AND R4 R4 R5
- 0x90020E04, // 0042 SETMBR R0 K7 R4
- 0x500C0200, // 0043 LDBOOL R3 1 0
- 0x8810010A, // 0044 GETMBR R4 R0 K10
- 0x4C140000, // 0045 LDNIL R5
- 0x1C100805, // 0046 EQ R4 R4 R5
- 0x78120002, // 0047 JMPF R4 #004B
- 0x88100116, // 0048 GETMBR R4 R0 K22
- 0x90021404, // 0049 SETMBR R0 K10 R4
- 0x500C0200, // 004A LDBOOL R3 1 0
- 0x780E0001, // 004B JMPF R3 #004E
- 0x8C100117, // 004C GETMET R4 R0 K23
- 0x7C100200, // 004D CALL R4 1
- 0x80000000, // 004E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: process_attribute_expansion
-********************************************************************/
-be_local_closure(Matter_Device_process_attribute_expansion, /* name */
- be_nested_proto(
- 29, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 0, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(keys),
- /* K1 */ be_nested_str_weak(push),
- /* K2 */ be_nested_str_weak(stop_iteration),
- /* K3 */ be_const_int(1),
- /* K4 */ be_const_int(0),
- }),
- be_str_weak(keys_sorted),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0x60040012, // 0000 GETGBL R1 G18
- 0x7C040000, // 0001 CALL R1 0
- 0x60080010, // 0002 GETGBL R2 G16
- 0x8C0C0100, // 0003 GETMET R3 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x7C080200, // 0005 CALL R2 1
- 0xA8020005, // 0006 EXBLK 0 #000D
- 0x5C0C0400, // 0007 MOVE R3 R2
- 0x7C0C0000, // 0008 CALL R3 0
- 0x8C100301, // 0009 GETMET R4 R1 K1
- 0x5C180600, // 000A MOVE R6 R3
- 0x7C100400, // 000B CALL R4 2
- 0x7001FFF9, // 000C JMP #0007
- 0x58080002, // 000D LDCONST R2 K2
- 0xAC080200, // 000E CATCH R2 1 0
- 0xB0080000, // 000F RAISE 2 R0 R0
- 0x60080010, // 0010 GETGBL R2 G16
- 0x600C000C, // 0011 GETGBL R3 G12
- 0x5C100200, // 0012 MOVE R4 R1
- 0x7C0C0200, // 0013 CALL R3 1
- 0x040C0703, // 0014 SUB R3 R3 K3
- 0x400E0603, // 0015 CONNECT R3 K3 R3
- 0x7C080200, // 0016 CALL R2 1
- 0xA8020010, // 0017 EXBLK 0 #0029
- 0x5C0C0400, // 0018 MOVE R3 R2
- 0x7C0C0000, // 0019 CALL R3 0
- 0x94100203, // 001A GETIDX R4 R1 R3
- 0x5C140600, // 001B MOVE R5 R3
- 0x24180B04, // 001C GT R6 R5 K4
- 0x781A0008, // 001D JMPF R6 #0027
- 0x04180B03, // 001E SUB R6 R5 K3
- 0x94180206, // 001F GETIDX R6 R1 R6
- 0x24180C04, // 0020 GT R6 R6 R4
- 0x781A0004, // 0021 JMPF R6 #0027
- 0x04180B03, // 0022 SUB R6 R5 K3
- 0x94180206, // 0023 GETIDX R6 R1 R6
- 0x98040A06, // 0024 SETIDX R1 R5 R6
- 0x04140B03, // 0025 SUB R5 R5 K3
- 0x7001FFF4, // 0026 JMP #001C
- 0x98040A04, // 0027 SETIDX R1 R5 R4
- 0x7001FFEE, // 0028 JMP #0018
- 0x58080002, // 0029 LDCONST R2 K2
- 0xAC080200, // 002A CATCH R2 1 0
- 0xB0080000, // 002B RAISE 2 R0 R0
- 0x80040200, // 002C RET 1 R1
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(attribute),
- /* K4 */ be_nested_str_weak(plugins),
- /* K5 */ be_nested_str_weak(get_endpoint),
- /* K6 */ be_nested_str_weak(contains),
- /* K7 */ be_nested_str_weak(get_cluster_list),
- /* K8 */ be_nested_str_weak(get_attribute_list),
- /* K9 */ be_nested_str_weak(push),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(tasmota),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
- /* K15 */ be_const_int(3),
- /* K16 */ be_nested_str_weak(status),
- /* K17 */ be_nested_str_weak(matter),
- /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
- /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
- /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_nested_str_weak(invoke_request),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(status),
+ /* K6 */ be_nested_str_weak(matter),
+ /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
}),
- be_str_weak(process_attribute_expansion),
+ be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[216]) { /* code */
- 0x840C0000, // 0000 CLOSURE R3 P0
- 0xA4120000, // 0001 IMPORT R4 K0
- 0x88140301, // 0002 GETMBR R5 R1 K1
- 0x50180000, // 0003 LDBOOL R6 0 0
- 0x881C0302, // 0004 GETMBR R7 R1 K2
- 0x50200000, // 0005 LDBOOL R8 0 0
- 0x88240303, // 0006 GETMBR R9 R1 K3
- 0x50280000, // 0007 LDBOOL R10 0 0
- 0x882C0301, // 0008 GETMBR R11 R1 K1
- 0x4C300000, // 0009 LDNIL R12
- 0x202C160C, // 000A NE R11 R11 R12
- 0x782E0007, // 000B JMPF R11 #0014
- 0x882C0302, // 000C GETMBR R11 R1 K2
- 0x4C300000, // 000D LDNIL R12
- 0x202C160C, // 000E NE R11 R11 R12
- 0x782E0003, // 000F JMPF R11 #0014
- 0x882C0303, // 0010 GETMBR R11 R1 K3
- 0x4C300000, // 0011 LDNIL R12
- 0x202C160C, // 0012 NE R11 R11 R12
- 0x742E0000, // 0013 JMPT R11 #0015
- 0x502C0001, // 0014 LDBOOL R11 0 1
- 0x502C0200, // 0015 LDBOOL R11 1 0
- 0x60300013, // 0016 GETGBL R12 G19
- 0x7C300000, // 0017 CALL R12 0
- 0x60340010, // 0018 GETGBL R13 G16
- 0x88380104, // 0019 GETMBR R14 R0 K4
- 0x7C340200, // 001A CALL R13 1
- 0xA8020055, // 001B EXBLK 0 #0072
- 0x5C381A00, // 001C MOVE R14 R13
- 0x7C380000, // 001D CALL R14 0
- 0x8C3C1D05, // 001E GETMET R15 R14 K5
- 0x7C3C0200, // 001F CALL R15 1
- 0x4C400000, // 0020 LDNIL R16
- 0x20400A10, // 0021 NE R16 R5 R16
- 0x78420002, // 0022 JMPF R16 #0026
- 0x20401E05, // 0023 NE R16 R15 R5
- 0x78420000, // 0024 JMPF R16 #0026
- 0x7001FFF5, // 0025 JMP #001C
- 0x8C401906, // 0026 GETMET R16 R12 K6
- 0x5C481E00, // 0027 MOVE R18 R15
- 0x7C400400, // 0028 CALL R16 2
- 0x74420002, // 0029 JMPT R16 #002D
- 0x60400013, // 002A GETGBL R16 G19
- 0x7C400000, // 002B CALL R16 0
- 0x98301E10, // 002C SETIDX R12 R15 R16
- 0x50180200, // 002D LDBOOL R6 1 0
- 0x8C401D07, // 002E GETMET R16 R14 K7
- 0x5C481E00, // 002F MOVE R18 R15
- 0x7C400400, // 0030 CALL R16 2
- 0x60440010, // 0031 GETGBL R17 G16
- 0x5C482000, // 0032 MOVE R18 R16
- 0x7C440200, // 0033 CALL R17 1
- 0xA8020038, // 0034 EXBLK 0 #006E
- 0x5C482200, // 0035 MOVE R18 R17
- 0x7C480000, // 0036 CALL R18 0
- 0x4C4C0000, // 0037 LDNIL R19
- 0x204C0E13, // 0038 NE R19 R7 R19
- 0x784E0002, // 0039 JMPF R19 #003D
- 0x204C2407, // 003A NE R19 R18 R7
- 0x784E0000, // 003B JMPF R19 #003D
- 0x7001FFF7, // 003C JMP #0035
- 0x944C180F, // 003D GETIDX R19 R12 R15
- 0x8C4C2706, // 003E GETMET R19 R19 K6
- 0x5C542400, // 003F MOVE R21 R18
- 0x7C4C0400, // 0040 CALL R19 2
- 0x744E0003, // 0041 JMPT R19 #0046
- 0x944C180F, // 0042 GETIDX R19 R12 R15
- 0x60500013, // 0043 GETGBL R20 G19
- 0x7C500000, // 0044 CALL R20 0
- 0x984C2414, // 0045 SETIDX R19 R18 R20
- 0x50200200, // 0046 LDBOOL R8 1 0
- 0x8C4C1D08, // 0047 GETMET R19 R14 K8
- 0x5C541E00, // 0048 MOVE R21 R15
- 0x5C582400, // 0049 MOVE R22 R18
- 0x7C4C0600, // 004A CALL R19 3
- 0x60500010, // 004B GETGBL R20 G16
- 0x5C542600, // 004C MOVE R21 R19
- 0x7C500200, // 004D CALL R20 1
- 0xA802001A, // 004E EXBLK 0 #006A
- 0x5C542800, // 004F MOVE R21 R20
- 0x7C540000, // 0050 CALL R21 0
- 0x4C580000, // 0051 LDNIL R22
- 0x20581216, // 0052 NE R22 R9 R22
- 0x785A0002, // 0053 JMPF R22 #0057
- 0x20582A09, // 0054 NE R22 R21 R9
- 0x785A0000, // 0055 JMPF R22 #0057
- 0x7001FFF7, // 0056 JMP #004F
- 0x9458180F, // 0057 GETIDX R22 R12 R15
- 0x94582C12, // 0058 GETIDX R22 R22 R18
- 0x8C582D06, // 0059 GETMET R22 R22 K6
- 0x5C602A00, // 005A MOVE R24 R21
- 0x7C580400, // 005B CALL R22 2
- 0x745A0004, // 005C JMPT R22 #0062
- 0x9458180F, // 005D GETIDX R22 R12 R15
- 0x94582C12, // 005E GETIDX R22 R22 R18
- 0x605C0012, // 005F GETGBL R23 G18
- 0x7C5C0000, // 0060 CALL R23 0
- 0x98582A17, // 0061 SETIDX R22 R21 R23
- 0x50280200, // 0062 LDBOOL R10 1 0
- 0x9458180F, // 0063 GETIDX R22 R12 R15
- 0x94582C12, // 0064 GETIDX R22 R22 R18
- 0x94582C15, // 0065 GETIDX R22 R22 R21
- 0x8C582D09, // 0066 GETMET R22 R22 K9
- 0x5C601C00, // 0067 MOVE R24 R14
- 0x7C580400, // 0068 CALL R22 2
- 0x7001FFE4, // 0069 JMP #004F
- 0x5850000A, // 006A LDCONST R20 K10
- 0xAC500200, // 006B CATCH R20 1 0
- 0xB0080000, // 006C RAISE 2 R0 R0
- 0x7001FFC6, // 006D JMP #0035
- 0x5844000A, // 006E LDCONST R17 K10
- 0xAC440200, // 006F CATCH R17 1 0
- 0xB0080000, // 0070 RAISE 2 R0 R0
- 0x7001FFA9, // 0071 JMP #001C
- 0x5834000A, // 0072 LDCONST R13 K10
- 0xAC340200, // 0073 CATCH R13 1 0
- 0xB0080000, // 0074 RAISE 2 R0 R0
- 0x60340010, // 0075 GETGBL R13 G16
- 0x5C380600, // 0076 MOVE R14 R3
- 0x5C3C1800, // 0077 MOVE R15 R12
- 0x7C380200, // 0078 CALL R14 1
- 0x7C340200, // 0079 CALL R13 1
- 0xA802003D, // 007A EXBLK 0 #00B9
- 0x5C381A00, // 007B MOVE R14 R13
- 0x7C380000, // 007C CALL R14 0
- 0x603C0010, // 007D GETGBL R15 G16
- 0x5C400600, // 007E MOVE R16 R3
- 0x9444180E, // 007F GETIDX R17 R12 R14
- 0x7C400200, // 0080 CALL R16 1
- 0x7C3C0200, // 0081 CALL R15 1
- 0xA8020031, // 0082 EXBLK 0 #00B5
- 0x5C401E00, // 0083 MOVE R16 R15
- 0x7C400000, // 0084 CALL R16 0
- 0x60440010, // 0085 GETGBL R17 G16
- 0x5C480600, // 0086 MOVE R18 R3
- 0x944C180E, // 0087 GETIDX R19 R12 R14
- 0x944C2610, // 0088 GETIDX R19 R19 R16
- 0x7C480200, // 0089 CALL R18 1
- 0x7C440200, // 008A CALL R17 1
- 0xA8020024, // 008B EXBLK 0 #00B1
- 0x5C482200, // 008C MOVE R18 R17
- 0x7C480000, // 008D CALL R18 0
- 0x604C0010, // 008E GETGBL R19 G16
- 0x9450180E, // 008F GETIDX R20 R12 R14
- 0x94502810, // 0090 GETIDX R20 R20 R16
- 0x94502812, // 0091 GETIDX R20 R20 R18
- 0x7C4C0200, // 0092 CALL R19 1
- 0xA8020018, // 0093 EXBLK 0 #00AD
- 0x5C502600, // 0094 MOVE R20 R19
- 0x7C500000, // 0095 CALL R20 0
- 0xB8561600, // 0096 GETNGBL R21 K11
- 0x8C542B0C, // 0097 GETMET R21 R21 K12
- 0x8C5C090D, // 0098 GETMET R23 R4 K13
- 0x5864000E, // 0099 LDCONST R25 K14
- 0x5C681C00, // 009A MOVE R26 R14
- 0x5C6C2000, // 009B MOVE R27 R16
- 0x5C702400, // 009C MOVE R28 R18
- 0x7C5C0A00, // 009D CALL R23 5
- 0x5860000F, // 009E LDCONST R24 K15
- 0x7C540600, // 009F CALL R21 3
- 0x9006020E, // 00A0 SETMBR R1 K1 R14
- 0x90060410, // 00A1 SETMBR R1 K2 R16
- 0x90060612, // 00A2 SETMBR R1 K3 R18
- 0x5C540400, // 00A3 MOVE R21 R2
- 0x5C582800, // 00A4 MOVE R22 R20
- 0x5C5C0200, // 00A5 MOVE R23 R1
- 0x5C601600, // 00A6 MOVE R24 R11
- 0x7C540600, // 00A7 CALL R21 3
- 0x782E0002, // 00A8 JMPF R11 #00AC
- 0x78560001, // 00A9 JMPF R21 #00AC
- 0xA8040004, // 00AA EXBLK 1 4
- 0x80002C00, // 00AB RET 0
- 0x7001FFE6, // 00AC JMP #0094
- 0x584C000A, // 00AD LDCONST R19 K10
- 0xAC4C0200, // 00AE CATCH R19 1 0
- 0xB0080000, // 00AF RAISE 2 R0 R0
- 0x7001FFDA, // 00B0 JMP #008C
- 0x5844000A, // 00B1 LDCONST R17 K10
- 0xAC440200, // 00B2 CATCH R17 1 0
- 0xB0080000, // 00B3 RAISE 2 R0 R0
- 0x7001FFCD, // 00B4 JMP #0083
- 0x583C000A, // 00B5 LDCONST R15 K10
- 0xAC3C0200, // 00B6 CATCH R15 1 0
- 0xB0080000, // 00B7 RAISE 2 R0 R0
- 0x7001FFC1, // 00B8 JMP #007B
- 0x5834000A, // 00B9 LDCONST R13 K10
- 0xAC340200, // 00BA CATCH R13 1 0
- 0xB0080000, // 00BB RAISE 2 R0 R0
- 0x782E0019, // 00BC JMPF R11 #00D7
- 0x5C340C00, // 00BD MOVE R13 R6
- 0x74360003, // 00BE JMPT R13 #00C3
- 0xB8362200, // 00BF GETNGBL R13 K17
- 0x88341B12, // 00C0 GETMBR R13 R13 K18
- 0x9006200D, // 00C1 SETMBR R1 K16 R13
- 0x7002000E, // 00C2 JMP #00D2
- 0x5C341000, // 00C3 MOVE R13 R8
- 0x74360003, // 00C4 JMPT R13 #00C9
- 0xB8362200, // 00C5 GETNGBL R13 K17
- 0x88341B13, // 00C6 GETMBR R13 R13 K19
- 0x9006200D, // 00C7 SETMBR R1 K16 R13
- 0x70020008, // 00C8 JMP #00D2
- 0x5C341400, // 00C9 MOVE R13 R10
- 0x74360003, // 00CA JMPT R13 #00CF
- 0xB8362200, // 00CB GETNGBL R13 K17
- 0x88341B14, // 00CC GETMBR R13 R13 K20
- 0x9006200D, // 00CD SETMBR R1 K16 R13
- 0x70020002, // 00CE JMP #00D2
- 0xB8362200, // 00CF GETNGBL R13 K17
- 0x88341B15, // 00D0 GETMBR R13 R13 K21
- 0x9006200D, // 00D1 SETMBR R1 K16 R13
- 0x5C340400, // 00D2 MOVE R13 R2
- 0x4C380000, // 00D3 LDNIL R14
- 0x5C3C0200, // 00D4 MOVE R15 R1
- 0x50400200, // 00D5 LDBOOL R16 1 0
- 0x7C340600, // 00D6 CALL R13 3
- 0x80000000, // 00D7 RET 0
+ ( &(const binstruction[24]) { /* code */
+ 0x58100000, // 0000 LDCONST R4 K0
+ 0x88140701, // 0001 GETMBR R5 R3 K1
+ 0x6018000C, // 0002 GETGBL R6 G12
+ 0x881C0102, // 0003 GETMBR R7 R0 K2
+ 0x7C180200, // 0004 CALL R6 1
+ 0x14180806, // 0005 LT R6 R4 R6
+ 0x781A000C, // 0006 JMPF R6 #0014
+ 0x88180102, // 0007 GETMBR R6 R0 K2
+ 0x94180C04, // 0008 GETIDX R6 R6 R4
+ 0x881C0D01, // 0009 GETMBR R7 R6 K1
+ 0x1C1C0E05, // 000A EQ R7 R7 R5
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0D03, // 000C GETMET R7 R6 K3
+ 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
+ 0x00100904, // 0012 ADD R4 R4 K4
+ 0x7001FFED, // 0013 JMP #0002
+ 0xB81A0C00, // 0014 GETNGBL R6 K6
+ 0x88180D07, // 0015 GETMBR R6 R6 K7
+ 0x900E0A06, // 0016 SETMBR R3 K5 R6
+ 0x80000000, // 0017 RET 0
})
)
);
@@ -3310,11 +3902,11 @@ be_local_closure(Matter_Device_process_attribute_expansion, /* name */
/********************************************************************
-** Solidified function: autoconf_device
+** Solidified function: compute_manual_pairing_code
********************************************************************/
-be_local_closure(Matter_Device_autoconf_device, /* name */
+be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
be_nested_proto(
- 21, /* nstack */
+ 11, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -3322,496 +3914,50 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[46]) { /* constants */
+ ( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(json),
- /* K2 */ be_const_int(1),
- /* K3 */ be_nested_str_weak(light),
- /* K4 */ be_nested_str_weak(get),
- /* K5 */ be_nested_str_weak(find),
- /* K6 */ be_nested_str_weak(channels),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_const_int(0),
- /* K9 */ be_nested_str_weak(plugins),
- /* K10 */ be_nested_str_weak(push),
- /* K11 */ be_nested_str_weak(matter),
- /* K12 */ be_nested_str_weak(Plugin_Light1),
- /* K13 */ be_nested_str_weak(tasmota),
- /* K14 */ be_nested_str_weak(log),
- /* K15 */ be_nested_str_weak(format),
- /* K16 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_Dimmer),
- /* K17 */ be_const_int(2),
- /* K18 */ be_nested_str_weak(Plugin_Light2),
- /* K19 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_CT),
- /* K20 */ be_nested_str_weak(Plugin_Light3),
- /* K21 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_RGB),
- /* K22 */ be_nested_str_weak(get_power),
- /* K23 */ be_nested_str_weak(Plugin_OnOff),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Relay__X25i),
- /* K25 */ be_nested_str_weak(load),
- /* K26 */ be_nested_str_weak(read_sensors),
- /* K27 */ be_nested_str_weak(k2l),
- /* K28 */ be_nested_str_weak(contains),
- /* K29 */ be_nested_str_weak(Temperature),
- /* K30 */ be_nested_str_weak(_X23Temperature),
- /* K31 */ be_nested_str_weak(Plugin_Sensor_Temp),
- /* K32 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Temperature_X20_X28_X25s_X29),
- /* K33 */ be_nested_str_weak(stop_iteration),
- /* K34 */ be_nested_str_weak(Pressure),
- /* K35 */ be_nested_str_weak(_X23Pressure),
- /* K36 */ be_nested_str_weak(Plugin_Sensor_Pressure),
- /* K37 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Pressure_X20_X28_X25s_X29),
- /* K38 */ be_nested_str_weak(Illuminance),
- /* K39 */ be_nested_str_weak(_X23Illuminance),
- /* K40 */ be_nested_str_weak(Plugin_Sensor_Light),
- /* K41 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_X20_X28_X25s_X29),
- /* K42 */ be_nested_str_weak(Humidity),
- /* K43 */ be_nested_str_weak(_X23Humidity),
- /* K44 */ be_nested_str_weak(Plugin_Sensor_Humidity),
- /* K45 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Humidity_X20_X28_X25s_X29),
+ /* K1 */ be_nested_str_weak(root_discriminator),
+ /* K2 */ be_nested_str_weak(root_passcode),
+ /* K3 */ be_nested_str_weak(format),
+ /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(Verhoeff),
+ /* K7 */ be_nested_str_weak(checksum),
}),
- be_str_weak(autoconf_device),
+ be_str_weak(compute_manual_pairing_code),
&be_const_str_solidified,
- ( &(const binstruction[307]) { /* code */
+ ( &(const binstruction[31]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x50100000, // 0003 LDBOOL R4 0 0
- 0xA4160600, // 0004 IMPORT R5 K3
- 0x8C180B04, // 0005 GETMET R6 R5 K4
- 0x7C180200, // 0006 CALL R6 1
- 0x4C1C0000, // 0007 LDNIL R7
- 0x201C0C07, // 0008 NE R7 R6 R7
- 0x781E003F, // 0009 JMPF R7 #004A
- 0x601C000C, // 000A GETGBL R7 G12
- 0x8C200D05, // 000B GETMET R8 R6 K5
- 0x58280006, // 000C LDCONST R10 K6
- 0x582C0007, // 000D LDCONST R11 K7
- 0x7C200600, // 000E CALL R8 3
- 0x7C1C0200, // 000F CALL R7 1
- 0x24200F08, // 0010 GT R8 R7 K8
- 0x78220037, // 0011 JMPF R8 #004A
- 0x1C200F02, // 0012 EQ R8 R7 K2
- 0x78220010, // 0013 JMPF R8 #0025
- 0x88200109, // 0014 GETMBR R8 R0 K9
- 0x8C20110A, // 0015 GETMET R8 R8 K10
- 0xB82A1600, // 0016 GETNGBL R10 K11
- 0x8C28150C, // 0017 GETMET R10 R10 K12
- 0x5C300000, // 0018 MOVE R12 R0
- 0x5C340600, // 0019 MOVE R13 R3
- 0x7C280600, // 001A CALL R10 3
- 0x7C200400, // 001B CALL R8 2
- 0xB8221A00, // 001C GETNGBL R8 K13
- 0x8C20110E, // 001D GETMET R8 R8 K14
- 0x8C28030F, // 001E GETMET R10 R1 K15
- 0x58300010, // 001F LDCONST R12 K16
- 0x5C340600, // 0020 MOVE R13 R3
- 0x7C280600, // 0021 CALL R10 3
- 0x582C0011, // 0022 LDCONST R11 K17
- 0x7C200600, // 0023 CALL R8 3
- 0x70020022, // 0024 JMP #0048
- 0x1C200F11, // 0025 EQ R8 R7 K17
- 0x78220010, // 0026 JMPF R8 #0038
- 0x88200109, // 0027 GETMBR R8 R0 K9
- 0x8C20110A, // 0028 GETMET R8 R8 K10
- 0xB82A1600, // 0029 GETNGBL R10 K11
- 0x8C281512, // 002A GETMET R10 R10 K18
- 0x5C300000, // 002B MOVE R12 R0
- 0x5C340600, // 002C MOVE R13 R3
- 0x7C280600, // 002D CALL R10 3
- 0x7C200400, // 002E CALL R8 2
- 0xB8221A00, // 002F GETNGBL R8 K13
- 0x8C20110E, // 0030 GETMET R8 R8 K14
- 0x8C28030F, // 0031 GETMET R10 R1 K15
- 0x58300013, // 0032 LDCONST R12 K19
- 0x5C340600, // 0033 MOVE R13 R3
- 0x7C280600, // 0034 CALL R10 3
- 0x582C0011, // 0035 LDCONST R11 K17
- 0x7C200600, // 0036 CALL R8 3
- 0x7002000F, // 0037 JMP #0048
- 0x88200109, // 0038 GETMBR R8 R0 K9
- 0x8C20110A, // 0039 GETMET R8 R8 K10
- 0xB82A1600, // 003A GETNGBL R10 K11
- 0x8C281514, // 003B GETMET R10 R10 K20
- 0x5C300000, // 003C MOVE R12 R0
- 0x5C340600, // 003D MOVE R13 R3
- 0x7C280600, // 003E CALL R10 3
- 0x7C200400, // 003F CALL R8 2
- 0xB8221A00, // 0040 GETNGBL R8 K13
- 0x8C20110E, // 0041 GETMET R8 R8 K14
- 0x8C28030F, // 0042 GETMET R10 R1 K15
- 0x58300015, // 0043 LDCONST R12 K21
- 0x5C340600, // 0044 MOVE R13 R3
- 0x7C280600, // 0045 CALL R10 3
- 0x582C0011, // 0046 LDCONST R11 K17
- 0x7C200600, // 0047 CALL R8 3
- 0x50100200, // 0048 LDBOOL R4 1 0
- 0x000C0702, // 0049 ADD R3 R3 K2
- 0x601C000C, // 004A GETGBL R7 G12
- 0xB8221A00, // 004B GETNGBL R8 K13
- 0x8C201116, // 004C GETMET R8 R8 K22
- 0x7C200200, // 004D CALL R8 1
- 0x7C1C0200, // 004E CALL R7 1
- 0x58200008, // 004F LDCONST R8 K8
- 0x78120000, // 0050 JMPF R4 #0052
- 0x041C0F02, // 0051 SUB R7 R7 K2
- 0x14241007, // 0052 LT R9 R8 R7
- 0x78260014, // 0053 JMPF R9 #0069
- 0x88240109, // 0054 GETMBR R9 R0 K9
- 0x8C24130A, // 0055 GETMET R9 R9 K10
- 0xB82E1600, // 0056 GETNGBL R11 K11
- 0x8C2C1717, // 0057 GETMET R11 R11 K23
- 0x5C340000, // 0058 MOVE R13 R0
- 0x5C380600, // 0059 MOVE R14 R3
- 0x5C3C1000, // 005A MOVE R15 R8
- 0x7C2C0800, // 005B CALL R11 4
- 0x7C240400, // 005C CALL R9 2
- 0xB8261A00, // 005D GETNGBL R9 K13
- 0x8C24130E, // 005E GETMET R9 R9 K14
- 0x8C2C030F, // 005F GETMET R11 R1 K15
- 0x58340018, // 0060 LDCONST R13 K24
- 0x5C380600, // 0061 MOVE R14 R3
- 0x003C1102, // 0062 ADD R15 R8 K2
- 0x7C2C0800, // 0063 CALL R11 4
- 0x58300011, // 0064 LDCONST R12 K17
- 0x7C240600, // 0065 CALL R9 3
- 0x00201102, // 0066 ADD R8 R8 K2
- 0x000C0702, // 0067 ADD R3 R3 K2
- 0x7001FFE8, // 0068 JMP #0052
- 0x8C240519, // 0069 GETMET R9 R2 K25
- 0xB82E1A00, // 006A GETNGBL R11 K13
- 0x8C2C171A, // 006B GETMET R11 R11 K26
- 0x7C2C0200, // 006C CALL R11 1
- 0x7C240400, // 006D CALL R9 2
- 0x540E001F, // 006E LDINT R3 32
- 0x60280010, // 006F GETGBL R10 G16
- 0x8C2C011B, // 0070 GETMET R11 R0 K27
- 0x5C341200, // 0071 MOVE R13 R9
- 0x7C2C0400, // 0072 CALL R11 2
- 0x7C280200, // 0073 CALL R10 1
- 0xA8020026, // 0074 EXBLK 0 #009C
- 0x5C2C1400, // 0075 MOVE R11 R10
- 0x7C2C0000, // 0076 CALL R11 0
- 0x9430120B, // 0077 GETIDX R12 R9 R11
- 0x6034000F, // 0078 GETGBL R13 G15
- 0x5C381800, // 0079 MOVE R14 R12
- 0x603C0013, // 007A GETGBL R15 G19
- 0x7C340400, // 007B CALL R13 2
- 0x78360017, // 007C JMPF R13 #0095
- 0x8C34191C, // 007D GETMET R13 R12 K28
- 0x583C001D, // 007E LDCONST R15 K29
- 0x7C340400, // 007F CALL R13 2
- 0x78360013, // 0080 JMPF R13 #0095
- 0x0034171E, // 0081 ADD R13 R11 K30
- 0x88380109, // 0082 GETMBR R14 R0 K9
- 0x8C381D0A, // 0083 GETMET R14 R14 K10
- 0xB8421600, // 0084 GETNGBL R16 K11
- 0x8C40211F, // 0085 GETMET R16 R16 K31
- 0x5C480000, // 0086 MOVE R18 R0
- 0x5C4C0600, // 0087 MOVE R19 R3
- 0x5C501A00, // 0088 MOVE R20 R13
- 0x7C400800, // 0089 CALL R16 4
- 0x7C380400, // 008A CALL R14 2
- 0xB83A1A00, // 008B GETNGBL R14 K13
- 0x8C381D0E, // 008C GETMET R14 R14 K14
- 0x8C40030F, // 008D GETMET R16 R1 K15
- 0x58480020, // 008E LDCONST R18 K32
- 0x5C4C0600, // 008F MOVE R19 R3
- 0x5C501A00, // 0090 MOVE R20 R13
- 0x7C400800, // 0091 CALL R16 4
- 0x58440011, // 0092 LDCONST R17 K17
- 0x7C380600, // 0093 CALL R14 3
- 0x000C0702, // 0094 ADD R3 R3 K2
- 0x54360027, // 0095 LDINT R13 40
- 0x2434060D, // 0096 GT R13 R3 R13
- 0x78360000, // 0097 JMPF R13 #0099
- 0x70020000, // 0098 JMP #009A
- 0x7001FFDA, // 0099 JMP #0075
- 0xA8040001, // 009A EXBLK 1 1
- 0x70020002, // 009B JMP #009F
- 0x58280021, // 009C LDCONST R10 K33
- 0xAC280200, // 009D CATCH R10 1 0
- 0xB0080000, // 009E RAISE 2 R0 R0
- 0x540E0027, // 009F LDINT R3 40
- 0x60280010, // 00A0 GETGBL R10 G16
- 0x8C2C011B, // 00A1 GETMET R11 R0 K27
- 0x5C341200, // 00A2 MOVE R13 R9
- 0x7C2C0400, // 00A3 CALL R11 2
- 0x7C280200, // 00A4 CALL R10 1
- 0xA8020026, // 00A5 EXBLK 0 #00CD
- 0x5C2C1400, // 00A6 MOVE R11 R10
- 0x7C2C0000, // 00A7 CALL R11 0
- 0x9430120B, // 00A8 GETIDX R12 R9 R11
- 0x6034000F, // 00A9 GETGBL R13 G15
- 0x5C381800, // 00AA MOVE R14 R12
- 0x603C0013, // 00AB GETGBL R15 G19
- 0x7C340400, // 00AC CALL R13 2
- 0x78360017, // 00AD JMPF R13 #00C6
- 0x8C34191C, // 00AE GETMET R13 R12 K28
- 0x583C0022, // 00AF LDCONST R15 K34
- 0x7C340400, // 00B0 CALL R13 2
- 0x78360013, // 00B1 JMPF R13 #00C6
- 0x00341723, // 00B2 ADD R13 R11 K35
- 0x88380109, // 00B3 GETMBR R14 R0 K9
- 0x8C381D0A, // 00B4 GETMET R14 R14 K10
- 0xB8421600, // 00B5 GETNGBL R16 K11
- 0x8C402124, // 00B6 GETMET R16 R16 K36
- 0x5C480000, // 00B7 MOVE R18 R0
- 0x5C4C0600, // 00B8 MOVE R19 R3
- 0x5C501A00, // 00B9 MOVE R20 R13
- 0x7C400800, // 00BA CALL R16 4
- 0x7C380400, // 00BB CALL R14 2
- 0xB83A1A00, // 00BC GETNGBL R14 K13
- 0x8C381D0E, // 00BD GETMET R14 R14 K14
- 0x8C40030F, // 00BE GETMET R16 R1 K15
- 0x58480025, // 00BF LDCONST R18 K37
- 0x5C4C0600, // 00C0 MOVE R19 R3
- 0x5C501A00, // 00C1 MOVE R20 R13
- 0x7C400800, // 00C2 CALL R16 4
- 0x58440011, // 00C3 LDCONST R17 K17
- 0x7C380600, // 00C4 CALL R14 3
- 0x000C0702, // 00C5 ADD R3 R3 K2
- 0x5436002E, // 00C6 LDINT R13 47
- 0x2434060D, // 00C7 GT R13 R3 R13
- 0x78360000, // 00C8 JMPF R13 #00CA
- 0x70020000, // 00C9 JMP #00CB
- 0x7001FFDA, // 00CA JMP #00A6
- 0xA8040001, // 00CB EXBLK 1 1
- 0x70020002, // 00CC JMP #00D0
- 0x58280021, // 00CD LDCONST R10 K33
- 0xAC280200, // 00CE CATCH R10 1 0
- 0xB0080000, // 00CF RAISE 2 R0 R0
- 0x540E002F, // 00D0 LDINT R3 48
- 0x60280010, // 00D1 GETGBL R10 G16
- 0x8C2C011B, // 00D2 GETMET R11 R0 K27
- 0x5C341200, // 00D3 MOVE R13 R9
- 0x7C2C0400, // 00D4 CALL R11 2
- 0x7C280200, // 00D5 CALL R10 1
- 0xA8020026, // 00D6 EXBLK 0 #00FE
- 0x5C2C1400, // 00D7 MOVE R11 R10
- 0x7C2C0000, // 00D8 CALL R11 0
- 0x9430120B, // 00D9 GETIDX R12 R9 R11
- 0x6034000F, // 00DA GETGBL R13 G15
- 0x5C381800, // 00DB MOVE R14 R12
- 0x603C0013, // 00DC GETGBL R15 G19
- 0x7C340400, // 00DD CALL R13 2
- 0x78360017, // 00DE JMPF R13 #00F7
- 0x8C34191C, // 00DF GETMET R13 R12 K28
- 0x583C0026, // 00E0 LDCONST R15 K38
- 0x7C340400, // 00E1 CALL R13 2
- 0x78360013, // 00E2 JMPF R13 #00F7
- 0x00341727, // 00E3 ADD R13 R11 K39
- 0x88380109, // 00E4 GETMBR R14 R0 K9
- 0x8C381D0A, // 00E5 GETMET R14 R14 K10
- 0xB8421600, // 00E6 GETNGBL R16 K11
- 0x8C402128, // 00E7 GETMET R16 R16 K40
- 0x5C480000, // 00E8 MOVE R18 R0
- 0x5C4C0600, // 00E9 MOVE R19 R3
- 0x5C501A00, // 00EA MOVE R20 R13
- 0x7C400800, // 00EB CALL R16 4
- 0x7C380400, // 00EC CALL R14 2
- 0xB83A1A00, // 00ED GETNGBL R14 K13
- 0x8C381D0E, // 00EE GETMET R14 R14 K14
- 0x8C40030F, // 00EF GETMET R16 R1 K15
- 0x58480029, // 00F0 LDCONST R18 K41
- 0x5C4C0600, // 00F1 MOVE R19 R3
- 0x5C501A00, // 00F2 MOVE R20 R13
- 0x7C400800, // 00F3 CALL R16 4
- 0x58440011, // 00F4 LDCONST R17 K17
- 0x7C380600, // 00F5 CALL R14 3
- 0x000C0702, // 00F6 ADD R3 R3 K2
- 0x54360037, // 00F7 LDINT R13 56
- 0x2434060D, // 00F8 GT R13 R3 R13
- 0x78360000, // 00F9 JMPF R13 #00FB
- 0x70020000, // 00FA JMP #00FC
- 0x7001FFDA, // 00FB JMP #00D7
- 0xA8040001, // 00FC EXBLK 1 1
- 0x70020002, // 00FD JMP #0101
- 0x58280021, // 00FE LDCONST R10 K33
- 0xAC280200, // 00FF CATCH R10 1 0
- 0xB0080000, // 0100 RAISE 2 R0 R0
- 0x540E0037, // 0101 LDINT R3 56
- 0x60280010, // 0102 GETGBL R10 G16
- 0x8C2C011B, // 0103 GETMET R11 R0 K27
- 0x5C341200, // 0104 MOVE R13 R9
- 0x7C2C0400, // 0105 CALL R11 2
- 0x7C280200, // 0106 CALL R10 1
- 0xA8020026, // 0107 EXBLK 0 #012F
- 0x5C2C1400, // 0108 MOVE R11 R10
- 0x7C2C0000, // 0109 CALL R11 0
- 0x9430120B, // 010A GETIDX R12 R9 R11
- 0x6034000F, // 010B GETGBL R13 G15
- 0x5C381800, // 010C MOVE R14 R12
- 0x603C0013, // 010D GETGBL R15 G19
- 0x7C340400, // 010E CALL R13 2
- 0x78360017, // 010F JMPF R13 #0128
- 0x8C34191C, // 0110 GETMET R13 R12 K28
- 0x583C002A, // 0111 LDCONST R15 K42
- 0x7C340400, // 0112 CALL R13 2
- 0x78360013, // 0113 JMPF R13 #0128
- 0x0034172B, // 0114 ADD R13 R11 K43
- 0x88380109, // 0115 GETMBR R14 R0 K9
- 0x8C381D0A, // 0116 GETMET R14 R14 K10
- 0xB8421600, // 0117 GETNGBL R16 K11
- 0x8C40212C, // 0118 GETMET R16 R16 K44
- 0x5C480000, // 0119 MOVE R18 R0
- 0x5C4C0600, // 011A MOVE R19 R3
- 0x5C501A00, // 011B MOVE R20 R13
- 0x7C400800, // 011C CALL R16 4
- 0x7C380400, // 011D CALL R14 2
- 0xB83A1A00, // 011E GETNGBL R14 K13
- 0x8C381D0E, // 011F GETMET R14 R14 K14
- 0x8C40030F, // 0120 GETMET R16 R1 K15
- 0x5848002D, // 0121 LDCONST R18 K45
- 0x5C4C0600, // 0122 MOVE R19 R3
- 0x5C501A00, // 0123 MOVE R20 R13
- 0x7C400800, // 0124 CALL R16 4
- 0x58440011, // 0125 LDCONST R17 K17
- 0x7C380600, // 0126 CALL R14 3
- 0x000C0702, // 0127 ADD R3 R3 K2
- 0x5436003F, // 0128 LDINT R13 64
- 0x2434060D, // 0129 GT R13 R3 R13
- 0x78360000, // 012A JMPF R13 #012C
- 0x70020000, // 012B JMP #012D
- 0x7001FFDA, // 012C JMP #0108
- 0xA8040001, // 012D EXBLK 1 1
- 0x70020002, // 012E JMP #0132
- 0x58280021, // 012F LDCONST R10 K33
- 0xAC280200, // 0130 CATCH R10 1 0
- 0xB0080000, // 0131 RAISE 2 R0 R0
- 0x80000000, // 0132 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_mdns_announce_hostnames
-********************************************************************/
-be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* 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(_mdns_announce_hostname),
- /* 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_mdns_host),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x50080000, // 0002 LDBOOL R2 0 0
- 0x7C000400, // 0003 CALL R0 2
- 0xB8020200, // 0004 GETNGBL R0 K1
- 0x8C000102, // 0005 GETMET R0 R0 K2
- 0x58080003, // 0006 LDCONST R2 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x7C000600, // 0008 CALL R0 3
- 0x80000000, // 0009 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(_mdns_announce_hostname),
- /* 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_mdns_host),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x50080200, // 0002 LDBOOL R2 1 0
- 0x7C000400, // 0003 CALL R0 2
- 0xB8020200, // 0004 GETNGBL R0 K1
- 0x8C000102, // 0005 GETMET R0 R0 K2
- 0x58080003, // 0006 LDCONST R2 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x7C000600, // 0008 CALL R0 3
- 0x80000000, // 0009 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(wifi),
- /* K2 */ be_nested_str_weak(up),
- /* K3 */ be_nested_str_weak(_mdns_announce_hostname),
- /* K4 */ be_nested_str_weak(add_rule),
- /* K5 */ be_nested_str_weak(Wifi_X23Connected),
- /* K6 */ be_nested_str_weak(matter_mdns_host),
- /* K7 */ be_nested_str_weak(eth),
- /* K8 */ be_nested_str_weak(Eth_X23Connected),
- }),
- be_str_weak(start_mdns_announce_hostnames),
- &be_const_str_solidified,
- ( &(const binstruction[32]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x94040302, // 0003 GETIDX R1 R1 K2
- 0x78060003, // 0004 JMPF R1 #0009
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x500C0000, // 0006 LDBOOL R3 0 0
- 0x7C040400, // 0007 CALL R1 2
- 0x70020005, // 0008 JMP #000F
- 0xB8060000, // 0009 GETNGBL R1 K0
- 0x8C040304, // 000A GETMET R1 R1 K4
- 0x580C0005, // 000B LDCONST R3 K5
- 0x84100000, // 000C CLOSURE R4 P0
- 0x58140006, // 000D LDCONST R5 K6
- 0x7C040800, // 000E CALL R1 4
- 0xB8060000, // 000F GETNGBL R1 K0
- 0x8C040307, // 0010 GETMET R1 R1 K7
- 0x7C040200, // 0011 CALL R1 1
- 0x94040302, // 0012 GETIDX R1 R1 K2
- 0x78060003, // 0013 JMPF R1 #0018
- 0x8C040103, // 0014 GETMET R1 R0 K3
- 0x500C0200, // 0015 LDBOOL R3 1 0
- 0x7C040400, // 0016 CALL R1 2
- 0x70020005, // 0017 JMP #001E
- 0xB8060000, // 0018 GETNGBL R1 K0
- 0x8C040304, // 0019 GETMET R1 R1 K4
- 0x580C0008, // 001A LDCONST R3 K8
- 0x84100001, // 001B CLOSURE R4 P1
- 0x58140006, // 001C LDCONST R5 K6
- 0x7C040800, // 001D CALL R1 4
- 0xA0000000, // 001E CLOSE R0
- 0x80000000, // 001F RET 0
+ 0x88080101, // 0001 GETMBR R2 R0 K1
+ 0x540E0FFE, // 0002 LDINT R3 4095
+ 0x2C080403, // 0003 AND R2 R2 R3
+ 0x540E0009, // 0004 LDINT R3 10
+ 0x3C080403, // 0005 SHR R2 R2 R3
+ 0x880C0101, // 0006 GETMBR R3 R0 K1
+ 0x541202FF, // 0007 LDINT R4 768
+ 0x2C0C0604, // 0008 AND R3 R3 R4
+ 0x54120005, // 0009 LDINT R4 6
+ 0x380C0604, // 000A SHL R3 R3 R4
+ 0x88100102, // 000B GETMBR R4 R0 K2
+ 0x54163FFE, // 000C LDINT R5 16383
+ 0x2C100805, // 000D AND R4 R4 R5
+ 0x300C0604, // 000E OR R3 R3 R4
+ 0x88100102, // 000F GETMBR R4 R0 K2
+ 0x5416000D, // 0010 LDINT R5 14
+ 0x3C100805, // 0011 SHR R4 R4 R5
+ 0x8C140303, // 0012 GETMET R5 R1 K3
+ 0x581C0004, // 0013 LDCONST R7 K4
+ 0x5C200400, // 0014 MOVE R8 R2
+ 0x5C240600, // 0015 MOVE R9 R3
+ 0x5C280800, // 0016 MOVE R10 R4
+ 0x7C140A00, // 0017 CALL R5 5
+ 0xB81A0A00, // 0018 GETNGBL R6 K5
+ 0x88180D06, // 0019 GETMBR R6 R6 K6
+ 0x8C180D07, // 001A GETMET R6 R6 K7
+ 0x5C200A00, // 001B MOVE R8 R5
+ 0x7C180400, // 001C CALL R6 2
+ 0x00140A06, // 001D ADD R5 R5 R6
+ 0x80040A00, // 001E RET 1 R5
})
)
);
@@ -3994,111 +4140,79 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */
/********************************************************************
-** Solidified function: mdns_remove_op_discovery_all_fabrics
+** Solidified function: k2l
********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
+be_local_closure(Matter_Device_k2l, /* name */
be_nested_proto(
- 6, /* nstack */
+ 8, /* nstack */
1, /* argc */
- 2, /* varg */
+ 4, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(0),
}),
- be_str_weak(mdns_remove_op_discovery_all_fabrics),
+ be_str_weak(k2l),
&be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
+ ( &(const binstruction[50]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 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
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 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
+ 0x8C140502, // 000E GETMET R5 R2 K2
+ 0x5C1C0800, // 000F MOVE R7 R4
+ 0x7C140400, // 0010 CALL R5 2
+ 0x7001FFF9, // 0011 JMP #000C
+ 0x580C0003, // 0012 LDCONST R3 K3
+ 0xAC0C0200, // 0013 CATCH R3 1 0
0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_commissioning_complete),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(start_commissioning_complete_deferred),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
+ 0x600C0010, // 0015 GETGBL R3 G16
+ 0x6010000C, // 0016 GETGBL R4 G12
+ 0x5C140400, // 0017 MOVE R5 R2
+ 0x7C100200, // 0018 CALL R4 1
+ 0x04100904, // 0019 SUB R4 R4 K4
+ 0x40120804, // 001A CONNECT R4 K4 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
+ 0x241C0D05, // 0021 GT R7 R6 K5
+ 0x781E0008, // 0022 JMPF R7 #002C
+ 0x041C0D04, // 0023 SUB R7 R6 K4
+ 0x941C0407, // 0024 GETIDX R7 R2 R7
+ 0x241C0E05, // 0025 GT R7 R7 R5
+ 0x781E0004, // 0026 JMPF R7 #002C
+ 0x041C0D04, // 0027 SUB R7 R6 K4
+ 0x941C0407, // 0028 GETIDX R7 R2 R7
+ 0x98080C07, // 0029 SETIDX R2 R6 R7
+ 0x04180D04, // 002A SUB R6 R6 K4
+ 0x7001FFF4, // 002B JMP #0021
+ 0x98080C05, // 002C SETIDX R2 R6 R5
+ 0x7001FFEE, // 002D JMP #001D
+ 0x580C0003, // 002E LDCONST R3 K3
+ 0xAC0C0200, // 002F CATCH R3 1 0
+ 0xB0080000, // 0030 RAISE 2 R0 R0
+ 0x80040400, // 0031 RET 1 R2
})
)
);
@@ -4111,85 +4225,87 @@ be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name
be_local_class(Matter_Device,
28,
NULL,
- be_nested_map(77,
+ be_nested_map(79,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(started, -1), be_const_var(0) },
- { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) },
- { be_const_key_weak(received_ack, 0), be_const_closure(Matter_Device_received_ack_closure) },
- { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
- { be_const_key_weak(start_mdns_announce_hostnames, 40), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
- { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
- { be_const_key_weak(compute_manual_pairing_code, 65), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
- { be_const_key_weak(root_w0, -1), be_const_var(26) },
- { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
- { be_const_key_weak(every_second, 42), be_const_closure(Matter_Device_every_second_closure) },
- { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
- { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
- { be_const_key_weak(hostname_eth, -1), be_const_var(16) },
- { be_const_key_weak(vendorid, 22), be_const_var(17) },
- { be_const_key_weak(commissioning_iterations, -1), be_const_var(7) },
- { be_const_key_weak(root_iterations, -1), be_const_var(24) },
- { be_const_key_weak(root_L, 23), be_const_var(27) },
- { be_const_key_weak(VENDOR_ID, 15), be_const_int(65521) },
- { be_const_key_weak(root_passcode, 33), be_const_var(22) },
- { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(PBKDF_ITERATIONS, 5), be_const_int(1000) },
- { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
- { be_const_key_weak(commissioning_discriminator, 58), be_const_var(8) },
- { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) },
- { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
- { be_const_key_weak(productid, -1), be_const_var(18) },
- { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) },
- { be_const_key_weak(PASE_TIMEOUT, -1), be_const_int(600) },
- { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) },
- { be_const_key_weak(is_root_commissioning_open, 57), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
- { be_const_key_weak(hostname_wifi, 6), be_const_var(15) },
- { be_const_key_weak(PASSCODE_DEFAULT, 49), be_const_int(20202021) },
- { be_const_key_weak(commissioning_w0, -1), be_const_var(10) },
- { be_const_key_weak(_compute_pbkdf, 62), be_const_closure(Matter_Device__compute_pbkdf_closure) },
- { be_const_key_weak(msg_send, 47), be_const_closure(Matter_Device_msg_send_closure) },
- { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
- { be_const_key_weak(start_operational_discovery_deferred, 68), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
- { be_const_key_weak(start_operational_discovery, 52), be_const_closure(Matter_Device_start_operational_discovery_closure) },
- { be_const_key_weak(udp_server, 51), be_const_var(2) },
- { be_const_key_weak(invoke_request, 73), be_const_closure(Matter_Device_invoke_request_closure) },
- { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
- { be_const_key_weak(mdns_remove_PASE, -1), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
- { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
- { be_const_key_weak(mdns_pase_eth, -1), be_const_var(19) },
+ { be_const_key_weak(commissioning_w0, 50), be_const_var(10) },
+ { be_const_key_weak(start_operational_discovery, 13), be_const_closure(Matter_Device_start_operational_discovery_closure) },
{ be_const_key_weak(plugins, -1), be_const_var(1) },
- { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
- { be_const_key_weak(commissioning_salt, -1), be_const_var(9) },
- { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(14) },
- { be_const_key_weak(PRODUCT_ID, 71), be_const_int(32768) },
- { be_const_key_weak(_trigger_read_sensors, 48), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
- { be_const_key_weak(msg_received, 66), be_const_closure(Matter_Device_msg_received_closure) },
- { be_const_key_weak(ui, 24), be_const_var(5) },
- { be_const_key_weak(start_root_basic_commissioning, 30), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
- { be_const_key_weak(root_salt, -1), be_const_var(25) },
- { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
- { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(13) },
- { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(12) },
+ { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
+ { be_const_key_weak(mdns_remove_PASE, 72), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
{ be_const_key_weak(message_handler, -1), be_const_var(3) },
- { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
- { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(20) },
+ { be_const_key_weak(mdns_announce_op_discovery, 43), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
+ { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
+ { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
{ be_const_key_weak(commissioning_open, -1), be_const_var(6) },
- { be_const_key_weak(root_discriminator, -1), be_const_var(21) },
- { be_const_key_weak(commissioning_L, -1), be_const_var(11) },
- { be_const_key_weak(sort_distinct, 35), be_const_static_closure(Matter_Device_sort_distinct_closure) },
- { be_const_key_weak(sessions, -1), be_const_var(4) },
+ { be_const_key_weak(root_L, 45), be_const_var(27) },
+ { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) },
+ { be_const_key_weak(root_passcode, -1), be_const_var(22) },
+ { be_const_key_weak(compute_manual_pairing_code, 77), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
+ { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
{ be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
- { be_const_key_weak(get_active_endpoints, 11), be_const_closure(Matter_Device_get_active_endpoints_closure) },
- { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
- { be_const_key_weak(ipv4only, -1), be_const_var(23) },
- { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) },
- { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
+ { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
+ { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) },
+ { be_const_key_weak(_mdns_announce_hostname, 31), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
{ be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
+ { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
+ { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
+ { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(12) },
+ { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) },
+ { be_const_key_weak(hostname_wifi, 32), be_const_var(15) },
+ { be_const_key_weak(productid, -1), be_const_var(18) },
+ { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) },
+ { be_const_key_weak(commissioning_discriminator, -1), be_const_var(8) },
+ { be_const_key_weak(FILENAME, 46), be_nested_str_weak(_matter_device_X2Ejson) },
+ { be_const_key_weak(commissioning_instance_eth, 53), be_const_var(14) },
+ { be_const_key_weak(start, 75), be_const_closure(Matter_Device_start_closure) },
+ { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
+ { be_const_key_weak(MtrJoin, 33), be_const_closure(Matter_Device_MtrJoin_closure) },
+ { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) },
+ { be_const_key_weak(root_w0, -1), be_const_var(26) },
+ { be_const_key_weak(ui, -1), be_const_var(5) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
+ { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
+ { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
+ { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
+ { be_const_key_weak(PASE_TIMEOUT, 36), be_const_int(600) },
+ { be_const_key_weak(mdns_announce_PASE, 40), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
+ { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
+ { be_const_key_weak(commissioning_salt, 39), be_const_var(9) },
+ { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
+ { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) },
+ { be_const_key_weak(root_salt, 41), be_const_var(25) },
+ { be_const_key_weak(commissioning_iterations, 6), be_const_var(7) },
+ { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) },
+ { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
+ { be_const_key_weak(commissioning_L, -1), be_const_var(11) },
+ { be_const_key_weak(root_discriminator, -1), be_const_var(21) },
+ { be_const_key_weak(ipv4only, -1), be_const_var(23) },
+ { be_const_key_weak(load_param, 37), be_const_closure(Matter_Device_load_param_closure) },
+ { be_const_key_weak(start_operational_discovery_deferred, 55), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
+ { be_const_key_weak(sessions, -1), be_const_var(4) },
+ { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(register_commands, 52), be_const_closure(Matter_Device_register_commands_closure) },
+ { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(13) },
{ be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) },
- { be_const_key_weak(attribute_updated, 4), be_const_closure(Matter_Device_attribute_updated_closure) },
- { be_const_key_weak(init, 3), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) },
+ { be_const_key_weak(_init_basic_commissioning, 44), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
+ { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
+ { be_const_key_weak(root_iterations, -1), be_const_var(24) },
+ { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) },
+ { be_const_key_weak(udp_server, -1), be_const_var(2) },
+ { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
+ { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(sort_distinct, 34), be_const_static_closure(Matter_Device_sort_distinct_closure) },
+ { be_const_key_weak(started, -1), be_const_var(0) },
+ { be_const_key_weak(hostname_eth, -1), be_const_var(16) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) },
+ { be_const_key_weak(mdns_pase_eth, 14), be_const_var(19) },
+ { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(20) },
+ { be_const_key_weak(PASSCODE_DEFAULT, 11), be_const_int(20202021) },
{ be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
+ { be_const_key_weak(vendorid, 3), be_const_var(17) },
})),
be_str_weak(Matter_Device)
);
From 65eb9142a26ae596d4b47c8bfc95748682a65bf2 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Tue, 18 Apr 2023 23:00:36 +0200
Subject: [PATCH 010/289] Matter fix RemoveFabric arg logging (#18452)
---
.../src/embedded/Matter_Plugin_Root.be | 2 +-
.../solidify/solidified_Matter_Plugin_Root.h | 132 +++++++++---------
2 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
index a387ab70f..125dd9cca 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
@@ -522,6 +522,7 @@ class Matter_Plugin_Root : Matter_Plugin
elif command == 0x000A # ---------- RemoveFabric ----------
var index = val.findsubval(0) # FabricIndex
+ ctx.log = "fabric_index:"+str(index)
for fab: self.device.sessions.active_fabrics()
if fab.get_fabric_index() == index
@@ -533,7 +534,6 @@ class Matter_Plugin_Root : Matter_Plugin
end
tasmota.log("MTR: RemoveFabric fabric("+str(index)+") not found", 2)
ctx.status = matter.INVALID_ACTION
- ctx.log = "fabric_index:"+str(index)
return nil # trigger a standalone ack
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
index b8eed6db6..bc0d5c749 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
@@ -1301,16 +1301,16 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */
/* K77 */ be_nested_str_weak(format),
/* K78 */ be_nested_str_weak(MTR_X3A_X20_X2E_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20Update_X20fabric_X20_X27_X25s_X27_X20label_X3D_X27_X25s_X27),
/* K79 */ be_nested_str_weak(get_fabric_id),
- /* K80 */ be_nested_str_weak(sessions),
- /* K81 */ be_nested_str_weak(active_fabrics),
- /* K82 */ be_nested_str_weak(get_fabric_index),
- /* K83 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20),
- /* K84 */ be_nested_str_weak(set_timer),
- /* K85 */ be_nested_str_weak(stop_iteration),
- /* K86 */ be_nested_str_weak(MTR_X3A_X20RemoveFabric_X20fabric_X28),
- /* K87 */ be_nested_str_weak(_X29_X20not_X20found),
- /* K88 */ be_nested_str_weak(INVALID_ACTION),
- /* K89 */ be_nested_str_weak(fabric_index_X3A),
+ /* K80 */ be_nested_str_weak(fabric_index_X3A),
+ /* K81 */ be_nested_str_weak(sessions),
+ /* K82 */ be_nested_str_weak(active_fabrics),
+ /* K83 */ be_nested_str_weak(get_fabric_index),
+ /* K84 */ be_nested_str_weak(MTR_X3A_X20removing_X20fabric_X20),
+ /* K85 */ be_nested_str_weak(set_timer),
+ /* K86 */ be_nested_str_weak(stop_iteration),
+ /* K87 */ be_nested_str_weak(MTR_X3A_X20RemoveFabric_X20fabric_X28),
+ /* K88 */ be_nested_str_weak(_X29_X20not_X20found),
+ /* K89 */ be_nested_str_weak(INVALID_ACTION),
/* K90 */ be_nested_str_weak(MTR_X3A_X20OpenCommissioningWindow_X28timeout_X3D_X25i_X2C_X20passcode_X3D_X25s_X2C_X20discriminator_X3D_X25i_X2C_X20iterations_X3D_X25i_X2C_X20salt_X3D_X25s_X29),
/* K91 */ be_nested_str_weak(INVALID_DATA_TYPE),
/* K92 */ be_nested_str_weak(MTR_X3A_X20wrong_X20size_X20for_X20PAKE_X20parameters),
@@ -1842,63 +1842,63 @@ be_local_closure(Matter_Plugin_Root_invoke_request, /* name */
0x8C240507, // 0202 GETMET R9 R2 K7
0x582C0006, // 0203 LDCONST R11 K6
0x7C240400, // 0204 CALL R9 2
- 0x60280010, // 0205 GETGBL R10 G16
- 0x882C0115, // 0206 GETMBR R11 R0 K21
- 0x882C1750, // 0207 GETMBR R11 R11 K80
- 0x8C2C1751, // 0208 GETMET R11 R11 K81
- 0x7C2C0200, // 0209 CALL R11 1
- 0x7C280200, // 020A CALL R10 1
- 0xA802001D, // 020B EXBLK 0 #022A
- 0x5C2C1400, // 020C MOVE R11 R10
- 0x7C2C0000, // 020D CALL R11 0
- 0x8C301752, // 020E GETMET R12 R11 K82
- 0x7C300200, // 020F CALL R12 1
- 0x1C301809, // 0210 EQ R12 R12 R9
- 0x78320015, // 0211 JMPF R12 #0228
- 0xB8323E00, // 0212 GETNGBL R12 K31
- 0x8C301924, // 0213 GETMET R12 R12 K36
- 0x8C38174F, // 0214 GETMET R14 R11 K79
- 0x7C380200, // 0215 CALL R14 1
- 0x8C381D3F, // 0216 GETMET R14 R14 K63
- 0x7C380200, // 0217 CALL R14 1
- 0x8C381D40, // 0218 GETMET R14 R14 K64
- 0x7C380200, // 0219 CALL R14 1
- 0x8C381D26, // 021A GETMET R14 R14 K38
- 0x7C380200, // 021B CALL R14 1
- 0x003AA60E, // 021C ADD R14 K83 R14
- 0x583C000F, // 021D LDCONST R15 K15
- 0x7C300600, // 021E CALL R12 3
- 0xB8323E00, // 021F GETNGBL R12 K31
- 0x8C301954, // 0220 GETMET R12 R12 K84
- 0x543A07CF, // 0221 LDINT R14 2000
- 0x843C0000, // 0222 CLOSURE R15 P0
+ 0x60280008, // 0205 GETGBL R10 G8
+ 0x5C2C1200, // 0206 MOVE R11 R9
+ 0x7C280200, // 0207 CALL R10 1
+ 0x002AA00A, // 0208 ADD R10 K80 R10
+ 0x900E480A, // 0209 SETMBR R3 K36 R10
+ 0x60280010, // 020A GETGBL R10 G16
+ 0x882C0115, // 020B GETMBR R11 R0 K21
+ 0x882C1751, // 020C GETMBR R11 R11 K81
+ 0x8C2C1752, // 020D GETMET R11 R11 K82
+ 0x7C2C0200, // 020E CALL R11 1
+ 0x7C280200, // 020F CALL R10 1
+ 0xA802001D, // 0210 EXBLK 0 #022F
+ 0x5C2C1400, // 0211 MOVE R11 R10
+ 0x7C2C0000, // 0212 CALL R11 0
+ 0x8C301753, // 0213 GETMET R12 R11 K83
+ 0x7C300200, // 0214 CALL R12 1
+ 0x1C301809, // 0215 EQ R12 R12 R9
+ 0x78320015, // 0216 JMPF R12 #022D
+ 0xB8323E00, // 0217 GETNGBL R12 K31
+ 0x8C301924, // 0218 GETMET R12 R12 K36
+ 0x8C38174F, // 0219 GETMET R14 R11 K79
+ 0x7C380200, // 021A CALL R14 1
+ 0x8C381D3F, // 021B GETMET R14 R14 K63
+ 0x7C380200, // 021C CALL R14 1
+ 0x8C381D40, // 021D GETMET R14 R14 K64
+ 0x7C380200, // 021E CALL R14 1
+ 0x8C381D26, // 021F GETMET R14 R14 K38
+ 0x7C380200, // 0220 CALL R14 1
+ 0x003AA80E, // 0221 ADD R14 K84 R14
+ 0x583C000F, // 0222 LDCONST R15 K15
0x7C300600, // 0223 CALL R12 3
- 0x50300200, // 0224 LDBOOL R12 1 0
- 0xA0000000, // 0225 CLOSE R0
- 0xA8040001, // 0226 EXBLK 1 1
- 0x80041800, // 0227 RET 1 R12
- 0xA0280000, // 0228 CLOSE R10
- 0x7001FFE1, // 0229 JMP #020C
- 0x58280055, // 022A LDCONST R10 K85
- 0xAC280200, // 022B CATCH R10 1 0
- 0xB0080000, // 022C RAISE 2 R0 R0
- 0xB82A3E00, // 022D GETNGBL R10 K31
- 0x8C281524, // 022E GETMET R10 R10 K36
- 0x60300008, // 022F GETGBL R12 G8
- 0x5C341200, // 0230 MOVE R13 R9
- 0x7C300200, // 0231 CALL R12 1
- 0x0032AC0C, // 0232 ADD R12 K86 R12
- 0x00301957, // 0233 ADD R12 R12 K87
- 0x5834000F, // 0234 LDCONST R13 K15
- 0x7C280600, // 0235 CALL R10 3
- 0xB82A0400, // 0236 GETNGBL R10 K2
- 0x88281558, // 0237 GETMBR R10 R10 K88
- 0x900E2E0A, // 0238 SETMBR R3 K23 R10
- 0x60280008, // 0239 GETGBL R10 G8
- 0x5C2C1200, // 023A MOVE R11 R9
- 0x7C280200, // 023B CALL R10 1
- 0x002AB20A, // 023C ADD R10 K89 R10
- 0x900E480A, // 023D SETMBR R3 K36 R10
+ 0xB8323E00, // 0224 GETNGBL R12 K31
+ 0x8C301955, // 0225 GETMET R12 R12 K85
+ 0x543A07CF, // 0226 LDINT R14 2000
+ 0x843C0000, // 0227 CLOSURE R15 P0
+ 0x7C300600, // 0228 CALL R12 3
+ 0x50300200, // 0229 LDBOOL R12 1 0
+ 0xA0000000, // 022A CLOSE R0
+ 0xA8040001, // 022B EXBLK 1 1
+ 0x80041800, // 022C RET 1 R12
+ 0xA0280000, // 022D CLOSE R10
+ 0x7001FFE1, // 022E JMP #0211
+ 0x58280056, // 022F LDCONST R10 K86
+ 0xAC280200, // 0230 CATCH R10 1 0
+ 0xB0080000, // 0231 RAISE 2 R0 R0
+ 0xB82A3E00, // 0232 GETNGBL R10 K31
+ 0x8C281524, // 0233 GETMET R10 R10 K36
+ 0x60300008, // 0234 GETGBL R12 G8
+ 0x5C341200, // 0235 MOVE R13 R9
+ 0x7C300200, // 0236 CALL R12 1
+ 0x0032AE0C, // 0237 ADD R12 K87 R12
+ 0x00301958, // 0238 ADD R12 R12 K88
+ 0x5834000F, // 0239 LDCONST R13 K15
+ 0x7C280600, // 023A CALL R10 3
+ 0xB82A0400, // 023B GETNGBL R10 K2
+ 0x88281559, // 023C GETMBR R10 R10 K89
+ 0x900E2E0A, // 023D SETMBR R3 K23 R10
0x4C280000, // 023E LDNIL R10
0xA0000000, // 023F CLOSE R0
0x80041400, // 0240 RET 1 R10
From 9f77cfd890efaee82629a7427137b7a157100137 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Wed, 19 Apr 2023 16:17:04 +0200
Subject: [PATCH 011/289] Fix single pin latching relay power on state
Fix single pin latching relay power on state (#18386)
---
CHANGELOG.md | 4 ++--
RELEASENOTES.md | 3 ++-
tasmota/tasmota.ino | 4 ++--
tasmota/tasmota_support/support_tasmota.ino | 9 +++++----
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe36cd2e2..4307c6f5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,8 +6,8 @@ All notable changes to this project will be documented in this file.
## [12.5.0.1]
### Added
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
-- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control (#18386)
-- Matter allow `Matter#Initialized` rule once the device is configured
+- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
+- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
### Breaking Changed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 0c0f50aad..1470f9262 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -112,8 +112,9 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v12.5.0.1
### Added
-- Command ``SetOption152 0/1`` to select two (default) or one pin bistable relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
+- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
+- Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451)
### Breaking Changed
diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino
index cdba8af55..ec4a65f08 100644
--- a/tasmota/tasmota.ino
+++ b/tasmota/tasmota.ino
@@ -254,7 +254,7 @@ struct TasmotaGlobal_t {
void *log_buffer_mutex; // Control access to log buffer
power_t power; // Current copy of Settings->power
- power_t power_bistable; // Current state of single pin bistable power
+ power_t power_latching; // Current state of single pin latching power
power_t rel_inverted; // Relay inverted flag (1 = (0 = On, 1 = Off))
power_t rel_bistable; // Relay bistable bitmap
power_t last_power; // Last power set state
@@ -431,7 +431,7 @@ void setup(void) {
TasmotaGlobal.global_state.data = 0xF; // Init global state (wifi_down, mqtt_down) to solve possible network issues
TasmotaGlobal.enable_logging = 1;
TasmotaGlobal.seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded
- TasmotaGlobal.power_bistable = 0x80000000;
+ TasmotaGlobal.power_latching = 0x80000000;
RtcRebootLoad();
if (!RtcRebootValid()) {
diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino
index 432f7682e..09ffc5f73 100644
--- a/tasmota/tasmota_support/support_tasmota.ino
+++ b/tasmota/tasmota_support/support_tasmota.ino
@@ -320,12 +320,12 @@ void SetDevicePower(power_t rpower, uint32_t source) {
bool update = true;
if (bitRead(TasmotaGlobal.rel_bistable, port)) {
if (Settings->flag6.bistable_single_pin) { // SetOption152 - (Power) Use single pin bistable
- if (0x80000000 == TasmotaGlobal.power_bistable) {
- TasmotaGlobal.power_bistable = TasmotaGlobal.power; // Init last known state
+ if (0x80000000 == TasmotaGlobal.power_latching) {
+ TasmotaGlobal.power_latching = TasmotaGlobal.power; // Init last known state
}
- update = (bitRead(TasmotaGlobal.power_bistable, port) != state);
+ update = (bitRead(TasmotaGlobal.power_latching, port) != state);
if (update) {
- bitWrite(TasmotaGlobal.power_bistable, port, state);
+ bitWrite(TasmotaGlobal.power_latching, port, state);
bitSet(bistable, port);
}
@@ -418,6 +418,7 @@ void SetPowerOnState(void)
} else {
power_t devices_mask = POWER_MASK >> (POWER_SIZE - TasmotaGlobal.devices_present);
if (ResetReasonPowerOn()) {
+ TasmotaGlobal.power_latching = 0; // Single pin latching relay is powered off after re-applying power
switch (Settings->poweronstate) {
case POWER_ALL_OFF:
case POWER_ALL_OFF_PULSETIME_ON:
From b235dffb291075c51730cac3e605ff2478b6f8ed Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Wed, 19 Apr 2023 23:45:05 +0200
Subject: [PATCH 012/289] Fix Berry hue_bridge (#18459)
---
.../src/be_light_state_class.cpp | 12 +++++-----
.../berry_tasmota/src/embedded/hue_bridge.be | 2 +-
.../src/solidify/solidified_hue_bridge.h | 2 +-
.../src/solidify/solidified_i2c_axp192.h | 2 +-
.../src/solidify/solidified_i2c_axp202.h | 2 +-
tasmota/berry/alexa/hue_test.be | 10 ++++----
tasmota/berry/alexa/light_state.be | 24 +++++++++++++------
7 files changed, 32 insertions(+), 22 deletions(-)
diff --git a/lib/libesp32/berry_tasmota/src/be_light_state_class.cpp b/lib/libesp32/berry_tasmota/src/be_light_state_class.cpp
index 5c278dd2d..7d81ce686 100644
--- a/lib/libesp32/berry_tasmota/src/be_light_state_class.cpp
+++ b/lib/libesp32/berry_tasmota/src/be_light_state_class.cpp
@@ -44,9 +44,9 @@ extern void ls_set_reachable(class LightStateClass* l, int32_t pow); BE_FUNC_CTY
extern void ls_signal_change(void) {} BE_FUNC_CTYPE_DECLARE(ls_signal_change, "", ".");
-extern int32_t ls_gamma8(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_gamma8, "i", "-i")
-extern int32_t ls_gamma10(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_gamma10, "i", "-i")
-extern int32_t ls_rev_gamma10(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_rev_gamma10, "i", "-i")
+extern int32_t ls_gamma8(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_gamma8, "i", "i")
+extern int32_t ls_gamma10(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_gamma10, "i", "i")
+extern int32_t ls_rev_gamma10(int32_t val); BE_FUNC_CTYPE_DECLARE(ls_rev_gamma10, "i", "i")
// moved to constants array
const be_const_member_t light_state_members[] = {
@@ -112,9 +112,9 @@ class be_class_light_state (scope: global, name: light_state) {
signal_change, ctype_func(ls_signal_change)
- gamma8, ctype_func(ls_gamma8)
- gamma10, ctype_func(ls_gamma10)
- reverse_gamma10, ctype_func(ls_rev_gamma10)
+ gamma8, static_ctype_func(ls_gamma8)
+ gamma10, static_ctype_func(ls_gamma10)
+ reverse_gamma10, static_ctype_func(ls_rev_gamma10)
}
@const_object_info_end */
diff --git a/lib/libesp32/berry_tasmota/src/embedded/hue_bridge.be b/lib/libesp32/berry_tasmota/src/embedded/hue_bridge.be
index 62a0982bf..740fd169d 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/hue_bridge.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/hue_bridge.be
@@ -23,7 +23,7 @@ hue_bridge.init = def (m)
if !manuf manuf = "Tasmota" end
self.lights[id] = { 'light': light, 'name':name, 'model': str(model), 'manuf':str(manuf) }
- light
+ return light
end
def remove_light(id)
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_hue_bridge.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_hue_bridge.h
index 14f64cfa5..caad7d225 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_hue_bridge.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_hue_bridge.h
@@ -171,7 +171,7 @@ be_local_closure(hue_bridge_monad_add_light, /* name */
0x7C200200, // 0027 CALL R8 1
0x981E1A08, // 0028 SETIDX R7 K13 R8
0x98180207, // 0029 SETIDX R6 R1 R7
- 0x80000000, // 002A RET 0
+ 0x80040400, // 002A RET 1 R2
})
)
);
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp192.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp192.h
index 2ef43a553..97c7d8cb3 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp192.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp192.h
@@ -72,7 +72,7 @@ be_local_closure(AXP192_get_bat_power, /* name */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str(read24),
- /* K1 */ be_const_real_hex(0x3A102DE0),
+ /* K1 */ be_const_real_hex(0x3A102DE1),
}),
&be_const_str_get_bat_power,
&be_const_str_solidified,
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp202.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp202.h
index a912b0660..4d8199e1d 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp202.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_i2c_axp202.h
@@ -172,7 +172,7 @@ be_local_closure(AXP202_get_bat_power, /* name */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str(read24),
- /* K1 */ be_const_real_hex(0x3A102DE0),
+ /* K1 */ be_const_real_hex(0x3A102DE1),
}),
&be_const_str_get_bat_power,
&be_const_str_solidified,
diff --git a/tasmota/berry/alexa/hue_test.be b/tasmota/berry/alexa/hue_test.be
index 01d095440..5acb17f3a 100644
--- a/tasmota/berry/alexa/hue_test.be
+++ b/tasmota/berry/alexa/hue_test.be
@@ -17,13 +17,13 @@ assert(l.power == false)
l.set_power(true)
assert(l.power == true)
-import hue_ntv
-print(l._p)
-print(hue_ntv.light_state(l))
-
-print(hue_ntv.full_state(3, l, "aaa", "bbb", "ccc"))
+# import hue_ntv
+# print(l._p)
+# print(hue_ntv.light_state(l))
+# print(hue_ntv.full_state(3, l, "aaa", "bbb", "ccc"))
+import hue_bridge
hue_bridge.add_light(10, l, "Synthetic Light", "V1", "DeadParrot")
l1 = light_state(light_state.DIMMER)
diff --git a/tasmota/berry/alexa/light_state.be b/tasmota/berry/alexa/light_state.be
index a9024d428..81175f84b 100644
--- a/tasmota/berry/alexa/light_state.be
+++ b/tasmota/berry/alexa/light_state.be
@@ -36,11 +36,6 @@ assert(l.ct == 400)
assert(l.mode_ct)
-
-
-
-
-
# assert(l.x == 0.215944)
# assert(l.y == 0.700957)
@@ -69,7 +64,22 @@ c.set_xy(0.422, 0.548)
l = light_state(light_state.RGBCT)
l.set_rgb(30,40,90)
-assert(str(l.get()) == "{'mode_ct': false, 'hue': 230, 'rgb': '1E285A', 'bri': 90, 'channels': [30, 40, 90, 0, 0], 'mode_rgb': true, 'sat': 170}")
+assert(str(l.get()) == "{'rgb': '1E285A', 'hue': 230, 'type': 5, 'power': false, 'bri': 90, 'mode_rgb': true, 'sat': 170, 'mode_ct': false, 'channels': [30, 40, 90, 0, 0]}")
l.set_ct(340)
-assert(str(l.get()) == "{'bri': 90, 'ct': 340, 'mode_ct': true, 'mode_rgb': false, 'channels': [0, 0, 0, 42, 48]}")
+assert(str(l.get()) == "{'mode_ct': true, 'ct': 340, 'channels': [0, 0, 0, 42, 48], 'bri': 90, 'type': 5, 'mode_rgb': false, 'power': false}")
+
+# gamma functions
+assert(light_state.gamma8(0) == 0)
+assert(light_state.gamma8(100) == 20)
+assert(light_state.gamma8(255) == 255)
+
+assert(light_state.gamma10(0) == 0)
+assert(light_state.gamma10(100) == 7)
+assert(light_state.gamma10(255) == 25)
+assert(light_state.gamma10(1023) == 1023)
+
+assert(light_state.reverse_gamma10(0) == 0)
+assert(light_state.reverse_gamma10(7) == 107)
+assert(light_state.reverse_gamma10(25) == 253)
+assert(light_state.reverse_gamma10(1023) == 1023)
From 11a43ea99b19ef682f02b725c78d5a9557f26055 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Thu, 20 Apr 2023 20:01:35 +0200
Subject: [PATCH 013/289] Tasmota Core 208 (#18460)
* Tasmota Core 2.0.8
* Fix Linker errors
---
.github/PULL_REQUEST_TEMPLATE.md | 2 +-
CHANGELOG.md | 1 +
.../Zip-readonly-FS/src/ZipReadFS.cpp | 24 ++++++++++++-------
platformio.ini | 2 +-
platformio_tasmota32.ini | 4 ++--
.../xdrv_23_zigbee_7_6_flash_fs.ino | 7 ++++--
6 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index f99a39107..edb419e1c 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -7,7 +7,7 @@
- [ ] Only relevant files were touched
- [ ] Only one feature/fix was added per PR and the code change compiles without warnings
- [ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.4.9
- - [ ] The code change is tested and works with Tasmota core ESP32 V.2.0.7
+ - [ ] The code change is tested and works with Tasmota core ESP32 V.2.0.8
- [ ] I accept the [CLA](https://github.com/arendst/Tasmota/blob/development/CONTRIBUTING.md#contributor-license-agreement-cla).
_NOTE: The code change must pass CI tests. **Your PR cannot be merged unless tests pass**_
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4307c6f5b..92464b961 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Breaking Changed
### Changed
+- ESP32 Framework (Core) from v2.0.7 to v2.0.8
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
diff --git a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
index 278802e9b..5e642105b 100644
--- a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
+++ b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp
@@ -37,7 +37,7 @@ enum LoggingLevels {LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_D
time_t dos2unixtime(uint32_t dostime)
/* Return the Unix time_t value (GMT/UTC time) for the DOS format (local)
* time dostime, where dostime is a four byte value (date in most
- * significant word, time in least significant word), see dostime()
+ * significant word, time in least significant word), see dostime()
* function.
*/
{
@@ -174,8 +174,6 @@ public:
bool setBufferSize(size_t size) {
return true;
}
-
- #if ESP_ARDUINO_VERSION > ESP_ARDUINO_VERSION_VAL(2, 0, 5)
bool seekDir(long position){
if(!_f){
return false;
@@ -189,7 +187,14 @@ public:
}
return _f.getNextFileName();
}
- #endif
+ String getNextFileName(bool *isDir)
+ {
+ if (!_f) {
+ return "";
+ }
+ return _f.getNextFileName(isDir);
+
+ }
protected:
File _f;
@@ -300,15 +305,12 @@ public:
FileImplPtr openNextFile(const char* mode) {
return nullptr; // TODO
}
-
- #if ESP_ARDUINO_VERSION > ESP_ARDUINO_VERSION_VAL(2, 0, 5)
bool seekDir(long position){
if(!_f){
return false;
}
return _f.seekDir(position);
}
-
String getNextFileName(void)
{
if (!_f) {
@@ -316,8 +318,14 @@ public:
}
return _f.getNextFileName();
}
- #endif
+ String getNextFileName(bool *isDir)
+ {
+ if (!_f) {
+ return "";
+ }
+ return _f.getNextFileName(isDir);
+ }
void rewindDirectory(void) {
// ignore
}
diff --git a/platformio.ini b/platformio.ini
index 595e9736c..b04fef1ab 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -115,7 +115,7 @@ build_flags = ${esp_defaults.build_flags}
[core]
; *** Esp8266 Tasmota modified Arduino core based on core 2.7.4. Added Backport for PWM selection
-platform = https://github.com/tasmota/platform-espressif8266/releases/download/2023.03.00/platform-espressif8266.zip
+platform = https://github.com/tasmota/platform-espressif8266/releases/download/2023.04.00/platform-espressif8266.zip
platform_packages =
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini
index 8de701529..eb4e6b051 100644
--- a/platformio_tasmota32.ini
+++ b/platformio_tasmota32.ini
@@ -42,7 +42,7 @@ extra_scripts = pre:pio-tools/add_c_flags.py
${esp_defaults.extra_scripts}
[core32]
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.02.00/platform-espressif32.zip
-platform_packages = framework-arduinoespressif32 @ https://github.com/tasmota/arduino-esp32/releases/download/pre2.0.8/framework-arduinoespressif32.zip
+platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.00/platform-espressif32.zip
+platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_6_flash_fs.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_6_flash_fs.ino
index 1900e7122..0554c8de4 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_6_flash_fs.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_6_flash_fs.ino
@@ -108,7 +108,6 @@ public:
}
#ifdef ESP32
- #if ESP_ARDUINO_VERSION > ESP_ARDUINO_VERSION_VAL(2, 0, 5)
bool seekDir(long position){
return false;
// ignore
@@ -118,7 +117,11 @@ public:
return "";
// ignore
}
- #endif
+ String getNextFileName(bool *isDir)
+ {
+ return "";
+ // ignore
+ }
#endif // ESP32
const char* name() const {
From 49d5356ea312db41101ec9a4fd908ddb006cde99 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Thu, 20 Apr 2023 20:26:07 +0200
Subject: [PATCH 014/289] Show Metrics for ESP32x firmware (#18461)
---
pio-tools/name-firmware.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py
index 09edb2866..524f712e6 100644
--- a/pio-tools/name-firmware.py
+++ b/pio-tools/name-firmware.py
@@ -28,5 +28,11 @@ def bin_map_copy(source, target, env):
shutil.move(tasmotapiolib.get_source_map_path(env), map_file)
if env["PIOPLATFORM"] == "espressif32":
shutil.copy(factory, one_bin_file)
-
-env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy)
\ No newline at end of file
+ # Print Metrics for firmware using "map" file
+ import esp_idf_size
+ CYAN = '\033[96m'
+ ENDC = '\033[0m'
+ print(CYAN + "=============================================================================================" + ENDC)
+ env.Execute("$PYTHONEXE -m esp_idf_size " + str(map_file.resolve()))
+ print(CYAN + "=============================================================================================" + ENDC)
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy)
From 3c57755bb78540fe0bd1a3e73977cb75bcf90ddf Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 08:59:49 +0200
Subject: [PATCH 015/289] Berry fix rules for string comparisons (#18464)
---
CHANGELOG.md | 1 +
.../src/embedded/rule_matcher.be | 26 ++++++++++++-------
.../src/solidify/solidified_rule_matcher.h | 2 +-
3 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92464b961..d0fcd033b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
- NovaSDS GUI values (#18444)
+- Berry fix rules for string comparisons
### Removed
diff --git a/lib/libesp32/berry_tasmota/src/embedded/rule_matcher.be b/lib/libesp32/berry_tasmota/src/embedded/rule_matcher.be
index a3005e6b1..b28b97b3d 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/rule_matcher.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/rule_matcher.be
@@ -17,8 +17,8 @@ tasmota.Rule_Matcher.parse("AA#BB#CC")
tasmota.Rule_Matcher.parse("AA")
# []
-tasmota.Rule_Matcher.parse("AA#BB#CC=2")
-# [, , , ]
+tasmota.Rule_Matcher.parse("AA#BB#CC==2")
+# [, , , ]
tasmota.Rule_Matcher.parse("AA#BB#CC>=3.5")
# [, , , =' val='3.5'>]
@@ -26,8 +26,8 @@ tasmota.Rule_Matcher.parse("AA#BB#CC>=3.5")
tasmota.Rule_Matcher.parse("AA#BB#CC!3.5")
# [, , ]
-tasmota.Rule_Matcher.parse("AA#BB#CC==3=5")
-# [, , , ]
+tasmota.Rule_Matcher.parse("AA#BB#CC=3=5")
+# [, , , ]
tasmota.Rule_Matcher.parse("AA#BB#!CC!==3=5")
# [, , , ]
@@ -39,16 +39,16 @@ tasmota.Rule_Matcher.parse("A#?#B")
# [, , ]
tasmota.Rule_Matcher.parse("A#?>50")
-# [, , ' val='50'>]
+# [, , ' val=50>]
tasmota.Rule_Matcher.parse("A[1]")
-# [, ]
+# [, ]
tasmota.Rule_Matcher.parse("A[1]#B[2]>3")
-# [, , , , ' val='3'>]
+# [, , , , ' val=3>]
tasmota.Rule_Matcher.parse("A#B[]>3")
-# [, , , ' val='3'>]
+# [, , , ' val=3>]
#################################################################################
@@ -67,7 +67,13 @@ assert(m.match({'aa':{'bb':1}}) == nil)
assert(m.match({'aa':{'bb':{'cc':1}}}) == nil)
assert(m.match({'aa':{'bb':{'cc':2}}}) == 2)
-m = tasmota.Rule_Matcher.parse("AA#?#CC==2")
+m = tasmota.Rule_Matcher.parse("AA#BB#CC=Foo")
+assert(m.match({'aa':{'bb':{'cc':1}}}) == nil)
+assert(m.match({'aa':{'bb':{'cc':'Foo'}}}) == 'Foo')
+assert(m.match({'aa':{'bb':{'cc':'foo'}}}) == 'foo')
+assert(m.match({'aa':{'bb':{'cc':'foobar'}}}) == nil)
+
+m = tasmota.Rule_Matcher.parse("AA#?#CC=2")
assert(m.match({'aa':1}) == nil)
assert(m.match({'aa':{'bb':{'cc':2}}}) == 2)
@@ -251,7 +257,7 @@ class Rule_Matcher
self.op_value = val_num
end
else
- self.op_value = str(op)
+ self.op_value = str(op_value)
end
end
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_rule_matcher.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_rule_matcher.h
index d00751b01..b8e5bbfb7 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_rule_matcher.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_rule_matcher.h
@@ -789,7 +789,7 @@ be_local_closure(Rule_Matcher_Operator_op_parse, /* name */
0x90022C13, // 005A SETMBR R0 K22 R19
0x70020003, // 005B JMP #0060
0x60480008, // 005C GETGBL R18 G8
- 0x5C4C0200, // 005D MOVE R19 R1
+ 0x5C4C0400, // 005D MOVE R19 R2
0x7C480200, // 005E CALL R18 1
0x90022C12, // 005F SETMBR R0 K22 R18
0x80000000, // 0060 RET 0
From ca88aa2519218c5775bce10b8e3bab2efd6f30e2 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Fri, 21 Apr 2023 14:24:29 +0200
Subject: [PATCH 016/289] fix c3 map metrics (#18465)
---
pio-tools/gzip-firmware.py | 4 ++++
pio-tools/name-firmware.py | 7 -------
platformio_tasmota32.ini | 2 +-
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/pio-tools/gzip-firmware.py b/pio-tools/gzip-firmware.py
index e03418262..19c323300 100644
--- a/pio-tools/gzip-firmware.py
+++ b/pio-tools/gzip-firmware.py
@@ -20,6 +20,10 @@ def map_gzip(source, target, env):
with map_file.open("rb") as fp:
with gzip.open(gzip_file, "wb", compresslevel=9) as f:
shutil.copyfileobj(fp, f)
+ if env["PIOPLATFORM"] == "espressif32":
+ # Print Metrics for firmware using "map" file
+ import tasmota_metrics
+ env.Execute("$PYTHONEXE -m tasmota_metrics " + str(map_file.resolve()))
# remove map file
if map_file.is_file():
diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py
index 524f712e6..47366990d 100644
--- a/pio-tools/name-firmware.py
+++ b/pio-tools/name-firmware.py
@@ -28,11 +28,4 @@ def bin_map_copy(source, target, env):
shutil.move(tasmotapiolib.get_source_map_path(env), map_file)
if env["PIOPLATFORM"] == "espressif32":
shutil.copy(factory, one_bin_file)
- # Print Metrics for firmware using "map" file
- import esp_idf_size
- CYAN = '\033[96m'
- ENDC = '\033[0m'
- print(CYAN + "=============================================================================================" + ENDC)
- env.Execute("$PYTHONEXE -m esp_idf_size " + str(map_file.resolve()))
- print(CYAN + "=============================================================================================" + ENDC)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy)
diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini
index eb4e6b051..cec17d738 100644
--- a/platformio_tasmota32.ini
+++ b/platformio_tasmota32.ini
@@ -42,7 +42,7 @@ extra_scripts = pre:pio-tools/add_c_flags.py
${esp_defaults.extra_scripts}
[core32]
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.00/platform-espressif32.zip
+platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.01/platform-espressif32.zip
platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
From 844db4bc549a73591b3f83ebc60b115f94f5f4e2 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Fri, 21 Apr 2023 14:57:59 +0200
Subject: [PATCH 017/289] Update changelogs
---
CHANGELOG.md | 2 +-
RELEASENOTES.md | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0fcd033b..1365dcecf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,7 +17,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
- NovaSDS GUI values (#18444)
-- Berry fix rules for string comparisons
+- Berry fix rules for string comparisons (#18464)
### Removed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 1470f9262..a34e698c9 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -36,9 +36,9 @@ While fallback or downgrading is common practice it was never supported due to S
This release will be supported from ESP8266/Arduino library Core version **2.7.4.9** due to reported security and stability issues on previous Core version. This will also support gzipped binaries.
-This release will be supported from ESP32/Arduino library Core version **2.0.7**.
+This release will be supported from ESP32/Arduino library Core version **2.0.8**.
-Support of ESP8266 Core versions before 2.7.4.9 and ESP32 Core versions before 2.0.7 have been removed.
+Support of ESP8266 Core versions before 2.7.4.9 and ESP32 Core versions before 2.0.8 have been removed.
## Support of TLS
@@ -80,7 +80,7 @@ Historical binaries can be downloaded from
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
### ESP32, ESP32-C3, ESP32-S2 and ESP32-S3 based
-The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.7**.
+The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.8**.
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
- **tasmota32xy.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3/S2/S3 and 4M+ flash.
@@ -119,7 +119,9 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
### Breaking Changed
### Changed
+- ESP32 Framework (Core) from v2.0.7 to v2.0.8
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
-- NovaSDS GUI values [#18444](https://github.com/arendst/Tasmota/issues/18444)
\ No newline at end of file
+- NovaSDS GUI values [#18444](https://github.com/arendst/Tasmota/issues/18444)
+- Berry fix rules for string comparisons [#18464](https://github.com/arendst/Tasmota/issues/18464)
\ No newline at end of file
From 5a2266289e829939f418da4bd0881fb93e9819cc Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Fri, 21 Apr 2023 16:55:09 +0200
Subject: [PATCH 018/289] Update Sievert
---
tasmota/language/af_AF.h | 2 +-
tasmota/language/bg_BG.h | 2 +-
tasmota/language/ca_AD.h | 2 +-
tasmota/language/cs_CZ.h | 2 +-
tasmota/language/de_DE.h | 2 +-
tasmota/language/el_GR.h | 2 +-
tasmota/language/en_GB.h | 2 +-
tasmota/language/es_ES.h | 2 +-
tasmota/language/fr_FR.h | 2 +-
tasmota/language/fy_NL.h | 2 +-
tasmota/language/he_HE.h | 2 +-
tasmota/language/hu_HU.h | 2 +-
tasmota/language/it_IT.h | 2 +-
tasmota/language/ko_KO.h | 2 +-
tasmota/language/nl_NL.h | 2 +-
tasmota/language/pl_PL.h | 2 +-
tasmota/language/pt_BR.h | 2 +-
tasmota/language/pt_PT.h | 2 +-
tasmota/language/ro_RO.h | 2 +-
tasmota/language/ru_RU.h | 2 +-
tasmota/language/sk_SK.h | 2 +-
tasmota/language/sv_SE.h | 2 +-
tasmota/language/tr_TR.h | 2 +-
tasmota/language/uk_UA.h | 2 +-
tasmota/language/vi_VN.h | 2 +-
tasmota/language/zh_CN.h | 2 +-
tasmota/language/zh_TW.h | 2 +-
27 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h
index 067ecf05d..9e3bd4c85 100644
--- a/tasmota/language/af_AF.h
+++ b/tasmota/language/af_AF.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "Gemiddelde Stralingsdosis"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_AF_AF_H_
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index ca0eabab2..c3cbbc090 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "средна доза радиация"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_BG_BG_H_
diff --git a/tasmota/language/ca_AD.h b/tasmota/language/ca_AD.h
index 20b427448..9a4b04e36 100644
--- a/tasmota/language/ca_AD.h
+++ b/tasmota/language/ca_AD.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "dosi mitjana de radiació"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_CA_AD_H_
diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h
index 0752be295..d0afa8994 100644
--- a/tasmota/language/cs_CZ.h
+++ b/tasmota/language/cs_CZ.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "průměrná dávka záření"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_CS_CZ_H_
diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h
index 7ced98891..cee4dcf77 100644
--- a/tasmota/language/de_DE.h
+++ b/tasmota/language/de_DE.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "durchschnittliche Strahlendosis"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_DE_DE_H_
diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h
index 7228d86bb..cd4943ae5 100644
--- a/tasmota/language/el_GR.h
+++ b/tasmota/language/el_GR.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "μέση δόση ακτινοβολίας"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_EL_GR_H_
diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h
index 899a5691c..b3aafeda2 100644
--- a/tasmota/language/en_GB.h
+++ b/tasmota/language/en_GB.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "Average Radiation Dose"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_EN_GB_H_
diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h
index 4a8585a01..fa98fe4c2 100644
--- a/tasmota/language/es_ES.h
+++ b/tasmota/language/es_ES.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "dosis media de radiación"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_ES_ES_H_
diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h
index 3991ac470..85e128b19 100644
--- a/tasmota/language/fr_FR.h
+++ b/tasmota/language/fr_FR.h
@@ -1192,6 +1192,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "dose moyenne de rayonnement"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_FR_FR_H_
diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h
index eab5616e8..b62305b8e 100644
--- a/tasmota/language/fy_NL.h
+++ b/tasmota/language/fy_NL.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "gemiddelde stralingsdosis"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_FY_NL_H_
diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h
index 971d6c3e5..ca11fa22b 100644
--- a/tasmota/language/he_HE.h
+++ b/tasmota/language/he_HE.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "מינון קרינה ממוצע"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_HE_HE_H_
diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h
index 71944db5a..8b98a4001 100644
--- a/tasmota/language/hu_HU.h
+++ b/tasmota/language/hu_HU.h
@@ -1194,6 +1194,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "átlagos sugárdózis"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_HU_HU_H_
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index f04fb0d5c..26d70715a 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "Dose media radiazioni"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_IT_IT_H_
diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h
index 13213e643..e7cb05063 100644
--- a/tasmota/language/ko_KO.h
+++ b/tasmota/language/ko_KO.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "average radiation dose"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_KO_KO_H_
diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h
index e4fd27026..61f1e73ad 100644
--- a/tasmota/language/nl_NL.h
+++ b/tasmota/language/nl_NL.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "gemiddelde stralingsdosis"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_NL_NL_H_
diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h
index 71d11945c..fe9696836 100644
--- a/tasmota/language/pl_PL.h
+++ b/tasmota/language/pl_PL.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "Średnia Dawka Promieniowania"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_PL_PL_D_H_
diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h
index 6d43be611..6d761c635 100644
--- a/tasmota/language/pt_BR.h
+++ b/tasmota/language/pt_BR.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "dose média de radiação"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_PT_BR_H_
diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h
index a91db261a..04062483d 100644
--- a/tasmota/language/pt_PT.h
+++ b/tasmota/language/pt_PT.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "dose média de radiação"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_PT_PT_H_
diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h
index f9b5b79b7..cc61f7a62 100644
--- a/tasmota/language/ro_RO.h
+++ b/tasmota/language/ro_RO.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "doza medie de radiație"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_RO_RO_H_
diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h
index d1192b842..be1bc68bb 100644
--- a/tasmota/language/ru_RU.h
+++ b/tasmota/language/ru_RU.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "средняя доза облучения"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_RU_RU_H_
diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h
index 30ebb0149..e4adf2d20 100644
--- a/tasmota/language/sk_SK.h
+++ b/tasmota/language/sk_SK.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "priemerná dávka žiarenia"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_SK_SK_H_
diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h
index 1881739c6..2874e4f7f 100644
--- a/tasmota/language/sv_SE.h
+++ b/tasmota/language/sv_SE.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "genomsnittlig stråldos"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_SV_SE_H_
diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h
index 7fecfa418..ed0bfd4f3 100644
--- a/tasmota/language/tr_TR.h
+++ b/tasmota/language/tr_TR.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "ortalama radyasyon dozu"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_TR_TR_H_
diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h
index 70acfb5b0..6f77a9267 100644
--- a/tasmota/language/uk_UA.h
+++ b/tasmota/language/uk_UA.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "середня доза радіації"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_UK_UA_H_
diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h
index 9a0c740c4..8dede81a6 100644
--- a/tasmota/language/vi_VN.h
+++ b/tasmota/language/vi_VN.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "liều bức xạ trung bình"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_VI_VN_H_
diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h
index f32ab17bd..4dac8796f 100644
--- a/tasmota/language/zh_CN.h
+++ b/tasmota/language/zh_CN.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "平均辐射剂量"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_ZH_CN_H_
diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h
index d34686626..6e3689ab4 100644
--- a/tasmota/language/zh_TW.h
+++ b/tasmota/language/zh_TW.h
@@ -1191,6 +1191,6 @@
// xsns_106_gdk101.ino
#define D_AVG_RAD_DOSE "平均輻射劑量"
-#define D_UNIT_US_H "uSv/h"
+#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_ZH_TW_H_
From 112c254d54a535378ccca0beb46ed8dfb91d0ccf Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Fri, 21 Apr 2023 16:56:27 +0200
Subject: [PATCH 019/289] refac firmware-metrics (#18466)
* refac firmware-metrics
* rm debugging print
* fix esp8266
---
pio-tools/gzip-firmware.py | 4 ----
pio-tools/metrics-firmware.py | 9 +++++++++
pio-tools/name-firmware.py | 5 ++++-
platformio.ini | 1 +
4 files changed, 14 insertions(+), 5 deletions(-)
create mode 100644 pio-tools/metrics-firmware.py
diff --git a/pio-tools/gzip-firmware.py b/pio-tools/gzip-firmware.py
index 19c323300..e03418262 100644
--- a/pio-tools/gzip-firmware.py
+++ b/pio-tools/gzip-firmware.py
@@ -20,10 +20,6 @@ def map_gzip(source, target, env):
with map_file.open("rb") as fp:
with gzip.open(gzip_file, "wb", compresslevel=9) as f:
shutil.copyfileobj(fp, f)
- if env["PIOPLATFORM"] == "espressif32":
- # Print Metrics for firmware using "map" file
- import tasmota_metrics
- env.Execute("$PYTHONEXE -m tasmota_metrics " + str(map_file.resolve()))
# remove map file
if map_file.is_file():
diff --git a/pio-tools/metrics-firmware.py b/pio-tools/metrics-firmware.py
new file mode 100644
index 000000000..d9fb7a9ad
--- /dev/null
+++ b/pio-tools/metrics-firmware.py
@@ -0,0 +1,9 @@
+Import("env")
+
+import tasmotapiolib
+def firm_metrics(source, target, env):
+ if env["PIOPLATFORM"] == "espressif32":
+ import tasmota_metrics
+ env.Execute("$PYTHONEXE -m tasmota_metrics " + str(tasmotapiolib.get_source_map_path(env).resolve()))
+
+env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin",firm_metrics)
\ No newline at end of file
diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py
index 47366990d..6162500da 100644
--- a/pio-tools/name-firmware.py
+++ b/pio-tools/name-firmware.py
@@ -25,7 +25,10 @@ def bin_map_copy(source, target, env):
# copy firmware.bin and map to final destination
shutil.copy(firsttarget, bin_file)
- shutil.move(tasmotapiolib.get_source_map_path(env), map_file)
if env["PIOPLATFORM"] == "espressif32":
+ # the map file is needed later for fimrmware-metrics.py
+ shutil.copy(tasmotapiolib.get_source_map_path(env), map_file)
shutil.copy(factory, one_bin_file)
+ else:
+ shutil.move(tasmotapiolib.get_source_map_path(env), map_file)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy)
diff --git a/platformio.ini b/platformio.ini
index b04fef1ab..83d80aa24 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -73,6 +73,7 @@ extra_scripts = pre:pio-tools/pre_source_dir.py
[esp_defaults]
extra_scripts = post:pio-tools/name-firmware.py
post:pio-tools/gzip-firmware.py
+ post:pio-tools/metrics-firmware.py
post:pio-tools/custom_target.py
; post:pio-tools/obj-dump.py
${scripts_defaults.extra_scripts}
From a6aa8924eab0fb1e418afe295d07c6933ab8de1a Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Fri, 21 Apr 2023 18:11:50 +0200
Subject: [PATCH 020/289] Platform version 2023.04.03 (#18467)
---
platformio_tasmota32.ini | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini
index cec17d738..9582375b2 100644
--- a/platformio_tasmota32.ini
+++ b/platformio_tasmota32.ini
@@ -42,7 +42,7 @@ extra_scripts = pre:pio-tools/add_c_flags.py
${esp_defaults.extra_scripts}
[core32]
-platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.01/platform-espressif32.zip
+platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.04.02/platform-espressif32.zip
platform_packages =
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
From 01ba3d28cd881f39ca6ec9e00406e90b6367534b Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 21:59:45 +0200
Subject: [PATCH 021/289] Berry apply fixes from upstream (#18470)
* Berry apply fixes from upstream
* Fix
---
lib/libesp32/berry/default/be_modtab.c | 2 +-
lib/libesp32/berry/src/be_constobj.h | 4 +-
lib/libesp32/berry/src/be_debug.c | 7 +-
lib/libesp32/berry/src/be_jsonlib.c | 16 +
lib/libesp32/berry/src/be_module.c | 20 +-
lib/libesp32/berry/src/be_module.h | 2 +-
lib/libesp32/berry/src/be_vm.c | 81 +-
lib/libesp32/berry/src/berry.h | 2170 +++++++++++++++++++++---
8 files changed, 2042 insertions(+), 260 deletions(-)
diff --git a/lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c
index d85c26177..5051dd948 100644
--- a/lib/libesp32/berry/default/be_modtab.c
+++ b/lib/libesp32/berry/default/be_modtab.c
@@ -75,7 +75,7 @@ be_extern_native_module(matter);
/* user-defined modules declare end */
/* module list declaration */
-BERRY_LOCAL const bntvmodule* const be_module_table[] = {
+BERRY_LOCAL const bntvmodule_t* const be_module_table[] = {
/* default modules register */
#if BE_USE_STRING_MODULE
&be_native_module(string),
diff --git a/lib/libesp32/berry/src/be_constobj.h b/lib/libesp32/berry/src/be_constobj.h
index 23b41bea6..3ef55eebd 100644
--- a/lib/libesp32/berry/src/be_constobj.h
+++ b/lib/libesp32/berry/src/be_constobj.h
@@ -196,7 +196,7 @@ const bvector _name = { \
}
#define be_define_const_native_module(_module) \
-const bntvmodule be_native_module(_module) = { \
+const bntvmodule_t be_native_module(_module) = { \
.name = #_module, \
.attrs = NULL, \
.size = 0, \
@@ -422,7 +422,7 @@ const bvector _name = { \
}
#define be_define_const_native_module(_module) \
-const bntvmodule be_native_module_##_module = { \
+const bntvmodule_t be_native_module_##_module = { \
#_module, \
0, 0, \
(bmodule*)&(m_lib##_module) \
diff --git a/lib/libesp32/berry/src/be_debug.c b/lib/libesp32/berry/src/be_debug.c
index 2432abaf0..4cd44bf61 100644
--- a/lib/libesp32/berry/src/be_debug.c
+++ b/lib/libesp32/berry/src/be_debug.c
@@ -49,7 +49,7 @@ static const char* opc2str(bopcode op)
void be_print_inst(binstruction ins, int pc, void* fout)
{
- char __lbuf[INST_BUF_SIZE];
+ char __lbuf[INST_BUF_SIZE + 1], __lbuf_tmp[INST_BUF_SIZE];
bopcode op = IGET_OP(ins);
logbuf(" %.4X ", pc);
@@ -137,7 +137,8 @@ void be_print_inst(binstruction ins, int pc, void* fout)
logbuf("%s", opc2str(op));
break;
}
- logbuf("%s\n", __lbuf);
+ memcpy(__lbuf_tmp, __lbuf, strlen(__lbuf));
+ logbuf("%s\n", __lbuf_tmp);
if (fout) {
be_fwrite(fout, __lbuf, strlen(__lbuf));
} else {
@@ -253,7 +254,7 @@ void be_tracestack(bvm *vm)
static void hook_callnative(bvm *vm, int mask)
{
- bhookinfo info;
+ bhookinfo_t info;
int top = be_top(vm);
bcallframe *cf = vm->cf;
bclosure *cl = var_toobj(cf->func);
diff --git a/lib/libesp32/berry/src/be_jsonlib.c b/lib/libesp32/berry/src/be_jsonlib.c
index 9550d642a..db2b20677 100644
--- a/lib/libesp32/berry/src/be_jsonlib.c
+++ b/lib/libesp32/berry/src/be_jsonlib.c
@@ -202,6 +202,7 @@ static const char* parser_string(bvm *vm, const char *json)
static const char* parser_field(bvm *vm, const char *json)
{
+ be_stack_require(vm, 2 + BE_STACK_FREE_MIN);
if (json && *json == '"') {
json = parser_string(vm, json);
if (json) {
@@ -368,6 +369,11 @@ static const char* parser_number(bvm *vm, const char *json)
static const char* parser_value(bvm *vm, const char *json)
{
json = skip_space(json);
+ /*
+ Each value will push at least one thig to the stack, so we must ensure it's big enough.
+ We need to take special care to extend the stack in values which have variable length (arrays and objects)
+ */
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
switch (*json) {
case '{': /* object */
return parser_object(vm, json);
@@ -404,6 +410,7 @@ static int m_json_load(bvm *vm)
static void make_indent(bvm *vm, int stridx, int indent)
{
if (indent) {
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
char buf[MAX_INDENT * INDENT_WIDTH + 1];
indent = (indent < MAX_INDENT ? indent : MAX_INDENT) * INDENT_WIDTH;
memset(buf, INDENT_CHAR, indent);
@@ -417,6 +424,7 @@ static void make_indent(bvm *vm, int stridx, int indent)
void string_dump(bvm *vm, int index)
{
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
be_tostring(vm, index); /* convert value to string */
be_toescape(vm, index, 'u');
be_pushvalue(vm, index);
@@ -424,11 +432,14 @@ void string_dump(bvm *vm, int index)
static void object_dump(bvm *vm, int *indent, int idx, int fmt)
{
+
+ be_stack_require(vm, 3 + BE_STACK_FREE_MIN); /* 3 pushes outside the loop */
be_getmember(vm, idx, ".p");
be_pushstring(vm, fmt ? "{\n" : "{");
be_pushiter(vm, -2); /* map iterator use 1 register */
*indent += fmt;
while (be_iter_hasnext(vm, -3)) {
+ be_stack_require(vm, 3 + BE_STACK_FREE_MIN); /* 3 pushes inside the loop */
make_indent(vm, -2, fmt ? *indent : 0);
be_iter_next(vm, -3);
/* key.tostring() */
@@ -463,6 +474,7 @@ static void object_dump(bvm *vm, int *indent, int idx, int fmt)
static void array_dump(bvm *vm, int *indent, int idx, int fmt)
{
+ be_stack_require(vm, 3 + BE_STACK_FREE_MIN);
be_getmember(vm, idx, ".p");
be_pushstring(vm, fmt ? "[\n" : "[");
be_pushiter(vm, -2);
@@ -473,6 +485,7 @@ static void array_dump(bvm *vm, int *indent, int idx, int fmt)
value_dump(vm, indent, -1, fmt);
be_strconcat(vm, -4);
be_pop(vm, 2);
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
if (be_iter_hasnext(vm, -3)) {
be_pushstring(vm, fmt ? ",\n" : ",");
be_strconcat(vm, -3);
@@ -494,13 +507,16 @@ static void array_dump(bvm *vm, int *indent, int idx, int fmt)
static void value_dump(bvm *vm, int *indent, int idx, int fmt)
{
+ // be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
if (is_object(vm, "map", idx)) { /* convert to json object */
object_dump(vm, indent, idx, fmt);
} else if (is_object(vm, "list", idx)) { /* convert to json array */
array_dump(vm, indent, idx, fmt);
} else if (be_isnil(vm, idx)) { /* convert to json null */
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
be_pushstring(vm, "null");
} else if (be_isnumber(vm, idx) || be_isbool(vm, idx)) { /* convert to json number and boolean */
+ be_stack_require(vm, 1 + BE_STACK_FREE_MIN);
be_tostring(vm, idx);
be_pushvalue(vm, idx); /* push to top */
} else { /* convert to string */
diff --git a/lib/libesp32/berry/src/be_module.c b/lib/libesp32/berry/src/be_module.c
index 2d5e826b6..ff5503011 100644
--- a/lib/libesp32/berry/src/be_module.c
+++ b/lib/libesp32/berry/src/be_module.c
@@ -36,14 +36,14 @@
#endif
#endif
-extern BERRY_LOCAL const bntvmodule* const be_module_table[];
+extern BERRY_LOCAL const bntvmodule_t* const be_module_table[];
-static bmodule* native_module(bvm *vm, const bntvmodule *nm, bvalue *dst);
+static bmodule* native_module(bvm *vm, const bntvmodule_t *nm, bvalue *dst);
-static const bntvmodule* find_native(bstring *path)
+static const bntvmodule_t* find_native(bstring *path)
{
- const bntvmodule *module;
- const bntvmodule* const *node = be_module_table;
+ const bntvmodule_t *module;
+ const bntvmodule_t* const *node = be_module_table;
for (; (module = *node) != NULL; ++node) {
if (!strcmp(module->name, str(path))) {
return module;
@@ -52,11 +52,11 @@ static const bntvmodule* find_native(bstring *path)
return NULL;
}
-static void insert_attrs(bvm *vm, bmap *table, const bntvmodule *nm)
+static void insert_attrs(bvm *vm, bmap *table, const bntvmodule_t *nm)
{
size_t i;
for (i = 0; i < nm->size; ++i) {
- const bntvmodobj *node = nm->attrs + i;
+ const bntvmodobj_t *node = nm->attrs + i;
bstring *name = be_newstr(vm, node->name);
bvalue *v = be_map_insertstr(vm, table, name, NULL);
be_assert(node->type <= BE_CMODULE);
@@ -88,7 +88,7 @@ static void insert_attrs(bvm *vm, bmap *table, const bntvmodule *nm)
}
}
-static bmodule* new_module(bvm *vm, const bntvmodule *nm)
+static bmodule* new_module(bvm *vm, const bntvmodule_t *nm)
{
bgcobject *gco = be_gcnew(vm, BE_MODULE, bmodule);
bmodule *obj = cast_module(gco);
@@ -105,7 +105,7 @@ static bmodule* new_module(bvm *vm, const bntvmodule *nm)
return obj;
}
-static bmodule* native_module(bvm *vm, const bntvmodule *nm, bvalue *dst)
+static bmodule* native_module(bvm *vm, const bntvmodule_t *nm, bvalue *dst)
{
if (nm) {
bmodule *obj;
@@ -221,7 +221,7 @@ static int load_package(bvm *vm, bstring *path)
static int load_native(bvm *vm, bstring *path)
{
- const bntvmodule *nm = find_native(path);
+ const bntvmodule_t *nm = find_native(path);
bmodule *mod = native_module(vm, nm, NULL);
if (mod != NULL) {
/* the pointer vm->top may be changed */
diff --git a/lib/libesp32/berry/src/be_module.h b/lib/libesp32/berry/src/be_module.h
index 26760660f..0d6c76e4b 100644
--- a/lib/libesp32/berry/src/be_module.h
+++ b/lib/libesp32/berry/src/be_module.h
@@ -16,7 +16,7 @@ typedef struct bmodule {
bcommon_header;
bmap *table;
union infodata {
- const bntvmodule *native;
+ const bntvmodule_t *native;
const char *name;
const bstring *sname;
#ifdef __cplusplus
diff --git a/lib/libesp32/berry/src/be_vm.c b/lib/libesp32/berry/src/be_vm.c
index ffc55977a..eb2b6ef63 100644
--- a/lib/libesp32/berry/src/be_vm.c
+++ b/lib/libesp32/berry/src/be_vm.c
@@ -109,31 +109,54 @@
} \
return res
-#define relop_rule(op) \
- bbool res; \
- if (var_isint(a) && var_isint(b)) { \
- res = ibinop(op, a, b); \
- } else if (var_isnumber(a) && var_isnumber(b)) { \
- /* res = var2real(a) op var2real(b); */ \
- union bvaldata x, y; /* TASMOTA workaround for ESP32 rev0 bug */ \
- x.i = a->v.i;\
- if (var_isint(a)) { x.r = (breal) x.i; }\
- y.i = b->v.i;\
- if (var_isint(b)) { y.r = (breal) y.i; }\
- res = x.r op y.r; \
- } else if (var_isstr(a) && var_isstr(b)) { \
- bstring *s1 = var_tostr(a), *s2 = var_tostr(b); \
- res = be_strcmp(s1, s2) op 0; \
- } else if (var_isinstance(a)) { \
- binstance *obj = var_toobj(a); \
- object_binop(vm, #op, *a, *b); \
- check_bool(vm, obj, #op); \
- res = var_tobool(vm->top); \
- } else { \
- binop_error(vm, #op, a, b); \
- res = bfalse; /* will not be executed */ \
- } \
- return res
+/* when running on ESP32 in IRAM, there is a bug in early chip revision */
+#ifdef ESP32
+ #define relop_rule(op) \
+ bbool res; \
+ if (var_isint(a) && var_isint(b)) { \
+ res = ibinop(op, a, b); \
+ } else if (var_isnumber(a) && var_isnumber(b)) { \
+ /* res = var2real(a) op var2real(b); */ \
+ union bvaldata x, y; /* TASMOTA workaround for ESP32 rev0 bug */ \
+ x.i = a->v.i;\
+ if (var_isint(a)) { x.r = (breal) x.i; }\
+ y.i = b->v.i;\
+ if (var_isint(b)) { y.r = (breal) y.i; }\
+ res = x.r op y.r; \
+ } else if (var_isstr(a) && var_isstr(b)) { \
+ bstring *s1 = var_tostr(a), *s2 = var_tostr(b); \
+ res = be_strcmp(s1, s2) op 0; \
+ } else if (var_isinstance(a)) { \
+ binstance *obj = var_toobj(a); \
+ object_binop(vm, #op, *a, *b); \
+ check_bool(vm, obj, #op); \
+ res = var_tobool(vm->top); \
+ } else { \
+ binop_error(vm, #op, a, b); \
+ res = bfalse; /* will not be executed */ \
+ } \
+ return res
+#else // ESP32
+ #define relop_rule(op) \
+ bbool res; \
+ if (var_isint(a) && var_isint(b)) { \
+ res = ibinop(op, a, b); \
+ } else if (var_isnumber(a) && var_isnumber(b)) { \
+ res = var2real(a) op var2real(b); \
+ } else if (var_isstr(a) && var_isstr(b)) { \
+ bstring *s1 = var_tostr(a), *s2 = var_tostr(b); \
+ res = be_strcmp(s1, s2) op 0; \
+ } else if (var_isinstance(a)) { \
+ binstance *obj = var_toobj(a); \
+ object_binop(vm, #op, *a, *b); \
+ check_bool(vm, obj, #op); \
+ res = var_tobool(vm->top); \
+ } else { \
+ binop_error(vm, #op, a, b); \
+ res = bfalse; /* will not be executed */ \
+ } \
+ return res
+#endif // ESP32
#define bitwise_block(op) \
bvalue *dst = RA(), *a = RKB(), *b = RKC(); \
@@ -264,7 +287,6 @@ static bbool obj2bool(bvm *vm, bvalue *var)
binstance *obj = var_toobj(var);
bstring *tobool = str_literal(vm, "tobool");
/* get operator method */
- // TODO what if `tobool` is static
int type = be_instance_member(vm, obj, tobool, vm->top);
if (type != BE_NONE && type != BE_NIL) {
vm->top[1] = *var; /* move self to argv[0] */
@@ -357,7 +379,6 @@ static bbool object_eqop(bvm *vm,
bbool isself = var_isinstance(b) && o == var_toobj(b);
/* first, try to call the overloaded operator of the object */
int type = be_instance_member(vm, o, be_newstr(vm, op), vm->top);
- // TODO check that method is not static
if (basetype(type) == BE_FUNCTION) { /* call method */
bvalue *top = vm->top;
top[1] = self; /* move self to argv[0] */
@@ -615,13 +636,17 @@ newframe: /* a new call frame */
if (var_isint(a) && var_isint(b)) {
var_setint(dst, ibinop(+, a, b));
} else if (var_isnumber(a) && var_isnumber(b)) {
+#ifdef ESP32 /* when running on ESP32 in IRAM, there is a bug in early chip revision */
union bvaldata x, y; // TASMOTA workaround for ESP32 rev0 bug
x.i = a->v.i;
if (var_isint(a)) { x.r = (breal) x.i; }
y.i = b->v.i;
if (var_isint(b)) { y.r = (breal) y.i; }
- // breal x = var2real(a), y = var2real(b);
var_setreal(dst, x.r + y.r);
+#else // ESP32
+ breal x = var2real(a), y = var2real(b);
+ var_setreal(dst, x + y);
+#endif // ESP32
} else if (var_isstr(a) && var_isstr(b)) { /* strcat */
bstring *s = be_strcat(vm, var_tostr(a), var_tostr(b));
reg = vm->reg;
diff --git a/lib/libesp32/berry/src/berry.h b/lib/libesp32/berry/src/berry.h
index 70ab0f87c..bae47a590 100644
--- a/lib/libesp32/berry/src/berry.h
+++ b/lib/libesp32/berry/src/berry.h
@@ -1,10 +1,11 @@
-/********************************************************************
-** Copyright (c) 2018-2020 Guan Wenliang
-** This file is part of the Berry default interpreter.
-** skiars@qq.com, https://github.com/Skiars/berry
-** See Copyright Notice in the LICENSE file or at
-** https://github.com/Skiars/berry/blob/master/LICENSE
-********************************************************************/
+/**
+ * @file berry.h
+ * @brief Main berry entry API
+ * @details This file is part of the Berry default interpreter.
+ * @author skiars@qq.com, https://github.com/Skiars/berry
+ * @copyright (c) 2018-2022 Guan Wenliang MIT License (https://github.com/Skiars/berry/blob/master/LICENSE)
+ */
+
#ifndef BERRY_H
#define BERRY_H
@@ -17,74 +18,96 @@
extern "C" {
#endif
-/* do not modify the version number! */
+/**
+ * @def BERRY_VERSION
+ * @brief do not modify the version number!
+ *
+ */
#define BERRY_VERSION "1.1.0"
#if BE_STACK_TOTAL_MAX < BE_STACK_FREE_MIN * 2
#error "The value of the macro BE_STACK_TOTAL_MAX is too small."
#endif
-/* basic type definition */
#if BE_INTGER_TYPE == 0
- #define BE_INTEGER int
- #define BE_INT_FMTLEN ""
+ #define BE_INTEGER int /**< BE_INTEGER */
+ #define BE_INT_FMTLEN "" /**< BE_INT_FMTLEN */
#elif BE_INTGER_TYPE == 1
- #define BE_INTEGER long
- #define BE_INT_FMTLEN "l"
+ #define BE_INTEGER long /**< BE_INTEGER */
+ #define BE_INT_FMTLEN "l" /**< BE_INT_FMTLEN */
#elif BE_INTGER_TYPE == 2
- #ifdef _WIN32
- #define BE_INTEGER __int64
- #define BE_INT_FMTLEN "I64"
+#ifdef _WIN32
+ #define BE_INTEGER __int64 /**< BE_INTEGER */
+ #define BE_INT_FMTLEN "I64" /**< BE_INT_FMTLEN */
#else
- #define BE_INTEGER long long
- #define BE_INT_FMTLEN "ll"
- #endif
+#define BE_INTEGER long long /**< BE_INTEGER */
+#define BE_INT_FMTLEN "ll" /**< BE_INT_FMTLEN*/
+#endif
#else
#error "Unsupported integer type for `bint`."
#endif
-#define BE_INT_FORMAT "%" BE_INT_FMTLEN "d"
+#define BE_INT_FORMAT "%" BE_INT_FMTLEN "d" /**< BE_INT_FORMAT */
-typedef uint8_t bbyte;
-typedef BE_INTEGER bint;
+typedef uint8_t bbyte; /**< bbyte */
+typedef BE_INTEGER bint; /**< bint */
#if BE_USE_SINGLE_FLOAT != 0
- typedef float breal;
+ typedef float breal; /**< breal */
#else
- typedef double breal;
+typedef double breal; /**< breal */
#endif
-/* boolean values definition */
+
+
#ifndef __cplusplus
- #define bbool _Bool
- #define bfalse 0
- #define btrue 1
+#define bbool _Bool /**< bbool */
+#define bfalse 0 /**< bfalse */
+#define btrue 1 /**< btrue */
#else
- #define bbool bool
- #define bfalse false
- #define btrue true
+ #define bbool bool /**< bbool */
+ #define bfalse false /**< bfalse */
+ #define btrue true /**< btrue */
#endif
-/* error code definition */
+/**
+ * @enum berrorcode
+ * @brief error code definition
+ *
+ */
enum berrorcode {
- BE_OK = 0,
- BE_EXIT,
- BE_MALLOC_FAIL,
- BE_EXCEPTION,
- BE_SYNTAX_ERROR,
- BE_EXEC_ERROR,
- BE_IO_ERROR
+ BE_OK = 0, /**< BE_OK */
+ BE_EXIT, /**< BE_EXIT */
+ BE_MALLOC_FAIL, /**< BE_MALLOC_FAIL */
+ BE_EXCEPTION, /**< BE_EXCEPTION */
+ BE_SYNTAX_ERROR, /**< BE_SYNTAX_ERROR */
+ BE_EXEC_ERROR, /**< BE_EXEC_ERROR */
+ BE_IO_ERROR /**< BE_IO_ERROR */
};
-/* native-module member type specifier */
-#define BE_CNIL 0
-#define BE_CINT 1
-#define BE_CREAL 2
-#define BE_CBOOL 3
-#define BE_CFUNCTION 4
-#define BE_CSTRING 5
-#define BE_CMODULE 6
+/**
+ * @{ \name native-module member type specifier.
+ */
+/**
+ * \brief native-module member type specifier.
+ *
+ */
+#define BE_CNIL 0 /**< BE_CNIL */
+#define BE_CINT 1 /**< BE_CINT */
+#define BE_CREAL 2 /**< BE_CREAL */
+#define BE_CBOOL 3 /**< BE_CBOOL */
+#define BE_CFUNCTION 4 /**< BE_CFUNCTION */
+#define BE_CSTRING 5 /**< BE_CSTRING */
+#define BE_CMODULE 6 /**< BE_CMODULE */
+/**
+ * @}
+ */
-/* API function mark */
+
+/**
+ * @def BERRY_API
+ * @brief API function mark
+ *
+ */
#if defined(_WIN32) || defined(__CYGWIN__) /* in Windows */
#if defined(BERRY_MODULE) /* berry extension module */
#define BERRY_API __declspec(dllimport)
@@ -95,150 +118,290 @@ enum berrorcode {
#define BERRY_API extern
#endif
-/* only linux */
+/**
+ * @{ \name only linux.
+ */
+/**
+ * \brief only linux
+ *
+ */
#if defined(_WIN32) || defined(__CYGWIN__) /* in Windows */
- #define BERRY_LOCAL
+ #define BERRY_LOCAL /**< BERRY_LOCAL */
#elif defined(__GNUC__) /* in GCC */
- #define BERRY_LOCAL __attribute__ ((visibility ("hidden")))
+#define BERRY_LOCAL __attribute__ ((visibility ("hidden"))) /**< BERRY_LOCAL */
#else /* other platforms */
- #define BERRY_LOCAL
+ #define BERRY_LOCAL /**< BERRY_LOCAL */
#endif
#ifdef __cplusplus
#ifdef __cpp_constexpr
- #define BE_CONSTEXPR constexpr
+ #define BE_CONSTEXPR constexpr /**< BE_CONSTEXPR */
#else
- #define BE_CONSTEXPR
+ #define BE_CONSTEXPR /**< BE_CONSTEXPR */
#endif
#endif
#ifdef __cplusplus
-#define BE_EXPORT_VARIABLE extern "C"
+#define BE_EXPORT_VARIABLE extern "C" /**< BE_EXPORT_VARIABLE */
#else
-#define BE_EXPORT_VARIABLE
+#define BE_EXPORT_VARIABLE /**< BE_EXPORT_VARIABLE */
#endif
+/**
+ * @}
+ */
-typedef struct bvm bvm; /* virtual machine structure */
-typedef int (*bntvfunc)(bvm*); /* native function pointer */
+/**
+ * @brief virtual machine structure
+ */
+typedef struct bvm bvm;
+
+typedef int (*bntvfunc)(bvm*); /**< native function pointer */
+
+/**
+ * @struct bclass
+ * @brief bclass
+ */
struct bclass;
-/* native function information */
+/**
+ * @struct bnfuncinfo
+ * @brief native function information
+ *
+ */
typedef struct {
- const char *name;
- bntvfunc function;
+ const char *name; /**< name */
+ bntvfunc function; /**< function */
} bnfuncinfo;
-/* native module object node */
+/**
+ * @struct bntvmodobj
+ * @brief bntvmodobj
+ *
+ */
typedef struct bntvmodobj {
- const char *name;
- int type;
- union value {
- bint i;
- breal r;
- bbool b;
- bntvfunc f;
- const char *s;
- const void *o;
+ const char *name; /**< name */
+ int type; /**< type */
+ union value /**< value */
+ {
+ bint i; /**< i */
+ breal r; /**< r */
+ bbool b; /**< b */
+ bntvfunc f; /**< f */
+ const char *s; /**< s */
+ const void *o; /**< o */
#ifdef __cplusplus
- BE_CONSTEXPR value(bint v) : i(v) {}
- BE_CONSTEXPR value(breal v) : r(v) {}
- BE_CONSTEXPR value(bbool v) : b(v) {}
- BE_CONSTEXPR value(bntvfunc v) : f(v) {}
- BE_CONSTEXPR value(const char *v) : s(v) {}
- BE_CONSTEXPR value(const void *v) : o(v) {}
+ BE_CONSTEXPR value(bint v) : i(v) {} /**< i */
+ BE_CONSTEXPR value(breal v) : r(v) {} /**< r */
+ BE_CONSTEXPR value(bbool v) : b(v) {} /**< b */
+ BE_CONSTEXPR value(bntvfunc v) : f(v) {} /**< f */
+ BE_CONSTEXPR value(const char *v) : s(v) {} /**< s */
+ BE_CONSTEXPR value(const void *v) : o(v) {} /**< o */
#endif
- } u;
+ } u; /**< u */
#ifdef __cplusplus
BE_CONSTEXPR bntvmodobj(const char *name) :
- name(name), type(BE_CNIL), u(bint(0)) {}
+ name(name), type(BE_CNIL), u(bint(0)) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, bint v) :
- name(name), type(BE_CINT), u(v) {}
+ name(name), type(BE_CINT), u(v) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, breal v) :
- name(name), type(BE_CREAL), u(v) {}
+ name(name), type(BE_CREAL), u(v) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, bbool v) :
- name(name), type(BE_CBOOL), u(v) {}
+ name(name), type(BE_CBOOL), u(v) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, bntvfunc v) :
- name(name), type(BE_CFUNCTION), u(v) {}
+ name(name), type(BE_CFUNCTION), u(v) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, const char *v) :
- name(name), type(BE_CSTRING), u(v) {}
+ name(name), type(BE_CSTRING), u(v) {} /**< bntvmodobj */
BE_CONSTEXPR bntvmodobj(const char *name, int _tpye, const void *v) :
- name(name), type(_tpye), u(v) {}
+ name(name), type(_tpye), u(v) {} /**< bntvmodobj */
#endif
-} bntvmodobj;
+} bntvmodobj_t; /**< bntvmodobj_t */
-/* native module object */
+/**
+ * @struct bntvmodule
+ * @brief bntvmodule
+ *
+ */
typedef struct bntvmodule {
- const char *name; /* native module name */
- const bntvmodobj *attrs; /* native module attributes */
- size_t size; /* native module attribute count */
- const struct bmodule *module; /* const module object */
-} bntvmodule;
+ const char *name; /**< native module name */
+ const bntvmodobj_t *attrs; /**< native module attributes */
+ size_t size; /**< native module attribute count */
+ const struct bmodule *module; /**< const module object */
+} bntvmodule_t; /**< bntvmodule_t */
-/* native class object */
-struct bclass; /* we need only the pointer to `bclass` here */
+/**
+ * @struct bclass
+ * @brief native class object
+ */
+struct bclass;
+
+/**
+ * @brief we need only the pointer to `bclass` here
+ */
typedef const struct bclass *bclass_ptr;
-typedef bclass_ptr bclass_array[]; /* array of bclass* pointers, NULL terminated */
-/* native module node definition macro */
+/**
+ * @brief array of bclass* pointers, NULL terminated
+ */
+typedef bclass_ptr bclass_array[];
+
+/**
+ * @def be_native_module_nil
+ * @brief native module node definition macro
+ *
+ */
#ifndef __cplusplus
#define be_native_module_nil(_name) \
{ .name = (_name), .type = BE_CNIL, .u.i = 0 }
+/**
+ * @def be_native_module_int
+ * @brief be_native_module_int
+ *
+ */
#define be_native_module_int(_name, _v) \
{ .name = (_name), .type = BE_CINT, .u.i = (bint)(_v) }
+/**
+ * @def be_native_module_real
+ * @brief be_native_module_real
+ *
+ */
#define be_native_module_real(_name, _v) \
{ .name = (_name), .type = BE_CREAL, .u.r = (breal)(_v) }
+/**
+ * @def be_native_module_bool
+ * @brief be_native_module_bool
+ *
+ */
#define be_native_module_bool(_name, _b) \
{ .name = (_name), .type = BE_CBOOL, .u.b = (bbool)(_b) }
+/**
+ * @def be_native_module_function
+ * @brief be_native_module_function
+ *
+ */
#define be_native_module_function(_name, _f) \
{ .name = (_name), .type = BE_CFUNCTION, .u.f = (_f) }
+/**
+ * @def be_native_module_str
+ * @brief be_native_module_str
+ *
+ */
#define be_native_module_str(_name, _s) \
{ .name = (_name), .type = BE_CSTRING, .u.s = (_s) }
+/**
+ * @def be_native_module_module
+ * @brief be_native_module_module
+ *
+ */
#define be_native_module_module(_name, _m) \
{ .name = (_name), .type = BE_CMODULE, .u.o = &(_m) }
#else
+
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_nil(_name) \
bntvmodobj(_name)
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_int(_name, _v) \
bntvmodobj(_name, bint(_v))
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_real(_name, _v) \
bntvmodobj(_name, breal(_v))
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_bool(_name, _b) \
bntvmodobj(_name, bbool(_b))
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_function(_name, _f) \
bntvmodobj(_name, _f)
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_str(_name, _s) \
bntvmodobj(_name, _s)
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_module(_name, _m) \
bntvmodobj(_name, BE_CMODULE, &(_m))
#endif
+/**
+ * @def be_native_module_attr_table
+ * @brief be_native_module_attr_table
+ *
+ */
#define be_native_module_attr_table(name) \
static const bntvmodobj name##_attrs[] =
+/**
+ * @def be_native_module
+ * @brief be_native_module
+ *
+ */
#define be_native_module(name) be_native_module_##name
+
+/**
+ * @def be_native_class
+ * @brief be_native_class
+ *
+ */
#define be_native_class(name) be_class_##name
-/* native module declaration macro */
+/**
+ * @def be_extern_native_module
+ * @brief native module declaration macro
+ *
+ */
#define be_extern_native_module(name) \
- extern const bntvmodule be_native_module(name)
+ extern const bntvmodule_t be_native_module(name)
-/* native class declaration macro */
+/**
+ * @def be_extern_native_class
+ * @brief native class declaration macro
+ *
+ */
#define be_extern_native_class(name) \
extern const struct bclass be_native_class(name)
-/* native module definition macro */
+/**
+ * @def be_define_native_module
+ * @brief native module definition macro
+ *
+ */
#ifndef __cplusplus
#define be_define_native_module(_name, _init) \
const bntvmodule be_native_module(_name) = { \
@@ -259,8 +422,12 @@ typedef bclass_ptr bclass_array[]; /* array of bclass* pointers, NU
}
#endif
-/* support for solidified berry functions */
-/* native const strings outside of global string hash */
+/**
+ * @def be_define_local_const_str
+ * @brief support for solidified berry functions
+ * native const strings outside of global string hash
+ *
+ */
#define be_define_local_const_str(_name, _s, _hash, _len) \
static const bcstring be_local_const_str_##_name = { \
.next = (bgcobject *)NULL, \
@@ -272,7 +439,11 @@ typedef bclass_ptr bclass_array[]; /* array of bclass* pointers, NU
.s = _s \
}
-/* new version for more compact literals */
+/**
+ * @def be_nested_const_str
+ * @brief new version for more compact literals
+ *
+ */
#define be_nested_const_str(_s, _hash, _len) \
(bstring*) &(const bcstring) { \
.next = (bgcobject *)NULL, \
@@ -284,312 +455,1881 @@ typedef bclass_ptr bclass_array[]; /* array of bclass* pointers, NU
.s = _s \
}
+/**
+ * @def be_local_const_str
+ * @brief be_local_const_str
+ *
+ */
#define be_local_const_str(_name) (bstring*) &be_local_const_str_##_name
-/* conditional macro see https://stackoverflow.com/questions/11632219/c-preprocessor-macro-specialisation-based-on-an-argument */
-#define BE_IIF(cond) BE_IIF_ ## cond
-#define BE_IIF_0(t, f) f
-#define BE_IIF_1(t, f) t
+#define BE_IIF(cond) BE_IIF_ ## cond /**< conditional macro see https://stackoverflow.com/questions/11632219/c-preprocessor-macro-specialisation-based-on-an-argument */
+#define BE_IIF_0(t, f) f /**< conditional macro see https://stackoverflow.com/questions/11632219/c-preprocessor-macro-specialisation-based-on-an-argument */
+#define BE_IIF_1(t, f) t /**< conditional macro see https://stackoverflow.com/questions/11632219/c-preprocessor-macro-specialisation-based-on-an-argument */
+/**
+ * @def be_local_const_upval
+ * @brief be_local_const_upval
+ *
+ */
#if BE_DEBUG_VAR_INFO
#define be_local_const_upval(ins, idx) { "", ins, idx }
#else
#define be_local_const_upval(ins, idx) { ins, idx }
#endif
-/* conditional block in bproto depending on compilation options */
+/**
+ * @def PROTO_RUNTIME_BLOCK
+ * @brief conditional block in bproto depending on compilation options
+ *
+ */
#if BE_DEBUG_RUNTIME_INFO
- #define PROTO_RUNTIME_BLOCK \
- NULL, /* varinfo */ \
- 0, /* nvarinfo */
+ #define PROTO_RUNTIME_BLOCK \
+ NULL, /**< varinfo */ \
+ 0, /**< nvarinfo */
#else
#define PROTO_RUNTIME_BLOCK
#endif
+
+/**
+ * @def PROTO_VAR_INFO_BLOCK
+ * @brief PROTO_VAR_INFO_BLOCK
+ *
+ */
#if BE_DEBUG_VAR_INFO
- #define PROTO_VAR_INFO_BLOCK\
- NULL, /* varinfo */ \
- 0, /* nvarinfo */
+ #define PROTO_VAR_INFO_BLOCK \
+ NULL, /**< varinfo */ \
+ 0, /**< nvarinfo */
#else
#define PROTO_VAR_INFO_BLOCK
#endif
-/* define bproto */
-#define be_define_local_proto(_name, _nstack, _argc, _is_const, _is_subproto, _is_upval) \
+/**
+ * @def be_define_local_proto
+ * @brief define bproto
+ *
+ */
+#define be_define_local_proto(_name, _nstack, _argc, _is_const, _is_subproto, _is_upval) \
static const bproto _name##_proto = { \
- NULL, /* bgcobject *next */ \
- BE_PROTO, /* type BE_PROTO */ \
- 0x08, /* marked outside of GC */ \
- (_nstack), /* nstack */ \
- BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0),/* nupvals */ \
- (_argc), /* argc */ \
- 0, /* varg */ \
- NULL, /* bgcobject *gray */ \
- BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /* bupvaldesc *upvals */\
- BE_IIF(_is_const)((bvalue*)&_name##_ktab,NULL), /* ktab */ \
- BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL),/* bproto **ptab */\
- (binstruction*) &_name##_code, /* code */ \
- be_local_const_str(_name##_str_name), /* name */ \
- sizeof(_name##_code)/sizeof(uint32_t), /* codesize */ \
- BE_IIF(_is_const)(sizeof(_name##_ktab)/sizeof(bvalue),0),/* nconst */ \
- BE_IIF(_is_subproto)(sizeof(_name##_subproto)/sizeof(bproto*),0),/* proto */ \
- be_local_const_str(_name##_str_source), /* source */ \
- PROTO_RUNTIME_BLOCK \
- PROTO_VAR_INFO_BLOCK \
+ NULL, /**< bgcobject *next */ \
+ BE_PROTO, /**< type BE_PROTO */ \
+ 0x08, /**< marked outside of GC */ \
+ (_nstack), /**< nstack */ \
+ BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
+ (_argc), /**< argc */ \
+ 0, /**< varg */ \
+ NULL, /**< bgcobject *gray */ \
+ BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /**< bupvaldesc *upvals */ \
+ BE_IIF(_is_const)((bvalue*)&_name##_ktab,NULL), /**< ktab */ \
+ BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL), /**< bproto **ptab */ \
+ (binstruction*) &_name##_code, /**< code */ \
+ be_local_const_str(_name##_str_name), /**< name */ \
+ sizeof(_name##_code)/sizeof(uint32_t), /**< codesize */ \
+ BE_IIF(_is_const)(sizeof(_name##_ktab)/sizeof(bvalue),0), /**< nconst */ \
+ BE_IIF(_is_subproto)(sizeof(_name##_subproto)/sizeof(bproto*),0), /**< proto */ \
+ be_local_const_str(_name##_str_source), /**< source */ \
+ PROTO_RUNTIME_BLOCK /**< */ \
+ PROTO_VAR_INFO_BLOCK /**< */ \
}
-/* new version for more compact literals */
+/**
+ * @def be_nested_proto
+ * @brief new version for more compact literals
+ *
+ */
#define be_nested_proto(_nstack, _argc, _varg, _has_upval, _upvals, _has_subproto, _protos, _has_const, _ktab, _fname, _source, _code) \
& (const bproto) { \
- NULL, /* bgcobject *next */ \
- BE_PROTO, /* type BE_PROTO */ \
- 0x08, /* marked outside of GC */ \
- (_nstack), /* nstack */ \
- BE_IIF(_has_upval)(sizeof(*_upvals)/sizeof(bupvaldesc),0), /* nupvals */ \
- (_argc), /* argc */ \
- (_varg), /* varg */ \
- NULL, /* bgcobject *gray */ \
- (bupvaldesc*) _upvals, /* bupvaldesc *upvals */ \
- (bvalue*) _ktab, /* ktab */ \
- (struct bproto**) _protos, /* bproto **ptab */ \
- (binstruction*) _code, /* code */ \
- ((bstring*) _fname), /* name */ \
- sizeof(*_code)/sizeof(binstruction), /* codesize */ \
- BE_IIF(_has_const)(sizeof(*_ktab)/sizeof(bvalue),0), /* nconst */ \
- BE_IIF(_has_subproto)(sizeof(*_protos)/sizeof(bproto*),0), /* proto */ \
- ((bstring*) _source), /* source */ \
- PROTO_RUNTIME_BLOCK \
- PROTO_VAR_INFO_BLOCK \
+ NULL, /**< bgcobject *next */ \
+ BE_PROTO, /**< type BE_PROTO */ \
+ 0x08, /**< marked outside of GC */ \
+ (_nstack), /**< nstack */ \
+ BE_IIF(_has_upval)(sizeof(*_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
+ (_argc), /**< argc */ \
+ (_varg), /**< varg */ \
+ NULL, /**< bgcobject *gray */ \
+ (bupvaldesc*) _upvals, /**< bupvaldesc *upvals */ \
+ (bvalue*) _ktab, /**< ktab */ \
+ (struct bproto**) _protos, /**< bproto **ptab */ \
+ (binstruction*) _code, /**< code */ \
+ ((bstring*) _fname), /**< name */ \
+ sizeof(*_code)/sizeof(binstruction), /**< codesize */ \
+ BE_IIF(_has_const)(sizeof(*_ktab)/sizeof(bvalue),0), /**< nconst */ \
+ BE_IIF(_has_subproto)(sizeof(*_protos)/sizeof(bproto*),0), /**< proto */ \
+ ((bstring*) _source), /**< source */ \
+ PROTO_RUNTIME_BLOCK /**< */ \
+ PROTO_VAR_INFO_BLOCK /**< */ \
}
-#define be_define_local_closure(_name) \
- const bclosure _name##_closure = { \
- NULL, /* bgcobject *next */ \
- BE_CLOSURE, /* type BE_CLOSURE */ \
- GC_CONST, /* marked GC_CONST */ \
- 0, /* nupvals */ \
- NULL, /* bgcobject *gray */ \
- (bproto*) &_name##_proto, /* proto */ \
- { NULL } /* upvals */ \
+/**
+ * @def be_define_local_closure
+ * @brief be_define_local_closure
+ *
+ */
+#define be_define_local_closure(_name) \
+ const bclosure _name##_closure = { \
+ NULL, /**< bgcobject *next */ \
+ BE_CLOSURE, /**< type BE_CLOSURE */ \
+ GC_CONST, /**< marked GC_CONST */ \
+ 0, /**< nupvals */ \
+ NULL, /**< bgcobject *gray */ \
+ (bproto*) &_name##_proto, /**< proto */ \
+ { NULL } /**< upvals */ \
}
-/* new version for more compact literals */
+/**
+ * @def be_local_closure
+ * @brief new version for more compact literals
+ *
+ */
#define be_local_closure(_name, _proto) \
static const bclosure _name##_closure = { \
- NULL, /* bgcobject *next */ \
- BE_CLOSURE, /* type BE_CLOSURE */ \
- GC_CONST, /* marked GC_CONST */ \
- 0, /* nupvals */ \
- NULL, /* bgcobject *gray */ \
- (bproto*) _proto, /* proto */ \
- { NULL } /* upvals */ \
+ NULL, /**< bgcobject *next */ \
+ BE_CLOSURE, /**< type BE_CLOSURE */ \
+ GC_CONST, /**< marked GC_CONST */ \
+ 0, /**< nupvals */ \
+ NULL, /**< bgcobject *gray */ \
+ (bproto*) _proto, /**< proto */ \
+ { NULL } /**< upvals */ \
}
-/* debug hook typedefs */
-#define BE_HOOK_LINE 1
-#define BE_HOOK_CALL 2
-#define BE_HOOK_RET 4
-#define BE_HOOK_EXCEPT 8
+/**
+ * @{ \name debug hook typedefs.
+ */
+/**
+ * \brief debug hook typedefs.
+ *
+ */
+#define BE_HOOK_LINE 1 /**< BE_HOOK_LINE */
+#define BE_HOOK_CALL 2 /**< BE_HOOK_CALL */
+#define BE_HOOK_RET 4 /**< BE_HOOK_RET */
+#define BE_HOOK_EXCEPT 8 /**< BE_HOOK_EXCEPT */
+/**
+ * @}
+ */
+/**
+ * @struct bhookinfo
+ * @brief bhookinfo
+ *
+ */
typedef struct bhookinfo {
- int type; /* current hook type */
- int line; /* current linenumber */
- const char *source; /* source path information */
- const char *func_name; /* current function name */
- void *data; /* user extended data */
-} bhookinfo;
+ int type; /**< current hook type */
+ int line; /**< current line number */
+ const char *source; /**< source path information */
+ const char *func_name; /**< current function name */
+ void *data; /**< user extended data */
+} bhookinfo_t; /**< bhookinfo_ */
-typedef void(*bntvhook)(bvm *vm, bhookinfo *info);
+/**
+ * @fn void (*bntvhook)(bvm *vm, bhookinfo *info)
+ * @brief void (*bntvhook)(bvm *vm, bhookinfo *info)
+ *
+ * @param vm virtual machine instance
+ * @param info
+ */
+typedef void (*bntvhook)(bvm *vm, bhookinfo_t *info);
-/* the default assert definition */
+/**
+ * @def be_assert
+ * @brief the default assert definition
+ *
+ */
#if !BE_DEBUG
- #if defined(be_assert)
- #undef be_assert
- #endif
- #define be_assert(expr) ((void)0)
+#if defined(be_assert)
+#undef be_assert
+#endif
+#define be_assert(expr) ((void)0)
#endif
-/* Observability hook */
-
-typedef void(*bobshook)(bvm *vm, int event, ...);
+/**
+ * @fn void (*bobshook)(bvm *vm, int event, ...)
+ * @brief Observability hook
+ *
+ * @param vm virtual machine instance
+ * @param event
+ */
+typedef void (*bobshook)(bvm *vm, int event, ...);
typedef uint32_t(*bmicrosfnct)(void);
+
+/**
+ * @enum beobshookevents
+ * @brief beobshookevents
+ *
+ */
enum beobshookevents {
- BE_OBS_PCALL_ERROR, /* called when be_callp() returned an error, most likely an exception */
- BE_OBS_GC_START, /* start of GC, arg = allocated size */
- BE_OBS_GC_END, /* end of GC, arg = allocated size */
- BE_OBS_VM_HEARTBEAT, /* VM heartbeat called every million instructions */
- BE_OBS_STACK_RESIZE_START, /* Berry stack resized */
+ BE_OBS_PCALL_ERROR, /**< called when be_callp() returned an error, most likely an exception */
+ BE_OBS_GC_START, /**< start of GC, arg = allocated size */
+ BE_OBS_GC_END, /**< end of GC, arg = allocated size */
+ BE_OBS_VM_HEARTBEAT, /**< VM heartbeat called every million instructions */
+ BE_OBS_STACK_RESIZE_START, /**< Berry stack resized */
};
-typedef int (*bctypefunc)(bvm*, const void*);
+typedef int (*bctypefunc)(bvm*, const void*); /**< bctypefunc */
-/* FFI functions */
+/**
+ * @def be_writestring
+ * @note FFI function
+ * @brief be_writestring
+ *
+ */
#define be_writestring(s) be_writebuffer((s), strlen(s))
+
+/**
+ * @def be_writenewline
+ * @note FFI function
+ * @brief be_writenewline
+ *
+ */
#define be_writenewline() be_writebuffer("\n", 1)
+/**
+ * @def be_return
+ * @note FFI function
+ * @brief be_return
+ *
+ * @param vm virtual machine instance virtual machine instance
+ */
#define be_return(vm) return be_returnvalue(vm)
+
+/**
+ * @def be_return_nil
+ * @note FFI function
+ * @brief be_return_nil
+ *
+ * @param vm virtual machine instance virtual machine instance
+ */
#define be_return_nil(vm) return be_returnnilvalue(vm)
+/**
+ * @def be_loadfile
+ * @note FFI function
+ * @brief be_loadfile
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param name (???)
+ */
#define be_loadfile(vm, name) be_loadmode((vm), (name), 0)
+
+/**
+ * @def be_loadmodule
+ * @note FFI function
+ * @brief be_loadmodule
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param name
+ *
+ */
#define be_loadmodule(vm, name) be_loadmode((vm), (name), 1)
+/**
+ * @def be_loadstring
+ * @note FFI function
+ * @brief be_loadstring
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param str (???)
+ *
+ */
#define be_loadstring(vm, str) \
be_loadbuffer((vm), "string", (str), strlen(str))
+/**
+ * @def be_dostring
+ * @note FFI function
+ * @brief be_dostring
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param s (???)
+ *
+ */
#define be_dostring(vm, s) \
(be_loadstring((vm), (s)) || be_pcall((vm), 0))
+/**
+ * @fn bint be_str2int(const char*, const char**)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param str (???)
+ * @param endstr (???)
+ * @return (???)
+ */
BERRY_API bint be_str2int(const char *str, const char **endstr);
+
+/**
+ * @fn breal be_str2real(const char*, const char**)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param str
+ * @param endstr (???)
+ * @return (???)
+ */
BERRY_API breal be_str2real(const char *str, const char **endstr);
BERRY_API const char *be_str2num(bvm *vm, const char *str);
+/**
+ * @fn const char* be_str2num(bvm *vm, const char *str)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param str (???)
+ * @return (???)
+ */
+BERRY_API const char* be_str2num(bvm *vm, const char *str);
+
+/**
+ * @fn int be_top(bvm*)
+ * @note FFI function
+ * @brief returns the absolute index value of the top element in the virtual stack
+ *
+ * This function returns the absolute index value of the top element in the virtual stack.
+ * This value is also the number of elements in the virtual stack (the capacity of the virtual stack).
+ * Call this function before adding or subtracting elements in the virtual stack to get the number of parameters of the native function.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @return (???)
+ */
BERRY_API int be_top(bvm *vm);
-BERRY_API const char *be_typename(bvm *vm, int index);
-BERRY_API const char *be_classname(bvm *vm, int index);
+
+
+/**
+ * @fn const char* be_typename(bvm *vm, int index)
+ * @note FFI function
+ * @brief converts the type of the Berry object into a string and returns it
+ *
+ * This function converts the type of the Berry object into a string and returns it.
+ * For example, it returns "int" for an integer object, and "function" for a function object.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index index of the object to be operated
+ * @return string corresponding to the parameter type (see: baselib_type)
+ */
+BERRY_API const char* be_typename(bvm *vm, int index);
+
+/**
+ * @fn const char* be_classname(bvm *vm, int index)
+ * @note FFI function
+ * @brief converts the type of the Berry object into a string and returns it.
+ *
+ * This function converts the type of the Berry object into a string and returns it.
+ * For example, it returns "int" for an integer object, and "function" for a function object
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index index of the object to be operated
+ * @return string corresponding to the parameter type (see: baselib_type)
+ */
+BERRY_API const char* be_classname(bvm *vm, int index);
+
+/**
+ * @fn bool be_classof(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index (???)
+ * @return (???)
+ */
BERRY_API bbool be_classof(bvm *vm, int index);
+
+/**
+ * @fn int be_strlen(bvm*, int)
+ * @note FFI function
+ * @brief length of the specified Berry string
+ *
+ * This function returns the number of bytes in the string at index
+ * (the ’\0’ characters at the end of the Berry string are not counted).
+ * If the value of the index position is not a string, the be_strlen function will return 0.
+ * Although the Berry string is compatible with the C string format,
+ * it is not recommended to use the strlen function of the C standard library to measure the length of the Berry string.
+ * For Berry strings, be_strlen is faster than strlen and has better compatibility.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index index of the object to be operated
+ * @return length
+ */
BERRY_API int be_strlen(bvm *vm, int index);
+
+/**
+ * @fn void be_strconcat(bvm*, int)
+ * @note FFI function
+ * @brief splice two Berry strings
+ *
+ * This function will concatenate the string at the parameter position of index with the string at the top position of the stack,
+ * and then put the resulting string into the position indexed by index.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index (???)
+ */
BERRY_API void be_strconcat(bvm *vm, int index);
+
+/**
+ * @fn void be_pop(bvm*, int)
+ * @note FFI function
+ * @brief pops the value at the top of the stack
+ *
+ * Note that the value of n cannot exceed the capacity of the stack.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param n number of values to be popped
+ */
BERRY_API void be_pop(bvm *vm, int n);
+
+/**
+ * @fn void be_remove(bvm*, int)
+ * @note FFI function
+ * @brief remove a value from the stack
+ *
+ * After the value at index is moved out, the following values will be filled forward,
+ * and the stack capacity will be reduced by one.
+ * The value of index cannot exceed the capacity of the stack.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index the object to be removed
+ */
BERRY_API void be_remove(bvm *vm, int index);
+
+/**
+ * @fn int be_absindex(bvm*, int)
+ * @note FFI function
+ * @brief absolute index value of a given index value
+ *
+ * If index is positive, the return value is the value of index.
+ * If index is negative, the return value of textttbe_absindex is the absolute index value corresponding to index.
+ * When index is a negative value (relative index), its index position cannot be lower than the bottom of the stack.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index index value
+ * @return absolute index
+ */
BERRY_API int be_absindex(bvm *vm, int index);
+/**
+ * @fn bool be_isnil(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is nil
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is nil,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isnil(bvm *vm, int index);
+
+/**
+ * @fn bool be_isbool(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is bool
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is bool,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isbool(bvm *vm, int index);
+
+/**
+ * @fn bool be_isint(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is int
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is int,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isint(bvm *vm, int index);
+
+/**
+ * @fn bool be_isreal(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is real
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is real,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isreal(bvm *vm, int index);
+
+/**
+ * @fn bool be_isnumber(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is number
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is number,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isnumber(bvm *vm, int index);
+
+/**
+ * @fn bool be_isstring(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is string
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is string,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isstring(bvm *vm, int index);
+
+/**
+ * @fn bool be_isclosure(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is closure
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is closure,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isclosure(bvm *vm, int index);
+
+/**
+ * @fn bool be_isntvclos(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is primitive closure type
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is primitive closure type,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isntvclos(bvm *vm, int index);
+
+/**
+ * @fn bool be_isfunction(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is function
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is function,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isfunction(bvm *vm, int index);
+
+/**
+ * @fn bool be_isproto(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is proto
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is proto,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isproto(bvm *vm, int index);
+
+/**
+ * @fn bool be_isclass(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is class
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is class,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isclass(bvm *vm, int index);
+
+/**
+ * @fn bool be_isinstance(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is instance
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is instance,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isinstance(bvm *vm, int index);
+
+/**
+ * @fn bool be_ismapinstance(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is instance
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is
+ * an instance of class map (or derived). If it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_ismapinstance(bvm *vm, int index);
+
+/**
+ * @fn bool be_ismapinstance(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is instance
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is
+ * an instance of class list (or derived). If it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_islistinstance(bvm *vm, int index);
+
+/**
+ * @fn bool be_ismodule(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is module
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is module,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_ismodule(bvm *vm, int index);
+
+/**
+ * @fn bool be_islist(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is list
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is list,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_islist(bvm *vm, int index);
+
+/**
+ * @fn bool be_ismap(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is map
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is map,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_ismap(bvm *vm, int index);
+
+/**
+ * @fn bool be_iscomptr(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is universal pointer type
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is universal pointer type,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_iscomptr(bvm *vm, int index);
+
+/**
+ * @fn bool be_iscomobj(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_iscomobj(bvm *vm, int index);
+
+/**
+ * @fn bool be_isderived(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isderived(bvm *vm, int index);
+
+/**
+ * @fn bool be_isbytes(bvm*, int)
+ * @note FFI function
+ * @brief value in virtual stack is instance or sub-instance of class bytes
+ *
+ * This function returns whether the value indexed by the parameter index in the virtual stack is instance or sub-instance of class bytes,
+ * if it is, it returns 1, otherwise it returns 0
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return true/false
+ */
BERRY_API bbool be_isbytes(bvm *vm, int index);
+/**
+ * @fn bint be_toint(bvm*, int)
+ * @note FFI function
+ * @brief virtual stack to integer type
+ *
+ * Get the value of the index position of index from the virtual stack and return it as an integer type.
+ * This function does not check the correctness of the type.
+ * If the value is an instance, the method toint() is called if it exists.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index value index
+ * @return (???)
+ */
BERRY_API bint be_toint(bvm *vm, int index);
+
+/**
+ * @fn breal be_toreal(bvm*, int)
+ * @note FFI function
+ * @brief virtual stack to floating-point number type
+ *
+ * Get the value of the index position of index from the virtual stack and return it as an floating-point number type.
+ * This function does not check the correctness of the type.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API breal be_toreal(bvm *vm, int index);
+
+/**
+ * @fn int be_toindex(bvm*, int)
+ * @note FFI function
+ * @brief virtual stack to integer type
+ *
+ * Get the value of the index position of index from the virtual stack and return it as an integer type.
+ * This function does not check the correctness of the type.
+ * Unlike be_toint, the return value type of be_toindex is int, while the return value of the former is bint.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API int be_toindex(bvm *vm, int index);
+
+/**
+ * @fn bool be_tobool(bvm*, int)
+ * @note FFI function
+ * @brief virtual stack to Boolean type
+ *
+ * Get the value of the index position of index from the virtual stack and return it as a Boolean type.
+ * If the indexed value is not of Boolean type, it will be converted according to the rules in section type_bool,
+ * and the conversion process will not cause the indexed value to change.
+ * If the value is an instance, the method tobool() is called if it exists.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API bbool be_tobool(bvm *vm, int index);
+
+/**
+ * @fn const char* be_tostring(bvm *vm, int index)
+ * @note FFI function
+ * @brief virtual stack to string
+ *
+ * Get the value of the index position of index from the virtual stack and return it as a string type.
+ * If the indexed value is not a string type, the indexed value will be converted to a string,
+ * and the conversion process will replace the value at the indexed position in the virtual stack with the converted string.
+ * The string returned by this function always ends with ’\0’ characters.
+ * If the value is an instance, the method tostring() is called if it exists.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API const char* be_tostring(bvm *vm, int index);
+
+/**
+ * @fn const char* be_toescape(bvm *vm, int index, int mode)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ * @param mode
+ * @return (???)
+ */
BERRY_API const char* be_toescape(bvm *vm, int index, int mode);
-BERRY_API void* be_tocomptr(bvm* vm, int index);
+
+/**
+ * @fn void* be_tocomptr(bvm *vm, int index)
+ * @note FFI function
+ * @brief virtual stack to general pointer
+ *
+ * Get the value of the index position of index from the virtual stack and return it as a general pointer type.
+ * This function does not check the correctness of the type.
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param index
+ */
+BERRY_API void* be_tocomptr(bvm *vm, int index);
+
+/**
+ * @fn void be_moveto(bvm*, int, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance virtual machine instance
+ * @param from
+ * @param to
+ */
BERRY_API void be_moveto(bvm *vm, int from, int to);
+
+/**
+ * @fn void be_pushnil(bvm*)
+ * @note FFI function
+ * @brief Push a nil value onto the virtual stack.
+ *
+ * @param vm virtual machine instance
+ *
+ */
BERRY_API void be_pushnil(bvm *vm);
+
+/**
+ * @fn void be_pushbool(bvm*, int)
+ * @note FFI function
+ * @brief Push a Boolean value onto the virtual stack
+ *
+ * Push a Boolean value onto the virtual stack.
+ * The parameter b is the boolean value to be pushed onto the stack.
+ * When the value is 0, it means false, otherwise it is true.
+ *
+ * @param vm virtual machine instance
+ * @param b
+ */
BERRY_API void be_pushbool(bvm *vm, int b);
+
+/**
+ * @fn void be_pushint(bvm*, bint)
+ * @note FFI function
+ * @brief Push an integer value i onto the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param i
+ */
BERRY_API void be_pushint(bvm *vm, bint i);
+
+/**
+ * @fn void be_pushreal(bvm*, breal)
+ * @note FFI function
+ * @brief Push a floating point value r onto the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param r
+ */
BERRY_API void be_pushreal(bvm *vm, breal r);
+
+/**
+ * @fn void be_pushstring(bvm*, const char*)
+ * @note FFI function
+ * @brief Push the string str onto the virtual stack.
+ *
+ * Push the string str onto the virtual stack.
+ * The parameter str must point to a C string that ends with a null character ’\0’,
+ * and a null pointer cannot be passed in.
+ *
+ * @param vm virtual machine instance
+ * @param str
+ */
BERRY_API void be_pushstring(bvm *vm, const char *str);
+
+/**
+ * @fn void be_pushnstring(bvm*, const char*, size_t)
+ * @note FFI function
+ * @brief Push the string str of length n onto the virtual stack.
+ *
+ * Push the string str of length n onto the virtual stack.
+ * The length of the string is subject to the parameter n,
+ * and the null character is not used as the end mark of the string.
+ *
+ * @param vm virtual machine instance
+ * @param str
+ * @param n
+ */
BERRY_API void be_pushnstring(bvm *vm, const char *str, size_t n);
+
+/**
+ * @fn const char* be_pushfstring(bvm *vm, const char *format, ...)
+ * @note FFI function
+ * @brief Push the formatted string into the virtual stack.
+ *
+ * Push the formatted string into the virtual stack.
+ * The parameter format is a formatted string, which contains the text to be pushed onto the stack,
+ * and the format parameter contains a label,
+ * which can be replaced by the value specified by the subsequent additional parameter and formatted as required.
+ * According to the label of the format string, a series of additional parameters may be required,
+ * and each additional parameter will replace the corresponding % label in the format parameter.
+ *
+ * @param vm virtual machine instance
+ * @param format
+ * @return (???)
+ */
BERRY_API const char* be_pushfstring(bvm *vm, const char *format, ...);
+
+/**
+ * @fn void* be_pushbuffer(bvm *vm, size_t size)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param size
+ */
BERRY_API void* be_pushbuffer(bvm *vm, size_t size);
+
+/**
+ * @fn void be_pushvalue(bvm*, int)
+ * @note FFI function
+ * @brief Push the value with index index onto the top of the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param index
+ */
BERRY_API void be_pushvalue(bvm *vm, int index);
+
+/**
+ * @fn void be_pushclosure(bvm*, void*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param cl
+ */
BERRY_API void be_pushclosure(bvm *vm, void *cl);
+
+/**
+ * @fn void be_pushntvclosure(bvm*, bntvfunc, int)
+ * @note FFI function
+ * @brief Push a native closure onto the top of the virtual stack.
+ *
+ * Push a native closure onto the top of the virtual stack.
+ * The parameter f is the C function pointer of the native closure,
+ * and nupvals is the upvalue number of the closure.
+ *
+ * @param vm virtual machine instance
+ * @param f
+ * @param nupvals
+ */
BERRY_API void be_pushntvclosure(bvm *vm, bntvfunc f, int nupvals);
+
+/**
+ * @fn void be_pushntvfunction(bvm*, bntvfunc)
+ * @note FFI function
+ * @brief Push a native function onto the top of the virtual stack, and the parameter f is the native function pointer.
+ *
+ * @param vm virtual machine instance
+ * @param f
+ */
BERRY_API void be_pushntvfunction(bvm *vm, bntvfunc f);
+
+/**
+ * @fn void be_pushclass(bvm*, const char*, const bnfuncinfo*)
+ * @note FFI function
+ * @brief Push a native class onto the top of the virtual stack
+ *
+ * Push a native class onto the top of the virtual stack.
+ * The parameter name is the name of the native class, and the parameter lib is the attribute description of the native class.
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @param lib
+ */
BERRY_API void be_pushclass(bvm *vm, const char *name, const bnfuncinfo *lib);
-BERRY_API void be_pushntvclass(bvm *vm, const struct bclass * c);
+
+/**
+ * @fn void be_pushntvclass(bvm*, const struct bclass*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param c
+ */
+BERRY_API void be_pushntvclass(bvm *vm, const struct bclass *c);
+
+/**
+ * @fn void be_pushcomptr(bvm*, void*)
+ * @note FFI function
+ * @brief Push a general pointer onto the top of the virtual stack
+ *
+ * Push a general pointer onto the top of the virtual stack.
+ * The general pointer ptr points to a certain C data area.
+ * Since the content pointed to by this pointer is not maintained by Berry’s garbage collector,
+ * users have to maintain the life cycle of the data themselves.
+ *
+ * @param vm virtual machine instance
+ * @param ptr
+ */
BERRY_API void be_pushcomptr(bvm *vm, void *ptr);
+
+/**
+ * @fn bool be_pushiter(bvm*, int)
+ * @note FFI function
+ * @brief Push an iterator onto the top of the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API bbool be_pushiter(bvm *vm, int index);
+/**
+ * @fn void be_newlist(bvm*)
+ * @note FFI function
+ * @brief creates a new list value
+ *
+ * After this function is successfully called, the new list value will be pushed onto the top of the stack.
+ * list value is an internal representation of a list, not to be confused with an instance of the list class.
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_newlist(bvm *vm);
+
+/**
+ * @fn void be_newmap(bvm*)
+ * @note FFI function
+ * @brief creates a new map value
+ *
+ * After this function is successfully called, the new map value will be pushed onto the top of the stack.
+ * map value is an internal representation of a list, not to be confused with an instance of the map class.
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_newmap(bvm *vm);
+
+/**
+ * @fn void be_newmodule(bvm*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_newmodule(bvm *vm);
+
+/**
+ * @fn void be_newcomobj(bvm*, void*, bntvfunc)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param data
+ * @param destroy
+ */
BERRY_API void be_newcomobj(bvm *vm, void *data, bntvfunc destroy);
+
+/**
+ * @fn void be_newobject(bvm*, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ */
BERRY_API void be_newobject(bvm *vm, const char *name);
+
+/**
+ * @fn bool be_copy(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @return
+ */
BERRY_API bbool be_copy(bvm *vm, int index);
+
+/**
+ * @fn bool be_setname(bvm*, int, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @param name
+ * @return (???)
+ */
BERRY_API bbool be_setname(bvm *vm, int index, const char *name);
+
+/**
+ * @fn bool be_getglobal(bvm*, const char*)
+ * @note FFI function
+ * @brief pushes the global variable with the specified name onto the stack
+ *
+ * After this function is called, the global variable named name will be pushed onto the top of the virtual stack
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @return (???)
+ */
BERRY_API bbool be_getglobal(bvm *vm, const char *name);
+
+/**
+ * @fn void be_setglobal(bvm*, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ */
BERRY_API void be_setglobal(bvm *vm, const char *name);
+
+/**
+ * @fn bool be_getbuiltin(bvm*, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @return (???)
+ */
BERRY_API bbool be_getbuiltin(bvm *vm, const char *name);
+
+/**
+ * @fn bool be_setmember(bvm*, int, const char*)
+ * @note FFI function
+ * @brief set the value of the member variable of the instance object class
+ *
+ * This function will copy the value at the top of the stack to the member k of the index position instance.
+ * Note that the top element of the stack will not pop up automatically.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the instance object
+ * @param k name of the member
+ * @return (???)
+ */
BERRY_API bbool be_setmember(bvm *vm, int index, const char *k);
+
+/**
+ * @fn bool be_getmember(bvm*, int, const char*)
+ * @note FFI function
+ * @brief get the value of the member variable of the instance object class
+ *
+ * This function pushes the value of the member of the index position instance k onto the top of the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the instance object
+ * @param k name of the member
+ * @return (???)
+ */
BERRY_API bbool be_getmember(bvm *vm, int index, const char *k);
+
+/**
+ * @fn bool be_getmethod(bvm*, int, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @param k
+ * @return (???)
+ */
BERRY_API bbool be_getmethod(bvm *vm, int index, const char *k);
+
+/**
+ * @fn bool be_getindex(bvm*, int)
+ * @note FFI function
+ * @brief get the value of list or map
+ *
+ * This function is used to get an element from the map or list container (internal values, not instances of map or list classes),
+ * and the index of the element is stored at the top of the stack (relative index is − 1).
+ * After calling this function, the value obtained from the container will be pushed onto the top of the stack.
+ * If there is no subscript pointed to by the container, the value of nil will be pushed onto the top of the stack.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the object to be operated
+ * @return (???)
+ */
BERRY_API bbool be_getindex(bvm *vm, int index);
+
+/**
+ * @fn bool be_setindex(bvm*, int)
+ * @note FFI function
+ * @brief set a value in list or map
+ *
+ * This function is used to write an element of the map or list container.
+ * The index of the value to be written in the virtual stack is − 1,
+ * and the index of the subscript of the write position in the virtual stack is − 2.
+ * If the element with the specified subscript does not exist in the container, the write operation will fail.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the object to be operated
+ * @return (???)
+ */
BERRY_API bbool be_setindex(bvm *vm, int index);
+
+/**
+ * @fn void be_getupval(bvm*, int, int)
+ * @note FFI function
+ * @brief read an Up Value of the native closure
+ *
+ * The read Up Value will be pushed onto the top of the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param index the native closure index value of the Up Value to be read
+ * @param pos position of the Up Value in the native closure Up Value table (numbering starts from 0)
+ */
BERRY_API void be_getupval(bvm *vm, int index, int pos);
+
+/**
+ * @fn bool be_setupval(bvm*, int, int)
+ * @note FFI function
+ * @brief set an Up Value of the native closure.
+ *
+ * This function obtains a value from the top of the virtual stack and writes it to the target Up Value.
+ * After the operation is completed, the top value of the stack will not be popped from the stack.
+ *
+ * @param vm virtual machine instance
+ * @param index the native closure index value of the Up Value to be read
+ * @param pos position of the Up Value in the native closure Up Value table (numbering starts from 0)
+ * @return (???)
+ */
BERRY_API bbool be_setupval(bvm *vm, int index, int pos);
+
+/**
+ * @fn bool be_setsuper(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API bbool be_setsuper(bvm *vm, int index);
+
+/**
+ * @fn void be_getsuper(bvm*, int)
+ * @note FFI function
+ * @brief get the parent object of the base class or instance of the class.
+ *
+ * If the value at index is a class with a base class, the function will push its base class onto the top of the stack;
+ * if the value at index is an object with a parent object,
+ * the function will take its parent The object is pushed onto the top of the stack; otherwise,
+ * a value of nil is pushed onto the top of the stack.
+ *
+ * @param vm virtual machine instance
+ * @param index the class or object to be operated
+ */
BERRY_API void be_getsuper(bvm *vm, int index);
+
+/**
+ * @fn int be_data_size(bvm*, int)
+ * @note FFI function
+ * @brief get the number of elements contained in the container
+ *
+ * If the value at index is a Map value or List value,
+ * the function returns the number of elements contained in the container, otherwise it returns -1.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the container object to be operated
+ * @return (???)
+ */
BERRY_API int be_data_size(bvm *vm, int index);
+
+/**
+ * @fn void be_data_push(bvm*, int)
+ * @note FFI function
+ * @brief append a new element to the end of the container.
+ *
+ * The object at index must be a List value.
+ * This function gets a value from the top of the stack and appends it to the end of the container.
+ * After the operation is completed, the value at the top of the stack will not be popped from the stack.
+ *
+ * @param vm virtual machine instance
+ * @param index index of the container object to be operate
+ */
BERRY_API void be_data_push(bvm *vm, int index);
+
+/**
+ * @fn bool be_data_insert(bvm*, int)
+ * @note FFI function
+ * @brief insert a pair of elements into the container
+ *
+ * The object at index must be a List value or a Map value.
+ * The inserted element forms a pair of key-value pairs.
+ * The value is stored at the top of the stack, and the key is stored at the previous index on the top of the stack.
+ * It should be noted that the key inserted into the Map container cannot be a nil value,
+ * and the key inserted into the List container must be an integer value.
+ * If the operation is successful, the function will return bture, otherwise it will return bfalse.
+ *
+ * @param vm virtual machine instance
+ * @param index container object to be operated
+ * @return (???)
+ */
BERRY_API bbool be_data_insert(bvm *vm, int index);
+
+/**
+ * @fn bool be_data_remove(bvm*, int)
+ * @note FFI function
+ * @brief remove an element in the container
+ *
+ * The object at index must be a List value or Map value.
+ * For the Map container, the key to delete the element is stored on the top of the virtual stack
+ * (need to be pressed before the function call);
+ * for the List container, the index of the element to be deleted is stored on the top of the virtual stack
+ * (need to be before the function call) push into).
+ * If the operation is successful, the function will return bture, otherwise it will return bfalse.
+ *
+ * @param vm virtual machine instance
+ * @param index container object to be operated.
+ * @return (???)
+ */
BERRY_API bbool be_data_remove(bvm *vm, int index);
+
+/**
+ * @fn bool be_data_merge(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ * @return (???)
+ */
BERRY_API bbool be_data_merge(bvm *vm, int index);
+
+/**
+ * @fn void be_data_resize(bvm*, int)
+ * @note FFI function
+ * @brief reset the capacity of the container
+ *
+ * This function is only available for List containers, and the new capacity is stored on the top of the virtual stack (must be an integer).
+ *
+ * @param vm virtual machine instance
+ * @param index container object to be operated
+ */
BERRY_API void be_data_resize(bvm *vm, int index);
+
+/**
+ * @fn void be_data_reverse(bvm*, int)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ */
BERRY_API void be_data_reverse(bvm *vm, int index);
+
+/**
+ * @fn int be_iter_next(bvm*, int)
+ * @note FFI function
+ * @brief get the next element of the iterator
+ *
+ * The iterator object may be an iterator of a List container or a Map container.
+ * For the List iterator, this function pushes the iteration result value onto the top of the stack,
+ * while for the Map iterator, it pushes the key value into the previous position and the top of the stack respectively.
+ * Calling this function will update the iterator.
+ * If the function returns 0, the call fails, returning 1 to indicate that the current iterator is a List iterator,
+ * and returning 2 to indicate that the current iterator is a Map iterator.
+ *
+ * @param vm virtual machine instance
+ * @param index iterator to be operated
+ * @return (???)
+ */
BERRY_API int be_iter_next(bvm *vm, int index);
+
+/**
+ * @fn bool be_iter_hasnext(bvm*, int)
+ * @note FFI function
+ * @brief test whether there is another element in the iterator
+ *
+ * The iterator object may be an iterator of a List container or a Map container.
+ * If there are more iterable elements in the iterator, return 1, otherwise return 0.
+ *
+ * @param vm virtual machine instance
+ * @param index iterator to be operated
+ * @return (???)
+ */
BERRY_API bbool be_iter_hasnext(bvm *vm, int index);
+
+/**
+ * @fn bool be_refcontains(bvm*, int)
+ * @note FFI function
+ * @brief test whether there is a reference to the specified object in the reference stack
+ *
+ * This function is used to test whether there is a reference to the specified object in the reference stack.
+ * It must be used in conjunction with be_refpush and be_refpop.
+ * This API can avoid recursion when traversing objects that have their own references.
+ * This function is used for the value of an instance type.
+ * If there is a reference to the object in the reference stack, it returns 1, otherwise it returns 0.
+ *
+ * @param vm virtual machine instance
+ * @param index object to be operated
+ * @return (???)
+ */
BERRY_API bbool be_refcontains(bvm *vm, int index);
+
+/**
+ * @fn void be_refpush(bvm*, int)
+ * @note FFI function
+ * @brief Push the reference of the specified object onto the reference stack.
+ *
+ * This function is used for the value of an instance type.
+ *
+ * @param vm virtual machine instance
+ * @param index object to be operated
+ */
BERRY_API void be_refpush(bvm *vm, int index);
+
+/**
+ * @fn void be_refpop(bvm*)
+ * @note FFI function
+ * @brief Pop the object at the top of the reference stack
+ *
+ * This function is used in pairs with be_refpush
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_refpop(bvm *vm);
+
+/**
+ * @fn void be_stack_require(bvm*, int)
+ * @note FFI function
+ * @brief tests the amount of free space on the stack and expands the stack space if it is insufficient
+ *
+ * If the free capacity of the virtual stack allocated by the VM to the native function is lower than this value,
+ * an expansion operation will be performed.
+ *
+ * @param vm virtual machine instance
+ * @param count required free stack capacity.
+ */
BERRY_API void be_stack_require(bvm *vm, int count);
+
+/**
+ * @fn bool be_getmodule(bvm*, const char*)
+ * @note FFI function
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param k
+ * @return (???)
+ */
BERRY_API bbool be_getmodule(bvm *vm, const char *k);
-/* relop operation APIs */
+/**
+ * @fn bool be_iseq(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_iseq(bvm *vm);
+
+/**
+ * @fn bool be_isneq(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_isneq(bvm *vm);
+
+/**
+ * @fn bool be_islt(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_islt(bvm *vm);
+
+/**
+ * @fn bool be_isle(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_isle(bvm *vm);
+
+/**
+ * @fn bool be_isgt(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_isgt(bvm *vm);
+
+/**
+ * @fn bool be_isge(bvm*)
+ * @note relop operation API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bbool be_isge(bvm *vm);
-/* Function call/return APIs */
+/**
+ * @fn int be_returnvalue(bvm*)
+ * @note Function call/return API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API int be_returnvalue(bvm *vm);
+
+/**
+ * @fn int be_returnnilvalue(bvm*)
+ * @note Function call/return API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API int be_returnnilvalue(bvm *vm);
+
+/**
+ * @fn void be_call(bvm*, int)
+ * @note Function call/return API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param argc
+ */
BERRY_API void be_call(bvm *vm, int argc);
+
+/**
+ * @fn int be_pcall(bvm*, int)
+ * @note Function call/return API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param argc
+ * @return (???)
+ */
BERRY_API int be_pcall(bvm *vm, int argc);
+
+/**
+ * @fn void be_exit(bvm*, int)
+ * @note Function call/return API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param status
+ */
BERRY_API void be_exit(bvm *vm, int status);
-/* exception APIs */
+/**
+ * @fn void be_raise(bvm*, const char*, const char*)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param except
+ * @param msg
+ */
__attribute__((noreturn))
BERRY_API void be_raise(bvm *vm, const char *except, const char *msg);
+
+/**
+ * @fn int be_getexcept(bvm*, int)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param code
+ * @return (???)
+ */
BERRY_API int be_getexcept(bvm *vm, int code);
+
+/**
+ * @fn void be_dumpvalue(bvm*, int)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param index
+ */
BERRY_API void be_dumpvalue(bvm *vm, int index);
+
+/**
+ * @fn void be_dumpexcept(bvm*)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_dumpexcept(bvm *vm);
+
+/**
+ * @fn void be_stop_iteration(bvm*)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_stop_iteration(bvm *vm);
+/**
+ * @fn void be_regfunc(bvm*, const char*, bntvfunc)
+ * @note exception API
+ * @brief register a native function
+ *
+ * The specific behavior of this function is related to the value of the BE_USE_PRECOMPILED_OBJECT macro
+ * (although the FFI is still available when using the compile-time construction technique,
+ * it cannot dynamically register the built-in variables.
+ * In this case, please refer to the method of registering the built-in objects.
+ *
+ * @param vm virtual machine instance
+ * @param name name of the native function
+ * @param f pointer of the native function
+ */
BERRY_API void be_regfunc(bvm *vm, const char *name, bntvfunc f);
+
+/**
+ * @fn void be_regclass(bvm*, const char*, const bnfuncinfo*)
+ * @note exception API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @param lib
+ */
BERRY_API void be_regclass(bvm *vm, const char *name, const bnfuncinfo *lib);
-/* VM management APIs */
+/**
+ * @fn bvm* be_vm_new(void)
+ * @note VM management API
+ * @brief Construct a VM
+ *
+ * @return (???)
+ */
BERRY_API bvm* be_vm_new(void);
+
+/**
+ * @fn void be_vm_delete(bvm*)
+ * @note VM management API
+ * @brief Destroy a VM
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_vm_delete(bvm *vm);
-/* Observability hook */
+/**
+ * @fn void be_set_obs_hook(bvm*, bobshook)
+ * @note Observability hook
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param hook
+ */
BERRY_API void be_set_obs_hook(bvm *vm, bobshook hook);
BERRY_API void be_set_obs_micros(bvm *vm, bmicrosfnct micros);
+
+
+/**
+ * @fn void be_set_ctype_func_hanlder(bvm*, bctypefunc)
+ * @note Observability hook
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param handler
+ */
BERRY_API void be_set_ctype_func_hanlder(bvm *vm, bctypefunc handler);
+
+/**
+ * @fn bctypefunc be_get_ctype_func_hanlder(bvm*)
+ * @note Observability hook
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @return (???)
+ */
BERRY_API bctypefunc be_get_ctype_func_hanlder(bvm *vm);
-/* code load APIs */
-BERRY_API int be_loadbuffer(bvm *vm,
- const char *name, const char *buffer, size_t length);
+/**
+ * @fn int be_loadbuffer(bvm*, const char*, const char*, size_t)
+ * @note code load API
+ * @brief load a piece of source code from the buffer and compile it into bytecode
+ *
+ * f the compilation is successful, be_loadbuffer will compile the source code into a Berry function and place
+ * it on the top of the virtual stack. If the compilation encounters an error, be_loadbuffer will return
+ * an error value of type berrorcode (Section errorcode), and if possible, will store the
+ * specific error message string at the top of the virtual stack.
+ *
+ * @param vm virtual machine instance
+ * @param name string, which is usually used to mark the source of the source code
+ * @param buffer buffer for storing the source code
+ * @param length length of the buffer
+ * @return (???)
+ */
+BERRY_API int be_loadbuffer(bvm *vm, const char *name, const char *buffer, size_t length);
+
+/**
+ * @fn int be_loadmode(bvm *vm, const char *name, bbool islocal)
+ * @note code load API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @param islocal
+ * @return (???)
+ */
BERRY_API int be_loadmode(bvm *vm, const char *name, bbool islocal);
+
+/**
+ * @fn int be_loadlib(bvm*, const char*)
+ * @note code load API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param path
+ * @return (???)
+ */
BERRY_API int be_loadlib(bvm *vm, const char *path);
+
+/**
+ * @fn int be_savecode(bvm*, const char*)
+ * @note code load API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param name
+ * @return (???)
+ */
BERRY_API int be_savecode(bvm *vm, const char *name);
-/* module path list APIs */
+/**
+ * @fn void be_module_path(bvm*)
+ * @note module path list API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ */
BERRY_API void be_module_path(bvm *vm);
+
+/**
+ * @fn void be_module_path_set(bvm*, const char*)
+ * @note module path list API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param path
+ */
BERRY_API void be_module_path_set(bvm *vm, const char *path);
-/* bytes operations */
+/**
+ * @fn void* be_pushbytes(bvm *vm, const void *buf, size_t len)
+ * @note bytes operation
+ * @brief Push a bytes() buffer
+ *
+ * @param vm virtual machine instance
+ * @param buf starting at position
+ * @param len size
+ */
BERRY_API void* be_pushbytes(bvm *vm, const void *buf, size_t len);
+
+/**
+ * @fn const void* be_tobytes(bvm *vm, int index, size_t *len)
+ * @note bytes operation
+ * @brief return virtual stack as a bytes buffer
+ *
+ * Get the value of the index position of index from the virtual stack and return it as a bytes buffer.
+ * The pointer of the buffer is returned, and the size is stored in *len (unless len is NULL).
+ * This function works only for instances of the bytes class, or returns NULL.
+ *
+ * @param vm virtual machine instance
+ * @param index index from the virtual stac
+ * @param len size
+ */
BERRY_API const void* be_tobytes(bvm *vm, int index, size_t *len);
-/* debug APIs */
+/**
+ * @fn void be_sethook(bvm*, const char*)
+ * @note debug API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param mask
+ */
BERRY_API void be_sethook(bvm *vm, const char *mask);
+
+/**
+ * @fn void be_setntvhook(bvm*, bntvhook, void*, int)
+ * @note debug API
+ * @brief (???)
+ *
+ * @param vm virtual machine instance
+ * @param hook
+ * @param data
+ * @param mask
+ */
BERRY_API void be_setntvhook(bvm *vm, bntvhook hook, void *data, int mask);
-/* basic character IO APIs */
+/**
+ * @fn void be_writebuffer(const char*, size_t)
+ * @note basic character IO API
+ * @brief implement on berry_port.c
+ *
+ * Output a piece of data to the standard output device, the parameter
+ * `buffer` is the first address of the output data block, and `length` is
+ * the length of the output data block. This function outputs to the
+ * `stdout` file by default. Inside the interpreter, this function is
+ * usually used as a character stream output, not a binary stream.
+ *
+ * @param buffer
+ * @param length
+ */
BERRY_API void be_writebuffer(const char *buffer, size_t length);
+
+/**
+ * @fn char* be_readstring(char *buffer, size_t size)
+ * @note basic character IO API
+ * @brief implement on berry_port.c
+ *
+ * Input a piece of data from the standard input device, and read at most
+ * one row of data each time this function is called. The parameter
+ * `buffer` is the data buffer passed in by the caller, and the capacity of
+ * the buffer is `size`. This function will stop reading and return when
+ * the buffer capacity is used up, otherwise it will return when a newline
+ * character or end of file character is read. If the function executes
+ * successfully, it will directly use the `buffer` parameter as the return
+ * value, otherwise it will return `NULL`.
+ *
+ * This function will add the read line breaks to the read data, and each
+ * time the `be_readstring` function is called, it will continue to read
+ * from the current position. This function is only called in the
+ * implementation of the native function `input`, and the `be_readstring`
+ * function may not be implemented when it is not necessary.
+ *
+ * @param buffer
+ * @param size
+ * @return (???)
+ */
BERRY_API char* be_readstring(char *buffer, size_t size);
#ifdef __cplusplus
From f46b9f4e2d5b99c3d46a22432ae0ab347026e501 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 22:36:00 +0200
Subject: [PATCH 022/289] Update Berry tests from upstream (#18472)
---
lib/libesp32/berry/tests/bytes.be | 9 ++++
lib/libesp32/berry/tests/class_static.be | 21 ++++++++
lib/libesp32/berry/tests/introspect.be | 11 ++++
lib/libesp32/berry/tests/json.be | 13 +++++
lib/libesp32/berry/tests/json_advanced.be | 51 +++++++++++++++++++
.../berry/tests/json_test_stack_size.be | 11 ++++
lib/libesp32/berry/tests/map.be | 7 +++
7 files changed, 123 insertions(+)
create mode 100644 lib/libesp32/berry/tests/json_advanced.be
create mode 100644 lib/libesp32/berry/tests/json_test_stack_size.be
diff --git a/lib/libesp32/berry/tests/bytes.be b/lib/libesp32/berry/tests/bytes.be
index d2b2c1573..6a481d62c 100644
--- a/lib/libesp32/berry/tests/bytes.be
+++ b/lib/libesp32/berry/tests/bytes.be
@@ -248,3 +248,12 @@ assert(bytes("0011223344").reverse(1, nil) == bytes("0044332211"))
assert(bytes("0011223344").reverse(nil, nil, 2) == bytes("2233001144"))
assert(bytes("001122334455").reverse(nil, nil, 3) == bytes("334455001122"))
+
+# tobool returns `true` is bytes() is not null, `false` if empty
+assert(bool(bytes()) == false)
+assert(bytes().tobool() == false)
+assert(!bytes())
+
+assert(bool(bytes("00")) == true)
+assert(bytes("01").tobool() == true)
+assert(bytes("02"))
diff --git a/lib/libesp32/berry/tests/class_static.be b/lib/libesp32/berry/tests/class_static.be
index c86a4a4b3..1b3d0f928 100644
--- a/lib/libesp32/berry/tests/class_static.be
+++ b/lib/libesp32/berry/tests/class_static.be
@@ -120,3 +120,24 @@ assert(A.a == 1)
assert(B.a == A)
assert(B.b == 1)
assert(B.c == A)
+
+#- static class get an implicit `_class` variable -#
+class A
+ static def f(x) return _class end
+end
+assert(A.f() == A)
+
+#- static class within a class -#
+class A
+ static class B
+ static def f() return 1 end
+ def g() return 2 end
+ end
+end
+a = A()
+b = A.B()
+assert(classname(a) == 'A')
+assert(classname(b) == 'B')
+assert(A.B.f() == 1)
+assert(b.g() == 2)
+assert(super(B) == nil)
diff --git a/lib/libesp32/berry/tests/introspect.be b/lib/libesp32/berry/tests/introspect.be
index cb4a612d8..c93033982 100644
--- a/lib/libesp32/berry/tests/introspect.be
+++ b/lib/libesp32/berry/tests/introspect.be
@@ -31,3 +31,14 @@ assert(a.a == 3)
import introspect
m = introspect.module("math") # load module `math`, assign to `m` and don't create a global variable
assert(type(m.pi) == 'real')
+
+#- name -#
+import string
+assert(introspect.name(string) == 'string')
+assert(introspect.name(print) == nil) # native C function don't have a registered name
+assert(introspect.name("foo") == nil)
+class A def a() end static def b() end static var c end
+assert(introspect.name(A) == 'A')
+assert(introspect.name(A.a) == 'a')
+assert(introspect.name(A.b) == 'b')
+assert(introspect.name(A.c) == nil)
diff --git a/lib/libesp32/berry/tests/json.be b/lib/libesp32/berry/tests/json.be
index 92df2f3e6..2165eda8d 100644
--- a/lib/libesp32/berry/tests/json.be
+++ b/lib/libesp32/berry/tests/json.be
@@ -80,3 +80,16 @@ class map2 : map def init() super(self).init() end end
var m = map2()
m['key'] = 1
assert_dump(m, '{"key":1}')
+
+# sweep dumping nested arrays of diffrent sizes
+# this tests for any unexpanded stack conditions
+for count : 10..200
+ var arr = [[]]
+ var last_arr = arr
+ for i : 0..count
+ var pushed = [i]
+ last_arr.push(pushed)
+ last_arr = pushed
+ end
+ json.dump(arr)
+end
diff --git a/lib/libesp32/berry/tests/json_advanced.be b/lib/libesp32/berry/tests/json_advanced.be
new file mode 100644
index 000000000..72206d9de
--- /dev/null
+++ b/lib/libesp32/berry/tests/json_advanced.be
@@ -0,0 +1,51 @@
+import os
+import json
+
+
+
+def assert_load_failed(text)
+ assert(json.load(text) == nil)
+end
+
+var input_file = open("tests/json_test_cases.json", "r")
+var test_cases = json.load(input_file.read())
+
+# check positive cases
+var has_failed_positives = false
+for case_name : test_cases["positive"].keys()
+ var case = test_cases["positive"][case_name]
+ var val = json.load(case)
+ if val == nil && case != "null"
+ print("Failed to load case: " + case_name)
+ has_failed_positives = true
+ end
+end
+
+if has_failed_positives
+ assert(false)
+end
+
+# check negative cases
+
+var has_failed_negatives = false
+for case_name : test_cases["negative"].keys()
+ var case = test_cases["negative"][case_name]
+
+ var val = json.load(case)
+ if val != nil
+ print("Failed to fail case: " + case_name + ", got: " + json.dump(val))
+ has_failed_negatives = true
+ end
+end
+
+if has_failed_negatives
+ # assert(false)
+end
+
+# check "any" cases, only for crashes
+
+for case_name : test_cases["any"].keys()
+ var case = test_cases["any"][case_name]
+ var val = json.load(case)
+end
+
diff --git a/lib/libesp32/berry/tests/json_test_stack_size.be b/lib/libesp32/berry/tests/json_test_stack_size.be
new file mode 100644
index 000000000..f76ff8bb4
--- /dev/null
+++ b/lib/libesp32/berry/tests/json_test_stack_size.be
@@ -0,0 +1,11 @@
+import json
+
+# this test must be in a separate file, so that the stack is not expanded yet by other tests
+
+arr = "{"
+for i : 0..1000
+ arr += '"k' + str(i) + '": "v' + str(i) + '",'
+end
+arr += "}"
+
+json.load(arr)
diff --git a/lib/libesp32/berry/tests/map.be b/lib/libesp32/berry/tests/map.be
index ca0c4399d..9029faed4 100644
--- a/lib/libesp32/berry/tests/map.be
+++ b/lib/libesp32/berry/tests/map.be
@@ -30,3 +30,10 @@ m.remove(2)
assert(str(m) == '{1: 2}')
m.remove(1)
assert(str(m) == '{}')
+
+# allow booleans to be used as keys
+m={true:10, false:20}
+assert(m.contains(true))
+assert(m.contains(false))
+assert(m[true] == 10)
+assert(m[false] == 20)
From f5e6ba956d2cbd92ff755812f18c0b1385a5fd21 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 22:36:18 +0200
Subject: [PATCH 023/289] Berry upstream (#18471)
---
lib/libesp32/berry/src/be_constobj.h | 2 +-
lib/libesp32/berry/src/berry.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/lib/libesp32/berry/src/be_constobj.h b/lib/libesp32/berry/src/be_constobj.h
index 3ef55eebd..485bf85e6 100644
--- a/lib/libesp32/berry/src/be_constobj.h
+++ b/lib/libesp32/berry/src/be_constobj.h
@@ -422,7 +422,7 @@ const bvector _name = { \
}
#define be_define_const_native_module(_module) \
-const bntvmodule_t be_native_module_##_module = { \
+const bntvmodule_t be_native_module_##_module = { \
#_module, \
0, 0, \
(bmodule*)&(m_lib##_module) \
diff --git a/lib/libesp32/berry/src/berry.h b/lib/libesp32/berry/src/berry.h
index bae47a590..1a99b9190 100644
--- a/lib/libesp32/berry/src/berry.h
+++ b/lib/libesp32/berry/src/berry.h
@@ -765,7 +765,6 @@ BERRY_API bint be_str2int(const char *str, const char **endstr);
* @return (???)
*/
BERRY_API breal be_str2real(const char *str, const char **endstr);
-BERRY_API const char *be_str2num(bvm *vm, const char *str);
/**
* @fn const char* be_str2num(bvm *vm, const char *str)
@@ -792,7 +791,6 @@ BERRY_API const char* be_str2num(bvm *vm, const char *str);
*/
BERRY_API int be_top(bvm *vm);
-
/**
* @fn const char* be_typename(bvm *vm, int index)
* @note FFI function
From d9eeb8bf57a63e28533be032d5a4378ad0263da9 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 22:42:02 +0200
Subject: [PATCH 024/289] Berry remove superfluous test (#18473)
---
lib/libesp32/berry/tests/json_advenced.be | 50 -----------------------
1 file changed, 50 deletions(-)
delete mode 100644 lib/libesp32/berry/tests/json_advenced.be
diff --git a/lib/libesp32/berry/tests/json_advenced.be b/lib/libesp32/berry/tests/json_advenced.be
deleted file mode 100644
index be3b87e0b..000000000
--- a/lib/libesp32/berry/tests/json_advenced.be
+++ /dev/null
@@ -1,50 +0,0 @@
-import os
-import json
-
-
-
-def assert_load_failed(text)
- assert(json.load(text) == nil)
-end
-
-var input_file = open("tests/json_test_cases.json", "r")
-var test_cases = json.load(input_file.read())
-
-# check positive cases
-var has_failed_positives = false
-for case_name : test_cases["positive"].keys()
- var case = test_cases["positive"][case_name]
- var val = json.load(case)
- if val == nil && case != "null"
- print("Failed to load case: " + case_name)
- has_failed_positives = true
- end
-end
-
-if has_failed_positives
- assert(false)
-end
-
-# check negative cases
-
-var has_failed_negatives = false
-for case_name : test_cases["negative"].keys()
- var case = test_cases["negative"][case_name]
-
- var val = json.load(case)
- if val != nil
- print("Failed to fail case: " + case_name + ", got: " + json.dump(val))
- has_failed_negatives = true
- end
-end
-
-if has_failed_negatives
- # assert(false)
-end
-
-# check "any" cases, only for crashes
-
-for case_name : test_cases["any"].keys()
- var case = test_cases["any"][case_name]
- var val = json.load(case)
-end
From 045f8b4aec50fb5cf3d44cfda110d24513dd6024 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 21 Apr 2023 23:05:25 +0200
Subject: [PATCH 025/289] Berry fix corruption in debug (#18475)
---
lib/libesp32/berry/src/be_debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libesp32/berry/src/be_debug.c b/lib/libesp32/berry/src/be_debug.c
index 4cd44bf61..58f81f2b4 100644
--- a/lib/libesp32/berry/src/be_debug.c
+++ b/lib/libesp32/berry/src/be_debug.c
@@ -137,7 +137,7 @@ void be_print_inst(binstruction ins, int pc, void* fout)
logbuf("%s", opc2str(op));
break;
}
- memcpy(__lbuf_tmp, __lbuf, strlen(__lbuf));
+ memcpy(__lbuf_tmp, __lbuf, strlen(__lbuf)+1);
logbuf("%s\n", __lbuf_tmp);
if (fout) {
be_fwrite(fout, __lbuf, strlen(__lbuf));
From a2b9574ec995ceffaa98ac82c5ee335185134640 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sat, 22 Apr 2023 10:14:39 +0200
Subject: [PATCH 026/289] Berry fix solidify script (#18476)
---
lib/libesp32/berry_tasmota/solidify_all.be | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libesp32/berry_tasmota/solidify_all.be b/lib/libesp32/berry_tasmota/solidify_all.be
index 81f392870..f24050a65 100755
--- a/lib/libesp32/berry_tasmota/solidify_all.be
+++ b/lib/libesp32/berry_tasmota/solidify_all.be
@@ -14,7 +14,7 @@ import sys
sys.path().push('src/embedded') # allow to import from src/embedded
# globals that need to exist to make compilation succeed
-var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,udp,"
+var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,udp,I2C_Driver,"
"lv_clock,lv_clock_icon,lv_signal_arcs,lv_signal_bars,lv_wifi_arcs_icon,lv_wifi_arcs,"
"lv_wifi_bars_icon,lv_wifi_bars,"
"_lvgl,"
From 39094bc07981a1ac2db14159ec03ef60f65f6666 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sat, 22 Apr 2023 23:33:22 +0200
Subject: [PATCH 027/289] Matter persist plugins config (#18486)
---
.../berry_matter/src/be_matter_module.c | 4 +-
.../src/embedded/Matter_Device.be | 182 +-
.../src/embedded/Matter_Plugin.be | 31 +-
.../src/embedded/Matter_Plugin_Device.be | 6 +-
.../src/embedded/Matter_Plugin_Light0.be | 5 +-
.../src/embedded/Matter_Plugin_Light1.be | 5 +-
.../src/embedded/Matter_Plugin_Light2.be | 5 +-
.../src/embedded/Matter_Plugin_Light3.be | 5 +-
.../src/embedded/Matter_Plugin_OnOff.be | 20 +-
.../src/embedded/Matter_Plugin_Root.be | 5 +-
.../src/embedded/Matter_Plugin_Sensor.be | 21 +-
.../embedded/Matter_Plugin_Sensor_Humidity.be | 1 +
...be => Matter_Plugin_Sensor_Illuminance.be} | 7 +-
.../embedded/Matter_Plugin_Sensor_Pressure.be | 1 +
.../src/embedded/Matter_Plugin_Sensor_Temp.be | 3 +-
.../src/embedded/Matter_Session_Store.be | 5 +-
.../src/solidify/solidified_Matter_Device.h | 6371 +++++++++--------
.../src/solidify/solidified_Matter_Plugin.h | 726 +-
.../solidified_Matter_Plugin_Device.h | 174 +-
.../solidified_Matter_Plugin_Light0.h | 296 +-
.../solidified_Matter_Plugin_Light1.h | 320 +-
.../solidified_Matter_Plugin_Light2.h | 420 +-
.../solidified_Matter_Plugin_Light3.h | 388 +-
.../solidify/solidified_Matter_Plugin_OnOff.h | 326 +-
.../solidify/solidified_Matter_Plugin_Root.h | 32 +-
.../solidified_Matter_Plugin_Sensor.h | 194 +-
...solidified_Matter_Plugin_Sensor_Humidity.h | 65 +-
...dified_Matter_Plugin_Sensor_Illuminance.h} | 85 +-
...solidified_Matter_Plugin_Sensor_Pressure.h | 63 +-
.../solidified_Matter_Plugin_Sensor_Temp.h | 69 +-
.../solidified_Matter_Session_Store.h | 1722 ++---
31 files changed, 6213 insertions(+), 5344 deletions(-)
rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_Sensor_Light.be => Matter_Plugin_Sensor_Illuminance.be} (92%)
rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_Sensor_Light.h => solidified_Matter_Plugin_Sensor_Illuminance.h} (87%)
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 8dbccd3a9..c7f4c7d9c 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -162,7 +162,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Sensor.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
-#include "solidify/solidified_Matter_Plugin_Sensor_Light.h"
+#include "solidify/solidified_Matter_Plugin_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h"
/*********************************************************************************************\
@@ -340,7 +340,7 @@ module matter (scope: global, strings: weak) {
Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
- Plugin_Sensor_Light, class(be_class_Matter_Plugin_Sensor_Light) // Light Sensor
+ Plugin_Sensor_Illuminance, class(be_class_Matter_Plugin_Sensor_Illuminance) // Illuminance Sensor
Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index 2e0da6cdf..dec7f2c9e 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -29,8 +29,10 @@ class Matter_Device
static var PASE_TIMEOUT = 10*60 # default open commissioning window (10 minutes)
var started # is the Matter Device started (configured, mDNS and UDPServer started)
var plugins # list of plugins
+ var plugins_persist # true if plugins configuration needs to be saved
+ var plugins_classes # map of registered classes by type name
var udp_server # `matter.UDPServer()` object
- var message_handler # `matter.MessageHandler()` object
+ var message_handler # `matter.MessageHandler()` object
var sessions # `matter.Session_Store()` objet
var ui
# Commissioning open
@@ -73,14 +75,17 @@ class Matter_Device
self.started = false
self.plugins = []
+ self.plugins_persist = false # plugins need to saved only when the first fabric is associated
+ self.plugins_classes = {}
+ self.register_native_classes() # register all native classes
self.vendorid = self.VENDOR_ID
self.productid = self.PRODUCT_ID
self.root_iterations = self.PBKDF_ITERATIONS
- self.root_salt = crypto.random(16) # bytes("5350414B453250204B65792053616C74")
+ self.root_salt = crypto.random(16)
self.ipv4only = false
self.load_param()
- self.sessions = matter.Session_Store()
+ self.sessions = matter.Session_Store(self)
self.sessions.load_fabrics()
self.message_handler = matter.MessageHandler(self)
self.ui = matter.UI(self)
@@ -106,6 +111,10 @@ class Matter_Device
tasmota.add_driver(self)
self.register_commands()
+
+ if self.sessions.count_active_fabrics() > 0
+ self.plugins_persist = true # if there are active fabrics, then we persist plugins configuration
+ end
end
#############################################################
@@ -113,9 +122,7 @@ class Matter_Device
def start()
if self.started return end # abort if already started
- # add the default plugin
- self.plugins.push(matter.Plugin_Root(self, 0))
- # autoconfigure other plugins
+ # autoconfigure other plugins if needed
self.autoconf_device()
# for now read sensors every 30 seconds
@@ -596,13 +603,18 @@ class Matter_Device
#############################################################
#
def save_param()
- import json
- var j = json.dump({'distinguish':self.root_discriminator, 'passcode':self.root_passcode, 'ipv4only':self.ipv4only})
+ import string
+ var j = string.format('{"distinguish":%i,"passcode":%i,"ipv4only":%s', self.root_discriminator, self.root_passcode, self.ipv4only ? 'true':'false')
+ if self.plugins_persist
+ j += ',"config":'
+ j += self.plugins_to_json()
+ end
+ j += '}'
try
- import string
var f = open(self.FILENAME, "w")
f.write(j)
f.close()
+ tasmota.log(string.format("MTR: =Saved parameters%s", self.plugins_persist ? " and condiguration" : ""), 2)
return j
except .. as e, m
tasmota.log("MTR: Session_Store::save Exception:" + str(e) + "|" + str(m), 2)
@@ -627,6 +639,11 @@ class Matter_Device
self.root_discriminator = j.find("distinguish", self.root_discriminator)
self.root_passcode = j.find("passcode", self.root_passcode)
self.ipv4only = bool(j.find("ipv4only", false))
+ var config = j.find("config")
+ if config
+ self._load_plugins_config(config)
+ self.plugins_persist = true
+ end
except .. as e, m
if e != "io_error"
tasmota.log("MTR: Session_Store::load Exception:" + str(e) + "|" + str(m), 2)
@@ -645,6 +662,44 @@ class Matter_Device
if dirty self.save_param() end
end
+ #############################################################
+ # Load plugins configuration from json
+ #
+ # 'config' is a map
+ # Ex:
+ # {'32': {'filter': 'AXP192#Temperature', 'type': 'temperature'}, '40': {'filter': 'BMP280#Pressure', 'type': 'pressure'}, '34': {'filter': 'SHT3X#Temperature', 'type': 'temperature'}, '33': {'filter': 'BMP280#Temperature', 'type': 'temperature'}, '1': {'relay': 0, 'type': 'relay'}, '56': {'filter': 'SHT3X#Humidity', 'type': 'humidity'}, '0': {'type': 'root'}}
+ def _load_plugins_config(config)
+ import string
+
+ var endpoints = self.k2l_num(config)
+ tasmota.log("MTR: endpoints to be configured "+str(endpoints), 3)
+
+ for ep: endpoints
+ try
+ var plugin_conf = config[str(ep)]
+ tasmota.log(string.format("MTR: endpoint %i config %s", ep, plugin_conf), 3)
+
+ var pi_class_name = plugin_conf.find('type')
+ if pi_class_name == nil tasmota.log("MTR: no class name, skipping", 3) continue end
+ var pi_class = self.plugins_classes.find(pi_class_name)
+ if pi_class == nil tasmota.log("MTR: unknown class name '"+str(pi_class_name)+"' skipping", 2) continue end
+
+ var pi = pi_class(self, ep, plugin_conf)
+ self.plugins.push(pi)
+
+ var param_log = ''
+ for k:self.k2l(plugin_conf)
+ if k == 'type' continue end
+ param_log += string.format(" %s:%s", k, plugin_conf[k])
+ end
+ tasmota.log(string.format("MTR: endpoint:%i type:%s%s", ep, pi_class_name, param_log), 2)
+ except .. as e, m
+ tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2)
+ end
+ end
+
+ tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
+ end
#############################################################
# Matter plugin management
@@ -916,9 +971,31 @@ class Matter_Device
#############################################################
# Autoconfigure device from template
#
+ # Applies only if there are no plugins already configured
+ ## TODO generate map instead
def autoconf_device()
import string
import json
+
+ if size(self.plugins) > 0 return end # already configured
+
+ var config = self.autoconf_device_map()
+ tasmota.log("MTR: autoconfig = " + str(config), 3)
+ self._load_plugins_config(config)
+
+ end
+
+ #############################################################
+ # Autoconfigure device from template to map
+ #
+ # Applies only if there are no plugins already configured
+ def autoconf_device_map()
+ import json
+ var m = {}
+
+ # add the default plugin
+ m["0"] = {'type':'root'}
+
# check if we have a light
var endpoint = 1
var light_present = false
@@ -929,14 +1006,11 @@ class Matter_Device
var channels_count = size(light_status.find('channels', ""))
if channels_count > 0
if channels_count == 1
- self.plugins.push(matter.Plugin_Light1(self, endpoint))
- tasmota.log(string.format("MTR: Endpoint:%i Light_Dimmer", endpoint), 2)
+ m[str(endpoint)] = {'type':'light1'}
elif channels_count == 2
- self.plugins.push(matter.Plugin_Light2(self, endpoint))
- tasmota.log(string.format("MTR: Endpoint:%i Light_CT", endpoint), 2)
+ m[str(endpoint)] = {'type':'light2'}
else
- self.plugins.push(matter.Plugin_Light3(self, endpoint))
- tasmota.log(string.format("MTR: Endpoint:%i Light_RGB", endpoint), 2)
+ m[str(endpoint)] = {'type':'light3'}
end
light_present = true
endpoint += 1
@@ -949,8 +1023,7 @@ class Matter_Device
if light_present relay_count -= 1 end # last power is taken for lights
while relay_index < relay_count
- self.plugins.push(matter.Plugin_OnOff(self, endpoint, relay_index))
- tasmota.log(string.format("MTR: Endpoint:%i Relay_%i", endpoint, relay_index + 1), 2)
+ m[str(endpoint)] = {'type':'relay','relay':relay_index}
relay_index += 1
endpoint += 1
end
@@ -965,8 +1038,7 @@ class Matter_Device
var sensor_2 = sensors[k1]
if isinstance(sensor_2, map) && sensor_2.contains("Temperature")
var temp_rule = k1 + "#Temperature"
- self.plugins.push(matter.Plugin_Sensor_Temp(self, endpoint, temp_rule))
- tasmota.log(string.format("MTR: Endpoint:%i Temperature (%s)", endpoint, temp_rule), 2)
+ m[str(endpoint)] = {'type':'temperature','filter':temp_rule}
endpoint += 1
end
if endpoint > 0x28 break end
@@ -979,8 +1051,7 @@ class Matter_Device
var sensor_2 = sensors[k1]
if isinstance(sensor_2, map) && sensor_2.contains("Pressure")
var temp_rule = k1 + "#Pressure"
- self.plugins.push(matter.Plugin_Sensor_Pressure(self, endpoint, temp_rule))
- tasmota.log(string.format("MTR: Endpoint:%i Pressure (%s)", endpoint, temp_rule), 2)
+ m[str(endpoint)] = {'type':'pressure','filter':temp_rule}
endpoint += 1
end
if endpoint > 0x2F break end
@@ -993,8 +1064,7 @@ class Matter_Device
var sensor_2 = sensors[k1]
if isinstance(sensor_2, map) && sensor_2.contains("Illuminance")
var temp_rule = k1 + "#Illuminance"
- self.plugins.push(matter.Plugin_Sensor_Light(self, endpoint, temp_rule))
- tasmota.log(string.format("MTR: Endpoint:%i Light (%s)", endpoint, temp_rule), 2)
+ m[str(endpoint)] = {'type':'illuminance','filter':temp_rule}
endpoint += 1
end
if endpoint > 0x38 break end
@@ -1007,13 +1077,13 @@ class Matter_Device
var sensor_2 = sensors[k1]
if isinstance(sensor_2, map) && sensor_2.contains("Humidity")
var temp_rule = k1 + "#Humidity"
- self.plugins.push(matter.Plugin_Sensor_Humidity(self, endpoint, temp_rule))
- tasmota.log(string.format("MTR: Endpoint:%i Humidity (%s)", endpoint, temp_rule), 2)
+ m[str(endpoint)] = {'type':'humidity','filter':temp_rule}
endpoint += 1
end
if endpoint > 0x40 break end
end
- tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
+ # tasmota.publish_result('{"Matter":{"Initialized":1}}', 'Matter')
+ return m
end
# get keys of a map in sorted order
@@ -1021,6 +1091,66 @@ class Matter_Device
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
end
+ # get keys of a map in sorted order, as numbers
+ static def k2l_num(m) var l=[] if m==nil return l end for k:m.keys() l.push(int(k)) end
+ for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
+ end
+
+ #############################################################
+ # plugins_to_json
+ #
+ # Export plugins configuration as a JSON string
+ def plugins_to_json()
+ import string
+ var s = '{'
+ var i = 0
+ while i < size(self.plugins)
+ var pi = self.plugins[i]
+ if i > 0 s += ',' end
+ s += string.format('"%i":%s', pi.get_endpoint(), pi.to_json())
+ i += 1
+ end
+ s += '}'
+ return s
+ end
+
+ #############################################################
+ # register_plugin_class
+ #
+ # Adds a class by name
+ def register_plugin_class(name, cl)
+ self.plugins_classes[name] = cl
+ end
+
+ #############################################################
+ # register_native_classes
+ #
+ # Adds a class by name
+ def register_native_classes(name, cl)
+ self.register_plugin_class('root', matter.Plugin_Root)
+ self.register_plugin_class('light0', matter.Plugin_Light0)
+ self.register_plugin_class('light1', matter.Plugin_Light1)
+ self.register_plugin_class('light2', matter.Plugin_Light2)
+ self.register_plugin_class('light3', matter.Plugin_Light3)
+ self.register_plugin_class('relay', matter.Plugin_OnOff)
+ self.register_plugin_class('temperature', matter.Plugin_Sensor_Temp)
+ self.register_plugin_class('humidity', matter.Plugin_Sensor_Humidity)
+ self.register_plugin_class('illuminance', matter.Plugin_Sensor_Illuminance)
+ self.register_plugin_class('pressure', matter.Plugin_Sensor_Pressure)
+ tasmota.log("MTR: registered classes "+str(self.k2l(self.plugins_classes)), 3)
+ end
+
+ #####################################################################
+ # Events
+ #####################################################################
+ def event_fabrics_saved()
+ # if the plugins configuration was not persisted and a new fabric is saved, persist it
+ if self.sessions.count_active_fabrics() > 0 && !self.plugins_persist
+ self.plugins_persist = true
+ self.save_param()
+ end
+ end
+
#####################################################################
# Commands `Mtr___`
#####################################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
index 60cfe112b..659e39fc4 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
@@ -23,6 +23,7 @@
#@ solidify:Matter_Plugin,weak
class Matter_Plugin
+ static var NAME = "generic" # name of the plug-in in json
static var CLUSTERS = {
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
}
@@ -39,7 +40,10 @@ class Matter_Plugin
#############################################################
# Constructor
#
- def init(device, endpoint)
+ # device: contains the root device object so the plugin can "call home"
+ # endpoint: (int) the endpoint number (16 bits)
+ # arguments: (map) the map for all complementary arguments that are plugin specific
+ def init(device, endpoint, arguments)
self.device = device
self.endpoint = endpoint
self.clusters = self.consolidate_clusters()
@@ -215,6 +219,31 @@ class Matter_Plugin
def every_second()
self.update_shadow() # force reading value and sending subscriptions
end
+
+ #############################################################
+ # to_json
+ #
+ # generate the json string for parameter of the plug-in
+ # this function calls a method to be overriden with custom parameters
+ def to_json()
+ import string
+ var s = string.format('{"type":"%s"', self.NAME)
+ s = self.to_json_parameters(s)
+ s += '}'
+ return s
+ end
+
+ #############################################################
+ # to_json_parameters
+ #
+ # To be overriden.
+ # returns a json sub-string to add after endpoint and type name
+ def to_json_parameters(s)
+ # s += ',"my_param":"my_value"'
+ return s
+ end
+
+
end
matter.Plugin = Matter_Plugin
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
index 864b536bf..d8e728558 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
@@ -32,9 +32,9 @@ class Matter_Plugin_Device : Matter_Plugin
#############################################################
# Constructor
- def init(device, endpoint, tasmota_relay_index)
- super(self).init(device, endpoint)
- end
+ # def init(device, endpoint, arguments)
+ # super(self).init(device, endpoint, arguments)
+ # end
#############################################################
# read an attribute
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
index 37d9dff38..0c0b02465 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
@@ -25,6 +25,7 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Light0,weak
class Matter_Plugin_Light0 : Matter_Plugin
+ static var NAME = "light0" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
@@ -38,8 +39,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
#############################################################
# Constructor
- def init(device, endpoint)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
self.shadow_onoff = false
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
index b917efb01..518b48137 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Light0 end
#@ solidify:Matter_Plugin_Light1,weak
class Matter_Plugin_Light1 : Matter_Plugin_Light0
+ static var NAME = "light1" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
@@ -40,8 +41,8 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
#############################################################
# Constructor
- def init(device, endpoint)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
self.shadow_bri = 0
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
index aa2f38207..928d0a8f5 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light2,weak
class Matter_Plugin_Light2 : Matter_Plugin_Light1
+ static var NAME = "light2" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
@@ -41,8 +42,8 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
#############################################################
# Constructor
- def init(device, endpoint)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
self.shadow_ct = 325
self.update_ct_minmax()
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
index 7d797b29a..dec133661 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light3,weak
class Matter_Plugin_Light3 : Matter_Plugin_Light1
+ static var NAME = "light3" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
@@ -40,8 +41,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
#############################################################
# Constructor
- def init(device, endpoint)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
self.shadow_hue = 0
self.shadow_sat = 0
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
index a62d4fe39..fd6245ee2 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
@@ -25,6 +25,7 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_OnOff,weak
class Matter_Plugin_OnOff : Matter_Plugin
+ static var NAME = "relay" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
@@ -40,11 +41,11 @@ class Matter_Plugin_OnOff : Matter_Plugin
#############################################################
# Constructor
- def init(device, endpoint, tasmota_relay_index)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
self.get_onoff() # read actual value
- if tasmota_relay_index == nil tasmota_relay_index = 0 end
- self.tasmota_relay_index = tasmota_relay_index
+ self.tasmota_relay_index = arguments.find('relay')
+ if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
end
#############################################################
@@ -214,6 +215,17 @@ class Matter_Plugin_OnOff : Matter_Plugin
self.attribute_updated(nil, 0x0006, 0x0000) # send to all endpoints
end
+ #############################################################
+ # to_json_parameters
+ #
+ # To be overriden.
+ # returns a json sub-string to add after endpoint and type name
+ def to_json_parameters(s)
+ import string
+ s += string.format(',"relay":%i', self.tasmota_relay_index)
+ return s
+ end
+
#############################################################
# every_second
def every_second()
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
index 125dd9cca..dce3c003f 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
@@ -25,6 +25,7 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Root,weak
class Matter_Plugin_Root : Matter_Plugin
+ static var NAME = "root" # name of the plug-in in json
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x001F: [0,2,3,4], # Access Control Cluster, p.461
@@ -46,8 +47,8 @@ class Matter_Plugin_Root : Matter_Plugin
#############################################################
# Constructor
- def init(device, endpoint)
- super(self).init(device, endpoint)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
index 740b34c46..42511fd7e 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
@@ -31,10 +31,12 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
#############################################################
# Constructor
- def init(device, endpoint, sensor_filter)
- super(self).init(device, endpoint)
- self.tasmota_sensor_filter = sensor_filter
- self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(sensor_filter)
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
+ self.tasmota_sensor_filter = arguments.find('filter')
+ if self.tasmota_sensor_filter
+ self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
+ end
end
#############################################################
@@ -72,5 +74,16 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
return val
end
+ #############################################################
+ # to_json_parameters
+ #
+ # To be overriden.
+ # returns a json sub-string to add after endpoint and type name
+ def to_json_parameters(s)
+ import string
+ s += string.format(',"filter":"%s"', self.tasmota_sensor_filter)
+ return s
+ end
+
end
matter.Plugin_Sensor = Matter_Plugin_Sensor
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
index e06a9b54a..1f85523aa 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Humidity,weak
class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
+ static var NAME = "humidity" # name of the plug-in in json
static var CLUSTERS = {
0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
similarity index 92%
rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be
rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
index 27faeef9b..bdf631452 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Light.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
@@ -22,9 +22,10 @@
# dummy declaration for solidification
class Matter_Plugin_Sensor end
-#@ solidify:Matter_Plugin_Sensor_Light,weak
+#@ solidify:Matter_Plugin_Sensor_Illuminance,weak
-class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
+class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
+ static var NAME = "illuminance" # name of the plug-in in json
static var CLUSTERS = {
0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
}
@@ -81,4 +82,4 @@ class Matter_Plugin_Sensor_Light : Matter_Plugin_Sensor
end
end
-matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure
+matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
index aa6366ce2..c39de113e 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Pressure,weak
class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
+ static var NAME = "pressure" # name of the plug-in in json
static var CLUSTERS = {
0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
index 2ef420a94..6dff99c57 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
@@ -25,8 +25,9 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Temp,weak
class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
+ static var NAME = "temperature" # name of the plug-in in json
static var CLUSTERS = {
- 0x0402: [0,1,2], # Temperature Measurement p.97 - no writable
+ 0x0402: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}
static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
index 38c40cee0..27dfdd520 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session_Store.be
@@ -32,12 +32,14 @@ class Matter_Expirable end
#################################################################################
#################################################################################
class Matter_Session_Store
+ var device # device root object
var sessions
var fabrics # list of provisioned fabrics
static var _FABRICS = "_matter_fabrics.json"
#############################################################
- def init()
+ def init(device)
+ self.device = device
self.sessions = matter.Expirable_list()
self.fabrics = matter.Expirable_list()
end
@@ -327,6 +329,7 @@ class Matter_Session_Store
f.write(fabs)
f.close()
tasmota.log(string.format("MTR: =Saved %i fabric(s) and %i session(s)", fabs_size, sessions_saved), 2)
+ self.device.event_fabrics_saved() # signal event
except .. as e, m
tasmota.log("MTR: Session_Store::save Exception:" + str(e) + "|" + str(m), 2)
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index 813942de2..b34301182 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -7,781 +7,103 @@
extern const bclass be_class_Matter_Device;
/********************************************************************
-** Solidified function: start_operational_discovery
+** Solidified function: register_plugin_class
********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery, /* name */
+be_local_closure(Matter_Device_register_plugin_class, /* name */
be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
+ 4, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins_classes),
+ }),
+ be_str_weak(register_plugin_class),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x980C0202, // 0001 SETIDX R3 R1 R2
+ 0x80000000, // 0002 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _compute_pbkdf
+********************************************************************/
+be_local_closure(Matter_Device__compute_pbkdf, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(mdns),
- /* K2 */ be_nested_str_weak(string),
- /* K3 */ be_nested_str_weak(stop_basic_commissioning),
- /* K4 */ be_nested_str_weak(root_w0),
- /* K5 */ be_nested_str_weak(root_L),
- /* K6 */ be_nested_str_weak(set_expire_in_seconds),
- /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K8 */ be_nested_str_weak(get_fabric),
- }),
- be_str_weak(start_operational_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA4120400, // 0002 IMPORT R4 K2
- 0x8C140103, // 0003 GETMET R5 R0 K3
- 0x7C140200, // 0004 CALL R5 1
- 0x4C140000, // 0005 LDNIL R5
- 0x90020805, // 0006 SETMBR R0 K4 R5
- 0x4C140000, // 0007 LDNIL R5
- 0x90020A05, // 0008 SETMBR R0 K5 R5
- 0x8C140306, // 0009 GETMET R5 R1 K6
- 0x541E003B, // 000A LDINT R7 60
- 0x7C140400, // 000B CALL R5 2
- 0x8C140107, // 000C GETMET R5 R0 K7
- 0x8C1C0308, // 000D GETMET R7 R1 K8
- 0x7C1C0200, // 000E CALL R7 1
- 0x7C140400, // 000F CALL R5 2
- 0x80000000, // 0010 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start
-********************************************************************/
-be_local_closure(Matter_Device_start, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(_trigger_read_sensors),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80000000, // 0003 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(started),
- /* K1 */ be_nested_str_weak(plugins),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(matter),
- /* K4 */ be_nested_str_weak(Plugin_Root),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(autoconf_device),
- /* K7 */ be_nested_str_weak(tasmota),
- /* K8 */ be_nested_str_weak(add_cron),
- /* K9 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
- /* K10 */ be_nested_str_weak(matter_sensors_30s),
- /* K11 */ be_nested_str_weak(_start_udp),
- /* K12 */ be_nested_str_weak(UDP_PORT),
- /* K13 */ be_nested_str_weak(start_mdns_announce_hostnames),
- }),
- be_str_weak(start),
- &be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x78060000, // 0001 JMPF R1 #0003
- 0x80000200, // 0002 RET 0
- 0x88040101, // 0003 GETMBR R1 R0 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x5C140000, // 0007 MOVE R5 R0
- 0x58180005, // 0008 LDCONST R6 K5
- 0x7C0C0600, // 0009 CALL R3 3
- 0x7C040400, // 000A CALL R1 2
- 0x8C040106, // 000B GETMET R1 R0 K6
- 0x7C040200, // 000C CALL R1 1
- 0xB8060E00, // 000D GETNGBL R1 K7
- 0x8C040308, // 000E GETMET R1 R1 K8
- 0x580C0009, // 000F LDCONST R3 K9
- 0x84100000, // 0010 CLOSURE R4 P0
- 0x5814000A, // 0011 LDCONST R5 K10
- 0x7C040800, // 0012 CALL R1 4
- 0x8C04010B, // 0013 GETMET R1 R0 K11
- 0x880C010C, // 0014 GETMBR R3 R0 K12
- 0x7C040400, // 0015 CALL R1 2
- 0x8C04010D, // 0016 GETMET R1 R0 K13
- 0x7C040200, // 0017 CALL R1 1
- 0x50040200, // 0018 LDBOOL R1 1 0
- 0x90020001, // 0019 SETMBR R0 K0 R1
- 0xA0000000, // 001A CLOSE R0
- 0x80000000, // 001B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_PASE
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
- be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
/* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(mdns_pase_eth),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K7 */ be_nested_str_weak(_matterc),
- /* K8 */ be_nested_str_weak(_udp),
- /* K9 */ be_nested_str_weak(commissioning_instance_eth),
- /* K10 */ be_nested_str_weak(hostname_eth),
- /* K11 */ be_const_int(3),
- /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K13 */ be_nested_str_weak(eth),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(remove_service),
- /* K16 */ be_nested_str_weak(mdns_pase_wifi),
- /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
- /* K18 */ be_nested_str_weak(hostname_wifi),
- /* K19 */ be_nested_str_weak(wifi),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K21 */ be_nested_str_weak(_X7C),
+ /* K2 */ be_nested_str_weak(add),
+ /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
+ /* K4 */ be_nested_str_weak(derive),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(root_w0),
+ /* K7 */ be_nested_str_weak(EC_P256),
+ /* K8 */ be_nested_str_weak(mod),
+ /* K9 */ be_nested_str_weak(root_L),
+ /* K10 */ be_nested_str_weak(public_key),
}),
- be_str_weak(mdns_remove_PASE),
+ be_str_weak(_compute_pbkdf),
&be_const_str_solidified,
- ( &(const binstruction[83]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802003D, // 0002 EXBLK 0 #0041
- 0x880C0102, // 0003 GETMBR R3 R0 K2
- 0x780E001B, // 0004 JMPF R3 #0021
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x8C140505, // 0007 GETMET R5 R2 K5
- 0x581C0006, // 0008 LDCONST R7 K6
- 0x58200007, // 0009 LDCONST R8 K7
- 0x58240008, // 000A LDCONST R9 K8
- 0x88280109, // 000B GETMBR R10 R0 K9
- 0x882C010A, // 000C GETMBR R11 R0 K10
- 0x7C140C00, // 000D CALL R5 6
- 0x5818000B, // 000E LDCONST R6 K11
- 0x7C0C0600, // 000F CALL R3 3
- 0xB80E0600, // 0010 GETNGBL R3 K3
- 0x8C0C0704, // 0011 GETMET R3 R3 K4
- 0x8C140505, // 0012 GETMET R5 R2 K5
- 0x581C000C, // 0013 LDCONST R7 K12
- 0x5820000D, // 0014 LDCONST R8 K13
- 0x88240109, // 0015 GETMBR R9 R0 K9
- 0x7C140800, // 0016 CALL R5 4
- 0x5818000E, // 0017 LDCONST R6 K14
- 0x7C0C0600, // 0018 CALL R3 3
- 0x500C0000, // 0019 LDBOOL R3 0 0
- 0x90020403, // 001A SETMBR R0 K2 R3
- 0x8C0C030F, // 001B GETMET R3 R1 K15
- 0x58140007, // 001C LDCONST R5 K7
- 0x58180008, // 001D LDCONST R6 K8
- 0x881C0109, // 001E GETMBR R7 R0 K9
- 0x8820010A, // 001F GETMBR R8 R0 K10
- 0x7C0C0A00, // 0020 CALL R3 5
- 0x880C0110, // 0021 GETMBR R3 R0 K16
- 0x780E001B, // 0022 JMPF R3 #003F
- 0xB80E0600, // 0023 GETNGBL R3 K3
- 0x8C0C0704, // 0024 GETMET R3 R3 K4
- 0x8C140505, // 0025 GETMET R5 R2 K5
- 0x581C0006, // 0026 LDCONST R7 K6
- 0x58200007, // 0027 LDCONST R8 K7
- 0x58240008, // 0028 LDCONST R9 K8
- 0x88280111, // 0029 GETMBR R10 R0 K17
- 0x882C0112, // 002A GETMBR R11 R0 K18
- 0x7C140C00, // 002B CALL R5 6
- 0x5818000B, // 002C LDCONST R6 K11
- 0x7C0C0600, // 002D CALL R3 3
- 0xB80E0600, // 002E GETNGBL R3 K3
- 0x8C0C0704, // 002F GETMET R3 R3 K4
- 0x8C140505, // 0030 GETMET R5 R2 K5
- 0x581C000C, // 0031 LDCONST R7 K12
- 0x58200013, // 0032 LDCONST R8 K19
- 0x88240111, // 0033 GETMBR R9 R0 K17
- 0x7C140800, // 0034 CALL R5 4
- 0x5818000E, // 0035 LDCONST R6 K14
- 0x7C0C0600, // 0036 CALL R3 3
- 0x500C0000, // 0037 LDBOOL R3 0 0
- 0x90022003, // 0038 SETMBR R0 K16 R3
- 0x8C0C030F, // 0039 GETMET R3 R1 K15
- 0x58140007, // 003A LDCONST R5 K7
- 0x58180008, // 003B LDCONST R6 K8
- 0x881C0111, // 003C GETMBR R7 R0 K17
- 0x88200112, // 003D GETMBR R8 R0 K18
- 0x7C0C0A00, // 003E CALL R3 5
- 0xA8040001, // 003F EXBLK 1 1
- 0x70020010, // 0040 JMP #0052
- 0xAC0C0002, // 0041 CATCH R3 0 2
- 0x7002000D, // 0042 JMP #0051
- 0xB8160600, // 0043 GETNGBL R5 K3
- 0x8C140B04, // 0044 GETMET R5 R5 K4
- 0x601C0008, // 0045 GETGBL R7 G8
- 0x5C200600, // 0046 MOVE R8 R3
- 0x7C1C0200, // 0047 CALL R7 1
- 0x001E2807, // 0048 ADD R7 K20 R7
- 0x001C0F15, // 0049 ADD R7 R7 K21
- 0x60200008, // 004A GETGBL R8 G8
- 0x5C240800, // 004B MOVE R9 R4
- 0x7C200200, // 004C CALL R8 1
- 0x001C0E08, // 004D ADD R7 R7 R8
- 0x5820000E, // 004E LDCONST R8 K14
- 0x7C140600, // 004F CALL R5 3
- 0x70020000, // 0050 JMP #0052
- 0xB0080000, // 0051 RAISE 2 R0 R0
- 0x80000000, // 0052 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_commissioning_complete),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(start_commissioning_complete_deferred),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: save_before_restart
-********************************************************************/
-be_local_closure(Matter_Device_save_before_restart, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(stop_basic_commissioning),
- /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
- }),
- be_str_weak(save_before_restart),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x8C040101, // 0002 GETMET R1 R0 K1
- 0x7C040200, // 0003 CALL R1 1
- 0x80000000, // 0004 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _start_udp
-********************************************************************/
-be_local_closure(Matter_Device__start_udp, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* 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 */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(log),
- /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
- /* K4 */ be_const_int(2),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(UDPServer),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_nested_str_weak(start),
- }),
- 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
- 0xB80A0200, // 0007 GETNGBL R2 K1
- 0x8C080502, // 0008 GETMET R2 R2 K2
- 0x60100008, // 0009 GETGBL R4 G8
- 0x5C140200, // 000A MOVE R5 R1
- 0x7C100200, // 000B CALL R4 1
- 0x00120604, // 000C ADD R4 K3 R4
- 0x58140004, // 000D LDCONST R5 K4
- 0x7C080600, // 000E CALL R2 3
- 0xB80A0A00, // 000F GETNGBL R2 K5
- 0x8C080506, // 0010 GETMET R2 R2 K6
- 0x58100007, // 0011 LDCONST R4 K7
- 0x5C140200, // 0012 MOVE R5 R1
- 0x7C080600, // 0013 CALL R2 3
- 0x90020002, // 0014 SETMBR R0 K0 R2
- 0x88080100, // 0015 GETMBR R2 R0 K0
- 0x8C080508, // 0016 GETMET R2 R2 K8
- 0x84100000, // 0017 CLOSURE R4 P0
- 0x7C080400, // 0018 CALL R2 2
- 0xA0000000, // 0019 CLOSE R0
- 0x80000000, // 001A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: register_commands
-********************************************************************/
-be_local_closure(Matter_Device_register_commands, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 10, /* nstack */
- 4, /* 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(MtrJoin),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x68100000, // 0000 GETUPV R4 U0
- 0x8C100900, // 0001 GETMET R4 R4 K0
- 0x5C180000, // 0002 MOVE R6 R0
- 0x5C1C0200, // 0003 MOVE R7 R1
- 0x5C200400, // 0004 MOVE R8 R2
- 0x5C240600, // 0005 MOVE R9 R3
- 0x7C100A00, // 0006 CALL R4 5
- 0x80040800, // 0007 RET 1 R4
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(add_cmd),
- /* K2 */ be_nested_str_weak(MtrJoin),
- }),
- be_str_weak(register_commands),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x84100000, // 0003 CLOSURE R4 P0
- 0x7C040600, // 0004 CALL R1 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_basic_commissioning, /* name */
- be_nested_proto(
- 13, /* nstack */
- 8, /* argc */
- 2, /* 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Wifi_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Eth_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 0x7C000600, // 0007 CALL R0 3
- 0x80000000, // 0008 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[16]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(millis),
- /* K3 */ be_nested_str_weak(commissioning_iterations),
- /* K4 */ be_nested_str_weak(commissioning_discriminator),
- /* K5 */ be_nested_str_weak(commissioning_salt),
- /* K6 */ be_nested_str_weak(commissioning_w0),
- /* K7 */ be_nested_str_weak(commissioning_L),
- /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
- /* K9 */ be_nested_str_weak(wifi),
- /* K10 */ be_nested_str_weak(up),
- /* K11 */ be_nested_str_weak(eth),
- /* K12 */ be_nested_str_weak(mdns_announce_PASE),
- /* K13 */ be_nested_str_weak(add_rule),
- /* K14 */ be_nested_str_weak(Wifi_X23Connected),
- /* K15 */ be_nested_str_weak(Eth_X23Connected),
- }),
- be_str_weak(start_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0xB8220200, // 0000 GETNGBL R8 K1
- 0x8C201102, // 0001 GETMET R8 R8 K2
- 0x7C200200, // 0002 CALL R8 1
- 0x542603E7, // 0003 LDINT R9 1000
- 0x08240209, // 0004 MUL R9 R1 R9
- 0x00201009, // 0005 ADD R8 R8 R9
- 0x90020008, // 0006 SETMBR R0 K0 R8
- 0x90020602, // 0007 SETMBR R0 K3 R2
- 0x90020803, // 0008 SETMBR R0 K4 R3
- 0x90020A04, // 0009 SETMBR R0 K5 R4
- 0x90020C05, // 000A SETMBR R0 K6 R5
- 0x90020E06, // 000B SETMBR R0 K7 R6
- 0x90021007, // 000C SETMBR R0 K8 R7
- 0xB8220200, // 000D GETNGBL R8 K1
- 0x8C201109, // 000E GETMET R8 R8 K9
- 0x7C200200, // 000F CALL R8 1
- 0x9420110A, // 0010 GETIDX R8 R8 K10
- 0x74220004, // 0011 JMPT R8 #0017
- 0xB8220200, // 0012 GETNGBL R8 K1
- 0x8C20110B, // 0013 GETMET R8 R8 K11
- 0x7C200200, // 0014 CALL R8 1
- 0x9420110A, // 0015 GETIDX R8 R8 K10
- 0x78220002, // 0016 JMPF R8 #001A
- 0x8C20010C, // 0017 GETMET R8 R0 K12
- 0x7C200200, // 0018 CALL R8 1
- 0x7002000B, // 0019 JMP #0026
- 0xB8220200, // 001A GETNGBL R8 K1
- 0x8C20110D, // 001B GETMET R8 R8 K13
- 0x5828000E, // 001C LDCONST R10 K14
- 0x842C0000, // 001D CLOSURE R11 P0
- 0x5830000C, // 001E LDCONST R12 K12
- 0x7C200800, // 001F CALL R8 4
- 0xB8220200, // 0020 GETNGBL R8 K1
- 0x8C20110D, // 0021 GETMET R8 R8 K13
- 0x5828000F, // 0022 LDCONST R10 K15
- 0x842C0001, // 0023 CLOSURE R11 P1
- 0x5830000C, // 0024 LDCONST R12 K12
- 0x7C200800, // 0025 CALL R8 4
- 0xA0000000, // 0026 CLOSE R0
- 0x80000000, // 0027 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_fabric
-********************************************************************/
-be_local_closure(Matter_Device_remove_fabric, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(find_children_fabrics),
- /* K2 */ be_nested_str_weak(get_fabric_index),
- /* K3 */ be_nested_str_weak(find_fabric_by_index),
- /* K4 */ be_nested_str_weak(message_handler),
- /* K5 */ be_nested_str_weak(im),
- /* K6 */ be_nested_str_weak(subs_shop),
- /* K7 */ be_nested_str_weak(remove_by_fabric),
- /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K9 */ be_nested_str_weak(remove_fabric),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(save_fabrics),
- }),
- be_str_weak(remove_fabric),
- &be_const_str_solidified,
- ( &(const binstruction[43]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x8C100302, // 0002 GETMET R4 R1 K2
- 0x7C100200, // 0003 CALL R4 1
- 0x7C080400, // 0004 CALL R2 2
- 0x4C0C0000, // 0005 LDNIL R3
- 0x1C0C0403, // 0006 EQ R3 R2 R3
- 0x780E0000, // 0007 JMPF R3 #0009
- 0x80000600, // 0008 RET 0
- 0x600C0010, // 0009 GETGBL R3 G16
- 0x5C100400, // 000A MOVE R4 R2
- 0x7C0C0200, // 000B CALL R3 1
- 0xA8020016, // 000C EXBLK 0 #0024
- 0x5C100600, // 000D MOVE R4 R3
- 0x7C100000, // 000E CALL R4 0
- 0x88140100, // 000F GETMBR R5 R0 K0
- 0x8C140B03, // 0010 GETMET R5 R5 K3
- 0x5C1C0800, // 0011 MOVE R7 R4
- 0x7C140400, // 0012 CALL R5 2
- 0x4C180000, // 0013 LDNIL R6
- 0x20180A06, // 0014 NE R6 R5 R6
- 0x781A000C, // 0015 JMPF R6 #0023
- 0x88180104, // 0016 GETMBR R6 R0 K4
- 0x88180D05, // 0017 GETMBR R6 R6 K5
- 0x88180D06, // 0018 GETMBR R6 R6 K6
- 0x8C180D07, // 0019 GETMET R6 R6 K7
- 0x5C200A00, // 001A MOVE R8 R5
- 0x7C180400, // 001B CALL R6 2
- 0x8C180108, // 001C GETMET R6 R0 K8
- 0x5C200A00, // 001D MOVE R8 R5
- 0x7C180400, // 001E CALL R6 2
- 0x88180100, // 001F GETMBR R6 R0 K0
- 0x8C180D09, // 0020 GETMET R6 R6 K9
- 0x5C200A00, // 0021 MOVE R8 R5
- 0x7C180400, // 0022 CALL R6 2
- 0x7001FFE8, // 0023 JMP #000D
- 0x580C000A, // 0024 LDCONST R3 K10
- 0xAC0C0200, // 0025 CATCH R3 1 0
- 0xB0080000, // 0026 RAISE 2 R0 R0
- 0x880C0100, // 0027 GETMBR R3 R0 K0
- 0x8C0C070B, // 0028 GETMET R3 R3 K11
- 0x7C0C0200, // 0029 CALL R3 1
- 0x80000000, // 002A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: attribute_updated
-********************************************************************/
-be_local_closure(Matter_Device_attribute_updated, /* name */
- be_nested_proto(
- 10, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(Path),
- /* K2 */ be_nested_str_weak(endpoint),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(message_handler),
- /* K6 */ be_nested_str_weak(im),
- /* K7 */ be_nested_str_weak(subs_shop),
- /* K8 */ be_nested_str_weak(attribute_updated_ctx),
- }),
- 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
- 0xB8160000, // 0004 GETNGBL R5 K0
- 0x8C140B01, // 0005 GETMET R5 R5 K1
- 0x7C140200, // 0006 CALL R5 1
- 0x90160401, // 0007 SETMBR R5 K2 R1
- 0x90160602, // 0008 SETMBR R5 K3 R2
- 0x90160803, // 0009 SETMBR R5 K4 R3
- 0x88180105, // 000A GETMBR R6 R0 K5
- 0x88180D06, // 000B GETMBR R6 R6 K6
- 0x88180D07, // 000C GETMBR R6 R6 K7
- 0x8C180D08, // 000D GETMET R6 R6 K8
- 0x5C200A00, // 000E MOVE R8 R5
- 0x5C240800, // 000F MOVE R9 R4
- 0x7C180600, // 0010 CALL R6 3
- 0x80000000, // 0011 RET 0
+ ( &(const binstruction[41]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xA4160200, // 0001 IMPORT R5 K1
+ 0x60180015, // 0002 GETGBL R6 G21
+ 0x7C180000, // 0003 CALL R6 0
+ 0x8C180D02, // 0004 GETMET R6 R6 K2
+ 0x5C200200, // 0005 MOVE R8 R1
+ 0x54260003, // 0006 LDINT R9 4
+ 0x7C180600, // 0007 CALL R6 3
+ 0x8C1C0903, // 0008 GETMET R7 R4 K3
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x8C1C0F04, // 000A GETMET R7 R7 K4
+ 0x5C240C00, // 000B MOVE R9 R6
+ 0x5C280600, // 000C MOVE R10 R3
+ 0x5C2C0400, // 000D MOVE R11 R2
+ 0x5432004F, // 000E LDINT R12 80
+ 0x7C1C0A00, // 000F CALL R7 5
+ 0x54220026, // 0010 LDINT R8 39
+ 0x40220A08, // 0011 CONNECT R8 K5 R8
+ 0x94200E08, // 0012 GETIDX R8 R7 R8
+ 0x54260027, // 0013 LDINT R9 40
+ 0x542A004E, // 0014 LDINT R10 79
+ 0x4024120A, // 0015 CONNECT R9 R9 R10
+ 0x94240E09, // 0016 GETIDX R9 R7 R9
+ 0x8C280907, // 0017 GETMET R10 R4 K7
+ 0x7C280200, // 0018 CALL R10 1
+ 0x8C281508, // 0019 GETMET R10 R10 K8
+ 0x5C301000, // 001A MOVE R12 R8
+ 0x7C280400, // 001B CALL R10 2
+ 0x90020C0A, // 001C SETMBR R0 K6 R10
+ 0x8C280907, // 001D GETMET R10 R4 K7
+ 0x7C280200, // 001E CALL R10 1
+ 0x8C281508, // 001F GETMET R10 R10 K8
+ 0x5C301200, // 0020 MOVE R12 R9
+ 0x7C280400, // 0021 CALL R10 2
+ 0x8C2C0907, // 0022 GETMET R11 R4 K7
+ 0x7C2C0200, // 0023 CALL R11 1
+ 0x8C2C170A, // 0024 GETMET R11 R11 K10
+ 0x5C341400, // 0025 MOVE R13 R10
+ 0x7C2C0400, // 0026 CALL R11 2
+ 0x9002120B, // 0027 SETMBR R0 K9 R11
+ 0x80000000, // 0028 RET 0
})
)
);
@@ -1013,545 +335,174 @@ be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
/********************************************************************
-** Solidified function: autoconf_device
+** Solidified function: mdns_announce_op_discovery
********************************************************************/
-be_local_closure(Matter_Device_autoconf_device, /* name */
+be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */
be_nested_proto(
- 21, /* nstack */
- 1, /* argc */
+ 15, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[49]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(json),
- /* K2 */ be_const_int(1),
- /* K3 */ be_nested_str_weak(light),
- /* K4 */ be_nested_str_weak(get),
- /* K5 */ be_nested_str_weak(find),
- /* K6 */ be_nested_str_weak(channels),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_const_int(0),
- /* K9 */ be_nested_str_weak(plugins),
- /* K10 */ be_nested_str_weak(push),
- /* K11 */ be_nested_str_weak(matter),
- /* K12 */ be_nested_str_weak(Plugin_Light1),
- /* K13 */ be_nested_str_weak(tasmota),
- /* K14 */ be_nested_str_weak(log),
+ ( &(const bvalue[29]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(copy),
+ /* K4 */ be_nested_str_weak(reverse),
+ /* K5 */ be_nested_str_weak(get_fabric_compressed),
+ /* K6 */ be_nested_str_weak(tohex),
+ /* K7 */ be_nested_str_weak(_X2D),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(log),
+ /* K10 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(eth),
+ /* K13 */ be_nested_str_weak(find),
+ /* K14 */ be_nested_str_weak(up),
/* K15 */ be_nested_str_weak(format),
- /* K16 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_Dimmer),
- /* K17 */ be_const_int(2),
- /* K18 */ be_nested_str_weak(Plugin_Light2),
- /* K19 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_CT),
- /* K20 */ be_nested_str_weak(Plugin_Light3),
- /* K21 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_RGB),
- /* K22 */ be_nested_str_weak(get_power),
- /* K23 */ be_nested_str_weak(Plugin_OnOff),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Relay__X25i),
- /* K25 */ be_nested_str_weak(load),
- /* K26 */ be_nested_str_weak(read_sensors),
- /* K27 */ be_nested_str_weak(k2l),
- /* K28 */ be_nested_str_weak(contains),
- /* K29 */ be_nested_str_weak(Temperature),
- /* K30 */ be_nested_str_weak(_X23Temperature),
- /* K31 */ be_nested_str_weak(Plugin_Sensor_Temp),
- /* K32 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Temperature_X20_X28_X25s_X29),
- /* K33 */ be_nested_str_weak(stop_iteration),
- /* K34 */ be_nested_str_weak(Pressure),
- /* K35 */ be_nested_str_weak(_X23Pressure),
- /* K36 */ be_nested_str_weak(Plugin_Sensor_Pressure),
- /* K37 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Pressure_X20_X28_X25s_X29),
- /* K38 */ be_nested_str_weak(Illuminance),
- /* K39 */ be_nested_str_weak(_X23Illuminance),
- /* K40 */ be_nested_str_weak(Plugin_Sensor_Light),
- /* K41 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Light_X20_X28_X25s_X29),
- /* K42 */ be_nested_str_weak(Humidity),
- /* K43 */ be_nested_str_weak(_X23Humidity),
- /* K44 */ be_nested_str_weak(Plugin_Sensor_Humidity),
- /* K45 */ be_nested_str_weak(MTR_X3A_X20Endpoint_X3A_X25i_X20Humidity_X20_X28_X25s_X29),
- /* K46 */ be_nested_str_weak(publish_result),
- /* K47 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D),
- /* K48 */ be_nested_str_weak(Matter),
+ /* K16 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60),
+ /* K17 */ be_nested_str_weak(hostname_eth),
+ /* K18 */ be_const_int(3),
+ /* K19 */ be_nested_str_weak(add_service),
+ /* K20 */ be_nested_str_weak(_matter),
+ /* K21 */ be_nested_str_weak(_tcp),
+ /* K22 */ be_nested_str_weak(_I),
+ /* K23 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20),
+ /* K24 */ be_nested_str_weak(add_subtype),
+ /* K25 */ be_nested_str_weak(wifi),
+ /* K26 */ be_nested_str_weak(hostname_wifi),
+ /* K27 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K28 */ be_nested_str_weak(_X7C),
}),
- be_str_weak(autoconf_device),
+ be_str_weak(mdns_announce_op_discovery),
&be_const_str_solidified,
- ( &(const binstruction[312]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x50100000, // 0003 LDBOOL R4 0 0
- 0xA4160600, // 0004 IMPORT R5 K3
- 0x8C180B04, // 0005 GETMET R6 R5 K4
- 0x7C180200, // 0006 CALL R6 1
- 0x4C1C0000, // 0007 LDNIL R7
- 0x201C0C07, // 0008 NE R7 R6 R7
- 0x781E003F, // 0009 JMPF R7 #004A
- 0x601C000C, // 000A GETGBL R7 G12
- 0x8C200D05, // 000B GETMET R8 R6 K5
- 0x58280006, // 000C LDCONST R10 K6
- 0x582C0007, // 000D LDCONST R11 K7
- 0x7C200600, // 000E CALL R8 3
+ ( &(const binstruction[122]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA8020064, // 0002 EXBLK 0 #0068
+ 0x8C100302, // 0003 GETMET R4 R1 K2
+ 0x7C100200, // 0004 CALL R4 1
+ 0x8C100903, // 0005 GETMET R4 R4 K3
+ 0x7C100200, // 0006 CALL R4 1
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140305, // 0009 GETMET R5 R1 K5
+ 0x7C140200, // 000A CALL R5 1
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x7C180200, // 000C CALL R6 1
+ 0x00180D07, // 000D ADD R6 R6 K7
+ 0x8C1C0906, // 000E GETMET R7 R4 K6
0x7C1C0200, // 000F CALL R7 1
- 0x24200F08, // 0010 GT R8 R7 K8
- 0x78220037, // 0011 JMPF R8 #004A
- 0x1C200F02, // 0012 EQ R8 R7 K2
- 0x78220010, // 0013 JMPF R8 #0025
- 0x88200109, // 0014 GETMBR R8 R0 K9
- 0x8C20110A, // 0015 GETMET R8 R8 K10
- 0xB82A1600, // 0016 GETNGBL R10 K11
- 0x8C28150C, // 0017 GETMET R10 R10 K12
- 0x5C300000, // 0018 MOVE R12 R0
- 0x5C340600, // 0019 MOVE R13 R3
- 0x7C280600, // 001A CALL R10 3
- 0x7C200400, // 001B CALL R8 2
- 0xB8221A00, // 001C GETNGBL R8 K13
- 0x8C20110E, // 001D GETMET R8 R8 K14
- 0x8C28030F, // 001E GETMET R10 R1 K15
- 0x58300010, // 001F LDCONST R12 K16
- 0x5C340600, // 0020 MOVE R13 R3
- 0x7C280600, // 0021 CALL R10 3
- 0x582C0011, // 0022 LDCONST R11 K17
- 0x7C200600, // 0023 CALL R8 3
- 0x70020022, // 0024 JMP #0048
- 0x1C200F11, // 0025 EQ R8 R7 K17
- 0x78220010, // 0026 JMPF R8 #0038
- 0x88200109, // 0027 GETMBR R8 R0 K9
- 0x8C20110A, // 0028 GETMET R8 R8 K10
- 0xB82A1600, // 0029 GETNGBL R10 K11
- 0x8C281512, // 002A GETMET R10 R10 K18
- 0x5C300000, // 002B MOVE R12 R0
- 0x5C340600, // 002C MOVE R13 R3
- 0x7C280600, // 002D CALL R10 3
- 0x7C200400, // 002E CALL R8 2
- 0xB8221A00, // 002F GETNGBL R8 K13
- 0x8C20110E, // 0030 GETMET R8 R8 K14
- 0x8C28030F, // 0031 GETMET R10 R1 K15
- 0x58300013, // 0032 LDCONST R12 K19
- 0x5C340600, // 0033 MOVE R13 R3
- 0x7C280600, // 0034 CALL R10 3
- 0x582C0011, // 0035 LDCONST R11 K17
+ 0x00180C07, // 0010 ADD R6 R6 R7
+ 0xB81E1000, // 0011 GETNGBL R7 K8
+ 0x8C1C0F09, // 0012 GETMET R7 R7 K9
+ 0x00261406, // 0013 ADD R9 K10 R6
+ 0x5828000B, // 0014 LDCONST R10 K11
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0xB81E1000, // 0016 GETNGBL R7 K8
+ 0x8C1C0F0C, // 0017 GETMET R7 R7 K12
+ 0x7C1C0200, // 0018 CALL R7 1
+ 0x8C1C0F0D, // 0019 GETMET R7 R7 K13
+ 0x5824000E, // 001A LDCONST R9 K14
+ 0x7C1C0400, // 001B CALL R7 2
+ 0x781E0020, // 001C JMPF R7 #003E
+ 0xB81E1000, // 001D GETNGBL R7 K8
+ 0x8C1C0F09, // 001E GETMET R7 R7 K9
+ 0x8C24070F, // 001F GETMET R9 R3 K15
+ 0x582C0010, // 0020 LDCONST R11 K16
+ 0x5830000C, // 0021 LDCONST R12 K12
+ 0x5C340C00, // 0022 MOVE R13 R6
+ 0x88380111, // 0023 GETMBR R14 R0 K17
+ 0x7C240A00, // 0024 CALL R9 5
+ 0x58280012, // 0025 LDCONST R10 K18
+ 0x7C1C0600, // 0026 CALL R7 3
+ 0x8C1C0513, // 0027 GETMET R7 R2 K19
+ 0x58240014, // 0028 LDCONST R9 K20
+ 0x58280015, // 0029 LDCONST R10 K21
+ 0x542E15A3, // 002A LDINT R11 5540
+ 0x4C300000, // 002B LDNIL R12
+ 0x5C340C00, // 002C MOVE R13 R6
+ 0x88380111, // 002D GETMBR R14 R0 K17
+ 0x7C1C0E00, // 002E CALL R7 7
+ 0x8C1C0B06, // 002F GETMET R7 R5 K6
+ 0x7C1C0200, // 0030 CALL R7 1
+ 0x001E2C07, // 0031 ADD R7 K22 R7
+ 0xB8221000, // 0032 GETNGBL R8 K8
+ 0x8C201109, // 0033 GETMET R8 R8 K9
+ 0x002A2E07, // 0034 ADD R10 K23 R7
+ 0x582C0012, // 0035 LDCONST R11 K18
0x7C200600, // 0036 CALL R8 3
- 0x7002000F, // 0037 JMP #0048
- 0x88200109, // 0038 GETMBR R8 R0 K9
- 0x8C20110A, // 0039 GETMET R8 R8 K10
- 0xB82A1600, // 003A GETNGBL R10 K11
- 0x8C281514, // 003B GETMET R10 R10 K20
- 0x5C300000, // 003C MOVE R12 R0
- 0x5C340600, // 003D MOVE R13 R3
- 0x7C280600, // 003E CALL R10 3
- 0x7C200400, // 003F CALL R8 2
- 0xB8221A00, // 0040 GETNGBL R8 K13
- 0x8C20110E, // 0041 GETMET R8 R8 K14
- 0x8C28030F, // 0042 GETMET R10 R1 K15
- 0x58300015, // 0043 LDCONST R12 K21
- 0x5C340600, // 0044 MOVE R13 R3
- 0x7C280600, // 0045 CALL R10 3
- 0x582C0011, // 0046 LDCONST R11 K17
- 0x7C200600, // 0047 CALL R8 3
- 0x50100200, // 0048 LDBOOL R4 1 0
- 0x000C0702, // 0049 ADD R3 R3 K2
- 0x601C000C, // 004A GETGBL R7 G12
- 0xB8221A00, // 004B GETNGBL R8 K13
- 0x8C201116, // 004C GETMET R8 R8 K22
- 0x7C200200, // 004D CALL R8 1
- 0x7C1C0200, // 004E CALL R7 1
- 0x58200008, // 004F LDCONST R8 K8
- 0x78120000, // 0050 JMPF R4 #0052
- 0x041C0F02, // 0051 SUB R7 R7 K2
- 0x14241007, // 0052 LT R9 R8 R7
- 0x78260014, // 0053 JMPF R9 #0069
- 0x88240109, // 0054 GETMBR R9 R0 K9
- 0x8C24130A, // 0055 GETMET R9 R9 K10
- 0xB82E1600, // 0056 GETNGBL R11 K11
- 0x8C2C1717, // 0057 GETMET R11 R11 K23
- 0x5C340000, // 0058 MOVE R13 R0
- 0x5C380600, // 0059 MOVE R14 R3
- 0x5C3C1000, // 005A MOVE R15 R8
- 0x7C2C0800, // 005B CALL R11 4
- 0x7C240400, // 005C CALL R9 2
- 0xB8261A00, // 005D GETNGBL R9 K13
- 0x8C24130E, // 005E GETMET R9 R9 K14
- 0x8C2C030F, // 005F GETMET R11 R1 K15
- 0x58340018, // 0060 LDCONST R13 K24
- 0x5C380600, // 0061 MOVE R14 R3
- 0x003C1102, // 0062 ADD R15 R8 K2
- 0x7C2C0800, // 0063 CALL R11 4
- 0x58300011, // 0064 LDCONST R12 K17
- 0x7C240600, // 0065 CALL R9 3
- 0x00201102, // 0066 ADD R8 R8 K2
- 0x000C0702, // 0067 ADD R3 R3 K2
- 0x7001FFE8, // 0068 JMP #0052
- 0x8C240519, // 0069 GETMET R9 R2 K25
- 0xB82E1A00, // 006A GETNGBL R11 K13
- 0x8C2C171A, // 006B GETMET R11 R11 K26
- 0x7C2C0200, // 006C CALL R11 1
- 0x7C240400, // 006D CALL R9 2
- 0x540E001F, // 006E LDINT R3 32
- 0x60280010, // 006F GETGBL R10 G16
- 0x8C2C011B, // 0070 GETMET R11 R0 K27
- 0x5C341200, // 0071 MOVE R13 R9
- 0x7C2C0400, // 0072 CALL R11 2
- 0x7C280200, // 0073 CALL R10 1
- 0xA8020026, // 0074 EXBLK 0 #009C
- 0x5C2C1400, // 0075 MOVE R11 R10
- 0x7C2C0000, // 0076 CALL R11 0
- 0x9430120B, // 0077 GETIDX R12 R9 R11
- 0x6034000F, // 0078 GETGBL R13 G15
- 0x5C381800, // 0079 MOVE R14 R12
- 0x603C0013, // 007A GETGBL R15 G19
- 0x7C340400, // 007B CALL R13 2
- 0x78360017, // 007C JMPF R13 #0095
- 0x8C34191C, // 007D GETMET R13 R12 K28
- 0x583C001D, // 007E LDCONST R15 K29
- 0x7C340400, // 007F CALL R13 2
- 0x78360013, // 0080 JMPF R13 #0095
- 0x0034171E, // 0081 ADD R13 R11 K30
- 0x88380109, // 0082 GETMBR R14 R0 K9
- 0x8C381D0A, // 0083 GETMET R14 R14 K10
- 0xB8421600, // 0084 GETNGBL R16 K11
- 0x8C40211F, // 0085 GETMET R16 R16 K31
- 0x5C480000, // 0086 MOVE R18 R0
- 0x5C4C0600, // 0087 MOVE R19 R3
- 0x5C501A00, // 0088 MOVE R20 R13
- 0x7C400800, // 0089 CALL R16 4
- 0x7C380400, // 008A CALL R14 2
- 0xB83A1A00, // 008B GETNGBL R14 K13
- 0x8C381D0E, // 008C GETMET R14 R14 K14
- 0x8C40030F, // 008D GETMET R16 R1 K15
- 0x58480020, // 008E LDCONST R18 K32
- 0x5C4C0600, // 008F MOVE R19 R3
- 0x5C501A00, // 0090 MOVE R20 R13
- 0x7C400800, // 0091 CALL R16 4
- 0x58440011, // 0092 LDCONST R17 K17
- 0x7C380600, // 0093 CALL R14 3
- 0x000C0702, // 0094 ADD R3 R3 K2
- 0x54360027, // 0095 LDINT R13 40
- 0x2434060D, // 0096 GT R13 R3 R13
- 0x78360000, // 0097 JMPF R13 #0099
- 0x70020000, // 0098 JMP #009A
- 0x7001FFDA, // 0099 JMP #0075
- 0xA8040001, // 009A EXBLK 1 1
- 0x70020002, // 009B JMP #009F
- 0x58280021, // 009C LDCONST R10 K33
- 0xAC280200, // 009D CATCH R10 1 0
- 0xB0080000, // 009E RAISE 2 R0 R0
- 0x540E0027, // 009F LDINT R3 40
- 0x60280010, // 00A0 GETGBL R10 G16
- 0x8C2C011B, // 00A1 GETMET R11 R0 K27
- 0x5C341200, // 00A2 MOVE R13 R9
- 0x7C2C0400, // 00A3 CALL R11 2
- 0x7C280200, // 00A4 CALL R10 1
- 0xA8020026, // 00A5 EXBLK 0 #00CD
- 0x5C2C1400, // 00A6 MOVE R11 R10
- 0x7C2C0000, // 00A7 CALL R11 0
- 0x9430120B, // 00A8 GETIDX R12 R9 R11
- 0x6034000F, // 00A9 GETGBL R13 G15
- 0x5C381800, // 00AA MOVE R14 R12
- 0x603C0013, // 00AB GETGBL R15 G19
- 0x7C340400, // 00AC CALL R13 2
- 0x78360017, // 00AD JMPF R13 #00C6
- 0x8C34191C, // 00AE GETMET R13 R12 K28
- 0x583C0022, // 00AF LDCONST R15 K34
- 0x7C340400, // 00B0 CALL R13 2
- 0x78360013, // 00B1 JMPF R13 #00C6
- 0x00341723, // 00B2 ADD R13 R11 K35
- 0x88380109, // 00B3 GETMBR R14 R0 K9
- 0x8C381D0A, // 00B4 GETMET R14 R14 K10
- 0xB8421600, // 00B5 GETNGBL R16 K11
- 0x8C402124, // 00B6 GETMET R16 R16 K36
- 0x5C480000, // 00B7 MOVE R18 R0
- 0x5C4C0600, // 00B8 MOVE R19 R3
- 0x5C501A00, // 00B9 MOVE R20 R13
- 0x7C400800, // 00BA CALL R16 4
- 0x7C380400, // 00BB CALL R14 2
- 0xB83A1A00, // 00BC GETNGBL R14 K13
- 0x8C381D0E, // 00BD GETMET R14 R14 K14
- 0x8C40030F, // 00BE GETMET R16 R1 K15
- 0x58480025, // 00BF LDCONST R18 K37
- 0x5C4C0600, // 00C0 MOVE R19 R3
- 0x5C501A00, // 00C1 MOVE R20 R13
- 0x7C400800, // 00C2 CALL R16 4
- 0x58440011, // 00C3 LDCONST R17 K17
- 0x7C380600, // 00C4 CALL R14 3
- 0x000C0702, // 00C5 ADD R3 R3 K2
- 0x5436002E, // 00C6 LDINT R13 47
- 0x2434060D, // 00C7 GT R13 R3 R13
- 0x78360000, // 00C8 JMPF R13 #00CA
- 0x70020000, // 00C9 JMP #00CB
- 0x7001FFDA, // 00CA JMP #00A6
- 0xA8040001, // 00CB EXBLK 1 1
- 0x70020002, // 00CC JMP #00D0
- 0x58280021, // 00CD LDCONST R10 K33
- 0xAC280200, // 00CE CATCH R10 1 0
- 0xB0080000, // 00CF RAISE 2 R0 R0
- 0x540E002F, // 00D0 LDINT R3 48
- 0x60280010, // 00D1 GETGBL R10 G16
- 0x8C2C011B, // 00D2 GETMET R11 R0 K27
- 0x5C341200, // 00D3 MOVE R13 R9
- 0x7C2C0400, // 00D4 CALL R11 2
- 0x7C280200, // 00D5 CALL R10 1
- 0xA8020026, // 00D6 EXBLK 0 #00FE
- 0x5C2C1400, // 00D7 MOVE R11 R10
- 0x7C2C0000, // 00D8 CALL R11 0
- 0x9430120B, // 00D9 GETIDX R12 R9 R11
- 0x6034000F, // 00DA GETGBL R13 G15
- 0x5C381800, // 00DB MOVE R14 R12
- 0x603C0013, // 00DC GETGBL R15 G19
- 0x7C340400, // 00DD CALL R13 2
- 0x78360017, // 00DE JMPF R13 #00F7
- 0x8C34191C, // 00DF GETMET R13 R12 K28
- 0x583C0026, // 00E0 LDCONST R15 K38
- 0x7C340400, // 00E1 CALL R13 2
- 0x78360013, // 00E2 JMPF R13 #00F7
- 0x00341727, // 00E3 ADD R13 R11 K39
- 0x88380109, // 00E4 GETMBR R14 R0 K9
- 0x8C381D0A, // 00E5 GETMET R14 R14 K10
- 0xB8421600, // 00E6 GETNGBL R16 K11
- 0x8C402128, // 00E7 GETMET R16 R16 K40
- 0x5C480000, // 00E8 MOVE R18 R0
- 0x5C4C0600, // 00E9 MOVE R19 R3
- 0x5C501A00, // 00EA MOVE R20 R13
- 0x7C400800, // 00EB CALL R16 4
- 0x7C380400, // 00EC CALL R14 2
- 0xB83A1A00, // 00ED GETNGBL R14 K13
- 0x8C381D0E, // 00EE GETMET R14 R14 K14
- 0x8C40030F, // 00EF GETMET R16 R1 K15
- 0x58480029, // 00F0 LDCONST R18 K41
- 0x5C4C0600, // 00F1 MOVE R19 R3
- 0x5C501A00, // 00F2 MOVE R20 R13
- 0x7C400800, // 00F3 CALL R16 4
- 0x58440011, // 00F4 LDCONST R17 K17
- 0x7C380600, // 00F5 CALL R14 3
- 0x000C0702, // 00F6 ADD R3 R3 K2
- 0x54360037, // 00F7 LDINT R13 56
- 0x2434060D, // 00F8 GT R13 R3 R13
- 0x78360000, // 00F9 JMPF R13 #00FB
- 0x70020000, // 00FA JMP #00FC
- 0x7001FFDA, // 00FB JMP #00D7
- 0xA8040001, // 00FC EXBLK 1 1
- 0x70020002, // 00FD JMP #0101
- 0x58280021, // 00FE LDCONST R10 K33
- 0xAC280200, // 00FF CATCH R10 1 0
- 0xB0080000, // 0100 RAISE 2 R0 R0
- 0x540E0037, // 0101 LDINT R3 56
- 0x60280010, // 0102 GETGBL R10 G16
- 0x8C2C011B, // 0103 GETMET R11 R0 K27
- 0x5C341200, // 0104 MOVE R13 R9
- 0x7C2C0400, // 0105 CALL R11 2
- 0x7C280200, // 0106 CALL R10 1
- 0xA8020026, // 0107 EXBLK 0 #012F
- 0x5C2C1400, // 0108 MOVE R11 R10
- 0x7C2C0000, // 0109 CALL R11 0
- 0x9430120B, // 010A GETIDX R12 R9 R11
- 0x6034000F, // 010B GETGBL R13 G15
- 0x5C381800, // 010C MOVE R14 R12
- 0x603C0013, // 010D GETGBL R15 G19
- 0x7C340400, // 010E CALL R13 2
- 0x78360017, // 010F JMPF R13 #0128
- 0x8C34191C, // 0110 GETMET R13 R12 K28
- 0x583C002A, // 0111 LDCONST R15 K42
- 0x7C340400, // 0112 CALL R13 2
- 0x78360013, // 0113 JMPF R13 #0128
- 0x0034172B, // 0114 ADD R13 R11 K43
- 0x88380109, // 0115 GETMBR R14 R0 K9
- 0x8C381D0A, // 0116 GETMET R14 R14 K10
- 0xB8421600, // 0117 GETNGBL R16 K11
- 0x8C40212C, // 0118 GETMET R16 R16 K44
- 0x5C480000, // 0119 MOVE R18 R0
- 0x5C4C0600, // 011A MOVE R19 R3
- 0x5C501A00, // 011B MOVE R20 R13
- 0x7C400800, // 011C CALL R16 4
- 0x7C380400, // 011D CALL R14 2
- 0xB83A1A00, // 011E GETNGBL R14 K13
- 0x8C381D0E, // 011F GETMET R14 R14 K14
- 0x8C40030F, // 0120 GETMET R16 R1 K15
- 0x5848002D, // 0121 LDCONST R18 K45
- 0x5C4C0600, // 0122 MOVE R19 R3
- 0x5C501A00, // 0123 MOVE R20 R13
- 0x7C400800, // 0124 CALL R16 4
- 0x58440011, // 0125 LDCONST R17 K17
- 0x7C380600, // 0126 CALL R14 3
- 0x000C0702, // 0127 ADD R3 R3 K2
- 0x5436003F, // 0128 LDINT R13 64
- 0x2434060D, // 0129 GT R13 R3 R13
- 0x78360000, // 012A JMPF R13 #012C
- 0x70020000, // 012B JMP #012D
- 0x7001FFDA, // 012C JMP #0108
- 0xA8040001, // 012D EXBLK 1 1
- 0x70020002, // 012E JMP #0132
- 0x58280021, // 012F LDCONST R10 K33
- 0xAC280200, // 0130 CATCH R10 1 0
- 0xB0080000, // 0131 RAISE 2 R0 R0
- 0xB82A1A00, // 0132 GETNGBL R10 K13
- 0x8C28152E, // 0133 GETMET R10 R10 K46
- 0x5830002F, // 0134 LDCONST R12 K47
- 0x58340030, // 0135 LDCONST R13 K48
- 0x7C280600, // 0136 CALL R10 3
- 0x80000000, // 0137 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _trigger_read_sensors
-********************************************************************/
-be_local_closure(Matter_Device__trigger_read_sensors, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(read_sensors),
- /* K3 */ be_nested_str_weak(load),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(plugins),
- /* K6 */ be_nested_str_weak(parse_sensors),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str_weak(log),
- /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
- /* K10 */ be_const_int(3),
- }),
- be_str_weak(_trigger_read_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xB80A0200, // 0001 GETNGBL R2 K1
- 0x8C080502, // 0002 GETMET R2 R2 K2
- 0x7C080200, // 0003 CALL R2 1
- 0x4C0C0000, // 0004 LDNIL R3
- 0x1C0C0403, // 0005 EQ R3 R2 R3
- 0x780E0000, // 0006 JMPF R3 #0008
- 0x80000600, // 0007 RET 0
- 0x8C0C0303, // 0008 GETMET R3 R1 K3
- 0x5C140400, // 0009 MOVE R5 R2
- 0x7C0C0400, // 000A CALL R3 2
- 0x4C100000, // 000B LDNIL R4
- 0x20100604, // 000C NE R4 R3 R4
- 0x7812000D, // 000D JMPF R4 #001C
- 0x58100004, // 000E LDCONST R4 K4
- 0x6014000C, // 000F GETGBL R5 G12
- 0x88180105, // 0010 GETMBR R6 R0 K5
- 0x7C140200, // 0011 CALL R5 1
- 0x14140805, // 0012 LT R5 R4 R5
- 0x78160006, // 0013 JMPF R5 #001B
- 0x88140105, // 0014 GETMBR R5 R0 K5
- 0x94140A04, // 0015 GETIDX R5 R5 R4
- 0x8C140B06, // 0016 GETMET R5 R5 K6
- 0x5C1C0600, // 0017 MOVE R7 R3
- 0x7C140400, // 0018 CALL R5 2
- 0x00100907, // 0019 ADD R4 R4 K7
- 0x7001FFF3, // 001A JMP #000F
- 0x70020007, // 001B JMP #0024
- 0xB8120200, // 001C GETNGBL R4 K1
- 0x8C100908, // 001D GETMET R4 R4 K8
- 0x60180008, // 001E GETGBL R6 G8
- 0x5C1C0400, // 001F MOVE R7 R2
- 0x7C180200, // 0020 CALL R6 1
- 0x001A1206, // 0021 ADD R6 K9 R6
- 0x581C000A, // 0022 LDCONST R7 K10
- 0x7C100600, // 0023 CALL R4 3
- 0x80000000, // 0024 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_active_endpoints
-********************************************************************/
-be_local_closure(Matter_Device_get_active_endpoints, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins),
- /* K1 */ be_nested_str_weak(get_endpoint),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(push),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- 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
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0xA8020011, // 0005 EXBLK 0 #0018
- 0x5C100600, // 0006 MOVE R4 R3
- 0x7C100000, // 0007 CALL R4 0
- 0x8C140901, // 0008 GETMET R5 R4 K1
- 0x7C140200, // 0009 CALL R5 1
- 0x78060002, // 000A JMPF R1 #000E
- 0x1C180B02, // 000B EQ R6 R5 K2
- 0x781A0000, // 000C JMPF R6 #000E
- 0x7001FFF7, // 000D JMP #0006
- 0x8C180503, // 000E GETMET R6 R2 K3
- 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
- 0x8C180504, // 0014 GETMET R6 R2 K4
- 0x5C200A00, // 0015 MOVE R8 R5
- 0x7C180400, // 0016 CALL R6 2
- 0x7001FFED, // 0017 JMP #0006
- 0x580C0005, // 0018 LDCONST R3 K5
- 0xAC0C0200, // 0019 CATCH R3 1 0
- 0xB0080000, // 001A RAISE 2 R0 R0
- 0x80040400, // 001B RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: msg_send
-********************************************************************/
-be_local_closure(Matter_Device_msg_send, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(send_UDP),
- }),
- be_str_weak(msg_send),
- &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
+ 0x8C200518, // 0037 GETMET R8 R2 K24
+ 0x58280014, // 0038 LDCONST R10 K20
+ 0x582C0015, // 0039 LDCONST R11 K21
+ 0x5C300C00, // 003A MOVE R12 R6
+ 0x88340111, // 003B GETMBR R13 R0 K17
+ 0x5C380E00, // 003C MOVE R14 R7
+ 0x7C200C00, // 003D CALL R8 6
+ 0xB81E1000, // 003E GETNGBL R7 K8
+ 0x8C1C0F19, // 003F GETMET R7 R7 K25
+ 0x7C1C0200, // 0040 CALL R7 1
+ 0x8C1C0F0D, // 0041 GETMET R7 R7 K13
+ 0x5824000E, // 0042 LDCONST R9 K14
+ 0x7C1C0400, // 0043 CALL R7 2
+ 0x781E0020, // 0044 JMPF R7 #0066
+ 0xB81E1000, // 0045 GETNGBL R7 K8
+ 0x8C1C0F09, // 0046 GETMET R7 R7 K9
+ 0x8C24070F, // 0047 GETMET R9 R3 K15
+ 0x582C0010, // 0048 LDCONST R11 K16
+ 0x58300019, // 0049 LDCONST R12 K25
+ 0x5C340C00, // 004A MOVE R13 R6
+ 0x8838011A, // 004B GETMBR R14 R0 K26
+ 0x7C240A00, // 004C CALL R9 5
+ 0x58280012, // 004D LDCONST R10 K18
+ 0x7C1C0600, // 004E CALL R7 3
+ 0x8C1C0513, // 004F GETMET R7 R2 K19
+ 0x58240014, // 0050 LDCONST R9 K20
+ 0x58280015, // 0051 LDCONST R10 K21
+ 0x542E15A3, // 0052 LDINT R11 5540
+ 0x4C300000, // 0053 LDNIL R12
+ 0x5C340C00, // 0054 MOVE R13 R6
+ 0x8838011A, // 0055 GETMBR R14 R0 K26
+ 0x7C1C0E00, // 0056 CALL R7 7
+ 0x8C1C0B06, // 0057 GETMET R7 R5 K6
+ 0x7C1C0200, // 0058 CALL R7 1
+ 0x001E2C07, // 0059 ADD R7 K22 R7
+ 0xB8221000, // 005A GETNGBL R8 K8
+ 0x8C201109, // 005B GETMET R8 R8 K9
+ 0x002A2E07, // 005C ADD R10 K23 R7
+ 0x582C0012, // 005D LDCONST R11 K18
+ 0x7C200600, // 005E CALL R8 3
+ 0x8C200518, // 005F GETMET R8 R2 K24
+ 0x58280014, // 0060 LDCONST R10 K20
+ 0x582C0015, // 0061 LDCONST R11 K21
+ 0x5C300C00, // 0062 MOVE R12 R6
+ 0x8834011A, // 0063 GETMBR R13 R0 K26
+ 0x5C380E00, // 0064 MOVE R14 R7
+ 0x7C200C00, // 0065 CALL R8 6
+ 0xA8040001, // 0066 EXBLK 1 1
+ 0x70020010, // 0067 JMP #0079
+ 0xAC100002, // 0068 CATCH R4 0 2
+ 0x7002000D, // 0069 JMP #0078
+ 0xB81A1000, // 006A GETNGBL R6 K8
+ 0x8C180D09, // 006B GETMET R6 R6 K9
+ 0x60200008, // 006C GETGBL R8 G8
+ 0x5C240800, // 006D MOVE R9 R4
+ 0x7C200200, // 006E CALL R8 1
+ 0x00223608, // 006F ADD R8 K27 R8
+ 0x0020111C, // 0070 ADD R8 R8 K28
+ 0x60240008, // 0071 GETGBL R9 G8
+ 0x5C280A00, // 0072 MOVE R10 R5
+ 0x7C240200, // 0073 CALL R9 1
+ 0x00201009, // 0074 ADD R8 R8 R9
+ 0x5824000B, // 0075 LDCONST R9 K11
+ 0x7C180600, // 0076 CALL R6 3
+ 0x70020000, // 0077 JMP #0079
+ 0xB0080000, // 0078 RAISE 2 R0 R0
+ 0x80000000, // 0079 RET 0
})
)
);
@@ -1597,12 +548,74 @@ be_local_closure(Matter_Device_stop, /* name */
/********************************************************************
-** Solidified function: msg_received
+** Solidified function: register_commands
********************************************************************/
-be_local_closure(Matter_Device_msg_received, /* name */
+be_local_closure(Matter_Device_register_commands, /* name */
be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* 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(MtrJoin),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x68100000, // 0000 GETUPV R4 U0
+ 0x8C100900, // 0001 GETMET R4 R4 K0
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80040800, // 0007 RET 1 R4
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(add_cmd),
+ /* K2 */ be_nested_str_weak(MtrJoin),
+ }),
+ be_str_weak(register_commands),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x84100000, // 0003 CLOSURE R4 P0
+ 0x7C040600, // 0004 CALL R1 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_send
+********************************************************************/
+be_local_closure(Matter_Device_msg_send, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -1610,19 +623,180 @@ be_local_closure(Matter_Device_msg_received, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(msg_received),
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(send_UDP),
}),
- be_str_weak(msg_received),
+ be_str_weak(msg_send),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x88100100, // 0000 GETMBR R4 R0 K0
- 0x8C100901, // 0001 GETMET R4 R4 K1
- 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
+ ( &(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: save_param
+********************************************************************/
+be_local_closure(Matter_Device_save_param, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[24]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(format),
+ /* K2 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s),
+ /* K3 */ be_nested_str_weak(root_discriminator),
+ /* K4 */ be_nested_str_weak(root_passcode),
+ /* K5 */ be_nested_str_weak(ipv4only),
+ /* K6 */ be_nested_str_weak(true),
+ /* K7 */ be_nested_str_weak(false),
+ /* K8 */ be_nested_str_weak(plugins_persist),
+ /* K9 */ be_nested_str_weak(_X2C_X22config_X22_X3A),
+ /* K10 */ be_nested_str_weak(plugins_to_json),
+ /* K11 */ be_nested_str_weak(_X7D),
+ /* K12 */ be_nested_str_weak(FILENAME),
+ /* K13 */ be_nested_str_weak(w),
+ /* K14 */ be_nested_str_weak(write),
+ /* K15 */ be_nested_str_weak(close),
+ /* K16 */ be_nested_str_weak(tasmota),
+ /* K17 */ be_nested_str_weak(log),
+ /* K18 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s),
+ /* K19 */ be_nested_str_weak(_X20and_X20condiguration),
+ /* K20 */ be_nested_str_weak(),
+ /* K21 */ be_const_int(2),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
+ /* K23 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(save_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[63]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x88140103, // 0003 GETMBR R5 R0 K3
+ 0x88180104, // 0004 GETMBR R6 R0 K4
+ 0x881C0105, // 0005 GETMBR R7 R0 K5
+ 0x781E0001, // 0006 JMPF R7 #0009
+ 0x581C0006, // 0007 LDCONST R7 K6
+ 0x70020000, // 0008 JMP #000A
+ 0x581C0007, // 0009 LDCONST R7 K7
+ 0x7C080A00, // 000A CALL R2 5
+ 0x880C0108, // 000B GETMBR R3 R0 K8
+ 0x780E0003, // 000C JMPF R3 #0011
+ 0x00080509, // 000D ADD R2 R2 K9
+ 0x8C0C010A, // 000E GETMET R3 R0 K10
+ 0x7C0C0200, // 000F CALL R3 1
+ 0x00080403, // 0010 ADD R2 R2 R3
+ 0x0008050B, // 0011 ADD R2 R2 K11
+ 0xA8020018, // 0012 EXBLK 0 #002C
+ 0x600C0011, // 0013 GETGBL R3 G17
+ 0x8810010C, // 0014 GETMBR R4 R0 K12
+ 0x5814000D, // 0015 LDCONST R5 K13
+ 0x7C0C0400, // 0016 CALL R3 2
+ 0x8C10070E, // 0017 GETMET R4 R3 K14
+ 0x5C180400, // 0018 MOVE R6 R2
+ 0x7C100400, // 0019 CALL R4 2
+ 0x8C10070F, // 001A GETMET R4 R3 K15
+ 0x7C100200, // 001B CALL R4 1
+ 0xB8122000, // 001C GETNGBL R4 K16
+ 0x8C100911, // 001D GETMET R4 R4 K17
+ 0x8C180301, // 001E GETMET R6 R1 K1
+ 0x58200012, // 001F LDCONST R8 K18
+ 0x88240108, // 0020 GETMBR R9 R0 K8
+ 0x78260001, // 0021 JMPF R9 #0024
+ 0x58240013, // 0022 LDCONST R9 K19
+ 0x70020000, // 0023 JMP #0025
+ 0x58240014, // 0024 LDCONST R9 K20
+ 0x7C180600, // 0025 CALL R6 3
+ 0x581C0015, // 0026 LDCONST R7 K21
+ 0x7C100600, // 0027 CALL R4 3
+ 0xA8040001, // 0028 EXBLK 1 1
+ 0x80040400, // 0029 RET 1 R2
+ 0xA8040001, // 002A EXBLK 1 1
+ 0x70020011, // 002B JMP #003E
+ 0xAC0C0002, // 002C CATCH R3 0 2
+ 0x7002000E, // 002D JMP #003D
+ 0xB8162000, // 002E GETNGBL R5 K16
+ 0x8C140B11, // 002F GETMET R5 R5 K17
+ 0x601C0008, // 0030 GETGBL R7 G8
+ 0x5C200600, // 0031 MOVE R8 R3
+ 0x7C1C0200, // 0032 CALL R7 1
+ 0x001E2C07, // 0033 ADD R7 K22 R7
+ 0x001C0F17, // 0034 ADD R7 R7 K23
+ 0x60200008, // 0035 GETGBL R8 G8
+ 0x5C240800, // 0036 MOVE R9 R4
+ 0x7C200200, // 0037 CALL R8 1
+ 0x001C0E08, // 0038 ADD R7 R7 R8
+ 0x58200015, // 0039 LDCONST R8 K21
+ 0x7C140600, // 003A CALL R5 3
+ 0x80040400, // 003B RET 1 R2
+ 0x70020000, // 003C JMP #003E
+ 0xB0080000, // 003D RAISE 2 R0 R0
+ 0x80000000, // 003E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_announce_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
})
)
);
@@ -1689,6 +863,43 @@ be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name *
/*******************************************************************/
+/********************************************************************
+** Solidified function: start_commissioning_complete
+********************************************************************/
+be_local_closure(Matter_Device_start_commissioning_complete, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(log),
+ /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
+ /* K3 */ be_const_int(2),
+ /* K4 */ be_nested_str_weak(stop_basic_commissioning),
+ }),
+ be_str_weak(start_commissioning_complete),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C080600, // 0004 CALL R2 3
+ 0x8C080104, // 0005 GETMET R2 R0 K4
+ 0x7C080200, // 0006 CALL R2 1
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: compute_qrcode_content
********************************************************************/
@@ -1766,11 +977,74 @@ be_local_closure(Matter_Device_compute_qrcode_content, /* name */
/********************************************************************
-** Solidified function: sort_distinct
+** Solidified function: compute_manual_pairing_code
********************************************************************/
-be_local_closure(Matter_Device_sort_distinct, /* name */
+be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
be_nested_proto(
- 7, /* nstack */
+ 11, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(root_discriminator),
+ /* K2 */ be_nested_str_weak(root_passcode),
+ /* K3 */ be_nested_str_weak(format),
+ /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(Verhoeff),
+ /* K7 */ be_nested_str_weak(checksum),
+ }),
+ be_str_weak(compute_manual_pairing_code),
+ &be_const_str_solidified,
+ ( &(const binstruction[31]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x88080101, // 0001 GETMBR R2 R0 K1
+ 0x540E0FFE, // 0002 LDINT R3 4095
+ 0x2C080403, // 0003 AND R2 R2 R3
+ 0x540E0009, // 0004 LDINT R3 10
+ 0x3C080403, // 0005 SHR R2 R2 R3
+ 0x880C0101, // 0006 GETMBR R3 R0 K1
+ 0x541202FF, // 0007 LDINT R4 768
+ 0x2C0C0604, // 0008 AND R3 R3 R4
+ 0x54120005, // 0009 LDINT R4 6
+ 0x380C0604, // 000A SHL R3 R3 R4
+ 0x88100102, // 000B GETMBR R4 R0 K2
+ 0x54163FFE, // 000C LDINT R5 16383
+ 0x2C100805, // 000D AND R4 R4 R5
+ 0x300C0604, // 000E OR R3 R3 R4
+ 0x88100102, // 000F GETMBR R4 R0 K2
+ 0x5416000D, // 0010 LDINT R5 14
+ 0x3C100805, // 0011 SHR R4 R4 R5
+ 0x8C140303, // 0012 GETMET R5 R1 K3
+ 0x581C0004, // 0013 LDCONST R7 K4
+ 0x5C200400, // 0014 MOVE R8 R2
+ 0x5C240600, // 0015 MOVE R9 R3
+ 0x5C280800, // 0016 MOVE R10 R4
+ 0x7C140A00, // 0017 CALL R5 5
+ 0xB81A0A00, // 0018 GETNGBL R6 K5
+ 0x88180D06, // 0019 GETMBR R6 R6 K6
+ 0x8C180D07, // 001A GETMET R6 R6 K7
+ 0x5C200A00, // 001B MOVE R8 R5
+ 0x7C180400, // 001C CALL R6 2
+ 0x00140A06, // 001D ADD R5 R5 R6
+ 0x80040A00, // 001E RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: k2l
+********************************************************************/
+be_local_closure(Matter_Device_k2l, /* name */
+ be_nested_proto(
+ 8, /* nstack */
1, /* argc */
4, /* varg */
0, /* has upvals */
@@ -1778,69 +1052,67 @@ be_local_closure(Matter_Device_sort_distinct, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
+ ( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_const_int(1),
- /* K2 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
/* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_nested_str_weak(remove),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(0),
}),
- be_str_weak(sort_distinct),
+ be_str_weak(k2l),
&be_const_str_solidified,
- ( &(const binstruction[53]) { /* code */
+ ( &(const binstruction[50]) { /* code */
0x58040000, // 0000 LDCONST R1 K0
- 0x60080010, // 0001 GETGBL R2 G16
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x040C0701, // 0005 SUB R3 R3 K1
- 0x400E0203, // 0006 CONNECT R3 K1 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
- 0x24180B02, // 000D GT R6 R5 K2
- 0x781A0008, // 000E JMPF R6 #0018
- 0x04180B01, // 000F SUB R6 R5 K1
- 0x94180006, // 0010 GETIDX R6 R0 R6
- 0x24180C04, // 0011 GT R6 R6 R4
- 0x781A0004, // 0012 JMPF R6 #0018
- 0x04180B01, // 0013 SUB R6 R5 K1
- 0x94180006, // 0014 GETIDX R6 R0 R6
- 0x98000A06, // 0015 SETIDX R0 R5 R6
- 0x04140B01, // 0016 SUB R5 R5 K1
- 0x7001FFF4, // 0017 JMP #000D
- 0x98000A04, // 0018 SETIDX R0 R5 R4
- 0x7001FFEE, // 0019 JMP #0009
- 0x58080003, // 001A LDCONST R2 K3
- 0xAC080200, // 001B CATCH R2 1 0
- 0xB0080000, // 001C RAISE 2 R0 R0
- 0x58080001, // 001D LDCONST R2 K1
- 0x600C000C, // 001E GETGBL R3 G12
- 0x5C100000, // 001F MOVE R4 R0
- 0x7C0C0200, // 0020 CALL R3 1
- 0x180C0701, // 0021 LE R3 R3 K1
- 0x780E0000, // 0022 JMPF R3 #0024
- 0x80040000, // 0023 RET 1 R0
- 0x940C0102, // 0024 GETIDX R3 R0 K2
- 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
- 0x8C100104, // 002D GETMET R4 R0 K4
- 0x5C180400, // 002E MOVE R6 R2
- 0x7C100400, // 002F CALL R4 2
- 0x70020001, // 0030 JMP #0033
- 0x940C0002, // 0031 GETIDX R3 R0 R2
- 0x00080501, // 0032 ADD R2 R2 K1
- 0x7001FFF0, // 0033 JMP #0025
- 0x80040000, // 0034 RET 1 R0
+ 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
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 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
+ 0x8C140502, // 000E GETMET R5 R2 K2
+ 0x5C1C0800, // 000F MOVE R7 R4
+ 0x7C140400, // 0010 CALL R5 2
+ 0x7001FFF9, // 0011 JMP #000C
+ 0x580C0003, // 0012 LDCONST R3 K3
+ 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
+ 0x04100904, // 0019 SUB R4 R4 K4
+ 0x40120804, // 001A CONNECT R4 K4 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
+ 0x241C0D05, // 0021 GT R7 R6 K5
+ 0x781E0008, // 0022 JMPF R7 #002C
+ 0x041C0D04, // 0023 SUB R7 R6 K4
+ 0x941C0407, // 0024 GETIDX R7 R2 R7
+ 0x241C0E05, // 0025 GT R7 R7 R5
+ 0x781E0004, // 0026 JMPF R7 #002C
+ 0x041C0D04, // 0027 SUB R7 R6 K4
+ 0x941C0407, // 0028 GETIDX R7 R2 R7
+ 0x98080C07, // 0029 SETIDX R2 R6 R7
+ 0x04180D04, // 002A SUB R6 R6 K4
+ 0x7001FFF4, // 002B JMP #0021
+ 0x98080C05, // 002C SETIDX R2 R6 R5
+ 0x7001FFEE, // 002D JMP #001D
+ 0x580C0003, // 002E LDCONST R3 K3
+ 0xAC0C0200, // 002F CATCH R3 1 0
+ 0xB0080000, // 0030 RAISE 2 R0 R0
+ 0x80040400, // 0031 RET 1 R2
})
)
);
@@ -1980,171 +1252,12 @@ be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
/********************************************************************
-** Solidified function: every_second
+** Solidified function: MtrJoin
********************************************************************/
-be_local_closure(Matter_Device_every_second, /* name */
+be_local_closure(Matter_Device_MtrJoin, /* name */
be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(every_second),
- /* K2 */ be_nested_str_weak(message_handler),
- /* K3 */ be_nested_str_weak(commissioning_open),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(time_reached),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(plugins),
- /* K8 */ be_const_int(1),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x88040102, // 0003 GETMBR R1 R0 K2
- 0x8C040301, // 0004 GETMET R1 R1 K1
- 0x7C040200, // 0005 CALL R1 1
- 0x88040103, // 0006 GETMBR R1 R0 K3
- 0x4C080000, // 0007 LDNIL R2
- 0x20040202, // 0008 NE R1 R1 R2
- 0x78060006, // 0009 JMPF R1 #0011
- 0xB8060800, // 000A GETNGBL R1 K4
- 0x8C040305, // 000B GETMET R1 R1 K5
- 0x880C0103, // 000C GETMBR R3 R0 K3
- 0x7C040400, // 000D CALL R1 2
- 0x78060001, // 000E JMPF R1 #0011
- 0x4C040000, // 000F LDNIL R1
- 0x90020601, // 0010 SETMBR R0 K3 R1
- 0x58040006, // 0011 LDCONST R1 K6
- 0x6008000C, // 0012 GETGBL R2 G12
- 0x880C0107, // 0013 GETMBR R3 R0 K7
- 0x7C080200, // 0014 CALL R2 1
- 0x14080202, // 0015 LT R2 R1 R2
- 0x780A0005, // 0016 JMPF R2 #001D
- 0x88080107, // 0017 GETMBR R2 R0 K7
- 0x94080401, // 0018 GETIDX R2 R2 R1
- 0x8C080501, // 0019 GETMET R2 R2 K1
- 0x7C080200, // 001A CALL R2 1
- 0x00040308, // 001B ADD R1 R1 K8
- 0x7001FFF4, // 001C JMP #0012
- 0x80000000, // 001D RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_root_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
- be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[23]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
- /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
- /* K7 */ be_const_int(0),
- /* K8 */ be_const_int(3),
- /* K9 */ be_const_int(2147483647),
- /* K10 */ be_const_int(2),
- /* K11 */ be_nested_str_weak(compute_qrcode_content),
- /* K12 */ be_nested_str_weak(publish_result),
- /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
- /* K14 */ be_nested_str_weak(Matter),
- /* K15 */ be_nested_str_weak(_compute_pbkdf),
- /* K16 */ be_nested_str_weak(root_passcode),
- /* K17 */ be_nested_str_weak(root_iterations),
- /* K18 */ be_nested_str_weak(root_salt),
- /* K19 */ be_nested_str_weak(start_basic_commissioning),
- /* K20 */ be_nested_str_weak(root_discriminator),
- /* K21 */ be_nested_str_weak(root_w0),
- /* K22 */ be_nested_str_weak(root_L),
- }),
- be_str_weak(start_root_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[49]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C0C0203, // 0002 EQ R3 R1 R3
- 0x780E0000, // 0003 JMPF R3 #0005
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x8C0C0102, // 0005 GETMET R3 R0 K2
- 0x7C0C0200, // 0006 CALL R3 1
- 0xB8120600, // 0007 GETNGBL R4 K3
- 0x8C100904, // 0008 GETMET R4 R4 K4
- 0x8C180505, // 0009 GETMET R6 R2 K5
- 0x58200006, // 000A LDCONST R8 K6
- 0x40260F08, // 000B CONNECT R9 K7 K8
- 0x94240609, // 000C GETIDX R9 R3 R9
- 0x542A0003, // 000D LDINT R10 4
- 0x542E0005, // 000E LDINT R11 6
- 0x4028140B, // 000F CONNECT R10 R10 R11
- 0x9428060A, // 0010 GETIDX R10 R3 R10
- 0x542E0006, // 0011 LDINT R11 7
- 0x402C1709, // 0012 CONNECT R11 R11 K9
- 0x942C060B, // 0013 GETIDX R11 R3 R11
- 0x7C180A00, // 0014 CALL R6 5
- 0x581C000A, // 0015 LDCONST R7 K10
- 0x7C100600, // 0016 CALL R4 3
- 0x8C10010B, // 0017 GETMET R4 R0 K11
- 0x7C100200, // 0018 CALL R4 1
- 0xB8160600, // 0019 GETNGBL R5 K3
- 0x8C140B0C, // 001A GETMET R5 R5 K12
- 0x8C1C0505, // 001B GETMET R7 R2 K5
- 0x5824000D, // 001C LDCONST R9 K13
- 0x5C280600, // 001D MOVE R10 R3
- 0x5C2C0800, // 001E MOVE R11 R4
- 0x7C1C0800, // 001F CALL R7 4
- 0x5820000E, // 0020 LDCONST R8 K14
- 0x7C140600, // 0021 CALL R5 3
- 0x8C14010F, // 0022 GETMET R5 R0 K15
- 0x881C0110, // 0023 GETMBR R7 R0 K16
- 0x88200111, // 0024 GETMBR R8 R0 K17
- 0x88240112, // 0025 GETMBR R9 R0 K18
- 0x7C140800, // 0026 CALL R5 4
- 0x8C140113, // 0027 GETMET R5 R0 K19
- 0x5C1C0200, // 0028 MOVE R7 R1
- 0x88200111, // 0029 GETMBR R8 R0 K17
- 0x88240114, // 002A GETMBR R9 R0 K20
- 0x88280112, // 002B GETMBR R10 R0 K18
- 0x882C0115, // 002C GETMBR R11 R0 K21
- 0x88300116, // 002D GETMBR R12 R0 K22
- 0x4C340000, // 002E LDNIL R13
- 0x7C141000, // 002F CALL R5 8
- 0x80000000, // 0030 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _init_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device__init_basic_commissioning, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
+ 8, /* nstack */
+ 5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -2152,346 +1265,27 @@ be_local_closure(Matter_Device__init_basic_commissioning, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
- }),
- be_str_weak(_init_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x1C040302, // 0003 EQ R1 R1 K2
- 0x78060001, // 0004 JMPF R1 #0007
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x7C040200, // 0006 CALL R1 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Device_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* 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 */
- ( &(const bvalue[36]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
+ /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K1 */ be_nested_str_weak(stop_basic_commissioning),
/* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(UI),
- /* K7 */ be_nested_str_weak(started),
- /* K8 */ be_nested_str_weak(plugins),
- /* K9 */ be_nested_str_weak(vendorid),
- /* K10 */ be_nested_str_weak(VENDOR_ID),
- /* K11 */ be_nested_str_weak(productid),
- /* K12 */ be_nested_str_weak(PRODUCT_ID),
- /* K13 */ be_nested_str_weak(root_iterations),
- /* K14 */ be_nested_str_weak(PBKDF_ITERATIONS),
- /* K15 */ be_nested_str_weak(root_salt),
- /* K16 */ be_nested_str_weak(random),
- /* K17 */ be_nested_str_weak(ipv4only),
- /* K18 */ be_nested_str_weak(load_param),
- /* K19 */ be_nested_str_weak(sessions),
- /* K20 */ be_nested_str_weak(Session_Store),
- /* K21 */ be_nested_str_weak(load_fabrics),
- /* K22 */ be_nested_str_weak(message_handler),
- /* K23 */ be_nested_str_weak(MessageHandler),
- /* K24 */ be_nested_str_weak(ui),
- /* K25 */ be_nested_str_weak(wifi),
- /* K26 */ be_nested_str_weak(up),
- /* K27 */ be_nested_str_weak(eth),
- /* K28 */ be_nested_str_weak(start),
- /* K29 */ be_nested_str_weak(add_rule),
- /* K30 */ be_nested_str_weak(Wifi_X23Connected),
- /* K31 */ be_nested_str_weak(matter_start),
- /* K32 */ be_nested_str_weak(Eth_X23Connected),
- /* K33 */ be_nested_str_weak(_init_basic_commissioning),
- /* K34 */ be_nested_str_weak(add_driver),
- /* K35 */ be_nested_str_weak(register_commands),
+ /* K3 */ be_nested_str_weak(resp_cmnd_done),
}),
- be_str_weak(init),
+ be_str_weak(MtrJoin),
&be_const_str_solidified,
- ( &(const binstruction[93]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xB80E0400, // 0002 GETNGBL R3 K2
- 0x8C0C0703, // 0003 GETMET R3 R3 K3
- 0xB8160800, // 0004 GETNGBL R5 K4
- 0x88140B05, // 0005 GETMBR R5 R5 K5
- 0x7C0C0400, // 0006 CALL R3 2
- 0x740E0004, // 0007 JMPT R3 #000D
- 0xB80E0800, // 0008 GETNGBL R3 K4
- 0x8C0C0706, // 0009 GETMET R3 R3 K6
- 0x5C140000, // 000A MOVE R5 R0
- 0x7C0C0400, // 000B CALL R3 2
- 0x80000600, // 000C RET 0
- 0x500C0000, // 000D LDBOOL R3 0 0
- 0x90020E03, // 000E SETMBR R0 K7 R3
- 0x600C0012, // 000F GETGBL R3 G18
- 0x7C0C0000, // 0010 CALL R3 0
- 0x90021003, // 0011 SETMBR R0 K8 R3
- 0x880C010A, // 0012 GETMBR R3 R0 K10
- 0x90021203, // 0013 SETMBR R0 K9 R3
- 0x880C010C, // 0014 GETMBR R3 R0 K12
- 0x90021603, // 0015 SETMBR R0 K11 R3
- 0x880C010E, // 0016 GETMBR R3 R0 K14
- 0x90021A03, // 0017 SETMBR R0 K13 R3
- 0x8C0C0310, // 0018 GETMET R3 R1 K16
- 0x5416000F, // 0019 LDINT R5 16
- 0x7C0C0400, // 001A CALL R3 2
- 0x90021E03, // 001B SETMBR R0 K15 R3
- 0x500C0000, // 001C LDBOOL R3 0 0
- 0x90022203, // 001D SETMBR R0 K17 R3
- 0x8C0C0112, // 001E GETMET R3 R0 K18
- 0x7C0C0200, // 001F CALL R3 1
- 0xB80E0800, // 0020 GETNGBL R3 K4
- 0x8C0C0714, // 0021 GETMET R3 R3 K20
- 0x7C0C0200, // 0022 CALL R3 1
- 0x90022603, // 0023 SETMBR R0 K19 R3
- 0x880C0113, // 0024 GETMBR R3 R0 K19
- 0x8C0C0715, // 0025 GETMET R3 R3 K21
- 0x7C0C0200, // 0026 CALL R3 1
- 0xB80E0800, // 0027 GETNGBL R3 K4
- 0x8C0C0717, // 0028 GETMET R3 R3 K23
- 0x5C140000, // 0029 MOVE R5 R0
- 0x7C0C0400, // 002A CALL R3 2
- 0x90022C03, // 002B SETMBR R0 K22 R3
- 0xB80E0800, // 002C GETNGBL R3 K4
- 0x8C0C0706, // 002D GETMET R3 R3 K6
- 0x5C140000, // 002E MOVE R5 R0
- 0x7C0C0400, // 002F CALL R3 2
- 0x90023003, // 0030 SETMBR R0 K24 R3
- 0xB80E0400, // 0031 GETNGBL R3 K2
- 0x8C0C0719, // 0032 GETMET R3 R3 K25
- 0x7C0C0200, // 0033 CALL R3 1
- 0x940C071A, // 0034 GETIDX R3 R3 K26
- 0x740E0004, // 0035 JMPT R3 #003B
- 0xB80E0400, // 0036 GETNGBL R3 K2
- 0x8C0C071B, // 0037 GETMET R3 R3 K27
- 0x7C0C0200, // 0038 CALL R3 1
- 0x940C071A, // 0039 GETIDX R3 R3 K26
- 0x780E0001, // 003A JMPF R3 #003D
- 0x8C0C011C, // 003B GETMET R3 R0 K28
- 0x7C0C0200, // 003C CALL R3 1
- 0xB80E0400, // 003D GETNGBL R3 K2
- 0x8C0C0719, // 003E GETMET R3 R3 K25
- 0x7C0C0200, // 003F CALL R3 1
- 0x940C071A, // 0040 GETIDX R3 R3 K26
- 0x740E0005, // 0041 JMPT R3 #0048
- 0xB80E0400, // 0042 GETNGBL R3 K2
- 0x8C0C071D, // 0043 GETMET R3 R3 K29
- 0x5814001E, // 0044 LDCONST R5 K30
- 0x84180000, // 0045 CLOSURE R6 P0
- 0x581C001F, // 0046 LDCONST R7 K31
- 0x7C0C0800, // 0047 CALL R3 4
- 0xB80E0400, // 0048 GETNGBL R3 K2
- 0x8C0C071B, // 0049 GETMET R3 R3 K27
- 0x7C0C0200, // 004A CALL R3 1
- 0x940C071A, // 004B GETIDX R3 R3 K26
- 0x740E0005, // 004C JMPT R3 #0053
- 0xB80E0400, // 004D GETNGBL R3 K2
- 0x8C0C071D, // 004E GETMET R3 R3 K29
- 0x58140020, // 004F LDCONST R5 K32
- 0x84180001, // 0050 CLOSURE R6 P1
- 0x581C001F, // 0051 LDCONST R7 K31
- 0x7C0C0800, // 0052 CALL R3 4
- 0x8C0C0121, // 0053 GETMET R3 R0 K33
- 0x7C0C0200, // 0054 CALL R3 1
- 0xB80E0400, // 0055 GETNGBL R3 K2
- 0x8C0C0722, // 0056 GETMET R3 R3 K34
- 0x5C140000, // 0057 MOVE R5 R0
- 0x7C0C0400, // 0058 CALL R3 2
- 0x8C0C0123, // 0059 GETMET R3 R0 K35
- 0x7C0C0200, // 005A CALL R3 1
- 0xA0000000, // 005B CLOSE R0
- 0x80000000, // 005C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _compute_pbkdf
-********************************************************************/
-be_local_closure(Matter_Device__compute_pbkdf, /* name */
- be_nested_proto(
- 14, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(add),
- /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
- /* K4 */ be_nested_str_weak(derive),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(root_w0),
- /* K7 */ be_nested_str_weak(EC_P256),
- /* K8 */ be_nested_str_weak(mod),
- /* K9 */ be_nested_str_weak(root_L),
- /* K10 */ be_nested_str_weak(public_key),
- }),
- be_str_weak(_compute_pbkdf),
- &be_const_str_solidified,
- ( &(const binstruction[41]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xA4160200, // 0001 IMPORT R5 K1
- 0x60180015, // 0002 GETGBL R6 G21
- 0x7C180000, // 0003 CALL R6 0
- 0x8C180D02, // 0004 GETMET R6 R6 K2
- 0x5C200200, // 0005 MOVE R8 R1
- 0x54260003, // 0006 LDINT R9 4
- 0x7C180600, // 0007 CALL R6 3
- 0x8C1C0903, // 0008 GETMET R7 R4 K3
- 0x7C1C0200, // 0009 CALL R7 1
- 0x8C1C0F04, // 000A GETMET R7 R7 K4
- 0x5C240C00, // 000B MOVE R9 R6
- 0x5C280600, // 000C MOVE R10 R3
- 0x5C2C0400, // 000D MOVE R11 R2
- 0x5432004F, // 000E LDINT R12 80
- 0x7C1C0A00, // 000F CALL R7 5
- 0x54220026, // 0010 LDINT R8 39
- 0x40220A08, // 0011 CONNECT R8 K5 R8
- 0x94200E08, // 0012 GETIDX R8 R7 R8
- 0x54260027, // 0013 LDINT R9 40
- 0x542A004E, // 0014 LDINT R10 79
- 0x4024120A, // 0015 CONNECT R9 R9 R10
- 0x94240E09, // 0016 GETIDX R9 R7 R9
- 0x8C280907, // 0017 GETMET R10 R4 K7
- 0x7C280200, // 0018 CALL R10 1
- 0x8C281508, // 0019 GETMET R10 R10 K8
- 0x5C301000, // 001A MOVE R12 R8
- 0x7C280400, // 001B CALL R10 2
- 0x90020C0A, // 001C SETMBR R0 K6 R10
- 0x8C280907, // 001D GETMET R10 R4 K7
- 0x7C280200, // 001E CALL R10 1
- 0x8C281508, // 001F GETMET R10 R10 K8
- 0x5C301200, // 0020 MOVE R12 R9
- 0x7C280400, // 0021 CALL R10 2
- 0x8C2C0907, // 0022 GETMET R11 R4 K7
- 0x7C2C0200, // 0023 CALL R11 1
- 0x8C2C170A, // 0024 GETMET R11 R11 K10
- 0x5C341400, // 0025 MOVE R13 R10
- 0x7C2C0400, // 0026 CALL R11 2
- 0x9002120B, // 0027 SETMBR R0 K9 R11
- 0x80000000, // 0028 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_250ms
-********************************************************************/
-be_local_closure(Matter_Device_every_250ms, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(every_250ms),
- }),
- be_str_weak(every_250ms),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
+ ( &(const binstruction[13]) { /* code */
+ 0x60140009, // 0000 GETGBL R5 G9
+ 0x5C180600, // 0001 MOVE R6 R3
+ 0x7C140200, // 0002 CALL R5 1
+ 0x78160002, // 0003 JMPF R5 #0007
+ 0x8C180100, // 0004 GETMET R6 R0 K0
+ 0x7C180200, // 0005 CALL R6 1
+ 0x70020001, // 0006 JMP #0009
+ 0x8C180101, // 0007 GETMET R6 R0 K1
+ 0x7C180200, // 0008 CALL R6 1
+ 0xB81A0400, // 0009 GETNGBL R6 K2
+ 0x8C180D03, // 000A GETMET R6 R6 K3
+ 0x7C180200, // 000B CALL R6 1
+ 0x80000000, // 000C RET 0
})
)
);
@@ -2827,6 +1621,2340 @@ be_local_closure(Matter_Device_process_attribute_expansion, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: received_ack
+********************************************************************/
+be_local_closure(Matter_Device_received_ack, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(received_ack),
+ }),
+ be_str_weak(received_ack),
+ &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: _trigger_read_sensors
+********************************************************************/
+be_local_closure(Matter_Device__trigger_read_sensors, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(json),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(read_sensors),
+ /* K3 */ be_nested_str_weak(load),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(plugins),
+ /* K6 */ be_nested_str_weak(parse_sensors),
+ /* K7 */ be_const_int(1),
+ /* K8 */ be_nested_str_weak(log),
+ /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
+ /* K10 */ be_const_int(3),
+ }),
+ be_str_weak(_trigger_read_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[37]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xB80A0200, // 0001 GETNGBL R2 K1
+ 0x8C080502, // 0002 GETMET R2 R2 K2
+ 0x7C080200, // 0003 CALL R2 1
+ 0x4C0C0000, // 0004 LDNIL R3
+ 0x1C0C0403, // 0005 EQ R3 R2 R3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0303, // 0008 GETMET R3 R1 K3
+ 0x5C140400, // 0009 MOVE R5 R2
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x4C100000, // 000B LDNIL R4
+ 0x20100604, // 000C NE R4 R3 R4
+ 0x7812000D, // 000D JMPF R4 #001C
+ 0x58100004, // 000E LDCONST R4 K4
+ 0x6014000C, // 000F GETGBL R5 G12
+ 0x88180105, // 0010 GETMBR R6 R0 K5
+ 0x7C140200, // 0011 CALL R5 1
+ 0x14140805, // 0012 LT R5 R4 R5
+ 0x78160006, // 0013 JMPF R5 #001B
+ 0x88140105, // 0014 GETMBR R5 R0 K5
+ 0x94140A04, // 0015 GETIDX R5 R5 R4
+ 0x8C140B06, // 0016 GETMET R5 R5 K6
+ 0x5C1C0600, // 0017 MOVE R7 R3
+ 0x7C140400, // 0018 CALL R5 2
+ 0x00100907, // 0019 ADD R4 R4 K7
+ 0x7001FFF3, // 001A JMP #000F
+ 0x70020007, // 001B JMP #0024
+ 0xB8120200, // 001C GETNGBL R4 K1
+ 0x8C100908, // 001D GETMET R4 R4 K8
+ 0x60180008, // 001E GETGBL R6 G8
+ 0x5C1C0400, // 001F MOVE R7 R2
+ 0x7C180200, // 0020 CALL R6 1
+ 0x001A1206, // 0021 ADD R6 K9 R6
+ 0x581C000A, // 0022 LDCONST R7 K10
+ 0x7C100600, // 0023 CALL R4 3
+ 0x80000000, // 0024 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_root_commissioning_open
+********************************************************************/
+be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
+ }),
+ be_str_weak(is_root_commissioning_open),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x78060003, // 0003 JMPF R1 #0008
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x4C080000, // 0005 LDNIL R2
+ 0x1C040202, // 0006 EQ R1 R1 R2
+ 0x74060000, // 0007 JMPT R1 #0009
+ 0x50040001, // 0008 LDBOOL R1 0 1
+ 0x50040200, // 0009 LDBOOL R1 1 0
+ 0x80040200, // 000A RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_commissioning_open
+********************************************************************/
+be_local_closure(Matter_Device_is_commissioning_open, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ }),
+ be_str_weak(is_commissioning_open),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: stop_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(publish_result),
+ /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(commissioning_open),
+ /* K6 */ be_nested_str_weak(mdns_remove_PASE),
+ /* K7 */ be_nested_str_weak(commissioning_iterations),
+ /* K8 */ be_nested_str_weak(commissioning_discriminator),
+ /* K9 */ be_nested_str_weak(commissioning_salt),
+ /* K10 */ be_nested_str_weak(commissioning_w0),
+ /* K11 */ be_nested_str_weak(commissioning_L),
+ /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
+ }),
+ be_str_weak(stop_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[25]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x78060004, // 0002 JMPF R1 #0008
+ 0xB8060200, // 0003 GETNGBL R1 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0x580C0003, // 0005 LDCONST R3 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C040600, // 0007 CALL R1 3
+ 0x4C040000, // 0008 LDNIL R1
+ 0x90020A01, // 0009 SETMBR R0 K5 R1
+ 0x8C040106, // 000A GETMET R1 R0 K6
+ 0x7C040200, // 000B CALL R1 1
+ 0x4C040000, // 000C LDNIL R1
+ 0x90020E01, // 000D SETMBR R0 K7 R1
+ 0x4C040000, // 000E LDNIL R1
+ 0x90021001, // 000F SETMBR R0 K8 R1
+ 0x4C040000, // 0010 LDNIL R1
+ 0x90021201, // 0011 SETMBR R0 K9 R1
+ 0x4C040000, // 0012 LDNIL R1
+ 0x90021401, // 0013 SETMBR R0 K10 R1
+ 0x4C040000, // 0014 LDNIL R1
+ 0x90021601, // 0015 SETMBR R0 K11 R1
+ 0x4C040000, // 0016 LDNIL R1
+ 0x90021801, // 0017 SETMBR R0 K12 R1
+ 0x80000000, // 0018 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_root_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[23]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
+ /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_const_int(3),
+ /* K9 */ be_const_int(2147483647),
+ /* K10 */ be_const_int(2),
+ /* K11 */ be_nested_str_weak(compute_qrcode_content),
+ /* K12 */ be_nested_str_weak(publish_result),
+ /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
+ /* K14 */ be_nested_str_weak(Matter),
+ /* K15 */ be_nested_str_weak(_compute_pbkdf),
+ /* K16 */ be_nested_str_weak(root_passcode),
+ /* K17 */ be_nested_str_weak(root_iterations),
+ /* K18 */ be_nested_str_weak(root_salt),
+ /* K19 */ be_nested_str_weak(start_basic_commissioning),
+ /* K20 */ be_nested_str_weak(root_discriminator),
+ /* K21 */ be_nested_str_weak(root_w0),
+ /* K22 */ be_nested_str_weak(root_L),
+ }),
+ be_str_weak(start_root_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[49]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0x1C0C0203, // 0002 EQ R3 R1 R3
+ 0x780E0000, // 0003 JMPF R3 #0005
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x8C0C0102, // 0005 GETMET R3 R0 K2
+ 0x7C0C0200, // 0006 CALL R3 1
+ 0xB8120600, // 0007 GETNGBL R4 K3
+ 0x8C100904, // 0008 GETMET R4 R4 K4
+ 0x8C180505, // 0009 GETMET R6 R2 K5
+ 0x58200006, // 000A LDCONST R8 K6
+ 0x40260F08, // 000B CONNECT R9 K7 K8
+ 0x94240609, // 000C GETIDX R9 R3 R9
+ 0x542A0003, // 000D LDINT R10 4
+ 0x542E0005, // 000E LDINT R11 6
+ 0x4028140B, // 000F CONNECT R10 R10 R11
+ 0x9428060A, // 0010 GETIDX R10 R3 R10
+ 0x542E0006, // 0011 LDINT R11 7
+ 0x402C1709, // 0012 CONNECT R11 R11 K9
+ 0x942C060B, // 0013 GETIDX R11 R3 R11
+ 0x7C180A00, // 0014 CALL R6 5
+ 0x581C000A, // 0015 LDCONST R7 K10
+ 0x7C100600, // 0016 CALL R4 3
+ 0x8C10010B, // 0017 GETMET R4 R0 K11
+ 0x7C100200, // 0018 CALL R4 1
+ 0xB8160600, // 0019 GETNGBL R5 K3
+ 0x8C140B0C, // 001A GETMET R5 R5 K12
+ 0x8C1C0505, // 001B GETMET R7 R2 K5
+ 0x5824000D, // 001C LDCONST R9 K13
+ 0x5C280600, // 001D MOVE R10 R3
+ 0x5C2C0800, // 001E MOVE R11 R4
+ 0x7C1C0800, // 001F CALL R7 4
+ 0x5820000E, // 0020 LDCONST R8 K14
+ 0x7C140600, // 0021 CALL R5 3
+ 0x8C14010F, // 0022 GETMET R5 R0 K15
+ 0x881C0110, // 0023 GETMBR R7 R0 K16
+ 0x88200111, // 0024 GETMBR R8 R0 K17
+ 0x88240112, // 0025 GETMBR R9 R0 K18
+ 0x7C140800, // 0026 CALL R5 4
+ 0x8C140113, // 0027 GETMET R5 R0 K19
+ 0x5C1C0200, // 0028 MOVE R7 R1
+ 0x88200111, // 0029 GETMBR R8 R0 K17
+ 0x88240114, // 002A GETMBR R9 R0 K20
+ 0x88280112, // 002B GETMBR R10 R0 K18
+ 0x882C0115, // 002C GETMBR R11 R0 K21
+ 0x88300116, // 002D GETMBR R12 R0 K22
+ 0x4C340000, // 002E LDNIL R13
+ 0x7C141000, // 002F CALL R5 8
+ 0x80000000, // 0030 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: attribute_updated
+********************************************************************/
+be_local_closure(Matter_Device_attribute_updated, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(Path),
+ /* K2 */ be_nested_str_weak(endpoint),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(message_handler),
+ /* K6 */ be_nested_str_weak(im),
+ /* K7 */ be_nested_str_weak(subs_shop),
+ /* K8 */ be_nested_str_weak(attribute_updated_ctx),
+ }),
+ 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
+ 0xB8160000, // 0004 GETNGBL R5 K0
+ 0x8C140B01, // 0005 GETMET R5 R5 K1
+ 0x7C140200, // 0006 CALL R5 1
+ 0x90160401, // 0007 SETMBR R5 K2 R1
+ 0x90160602, // 0008 SETMBR R5 K3 R2
+ 0x90160803, // 0009 SETMBR R5 K4 R3
+ 0x88180105, // 000A GETMBR R6 R0 K5
+ 0x88180D06, // 000B GETMBR R6 R6 K6
+ 0x88180D07, // 000C GETMBR R6 R6 K7
+ 0x8C180D08, // 000D GETMET R6 R6 K8
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x5C240800, // 000F MOVE R9 R4
+ 0x7C180600, // 0010 CALL R6 3
+ 0x80000000, // 0011 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: autoconf_device
+********************************************************************/
+be_local_closure(Matter_Device_autoconf_device, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[10]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_nested_str_weak(autoconf_device_map),
+ /* K5 */ be_nested_str_weak(tasmota),
+ /* K6 */ be_nested_str_weak(log),
+ /* K7 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
+ /* K8 */ be_const_int(3),
+ /* K9 */ be_nested_str_weak(_load_plugins_config),
+ }),
+ be_str_weak(autoconf_device),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x88100102, // 0003 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x240C0703, // 0005 GT R3 R3 K3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0104, // 0008 GETMET R3 R0 K4
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0xB8120A00, // 000A GETNGBL R4 K5
+ 0x8C100906, // 000B GETMET R4 R4 K6
+ 0x60180008, // 000C GETGBL R6 G8
+ 0x5C1C0600, // 000D MOVE R7 R3
+ 0x7C180200, // 000E CALL R6 1
+ 0x001A0E06, // 000F ADD R6 K7 R6
+ 0x581C0008, // 0010 LDCONST R7 K8
+ 0x7C100600, // 0011 CALL R4 3
+ 0x8C100109, // 0012 GETMET R4 R0 K9
+ 0x5C180600, // 0013 MOVE R6 R3
+ 0x7C100400, // 0014 CALL R4 2
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_250ms
+********************************************************************/
+be_local_closure(Matter_Device_every_250ms, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(every_250ms),
+ }),
+ be_str_weak(every_250ms),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_remove_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_commissioning_complete_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_commissioning_complete),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_commissioning_complete_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Device_init, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* 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 */
+ ( &(const bvalue[41]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(UI),
+ /* K7 */ be_nested_str_weak(started),
+ /* K8 */ be_nested_str_weak(plugins),
+ /* K9 */ be_nested_str_weak(plugins_persist),
+ /* K10 */ be_nested_str_weak(plugins_classes),
+ /* K11 */ be_nested_str_weak(register_native_classes),
+ /* K12 */ be_nested_str_weak(vendorid),
+ /* K13 */ be_nested_str_weak(VENDOR_ID),
+ /* K14 */ be_nested_str_weak(productid),
+ /* K15 */ be_nested_str_weak(PRODUCT_ID),
+ /* K16 */ be_nested_str_weak(root_iterations),
+ /* K17 */ be_nested_str_weak(PBKDF_ITERATIONS),
+ /* K18 */ be_nested_str_weak(root_salt),
+ /* K19 */ be_nested_str_weak(random),
+ /* K20 */ be_nested_str_weak(ipv4only),
+ /* K21 */ be_nested_str_weak(load_param),
+ /* K22 */ be_nested_str_weak(sessions),
+ /* K23 */ be_nested_str_weak(Session_Store),
+ /* K24 */ be_nested_str_weak(load_fabrics),
+ /* K25 */ be_nested_str_weak(message_handler),
+ /* K26 */ be_nested_str_weak(MessageHandler),
+ /* K27 */ be_nested_str_weak(ui),
+ /* K28 */ be_nested_str_weak(wifi),
+ /* K29 */ be_nested_str_weak(up),
+ /* K30 */ be_nested_str_weak(eth),
+ /* K31 */ be_nested_str_weak(start),
+ /* K32 */ be_nested_str_weak(add_rule),
+ /* K33 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K34 */ be_nested_str_weak(matter_start),
+ /* K35 */ be_nested_str_weak(Eth_X23Connected),
+ /* K36 */ be_nested_str_weak(_init_basic_commissioning),
+ /* K37 */ be_nested_str_weak(add_driver),
+ /* K38 */ be_nested_str_weak(register_commands),
+ /* K39 */ be_nested_str_weak(count_active_fabrics),
+ /* K40 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[108]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xB80E0400, // 0002 GETNGBL R3 K2
+ 0x8C0C0703, // 0003 GETMET R3 R3 K3
+ 0xB8160800, // 0004 GETNGBL R5 K4
+ 0x88140B05, // 0005 GETMBR R5 R5 K5
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x740E0004, // 0007 JMPT R3 #000D
+ 0xB80E0800, // 0008 GETNGBL R3 K4
+ 0x8C0C0706, // 0009 GETMET R3 R3 K6
+ 0x5C140000, // 000A MOVE R5 R0
+ 0x7C0C0400, // 000B CALL R3 2
+ 0x80000600, // 000C RET 0
+ 0x500C0000, // 000D LDBOOL R3 0 0
+ 0x90020E03, // 000E SETMBR R0 K7 R3
+ 0x600C0012, // 000F GETGBL R3 G18
+ 0x7C0C0000, // 0010 CALL R3 0
+ 0x90021003, // 0011 SETMBR R0 K8 R3
+ 0x500C0000, // 0012 LDBOOL R3 0 0
+ 0x90021203, // 0013 SETMBR R0 K9 R3
+ 0x600C0013, // 0014 GETGBL R3 G19
+ 0x7C0C0000, // 0015 CALL R3 0
+ 0x90021403, // 0016 SETMBR R0 K10 R3
+ 0x8C0C010B, // 0017 GETMET R3 R0 K11
+ 0x7C0C0200, // 0018 CALL R3 1
+ 0x880C010D, // 0019 GETMBR R3 R0 K13
+ 0x90021803, // 001A SETMBR R0 K12 R3
+ 0x880C010F, // 001B GETMBR R3 R0 K15
+ 0x90021C03, // 001C SETMBR R0 K14 R3
+ 0x880C0111, // 001D GETMBR R3 R0 K17
+ 0x90022003, // 001E SETMBR R0 K16 R3
+ 0x8C0C0313, // 001F GETMET R3 R1 K19
+ 0x5416000F, // 0020 LDINT R5 16
+ 0x7C0C0400, // 0021 CALL R3 2
+ 0x90022403, // 0022 SETMBR R0 K18 R3
+ 0x500C0000, // 0023 LDBOOL R3 0 0
+ 0x90022803, // 0024 SETMBR R0 K20 R3
+ 0x8C0C0115, // 0025 GETMET R3 R0 K21
+ 0x7C0C0200, // 0026 CALL R3 1
+ 0xB80E0800, // 0027 GETNGBL R3 K4
+ 0x8C0C0717, // 0028 GETMET R3 R3 K23
+ 0x5C140000, // 0029 MOVE R5 R0
+ 0x7C0C0400, // 002A CALL R3 2
+ 0x90022C03, // 002B SETMBR R0 K22 R3
+ 0x880C0116, // 002C GETMBR R3 R0 K22
+ 0x8C0C0718, // 002D GETMET R3 R3 K24
+ 0x7C0C0200, // 002E CALL R3 1
+ 0xB80E0800, // 002F GETNGBL R3 K4
+ 0x8C0C071A, // 0030 GETMET R3 R3 K26
+ 0x5C140000, // 0031 MOVE R5 R0
+ 0x7C0C0400, // 0032 CALL R3 2
+ 0x90023203, // 0033 SETMBR R0 K25 R3
+ 0xB80E0800, // 0034 GETNGBL R3 K4
+ 0x8C0C0706, // 0035 GETMET R3 R3 K6
+ 0x5C140000, // 0036 MOVE R5 R0
+ 0x7C0C0400, // 0037 CALL R3 2
+ 0x90023603, // 0038 SETMBR R0 K27 R3
+ 0xB80E0400, // 0039 GETNGBL R3 K2
+ 0x8C0C071C, // 003A GETMET R3 R3 K28
+ 0x7C0C0200, // 003B CALL R3 1
+ 0x940C071D, // 003C GETIDX R3 R3 K29
+ 0x740E0004, // 003D JMPT R3 #0043
+ 0xB80E0400, // 003E GETNGBL R3 K2
+ 0x8C0C071E, // 003F GETMET R3 R3 K30
+ 0x7C0C0200, // 0040 CALL R3 1
+ 0x940C071D, // 0041 GETIDX R3 R3 K29
+ 0x780E0001, // 0042 JMPF R3 #0045
+ 0x8C0C011F, // 0043 GETMET R3 R0 K31
+ 0x7C0C0200, // 0044 CALL R3 1
+ 0xB80E0400, // 0045 GETNGBL R3 K2
+ 0x8C0C071C, // 0046 GETMET R3 R3 K28
+ 0x7C0C0200, // 0047 CALL R3 1
+ 0x940C071D, // 0048 GETIDX R3 R3 K29
+ 0x740E0005, // 0049 JMPT R3 #0050
+ 0xB80E0400, // 004A GETNGBL R3 K2
+ 0x8C0C0720, // 004B GETMET R3 R3 K32
+ 0x58140021, // 004C LDCONST R5 K33
+ 0x84180000, // 004D CLOSURE R6 P0
+ 0x581C0022, // 004E LDCONST R7 K34
+ 0x7C0C0800, // 004F CALL R3 4
+ 0xB80E0400, // 0050 GETNGBL R3 K2
+ 0x8C0C071E, // 0051 GETMET R3 R3 K30
+ 0x7C0C0200, // 0052 CALL R3 1
+ 0x940C071D, // 0053 GETIDX R3 R3 K29
+ 0x740E0005, // 0054 JMPT R3 #005B
+ 0xB80E0400, // 0055 GETNGBL R3 K2
+ 0x8C0C0720, // 0056 GETMET R3 R3 K32
+ 0x58140023, // 0057 LDCONST R5 K35
+ 0x84180001, // 0058 CLOSURE R6 P1
+ 0x581C0022, // 0059 LDCONST R7 K34
+ 0x7C0C0800, // 005A CALL R3 4
+ 0x8C0C0124, // 005B GETMET R3 R0 K36
+ 0x7C0C0200, // 005C CALL R3 1
+ 0xB80E0400, // 005D GETNGBL R3 K2
+ 0x8C0C0725, // 005E GETMET R3 R3 K37
+ 0x5C140000, // 005F MOVE R5 R0
+ 0x7C0C0400, // 0060 CALL R3 2
+ 0x8C0C0126, // 0061 GETMET R3 R0 K38
+ 0x7C0C0200, // 0062 CALL R3 1
+ 0x880C0116, // 0063 GETMBR R3 R0 K22
+ 0x8C0C0727, // 0064 GETMET R3 R3 K39
+ 0x7C0C0200, // 0065 CALL R3 1
+ 0x240C0728, // 0066 GT R3 R3 K40
+ 0x780E0001, // 0067 JMPF R3 #006A
+ 0x500C0200, // 0068 LDBOOL R3 1 0
+ 0x90021203, // 0069 SETMBR R0 K9 R3
+ 0xA0000000, // 006A CLOSE R0
+ 0x80000000, // 006B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _init_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device__init_basic_commissioning, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
+ }),
+ be_str_weak(_init_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x1C040302, // 0003 EQ R1 R1 K2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x7C040200, // 0006 CALL R1 1
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: save_before_restart
+********************************************************************/
+be_local_closure(Matter_Device_save_before_restart, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
+ }),
+ be_str_weak(save_before_restart),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x8C040101, // 0002 GETMET R1 R0 K1
+ 0x7C040200, // 0003 CALL R1 1
+ 0x80000000, // 0004 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_operational_discovery
+********************************************************************/
+be_local_closure(Matter_Device_start_operational_discovery, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(mdns),
+ /* K2 */ be_nested_str_weak(string),
+ /* K3 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K4 */ be_nested_str_weak(root_w0),
+ /* K5 */ be_nested_str_weak(root_L),
+ /* K6 */ be_nested_str_weak(set_expire_in_seconds),
+ /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K8 */ be_nested_str_weak(get_fabric),
+ }),
+ be_str_weak(start_operational_discovery),
+ &be_const_str_solidified,
+ ( &(const binstruction[17]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA4120400, // 0002 IMPORT R4 K2
+ 0x8C140103, // 0003 GETMET R5 R0 K3
+ 0x7C140200, // 0004 CALL R5 1
+ 0x4C140000, // 0005 LDNIL R5
+ 0x90020805, // 0006 SETMBR R0 K4 R5
+ 0x4C140000, // 0007 LDNIL R5
+ 0x90020A05, // 0008 SETMBR R0 K5 R5
+ 0x8C140306, // 0009 GETMET R5 R1 K6
+ 0x541E003B, // 000A LDINT R7 60
+ 0x7C140400, // 000B CALL R5 2
+ 0x8C140107, // 000C GETMET R5 R0 K7
+ 0x8C1C0308, // 000D GETMET R7 R1 K8
+ 0x7C1C0200, // 000E CALL R7 1
+ 0x7C140400, // 000F CALL R5 2
+ 0x80000000, // 0010 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_basic_commissioning, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 8, /* argc */
+ 2, /* 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Wifi_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 0x7C000600, // 0007 CALL R0 3
+ 0x80000000, // 0008 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[16]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(millis),
+ /* K3 */ be_nested_str_weak(commissioning_iterations),
+ /* K4 */ be_nested_str_weak(commissioning_discriminator),
+ /* K5 */ be_nested_str_weak(commissioning_salt),
+ /* K6 */ be_nested_str_weak(commissioning_w0),
+ /* K7 */ be_nested_str_weak(commissioning_L),
+ /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
+ /* K9 */ be_nested_str_weak(wifi),
+ /* K10 */ be_nested_str_weak(up),
+ /* K11 */ be_nested_str_weak(eth),
+ /* K12 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K13 */ be_nested_str_weak(add_rule),
+ /* K14 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K15 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ be_str_weak(start_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[40]) { /* code */
+ 0xB8220200, // 0000 GETNGBL R8 K1
+ 0x8C201102, // 0001 GETMET R8 R8 K2
+ 0x7C200200, // 0002 CALL R8 1
+ 0x542603E7, // 0003 LDINT R9 1000
+ 0x08240209, // 0004 MUL R9 R1 R9
+ 0x00201009, // 0005 ADD R8 R8 R9
+ 0x90020008, // 0006 SETMBR R0 K0 R8
+ 0x90020602, // 0007 SETMBR R0 K3 R2
+ 0x90020803, // 0008 SETMBR R0 K4 R3
+ 0x90020A04, // 0009 SETMBR R0 K5 R4
+ 0x90020C05, // 000A SETMBR R0 K6 R5
+ 0x90020E06, // 000B SETMBR R0 K7 R6
+ 0x90021007, // 000C SETMBR R0 K8 R7
+ 0xB8220200, // 000D GETNGBL R8 K1
+ 0x8C201109, // 000E GETMET R8 R8 K9
+ 0x7C200200, // 000F CALL R8 1
+ 0x9420110A, // 0010 GETIDX R8 R8 K10
+ 0x74220004, // 0011 JMPT R8 #0017
+ 0xB8220200, // 0012 GETNGBL R8 K1
+ 0x8C20110B, // 0013 GETMET R8 R8 K11
+ 0x7C200200, // 0014 CALL R8 1
+ 0x9420110A, // 0015 GETIDX R8 R8 K10
+ 0x78220002, // 0016 JMPF R8 #001A
+ 0x8C20010C, // 0017 GETMET R8 R0 K12
+ 0x7C200200, // 0018 CALL R8 1
+ 0x7002000B, // 0019 JMP #0026
+ 0xB8220200, // 001A GETNGBL R8 K1
+ 0x8C20110D, // 001B GETMET R8 R8 K13
+ 0x5828000E, // 001C LDCONST R10 K14
+ 0x842C0000, // 001D CLOSURE R11 P0
+ 0x5830000C, // 001E LDCONST R12 K12
+ 0x7C200800, // 001F CALL R8 4
+ 0xB8220200, // 0020 GETNGBL R8 K1
+ 0x8C20110D, // 0021 GETMET R8 R8 K13
+ 0x5828000F, // 0022 LDCONST R10 K15
+ 0x842C0001, // 0023 CLOSURE R11 P1
+ 0x5830000C, // 0024 LDCONST R12 K12
+ 0x7C200800, // 0025 CALL R8 4
+ 0xA0000000, // 0026 CLOSE R0
+ 0x80000000, // 0027 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_received
+********************************************************************/
+be_local_closure(Matter_Device_msg_received, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(msg_received),
+ }),
+ be_str_weak(msg_received),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 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: _start_udp
+********************************************************************/
+be_local_closure(Matter_Device__start_udp, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* 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 */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(log),
+ /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
+ /* K4 */ be_const_int(2),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(UDPServer),
+ /* K7 */ be_nested_str_weak(),
+ /* K8 */ be_nested_str_weak(start),
+ }),
+ 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
+ 0xB80A0200, // 0007 GETNGBL R2 K1
+ 0x8C080502, // 0008 GETMET R2 R2 K2
+ 0x60100008, // 0009 GETGBL R4 G8
+ 0x5C140200, // 000A MOVE R5 R1
+ 0x7C100200, // 000B CALL R4 1
+ 0x00120604, // 000C ADD R4 K3 R4
+ 0x58140004, // 000D LDCONST R5 K4
+ 0x7C080600, // 000E CALL R2 3
+ 0xB80A0A00, // 000F GETNGBL R2 K5
+ 0x8C080506, // 0010 GETMET R2 R2 K6
+ 0x58100007, // 0011 LDCONST R4 K7
+ 0x5C140200, // 0012 MOVE R5 R1
+ 0x7C080600, // 0013 CALL R2 3
+ 0x90020002, // 0014 SETMBR R0 K0 R2
+ 0x88080100, // 0015 GETMBR R2 R0 K0
+ 0x8C080508, // 0016 GETMET R2 R2 K8
+ 0x84100000, // 0017 CLOSURE R4 P0
+ 0x7C080400, // 0018 CALL R2 2
+ 0xA0000000, // 0019 CLOSE R0
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_op_discovery
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[24]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(copy),
+ /* K4 */ be_nested_str_weak(reverse),
+ /* K5 */ be_nested_str_weak(get_fabric_compressed),
+ /* K6 */ be_nested_str_weak(tohex),
+ /* K7 */ be_nested_str_weak(_X2D),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(eth),
+ /* K10 */ be_nested_str_weak(find),
+ /* K11 */ be_nested_str_weak(up),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K15 */ be_const_int(2),
+ /* K16 */ be_nested_str_weak(remove_service),
+ /* K17 */ be_nested_str_weak(_matter),
+ /* K18 */ be_nested_str_weak(_tcp),
+ /* K19 */ be_nested_str_weak(hostname_eth),
+ /* K20 */ be_nested_str_weak(wifi),
+ /* K21 */ be_nested_str_weak(hostname_wifi),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K23 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(mdns_remove_op_discovery),
+ &be_const_str_solidified,
+ ( &(const binstruction[81]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA802003B, // 0002 EXBLK 0 #003F
+ 0x8C100302, // 0003 GETMET R4 R1 K2
+ 0x7C100200, // 0004 CALL R4 1
+ 0x8C100903, // 0005 GETMET R4 R4 K3
+ 0x7C100200, // 0006 CALL R4 1
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140305, // 0009 GETMET R5 R1 K5
+ 0x7C140200, // 000A CALL R5 1
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x7C180200, // 000C CALL R6 1
+ 0x00180D07, // 000D ADD R6 R6 K7
+ 0x8C1C0906, // 000E GETMET R7 R4 K6
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x00180C07, // 0010 ADD R6 R6 R7
+ 0xB81E1000, // 0011 GETNGBL R7 K8
+ 0x8C1C0F09, // 0012 GETMET R7 R7 K9
+ 0x7C1C0200, // 0013 CALL R7 1
+ 0x8C1C0F0A, // 0014 GETMET R7 R7 K10
+ 0x5824000B, // 0015 LDCONST R9 K11
+ 0x7C1C0400, // 0016 CALL R7 2
+ 0x781E000E, // 0017 JMPF R7 #0027
+ 0xB81E1000, // 0018 GETNGBL R7 K8
+ 0x8C1C0F0C, // 0019 GETMET R7 R7 K12
+ 0x8C24070D, // 001A GETMET R9 R3 K13
+ 0x582C000E, // 001B LDCONST R11 K14
+ 0x58300009, // 001C LDCONST R12 K9
+ 0x5C340C00, // 001D MOVE R13 R6
+ 0x7C240800, // 001E CALL R9 4
+ 0x5828000F, // 001F LDCONST R10 K15
+ 0x7C1C0600, // 0020 CALL R7 3
+ 0x8C1C0510, // 0021 GETMET R7 R2 K16
+ 0x58240011, // 0022 LDCONST R9 K17
+ 0x58280012, // 0023 LDCONST R10 K18
+ 0x5C2C0C00, // 0024 MOVE R11 R6
+ 0x88300113, // 0025 GETMBR R12 R0 K19
+ 0x7C1C0A00, // 0026 CALL R7 5
+ 0xB81E1000, // 0027 GETNGBL R7 K8
+ 0x8C1C0F14, // 0028 GETMET R7 R7 K20
+ 0x7C1C0200, // 0029 CALL R7 1
+ 0x8C1C0F0A, // 002A GETMET R7 R7 K10
+ 0x5824000B, // 002B LDCONST R9 K11
+ 0x7C1C0400, // 002C CALL R7 2
+ 0x781E000E, // 002D JMPF R7 #003D
+ 0xB81E1000, // 002E GETNGBL R7 K8
+ 0x8C1C0F0C, // 002F GETMET R7 R7 K12
+ 0x8C24070D, // 0030 GETMET R9 R3 K13
+ 0x582C000E, // 0031 LDCONST R11 K14
+ 0x58300014, // 0032 LDCONST R12 K20
+ 0x5C340C00, // 0033 MOVE R13 R6
+ 0x7C240800, // 0034 CALL R9 4
+ 0x5828000F, // 0035 LDCONST R10 K15
+ 0x7C1C0600, // 0036 CALL R7 3
+ 0x8C1C0510, // 0037 GETMET R7 R2 K16
+ 0x58240011, // 0038 LDCONST R9 K17
+ 0x58280012, // 0039 LDCONST R10 K18
+ 0x5C2C0C00, // 003A MOVE R11 R6
+ 0x88300115, // 003B GETMBR R12 R0 K21
+ 0x7C1C0A00, // 003C CALL R7 5
+ 0xA8040001, // 003D EXBLK 1 1
+ 0x70020010, // 003E JMP #0050
+ 0xAC100002, // 003F CATCH R4 0 2
+ 0x7002000D, // 0040 JMP #004F
+ 0xB81A1000, // 0041 GETNGBL R6 K8
+ 0x8C180D0C, // 0042 GETMET R6 R6 K12
+ 0x60200008, // 0043 GETGBL R8 G8
+ 0x5C240800, // 0044 MOVE R9 R4
+ 0x7C200200, // 0045 CALL R8 1
+ 0x00222C08, // 0046 ADD R8 K22 R8
+ 0x00201117, // 0047 ADD R8 R8 K23
+ 0x60240008, // 0048 GETGBL R9 G8
+ 0x5C280A00, // 0049 MOVE R10 R5
+ 0x7C240200, // 004A CALL R9 1
+ 0x00201009, // 004B ADD R8 R8 R9
+ 0x5824000F, // 004C LDCONST R9 K15
+ 0x7C180600, // 004D CALL R6 3
+ 0x70020000, // 004E JMP #0050
+ 0xB0080000, // 004F RAISE 2 R0 R0
+ 0x80000000, // 0050 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: load_param
+********************************************************************/
+be_local_closure(Matter_Device_load_param, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[27]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(crypto),
+ /* K2 */ be_nested_str_weak(FILENAME),
+ /* K3 */ be_nested_str_weak(read),
+ /* K4 */ be_nested_str_weak(close),
+ /* K5 */ be_nested_str_weak(json),
+ /* K6 */ be_nested_str_weak(load),
+ /* K7 */ be_nested_str_weak(root_discriminator),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(distinguish),
+ /* K10 */ be_nested_str_weak(root_passcode),
+ /* K11 */ be_nested_str_weak(passcode),
+ /* K12 */ be_nested_str_weak(ipv4only),
+ /* K13 */ be_nested_str_weak(config),
+ /* K14 */ be_nested_str_weak(_load_plugins_config),
+ /* K15 */ be_nested_str_weak(plugins_persist),
+ /* K16 */ be_nested_str_weak(io_error),
+ /* K17 */ be_nested_str_weak(tasmota),
+ /* K18 */ be_nested_str_weak(log),
+ /* K19 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
+ /* K20 */ be_nested_str_weak(_X7C),
+ /* K21 */ be_const_int(2),
+ /* K22 */ be_nested_str_weak(random),
+ /* K23 */ be_nested_str_weak(get),
+ /* K24 */ be_const_int(0),
+ /* K25 */ be_nested_str_weak(PASSCODE_DEFAULT),
+ /* K26 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(load_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[88]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA8020026, // 0002 EXBLK 0 #002A
+ 0x600C0011, // 0003 GETGBL R3 G17
+ 0x88100102, // 0004 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x8C100703, // 0006 GETMET R4 R3 K3
+ 0x7C100200, // 0007 CALL R4 1
+ 0x8C140704, // 0008 GETMET R5 R3 K4
+ 0x7C140200, // 0009 CALL R5 1
+ 0xA4160A00, // 000A IMPORT R5 K5
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x5C200800, // 000C MOVE R8 R4
+ 0x7C180400, // 000D CALL R6 2
+ 0x8C1C0D08, // 000E GETMET R7 R6 K8
+ 0x58240009, // 000F LDCONST R9 K9
+ 0x88280107, // 0010 GETMBR R10 R0 K7
+ 0x7C1C0600, // 0011 CALL R7 3
+ 0x90020E07, // 0012 SETMBR R0 K7 R7
+ 0x8C1C0D08, // 0013 GETMET R7 R6 K8
+ 0x5824000B, // 0014 LDCONST R9 K11
+ 0x8828010A, // 0015 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0016 CALL R7 3
+ 0x90021407, // 0017 SETMBR R0 K10 R7
+ 0x601C0017, // 0018 GETGBL R7 G23
+ 0x8C200D08, // 0019 GETMET R8 R6 K8
+ 0x5828000C, // 001A LDCONST R10 K12
+ 0x502C0000, // 001B LDBOOL R11 0 0
+ 0x7C200600, // 001C CALL R8 3
+ 0x7C1C0200, // 001D CALL R7 1
+ 0x90021807, // 001E SETMBR R0 K12 R7
+ 0x8C1C0D08, // 001F GETMET R7 R6 K8
+ 0x5824000D, // 0020 LDCONST R9 K13
+ 0x7C1C0400, // 0021 CALL R7 2
+ 0x781E0004, // 0022 JMPF R7 #0028
+ 0x8C20010E, // 0023 GETMET R8 R0 K14
+ 0x5C280E00, // 0024 MOVE R10 R7
+ 0x7C200400, // 0025 CALL R8 2
+ 0x50200200, // 0026 LDBOOL R8 1 0
+ 0x90021E08, // 0027 SETMBR R0 K15 R8
+ 0xA8040001, // 0028 EXBLK 1 1
+ 0x70020012, // 0029 JMP #003D
+ 0xAC0C0002, // 002A CATCH R3 0 2
+ 0x7002000F, // 002B JMP #003C
+ 0x20140710, // 002C NE R5 R3 K16
+ 0x7816000C, // 002D JMPF R5 #003B
+ 0xB8162200, // 002E GETNGBL R5 K17
+ 0x8C140B12, // 002F GETMET R5 R5 K18
+ 0x601C0008, // 0030 GETGBL R7 G8
+ 0x5C200600, // 0031 MOVE R8 R3
+ 0x7C1C0200, // 0032 CALL R7 1
+ 0x001E2607, // 0033 ADD R7 K19 R7
+ 0x001C0F14, // 0034 ADD R7 R7 K20
+ 0x60200008, // 0035 GETGBL R8 G8
+ 0x5C240800, // 0036 MOVE R9 R4
+ 0x7C200200, // 0037 CALL R8 1
+ 0x001C0E08, // 0038 ADD R7 R7 R8
+ 0x58200015, // 0039 LDCONST R8 K21
+ 0x7C140600, // 003A CALL R5 3
+ 0x70020000, // 003B JMP #003D
+ 0xB0080000, // 003C RAISE 2 R0 R0
+ 0x500C0000, // 003D LDBOOL R3 0 0
+ 0x88100107, // 003E GETMBR R4 R0 K7
+ 0x4C140000, // 003F LDNIL R5
+ 0x1C100805, // 0040 EQ R4 R4 R5
+ 0x7812000A, // 0041 JMPF R4 #004D
+ 0x8C100516, // 0042 GETMET R4 R2 K22
+ 0x58180015, // 0043 LDCONST R6 K21
+ 0x7C100400, // 0044 CALL R4 2
+ 0x8C100917, // 0045 GETMET R4 R4 K23
+ 0x58180018, // 0046 LDCONST R6 K24
+ 0x581C0015, // 0047 LDCONST R7 K21
+ 0x7C100600, // 0048 CALL R4 3
+ 0x54160FFE, // 0049 LDINT R5 4095
+ 0x2C100805, // 004A AND R4 R4 R5
+ 0x90020E04, // 004B SETMBR R0 K7 R4
+ 0x500C0200, // 004C LDBOOL R3 1 0
+ 0x8810010A, // 004D GETMBR R4 R0 K10
+ 0x4C140000, // 004E LDNIL R5
+ 0x1C100805, // 004F EQ R4 R4 R5
+ 0x78120002, // 0050 JMPF R4 #0054
+ 0x88100119, // 0051 GETMBR R4 R0 K25
+ 0x90021404, // 0052 SETMBR R0 K10 R4
+ 0x500C0200, // 0053 LDBOOL R3 1 0
+ 0x780E0001, // 0054 JMPF R3 #0057
+ 0x8C10011A, // 0055 GETMET R4 R0 K26
+ 0x7C100200, // 0056 CALL R4 1
+ 0x80000000, // 0057 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _load_plugins_config
+********************************************************************/
+be_local_closure(Matter_Device__load_plugins_config, /* name */
+ be_nested_proto(
+ 19, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[27]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(k2l_num),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(log),
+ /* K4 */ be_nested_str_weak(MTR_X3A_X20endpoints_X20to_X20be_X20configured_X20),
+ /* K5 */ be_const_int(3),
+ /* K6 */ be_nested_str_weak(format),
+ /* K7 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25i_X20config_X20_X25s),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(type),
+ /* K10 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping),
+ /* K11 */ be_nested_str_weak(plugins_classes),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27),
+ /* K13 */ be_nested_str_weak(_X27_X20skipping),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(plugins),
+ /* K16 */ be_nested_str_weak(push),
+ /* K17 */ be_nested_str_weak(),
+ /* K18 */ be_nested_str_weak(k2l),
+ /* K19 */ be_nested_str_weak(_X20_X25s_X3A_X25s),
+ /* K20 */ be_nested_str_weak(stop_iteration),
+ /* K21 */ be_nested_str_weak(MTR_X3A_X20endpoint_X3A_X25i_X20type_X3A_X25s_X25s),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K23 */ be_nested_str_weak(_X7C),
+ /* K24 */ be_nested_str_weak(publish_result),
+ /* K25 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D),
+ /* K26 */ be_nested_str_weak(Matter),
+ }),
+ be_str_weak(_load_plugins_config),
+ &be_const_str_solidified,
+ ( &(const binstruction[133]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0101, // 0001 GETMET R3 R0 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0xB8120400, // 0004 GETNGBL R4 K2
+ 0x8C100903, // 0005 GETMET R4 R4 K3
+ 0x60180008, // 0006 GETGBL R6 G8
+ 0x5C1C0600, // 0007 MOVE R7 R3
+ 0x7C180200, // 0008 CALL R6 1
+ 0x001A0806, // 0009 ADD R6 K4 R6
+ 0x581C0005, // 000A LDCONST R7 K5
+ 0x7C100600, // 000B CALL R4 3
+ 0x60100010, // 000C GETGBL R4 G16
+ 0x5C140600, // 000D MOVE R5 R3
+ 0x7C100200, // 000E CALL R4 1
+ 0xA802006B, // 000F EXBLK 0 #007C
+ 0x5C140800, // 0010 MOVE R5 R4
+ 0x7C140000, // 0011 CALL R5 0
+ 0xA8020056, // 0012 EXBLK 0 #006A
+ 0x60180008, // 0013 GETGBL R6 G8
+ 0x5C1C0A00, // 0014 MOVE R7 R5
+ 0x7C180200, // 0015 CALL R6 1
+ 0x94180206, // 0016 GETIDX R6 R1 R6
+ 0xB81E0400, // 0017 GETNGBL R7 K2
+ 0x8C1C0F03, // 0018 GETMET R7 R7 K3
+ 0x8C240506, // 0019 GETMET R9 R2 K6
+ 0x582C0007, // 001A LDCONST R11 K7
+ 0x5C300A00, // 001B MOVE R12 R5
+ 0x5C340C00, // 001C MOVE R13 R6
+ 0x7C240800, // 001D CALL R9 4
+ 0x58280005, // 001E LDCONST R10 K5
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x8C1C0D08, // 0020 GETMET R7 R6 K8
+ 0x58240009, // 0021 LDCONST R9 K9
+ 0x7C1C0400, // 0022 CALL R7 2
+ 0x4C200000, // 0023 LDNIL R8
+ 0x1C200E08, // 0024 EQ R8 R7 R8
+ 0x78220006, // 0025 JMPF R8 #002D
+ 0xB8220400, // 0026 GETNGBL R8 K2
+ 0x8C201103, // 0027 GETMET R8 R8 K3
+ 0x5828000A, // 0028 LDCONST R10 K10
+ 0x582C0005, // 0029 LDCONST R11 K5
+ 0x7C200600, // 002A CALL R8 3
+ 0xA8040001, // 002B EXBLK 1 1
+ 0x7001FFE2, // 002C JMP #0010
+ 0x8820010B, // 002D GETMBR R8 R0 K11
+ 0x8C201108, // 002E GETMET R8 R8 K8
+ 0x5C280E00, // 002F MOVE R10 R7
+ 0x7C200400, // 0030 CALL R8 2
+ 0x4C240000, // 0031 LDNIL R9
+ 0x1C241009, // 0032 EQ R9 R8 R9
+ 0x7826000A, // 0033 JMPF R9 #003F
+ 0xB8260400, // 0034 GETNGBL R9 K2
+ 0x8C241303, // 0035 GETMET R9 R9 K3
+ 0x602C0008, // 0036 GETGBL R11 G8
+ 0x5C300E00, // 0037 MOVE R12 R7
+ 0x7C2C0200, // 0038 CALL R11 1
+ 0x002E180B, // 0039 ADD R11 K12 R11
+ 0x002C170D, // 003A ADD R11 R11 K13
+ 0x5830000E, // 003B LDCONST R12 K14
+ 0x7C240600, // 003C CALL R9 3
+ 0xA8040001, // 003D EXBLK 1 1
+ 0x7001FFD0, // 003E JMP #0010
+ 0x5C241000, // 003F MOVE R9 R8
+ 0x5C280000, // 0040 MOVE R10 R0
+ 0x5C2C0A00, // 0041 MOVE R11 R5
+ 0x5C300C00, // 0042 MOVE R12 R6
+ 0x7C240600, // 0043 CALL R9 3
+ 0x8828010F, // 0044 GETMBR R10 R0 K15
+ 0x8C281510, // 0045 GETMET R10 R10 K16
+ 0x5C301200, // 0046 MOVE R12 R9
+ 0x7C280400, // 0047 CALL R10 2
+ 0x58280011, // 0048 LDCONST R10 K17
+ 0x602C0010, // 0049 GETGBL R11 G16
+ 0x8C300112, // 004A GETMET R12 R0 K18
+ 0x5C380C00, // 004B MOVE R14 R6
+ 0x7C300400, // 004C CALL R12 2
+ 0x7C2C0200, // 004D CALL R11 1
+ 0xA802000B, // 004E EXBLK 0 #005B
+ 0x5C301600, // 004F MOVE R12 R11
+ 0x7C300000, // 0050 CALL R12 0
+ 0x1C341909, // 0051 EQ R13 R12 K9
+ 0x78360000, // 0052 JMPF R13 #0054
+ 0x7001FFFA, // 0053 JMP #004F
+ 0x8C340506, // 0054 GETMET R13 R2 K6
+ 0x583C0013, // 0055 LDCONST R15 K19
+ 0x5C401800, // 0056 MOVE R16 R12
+ 0x94440C0C, // 0057 GETIDX R17 R6 R12
+ 0x7C340800, // 0058 CALL R13 4
+ 0x0028140D, // 0059 ADD R10 R10 R13
+ 0x7001FFF3, // 005A JMP #004F
+ 0x582C0014, // 005B LDCONST R11 K20
+ 0xAC2C0200, // 005C CATCH R11 1 0
+ 0xB0080000, // 005D RAISE 2 R0 R0
+ 0xB82E0400, // 005E GETNGBL R11 K2
+ 0x8C2C1703, // 005F GETMET R11 R11 K3
+ 0x8C340506, // 0060 GETMET R13 R2 K6
+ 0x583C0015, // 0061 LDCONST R15 K21
+ 0x5C400A00, // 0062 MOVE R16 R5
+ 0x5C440E00, // 0063 MOVE R17 R7
+ 0x5C481400, // 0064 MOVE R18 R10
+ 0x7C340A00, // 0065 CALL R13 5
+ 0x5838000E, // 0066 LDCONST R14 K14
+ 0x7C2C0600, // 0067 CALL R11 3
+ 0xA8040001, // 0068 EXBLK 1 1
+ 0x70020010, // 0069 JMP #007B
+ 0xAC180002, // 006A CATCH R6 0 2
+ 0x7002000D, // 006B JMP #007A
+ 0xB8220400, // 006C GETNGBL R8 K2
+ 0x8C201103, // 006D GETMET R8 R8 K3
+ 0x60280008, // 006E GETGBL R10 G8
+ 0x5C2C0C00, // 006F MOVE R11 R6
+ 0x7C280200, // 0070 CALL R10 1
+ 0x002A2C0A, // 0071 ADD R10 K22 R10
+ 0x00281517, // 0072 ADD R10 R10 K23
+ 0x602C0008, // 0073 GETGBL R11 G8
+ 0x5C300E00, // 0074 MOVE R12 R7
+ 0x7C2C0200, // 0075 CALL R11 1
+ 0x0028140B, // 0076 ADD R10 R10 R11
+ 0x582C000E, // 0077 LDCONST R11 K14
+ 0x7C200600, // 0078 CALL R8 3
+ 0x70020000, // 0079 JMP #007B
+ 0xB0080000, // 007A RAISE 2 R0 R0
+ 0x7001FF93, // 007B JMP #0010
+ 0x58100014, // 007C LDCONST R4 K20
+ 0xAC100200, // 007D CATCH R4 1 0
+ 0xB0080000, // 007E RAISE 2 R0 R0
+ 0xB8120400, // 007F GETNGBL R4 K2
+ 0x8C100918, // 0080 GETMET R4 R4 K24
+ 0x58180019, // 0081 LDCONST R6 K25
+ 0x581C001A, // 0082 LDCONST R7 K26
+ 0x7C100600, // 0083 CALL R4 3
+ 0x80000000, // 0084 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: autoconf_device_map
+********************************************************************/
+be_local_closure(Matter_Device_autoconf_device_map, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[36]) { /* constants */
+ /* K0 */ be_nested_str_weak(json),
+ /* K1 */ be_nested_str_weak(0),
+ /* K2 */ be_nested_str_weak(type),
+ /* K3 */ be_nested_str_weak(root),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(light),
+ /* K6 */ be_nested_str_weak(get),
+ /* K7 */ be_nested_str_weak(find),
+ /* K8 */ be_nested_str_weak(channels),
+ /* K9 */ be_nested_str_weak(),
+ /* K10 */ be_const_int(0),
+ /* K11 */ be_nested_str_weak(light1),
+ /* K12 */ be_const_int(2),
+ /* K13 */ be_nested_str_weak(light2),
+ /* K14 */ be_nested_str_weak(light3),
+ /* K15 */ be_nested_str_weak(tasmota),
+ /* K16 */ be_nested_str_weak(get_power),
+ /* K17 */ be_nested_str_weak(relay),
+ /* K18 */ be_nested_str_weak(load),
+ /* K19 */ be_nested_str_weak(read_sensors),
+ /* K20 */ be_nested_str_weak(k2l),
+ /* K21 */ be_nested_str_weak(contains),
+ /* K22 */ be_nested_str_weak(Temperature),
+ /* K23 */ be_nested_str_weak(_X23Temperature),
+ /* K24 */ be_nested_str_weak(temperature),
+ /* K25 */ be_nested_str_weak(filter),
+ /* K26 */ be_nested_str_weak(stop_iteration),
+ /* K27 */ be_nested_str_weak(Pressure),
+ /* K28 */ be_nested_str_weak(_X23Pressure),
+ /* K29 */ be_nested_str_weak(pressure),
+ /* K30 */ be_nested_str_weak(Illuminance),
+ /* K31 */ be_nested_str_weak(_X23Illuminance),
+ /* K32 */ be_nested_str_weak(illuminance),
+ /* K33 */ be_nested_str_weak(Humidity),
+ /* K34 */ be_nested_str_weak(_X23Humidity),
+ /* K35 */ be_nested_str_weak(humidity),
+ }),
+ be_str_weak(autoconf_device_map),
+ &be_const_str_solidified,
+ ( &(const binstruction[235]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x60080013, // 0001 GETGBL R2 G19
+ 0x7C080000, // 0002 CALL R2 0
+ 0x600C0013, // 0003 GETGBL R3 G19
+ 0x7C0C0000, // 0004 CALL R3 0
+ 0x980E0503, // 0005 SETIDX R3 K2 K3
+ 0x980A0203, // 0006 SETIDX R2 K1 R3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x50100000, // 0008 LDBOOL R4 0 0
+ 0xA4160A00, // 0009 IMPORT R5 K5
+ 0x8C180B06, // 000A GETMET R6 R5 K6
+ 0x7C180200, // 000B CALL R6 1
+ 0x4C1C0000, // 000C LDNIL R7
+ 0x201C0C07, // 000D NE R7 R6 R7
+ 0x781E0024, // 000E JMPF R7 #0034
+ 0x601C000C, // 000F GETGBL R7 G12
+ 0x8C200D07, // 0010 GETMET R8 R6 K7
+ 0x58280008, // 0011 LDCONST R10 K8
+ 0x582C0009, // 0012 LDCONST R11 K9
+ 0x7C200600, // 0013 CALL R8 3
+ 0x7C1C0200, // 0014 CALL R7 1
+ 0x24200F0A, // 0015 GT R8 R7 K10
+ 0x7822001C, // 0016 JMPF R8 #0034
+ 0x1C200F04, // 0017 EQ R8 R7 K4
+ 0x78220007, // 0018 JMPF R8 #0021
+ 0x60200008, // 0019 GETGBL R8 G8
+ 0x5C240600, // 001A MOVE R9 R3
+ 0x7C200200, // 001B CALL R8 1
+ 0x60240013, // 001C GETGBL R9 G19
+ 0x7C240000, // 001D CALL R9 0
+ 0x9826050B, // 001E SETIDX R9 K2 K11
+ 0x98081009, // 001F SETIDX R2 R8 R9
+ 0x70020010, // 0020 JMP #0032
+ 0x1C200F0C, // 0021 EQ R8 R7 K12
+ 0x78220007, // 0022 JMPF R8 #002B
+ 0x60200008, // 0023 GETGBL R8 G8
+ 0x5C240600, // 0024 MOVE R9 R3
+ 0x7C200200, // 0025 CALL R8 1
+ 0x60240013, // 0026 GETGBL R9 G19
+ 0x7C240000, // 0027 CALL R9 0
+ 0x9826050D, // 0028 SETIDX R9 K2 K13
+ 0x98081009, // 0029 SETIDX R2 R8 R9
+ 0x70020006, // 002A JMP #0032
+ 0x60200008, // 002B GETGBL R8 G8
+ 0x5C240600, // 002C MOVE R9 R3
+ 0x7C200200, // 002D CALL R8 1
+ 0x60240013, // 002E GETGBL R9 G19
+ 0x7C240000, // 002F CALL R9 0
+ 0x9826050E, // 0030 SETIDX R9 K2 K14
+ 0x98081009, // 0031 SETIDX R2 R8 R9
+ 0x50100200, // 0032 LDBOOL R4 1 0
+ 0x000C0704, // 0033 ADD R3 R3 K4
+ 0x601C000C, // 0034 GETGBL R7 G12
+ 0xB8221E00, // 0035 GETNGBL R8 K15
+ 0x8C201110, // 0036 GETMET R8 R8 K16
+ 0x7C200200, // 0037 CALL R8 1
+ 0x7C1C0200, // 0038 CALL R7 1
+ 0x5820000A, // 0039 LDCONST R8 K10
+ 0x78120000, // 003A JMPF R4 #003C
+ 0x041C0F04, // 003B SUB R7 R7 K4
+ 0x14241007, // 003C LT R9 R8 R7
+ 0x7826000A, // 003D JMPF R9 #0049
+ 0x60240008, // 003E GETGBL R9 G8
+ 0x5C280600, // 003F MOVE R10 R3
+ 0x7C240200, // 0040 CALL R9 1
+ 0x60280013, // 0041 GETGBL R10 G19
+ 0x7C280000, // 0042 CALL R10 0
+ 0x982A0511, // 0043 SETIDX R10 K2 K17
+ 0x982A2208, // 0044 SETIDX R10 K17 R8
+ 0x9808120A, // 0045 SETIDX R2 R9 R10
+ 0x00201104, // 0046 ADD R8 R8 K4
+ 0x000C0704, // 0047 ADD R3 R3 K4
+ 0x7001FFF2, // 0048 JMP #003C
+ 0x8C240312, // 0049 GETMET R9 R1 K18
+ 0xB82E1E00, // 004A GETNGBL R11 K15
+ 0x8C2C1713, // 004B GETMET R11 R11 K19
+ 0x7C2C0200, // 004C CALL R11 1
+ 0x7C240400, // 004D CALL R9 2
+ 0x540E001F, // 004E LDINT R3 32
+ 0x60280010, // 004F GETGBL R10 G16
+ 0x8C2C0114, // 0050 GETMET R11 R0 K20
+ 0x5C341200, // 0051 MOVE R13 R9
+ 0x7C2C0400, // 0052 CALL R11 2
+ 0x7C280200, // 0053 CALL R10 1
+ 0xA802001C, // 0054 EXBLK 0 #0072
+ 0x5C2C1400, // 0055 MOVE R11 R10
+ 0x7C2C0000, // 0056 CALL R11 0
+ 0x9430120B, // 0057 GETIDX R12 R9 R11
+ 0x6034000F, // 0058 GETGBL R13 G15
+ 0x5C381800, // 0059 MOVE R14 R12
+ 0x603C0013, // 005A GETGBL R15 G19
+ 0x7C340400, // 005B CALL R13 2
+ 0x7836000D, // 005C JMPF R13 #006B
+ 0x8C341915, // 005D GETMET R13 R12 K21
+ 0x583C0016, // 005E LDCONST R15 K22
+ 0x7C340400, // 005F CALL R13 2
+ 0x78360009, // 0060 JMPF R13 #006B
+ 0x00341717, // 0061 ADD R13 R11 K23
+ 0x60380008, // 0062 GETGBL R14 G8
+ 0x5C3C0600, // 0063 MOVE R15 R3
+ 0x7C380200, // 0064 CALL R14 1
+ 0x603C0013, // 0065 GETGBL R15 G19
+ 0x7C3C0000, // 0066 CALL R15 0
+ 0x983E0518, // 0067 SETIDX R15 K2 K24
+ 0x983E320D, // 0068 SETIDX R15 K25 R13
+ 0x98081C0F, // 0069 SETIDX R2 R14 R15
+ 0x000C0704, // 006A ADD R3 R3 K4
+ 0x54360027, // 006B LDINT R13 40
+ 0x2434060D, // 006C GT R13 R3 R13
+ 0x78360000, // 006D JMPF R13 #006F
+ 0x70020000, // 006E JMP #0070
+ 0x7001FFE4, // 006F JMP #0055
+ 0xA8040001, // 0070 EXBLK 1 1
+ 0x70020002, // 0071 JMP #0075
+ 0x5828001A, // 0072 LDCONST R10 K26
+ 0xAC280200, // 0073 CATCH R10 1 0
+ 0xB0080000, // 0074 RAISE 2 R0 R0
+ 0x540E0027, // 0075 LDINT R3 40
+ 0x60280010, // 0076 GETGBL R10 G16
+ 0x8C2C0114, // 0077 GETMET R11 R0 K20
+ 0x5C341200, // 0078 MOVE R13 R9
+ 0x7C2C0400, // 0079 CALL R11 2
+ 0x7C280200, // 007A CALL R10 1
+ 0xA802001C, // 007B EXBLK 0 #0099
+ 0x5C2C1400, // 007C MOVE R11 R10
+ 0x7C2C0000, // 007D CALL R11 0
+ 0x9430120B, // 007E GETIDX R12 R9 R11
+ 0x6034000F, // 007F GETGBL R13 G15
+ 0x5C381800, // 0080 MOVE R14 R12
+ 0x603C0013, // 0081 GETGBL R15 G19
+ 0x7C340400, // 0082 CALL R13 2
+ 0x7836000D, // 0083 JMPF R13 #0092
+ 0x8C341915, // 0084 GETMET R13 R12 K21
+ 0x583C001B, // 0085 LDCONST R15 K27
+ 0x7C340400, // 0086 CALL R13 2
+ 0x78360009, // 0087 JMPF R13 #0092
+ 0x0034171C, // 0088 ADD R13 R11 K28
+ 0x60380008, // 0089 GETGBL R14 G8
+ 0x5C3C0600, // 008A MOVE R15 R3
+ 0x7C380200, // 008B CALL R14 1
+ 0x603C0013, // 008C GETGBL R15 G19
+ 0x7C3C0000, // 008D CALL R15 0
+ 0x983E051D, // 008E SETIDX R15 K2 K29
+ 0x983E320D, // 008F SETIDX R15 K25 R13
+ 0x98081C0F, // 0090 SETIDX R2 R14 R15
+ 0x000C0704, // 0091 ADD R3 R3 K4
+ 0x5436002E, // 0092 LDINT R13 47
+ 0x2434060D, // 0093 GT R13 R3 R13
+ 0x78360000, // 0094 JMPF R13 #0096
+ 0x70020000, // 0095 JMP #0097
+ 0x7001FFE4, // 0096 JMP #007C
+ 0xA8040001, // 0097 EXBLK 1 1
+ 0x70020002, // 0098 JMP #009C
+ 0x5828001A, // 0099 LDCONST R10 K26
+ 0xAC280200, // 009A CATCH R10 1 0
+ 0xB0080000, // 009B RAISE 2 R0 R0
+ 0x540E002F, // 009C LDINT R3 48
+ 0x60280010, // 009D GETGBL R10 G16
+ 0x8C2C0114, // 009E GETMET R11 R0 K20
+ 0x5C341200, // 009F MOVE R13 R9
+ 0x7C2C0400, // 00A0 CALL R11 2
+ 0x7C280200, // 00A1 CALL R10 1
+ 0xA802001C, // 00A2 EXBLK 0 #00C0
+ 0x5C2C1400, // 00A3 MOVE R11 R10
+ 0x7C2C0000, // 00A4 CALL R11 0
+ 0x9430120B, // 00A5 GETIDX R12 R9 R11
+ 0x6034000F, // 00A6 GETGBL R13 G15
+ 0x5C381800, // 00A7 MOVE R14 R12
+ 0x603C0013, // 00A8 GETGBL R15 G19
+ 0x7C340400, // 00A9 CALL R13 2
+ 0x7836000D, // 00AA JMPF R13 #00B9
+ 0x8C341915, // 00AB GETMET R13 R12 K21
+ 0x583C001E, // 00AC LDCONST R15 K30
+ 0x7C340400, // 00AD CALL R13 2
+ 0x78360009, // 00AE JMPF R13 #00B9
+ 0x0034171F, // 00AF ADD R13 R11 K31
+ 0x60380008, // 00B0 GETGBL R14 G8
+ 0x5C3C0600, // 00B1 MOVE R15 R3
+ 0x7C380200, // 00B2 CALL R14 1
+ 0x603C0013, // 00B3 GETGBL R15 G19
+ 0x7C3C0000, // 00B4 CALL R15 0
+ 0x983E0520, // 00B5 SETIDX R15 K2 K32
+ 0x983E320D, // 00B6 SETIDX R15 K25 R13
+ 0x98081C0F, // 00B7 SETIDX R2 R14 R15
+ 0x000C0704, // 00B8 ADD R3 R3 K4
+ 0x54360037, // 00B9 LDINT R13 56
+ 0x2434060D, // 00BA GT R13 R3 R13
+ 0x78360000, // 00BB JMPF R13 #00BD
+ 0x70020000, // 00BC JMP #00BE
+ 0x7001FFE4, // 00BD JMP #00A3
+ 0xA8040001, // 00BE EXBLK 1 1
+ 0x70020002, // 00BF JMP #00C3
+ 0x5828001A, // 00C0 LDCONST R10 K26
+ 0xAC280200, // 00C1 CATCH R10 1 0
+ 0xB0080000, // 00C2 RAISE 2 R0 R0
+ 0x540E0037, // 00C3 LDINT R3 56
+ 0x60280010, // 00C4 GETGBL R10 G16
+ 0x8C2C0114, // 00C5 GETMET R11 R0 K20
+ 0x5C341200, // 00C6 MOVE R13 R9
+ 0x7C2C0400, // 00C7 CALL R11 2
+ 0x7C280200, // 00C8 CALL R10 1
+ 0xA802001C, // 00C9 EXBLK 0 #00E7
+ 0x5C2C1400, // 00CA MOVE R11 R10
+ 0x7C2C0000, // 00CB CALL R11 0
+ 0x9430120B, // 00CC GETIDX R12 R9 R11
+ 0x6034000F, // 00CD GETGBL R13 G15
+ 0x5C381800, // 00CE MOVE R14 R12
+ 0x603C0013, // 00CF GETGBL R15 G19
+ 0x7C340400, // 00D0 CALL R13 2
+ 0x7836000D, // 00D1 JMPF R13 #00E0
+ 0x8C341915, // 00D2 GETMET R13 R12 K21
+ 0x583C0021, // 00D3 LDCONST R15 K33
+ 0x7C340400, // 00D4 CALL R13 2
+ 0x78360009, // 00D5 JMPF R13 #00E0
+ 0x00341722, // 00D6 ADD R13 R11 K34
+ 0x60380008, // 00D7 GETGBL R14 G8
+ 0x5C3C0600, // 00D8 MOVE R15 R3
+ 0x7C380200, // 00D9 CALL R14 1
+ 0x603C0013, // 00DA GETGBL R15 G19
+ 0x7C3C0000, // 00DB CALL R15 0
+ 0x983E0523, // 00DC SETIDX R15 K2 K35
+ 0x983E320D, // 00DD SETIDX R15 K25 R13
+ 0x98081C0F, // 00DE SETIDX R2 R14 R15
+ 0x000C0704, // 00DF ADD R3 R3 K4
+ 0x5436003F, // 00E0 LDINT R13 64
+ 0x2434060D, // 00E1 GT R13 R3 R13
+ 0x78360000, // 00E2 JMPF R13 #00E4
+ 0x70020000, // 00E3 JMP #00E5
+ 0x7001FFE4, // 00E4 JMP #00CA
+ 0xA8040001, // 00E5 EXBLK 1 1
+ 0x70020002, // 00E6 JMP #00EA
+ 0x5828001A, // 00E7 LDCONST R10 K26
+ 0xAC280200, // 00E8 CATCH R10 1 0
+ 0xB0080000, // 00E9 RAISE 2 R0 R0
+ 0x80040400, // 00EA RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: remove_fabric
+********************************************************************/
+be_local_closure(Matter_Device_remove_fabric, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(find_children_fabrics),
+ /* K2 */ be_nested_str_weak(get_fabric_index),
+ /* K3 */ be_nested_str_weak(find_fabric_by_index),
+ /* K4 */ be_nested_str_weak(message_handler),
+ /* K5 */ be_nested_str_weak(im),
+ /* K6 */ be_nested_str_weak(subs_shop),
+ /* K7 */ be_nested_str_weak(remove_by_fabric),
+ /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K9 */ be_nested_str_weak(remove_fabric),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(save_fabrics),
+ }),
+ be_str_weak(remove_fabric),
+ &be_const_str_solidified,
+ ( &(const binstruction[43]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x8C100302, // 0002 GETMET R4 R1 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0x7C080400, // 0004 CALL R2 2
+ 0x4C0C0000, // 0005 LDNIL R3
+ 0x1C0C0403, // 0006 EQ R3 R2 R3
+ 0x780E0000, // 0007 JMPF R3 #0009
+ 0x80000600, // 0008 RET 0
+ 0x600C0010, // 0009 GETGBL R3 G16
+ 0x5C100400, // 000A MOVE R4 R2
+ 0x7C0C0200, // 000B CALL R3 1
+ 0xA8020016, // 000C EXBLK 0 #0024
+ 0x5C100600, // 000D MOVE R4 R3
+ 0x7C100000, // 000E CALL R4 0
+ 0x88140100, // 000F GETMBR R5 R0 K0
+ 0x8C140B03, // 0010 GETMET R5 R5 K3
+ 0x5C1C0800, // 0011 MOVE R7 R4
+ 0x7C140400, // 0012 CALL R5 2
+ 0x4C180000, // 0013 LDNIL R6
+ 0x20180A06, // 0014 NE R6 R5 R6
+ 0x781A000C, // 0015 JMPF R6 #0023
+ 0x88180104, // 0016 GETMBR R6 R0 K4
+ 0x88180D05, // 0017 GETMBR R6 R6 K5
+ 0x88180D06, // 0018 GETMBR R6 R6 K6
+ 0x8C180D07, // 0019 GETMET R6 R6 K7
+ 0x5C200A00, // 001A MOVE R8 R5
+ 0x7C180400, // 001B CALL R6 2
+ 0x8C180108, // 001C GETMET R6 R0 K8
+ 0x5C200A00, // 001D MOVE R8 R5
+ 0x7C180400, // 001E CALL R6 2
+ 0x88180100, // 001F GETMBR R6 R0 K0
+ 0x8C180D09, // 0020 GETMET R6 R6 K9
+ 0x5C200A00, // 0021 MOVE R8 R5
+ 0x7C180400, // 0022 CALL R6 2
+ 0x7001FFE8, // 0023 JMP #000D
+ 0x580C000A, // 0024 LDCONST R3 K10
+ 0xAC0C0200, // 0025 CATCH R3 1 0
+ 0xB0080000, // 0026 RAISE 2 R0 R0
+ 0x880C0100, // 0027 GETMBR R3 R0 K0
+ 0x8C0C070B, // 0028 GETMET R3 R3 K11
+ 0x7C0C0200, // 0029 CALL R3 1
+ 0x80000000, // 002A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Device_every_second, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(every_second),
+ /* K2 */ be_nested_str_weak(message_handler),
+ /* K3 */ be_nested_str_weak(commissioning_open),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(time_reached),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(plugins),
+ /* K8 */ be_const_int(1),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[30]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x88040102, // 0003 GETMBR R1 R0 K2
+ 0x8C040301, // 0004 GETMET R1 R1 K1
+ 0x7C040200, // 0005 CALL R1 1
+ 0x88040103, // 0006 GETMBR R1 R0 K3
+ 0x4C080000, // 0007 LDNIL R2
+ 0x20040202, // 0008 NE R1 R1 R2
+ 0x78060006, // 0009 JMPF R1 #0011
+ 0xB8060800, // 000A GETNGBL R1 K4
+ 0x8C040305, // 000B GETMET R1 R1 K5
+ 0x880C0103, // 000C GETMBR R3 R0 K3
+ 0x7C040400, // 000D CALL R1 2
+ 0x78060001, // 000E JMPF R1 #0011
+ 0x4C040000, // 000F LDNIL R1
+ 0x90020601, // 0010 SETMBR R0 K3 R1
+ 0x58040006, // 0011 LDCONST R1 K6
+ 0x6008000C, // 0012 GETGBL R2 G12
+ 0x880C0107, // 0013 GETMBR R3 R0 K7
+ 0x7C080200, // 0014 CALL R2 1
+ 0x14080202, // 0015 LT R2 R1 R2
+ 0x780A0005, // 0016 JMPF R2 #001D
+ 0x88080107, // 0017 GETMBR R2 R0 K7
+ 0x94080401, // 0018 GETIDX R2 R2 R1
+ 0x8C080501, // 0019 GETMET R2 R2 K1
+ 0x7C080200, // 001A CALL R2 1
+ 0x00040308, // 001B ADD R1 R1 K8
+ 0x7001FFF4, // 001C JMP #0012
+ 0x80000000, // 001D RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_active_endpoints
+********************************************************************/
+be_local_closure(Matter_Device_get_active_endpoints, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins),
+ /* K1 */ be_nested_str_weak(get_endpoint),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(push),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ 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
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0xA8020011, // 0005 EXBLK 0 #0018
+ 0x5C100600, // 0006 MOVE R4 R3
+ 0x7C100000, // 0007 CALL R4 0
+ 0x8C140901, // 0008 GETMET R5 R4 K1
+ 0x7C140200, // 0009 CALL R5 1
+ 0x78060002, // 000A JMPF R1 #000E
+ 0x1C180B02, // 000B EQ R6 R5 K2
+ 0x781A0000, // 000C JMPF R6 #000E
+ 0x7001FFF7, // 000D JMP #0006
+ 0x8C180503, // 000E GETMET R6 R2 K3
+ 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
+ 0x8C180504, // 0014 GETMET R6 R2 K4
+ 0x5C200A00, // 0015 MOVE R8 R5
+ 0x7C180400, // 0016 CALL R6 2
+ 0x7001FFED, // 0017 JMP #0006
+ 0x580C0005, // 0018 LDCONST R3 K5
+ 0xAC0C0200, // 0019 CATCH R3 1 0
+ 0xB0080000, // 001A RAISE 2 R0 R0
+ 0x80040400, // 001B RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Device_invoke_request, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_nested_str_weak(invoke_request),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(status),
+ /* K6 */ be_nested_str_weak(matter),
+ /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[24]) { /* code */
+ 0x58100000, // 0000 LDCONST R4 K0
+ 0x88140701, // 0001 GETMBR R5 R3 K1
+ 0x6018000C, // 0002 GETGBL R6 G12
+ 0x881C0102, // 0003 GETMBR R7 R0 K2
+ 0x7C180200, // 0004 CALL R6 1
+ 0x14180806, // 0005 LT R6 R4 R6
+ 0x781A000C, // 0006 JMPF R6 #0014
+ 0x88180102, // 0007 GETMBR R6 R0 K2
+ 0x94180C04, // 0008 GETIDX R6 R6 R4
+ 0x881C0D01, // 0009 GETMBR R7 R6 K1
+ 0x1C1C0E05, // 000A EQ R7 R7 R5
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0D03, // 000C GETMET R7 R6 K3
+ 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
+ 0x00100904, // 0012 ADD R4 R4 K4
+ 0x7001FFED, // 0013 JMP #0002
+ 0xB81A0C00, // 0014 GETNGBL R6 K6
+ 0x88180D07, // 0015 GETMBR R6 R6 K7
+ 0x900E0A06, // 0016 SETMBR R3 K5 R6
+ 0x80000000, // 0017 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start
+********************************************************************/
+be_local_closure(Matter_Device_start, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(_trigger_read_sensors),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80000000, // 0003 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(started),
+ /* K1 */ be_nested_str_weak(autoconf_device),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(add_cron),
+ /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
+ /* K5 */ be_nested_str_weak(matter_sensors_30s),
+ /* K6 */ be_nested_str_weak(_start_udp),
+ /* K7 */ be_nested_str_weak(UDP_PORT),
+ /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames),
+ }),
+ be_str_weak(start),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x78060000, // 0001 JMPF R1 #0003
+ 0x80000200, // 0002 RET 0
+ 0x8C040101, // 0003 GETMET R1 R0 K1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xB8060400, // 0005 GETNGBL R1 K2
+ 0x8C040303, // 0006 GETMET R1 R1 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x84100000, // 0008 CLOSURE R4 P0
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C040800, // 000A CALL R1 4
+ 0x8C040106, // 000B GETMET R1 R0 K6
+ 0x880C0107, // 000C GETMBR R3 R0 K7
+ 0x7C040400, // 000D CALL R1 2
+ 0x8C040108, // 000E GETMET R1 R0 K8
+ 0x7C040200, // 000F CALL R1 1
+ 0x50040200, // 0010 LDBOOL R1 1 0
+ 0x90020001, // 0011 SETMBR R0 K0 R1
+ 0xA0000000, // 0012 CLOSE R0
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: plugins_to_json
+********************************************************************/
+be_local_closure(Matter_Device_plugins_to_json, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(_X7B),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(plugins),
+ /* K4 */ be_nested_str_weak(_X2C),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(_X22_X25i_X22_X3A_X25s),
+ /* K7 */ be_nested_str_weak(get_endpoint),
+ /* K8 */ be_nested_str_weak(to_json),
+ /* K9 */ be_const_int(1),
+ /* K10 */ be_nested_str_weak(_X7D),
+ }),
+ be_str_weak(plugins_to_json),
+ &be_const_str_solidified,
+ ( &(const binstruction[25]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x58080001, // 0001 LDCONST R2 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x6010000C, // 0003 GETGBL R4 G12
+ 0x88140103, // 0004 GETMBR R5 R0 K3
+ 0x7C100200, // 0005 CALL R4 1
+ 0x14100604, // 0006 LT R4 R3 R4
+ 0x7812000E, // 0007 JMPF R4 #0017
+ 0x88100103, // 0008 GETMBR R4 R0 K3
+ 0x94100803, // 0009 GETIDX R4 R4 R3
+ 0x24140702, // 000A GT R5 R3 K2
+ 0x78160000, // 000B JMPF R5 #000D
+ 0x00080504, // 000C ADD R2 R2 K4
+ 0x8C140305, // 000D GETMET R5 R1 K5
+ 0x581C0006, // 000E LDCONST R7 K6
+ 0x8C200907, // 000F GETMET R8 R4 K7
+ 0x7C200200, // 0010 CALL R8 1
+ 0x8C240908, // 0011 GETMET R9 R4 K8
+ 0x7C240200, // 0012 CALL R9 1
+ 0x7C140800, // 0013 CALL R5 4
+ 0x00080405, // 0014 ADD R2 R2 R5
+ 0x000C0709, // 0015 ADD R3 R3 K9
+ 0x7001FFEB, // 0016 JMP #0003
+ 0x0008050A, // 0017 ADD R2 R2 K10
+ 0x80040400, // 0018 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: mdns_announce_PASE
********************************************************************/
@@ -3163,61 +4291,112 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */
/********************************************************************
-** Solidified function: stop_basic_commissioning
+** Solidified function: register_native_classes
********************************************************************/
-be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
+be_local_closure(Matter_Device_register_native_classes, /* name */
be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
+ 9, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(is_root_commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(publish_result),
- /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(commissioning_open),
- /* K6 */ be_nested_str_weak(mdns_remove_PASE),
- /* K7 */ be_nested_str_weak(commissioning_iterations),
- /* K8 */ be_nested_str_weak(commissioning_discriminator),
- /* K9 */ be_nested_str_weak(commissioning_salt),
- /* K10 */ be_nested_str_weak(commissioning_w0),
- /* K11 */ be_nested_str_weak(commissioning_L),
- /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(register_plugin_class),
+ /* K1 */ be_nested_str_weak(root),
+ /* K2 */ be_nested_str_weak(matter),
+ /* K3 */ be_nested_str_weak(Plugin_Root),
+ /* K4 */ be_nested_str_weak(light0),
+ /* K5 */ be_nested_str_weak(Plugin_Light0),
+ /* K6 */ be_nested_str_weak(light1),
+ /* K7 */ be_nested_str_weak(Plugin_Light1),
+ /* K8 */ be_nested_str_weak(light2),
+ /* K9 */ be_nested_str_weak(Plugin_Light2),
+ /* K10 */ be_nested_str_weak(light3),
+ /* K11 */ be_nested_str_weak(Plugin_Light3),
+ /* K12 */ be_nested_str_weak(relay),
+ /* K13 */ be_nested_str_weak(Plugin_OnOff),
+ /* K14 */ be_nested_str_weak(temperature),
+ /* K15 */ be_nested_str_weak(Plugin_Sensor_Temp),
+ /* K16 */ be_nested_str_weak(humidity),
+ /* K17 */ be_nested_str_weak(Plugin_Sensor_Humidity),
+ /* K18 */ be_nested_str_weak(illuminance),
+ /* K19 */ be_nested_str_weak(Plugin_Sensor_Illuminance),
+ /* K20 */ be_nested_str_weak(pressure),
+ /* K21 */ be_nested_str_weak(Plugin_Sensor_Pressure),
+ /* K22 */ be_nested_str_weak(tasmota),
+ /* K23 */ be_nested_str_weak(log),
+ /* K24 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20),
+ /* K25 */ be_nested_str_weak(k2l),
+ /* K26 */ be_nested_str_weak(plugins_classes),
+ /* K27 */ be_const_int(3),
}),
- be_str_weak(stop_basic_commissioning),
+ be_str_weak(register_native_classes),
&be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x78060004, // 0002 JMPF R1 #0008
- 0xB8060200, // 0003 GETNGBL R1 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0x580C0003, // 0005 LDCONST R3 K3
- 0x58100004, // 0006 LDCONST R4 K4
- 0x7C040600, // 0007 CALL R1 3
- 0x4C040000, // 0008 LDNIL R1
- 0x90020A01, // 0009 SETMBR R0 K5 R1
- 0x8C040106, // 000A GETMET R1 R0 K6
- 0x7C040200, // 000B CALL R1 1
- 0x4C040000, // 000C LDNIL R1
- 0x90020E01, // 000D SETMBR R0 K7 R1
- 0x4C040000, // 000E LDNIL R1
- 0x90021001, // 000F SETMBR R0 K8 R1
- 0x4C040000, // 0010 LDNIL R1
- 0x90021201, // 0011 SETMBR R0 K9 R1
- 0x4C040000, // 0012 LDNIL R1
- 0x90021401, // 0013 SETMBR R0 K10 R1
- 0x4C040000, // 0014 LDNIL R1
- 0x90021601, // 0015 SETMBR R0 K11 R1
- 0x4C040000, // 0016 LDNIL R1
- 0x90021801, // 0017 SETMBR R0 K12 R1
- 0x80000000, // 0018 RET 0
+ ( &(const binstruction[61]) { /* code */
+ 0x8C0C0100, // 0000 GETMET R3 R0 K0
+ 0x58140001, // 0001 LDCONST R5 K1
+ 0xB81A0400, // 0002 GETNGBL R6 K2
+ 0x88180D03, // 0003 GETMBR R6 R6 K3
+ 0x7C0C0600, // 0004 CALL R3 3
+ 0x8C0C0100, // 0005 GETMET R3 R0 K0
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0xB81A0400, // 0007 GETNGBL R6 K2
+ 0x88180D05, // 0008 GETMBR R6 R6 K5
+ 0x7C0C0600, // 0009 CALL R3 3
+ 0x8C0C0100, // 000A GETMET R3 R0 K0
+ 0x58140006, // 000B LDCONST R5 K6
+ 0xB81A0400, // 000C GETNGBL R6 K2
+ 0x88180D07, // 000D GETMBR R6 R6 K7
+ 0x7C0C0600, // 000E CALL R3 3
+ 0x8C0C0100, // 000F GETMET R3 R0 K0
+ 0x58140008, // 0010 LDCONST R5 K8
+ 0xB81A0400, // 0011 GETNGBL R6 K2
+ 0x88180D09, // 0012 GETMBR R6 R6 K9
+ 0x7C0C0600, // 0013 CALL R3 3
+ 0x8C0C0100, // 0014 GETMET R3 R0 K0
+ 0x5814000A, // 0015 LDCONST R5 K10
+ 0xB81A0400, // 0016 GETNGBL R6 K2
+ 0x88180D0B, // 0017 GETMBR R6 R6 K11
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x8C0C0100, // 0019 GETMET R3 R0 K0
+ 0x5814000C, // 001A LDCONST R5 K12
+ 0xB81A0400, // 001B GETNGBL R6 K2
+ 0x88180D0D, // 001C GETMBR R6 R6 K13
+ 0x7C0C0600, // 001D CALL R3 3
+ 0x8C0C0100, // 001E GETMET R3 R0 K0
+ 0x5814000E, // 001F LDCONST R5 K14
+ 0xB81A0400, // 0020 GETNGBL R6 K2
+ 0x88180D0F, // 0021 GETMBR R6 R6 K15
+ 0x7C0C0600, // 0022 CALL R3 3
+ 0x8C0C0100, // 0023 GETMET R3 R0 K0
+ 0x58140010, // 0024 LDCONST R5 K16
+ 0xB81A0400, // 0025 GETNGBL R6 K2
+ 0x88180D11, // 0026 GETMBR R6 R6 K17
+ 0x7C0C0600, // 0027 CALL R3 3
+ 0x8C0C0100, // 0028 GETMET R3 R0 K0
+ 0x58140012, // 0029 LDCONST R5 K18
+ 0xB81A0400, // 002A GETNGBL R6 K2
+ 0x88180D13, // 002B GETMBR R6 R6 K19
+ 0x7C0C0600, // 002C CALL R3 3
+ 0x8C0C0100, // 002D GETMET R3 R0 K0
+ 0x58140014, // 002E LDCONST R5 K20
+ 0xB81A0400, // 002F GETNGBL R6 K2
+ 0x88180D15, // 0030 GETMBR R6 R6 K21
+ 0x7C0C0600, // 0031 CALL R3 3
+ 0xB80E2C00, // 0032 GETNGBL R3 K22
+ 0x8C0C0717, // 0033 GETMET R3 R3 K23
+ 0x60140008, // 0034 GETGBL R5 G8
+ 0x8C180119, // 0035 GETMET R6 R0 K25
+ 0x8820011A, // 0036 GETMBR R8 R0 K26
+ 0x7C180400, // 0037 CALL R6 2
+ 0x7C140200, // 0038 CALL R5 1
+ 0x00163005, // 0039 ADD R5 K24 R5
+ 0x5818001B, // 003A LDCONST R6 K27
+ 0x7C0C0600, // 003B CALL R3 3
+ 0x80000000, // 003C RET 0
})
)
);
@@ -3225,434 +4404,9 @@ be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
/********************************************************************
-** Solidified function: received_ack
+** Solidified function: event_fabrics_saved
********************************************************************/
-be_local_closure(Matter_Device_received_ack, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(received_ack),
- }),
- be_str_weak(received_ack),
- &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: load_param
-********************************************************************/
-be_local_closure(Matter_Device_load_param, /* name */
- be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(crypto),
- /* K2 */ be_nested_str_weak(FILENAME),
- /* K3 */ be_nested_str_weak(read),
- /* K4 */ be_nested_str_weak(close),
- /* K5 */ be_nested_str_weak(json),
- /* K6 */ be_nested_str_weak(load),
- /* K7 */ be_nested_str_weak(root_discriminator),
- /* K8 */ be_nested_str_weak(find),
- /* K9 */ be_nested_str_weak(distinguish),
- /* K10 */ be_nested_str_weak(root_passcode),
- /* K11 */ be_nested_str_weak(passcode),
- /* K12 */ be_nested_str_weak(ipv4only),
- /* K13 */ be_nested_str_weak(io_error),
- /* K14 */ be_nested_str_weak(tasmota),
- /* K15 */ be_nested_str_weak(log),
- /* K16 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
- /* K17 */ be_nested_str_weak(_X7C),
- /* K18 */ be_const_int(2),
- /* K19 */ be_nested_str_weak(random),
- /* K20 */ be_nested_str_weak(get),
- /* K21 */ be_const_int(0),
- /* K22 */ be_nested_str_weak(PASSCODE_DEFAULT),
- /* K23 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(load_param),
- &be_const_str_solidified,
- ( &(const binstruction[79]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802001D, // 0002 EXBLK 0 #0021
- 0x600C0011, // 0003 GETGBL R3 G17
- 0x88100102, // 0004 GETMBR R4 R0 K2
- 0x7C0C0200, // 0005 CALL R3 1
- 0x8C100703, // 0006 GETMET R4 R3 K3
- 0x7C100200, // 0007 CALL R4 1
- 0x8C140704, // 0008 GETMET R5 R3 K4
- 0x7C140200, // 0009 CALL R5 1
- 0xA4160A00, // 000A IMPORT R5 K5
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x5C200800, // 000C MOVE R8 R4
- 0x7C180400, // 000D CALL R6 2
- 0x8C1C0D08, // 000E GETMET R7 R6 K8
- 0x58240009, // 000F LDCONST R9 K9
- 0x88280107, // 0010 GETMBR R10 R0 K7
- 0x7C1C0600, // 0011 CALL R7 3
- 0x90020E07, // 0012 SETMBR R0 K7 R7
- 0x8C1C0D08, // 0013 GETMET R7 R6 K8
- 0x5824000B, // 0014 LDCONST R9 K11
- 0x8828010A, // 0015 GETMBR R10 R0 K10
- 0x7C1C0600, // 0016 CALL R7 3
- 0x90021407, // 0017 SETMBR R0 K10 R7
- 0x601C0017, // 0018 GETGBL R7 G23
- 0x8C200D08, // 0019 GETMET R8 R6 K8
- 0x5828000C, // 001A LDCONST R10 K12
- 0x502C0000, // 001B LDBOOL R11 0 0
- 0x7C200600, // 001C CALL R8 3
- 0x7C1C0200, // 001D CALL R7 1
- 0x90021807, // 001E SETMBR R0 K12 R7
- 0xA8040001, // 001F EXBLK 1 1
- 0x70020012, // 0020 JMP #0034
- 0xAC0C0002, // 0021 CATCH R3 0 2
- 0x7002000F, // 0022 JMP #0033
- 0x2014070D, // 0023 NE R5 R3 K13
- 0x7816000C, // 0024 JMPF R5 #0032
- 0xB8161C00, // 0025 GETNGBL R5 K14
- 0x8C140B0F, // 0026 GETMET R5 R5 K15
- 0x601C0008, // 0027 GETGBL R7 G8
- 0x5C200600, // 0028 MOVE R8 R3
- 0x7C1C0200, // 0029 CALL R7 1
- 0x001E2007, // 002A ADD R7 K16 R7
- 0x001C0F11, // 002B ADD R7 R7 K17
- 0x60200008, // 002C GETGBL R8 G8
- 0x5C240800, // 002D MOVE R9 R4
- 0x7C200200, // 002E CALL R8 1
- 0x001C0E08, // 002F ADD R7 R7 R8
- 0x58200012, // 0030 LDCONST R8 K18
- 0x7C140600, // 0031 CALL R5 3
- 0x70020000, // 0032 JMP #0034
- 0xB0080000, // 0033 RAISE 2 R0 R0
- 0x500C0000, // 0034 LDBOOL R3 0 0
- 0x88100107, // 0035 GETMBR R4 R0 K7
- 0x4C140000, // 0036 LDNIL R5
- 0x1C100805, // 0037 EQ R4 R4 R5
- 0x7812000A, // 0038 JMPF R4 #0044
- 0x8C100513, // 0039 GETMET R4 R2 K19
- 0x58180012, // 003A LDCONST R6 K18
- 0x7C100400, // 003B CALL R4 2
- 0x8C100914, // 003C GETMET R4 R4 K20
- 0x58180015, // 003D LDCONST R6 K21
- 0x581C0012, // 003E LDCONST R7 K18
- 0x7C100600, // 003F CALL R4 3
- 0x54160FFE, // 0040 LDINT R5 4095
- 0x2C100805, // 0041 AND R4 R4 R5
- 0x90020E04, // 0042 SETMBR R0 K7 R4
- 0x500C0200, // 0043 LDBOOL R3 1 0
- 0x8810010A, // 0044 GETMBR R4 R0 K10
- 0x4C140000, // 0045 LDNIL R5
- 0x1C100805, // 0046 EQ R4 R4 R5
- 0x78120002, // 0047 JMPF R4 #004B
- 0x88100116, // 0048 GETMBR R4 R0 K22
- 0x90021404, // 0049 SETMBR R0 K10 R4
- 0x500C0200, // 004A LDBOOL R3 1 0
- 0x780E0001, // 004B JMPF R3 #004E
- 0x8C100117, // 004C GETMET R4 R0 K23
- 0x7C100200, // 004D CALL R4 1
- 0x80000000, // 004E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(mdns_remove_op_discovery_all_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: save_param
-********************************************************************/
-be_local_closure(Matter_Device_save_param, /* name */
- be_nested_proto(
- 10, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[17]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(dump),
- /* K2 */ be_nested_str_weak(distinguish),
- /* K3 */ be_nested_str_weak(root_discriminator),
- /* K4 */ be_nested_str_weak(passcode),
- /* K5 */ be_nested_str_weak(root_passcode),
- /* K6 */ be_nested_str_weak(ipv4only),
- /* K7 */ be_nested_str_weak(string),
- /* K8 */ be_nested_str_weak(FILENAME),
- /* K9 */ be_nested_str_weak(w),
- /* K10 */ be_nested_str_weak(write),
- /* K11 */ be_nested_str_weak(close),
- /* K12 */ be_nested_str_weak(tasmota),
- /* K13 */ be_nested_str_weak(log),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
- /* K15 */ be_nested_str_weak(_X7C),
- /* K16 */ be_const_int(2),
- }),
- be_str_weak(save_param),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x60100013, // 0002 GETGBL R4 G19
- 0x7C100000, // 0003 CALL R4 0
- 0x88140103, // 0004 GETMBR R5 R0 K3
- 0x98120405, // 0005 SETIDX R4 K2 R5
- 0x88140105, // 0006 GETMBR R5 R0 K5
- 0x98120805, // 0007 SETIDX R4 K4 R5
- 0x88140106, // 0008 GETMBR R5 R0 K6
- 0x98120C05, // 0009 SETIDX R4 K6 R5
- 0x7C080400, // 000A CALL R2 2
- 0xA802000D, // 000B EXBLK 0 #001A
- 0xA40E0E00, // 000C IMPORT R3 K7
- 0x60100011, // 000D GETGBL R4 G17
- 0x88140108, // 000E GETMBR R5 R0 K8
- 0x58180009, // 000F LDCONST R6 K9
- 0x7C100400, // 0010 CALL R4 2
- 0x8C14090A, // 0011 GETMET R5 R4 K10
- 0x5C1C0400, // 0012 MOVE R7 R2
- 0x7C140400, // 0013 CALL R5 2
- 0x8C14090B, // 0014 GETMET R5 R4 K11
- 0x7C140200, // 0015 CALL R5 1
- 0xA8040001, // 0016 EXBLK 1 1
- 0x80040400, // 0017 RET 1 R2
- 0xA8040001, // 0018 EXBLK 1 1
- 0x70020011, // 0019 JMP #002C
- 0xAC0C0002, // 001A CATCH R3 0 2
- 0x7002000E, // 001B JMP #002B
- 0xB8161800, // 001C GETNGBL R5 K12
- 0x8C140B0D, // 001D GETMET R5 R5 K13
- 0x601C0008, // 001E GETGBL R7 G8
- 0x5C200600, // 001F MOVE R8 R3
- 0x7C1C0200, // 0020 CALL R7 1
- 0x001E1C07, // 0021 ADD R7 K14 R7
- 0x001C0F0F, // 0022 ADD R7 R7 K15
- 0x60200008, // 0023 GETGBL R8 G8
- 0x5C240800, // 0024 MOVE R9 R4
- 0x7C200200, // 0025 CALL R8 1
- 0x001C0E08, // 0026 ADD R7 R7 R8
- 0x58200010, // 0027 LDCONST R8 K16
- 0x7C140600, // 0028 CALL R5 3
- 0x80040400, // 0029 RET 1 R2
- 0x70020000, // 002A JMP #002C
- 0xB0080000, // 002B RAISE 2 R0 R0
- 0x80000000, // 002C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_op_discovery
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
- be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(copy),
- /* K4 */ be_nested_str_weak(reverse),
- /* K5 */ be_nested_str_weak(get_fabric_compressed),
- /* K6 */ be_nested_str_weak(tohex),
- /* K7 */ be_nested_str_weak(_X2D),
- /* K8 */ be_nested_str_weak(tasmota),
- /* K9 */ be_nested_str_weak(eth),
- /* K10 */ be_nested_str_weak(find),
- /* K11 */ be_nested_str_weak(up),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K15 */ be_const_int(2),
- /* K16 */ be_nested_str_weak(remove_service),
- /* K17 */ be_nested_str_weak(_matter),
- /* K18 */ be_nested_str_weak(_tcp),
- /* K19 */ be_nested_str_weak(hostname_eth),
- /* K20 */ be_nested_str_weak(wifi),
- /* K21 */ be_nested_str_weak(hostname_wifi),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K23 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(mdns_remove_op_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[81]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA802003B, // 0002 EXBLK 0 #003F
- 0x8C100302, // 0003 GETMET R4 R1 K2
- 0x7C100200, // 0004 CALL R4 1
- 0x8C100903, // 0005 GETMET R4 R4 K3
- 0x7C100200, // 0006 CALL R4 1
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140305, // 0009 GETMET R5 R1 K5
- 0x7C140200, // 000A CALL R5 1
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x7C180200, // 000C CALL R6 1
- 0x00180D07, // 000D ADD R6 R6 K7
- 0x8C1C0906, // 000E GETMET R7 R4 K6
- 0x7C1C0200, // 000F CALL R7 1
- 0x00180C07, // 0010 ADD R6 R6 R7
- 0xB81E1000, // 0011 GETNGBL R7 K8
- 0x8C1C0F09, // 0012 GETMET R7 R7 K9
- 0x7C1C0200, // 0013 CALL R7 1
- 0x8C1C0F0A, // 0014 GETMET R7 R7 K10
- 0x5824000B, // 0015 LDCONST R9 K11
- 0x7C1C0400, // 0016 CALL R7 2
- 0x781E000E, // 0017 JMPF R7 #0027
- 0xB81E1000, // 0018 GETNGBL R7 K8
- 0x8C1C0F0C, // 0019 GETMET R7 R7 K12
- 0x8C24070D, // 001A GETMET R9 R3 K13
- 0x582C000E, // 001B LDCONST R11 K14
- 0x58300009, // 001C LDCONST R12 K9
- 0x5C340C00, // 001D MOVE R13 R6
- 0x7C240800, // 001E CALL R9 4
- 0x5828000F, // 001F LDCONST R10 K15
- 0x7C1C0600, // 0020 CALL R7 3
- 0x8C1C0510, // 0021 GETMET R7 R2 K16
- 0x58240011, // 0022 LDCONST R9 K17
- 0x58280012, // 0023 LDCONST R10 K18
- 0x5C2C0C00, // 0024 MOVE R11 R6
- 0x88300113, // 0025 GETMBR R12 R0 K19
- 0x7C1C0A00, // 0026 CALL R7 5
- 0xB81E1000, // 0027 GETNGBL R7 K8
- 0x8C1C0F14, // 0028 GETMET R7 R7 K20
- 0x7C1C0200, // 0029 CALL R7 1
- 0x8C1C0F0A, // 002A GETMET R7 R7 K10
- 0x5824000B, // 002B LDCONST R9 K11
- 0x7C1C0400, // 002C CALL R7 2
- 0x781E000E, // 002D JMPF R7 #003D
- 0xB81E1000, // 002E GETNGBL R7 K8
- 0x8C1C0F0C, // 002F GETMET R7 R7 K12
- 0x8C24070D, // 0030 GETMET R9 R3 K13
- 0x582C000E, // 0031 LDCONST R11 K14
- 0x58300014, // 0032 LDCONST R12 K20
- 0x5C340C00, // 0033 MOVE R13 R6
- 0x7C240800, // 0034 CALL R9 4
- 0x5828000F, // 0035 LDCONST R10 K15
- 0x7C1C0600, // 0036 CALL R7 3
- 0x8C1C0510, // 0037 GETMET R7 R2 K16
- 0x58240011, // 0038 LDCONST R9 K17
- 0x58280012, // 0039 LDCONST R10 K18
- 0x5C2C0C00, // 003A MOVE R11 R6
- 0x88300115, // 003B GETMBR R12 R0 K21
- 0x7C1C0A00, // 003C CALL R7 5
- 0xA8040001, // 003D EXBLK 1 1
- 0x70020010, // 003E JMP #0050
- 0xAC100002, // 003F CATCH R4 0 2
- 0x7002000D, // 0040 JMP #004F
- 0xB81A1000, // 0041 GETNGBL R6 K8
- 0x8C180D0C, // 0042 GETMET R6 R6 K12
- 0x60200008, // 0043 GETGBL R8 G8
- 0x5C240800, // 0044 MOVE R9 R4
- 0x7C200200, // 0045 CALL R8 1
- 0x00222C08, // 0046 ADD R8 K22 R8
- 0x00201117, // 0047 ADD R8 R8 K23
- 0x60240008, // 0048 GETGBL R9 G8
- 0x5C280A00, // 0049 MOVE R10 R5
- 0x7C240200, // 004A CALL R9 1
- 0x00201009, // 004B ADD R8 R8 R9
- 0x5824000F, // 004C LDCONST R9 K15
- 0x7C180600, // 004D CALL R6 3
- 0x70020000, // 004E JMP #0050
- 0xB0080000, // 004F RAISE 2 R0 R0
- 0x80000000, // 0050 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_root_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
+be_local_closure(Matter_Device_event_fabrics_saved, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -3662,142 +4416,28 @@ be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(is_root_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x78060003, // 0003 JMPF R1 #0008
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x4C080000, // 0005 LDNIL R2
- 0x1C040202, // 0006 EQ R1 R1 R2
- 0x74060000, // 0007 JMPT R1 #0009
- 0x50040001, // 0008 LDBOOL R1 0 1
- 0x50040200, // 0009 LDBOOL R1 1 0
- 0x80040200, // 000A RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_commissioning_open, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- }),
- be_str_weak(is_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(log),
- /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
- /* K3 */ be_const_int(2),
- /* K4 */ be_nested_str_weak(stop_basic_commissioning),
- }),
- be_str_weak(start_commissioning_complete),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C080600, // 0004 CALL R2 3
- 0x8C080104, // 0005 GETMET R2 R0 K4
- 0x7C080200, // 0006 CALL R2 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_announce_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(plugins_persist),
+ /* K4 */ be_nested_str_weak(save_param),
}),
- be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ be_str_weak(event_fabrics_saved),
&be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
+ ( &(const binstruction[12]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x24040302, // 0003 GT R1 R1 K2
+ 0x78060005, // 0004 JMPF R1 #000B
+ 0x88040103, // 0005 GETMBR R1 R0 K3
+ 0x74060003, // 0006 JMPT R1 #000B
+ 0x50040200, // 0007 LDBOOL R1 1 0
+ 0x90020601, // 0008 SETMBR R0 K3 R1
+ 0x8C040104, // 0009 GETMET R1 R0 K4
+ 0x7C040200, // 000A CALL R1 1
+ 0x80000000, // 000B RET 0
})
)
);
@@ -3805,346 +4445,11 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name
/********************************************************************
-** Solidified function: MtrJoin
+** Solidified function: k2l_num
********************************************************************/
-be_local_closure(Matter_Device_MtrJoin, /* name */
+be_local_closure(Matter_Device_k2l_num, /* name */
be_nested_proto(
- 8, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
- /* K1 */ be_nested_str_weak(stop_basic_commissioning),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(resp_cmnd_done),
- }),
- be_str_weak(MtrJoin),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x60140009, // 0000 GETGBL R5 G9
- 0x5C180600, // 0001 MOVE R6 R3
- 0x7C140200, // 0002 CALL R5 1
- 0x78160002, // 0003 JMPF R5 #0007
- 0x8C180100, // 0004 GETMET R6 R0 K0
- 0x7C180200, // 0005 CALL R6 1
- 0x70020001, // 0006 JMP #0009
- 0x8C180101, // 0007 GETMET R6 R0 K1
- 0x7C180200, // 0008 CALL R6 1
- 0xB81A0400, // 0009 GETNGBL R6 K2
- 0x8C180D03, // 000A GETMET R6 R6 K3
- 0x7C180200, // 000B CALL R6 1
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Device_invoke_request, /* name */
- be_nested_proto(
- 12, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(plugins),
- /* K3 */ be_nested_str_weak(invoke_request),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(status),
- /* K6 */ be_nested_str_weak(matter),
- /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[24]) { /* code */
- 0x58100000, // 0000 LDCONST R4 K0
- 0x88140701, // 0001 GETMBR R5 R3 K1
- 0x6018000C, // 0002 GETGBL R6 G12
- 0x881C0102, // 0003 GETMBR R7 R0 K2
- 0x7C180200, // 0004 CALL R6 1
- 0x14180806, // 0005 LT R6 R4 R6
- 0x781A000C, // 0006 JMPF R6 #0014
- 0x88180102, // 0007 GETMBR R6 R0 K2
- 0x94180C04, // 0008 GETIDX R6 R6 R4
- 0x881C0D01, // 0009 GETMBR R7 R6 K1
- 0x1C1C0E05, // 000A EQ R7 R7 R5
- 0x781E0005, // 000B JMPF R7 #0012
- 0x8C1C0D03, // 000C GETMET R7 R6 K3
- 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
- 0x00100904, // 0012 ADD R4 R4 K4
- 0x7001FFED, // 0013 JMP #0002
- 0xB81A0C00, // 0014 GETNGBL R6 K6
- 0x88180D07, // 0015 GETMBR R6 R6 K7
- 0x900E0A06, // 0016 SETMBR R3 K5 R6
- 0x80000000, // 0017 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: compute_manual_pairing_code
-********************************************************************/
-be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
- be_nested_proto(
- 11, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(root_discriminator),
- /* K2 */ be_nested_str_weak(root_passcode),
- /* K3 */ be_nested_str_weak(format),
- /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(Verhoeff),
- /* K7 */ be_nested_str_weak(checksum),
- }),
- be_str_weak(compute_manual_pairing_code),
- &be_const_str_solidified,
- ( &(const binstruction[31]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x88080101, // 0001 GETMBR R2 R0 K1
- 0x540E0FFE, // 0002 LDINT R3 4095
- 0x2C080403, // 0003 AND R2 R2 R3
- 0x540E0009, // 0004 LDINT R3 10
- 0x3C080403, // 0005 SHR R2 R2 R3
- 0x880C0101, // 0006 GETMBR R3 R0 K1
- 0x541202FF, // 0007 LDINT R4 768
- 0x2C0C0604, // 0008 AND R3 R3 R4
- 0x54120005, // 0009 LDINT R4 6
- 0x380C0604, // 000A SHL R3 R3 R4
- 0x88100102, // 000B GETMBR R4 R0 K2
- 0x54163FFE, // 000C LDINT R5 16383
- 0x2C100805, // 000D AND R4 R4 R5
- 0x300C0604, // 000E OR R3 R3 R4
- 0x88100102, // 000F GETMBR R4 R0 K2
- 0x5416000D, // 0010 LDINT R5 14
- 0x3C100805, // 0011 SHR R4 R4 R5
- 0x8C140303, // 0012 GETMET R5 R1 K3
- 0x581C0004, // 0013 LDCONST R7 K4
- 0x5C200400, // 0014 MOVE R8 R2
- 0x5C240600, // 0015 MOVE R9 R3
- 0x5C280800, // 0016 MOVE R10 R4
- 0x7C140A00, // 0017 CALL R5 5
- 0xB81A0A00, // 0018 GETNGBL R6 K5
- 0x88180D06, // 0019 GETMBR R6 R6 K6
- 0x8C180D07, // 001A GETMET R6 R6 K7
- 0x5C200A00, // 001B MOVE R8 R5
- 0x7C180400, // 001C CALL R6 2
- 0x00140A06, // 001D ADD R5 R5 R6
- 0x80040A00, // 001E RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_announce_op_discovery
-********************************************************************/
-be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */
- be_nested_proto(
- 15, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[29]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(copy),
- /* K4 */ be_nested_str_weak(reverse),
- /* K5 */ be_nested_str_weak(get_fabric_compressed),
- /* K6 */ be_nested_str_weak(tohex),
- /* K7 */ be_nested_str_weak(_X2D),
- /* K8 */ be_nested_str_weak(tasmota),
- /* K9 */ be_nested_str_weak(log),
- /* K10 */ be_nested_str_weak(MTR_X3A_X20Operational_X20Discovery_X20node_X20_X3D_X20),
- /* K11 */ be_const_int(2),
- /* K12 */ be_nested_str_weak(eth),
- /* K13 */ be_nested_str_weak(find),
- /* K14 */ be_nested_str_weak(up),
- /* K15 */ be_nested_str_weak(format),
- /* K16 */ be_nested_str_weak(MTR_X3A_X20adding_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27_X20ptr_X20to_X20_X60_X25s_X2Elocal_X60),
- /* K17 */ be_nested_str_weak(hostname_eth),
- /* K18 */ be_const_int(3),
- /* K19 */ be_nested_str_weak(add_service),
- /* K20 */ be_nested_str_weak(_matter),
- /* K21 */ be_nested_str_weak(_tcp),
- /* K22 */ be_nested_str_weak(_I),
- /* K23 */ be_nested_str_weak(MTR_X3A_X20adding_X20subtype_X3A_X20),
- /* K24 */ be_nested_str_weak(add_subtype),
- /* K25 */ be_nested_str_weak(wifi),
- /* K26 */ be_nested_str_weak(hostname_wifi),
- /* K27 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K28 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(mdns_announce_op_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[122]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA8020064, // 0002 EXBLK 0 #0068
- 0x8C100302, // 0003 GETMET R4 R1 K2
- 0x7C100200, // 0004 CALL R4 1
- 0x8C100903, // 0005 GETMET R4 R4 K3
- 0x7C100200, // 0006 CALL R4 1
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140305, // 0009 GETMET R5 R1 K5
- 0x7C140200, // 000A CALL R5 1
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x7C180200, // 000C CALL R6 1
- 0x00180D07, // 000D ADD R6 R6 K7
- 0x8C1C0906, // 000E GETMET R7 R4 K6
- 0x7C1C0200, // 000F CALL R7 1
- 0x00180C07, // 0010 ADD R6 R6 R7
- 0xB81E1000, // 0011 GETNGBL R7 K8
- 0x8C1C0F09, // 0012 GETMET R7 R7 K9
- 0x00261406, // 0013 ADD R9 K10 R6
- 0x5828000B, // 0014 LDCONST R10 K11
- 0x7C1C0600, // 0015 CALL R7 3
- 0xB81E1000, // 0016 GETNGBL R7 K8
- 0x8C1C0F0C, // 0017 GETMET R7 R7 K12
- 0x7C1C0200, // 0018 CALL R7 1
- 0x8C1C0F0D, // 0019 GETMET R7 R7 K13
- 0x5824000E, // 001A LDCONST R9 K14
- 0x7C1C0400, // 001B CALL R7 2
- 0x781E0020, // 001C JMPF R7 #003E
- 0xB81E1000, // 001D GETNGBL R7 K8
- 0x8C1C0F09, // 001E GETMET R7 R7 K9
- 0x8C24070F, // 001F GETMET R9 R3 K15
- 0x582C0010, // 0020 LDCONST R11 K16
- 0x5830000C, // 0021 LDCONST R12 K12
- 0x5C340C00, // 0022 MOVE R13 R6
- 0x88380111, // 0023 GETMBR R14 R0 K17
- 0x7C240A00, // 0024 CALL R9 5
- 0x58280012, // 0025 LDCONST R10 K18
- 0x7C1C0600, // 0026 CALL R7 3
- 0x8C1C0513, // 0027 GETMET R7 R2 K19
- 0x58240014, // 0028 LDCONST R9 K20
- 0x58280015, // 0029 LDCONST R10 K21
- 0x542E15A3, // 002A LDINT R11 5540
- 0x4C300000, // 002B LDNIL R12
- 0x5C340C00, // 002C MOVE R13 R6
- 0x88380111, // 002D GETMBR R14 R0 K17
- 0x7C1C0E00, // 002E CALL R7 7
- 0x8C1C0B06, // 002F GETMET R7 R5 K6
- 0x7C1C0200, // 0030 CALL R7 1
- 0x001E2C07, // 0031 ADD R7 K22 R7
- 0xB8221000, // 0032 GETNGBL R8 K8
- 0x8C201109, // 0033 GETMET R8 R8 K9
- 0x002A2E07, // 0034 ADD R10 K23 R7
- 0x582C0012, // 0035 LDCONST R11 K18
- 0x7C200600, // 0036 CALL R8 3
- 0x8C200518, // 0037 GETMET R8 R2 K24
- 0x58280014, // 0038 LDCONST R10 K20
- 0x582C0015, // 0039 LDCONST R11 K21
- 0x5C300C00, // 003A MOVE R12 R6
- 0x88340111, // 003B GETMBR R13 R0 K17
- 0x5C380E00, // 003C MOVE R14 R7
- 0x7C200C00, // 003D CALL R8 6
- 0xB81E1000, // 003E GETNGBL R7 K8
- 0x8C1C0F19, // 003F GETMET R7 R7 K25
- 0x7C1C0200, // 0040 CALL R7 1
- 0x8C1C0F0D, // 0041 GETMET R7 R7 K13
- 0x5824000E, // 0042 LDCONST R9 K14
- 0x7C1C0400, // 0043 CALL R7 2
- 0x781E0020, // 0044 JMPF R7 #0066
- 0xB81E1000, // 0045 GETNGBL R7 K8
- 0x8C1C0F09, // 0046 GETMET R7 R7 K9
- 0x8C24070F, // 0047 GETMET R9 R3 K15
- 0x582C0010, // 0048 LDCONST R11 K16
- 0x58300019, // 0049 LDCONST R12 K25
- 0x5C340C00, // 004A MOVE R13 R6
- 0x8838011A, // 004B GETMBR R14 R0 K26
- 0x7C240A00, // 004C CALL R9 5
- 0x58280012, // 004D LDCONST R10 K18
- 0x7C1C0600, // 004E CALL R7 3
- 0x8C1C0513, // 004F GETMET R7 R2 K19
- 0x58240014, // 0050 LDCONST R9 K20
- 0x58280015, // 0051 LDCONST R10 K21
- 0x542E15A3, // 0052 LDINT R11 5540
- 0x4C300000, // 0053 LDNIL R12
- 0x5C340C00, // 0054 MOVE R13 R6
- 0x8838011A, // 0055 GETMBR R14 R0 K26
- 0x7C1C0E00, // 0056 CALL R7 7
- 0x8C1C0B06, // 0057 GETMET R7 R5 K6
- 0x7C1C0200, // 0058 CALL R7 1
- 0x001E2C07, // 0059 ADD R7 K22 R7
- 0xB8221000, // 005A GETNGBL R8 K8
- 0x8C201109, // 005B GETMET R8 R8 K9
- 0x002A2E07, // 005C ADD R10 K23 R7
- 0x582C0012, // 005D LDCONST R11 K18
- 0x7C200600, // 005E CALL R8 3
- 0x8C200518, // 005F GETMET R8 R2 K24
- 0x58280014, // 0060 LDCONST R10 K20
- 0x582C0015, // 0061 LDCONST R11 K21
- 0x5C300C00, // 0062 MOVE R12 R6
- 0x8834011A, // 0063 GETMBR R13 R0 K26
- 0x5C380E00, // 0064 MOVE R14 R7
- 0x7C200C00, // 0065 CALL R8 6
- 0xA8040001, // 0066 EXBLK 1 1
- 0x70020010, // 0067 JMP #0079
- 0xAC100002, // 0068 CATCH R4 0 2
- 0x7002000D, // 0069 JMP #0078
- 0xB81A1000, // 006A GETNGBL R6 K8
- 0x8C180D09, // 006B GETMET R6 R6 K9
- 0x60200008, // 006C GETGBL R8 G8
- 0x5C240800, // 006D MOVE R9 R4
- 0x7C200200, // 006E CALL R8 1
- 0x00223608, // 006F ADD R8 K27 R8
- 0x0020111C, // 0070 ADD R8 R8 K28
- 0x60240008, // 0071 GETGBL R9 G8
- 0x5C280A00, // 0072 MOVE R10 R5
- 0x7C240200, // 0073 CALL R9 1
- 0x00201009, // 0074 ADD R8 R8 R9
- 0x5824000B, // 0075 LDCONST R9 K11
- 0x7C180600, // 0076 CALL R6 3
- 0x70020000, // 0077 JMP #0079
- 0xB0080000, // 0078 RAISE 2 R0 R0
- 0x80000000, // 0079 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: k2l
-********************************************************************/
-be_local_closure(Matter_Device_k2l, /* name */
- be_nested_proto(
- 8, /* nstack */
+ 9, /* nstack */
1, /* argc */
4, /* varg */
0, /* has upvals */
@@ -4160,9 +4465,9 @@ be_local_closure(Matter_Device_k2l, /* name */
/* K4 */ be_const_int(1),
/* K5 */ be_const_int(0),
}),
- be_str_weak(k2l),
+ be_str_weak(k2l_num),
&be_const_str_solidified,
- ( &(const binstruction[50]) { /* code */
+ ( &(const binstruction[52]) { /* code */
0x58040000, // 0000 LDCONST R1 K0
0x60080012, // 0001 GETGBL R2 G18
0x7C080000, // 0002 CALL R2 0
@@ -4174,45 +4479,258 @@ be_local_closure(Matter_Device_k2l, /* name */
0x8C100101, // 0008 GETMET R4 R0 K1
0x7C100200, // 0009 CALL R4 1
0x7C0C0200, // 000A CALL R3 1
- 0xA8020005, // 000B EXBLK 0 #0012
+ 0xA8020007, // 000B EXBLK 0 #0014
0x5C100600, // 000C MOVE R4 R3
0x7C100000, // 000D CALL R4 0
0x8C140502, // 000E GETMET R5 R2 K2
- 0x5C1C0800, // 000F MOVE R7 R4
- 0x7C140400, // 0010 CALL R5 2
- 0x7001FFF9, // 0011 JMP #000C
- 0x580C0003, // 0012 LDCONST R3 K3
- 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
- 0x04100904, // 0019 SUB R4 R4 K4
- 0x40120804, // 001A CONNECT R4 K4 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
- 0x241C0D05, // 0021 GT R7 R6 K5
- 0x781E0008, // 0022 JMPF R7 #002C
- 0x041C0D04, // 0023 SUB R7 R6 K4
- 0x941C0407, // 0024 GETIDX R7 R2 R7
- 0x241C0E05, // 0025 GT R7 R7 R5
- 0x781E0004, // 0026 JMPF R7 #002C
- 0x041C0D04, // 0027 SUB R7 R6 K4
- 0x941C0407, // 0028 GETIDX R7 R2 R7
- 0x98080C07, // 0029 SETIDX R2 R6 R7
- 0x04180D04, // 002A SUB R6 R6 K4
- 0x7001FFF4, // 002B JMP #0021
- 0x98080C05, // 002C SETIDX R2 R6 R5
- 0x7001FFEE, // 002D JMP #001D
- 0x580C0003, // 002E LDCONST R3 K3
- 0xAC0C0200, // 002F CATCH R3 1 0
- 0xB0080000, // 0030 RAISE 2 R0 R0
- 0x80040400, // 0031 RET 1 R2
+ 0x601C0009, // 000F GETGBL R7 G9
+ 0x5C200800, // 0010 MOVE R8 R4
+ 0x7C1C0200, // 0011 CALL R7 1
+ 0x7C140400, // 0012 CALL R5 2
+ 0x7001FFF7, // 0013 JMP #000C
+ 0x580C0003, // 0014 LDCONST R3 K3
+ 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
+ 0x04100904, // 001B SUB R4 R4 K4
+ 0x40120804, // 001C CONNECT R4 K4 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
+ 0x241C0D05, // 0023 GT R7 R6 K5
+ 0x781E0008, // 0024 JMPF R7 #002E
+ 0x041C0D04, // 0025 SUB R7 R6 K4
+ 0x941C0407, // 0026 GETIDX R7 R2 R7
+ 0x241C0E05, // 0027 GT R7 R7 R5
+ 0x781E0004, // 0028 JMPF R7 #002E
+ 0x041C0D04, // 0029 SUB R7 R6 K4
+ 0x941C0407, // 002A GETIDX R7 R2 R7
+ 0x98080C07, // 002B SETIDX R2 R6 R7
+ 0x04180D04, // 002C SUB R6 R6 K4
+ 0x7001FFF4, // 002D JMP #0023
+ 0x98080C05, // 002E SETIDX R2 R6 R5
+ 0x7001FFEE, // 002F JMP #001F
+ 0x580C0003, // 0030 LDCONST R3 K3
+ 0xAC0C0200, // 0031 CATCH R3 1 0
+ 0xB0080000, // 0032 RAISE 2 R0 R0
+ 0x80040400, // 0033 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_PASE
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(mdns_pase_eth),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K7 */ be_nested_str_weak(_matterc),
+ /* K8 */ be_nested_str_weak(_udp),
+ /* K9 */ be_nested_str_weak(commissioning_instance_eth),
+ /* K10 */ be_nested_str_weak(hostname_eth),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K13 */ be_nested_str_weak(eth),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(remove_service),
+ /* K16 */ be_nested_str_weak(mdns_pase_wifi),
+ /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
+ /* K18 */ be_nested_str_weak(hostname_wifi),
+ /* K19 */ be_nested_str_weak(wifi),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K21 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(mdns_remove_PASE),
+ &be_const_str_solidified,
+ ( &(const binstruction[83]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA802003D, // 0002 EXBLK 0 #0041
+ 0x880C0102, // 0003 GETMBR R3 R0 K2
+ 0x780E001B, // 0004 JMPF R3 #0021
+ 0xB80E0600, // 0005 GETNGBL R3 K3
+ 0x8C0C0704, // 0006 GETMET R3 R3 K4
+ 0x8C140505, // 0007 GETMET R5 R2 K5
+ 0x581C0006, // 0008 LDCONST R7 K6
+ 0x58200007, // 0009 LDCONST R8 K7
+ 0x58240008, // 000A LDCONST R9 K8
+ 0x88280109, // 000B GETMBR R10 R0 K9
+ 0x882C010A, // 000C GETMBR R11 R0 K10
+ 0x7C140C00, // 000D CALL R5 6
+ 0x5818000B, // 000E LDCONST R6 K11
+ 0x7C0C0600, // 000F CALL R3 3
+ 0xB80E0600, // 0010 GETNGBL R3 K3
+ 0x8C0C0704, // 0011 GETMET R3 R3 K4
+ 0x8C140505, // 0012 GETMET R5 R2 K5
+ 0x581C000C, // 0013 LDCONST R7 K12
+ 0x5820000D, // 0014 LDCONST R8 K13
+ 0x88240109, // 0015 GETMBR R9 R0 K9
+ 0x7C140800, // 0016 CALL R5 4
+ 0x5818000E, // 0017 LDCONST R6 K14
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x500C0000, // 0019 LDBOOL R3 0 0
+ 0x90020403, // 001A SETMBR R0 K2 R3
+ 0x8C0C030F, // 001B GETMET R3 R1 K15
+ 0x58140007, // 001C LDCONST R5 K7
+ 0x58180008, // 001D LDCONST R6 K8
+ 0x881C0109, // 001E GETMBR R7 R0 K9
+ 0x8820010A, // 001F GETMBR R8 R0 K10
+ 0x7C0C0A00, // 0020 CALL R3 5
+ 0x880C0110, // 0021 GETMBR R3 R0 K16
+ 0x780E001B, // 0022 JMPF R3 #003F
+ 0xB80E0600, // 0023 GETNGBL R3 K3
+ 0x8C0C0704, // 0024 GETMET R3 R3 K4
+ 0x8C140505, // 0025 GETMET R5 R2 K5
+ 0x581C0006, // 0026 LDCONST R7 K6
+ 0x58200007, // 0027 LDCONST R8 K7
+ 0x58240008, // 0028 LDCONST R9 K8
+ 0x88280111, // 0029 GETMBR R10 R0 K17
+ 0x882C0112, // 002A GETMBR R11 R0 K18
+ 0x7C140C00, // 002B CALL R5 6
+ 0x5818000B, // 002C LDCONST R6 K11
+ 0x7C0C0600, // 002D CALL R3 3
+ 0xB80E0600, // 002E GETNGBL R3 K3
+ 0x8C0C0704, // 002F GETMET R3 R3 K4
+ 0x8C140505, // 0030 GETMET R5 R2 K5
+ 0x581C000C, // 0031 LDCONST R7 K12
+ 0x58200013, // 0032 LDCONST R8 K19
+ 0x88240111, // 0033 GETMBR R9 R0 K17
+ 0x7C140800, // 0034 CALL R5 4
+ 0x5818000E, // 0035 LDCONST R6 K14
+ 0x7C0C0600, // 0036 CALL R3 3
+ 0x500C0000, // 0037 LDBOOL R3 0 0
+ 0x90022003, // 0038 SETMBR R0 K16 R3
+ 0x8C0C030F, // 0039 GETMET R3 R1 K15
+ 0x58140007, // 003A LDCONST R5 K7
+ 0x58180008, // 003B LDCONST R6 K8
+ 0x881C0111, // 003C GETMBR R7 R0 K17
+ 0x88200112, // 003D GETMBR R8 R0 K18
+ 0x7C0C0A00, // 003E CALL R3 5
+ 0xA8040001, // 003F EXBLK 1 1
+ 0x70020010, // 0040 JMP #0052
+ 0xAC0C0002, // 0041 CATCH R3 0 2
+ 0x7002000D, // 0042 JMP #0051
+ 0xB8160600, // 0043 GETNGBL R5 K3
+ 0x8C140B04, // 0044 GETMET R5 R5 K4
+ 0x601C0008, // 0045 GETGBL R7 G8
+ 0x5C200600, // 0046 MOVE R8 R3
+ 0x7C1C0200, // 0047 CALL R7 1
+ 0x001E2807, // 0048 ADD R7 K20 R7
+ 0x001C0F15, // 0049 ADD R7 R7 K21
+ 0x60200008, // 004A GETGBL R8 G8
+ 0x5C240800, // 004B MOVE R9 R4
+ 0x7C200200, // 004C CALL R8 1
+ 0x001C0E08, // 004D ADD R7 R7 R8
+ 0x5820000E, // 004E LDCONST R8 K14
+ 0x7C140600, // 004F CALL R5 3
+ 0x70020000, // 0050 JMP #0052
+ 0xB0080000, // 0051 RAISE 2 R0 R0
+ 0x80000000, // 0052 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: sort_distinct
+********************************************************************/
+be_local_closure(Matter_Device_sort_distinct, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_const_int(1),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_nested_str_weak(remove),
+ }),
+ be_str_weak(sort_distinct),
+ &be_const_str_solidified,
+ ( &(const binstruction[53]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 0x60080010, // 0001 GETGBL R2 G16
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x040C0701, // 0005 SUB R3 R3 K1
+ 0x400E0203, // 0006 CONNECT R3 K1 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
+ 0x24180B02, // 000D GT R6 R5 K2
+ 0x781A0008, // 000E JMPF R6 #0018
+ 0x04180B01, // 000F SUB R6 R5 K1
+ 0x94180006, // 0010 GETIDX R6 R0 R6
+ 0x24180C04, // 0011 GT R6 R6 R4
+ 0x781A0004, // 0012 JMPF R6 #0018
+ 0x04180B01, // 0013 SUB R6 R5 K1
+ 0x94180006, // 0014 GETIDX R6 R0 R6
+ 0x98000A06, // 0015 SETIDX R0 R5 R6
+ 0x04140B01, // 0016 SUB R5 R5 K1
+ 0x7001FFF4, // 0017 JMP #000D
+ 0x98000A04, // 0018 SETIDX R0 R5 R4
+ 0x7001FFEE, // 0019 JMP #0009
+ 0x58080003, // 001A LDCONST R2 K3
+ 0xAC080200, // 001B CATCH R2 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x58080001, // 001D LDCONST R2 K1
+ 0x600C000C, // 001E GETGBL R3 G12
+ 0x5C100000, // 001F MOVE R4 R0
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x180C0701, // 0021 LE R3 R3 K1
+ 0x780E0000, // 0022 JMPF R3 #0024
+ 0x80040000, // 0023 RET 1 R0
+ 0x940C0102, // 0024 GETIDX R3 R0 K2
+ 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
+ 0x8C100104, // 002D GETMET R4 R0 K4
+ 0x5C180400, // 002E MOVE R6 R2
+ 0x7C100400, // 002F CALL R4 2
+ 0x70020001, // 0030 JMP #0033
+ 0x940C0002, // 0031 GETIDX R3 R0 R2
+ 0x00080501, // 0032 ADD R2 R2 K1
+ 0x7001FFF0, // 0033 JMP #0025
+ 0x80040000, // 0034 RET 1 R0
})
)
);
@@ -4223,89 +4741,98 @@ be_local_closure(Matter_Device_k2l, /* name */
** Solidified class: Matter_Device
********************************************************************/
be_local_class(Matter_Device,
- 28,
+ 30,
NULL,
- be_nested_map(79,
+ be_nested_map(88,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(commissioning_w0, 50), be_const_var(10) },
- { be_const_key_weak(start_operational_discovery, 13), be_const_closure(Matter_Device_start_operational_discovery_closure) },
- { be_const_key_weak(plugins, -1), be_const_var(1) },
- { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
- { be_const_key_weak(mdns_remove_PASE, 72), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
- { be_const_key_weak(message_handler, -1), be_const_var(3) },
- { be_const_key_weak(mdns_announce_op_discovery, 43), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
- { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
- { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
- { be_const_key_weak(commissioning_open, -1), be_const_var(6) },
- { be_const_key_weak(root_L, 45), be_const_var(27) },
- { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) },
- { be_const_key_weak(root_passcode, -1), be_const_var(22) },
- { be_const_key_weak(compute_manual_pairing_code, 77), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
- { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
- { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
- { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
- { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) },
- { be_const_key_weak(_mdns_announce_hostname, 31), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
- { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
- { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
- { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
- { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(12) },
- { be_const_key_weak(msg_send, -1), be_const_closure(Matter_Device_msg_send_closure) },
- { be_const_key_weak(hostname_wifi, 32), be_const_var(15) },
- { be_const_key_weak(productid, -1), be_const_var(18) },
- { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) },
- { be_const_key_weak(commissioning_discriminator, -1), be_const_var(8) },
- { be_const_key_weak(FILENAME, 46), be_nested_str_weak(_matter_device_X2Ejson) },
- { be_const_key_weak(commissioning_instance_eth, 53), be_const_var(14) },
- { be_const_key_weak(start, 75), be_const_closure(Matter_Device_start_closure) },
- { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
- { be_const_key_weak(MtrJoin, 33), be_const_closure(Matter_Device_MtrJoin_closure) },
- { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) },
- { be_const_key_weak(root_w0, -1), be_const_var(26) },
- { be_const_key_weak(ui, -1), be_const_var(5) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
- { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
- { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(root_L, -1), be_const_var(29) },
{ be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
+ { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
+ { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
+ { be_const_key_weak(mdns_remove_PASE, 51), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
+ { be_const_key_weak(stop, 56), be_const_closure(Matter_Device_stop_closure) },
+ { be_const_key_weak(udp_server, 0), be_const_var(4) },
+ { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) },
+ { be_const_key_weak(commissioning_discriminator, -1), be_const_var(10) },
+ { be_const_key_weak(msg_send, 26), be_const_closure(Matter_Device_msg_send_closure) },
+ { be_const_key_weak(save_param, 4), be_const_closure(Matter_Device_save_param_closure) },
+ { be_const_key_weak(mdns_pase_eth, -1), be_const_var(21) },
+ { be_const_key_weak(hostname_eth, -1), be_const_var(18) },
+ { be_const_key_weak(productid, -1), be_const_var(20) },
+ { be_const_key_weak(vendorid, 69), be_const_var(19) },
+ { be_const_key_weak(start_commissioning_complete, 3), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
+ { be_const_key_weak(commissioning_salt, -1), be_const_var(11) },
+ { be_const_key_weak(commissioning_open, -1), be_const_var(8) },
+ { be_const_key_weak(compute_manual_pairing_code, -1), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
+ { be_const_key_weak(commissioning_L, -1), be_const_var(13) },
+ { be_const_key_weak(hostname_wifi, 85), be_const_var(17) },
+ { be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
+ { be_const_key_weak(root_passcode, 7), be_const_var(24) },
{ be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
- { be_const_key_weak(PASE_TIMEOUT, 36), be_const_int(600) },
- { be_const_key_weak(mdns_announce_PASE, 40), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
- { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
- { be_const_key_weak(commissioning_salt, 39), be_const_var(9) },
- { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
- { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) },
- { be_const_key_weak(root_salt, 41), be_const_var(25) },
- { be_const_key_weak(commissioning_iterations, 6), be_const_var(7) },
- { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) },
- { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
- { be_const_key_weak(commissioning_L, -1), be_const_var(11) },
- { be_const_key_weak(root_discriminator, -1), be_const_var(21) },
- { be_const_key_weak(ipv4only, -1), be_const_var(23) },
- { be_const_key_weak(load_param, 37), be_const_closure(Matter_Device_load_param_closure) },
- { be_const_key_weak(start_operational_discovery_deferred, 55), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
- { be_const_key_weak(sessions, -1), be_const_var(4) },
- { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(register_commands, 52), be_const_closure(Matter_Device_register_commands_closure) },
- { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(13) },
- { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) },
- { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) },
- { be_const_key_weak(_init_basic_commissioning, 44), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
+ { be_const_key_weak(received_ack, 12), be_const_closure(Matter_Device_received_ack_closure) },
+ { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) },
+ { be_const_key_weak(start_root_basic_commissioning, 16), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
+ { be_const_key_weak(ui, -1), be_const_var(7) },
+ { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) },
+ { be_const_key_weak(commissioning_iterations, -1), be_const_var(9) },
+ { be_const_key_weak(mdns_announce_op_discovery, 22), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
{ be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
- { be_const_key_weak(root_iterations, -1), be_const_var(24) },
- { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) },
- { be_const_key_weak(udp_server, -1), be_const_var(2) },
- { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
- { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(sort_distinct, 34), be_const_static_closure(Matter_Device_sort_distinct_closure) },
+ { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
+ { be_const_key_weak(mdns_announce_PASE, 35), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
+ { be_const_key_weak(is_commissioning_open, 44), be_const_closure(Matter_Device_is_commissioning_open_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
+ { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
+ { be_const_key_weak(plugins_to_json, -1), be_const_closure(Matter_Device_plugins_to_json_closure) },
+ { be_const_key_weak(_trigger_read_sensors, 53), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
+ { be_const_key_weak(every_250ms, 61), be_const_closure(Matter_Device_every_250ms_closure) },
+ { be_const_key_weak(root_w0, -1), be_const_var(28) },
+ { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(start_commissioning_complete_deferred, 48), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
+ { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(15) },
+ { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
{ be_const_key_weak(started, -1), be_const_var(0) },
- { be_const_key_weak(hostname_eth, -1), be_const_var(16) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) },
- { be_const_key_weak(mdns_pase_eth, 14), be_const_var(19) },
- { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(20) },
- { be_const_key_weak(PASSCODE_DEFAULT, 11), be_const_int(20202021) },
- { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
- { be_const_key_weak(vendorid, 3), be_const_var(17) },
+ { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
+ { be_const_key_weak(invoke_request, 68), be_const_closure(Matter_Device_invoke_request_closure) },
+ { be_const_key_weak(start_operational_discovery, -1), be_const_closure(Matter_Device_start_operational_discovery_closure) },
+ { be_const_key_weak(PASE_TIMEOUT, 66), be_const_int(600) },
+ { be_const_key_weak(root_salt, 37), be_const_var(27) },
+ { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
+ { be_const_key_weak(message_handler, 47), be_const_var(5) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
+ { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
+ { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(22) },
+ { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
+ { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
+ { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) },
+ { be_const_key_weak(_load_plugins_config, -1), be_const_closure(Matter_Device__load_plugins_config_closure) },
+ { be_const_key_weak(plugins_classes, -1), be_const_var(3) },
+ { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) },
+ { be_const_key_weak(attribute_updated, 57), be_const_closure(Matter_Device_attribute_updated_closure) },
+ { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(14) },
+ { be_const_key_weak(register_plugin_class, 54), be_const_closure(Matter_Device_register_plugin_class_closure) },
+ { be_const_key_weak(commissioning_instance_eth, 70), be_const_var(16) },
+ { be_const_key_weak(plugins, 52), be_const_var(1) },
+ { be_const_key_weak(PASSCODE_DEFAULT, -1), be_const_int(20202021) },
+ { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
+ { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
+ { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) },
+ { be_const_key_weak(msg_received, 38), be_const_closure(Matter_Device_msg_received_closure) },
+ { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
+ { be_const_key_weak(commissioning_w0, -1), be_const_var(12) },
+ { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, 33), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(plugins_persist, 28), be_const_var(2) },
+ { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) },
+ { be_const_key_weak(root_discriminator, 25), be_const_var(23) },
+ { be_const_key_weak(k2l_num, -1), be_const_static_closure(Matter_Device_k2l_num_closure) },
+ { be_const_key_weak(ipv4only, -1), be_const_var(25) },
+ { be_const_key_weak(start_operational_discovery_deferred, 13), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
+ { be_const_key_weak(root_iterations, -1), be_const_var(26) },
+ { be_const_key_weak(register_commands, 8), be_const_closure(Matter_Device_register_commands_closure) },
+ { be_const_key_weak(sessions, -1), be_const_var(6) },
+ { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
+ { be_const_key_weak(sort_distinct, -1), be_const_static_closure(Matter_Device_sort_distinct_closure) },
+ { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) },
})),
be_str_weak(Matter_Device)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
index dac3fc7df..458456859 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
@@ -6,6 +6,372 @@
extern const bclass be_class_Matter_Plugin;
+/********************************************************************
+** Solidified function: get_endpoint
+********************************************************************/
+be_local_closure(Matter_Plugin_get_endpoint, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(endpoint),
+ }),
+ be_str_weak(get_endpoint),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: timed_request
+********************************************************************/
+be_local_closure(Matter_Plugin_timed_request, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(timed_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: to_json_parameters
+********************************************************************/
+be_local_closure(Matter_Plugin_to_json_parameters, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(to_json_parameters),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80040200, // 0000 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_event
+********************************************************************/
+be_local_closure(Matter_Plugin_read_event, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(read_event),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: to_json
+********************************************************************/
+be_local_closure(Matter_Plugin_to_json, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(format),
+ /* K2 */ be_nested_str_weak(_X7B_X22type_X22_X3A_X22_X25s_X22),
+ /* K3 */ be_nested_str_weak(NAME),
+ /* K4 */ be_nested_str_weak(to_json_parameters),
+ /* K5 */ be_nested_str_weak(_X7D),
+ }),
+ be_str_weak(to_json),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x88140103, // 0003 GETMBR R5 R0 K3
+ 0x7C080600, // 0004 CALL R2 3
+ 0x8C0C0104, // 0005 GETMET R3 R0 K4
+ 0x5C140400, // 0006 MOVE R5 R2
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x5C080600, // 0008 MOVE R2 R3
+ 0x00080505, // 0009 ADD R2 R2 K5
+ 0x80040400, // 000A RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: subscribe_event
+********************************************************************/
+be_local_closure(Matter_Plugin_subscribe_event, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(subscribe_event),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Plugin_every_second, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x80000000, // 0002 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_invoke_request, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_parse_sensors, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_update_shadow, /* name */
+ be_nested_proto(
+ 1, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_write_attribute, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(write_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_init, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(clusters),
+ /* K3 */ be_nested_str_weak(consolidate_clusters),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x90020001, // 0000 SETMBR R0 K0 R1
+ 0x90020202, // 0001 SETMBR R0 K1 R2
+ 0x8C100103, // 0002 GETMET R4 R0 K3
+ 0x7C100200, // 0003 CALL R4 1
+ 0x90020404, // 0004 SETMBR R0 K2 R4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: attribute_updated
+********************************************************************/
+be_local_closure(Matter_Plugin_attribute_updated, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(endpoint),
+ /* K1 */ be_nested_str_weak(device),
+ /* K2 */ be_nested_str_weak(attribute_updated),
+ }),
+ be_str_weak(attribute_updated),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x1C140205, // 0001 EQ R5 R1 R5
+ 0x78160000, // 0002 JMPF R5 #0004
+ 0x88040100, // 0003 GETMBR R1 R0 K0
+ 0x88140101, // 0004 GETMBR R5 R0 K1
+ 0x8C140B02, // 0005 GETMET R5 R5 K2
+ 0x5C1C0200, // 0006 MOVE R7 R1
+ 0x5C200400, // 0007 MOVE R8 R2
+ 0x5C240600, // 0008 MOVE R9 R3
+ 0x5C280800, // 0009 MOVE R10 R4
+ 0x7C140A00, // 000A CALL R5 5
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -287,244 +653,6 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Plugin_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(update_shadow),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: subscribe_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
- be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(subscribe_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: subscribe_event
-********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_event, /* name */
- be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(subscribe_event),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_update_shadow, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_event
-********************************************************************/
-be_local_closure(Matter_Plugin_read_event, /* name */
- be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(read_event),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_endpoint
-********************************************************************/
-be_local_closure(Matter_Plugin_get_endpoint, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
- }),
- be_str_weak(get_endpoint),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: write_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_write_attribute, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(write_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(device),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(clusters),
- /* K3 */ be_nested_str_weak(consolidate_clusters),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0x90020202, // 0001 SETMBR R0 K1 R2
- 0x8C0C0103, // 0002 GETMET R3 R0 K3
- 0x7C0C0200, // 0003 CALL R3 1
- 0x90020403, // 0004 SETMBR R0 K2 R3
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: timed_request
-********************************************************************/
-be_local_closure(Matter_Plugin_timed_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(timed_request),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: get_attribute_list
********************************************************************/
@@ -605,87 +733,24 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
/********************************************************************
-** Solidified function: parse_sensors
+** Solidified function: subscribe_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_parse_sensors, /* name */
+be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(parse_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_invoke_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: attribute_updated
-********************************************************************/
-be_local_closure(Matter_Plugin_attribute_updated, /* name */
- be_nested_proto(
- 11, /* nstack */
+ 6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
- /* K1 */ be_nested_str_weak(device),
- /* K2 */ be_nested_str_weak(attribute_updated),
- }),
- be_str_weak(attribute_updated),
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(subscribe_attribute),
&be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
+ ( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
- 0x1C140205, // 0001 EQ R5 R1 R5
- 0x78160000, // 0002 JMPF R5 #0004
- 0x88040100, // 0003 GETMBR R1 R0 K0
- 0x88140101, // 0004 GETMBR R5 R0 K1
- 0x8C140B02, // 0005 GETMET R5 R5 K2
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x5C200400, // 0007 MOVE R8 R2
- 0x5C240600, // 0008 MOVE R9 R3
- 0x5C280800, // 0009 MOVE R10 R4
- 0x7C140A00, // 000A CALL R5 5
- 0x80000000, // 000B RET 0
+ 0x80040A00, // 0001 RET 1 R5
})
)
);
@@ -698,26 +763,31 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_local_class(Matter_Plugin,
3,
NULL,
- be_nested_map(21,
+ be_nested_map(24,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
- { be_const_key_weak(attribute_updated, 18), be_const_closure(Matter_Plugin_attribute_updated_closure) },
- { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
- { be_const_key_weak(subscribe_attribute, 1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
- { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
- { be_const_key_weak(device, -1), be_const_var(0) },
- { be_const_key_weak(update_shadow, 17), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(subscribe_attribute, 23), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
{ be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
- { be_const_key_weak(has, 8), be_const_closure(Matter_Plugin_has_closure) },
- { be_const_key_weak(parse_sensors, 13), be_const_closure(Matter_Plugin_parse_sensors_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
+ { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
+ { be_const_key_weak(device, 21), be_const_var(0) },
+ { be_const_key_weak(endpoint, 0), be_const_var(1) },
+ { be_const_key_weak(get_cluster_list, 17), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(generic) },
+ { be_const_key_weak(to_json, 5), be_const_closure(Matter_Plugin_to_json_closure) },
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
- { be_const_key_weak(timed_request, 9), be_const_closure(Matter_Plugin_timed_request_closure) },
- { be_const_key_weak(read_event, 11), be_const_closure(Matter_Plugin_read_event_closure) },
- { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
- { be_const_key_weak(CLUSTERS, 20), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(every_second, 8), be_const_closure(Matter_Plugin_every_second_closure) },
+ { be_const_key_weak(clusters, 22), be_const_var(2) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
+ { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
+ { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
+ { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
+ { be_const_key_weak(read_event, 16), be_const_closure(Matter_Plugin_read_event_closure) },
+ { be_const_key_weak(write_attribute, 15), be_const_closure(Matter_Plugin_write_attribute_closure) },
+ { be_const_key_weak(subscribe_event, 14), be_const_closure(Matter_Plugin_subscribe_event_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -731,9 +801,7 @@ be_local_class(Matter_Plugin,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
- { be_const_key_weak(clusters, -1), be_const_var(2) },
- { be_const_key_weak(endpoint, -1), be_const_var(1) },
+ { be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_to_json_parameters_closure) },
})),
be_str_weak(Matter_Plugin)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
index b50a887fe..192e2f3e3 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
@@ -6,86 +6,6 @@
extern const bclass be_class_Matter_Plugin_Device;
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
- be_nested_proto(
- 13, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(TLV),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(command),
- /* K4 */ be_const_int(3),
- /* K5 */ be_const_int(0),
- /* K6 */ be_const_int(1),
- /* K7 */ be_nested_str_weak(Matter_TLV_struct),
- /* K8 */ be_nested_str_weak(add_TLV),
- /* K9 */ be_nested_str_weak(U2),
- /* K10 */ be_nested_str_weak(invoke_request),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0xB8120000, // 0000 GETNGBL R4 K0
- 0x88100901, // 0001 GETMBR R4 R4 K1
- 0x88140702, // 0002 GETMBR R5 R3 K2
- 0x88180703, // 0003 GETMBR R6 R3 K3
- 0x1C1C0B04, // 0004 EQ R7 R5 K4
- 0x781E0016, // 0005 JMPF R7 #001D
- 0x1C1C0D05, // 0006 EQ R7 R6 K5
- 0x781E0002, // 0007 JMPF R7 #000B
- 0x501C0200, // 0008 LDBOOL R7 1 0
- 0x80040E00, // 0009 RET 1 R7
- 0x70020010, // 000A JMP #001C
- 0x1C1C0D06, // 000B EQ R7 R6 K6
- 0x781E0009, // 000C JMPF R7 #0017
- 0x8C1C0907, // 000D GETMET R7 R4 K7
- 0x7C1C0200, // 000E CALL R7 1
- 0x8C200F08, // 000F GETMET R8 R7 K8
- 0x58280005, // 0010 LDCONST R10 K5
- 0x882C0909, // 0011 GETMBR R11 R4 K9
- 0x58300005, // 0012 LDCONST R12 K5
- 0x7C200800, // 0013 CALL R8 4
- 0x900E0705, // 0014 SETMBR R3 K3 K5
- 0x80040E00, // 0015 RET 1 R7
- 0x70020004, // 0016 JMP #001C
- 0x541E003F, // 0017 LDINT R7 64
- 0x1C1C0C07, // 0018 EQ R7 R6 R7
- 0x781E0001, // 0019 JMPF R7 #001C
- 0x501C0200, // 001A LDBOOL R7 1 0
- 0x80040E00, // 001B RET 1 R7
- 0x7002000E, // 001C JMP #002C
- 0x541E0003, // 001D LDINT R7 4
- 0x1C1C0A07, // 001E EQ R7 R5 R7
- 0x781E0002, // 001F JMPF R7 #0023
- 0x501C0200, // 0020 LDBOOL R7 1 0
- 0x80040E00, // 0021 RET 1 R7
- 0x70020008, // 0022 JMP #002C
- 0x601C0003, // 0023 GETGBL R7 G3
- 0x5C200000, // 0024 MOVE R8 R0
- 0x7C1C0200, // 0025 CALL R7 1
- 0x8C1C0F0A, // 0026 GETMET R7 R7 K10
- 0x5C240200, // 0027 MOVE R9 R1
- 0x5C280400, // 0028 MOVE R10 R2
- 0x5C2C0600, // 0029 MOVE R11 R3
- 0x7C1C0800, // 002A CALL R7 4
- 0x80040E00, // 002B RET 1 R7
- 0x80000000, // 002C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -200,11 +120,11 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
/********************************************************************
-** Solidified function: init
+** Solidified function: invoke_request
********************************************************************/
-be_local_closure(Matter_Plugin_Device_init, /* name */
+be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
be_nested_proto(
- 8, /* nstack */
+ 13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@@ -212,20 +132,67 @@ be_local_closure(Matter_Plugin_Device_init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(TLV),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(command),
+ /* K4 */ be_const_int(3),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_const_int(1),
+ /* K7 */ be_nested_str_weak(Matter_TLV_struct),
+ /* K8 */ be_nested_str_weak(add_TLV),
+ /* K9 */ be_nested_str_weak(U2),
+ /* K10 */ be_nested_str_weak(invoke_request),
}),
- be_str_weak(init),
+ be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x7C100600, // 0006 CALL R4 3
- 0x80000000, // 0007 RET 0
+ ( &(const binstruction[45]) { /* code */
+ 0xB8120000, // 0000 GETNGBL R4 K0
+ 0x88100901, // 0001 GETMBR R4 R4 K1
+ 0x88140702, // 0002 GETMBR R5 R3 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x1C1C0B04, // 0004 EQ R7 R5 K4
+ 0x781E0016, // 0005 JMPF R7 #001D
+ 0x1C1C0D05, // 0006 EQ R7 R6 K5
+ 0x781E0002, // 0007 JMPF R7 #000B
+ 0x501C0200, // 0008 LDBOOL R7 1 0
+ 0x80040E00, // 0009 RET 1 R7
+ 0x70020010, // 000A JMP #001C
+ 0x1C1C0D06, // 000B EQ R7 R6 K6
+ 0x781E0009, // 000C JMPF R7 #0017
+ 0x8C1C0907, // 000D GETMET R7 R4 K7
+ 0x7C1C0200, // 000E CALL R7 1
+ 0x8C200F08, // 000F GETMET R8 R7 K8
+ 0x58280005, // 0010 LDCONST R10 K5
+ 0x882C0909, // 0011 GETMBR R11 R4 K9
+ 0x58300005, // 0012 LDCONST R12 K5
+ 0x7C200800, // 0013 CALL R8 4
+ 0x900E0705, // 0014 SETMBR R3 K3 K5
+ 0x80040E00, // 0015 RET 1 R7
+ 0x70020004, // 0016 JMP #001C
+ 0x541E003F, // 0017 LDINT R7 64
+ 0x1C1C0C07, // 0018 EQ R7 R6 R7
+ 0x781E0001, // 0019 JMPF R7 #001C
+ 0x501C0200, // 001A LDBOOL R7 1 0
+ 0x80040E00, // 001B RET 1 R7
+ 0x7002000E, // 001C JMP #002C
+ 0x541E0003, // 001D LDINT R7 4
+ 0x1C1C0A07, // 001E EQ R7 R5 R7
+ 0x781E0002, // 001F JMPF R7 #0023
+ 0x501C0200, // 0020 LDBOOL R7 1 0
+ 0x80040E00, // 0021 RET 1 R7
+ 0x70020008, // 0022 JMP #002C
+ 0x601C0003, // 0023 GETGBL R7 G3
+ 0x5C200000, // 0024 MOVE R8 R0
+ 0x7C1C0200, // 0025 CALL R7 1
+ 0x8C1C0F0A, // 0026 GETMET R7 R7 K10
+ 0x5C240200, // 0027 MOVE R9 R1
+ 0x5C280400, // 0028 MOVE R10 R2
+ 0x5C2C0600, // 0029 MOVE R11 R3
+ 0x7C1C0800, // 002A CALL R7 4
+ 0x80040E00, // 002B RET 1 R7
+ 0x80000000, // 002C RET 0
})
)
);
@@ -239,16 +206,8 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Device,
0,
&be_class_Matter_Plugin,
- be_nested_map(5,
+ be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(0, -1), be_const_int(0) },
- })) ) } )) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
- { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Device_init_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -268,6 +227,13 @@ be_local_class(Matter_Plugin_Device,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(0, -1), be_const_int(0) },
+ })) ) } )) },
+ { be_const_key_weak(read_attribute, 1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Device)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
index 40809e95f..d2eab2b66 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
@@ -6,6 +6,133 @@
extern const bclass be_class_Matter_Plugin_Light0;
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[16]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(command),
+ /* K5 */ be_const_int(3),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_const_int(1),
+ /* K8 */ be_nested_str_weak(Matter_TLV_struct),
+ /* K9 */ be_nested_str_weak(add_TLV),
+ /* K10 */ be_nested_str_weak(U2),
+ /* K11 */ be_nested_str_weak(set),
+ /* K12 */ be_nested_str_weak(power),
+ /* K13 */ be_nested_str_weak(update_shadow),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(shadow_onoff),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[87]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xB8160200, // 0001 GETNGBL R5 K1
+ 0x88140B02, // 0002 GETMBR R5 R5 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x881C0704, // 0004 GETMBR R7 R3 K4
+ 0x1C200D05, // 0005 EQ R8 R6 K5
+ 0x78220016, // 0006 JMPF R8 #001E
+ 0x1C200F06, // 0007 EQ R8 R7 K6
+ 0x78220002, // 0008 JMPF R8 #000C
+ 0x50200200, // 0009 LDBOOL R8 1 0
+ 0x80041000, // 000A RET 1 R8
+ 0x70020010, // 000B JMP #001D
+ 0x1C200F07, // 000C EQ R8 R7 K7
+ 0x78220009, // 000D JMPF R8 #0018
+ 0x8C200B08, // 000E GETMET R8 R5 K8
+ 0x7C200200, // 000F CALL R8 1
+ 0x8C241109, // 0010 GETMET R9 R8 K9
+ 0x582C0006, // 0011 LDCONST R11 K6
+ 0x88300B0A, // 0012 GETMBR R12 R5 K10
+ 0x58340006, // 0013 LDCONST R13 K6
+ 0x7C240800, // 0014 CALL R9 4
+ 0x900E0906, // 0015 SETMBR R3 K4 K6
+ 0x80041000, // 0016 RET 1 R8
+ 0x70020004, // 0017 JMP #001D
+ 0x5422003F, // 0018 LDINT R8 64
+ 0x1C200E08, // 0019 EQ R8 R7 R8
+ 0x78220001, // 001A JMPF R8 #001D
+ 0x50200200, // 001B LDBOOL R8 1 0
+ 0x80041000, // 001C RET 1 R8
+ 0x70020037, // 001D JMP #0056
+ 0x54220003, // 001E LDINT R8 4
+ 0x1C200C08, // 001F EQ R8 R6 R8
+ 0x78220002, // 0020 JMPF R8 #0024
+ 0x50200200, // 0021 LDBOOL R8 1 0
+ 0x80041000, // 0022 RET 1 R8
+ 0x70020031, // 0023 JMP #0056
+ 0x54220004, // 0024 LDINT R8 5
+ 0x1C200C08, // 0025 EQ R8 R6 R8
+ 0x78220002, // 0026 JMPF R8 #002A
+ 0x50200200, // 0027 LDBOOL R8 1 0
+ 0x80041000, // 0028 RET 1 R8
+ 0x7002002B, // 0029 JMP #0056
+ 0x54220005, // 002A LDINT R8 6
+ 0x1C200C08, // 002B EQ R8 R6 R8
+ 0x78220028, // 002C JMPF R8 #0056
+ 0x1C200F06, // 002D EQ R8 R7 K6
+ 0x7822000A, // 002E JMPF R8 #003A
+ 0x8C20090B, // 002F GETMET R8 R4 K11
+ 0x60280013, // 0030 GETGBL R10 G19
+ 0x7C280000, // 0031 CALL R10 0
+ 0x502C0000, // 0032 LDBOOL R11 0 0
+ 0x982A180B, // 0033 SETIDX R10 K12 R11
+ 0x7C200400, // 0034 CALL R8 2
+ 0x8C20010D, // 0035 GETMET R8 R0 K13
+ 0x7C200200, // 0036 CALL R8 1
+ 0x50200200, // 0037 LDBOOL R8 1 0
+ 0x80041000, // 0038 RET 1 R8
+ 0x7002001B, // 0039 JMP #0056
+ 0x1C200F07, // 003A EQ R8 R7 K7
+ 0x7822000A, // 003B JMPF R8 #0047
+ 0x8C20090B, // 003C GETMET R8 R4 K11
+ 0x60280013, // 003D GETGBL R10 G19
+ 0x7C280000, // 003E CALL R10 0
+ 0x502C0200, // 003F LDBOOL R11 1 0
+ 0x982A180B, // 0040 SETIDX R10 K12 R11
+ 0x7C200400, // 0041 CALL R8 2
+ 0x8C20010D, // 0042 GETMET R8 R0 K13
+ 0x7C200200, // 0043 CALL R8 1
+ 0x50200200, // 0044 LDBOOL R8 1 0
+ 0x80041000, // 0045 RET 1 R8
+ 0x7002000E, // 0046 JMP #0056
+ 0x1C200F0E, // 0047 EQ R8 R7 K14
+ 0x7822000C, // 0048 JMPF R8 #0056
+ 0x8C20090B, // 0049 GETMET R8 R4 K11
+ 0x60280013, // 004A GETGBL R10 G19
+ 0x7C280000, // 004B CALL R10 0
+ 0x882C010F, // 004C GETMBR R11 R0 K15
+ 0x782E0000, // 004D JMPF R11 #004F
+ 0x502C0001, // 004E LDBOOL R11 0 1
+ 0x502C0200, // 004F LDBOOL R11 1 0
+ 0x982A180B, // 0050 SETIDX R10 K12 R11
+ 0x7C200400, // 0051 CALL R8 2
+ 0x8C20010D, // 0052 GETMET R8 R0 K13
+ 0x7C200200, // 0053 CALL R8 1
+ 0x50200200, // 0054 LDBOOL R8 1 0
+ 0x80041000, // 0055 RET 1 R8
+ 0x80000000, // 0056 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -219,140 +346,13 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
- be_nested_proto(
- 14, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[16]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(command),
- /* K5 */ be_const_int(3),
- /* K6 */ be_const_int(0),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str_weak(Matter_TLV_struct),
- /* K9 */ be_nested_str_weak(add_TLV),
- /* K10 */ be_nested_str_weak(U2),
- /* K11 */ be_nested_str_weak(set),
- /* K12 */ be_nested_str_weak(power),
- /* K13 */ be_nested_str_weak(update_shadow),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(shadow_onoff),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[87]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xB8160200, // 0001 GETNGBL R5 K1
- 0x88140B02, // 0002 GETMBR R5 R5 K2
- 0x88180703, // 0003 GETMBR R6 R3 K3
- 0x881C0704, // 0004 GETMBR R7 R3 K4
- 0x1C200D05, // 0005 EQ R8 R6 K5
- 0x78220016, // 0006 JMPF R8 #001E
- 0x1C200F06, // 0007 EQ R8 R7 K6
- 0x78220002, // 0008 JMPF R8 #000C
- 0x50200200, // 0009 LDBOOL R8 1 0
- 0x80041000, // 000A RET 1 R8
- 0x70020010, // 000B JMP #001D
- 0x1C200F07, // 000C EQ R8 R7 K7
- 0x78220009, // 000D JMPF R8 #0018
- 0x8C200B08, // 000E GETMET R8 R5 K8
- 0x7C200200, // 000F CALL R8 1
- 0x8C241109, // 0010 GETMET R9 R8 K9
- 0x582C0006, // 0011 LDCONST R11 K6
- 0x88300B0A, // 0012 GETMBR R12 R5 K10
- 0x58340006, // 0013 LDCONST R13 K6
- 0x7C240800, // 0014 CALL R9 4
- 0x900E0906, // 0015 SETMBR R3 K4 K6
- 0x80041000, // 0016 RET 1 R8
- 0x70020004, // 0017 JMP #001D
- 0x5422003F, // 0018 LDINT R8 64
- 0x1C200E08, // 0019 EQ R8 R7 R8
- 0x78220001, // 001A JMPF R8 #001D
- 0x50200200, // 001B LDBOOL R8 1 0
- 0x80041000, // 001C RET 1 R8
- 0x70020037, // 001D JMP #0056
- 0x54220003, // 001E LDINT R8 4
- 0x1C200C08, // 001F EQ R8 R6 R8
- 0x78220002, // 0020 JMPF R8 #0024
- 0x50200200, // 0021 LDBOOL R8 1 0
- 0x80041000, // 0022 RET 1 R8
- 0x70020031, // 0023 JMP #0056
- 0x54220004, // 0024 LDINT R8 5
- 0x1C200C08, // 0025 EQ R8 R6 R8
- 0x78220002, // 0026 JMPF R8 #002A
- 0x50200200, // 0027 LDBOOL R8 1 0
- 0x80041000, // 0028 RET 1 R8
- 0x7002002B, // 0029 JMP #0056
- 0x54220005, // 002A LDINT R8 6
- 0x1C200C08, // 002B EQ R8 R6 R8
- 0x78220028, // 002C JMPF R8 #0056
- 0x1C200F06, // 002D EQ R8 R7 K6
- 0x7822000A, // 002E JMPF R8 #003A
- 0x8C20090B, // 002F GETMET R8 R4 K11
- 0x60280013, // 0030 GETGBL R10 G19
- 0x7C280000, // 0031 CALL R10 0
- 0x502C0000, // 0032 LDBOOL R11 0 0
- 0x982A180B, // 0033 SETIDX R10 K12 R11
- 0x7C200400, // 0034 CALL R8 2
- 0x8C20010D, // 0035 GETMET R8 R0 K13
- 0x7C200200, // 0036 CALL R8 1
- 0x50200200, // 0037 LDBOOL R8 1 0
- 0x80041000, // 0038 RET 1 R8
- 0x7002001B, // 0039 JMP #0056
- 0x1C200F07, // 003A EQ R8 R7 K7
- 0x7822000A, // 003B JMPF R8 #0047
- 0x8C20090B, // 003C GETMET R8 R4 K11
- 0x60280013, // 003D GETGBL R10 G19
- 0x7C280000, // 003E CALL R10 0
- 0x502C0200, // 003F LDBOOL R11 1 0
- 0x982A180B, // 0040 SETIDX R10 K12 R11
- 0x7C200400, // 0041 CALL R8 2
- 0x8C20010D, // 0042 GETMET R8 R0 K13
- 0x7C200200, // 0043 CALL R8 1
- 0x50200200, // 0044 LDBOOL R8 1 0
- 0x80041000, // 0045 RET 1 R8
- 0x7002000E, // 0046 JMP #0056
- 0x1C200F0E, // 0047 EQ R8 R7 K14
- 0x7822000C, // 0048 JMPF R8 #0056
- 0x8C20090B, // 0049 GETMET R8 R4 K11
- 0x60280013, // 004A GETGBL R10 G19
- 0x7C280000, // 004B CALL R10 0
- 0x882C010F, // 004C GETMBR R11 R0 K15
- 0x782E0000, // 004D JMPF R11 #004F
- 0x502C0001, // 004E LDBOOL R11 0 1
- 0x502C0200, // 004F LDBOOL R11 1 0
- 0x982A180B, // 0050 SETIDX R10 K12 R11
- 0x7C200400, // 0051 CALL R8 2
- 0x8C20010D, // 0052 GETMET R8 R0 K13
- 0x7C200200, // 0053 CALL R8 1
- 0x50200200, // 0054 LDBOOL R8 1 0
- 0x80041000, // 0055 RET 1 R8
- 0x80000000, // 0056 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light0_init, /* name */
be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
+ 9, /* nstack */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -365,17 +365,18 @@ be_local_closure(Matter_Plugin_Light0_init, /* name */
}),
be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0700, // 0003 GETMET R3 R3 K0
- 0x5C140200, // 0004 MOVE R5 R1
- 0x5C180400, // 0005 MOVE R6 R2
- 0x7C0C0600, // 0006 CALL R3 3
- 0x500C0000, // 0007 LDBOOL R3 0 0
- 0x90020203, // 0008 SETMBR R0 K1 R3
- 0x80000000, // 0009 RET 0
+ ( &(const binstruction[11]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x50100000, // 0008 LDBOOL R4 0 0
+ 0x90020204, // 0009 SETMBR R0 K1 R4
+ 0x80000000, // 000A RET 0
})
)
);
@@ -389,11 +390,11 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Light0,
1,
&be_class_Matter_Plugin,
- be_nested_map(7,
+ be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
- { be_const_key_weak(CLUSTERS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
+ { be_const_key_weak(CLUSTERS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -431,14 +432,15 @@ be_local_class(Matter_Plugin_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(light0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(invoke_request, 2), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
- { be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
})),
be_str_weak(Matter_Plugin_Light0)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
index b19758c0f..54d712ba6 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
@@ -6,6 +6,158 @@
extern const bclass be_class_Matter_Plugin_Light1;
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light1_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_bri),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x90020302, // 0008 SETMBR R0 K1 K2
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_nested_str_weak(shadow_bri),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_const_int(3),
+ /* K11 */ be_nested_str_weak(U4),
+ /* K12 */ be_const_int(1),
+ /* K13 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[77]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0007, // 0005 LDINT R7 8
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E003B, // 0007 JMPF R7 #0044
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0005, // 0009 JMPF R7 #0010
+ 0x8C1C0906, // 000A GETMET R7 R4 K6
+ 0x88240907, // 000B GETMBR R9 R4 K7
+ 0x88280108, // 000C GETMBR R10 R0 K8
+ 0x7C1C0600, // 000D CALL R7 3
+ 0x80040E00, // 000E RET 1 R7
+ 0x70020032, // 000F JMP #0043
+ 0x1C1C0D09, // 0010 EQ R7 R6 K9
+ 0x781E0005, // 0011 JMPF R7 #0018
+ 0x8C1C0906, // 0012 GETMET R7 R4 K6
+ 0x88240907, // 0013 GETMBR R9 R4 K7
+ 0x58280005, // 0014 LDCONST R10 K5
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0x80040E00, // 0016 RET 1 R7
+ 0x7002002A, // 0017 JMP #0043
+ 0x1C1C0D0A, // 0018 EQ R7 R6 K10
+ 0x781E0005, // 0019 JMPF R7 #0020
+ 0x8C1C0906, // 001A GETMET R7 R4 K6
+ 0x88240907, // 001B GETMBR R9 R4 K7
+ 0x542A00FD, // 001C LDINT R10 254
+ 0x7C1C0600, // 001D CALL R7 3
+ 0x80040E00, // 001E RET 1 R7
+ 0x70020022, // 001F JMP #0043
+ 0x541E000E, // 0020 LDINT R7 15
+ 0x1C1C0C07, // 0021 EQ R7 R6 R7
+ 0x781E0005, // 0022 JMPF R7 #0029
+ 0x8C1C0906, // 0023 GETMET R7 R4 K6
+ 0x88240907, // 0024 GETMBR R9 R4 K7
+ 0x58280005, // 0025 LDCONST R10 K5
+ 0x7C1C0600, // 0026 CALL R7 3
+ 0x80040E00, // 0027 RET 1 R7
+ 0x70020019, // 0028 JMP #0043
+ 0x541E0010, // 0029 LDINT R7 17
+ 0x1C1C0C07, // 002A EQ R7 R6 R7
+ 0x781E0005, // 002B JMPF R7 #0032
+ 0x8C1C0906, // 002C GETMET R7 R4 K6
+ 0x88240907, // 002D GETMBR R9 R4 K7
+ 0x88280108, // 002E GETMBR R10 R0 K8
+ 0x7C1C0600, // 002F CALL R7 3
+ 0x80040E00, // 0030 RET 1 R7
+ 0x70020010, // 0031 JMP #0043
+ 0x541EFFFB, // 0032 LDINT R7 65532
+ 0x1C1C0C07, // 0033 EQ R7 R6 R7
+ 0x781E0005, // 0034 JMPF R7 #003B
+ 0x8C1C0906, // 0035 GETMET R7 R4 K6
+ 0x8824090B, // 0036 GETMBR R9 R4 K11
+ 0x5828000C, // 0037 LDCONST R10 K12
+ 0x7C1C0600, // 0038 CALL R7 3
+ 0x80040E00, // 0039 RET 1 R7
+ 0x70020007, // 003A JMP #0043
+ 0x541EFFFC, // 003B LDINT R7 65533
+ 0x1C1C0C07, // 003C EQ R7 R6 R7
+ 0x781E0004, // 003D JMPF R7 #0043
+ 0x8C1C0906, // 003E GETMET R7 R4 K6
+ 0x8824090B, // 003F GETMBR R9 R4 K11
+ 0x542A0004, // 0040 LDINT R10 5
+ 0x7C1C0600, // 0041 CALL R7 3
+ 0x80040E00, // 0042 RET 1 R7
+ 0x70020007, // 0043 JMP #004C
+ 0x601C0003, // 0044 GETGBL R7 G3
+ 0x5C200000, // 0045 MOVE R8 R0
+ 0x7C1C0200, // 0046 CALL R7 1
+ 0x8C1C0F0D, // 0047 GETMET R7 R7 K13
+ 0x5C240200, // 0048 MOVE R9 R1
+ 0x5C280400, // 0049 MOVE R10 R2
+ 0x7C1C0600, // 004A CALL R7 3
+ 0x80040E00, // 004B RET 1 R7
+ 0x80000000, // 004C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -229,157 +381,6 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Light1_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_bri),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0700, // 0003 GETMET R3 R3 K0
- 0x5C140200, // 0004 MOVE R5 R1
- 0x5C180400, // 0005 MOVE R6 R2
- 0x7C0C0600, // 0006 CALL R3 3
- 0x90020302, // 0007 SETMBR R0 K1 K2
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
- be_nested_proto(
- 11, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_bri),
- /* K9 */ be_const_int(2),
- /* K10 */ be_const_int(3),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_const_int(1),
- /* K13 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[77]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E0007, // 0005 LDINT R7 8
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E003B, // 0007 JMPF R7 #0044
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x70020032, // 000F JMP #0043
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x58280005, // 0014 LDCONST R10 K5
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x7002002A, // 0017 JMP #0043
- 0x1C1C0D0A, // 0018 EQ R7 R6 K10
- 0x781E0005, // 0019 JMPF R7 #0020
- 0x8C1C0906, // 001A GETMET R7 R4 K6
- 0x88240907, // 001B GETMBR R9 R4 K7
- 0x542A00FD, // 001C LDINT R10 254
- 0x7C1C0600, // 001D CALL R7 3
- 0x80040E00, // 001E RET 1 R7
- 0x70020022, // 001F JMP #0043
- 0x541E000E, // 0020 LDINT R7 15
- 0x1C1C0C07, // 0021 EQ R7 R6 R7
- 0x781E0005, // 0022 JMPF R7 #0029
- 0x8C1C0906, // 0023 GETMET R7 R4 K6
- 0x88240907, // 0024 GETMBR R9 R4 K7
- 0x58280005, // 0025 LDCONST R10 K5
- 0x7C1C0600, // 0026 CALL R7 3
- 0x80040E00, // 0027 RET 1 R7
- 0x70020019, // 0028 JMP #0043
- 0x541E0010, // 0029 LDINT R7 17
- 0x1C1C0C07, // 002A EQ R7 R6 R7
- 0x781E0005, // 002B JMPF R7 #0032
- 0x8C1C0906, // 002C GETMET R7 R4 K6
- 0x88240907, // 002D GETMBR R9 R4 K7
- 0x88280108, // 002E GETMBR R10 R0 K8
- 0x7C1C0600, // 002F CALL R7 3
- 0x80040E00, // 0030 RET 1 R7
- 0x70020010, // 0031 JMP #0043
- 0x541EFFFB, // 0032 LDINT R7 65532
- 0x1C1C0C07, // 0033 EQ R7 R6 R7
- 0x781E0005, // 0034 JMPF R7 #003B
- 0x8C1C0906, // 0035 GETMET R7 R4 K6
- 0x8824090B, // 0036 GETMBR R9 R4 K11
- 0x5828000C, // 0037 LDCONST R10 K12
- 0x7C1C0600, // 0038 CALL R7 3
- 0x80040E00, // 0039 RET 1 R7
- 0x70020007, // 003A JMP #0043
- 0x541EFFFC, // 003B LDINT R7 65533
- 0x1C1C0C07, // 003C EQ R7 R6 R7
- 0x781E0004, // 003D JMPF R7 #0043
- 0x8C1C0906, // 003E GETMET R7 R4 K6
- 0x8824090B, // 003F GETMBR R9 R4 K11
- 0x542A0004, // 0040 LDINT R10 5
- 0x7C1C0600, // 0041 CALL R7 3
- 0x80040E00, // 0042 RET 1 R7
- 0x70020007, // 0043 JMP #004C
- 0x601C0003, // 0044 GETGBL R7 G3
- 0x5C200000, // 0045 MOVE R8 R0
- 0x7C1C0200, // 0046 CALL R7 1
- 0x8C1C0F0D, // 0047 GETMET R7 R7 K13
- 0x5C240200, // 0048 MOVE R9 R1
- 0x5C280400, // 0049 MOVE R10 R2
- 0x7C1C0600, // 004A CALL R7 3
- 0x80040E00, // 004B RET 1 R7
- 0x80000000, // 004C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_Light1
********************************************************************/
@@ -387,19 +388,15 @@ extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_Light1,
1,
&be_class_Matter_Plugin_Light0,
- be_nested_map(7,
+ be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
- { be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
- { be_const_key_weak(shadow_bri, -1), be_const_var(0) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(update_shadow, 6), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
+ { be_const_key_weak(CLUSTERS, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -414,6 +411,11 @@ be_local_class(Matter_Plugin_Light1,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light1_init_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
+ { be_const_key_weak(shadow_bri, 4), be_const_var(0) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(light1) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Light1)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
index d572d80e2..3ca7c0915 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
@@ -6,206 +6,6 @@
extern const bclass be_class_Matter_Plugin_Light2;
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
- be_nested_proto(
- 11, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(create_TLV),
- /* K6 */ be_nested_str_weak(U1),
- /* K7 */ be_nested_str_weak(shadow_ct),
- /* K8 */ be_const_int(2),
- /* K9 */ be_const_int(0),
- /* K10 */ be_nested_str_weak(ct_min),
- /* K11 */ be_nested_str_weak(ct_max),
- /* K12 */ be_nested_str_weak(U4),
- /* K13 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[80]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E02FF, // 0005 LDINT R7 768
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E003E, // 0007 JMPF R7 #0047
- 0x541E0006, // 0008 LDINT R7 7
- 0x1C1C0C07, // 0009 EQ R7 R6 R7
- 0x781E0005, // 000A JMPF R7 #0011
- 0x8C1C0905, // 000B GETMET R7 R4 K5
- 0x88240906, // 000C GETMBR R9 R4 K6
- 0x88280107, // 000D GETMBR R10 R0 K7
- 0x7C1C0600, // 000E CALL R7 3
- 0x80040E00, // 000F RET 1 R7
- 0x70020034, // 0010 JMP #0046
- 0x541E0007, // 0011 LDINT R7 8
- 0x1C1C0C07, // 0012 EQ R7 R6 R7
- 0x781E0005, // 0013 JMPF R7 #001A
- 0x8C1C0905, // 0014 GETMET R7 R4 K5
- 0x88240906, // 0015 GETMBR R9 R4 K6
- 0x58280008, // 0016 LDCONST R10 K8
- 0x7C1C0600, // 0017 CALL R7 3
- 0x80040E00, // 0018 RET 1 R7
- 0x7002002B, // 0019 JMP #0046
- 0x541E000E, // 001A LDINT R7 15
- 0x1C1C0C07, // 001B EQ R7 R6 R7
- 0x781E0005, // 001C JMPF R7 #0023
- 0x8C1C0905, // 001D GETMET R7 R4 K5
- 0x88240906, // 001E GETMBR R9 R4 K6
- 0x58280009, // 001F LDCONST R10 K9
- 0x7C1C0600, // 0020 CALL R7 3
- 0x80040E00, // 0021 RET 1 R7
- 0x70020022, // 0022 JMP #0046
- 0x541E400A, // 0023 LDINT R7 16395
- 0x1C1C0C07, // 0024 EQ R7 R6 R7
- 0x781E0005, // 0025 JMPF R7 #002C
- 0x8C1C0905, // 0026 GETMET R7 R4 K5
- 0x88240906, // 0027 GETMBR R9 R4 K6
- 0x8828010A, // 0028 GETMBR R10 R0 K10
- 0x7C1C0600, // 0029 CALL R7 3
- 0x80040E00, // 002A RET 1 R7
- 0x70020019, // 002B JMP #0046
- 0x541E400B, // 002C LDINT R7 16396
- 0x1C1C0C07, // 002D EQ R7 R6 R7
- 0x781E0005, // 002E JMPF R7 #0035
- 0x8C1C0905, // 002F GETMET R7 R4 K5
- 0x88240906, // 0030 GETMBR R9 R4 K6
- 0x8828010B, // 0031 GETMBR R10 R0 K11
- 0x7C1C0600, // 0032 CALL R7 3
- 0x80040E00, // 0033 RET 1 R7
- 0x70020010, // 0034 JMP #0046
- 0x541EFFFB, // 0035 LDINT R7 65532
- 0x1C1C0C07, // 0036 EQ R7 R6 R7
- 0x781E0005, // 0037 JMPF R7 #003E
- 0x8C1C0905, // 0038 GETMET R7 R4 K5
- 0x8824090C, // 0039 GETMBR R9 R4 K12
- 0x542A000F, // 003A LDINT R10 16
- 0x7C1C0600, // 003B CALL R7 3
- 0x80040E00, // 003C RET 1 R7
- 0x70020007, // 003D JMP #0046
- 0x541EFFFC, // 003E LDINT R7 65533
- 0x1C1C0C07, // 003F EQ R7 R6 R7
- 0x781E0004, // 0040 JMPF R7 #0046
- 0x8C1C0905, // 0041 GETMET R7 R4 K5
- 0x8824090C, // 0042 GETMBR R9 R4 K12
- 0x542A0004, // 0043 LDINT R10 5
- 0x7C1C0600, // 0044 CALL R7 3
- 0x80040E00, // 0045 RET 1 R7
- 0x70020007, // 0046 JMP #004F
- 0x601C0003, // 0047 GETGBL R7 G3
- 0x5C200000, // 0048 MOVE R8 R0
- 0x7C1C0200, // 0049 CALL R7 1
- 0x8C1C0F0D, // 004A GETMET R7 R7 K13
- 0x5C240200, // 004B MOVE R9 R1
- 0x5C280400, // 004C MOVE R10 R2
- 0x7C1C0600, // 004D CALL R7 3
- 0x80040E00, // 004E RET 1 R7
- 0x80000000, // 004F RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Light2_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_ct),
- /* K2 */ be_nested_str_weak(update_ct_minmax),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0700, // 0003 GETMET R3 R3 K0
- 0x5C140200, // 0004 MOVE R5 R1
- 0x5C180400, // 0005 MOVE R6 R2
- 0x7C0C0600, // 0006 CALL R3 3
- 0x540E0144, // 0007 LDINT R3 325
- 0x90020203, // 0008 SETMBR R0 K1 R3
- 0x8C0C0102, // 0009 GETMET R3 R0 K2
- 0x7C0C0200, // 000A CALL R3 1
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_ct_minmax
-********************************************************************/
-be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(get_option),
- /* K2 */ be_nested_str_weak(ct_min),
- /* K3 */ be_nested_str_weak(ct_max),
- }),
- be_str_weak(update_ct_minmax),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x540E0051, // 0002 LDINT R3 82
- 0x7C040400, // 0003 CALL R1 2
- 0x78060001, // 0004 JMPF R1 #0007
- 0x540A00C7, // 0005 LDINT R2 200
- 0x70020000, // 0006 JMP #0008
- 0x540A0098, // 0007 LDINT R2 153
- 0x90020402, // 0008 SETMBR R0 K2 R2
- 0x78060001, // 0009 JMPF R1 #000C
- 0x540A017B, // 000A LDINT R2 380
- 0x70020000, // 000B JMP #000D
- 0x540A01F3, // 000C LDINT R2 500
- 0x90020602, // 000D SETMBR R0 K3 R2
- 0x80000000, // 000E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -370,6 +170,207 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(create_TLV),
+ /* K6 */ be_nested_str_weak(U1),
+ /* K7 */ be_nested_str_weak(shadow_ct),
+ /* K8 */ be_const_int(2),
+ /* K9 */ be_const_int(0),
+ /* K10 */ be_nested_str_weak(ct_min),
+ /* K11 */ be_nested_str_weak(ct_max),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[80]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E02FF, // 0005 LDINT R7 768
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E003E, // 0007 JMPF R7 #0047
+ 0x541E0006, // 0008 LDINT R7 7
+ 0x1C1C0C07, // 0009 EQ R7 R6 R7
+ 0x781E0005, // 000A JMPF R7 #0011
+ 0x8C1C0905, // 000B GETMET R7 R4 K5
+ 0x88240906, // 000C GETMBR R9 R4 K6
+ 0x88280107, // 000D GETMBR R10 R0 K7
+ 0x7C1C0600, // 000E CALL R7 3
+ 0x80040E00, // 000F RET 1 R7
+ 0x70020034, // 0010 JMP #0046
+ 0x541E0007, // 0011 LDINT R7 8
+ 0x1C1C0C07, // 0012 EQ R7 R6 R7
+ 0x781E0005, // 0013 JMPF R7 #001A
+ 0x8C1C0905, // 0014 GETMET R7 R4 K5
+ 0x88240906, // 0015 GETMBR R9 R4 K6
+ 0x58280008, // 0016 LDCONST R10 K8
+ 0x7C1C0600, // 0017 CALL R7 3
+ 0x80040E00, // 0018 RET 1 R7
+ 0x7002002B, // 0019 JMP #0046
+ 0x541E000E, // 001A LDINT R7 15
+ 0x1C1C0C07, // 001B EQ R7 R6 R7
+ 0x781E0005, // 001C JMPF R7 #0023
+ 0x8C1C0905, // 001D GETMET R7 R4 K5
+ 0x88240906, // 001E GETMBR R9 R4 K6
+ 0x58280009, // 001F LDCONST R10 K9
+ 0x7C1C0600, // 0020 CALL R7 3
+ 0x80040E00, // 0021 RET 1 R7
+ 0x70020022, // 0022 JMP #0046
+ 0x541E400A, // 0023 LDINT R7 16395
+ 0x1C1C0C07, // 0024 EQ R7 R6 R7
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0905, // 0026 GETMET R7 R4 K5
+ 0x88240906, // 0027 GETMBR R9 R4 K6
+ 0x8828010A, // 0028 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x70020019, // 002B JMP #0046
+ 0x541E400B, // 002C LDINT R7 16396
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0005, // 002E JMPF R7 #0035
+ 0x8C1C0905, // 002F GETMET R7 R4 K5
+ 0x88240906, // 0030 GETMBR R9 R4 K6
+ 0x8828010B, // 0031 GETMBR R10 R0 K11
+ 0x7C1C0600, // 0032 CALL R7 3
+ 0x80040E00, // 0033 RET 1 R7
+ 0x70020010, // 0034 JMP #0046
+ 0x541EFFFB, // 0035 LDINT R7 65532
+ 0x1C1C0C07, // 0036 EQ R7 R6 R7
+ 0x781E0005, // 0037 JMPF R7 #003E
+ 0x8C1C0905, // 0038 GETMET R7 R4 K5
+ 0x8824090C, // 0039 GETMBR R9 R4 K12
+ 0x542A000F, // 003A LDINT R10 16
+ 0x7C1C0600, // 003B CALL R7 3
+ 0x80040E00, // 003C RET 1 R7
+ 0x70020007, // 003D JMP #0046
+ 0x541EFFFC, // 003E LDINT R7 65533
+ 0x1C1C0C07, // 003F EQ R7 R6 R7
+ 0x781E0004, // 0040 JMPF R7 #0046
+ 0x8C1C0905, // 0041 GETMET R7 R4 K5
+ 0x8824090C, // 0042 GETMBR R9 R4 K12
+ 0x542A0004, // 0043 LDINT R10 5
+ 0x7C1C0600, // 0044 CALL R7 3
+ 0x80040E00, // 0045 RET 1 R7
+ 0x70020007, // 0046 JMP #004F
+ 0x601C0003, // 0047 GETGBL R7 G3
+ 0x5C200000, // 0048 MOVE R8 R0
+ 0x7C1C0200, // 0049 CALL R7 1
+ 0x8C1C0F0D, // 004A GETMET R7 R7 K13
+ 0x5C240200, // 004B MOVE R9 R1
+ 0x5C280400, // 004C MOVE R10 R2
+ 0x7C1C0600, // 004D CALL R7 3
+ 0x80040E00, // 004E RET 1 R7
+ 0x80000000, // 004F RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light2_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_ct),
+ /* K2 */ be_nested_str_weak(update_ct_minmax),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x54120144, // 0008 LDINT R4 325
+ 0x90020204, // 0009 SETMBR R0 K1 R4
+ 0x8C100102, // 000A GETMET R4 R0 K2
+ 0x7C100200, // 000B CALL R4 1
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_ct_minmax
+********************************************************************/
+be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(get_option),
+ /* K2 */ be_nested_str_weak(ct_min),
+ /* K3 */ be_nested_str_weak(ct_max),
+ }),
+ be_str_weak(update_ct_minmax),
+ &be_const_str_solidified,
+ ( &(const binstruction[15]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x540E0051, // 0002 LDINT R3 82
+ 0x7C040400, // 0003 CALL R1 2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x540A00C7, // 0005 LDINT R2 200
+ 0x70020000, // 0006 JMP #0008
+ 0x540A0098, // 0007 LDINT R2 153
+ 0x90020402, // 0008 SETMBR R0 K2 R2
+ 0x78060001, // 0009 JMPF R1 #000C
+ 0x540A017B, // 000A LDINT R2 380
+ 0x70020000, // 000B JMP #000D
+ 0x540A01F3, // 000C LDINT R2 500
+ 0x90020602, // 000D SETMBR R0 K3 R2
+ 0x80000000, // 000E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Light2
********************************************************************/
@@ -377,17 +378,19 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light2,
3,
&be_class_Matter_Plugin_Light1,
- be_nested_map(10,
+ be_nested_map(11,
( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
+ { be_const_key_weak(NAME, 5), be_nested_str_weak(light2) },
+ { be_const_key_weak(read_attribute, 8), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(shadow_ct, -1), be_const_var(0) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
- { be_const_key_weak(ct_min, 8), be_const_var(1) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(ct_min, 1), be_const_var(1) },
+ { be_const_key_weak(CLUSTERS, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -402,11 +405,10 @@ be_local_class(Matter_Plugin_Light2,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
- { be_const_key_weak(update_ct_minmax, 6), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
+ { be_const_key_weak(shadow_ct, -1), be_const_var(0) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
+ { be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Light2)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
index 2c86c864a..da74ed5c4 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
@@ -6,186 +6,6 @@
extern const bclass be_class_Matter_Plugin_Light3;
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Light3_init, /* name */
- be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_hue),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(shadow_sat),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0700, // 0003 GETMET R3 R3 K0
- 0x5C140200, // 0004 MOVE R5 R1
- 0x5C180400, // 0005 MOVE R6 R2
- 0x7C0C0600, // 0006 CALL R3 3
- 0x90020302, // 0007 SETMBR R0 K1 K2
- 0x90020702, // 0008 SETMBR R0 K3 K2
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
- be_nested_proto(
- 11, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_hue),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(shadow_sat),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[105]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E02FF, // 0005 LDINT R7 768
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E0057, // 0007 JMPF R7 #0060
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x7002004E, // 000F JMP #005F
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x8828010A, // 0014 GETMBR R10 R0 K10
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x70020046, // 0017 JMP #005F
- 0x541E0006, // 0018 LDINT R7 7
- 0x1C1C0C07, // 0019 EQ R7 R6 R7
- 0x781E0005, // 001A JMPF R7 #0021
- 0x8C1C0906, // 001B GETMET R7 R4 K6
- 0x88240907, // 001C GETMBR R9 R4 K7
- 0x58280005, // 001D LDCONST R10 K5
- 0x7C1C0600, // 001E CALL R7 3
- 0x80040E00, // 001F RET 1 R7
- 0x7002003D, // 0020 JMP #005F
- 0x541E0007, // 0021 LDINT R7 8
- 0x1C1C0C07, // 0022 EQ R7 R6 R7
- 0x781E0005, // 0023 JMPF R7 #002A
- 0x8C1C0906, // 0024 GETMET R7 R4 K6
- 0x88240907, // 0025 GETMBR R9 R4 K7
- 0x58280005, // 0026 LDCONST R10 K5
- 0x7C1C0600, // 0027 CALL R7 3
- 0x80040E00, // 0028 RET 1 R7
- 0x70020034, // 0029 JMP #005F
- 0x541E000E, // 002A LDINT R7 15
- 0x1C1C0C07, // 002B EQ R7 R6 R7
- 0x781E0005, // 002C JMPF R7 #0033
- 0x8C1C0906, // 002D GETMET R7 R4 K6
- 0x88240907, // 002E GETMBR R9 R4 K7
- 0x58280005, // 002F LDCONST R10 K5
- 0x7C1C0600, // 0030 CALL R7 3
- 0x80040E00, // 0031 RET 1 R7
- 0x7002002B, // 0032 JMP #005F
- 0x541E4000, // 0033 LDINT R7 16385
- 0x1C1C0C07, // 0034 EQ R7 R6 R7
- 0x781E0005, // 0035 JMPF R7 #003C
- 0x8C1C0906, // 0036 GETMET R7 R4 K6
- 0x88240907, // 0037 GETMBR R9 R4 K7
- 0x58280005, // 0038 LDCONST R10 K5
- 0x7C1C0600, // 0039 CALL R7 3
- 0x80040E00, // 003A RET 1 R7
- 0x70020022, // 003B JMP #005F
- 0x541E4009, // 003C LDINT R7 16394
- 0x1C1C0C07, // 003D EQ R7 R6 R7
- 0x781E0005, // 003E JMPF R7 #0045
- 0x8C1C0906, // 003F GETMET R7 R4 K6
- 0x88240907, // 0040 GETMBR R9 R4 K7
- 0x58280005, // 0041 LDCONST R10 K5
- 0x7C1C0600, // 0042 CALL R7 3
- 0x80040E00, // 0043 RET 1 R7
- 0x70020019, // 0044 JMP #005F
- 0x541E000F, // 0045 LDINT R7 16
- 0x1C1C0C07, // 0046 EQ R7 R6 R7
- 0x781E0005, // 0047 JMPF R7 #004E
- 0x8C1C0906, // 0048 GETMET R7 R4 K6
- 0x88240907, // 0049 GETMBR R9 R4 K7
- 0x58280005, // 004A LDCONST R10 K5
- 0x7C1C0600, // 004B CALL R7 3
- 0x80040E00, // 004C RET 1 R7
- 0x70020010, // 004D JMP #005F
- 0x541EFFFB, // 004E LDINT R7 65532
- 0x1C1C0C07, // 004F EQ R7 R6 R7
- 0x781E0005, // 0050 JMPF R7 #0057
- 0x8C1C0906, // 0051 GETMET R7 R4 K6
- 0x8824090B, // 0052 GETMBR R9 R4 K11
- 0x58280009, // 0053 LDCONST R10 K9
- 0x7C1C0600, // 0054 CALL R7 3
- 0x80040E00, // 0055 RET 1 R7
- 0x70020007, // 0056 JMP #005F
- 0x541EFFFC, // 0057 LDINT R7 65533
- 0x1C1C0C07, // 0058 EQ R7 R6 R7
- 0x781E0004, // 0059 JMPF R7 #005F
- 0x8C1C0906, // 005A GETMET R7 R4 K6
- 0x8824090B, // 005B GETMBR R9 R4 K11
- 0x542A0004, // 005C LDINT R10 5
- 0x7C1C0600, // 005D CALL R7 3
- 0x80040E00, // 005E RET 1 R7
- 0x70020007, // 005F JMP #0068
- 0x601C0003, // 0060 GETGBL R7 G3
- 0x5C200000, // 0061 MOVE R8 R0
- 0x7C1C0200, // 0062 CALL R7 1
- 0x8C1C0F0C, // 0063 GETMET R7 R7 K12
- 0x5C240200, // 0064 MOVE R9 R1
- 0x5C280400, // 0065 MOVE R10 R2
- 0x7C1C0600, // 0066 CALL R7 3
- 0x80040E00, // 0067 RET 1 R7
- 0x80000000, // 0068 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -379,6 +199,148 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_nested_str_weak(shadow_hue),
+ /* K9 */ be_const_int(1),
+ /* K10 */ be_nested_str_weak(shadow_sat),
+ /* K11 */ be_nested_str_weak(U4),
+ /* K12 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[105]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E02FF, // 0005 LDINT R7 768
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0057, // 0007 JMPF R7 #0060
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0005, // 0009 JMPF R7 #0010
+ 0x8C1C0906, // 000A GETMET R7 R4 K6
+ 0x88240907, // 000B GETMBR R9 R4 K7
+ 0x88280108, // 000C GETMBR R10 R0 K8
+ 0x7C1C0600, // 000D CALL R7 3
+ 0x80040E00, // 000E RET 1 R7
+ 0x7002004E, // 000F JMP #005F
+ 0x1C1C0D09, // 0010 EQ R7 R6 K9
+ 0x781E0005, // 0011 JMPF R7 #0018
+ 0x8C1C0906, // 0012 GETMET R7 R4 K6
+ 0x88240907, // 0013 GETMBR R9 R4 K7
+ 0x8828010A, // 0014 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0x80040E00, // 0016 RET 1 R7
+ 0x70020046, // 0017 JMP #005F
+ 0x541E0006, // 0018 LDINT R7 7
+ 0x1C1C0C07, // 0019 EQ R7 R6 R7
+ 0x781E0005, // 001A JMPF R7 #0021
+ 0x8C1C0906, // 001B GETMET R7 R4 K6
+ 0x88240907, // 001C GETMBR R9 R4 K7
+ 0x58280005, // 001D LDCONST R10 K5
+ 0x7C1C0600, // 001E CALL R7 3
+ 0x80040E00, // 001F RET 1 R7
+ 0x7002003D, // 0020 JMP #005F
+ 0x541E0007, // 0021 LDINT R7 8
+ 0x1C1C0C07, // 0022 EQ R7 R6 R7
+ 0x781E0005, // 0023 JMPF R7 #002A
+ 0x8C1C0906, // 0024 GETMET R7 R4 K6
+ 0x88240907, // 0025 GETMBR R9 R4 K7
+ 0x58280005, // 0026 LDCONST R10 K5
+ 0x7C1C0600, // 0027 CALL R7 3
+ 0x80040E00, // 0028 RET 1 R7
+ 0x70020034, // 0029 JMP #005F
+ 0x541E000E, // 002A LDINT R7 15
+ 0x1C1C0C07, // 002B EQ R7 R6 R7
+ 0x781E0005, // 002C JMPF R7 #0033
+ 0x8C1C0906, // 002D GETMET R7 R4 K6
+ 0x88240907, // 002E GETMBR R9 R4 K7
+ 0x58280005, // 002F LDCONST R10 K5
+ 0x7C1C0600, // 0030 CALL R7 3
+ 0x80040E00, // 0031 RET 1 R7
+ 0x7002002B, // 0032 JMP #005F
+ 0x541E4000, // 0033 LDINT R7 16385
+ 0x1C1C0C07, // 0034 EQ R7 R6 R7
+ 0x781E0005, // 0035 JMPF R7 #003C
+ 0x8C1C0906, // 0036 GETMET R7 R4 K6
+ 0x88240907, // 0037 GETMBR R9 R4 K7
+ 0x58280005, // 0038 LDCONST R10 K5
+ 0x7C1C0600, // 0039 CALL R7 3
+ 0x80040E00, // 003A RET 1 R7
+ 0x70020022, // 003B JMP #005F
+ 0x541E4009, // 003C LDINT R7 16394
+ 0x1C1C0C07, // 003D EQ R7 R6 R7
+ 0x781E0005, // 003E JMPF R7 #0045
+ 0x8C1C0906, // 003F GETMET R7 R4 K6
+ 0x88240907, // 0040 GETMBR R9 R4 K7
+ 0x58280005, // 0041 LDCONST R10 K5
+ 0x7C1C0600, // 0042 CALL R7 3
+ 0x80040E00, // 0043 RET 1 R7
+ 0x70020019, // 0044 JMP #005F
+ 0x541E000F, // 0045 LDINT R7 16
+ 0x1C1C0C07, // 0046 EQ R7 R6 R7
+ 0x781E0005, // 0047 JMPF R7 #004E
+ 0x8C1C0906, // 0048 GETMET R7 R4 K6
+ 0x88240907, // 0049 GETMBR R9 R4 K7
+ 0x58280005, // 004A LDCONST R10 K5
+ 0x7C1C0600, // 004B CALL R7 3
+ 0x80040E00, // 004C RET 1 R7
+ 0x70020010, // 004D JMP #005F
+ 0x541EFFFB, // 004E LDINT R7 65532
+ 0x1C1C0C07, // 004F EQ R7 R6 R7
+ 0x781E0005, // 0050 JMPF R7 #0057
+ 0x8C1C0906, // 0051 GETMET R7 R4 K6
+ 0x8824090B, // 0052 GETMBR R9 R4 K11
+ 0x58280009, // 0053 LDCONST R10 K9
+ 0x7C1C0600, // 0054 CALL R7 3
+ 0x80040E00, // 0055 RET 1 R7
+ 0x70020007, // 0056 JMP #005F
+ 0x541EFFFC, // 0057 LDINT R7 65533
+ 0x1C1C0C07, // 0058 EQ R7 R6 R7
+ 0x781E0004, // 0059 JMPF R7 #005F
+ 0x8C1C0906, // 005A GETMET R7 R4 K6
+ 0x8824090B, // 005B GETMBR R9 R4 K11
+ 0x542A0004, // 005C LDINT R10 5
+ 0x7C1C0600, // 005D CALL R7 3
+ 0x80040E00, // 005E RET 1 R7
+ 0x70020007, // 005F JMP #0068
+ 0x601C0003, // 0060 GETGBL R7 G3
+ 0x5C200000, // 0061 MOVE R8 R0
+ 0x7C1C0200, // 0062 CALL R7 1
+ 0x8C1C0F0C, // 0063 GETMET R7 R7 K12
+ 0x5C240200, // 0064 MOVE R9 R1
+ 0x5C280400, // 0065 MOVE R10 R2
+ 0x7C1C0600, // 0066 CALL R7 3
+ 0x80040E00, // 0067 RET 1 R7
+ 0x80000000, // 0068 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
@@ -479,6 +441,45 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light3_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_hue),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(shadow_sat),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x90020302, // 0008 SETMBR R0 K1 K2
+ 0x90020702, // 0009 SETMBR R0 K3 K2
+ 0x80000000, // 000A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Light3
********************************************************************/
@@ -486,9 +487,21 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light3,
2,
&be_class_Matter_Plugin_Light1,
- be_nested_map(8,
+ be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
+ { be_const_key_weak(shadow_sat, -1), be_const_var(1) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(269, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(light3) },
+ { be_const_key_weak(shadow_hue, 8), be_const_var(0) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -505,17 +518,6 @@ be_local_class(Matter_Plugin_Light3,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
- { be_const_key_weak(TYPES, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(269, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light3_init_closure) },
- { be_const_key_weak(shadow_hue, -1), be_const_var(0) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
- { be_const_key_weak(shadow_sat, -1), be_const_var(1) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Light3)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
index f0ecd333d..24b8911b4 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
@@ -6,6 +6,101 @@
extern const bclass be_class_Matter_Plugin_OnOff;
+/********************************************************************
+** Solidified function: get_onoff
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(get_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(shadow_onoff),
+ /* K4 */ be_nested_str_weak(onoff_changed),
+ }),
+ be_str_weak(get_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x880C0102, // 0002 GETMBR R3 R0 K2
+ 0x7C040400, // 0003 CALL R1 2
+ 0x4C080000, // 0004 LDNIL R2
+ 0x20080202, // 0005 NE R2 R1 R2
+ 0x780A000C, // 0006 JMPF R2 #0014
+ 0x88080103, // 0007 GETMBR R2 R0 K3
+ 0x4C0C0000, // 0008 LDNIL R3
+ 0x20080403, // 0009 NE R2 R2 R3
+ 0x780A0007, // 000A JMPF R2 #0013
+ 0x88080103, // 000B GETMBR R2 R0 K3
+ 0x600C0017, // 000C GETGBL R3 G23
+ 0x5C100200, // 000D MOVE R4 R1
+ 0x7C0C0200, // 000E CALL R3 1
+ 0x20080403, // 000F NE R2 R2 R3
+ 0x780A0001, // 0010 JMPF R2 #0013
+ 0x8C080104, // 0011 GETMET R2 R0 K4
+ 0x7C080200, // 0012 CALL R2 1
+ 0x90020601, // 0013 SETMBR R0 K3 R1
+ 0x88080103, // 0014 GETMBR R2 R0 K3
+ 0x4C0C0000, // 0015 LDNIL R3
+ 0x1C080403, // 0016 EQ R2 R2 R3
+ 0x780A0001, // 0017 JMPF R2 #001A
+ 0x50080000, // 0018 LDBOOL R2 0 0
+ 0x90020602, // 0019 SETMBR R0 K3 R2
+ 0x88080103, // 001A GETMBR R2 R0 K3
+ 0x80040400, // 001B RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_onoff
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(get_onoff),
+ }),
+ be_str_weak(set_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x60140017, // 0003 GETGBL R5 G23
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x7C140200, // 0005 CALL R5 1
+ 0x7C080600, // 0006 CALL R2 3
+ 0x8C080103, // 0007 GETMET R2 R0 K3
+ 0x7C080200, // 0008 CALL R2 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -163,56 +258,49 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
/********************************************************************
-** Solidified function: get_onoff
+** Solidified function: init
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
+be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
+ 9, /* nstack */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(get_power),
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(get_onoff),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(shadow_onoff),
- /* K4 */ be_nested_str_weak(onoff_changed),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(relay),
+ /* K5 */ be_const_int(0),
}),
- be_str_weak(get_onoff),
+ be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x880C0102, // 0002 GETMBR R3 R0 K2
- 0x7C040400, // 0003 CALL R1 2
- 0x4C080000, // 0004 LDNIL R2
- 0x20080202, // 0005 NE R2 R1 R2
- 0x780A000C, // 0006 JMPF R2 #0014
- 0x88080103, // 0007 GETMBR R2 R0 K3
- 0x4C0C0000, // 0008 LDNIL R3
- 0x20080403, // 0009 NE R2 R2 R3
- 0x780A0007, // 000A JMPF R2 #0013
- 0x88080103, // 000B GETMBR R2 R0 K3
- 0x600C0017, // 000C GETGBL R3 G23
- 0x5C100200, // 000D MOVE R4 R1
- 0x7C0C0200, // 000E CALL R3 1
- 0x20080403, // 000F NE R2 R2 R3
- 0x780A0001, // 0010 JMPF R2 #0013
- 0x8C080104, // 0011 GETMET R2 R0 K4
- 0x7C080200, // 0012 CALL R2 1
- 0x90020601, // 0013 SETMBR R0 K3 R1
- 0x88080103, // 0014 GETMBR R2 R0 K3
- 0x4C0C0000, // 0015 LDNIL R3
- 0x1C080403, // 0016 EQ R2 R2 R3
- 0x780A0001, // 0017 JMPF R2 #001A
- 0x50080000, // 0018 LDBOOL R2 0 0
- 0x90020602, // 0019 SETMBR R0 K3 R2
- 0x88080103, // 001A GETMBR R2 R0 K3
- 0x80040400, // 001B RET 1 R2
+ ( &(const binstruction[20]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 0x7C100200, // 0009 CALL R4 1
+ 0x8C100703, // 000A GETMET R4 R3 K3
+ 0x58180004, // 000B LDCONST R6 K4
+ 0x7C100400, // 000C CALL R4 2
+ 0x90020404, // 000D SETMBR R0 K2 R4
+ 0x88100102, // 000E GETMBR R4 R0 K2
+ 0x4C140000, // 000F LDNIL R5
+ 0x1C100805, // 0010 EQ R4 R4 R5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020505, // 0012 SETMBR R0 K2 K5
+ 0x80000000, // 0013 RET 0
})
)
);
@@ -252,9 +340,9 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
/********************************************************************
-** Solidified function: set_onoff
+** Solidified function: to_json_parameters
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
+be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
@@ -265,24 +353,49 @@ be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(get_onoff),
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(format),
+ /* K2 */ be_nested_str_weak(_X2C_X22relay_X22_X3A_X25i),
+ /* K3 */ be_nested_str_weak(tasmota_relay_index),
}),
- be_str_weak(set_onoff),
+ be_str_weak(to_json_parameters),
&be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x88100102, // 0002 GETMBR R4 R0 K2
- 0x60140017, // 0003 GETGBL R5 G23
- 0x5C180200, // 0004 MOVE R6 R1
- 0x7C140200, // 0005 CALL R5 1
- 0x7C080600, // 0006 CALL R2 3
- 0x8C080103, // 0007 GETMET R2 R0 K3
- 0x7C080200, // 0008 CALL R2 1
- 0x80000000, // 0009 RET 0
+ ( &(const binstruction[ 7]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0501, // 0001 GETMET R3 R2 K1
+ 0x58140002, // 0002 LDCONST R5 K2
+ 0x88180103, // 0003 GETMBR R6 R0 K3
+ 0x7C0C0600, // 0004 CALL R3 3
+ 0x00040203, // 0005 ADD R1 R1 R3
+ 0x80040200, // 0006 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(get_onoff),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x80000000, // 0002 RET 0
})
)
);
@@ -502,77 +615,6 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(get_onoff),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(tasmota_relay_index),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x7C100600, // 0006 CALL R4 3
- 0x8C100101, // 0007 GETMET R4 R0 K1
- 0x7C100200, // 0008 CALL R4 1
- 0x4C100000, // 0009 LDNIL R4
- 0x1C100604, // 000A EQ R4 R3 R4
- 0x78120000, // 000B JMPF R4 #000D
- 0x580C0002, // 000C LDCONST R3 K2
- 0x90020603, // 000D SETMBR R0 K3 R3
- 0x80000000, // 000E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(get_onoff),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
@@ -580,18 +622,18 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_OnOff,
2,
&be_class_Matter_Plugin,
- be_nested_map(11,
+ be_nested_map(13,
( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
+ { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
+ { be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
- { be_const_key_weak(get_onoff, 8), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
- { be_const_key_weak(shadow_onoff, 5), be_const_var(1) },
- { be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(266, -1), be_const_int(2) },
- })) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
+ { be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
+ { be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_OnOff_to_json_parameters_closure) },
+ { be_const_key_weak(NAME, 3), be_nested_str_weak(relay) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -630,10 +672,12 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
- { be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
- { be_const_key_weak(tasmota_relay_index, 2), be_const_var(0) },
- { be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
+ { be_const_key_weak(set_onoff, 4), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(266, -1), be_const_int(2) },
+ })) ) } )) },
})),
be_str_weak(Matter_Plugin_OnOff)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
index bc0d5c749..0ed2d4962 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
@@ -1151,8 +1151,8 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_Root_init, /* name */
be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
+ 9, /* nstack */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -1164,15 +1164,16 @@ be_local_closure(Matter_Plugin_Root_init, /* name */
}),
be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x600C0003, // 0000 GETGBL R3 G3
- 0x5C100000, // 0001 MOVE R4 R0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x8C0C0700, // 0003 GETMET R3 R3 K0
- 0x5C140200, // 0004 MOVE R5 R1
- 0x5C180400, // 0005 MOVE R6 R2
- 0x7C0C0600, // 0006 CALL R3 3
- 0x80000000, // 0007 RET 0
+ ( &(const binstruction[ 9]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x80000000, // 0008 RET 0
})
)
);
@@ -2073,15 +2074,17 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Root,
0,
&be_class_Matter_Plugin,
- be_nested_map(6,
+ be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
- { be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_Root_write_attribute_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(root) },
+ { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(22, -1), be_const_int(1) },
})) ) } )) },
+ { be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_Root_write_attribute_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Root_init_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(13,
@@ -2186,7 +2189,6 @@ be_local_class(Matter_Plugin_Root,
be_const_int(8),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Root)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
index f38d1d6d6..8d7e7df1c 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
@@ -30,6 +30,118 @@ be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(tasmota_sensor_filter),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(filter),
+ /* K4 */ be_nested_str_weak(tasmota_sensor_matcher),
+ /* K5 */ be_nested_str_weak(tasmota),
+ /* K6 */ be_nested_str_weak(Rule_Matcher),
+ /* K7 */ be_nested_str_weak(parse),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x8C100702, // 0008 GETMET R4 R3 K2
+ 0x58180003, // 0009 LDCONST R6 K3
+ 0x7C100400, // 000A CALL R4 2
+ 0x90020204, // 000B SETMBR R0 K1 R4
+ 0x88100101, // 000C GETMBR R4 R0 K1
+ 0x78120005, // 000D JMPF R4 #0014
+ 0xB8120A00, // 000E GETNGBL R4 K5
+ 0x88100906, // 000F GETMBR R4 R4 K6
+ 0x8C100907, // 0010 GETMET R4 R4 K7
+ 0x88180101, // 0011 GETMBR R6 R0 K1
+ 0x7C100400, // 0012 CALL R4 2
+ 0x90020804, // 0013 SETMBR R0 K4 R4
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: to_json_parameters
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_to_json_parameters, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(format),
+ /* K2 */ be_nested_str_weak(_X2C_X22filter_X22_X3A_X22_X25s_X22),
+ /* K3 */ be_nested_str_weak(tasmota_sensor_filter),
+ }),
+ be_str_weak(to_json_parameters),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0501, // 0001 GETMET R3 R2 K1
+ 0x58140002, // 0002 LDCONST R5 K2
+ 0x88180103, // 0003 GETMBR R6 R0 K3
+ 0x7C0C0600, // 0004 CALL R3 3
+ 0x00040203, // 0005 ADD R1 R1 R3
+ 0x80040200, // 0006 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
@@ -80,75 +192,6 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(tasmota_sensor_filter),
- /* K2 */ be_nested_str_weak(tasmota_sensor_matcher),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(Rule_Matcher),
- /* K5 */ be_nested_str_weak(parse),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x7C100600, // 0006 CALL R4 3
- 0x90020203, // 0007 SETMBR R0 K1 R3
- 0xB8120600, // 0008 GETNGBL R4 K3
- 0x88100904, // 0009 GETMBR R4 R4 K4
- 0x8C100905, // 000A GETMET R4 R4 K5
- 0x5C180600, // 000B MOVE R6 R3
- 0x7C100400, // 000C CALL R4 2
- 0x90020404, // 000D SETMBR R0 K2 R4
- 0x80000000, // 000E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_Sensor
********************************************************************/
@@ -156,15 +199,16 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor,
3,
&be_class_Matter_Plugin_Device,
- be_nested_map(7,
+ be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
- { be_const_key_weak(pre_value, 2), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
+ { be_const_key_weak(tasmota_sensor_filter, 7), be_const_var(0) },
+ { be_const_key_weak(init, 6), be_const_closure(Matter_Plugin_Sensor_init_closure) },
+ { be_const_key_weak(to_json_parameters, 1), be_const_closure(Matter_Plugin_Sensor_to_json_parameters_closure) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
- { be_const_key_weak(tasmota_sensor_filter, 3), be_const_var(0) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
- { be_const_key_weak(valued_changed, 0), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
+ { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin_Sensor)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
index 88c5d7c55..f04c97ac6 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
@@ -6,6 +6,34 @@
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
@@ -38,34 +66,6 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -183,16 +183,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(5,
+ be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
+ { be_const_key_weak(NAME, 1), be_nested_str_weak(humidity) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -206,6 +206,7 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
similarity index 87%
rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h
rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
index 4cc5a9cd9..b45eb5f90 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Light.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
@@ -1,15 +1,42 @@
-/* Solidification of Matter_Plugin_Sensor_Light.h */
+/* Solidification of Matter_Plugin_Sensor_Illuminance.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
-extern const bclass be_class_Matter_Plugin_Sensor_Light;
+extern const bclass be_class_Matter_Plugin_Sensor_Illuminance;
+
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Light_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
@@ -38,37 +65,10 @@ be_local_closure(Matter_Plugin_Sensor_Light_valued_changed, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Light_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Light_read_attribute, /* name */
+be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
3, /* argc */
@@ -176,22 +176,22 @@ be_local_closure(Matter_Plugin_Sensor_Light_read_attribute, /* name */
/********************************************************************
-** Solidified class: Matter_Plugin_Sensor_Light
+** Solidified class: Matter_Plugin_Sensor_Illuminance
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
-be_local_class(Matter_Plugin_Sensor_Light,
+be_local_class(Matter_Plugin_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(5,
+ be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Light_valued_changed_closure) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Light_pre_value_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Light_read_attribute_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(NAME, 1), be_nested_str_weak(illuminance) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
+ { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -205,14 +205,15 @@ be_local_class(Matter_Plugin_Sensor_Light,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
})),
- be_str_weak(Matter_Plugin_Sensor_Light)
+ be_str_weak(Matter_Plugin_Sensor_Illuminance)
);
/*******************************************************************/
-void be_load_Matter_Plugin_Sensor_Light_class(bvm *vm) {
- be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Light);
- be_setglobal(vm, "Matter_Plugin_Sensor_Light");
+void be_load_Matter_Plugin_Sensor_Illuminance_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Illuminance);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Illuminance");
be_pop(vm, 1);
}
/********************************************************************/
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
index 7918e7e0d..61968c3c1 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
@@ -6,6 +6,33 @@
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
@@ -38,33 +65,6 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -182,16 +182,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(5,
+ be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
+ { be_const_key_weak(NAME, 1), be_nested_str_weak(pressure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -205,6 +205,7 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
index 99d00d696..85e4d894a 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
@@ -6,6 +6,34 @@
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: valued_changed
********************************************************************/
@@ -38,34 +66,6 @@ be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -180,27 +180,30 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Temp,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(5,
+ be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(valued_changed, 3), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
+ { be_const_key_weak(NAME, 1), be_nested_str_weak(temperature) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(3,
+ be_const_list( * be_nested_list(5,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
+ be_const_int(65532),
+ be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
index e8a56c331..2417ab096 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Session_Store.h
@@ -7,11 +7,11 @@
extern const bclass be_class_Matter_Session_Store;
/********************************************************************
-** Solidified function: gen_local_session_id
+** Solidified function: create_fabric
********************************************************************/
-be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */
+be_local_closure(Matter_Session_Store_create_fabric, /* name */
be_nested_proto(
- 6, /* nstack */
+ 4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -19,36 +19,69 @@ be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(random),
- /* K2 */ be_const_int(2),
- /* K3 */ be_nested_str_weak(get),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(get_session_by_local_session_id),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(Fabric),
}),
- be_str_weak(gen_local_session_id),
+ be_str_weak(create_fabric),
&be_const_str_solidified,
- ( &(const binstruction[19]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x50080200, // 0001 LDBOOL R2 1 0
- 0x780A000E, // 0002 JMPF R2 #0012
- 0x8C080301, // 0003 GETMET R2 R1 K1
- 0x58100002, // 0004 LDCONST R4 K2
- 0x7C080400, // 0005 CALL R2 2
- 0x8C080503, // 0006 GETMET R2 R2 K3
- 0x58100004, // 0007 LDCONST R4 K4
- 0x58140002, // 0008 LDCONST R5 K2
- 0x7C080600, // 0009 CALL R2 3
- 0x8C0C0105, // 000A GETMET R3 R0 K5
- 0x5C140400, // 000B MOVE R5 R2
- 0x7C0C0400, // 000C CALL R3 2
- 0x4C100000, // 000D LDNIL R4
- 0x1C0C0604, // 000E EQ R3 R3 R4
- 0x780E0000, // 000F JMPF R3 #0011
- 0x80040400, // 0010 RET 1 R2
- 0x7001FFEE, // 0011 JMP #0001
- 0x80000000, // 0012 RET 0
+ ( &(const binstruction[ 5]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x5C0C0000, // 0002 MOVE R3 R0
+ 0x7C040400, // 0003 CALL R1 2
+ 0x80040200, // 0004 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_session_by_source_node_id
+********************************************************************/
+be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_const_int(0),
+ /* K2 */ be_nested_str_weak(_source_node_id),
+ /* K3 */ be_nested_str_weak(update),
+ /* K4 */ be_const_int(1),
+ }),
+ be_str_weak(get_session_by_source_node_id),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x1C080202, // 0001 EQ R2 R1 R2
+ 0x780A0001, // 0002 JMPF R2 #0005
+ 0x4C080000, // 0003 LDNIL R2
+ 0x80040400, // 0004 RET 1 R2
+ 0x6008000C, // 0005 GETGBL R2 G12
+ 0x880C0100, // 0006 GETMBR R3 R0 K0
+ 0x7C080200, // 0007 CALL R2 1
+ 0x580C0001, // 0008 LDCONST R3 K1
+ 0x88100100, // 0009 GETMBR R4 R0 K0
+ 0x14140602, // 000A LT R5 R3 R2
+ 0x78160008, // 000B JMPF R5 #0015
+ 0x94140803, // 000C GETIDX R5 R4 R3
+ 0x88180B02, // 000D GETMBR R6 R5 K2
+ 0x1C180C01, // 000E EQ R6 R6 R1
+ 0x781A0002, // 000F JMPF R6 #0013
+ 0x8C180B03, // 0010 GETMET R6 R5 K3
+ 0x7C180200, // 0011 CALL R6 1
+ 0x80040A00, // 0012 RET 1 R5
+ 0x000C0704, // 0013 ADD R3 R3 K4
+ 0x7001FFF4, // 0014 JMP #000A
+ 0x80000000, // 0015 RET 0
})
)
);
@@ -112,298 +145,9 @@ be_local_closure(Matter_Session_Store_remove_redundant_fabric, /* name */
/********************************************************************
-** Solidified function: find_session_by_resumption_id
+** Solidified function: active_fabrics
********************************************************************/
-be_local_closure(Matter_Session_Store_find_session_by_resumption_id, /* name */
- be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str_weak(sessions),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20session_X2Eresumption_id_X3D_X25s_X20vs_X20_X25s),
- /* K7 */ be_nested_str_weak(resumption_id),
- /* K8 */ be_const_int(3),
- /* K9 */ be_nested_str_weak(shared_secret),
- /* K10 */ be_nested_str_weak(MTR_X3A_X20session_X2Eshared_secret_X3D_X25s),
- /* K11 */ be_nested_str_weak(update),
- /* K12 */ be_const_int(1),
- }),
- be_str_weak(find_session_by_resumption_id),
- &be_const_str_solidified,
- ( &(const binstruction[49]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x740E0001, // 0002 JMPT R3 #0005
- 0x4C0C0000, // 0003 LDNIL R3
- 0x80040600, // 0004 RET 1 R3
- 0x580C0001, // 0005 LDCONST R3 K1
- 0x88100102, // 0006 GETMBR R4 R0 K2
- 0x6014000C, // 0007 GETGBL R5 G12
- 0x5C180800, // 0008 MOVE R6 R4
- 0x7C140200, // 0009 CALL R5 1
- 0x14140605, // 000A LT R5 R3 R5
- 0x78160023, // 000B JMPF R5 #0030
- 0x94140803, // 000C GETIDX R5 R4 R3
- 0xB81A0600, // 000D GETNGBL R6 K3
- 0x8C180D04, // 000E GETMET R6 R6 K4
- 0x8C200505, // 000F GETMET R8 R2 K5
- 0x58280006, // 0010 LDCONST R10 K6
- 0x602C0008, // 0011 GETGBL R11 G8
- 0x88300B07, // 0012 GETMBR R12 R5 K7
- 0x7C2C0200, // 0013 CALL R11 1
- 0x60300008, // 0014 GETGBL R12 G8
- 0x5C340200, // 0015 MOVE R13 R1
- 0x7C300200, // 0016 CALL R12 1
- 0x7C200800, // 0017 CALL R8 4
- 0x58240008, // 0018 LDCONST R9 K8
- 0x7C180600, // 0019 CALL R6 3
- 0x88180B07, // 001A GETMBR R6 R5 K7
- 0x1C180C01, // 001B EQ R6 R6 R1
- 0x781A0010, // 001C JMPF R6 #002E
- 0x88180B09, // 001D GETMBR R6 R5 K9
- 0x4C1C0000, // 001E LDNIL R7
- 0x20180C07, // 001F NE R6 R6 R7
- 0x781A000C, // 0020 JMPF R6 #002E
- 0xB81A0600, // 0021 GETNGBL R6 K3
- 0x8C180D04, // 0022 GETMET R6 R6 K4
- 0x8C200505, // 0023 GETMET R8 R2 K5
- 0x5828000A, // 0024 LDCONST R10 K10
- 0x602C0008, // 0025 GETGBL R11 G8
- 0x88300B09, // 0026 GETMBR R12 R5 K9
- 0x7C2C0200, // 0027 CALL R11 1
- 0x7C200600, // 0028 CALL R8 3
- 0x58240008, // 0029 LDCONST R9 K8
- 0x7C180600, // 002A CALL R6 3
- 0x8C180B0B, // 002B GETMET R6 R5 K11
- 0x7C180200, // 002C CALL R6 1
- 0x80040A00, // 002D RET 1 R5
- 0x000C070C, // 002E ADD R3 R3 K12
- 0x7001FFD6, // 002F JMP #0007
- 0x80000000, // 0030 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_fabric
-********************************************************************/
-be_local_closure(Matter_Session_Store_remove_fabric, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(sessions),
- /* K2 */ be_nested_str_weak(_fabric),
- /* K3 */ be_nested_str_weak(remove),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(fabrics),
- /* K6 */ be_nested_str_weak(find),
- }),
- be_str_weak(remove_fabric),
- &be_const_str_solidified,
- ( &(const binstruction[26]) { /* code */
- 0x58080000, // 0000 LDCONST R2 K0
- 0x600C000C, // 0001 GETGBL R3 G12
- 0x88100101, // 0002 GETMBR R4 R0 K1
- 0x7C0C0200, // 0003 CALL R3 1
- 0x140C0403, // 0004 LT R3 R2 R3
- 0x780E000B, // 0005 JMPF R3 #0012
- 0x880C0101, // 0006 GETMBR R3 R0 K1
- 0x940C0602, // 0007 GETIDX R3 R3 R2
- 0x880C0702, // 0008 GETMBR R3 R3 K2
- 0x1C0C0601, // 0009 EQ R3 R3 R1
- 0x780E0004, // 000A JMPF R3 #0010
- 0x880C0101, // 000B GETMBR R3 R0 K1
- 0x8C0C0703, // 000C GETMET R3 R3 K3
- 0x5C140400, // 000D MOVE R5 R2
- 0x7C0C0400, // 000E CALL R3 2
- 0x70020000, // 000F JMP #0011
- 0x00080504, // 0010 ADD R2 R2 K4
- 0x7001FFEE, // 0011 JMP #0001
- 0x880C0105, // 0012 GETMBR R3 R0 K5
- 0x8C0C0703, // 0013 GETMET R3 R3 K3
- 0x88140105, // 0014 GETMBR R5 R0 K5
- 0x8C140B06, // 0015 GETMET R5 R5 K6
- 0x5C1C0200, // 0016 MOVE R7 R1
- 0x7C140400, // 0017 CALL R5 2
- 0x7C0C0400, // 0018 CALL R3 2
- 0x80000000, // 0019 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: find_session_source_id_unsecure
-********************************************************************/
-be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */
- be_nested_proto(
- 9, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(get_session_by_source_node_id),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(Session),
- /* K3 */ be_const_int(0),
- /* K4 */ be_nested_str_weak(_source_node_id),
- /* K5 */ be_nested_str_weak(sessions),
- /* K6 */ be_nested_str_weak(push),
- /* K7 */ be_nested_str_weak(set_expire_in_seconds),
- /* K8 */ be_nested_str_weak(update),
- }),
- be_str_weak(find_session_source_id_unsecure),
- &be_const_str_solidified,
- ( &(const binstruction[24]) { /* code */
- 0x8C0C0100, // 0000 GETMET R3 R0 K0
- 0x5C140200, // 0001 MOVE R5 R1
- 0x7C0C0400, // 0002 CALL R3 2
- 0x4C100000, // 0003 LDNIL R4
- 0x1C100604, // 0004 EQ R4 R3 R4
- 0x7812000E, // 0005 JMPF R4 #0015
- 0xB8120200, // 0006 GETNGBL R4 K1
- 0x8C100902, // 0007 GETMET R4 R4 K2
- 0x5C180000, // 0008 MOVE R6 R0
- 0x581C0003, // 0009 LDCONST R7 K3
- 0x58200003, // 000A LDCONST R8 K3
- 0x7C100800, // 000B CALL R4 4
- 0x5C0C0800, // 000C MOVE R3 R4
- 0x900E0801, // 000D SETMBR R3 K4 R1
- 0x88100105, // 000E GETMBR R4 R0 K5
- 0x8C100906, // 000F GETMET R4 R4 K6
- 0x5C180600, // 0010 MOVE R6 R3
- 0x7C100400, // 0011 CALL R4 2
- 0x8C100707, // 0012 GETMET R4 R3 K7
- 0x5C180400, // 0013 MOVE R6 R2
- 0x7C100400, // 0014 CALL R4 2
- 0x8C100708, // 0015 GETMET R4 R3 K8
- 0x7C100200, // 0016 CALL R4 1
- 0x80040600, // 0017 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_session_by_source_node_id
-********************************************************************/
-be_local_closure(Matter_Session_Store_get_session_by_source_node_id, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str_weak(_source_node_id),
- /* K3 */ be_nested_str_weak(update),
- /* K4 */ be_const_int(1),
- }),
- be_str_weak(get_session_by_source_node_id),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x4C080000, // 0000 LDNIL R2
- 0x1C080202, // 0001 EQ R2 R1 R2
- 0x780A0001, // 0002 JMPF R2 #0005
- 0x4C080000, // 0003 LDNIL R2
- 0x80040400, // 0004 RET 1 R2
- 0x6008000C, // 0005 GETGBL R2 G12
- 0x880C0100, // 0006 GETMBR R3 R0 K0
- 0x7C080200, // 0007 CALL R2 1
- 0x580C0001, // 0008 LDCONST R3 K1
- 0x88100100, // 0009 GETMBR R4 R0 K0
- 0x14140602, // 000A LT R5 R3 R2
- 0x78160008, // 000B JMPF R5 #0015
- 0x94140803, // 000C GETIDX R5 R4 R3
- 0x88180B02, // 000D GETMBR R6 R5 K2
- 0x1C180C01, // 000E EQ R6 R6 R1
- 0x781A0002, // 000F JMPF R6 #0013
- 0x8C180B03, // 0010 GETMET R6 R5 K3
- 0x7C180200, // 0011 CALL R6 1
- 0x80040A00, // 0012 RET 1 R5
- 0x000C0704, // 0013 ADD R3 R3 K4
- 0x7001FFF4, // 0014 JMP #000A
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: add_session
-********************************************************************/
-be_local_closure(Matter_Session_Store_add_session, /* name */
- be_nested_proto(
- 6, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(set_expire_in_seconds),
- /* K1 */ be_nested_str_weak(sessions),
- /* K2 */ be_nested_str_weak(push),
- }),
- be_str_weak(add_session),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x4C0C0000, // 0000 LDNIL R3
- 0x200C0403, // 0001 NE R3 R2 R3
- 0x780E0002, // 0002 JMPF R3 #0006
- 0x8C0C0300, // 0003 GETMET R3 R1 K0
- 0x5C140400, // 0004 MOVE R5 R2
- 0x7C0C0400, // 0005 CALL R3 2
- 0x880C0101, // 0006 GETMBR R3 R0 K1
- 0x8C0C0702, // 0007 GETMET R3 R3 K2
- 0x5C140200, // 0008 MOVE R5 R1
- 0x7C0C0400, // 0009 CALL R3 2
- 0x80000000, // 000A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: count_active_fabrics
-********************************************************************/
-be_local_closure(Matter_Session_Store_count_active_fabrics, /* name */
+be_local_closure(Matter_Session_Store_active_fabrics, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -416,9 +160,9 @@ be_local_closure(Matter_Session_Store_count_active_fabrics, /* name */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(remove_expired),
/* K1 */ be_nested_str_weak(fabrics),
- /* K2 */ be_nested_str_weak(count_persistables),
+ /* K2 */ be_nested_str_weak(persistables),
}),
- be_str_weak(count_active_fabrics),
+ be_str_weak(active_fabrics),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
@@ -433,40 +177,6 @@ be_local_closure(Matter_Session_Store_count_active_fabrics, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: remove_expired
-********************************************************************/
-be_local_closure(Matter_Session_Store_remove_expired, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(every_second),
- /* K2 */ be_nested_str_weak(fabrics),
- }),
- be_str_weak(remove_expired),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x88040102, // 0003 GETMBR R1 R0 K2
- 0x8C040301, // 0004 GETMET R1 R1 K1
- 0x7C040200, // 0005 CALL R1 1
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: find_children_fabrics
********************************************************************/
@@ -562,52 +272,6 @@ be_local_closure(Matter_Session_Store_find_children_fabrics, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: find_fabric_by_index
-********************************************************************/
-be_local_closure(Matter_Session_Store_find_fabric_by_index, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(active_fabrics),
- /* K1 */ be_nested_str_weak(get_fabric_index),
- /* K2 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(find_fabric_by_index),
- &be_const_str_solidified,
- ( &(const binstruction[19]) { /* code */
- 0x60080010, // 0000 GETGBL R2 G16
- 0x8C0C0100, // 0001 GETMET R3 R0 K0
- 0x7C0C0200, // 0002 CALL R3 1
- 0x7C080200, // 0003 CALL R2 1
- 0xA8020008, // 0004 EXBLK 0 #000E
- 0x5C0C0400, // 0005 MOVE R3 R2
- 0x7C0C0000, // 0006 CALL R3 0
- 0x8C100701, // 0007 GETMET R4 R3 K1
- 0x7C100200, // 0008 CALL R4 1
- 0x1C100801, // 0009 EQ R4 R4 R1
- 0x78120001, // 000A JMPF R4 #000D
- 0xA8040001, // 000B EXBLK 1 1
- 0x80040600, // 000C RET 1 R3
- 0x7001FFF6, // 000D JMP #0005
- 0x58080002, // 000E LDCONST R2 K2
- 0xAC080200, // 000F CATCH R2 1 0
- 0xB0080000, // 0010 RAISE 2 R0 R0
- 0x4C080000, // 0011 LDNIL R2
- 0x80040400, // 0012 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: next_fabric_idx
********************************************************************/
@@ -663,385 +327,6 @@ be_local_closure(Matter_Session_Store_next_fabric_idx, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: get_session_by_local_session_id
-********************************************************************/
-be_local_closure(Matter_Session_Store_get_session_by_local_session_id, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_const_int(0),
- /* K2 */ be_nested_str_weak(local_session_id),
- /* K3 */ be_nested_str_weak(update),
- /* K4 */ be_const_int(1),
- }),
- be_str_weak(get_session_by_local_session_id),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x4C080000, // 0000 LDNIL R2
- 0x1C080202, // 0001 EQ R2 R1 R2
- 0x780A0001, // 0002 JMPF R2 #0005
- 0x4C080000, // 0003 LDNIL R2
- 0x80040400, // 0004 RET 1 R2
- 0x6008000C, // 0005 GETGBL R2 G12
- 0x880C0100, // 0006 GETMBR R3 R0 K0
- 0x7C080200, // 0007 CALL R2 1
- 0x580C0001, // 0008 LDCONST R3 K1
- 0x88100100, // 0009 GETMBR R4 R0 K0
- 0x14140602, // 000A LT R5 R3 R2
- 0x78160008, // 000B JMPF R5 #0015
- 0x94140803, // 000C GETIDX R5 R4 R3
- 0x88180B02, // 000D GETMBR R6 R5 K2
- 0x1C180C01, // 000E EQ R6 R6 R1
- 0x781A0002, // 000F JMPF R6 #0013
- 0x8C180B03, // 0010 GETMET R6 R5 K3
- 0x7C180200, // 0011 CALL R6 1
- 0x80040A00, // 0012 RET 1 R5
- 0x000C0704, // 0013 ADD R3 R3 K4
- 0x7001FFF4, // 0014 JMP #000A
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: active_fabrics
-********************************************************************/
-be_local_closure(Matter_Session_Store_active_fabrics, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(remove_expired),
- /* K1 */ be_nested_str_weak(fabrics),
- /* K2 */ be_nested_str_weak(persistables),
- }),
- be_str_weak(active_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x88040101, // 0002 GETMBR R1 R0 K1
- 0x8C040302, // 0003 GETMET R1 R1 K2
- 0x7C040200, // 0004 CALL R1 1
- 0x80040200, // 0005 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Session_Store_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(remove_expired),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_session
-********************************************************************/
-be_local_closure(Matter_Session_Store_remove_session, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(sessions),
- /* K2 */ be_nested_str_weak(remove),
- /* K3 */ be_const_int(1),
- }),
- be_str_weak(remove_session),
- &be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0x58080000, // 0000 LDCONST R2 K0
- 0x880C0101, // 0001 GETMBR R3 R0 K1
- 0x6010000C, // 0002 GETGBL R4 G12
- 0x88140101, // 0003 GETMBR R5 R0 K1
- 0x7C100200, // 0004 CALL R4 1
- 0x14100404, // 0005 LT R4 R2 R4
- 0x78120008, // 0006 JMPF R4 #0010
- 0x94100602, // 0007 GETIDX R4 R3 R2
- 0x1C100801, // 0008 EQ R4 R4 R1
- 0x78120003, // 0009 JMPF R4 #000E
- 0x8C100702, // 000A GETMET R4 R3 K2
- 0x5C180400, // 000B MOVE R6 R2
- 0x7C100400, // 000C CALL R4 2
- 0x70020000, // 000D JMP #000F
- 0x00080503, // 000E ADD R2 R2 K3
- 0x7001FFF1, // 000F JMP #0002
- 0x80000000, // 0010 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Session_Store_init, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(Expirable_list),
- /* K3 */ be_nested_str_weak(fabrics),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0xB8060200, // 0000 GETNGBL R1 K1
- 0x8C040302, // 0001 GETMET R1 R1 K2
- 0x7C040200, // 0002 CALL R1 1
- 0x90020001, // 0003 SETMBR R0 K0 R1
- 0xB8060200, // 0004 GETNGBL R1 K1
- 0x8C040302, // 0005 GETMET R1 R1 K2
- 0x7C040200, // 0006 CALL R1 1
- 0x90020601, // 0007 SETMBR R0 K3 R1
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: create_session
-********************************************************************/
-be_local_closure(Matter_Session_Store_create_session, /* name */
- be_nested_proto(
- 9, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(get_session_by_local_session_id),
- /* K1 */ be_nested_str_weak(remove_session),
- /* K2 */ be_nested_str_weak(matter),
- /* K3 */ be_nested_str_weak(Session),
- /* K4 */ be_nested_str_weak(sessions),
- /* K5 */ be_nested_str_weak(push),
- }),
- be_str_weak(create_session),
- &be_const_str_solidified,
- ( &(const binstruction[21]) { /* code */
- 0x8C0C0100, // 0000 GETMET R3 R0 K0
- 0x5C140200, // 0001 MOVE R5 R1
- 0x7C0C0400, // 0002 CALL R3 2
- 0x4C100000, // 0003 LDNIL R4
- 0x20100604, // 0004 NE R4 R3 R4
- 0x78120002, // 0005 JMPF R4 #0009
- 0x8C100101, // 0006 GETMET R4 R0 K1
- 0x5C180600, // 0007 MOVE R6 R3
- 0x7C100400, // 0008 CALL R4 2
- 0xB8120400, // 0009 GETNGBL R4 K2
- 0x8C100903, // 000A GETMET R4 R4 K3
- 0x5C180000, // 000B MOVE R6 R0
- 0x5C1C0200, // 000C MOVE R7 R1
- 0x5C200400, // 000D MOVE R8 R2
- 0x7C100800, // 000E CALL R4 4
- 0x5C0C0800, // 000F MOVE R3 R4
- 0x88100104, // 0010 GETMBR R4 R0 K4
- 0x8C100905, // 0011 GETMET R4 R4 K5
- 0x5C180600, // 0012 MOVE R6 R3
- 0x7C100400, // 0013 CALL R4 2
- 0x80040600, // 0014 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: save_fabrics
-********************************************************************/
-be_local_closure(Matter_Session_Store_save_fabrics, /* name */
- be_nested_proto(
- 14, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[26]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(remove_expired),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(fabrics),
- /* K4 */ be_nested_str_weak(persistables),
- /* K5 */ be_nested_str_weak(_sessions),
- /* K6 */ be_const_int(1),
- /* K7 */ be_nested_str_weak(stop_iteration),
- /* K8 */ be_nested_str_weak(push),
- /* K9 */ be_nested_str_weak(tojson),
- /* K10 */ be_nested_str_weak(_X5B),
- /* K11 */ be_nested_str_weak(concat),
- /* K12 */ be_nested_str_weak(_X2C),
- /* K13 */ be_nested_str_weak(_X5D),
- /* K14 */ be_nested_str_weak(string),
- /* K15 */ be_nested_str_weak(_FABRICS),
- /* K16 */ be_nested_str_weak(w),
- /* K17 */ be_nested_str_weak(write),
- /* K18 */ be_nested_str_weak(close),
- /* K19 */ be_nested_str_weak(tasmota),
- /* K20 */ be_nested_str_weak(log),
- /* K21 */ be_nested_str_weak(format),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20_X25i_X20fabric_X28s_X29_X20and_X20_X25i_X20session_X28s_X29),
- /* K23 */ be_const_int(2),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
- /* K25 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(save_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[84]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080101, // 0001 GETMET R2 R0 K1
- 0x7C080200, // 0002 CALL R2 1
- 0x58080002, // 0003 LDCONST R2 K2
- 0x600C0012, // 0004 GETGBL R3 G18
- 0x7C0C0000, // 0005 CALL R3 0
- 0x60100010, // 0006 GETGBL R4 G16
- 0x88140103, // 0007 GETMBR R5 R0 K3
- 0x8C140B04, // 0008 GETMET R5 R5 K4
- 0x7C140200, // 0009 CALL R5 1
- 0x7C100200, // 000A CALL R4 1
- 0xA8020013, // 000B EXBLK 0 #0020
- 0x5C140800, // 000C MOVE R5 R4
- 0x7C140000, // 000D CALL R5 0
- 0x60180010, // 000E GETGBL R6 G16
- 0x881C0B05, // 000F GETMBR R7 R5 K5
- 0x8C1C0F04, // 0010 GETMET R7 R7 K4
- 0x7C1C0200, // 0011 CALL R7 1
- 0x7C180200, // 0012 CALL R6 1
- 0xA8020003, // 0013 EXBLK 0 #0018
- 0x5C1C0C00, // 0014 MOVE R7 R6
- 0x7C1C0000, // 0015 CALL R7 0
- 0x00080506, // 0016 ADD R2 R2 K6
- 0x7001FFFB, // 0017 JMP #0014
- 0x58180007, // 0018 LDCONST R6 K7
- 0xAC180200, // 0019 CATCH R6 1 0
- 0xB0080000, // 001A RAISE 2 R0 R0
- 0x8C180708, // 001B GETMET R6 R3 K8
- 0x8C200B09, // 001C GETMET R8 R5 K9
- 0x7C200200, // 001D CALL R8 1
- 0x7C180400, // 001E CALL R6 2
- 0x7001FFEB, // 001F JMP #000C
- 0x58100007, // 0020 LDCONST R4 K7
- 0xAC100200, // 0021 CATCH R4 1 0
- 0xB0080000, // 0022 RAISE 2 R0 R0
- 0x6010000C, // 0023 GETGBL R4 G12
- 0x5C140600, // 0024 MOVE R5 R3
- 0x7C100200, // 0025 CALL R4 1
- 0x8C14070B, // 0026 GETMET R5 R3 K11
- 0x581C000C, // 0027 LDCONST R7 K12
- 0x7C140400, // 0028 CALL R5 2
- 0x00161405, // 0029 ADD R5 K10 R5
- 0x00140B0D, // 002A ADD R5 R5 K13
- 0x5C0C0A00, // 002B MOVE R3 R5
- 0xA8020014, // 002C EXBLK 0 #0042
- 0xA4161C00, // 002D IMPORT R5 K14
- 0x60180011, // 002E GETGBL R6 G17
- 0x881C010F, // 002F GETMBR R7 R0 K15
- 0x58200010, // 0030 LDCONST R8 K16
- 0x7C180400, // 0031 CALL R6 2
- 0x8C1C0D11, // 0032 GETMET R7 R6 K17
- 0x5C240600, // 0033 MOVE R9 R3
- 0x7C1C0400, // 0034 CALL R7 2
- 0x8C1C0D12, // 0035 GETMET R7 R6 K18
- 0x7C1C0200, // 0036 CALL R7 1
- 0xB81E2600, // 0037 GETNGBL R7 K19
- 0x8C1C0F14, // 0038 GETMET R7 R7 K20
- 0x8C240B15, // 0039 GETMET R9 R5 K21
- 0x582C0016, // 003A LDCONST R11 K22
- 0x5C300800, // 003B MOVE R12 R4
- 0x5C340400, // 003C MOVE R13 R2
- 0x7C240800, // 003D CALL R9 4
- 0x58280017, // 003E LDCONST R10 K23
- 0x7C1C0600, // 003F CALL R7 3
- 0xA8040001, // 0040 EXBLK 1 1
- 0x70020010, // 0041 JMP #0053
- 0xAC140002, // 0042 CATCH R5 0 2
- 0x7002000D, // 0043 JMP #0052
- 0xB81E2600, // 0044 GETNGBL R7 K19
- 0x8C1C0F14, // 0045 GETMET R7 R7 K20
- 0x60240008, // 0046 GETGBL R9 G8
- 0x5C280A00, // 0047 MOVE R10 R5
- 0x7C240200, // 0048 CALL R9 1
- 0x00263009, // 0049 ADD R9 K24 R9
- 0x00241319, // 004A ADD R9 R9 K25
- 0x60280008, // 004B GETGBL R10 G8
- 0x5C2C0C00, // 004C MOVE R11 R6
- 0x7C280200, // 004D CALL R10 1
- 0x0024120A, // 004E ADD R9 R9 R10
- 0x58280017, // 004F LDCONST R10 K23
- 0x7C1C0600, // 0050 CALL R7 3
- 0x70020000, // 0051 JMP #0053
- 0xB0080000, // 0052 RAISE 2 R0 R0
- 0x80000000, // 0053 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: load_fabrics
********************************************************************/
@@ -1214,11 +499,11 @@ be_local_closure(Matter_Session_Store_load_fabrics, /* name */
/********************************************************************
-** Solidified function: sessions_active
+** Solidified function: count_active_fabrics
********************************************************************/
-be_local_closure(Matter_Session_Store_sessions_active, /* name */
+be_local_closure(Matter_Session_Store_count_active_fabrics, /* name */
be_nested_proto(
- 7, /* nstack */
+ 3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -1226,39 +511,20 @@ be_local_closure(Matter_Session_Store_sessions_active, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(sessions),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(push),
- /* K5 */ be_const_int(1),
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(remove_expired),
+ /* K1 */ be_nested_str_weak(fabrics),
+ /* K2 */ be_nested_str_weak(count_persistables),
}),
- be_str_weak(sessions_active),
+ be_str_weak(count_active_fabrics),
&be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040012, // 0000 GETGBL R1 G18
- 0x7C040000, // 0001 CALL R1 0
- 0x58080000, // 0002 LDCONST R2 K0
- 0x600C000C, // 0003 GETGBL R3 G12
- 0x88100101, // 0004 GETMBR R4 R0 K1
- 0x7C0C0200, // 0005 CALL R3 1
- 0x140C0403, // 0006 LT R3 R2 R3
- 0x780E000C, // 0007 JMPF R3 #0015
- 0x880C0101, // 0008 GETMBR R3 R0 K1
- 0x940C0602, // 0009 GETIDX R3 R3 R2
- 0x8C100702, // 000A GETMET R4 R3 K2
- 0x7C100200, // 000B CALL R4 1
- 0x78120005, // 000C JMPF R4 #0013
- 0x8C100703, // 000D GETMET R4 R3 K3
- 0x7C100200, // 000E CALL R4 1
- 0x78120002, // 000F JMPF R4 #0013
- 0x8C100304, // 0010 GETMET R4 R1 K4
- 0x5C180600, // 0011 MOVE R6 R3
- 0x7C100400, // 0012 CALL R4 2
- 0x00080505, // 0013 ADD R2 R2 K5
- 0x7001FFED, // 0014 JMP #0003
- 0x80040200, // 0015 RET 1 R1
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x88040101, // 0002 GETMBR R1 R0 K1
+ 0x8C040302, // 0003 GETMET R1 R1 K2
+ 0x7C040200, // 0004 CALL R1 1
+ 0x80040200, // 0005 RET 1 R1
})
)
);
@@ -1266,30 +532,101 @@ be_local_closure(Matter_Session_Store_sessions_active, /* name */
/********************************************************************
-** Solidified function: create_fabric
+** Solidified function: remove_fabric
********************************************************************/
-be_local_closure(Matter_Session_Store_create_fabric, /* name */
+be_local_closure(Matter_Session_Store_remove_fabric, /* name */
be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
+ 8, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(Fabric),
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(sessions),
+ /* K2 */ be_nested_str_weak(_fabric),
+ /* K3 */ be_nested_str_weak(remove),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(fabrics),
+ /* K6 */ be_nested_str_weak(find),
}),
- be_str_weak(create_fabric),
+ be_str_weak(remove_fabric),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C040400, // 0003 CALL R1 2
- 0x80040200, // 0004 RET 1 R1
+ ( &(const binstruction[26]) { /* code */
+ 0x58080000, // 0000 LDCONST R2 K0
+ 0x600C000C, // 0001 GETGBL R3 G12
+ 0x88100101, // 0002 GETMBR R4 R0 K1
+ 0x7C0C0200, // 0003 CALL R3 1
+ 0x140C0403, // 0004 LT R3 R2 R3
+ 0x780E000B, // 0005 JMPF R3 #0012
+ 0x880C0101, // 0006 GETMBR R3 R0 K1
+ 0x940C0602, // 0007 GETIDX R3 R3 R2
+ 0x880C0702, // 0008 GETMBR R3 R3 K2
+ 0x1C0C0601, // 0009 EQ R3 R3 R1
+ 0x780E0004, // 000A JMPF R3 #0010
+ 0x880C0101, // 000B GETMBR R3 R0 K1
+ 0x8C0C0703, // 000C GETMET R3 R3 K3
+ 0x5C140400, // 000D MOVE R5 R2
+ 0x7C0C0400, // 000E CALL R3 2
+ 0x70020000, // 000F JMP #0011
+ 0x00080504, // 0010 ADD R2 R2 K4
+ 0x7001FFEE, // 0011 JMP #0001
+ 0x880C0105, // 0012 GETMBR R3 R0 K5
+ 0x8C0C0703, // 0013 GETMET R3 R3 K3
+ 0x88140105, // 0014 GETMBR R5 R0 K5
+ 0x8C140B06, // 0015 GETMET R5 R5 K6
+ 0x5C1C0200, // 0016 MOVE R7 R1
+ 0x7C140400, // 0017 CALL R5 2
+ 0x7C0C0400, // 0018 CALL R3 2
+ 0x80000000, // 0019 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: remove_session
+********************************************************************/
+be_local_closure(Matter_Session_Store_remove_session, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(sessions),
+ /* K2 */ be_nested_str_weak(remove),
+ /* K3 */ be_const_int(1),
+ }),
+ be_str_weak(remove_session),
+ &be_const_str_solidified,
+ ( &(const binstruction[17]) { /* code */
+ 0x58080000, // 0000 LDCONST R2 K0
+ 0x880C0101, // 0001 GETMBR R3 R0 K1
+ 0x6010000C, // 0002 GETGBL R4 G12
+ 0x88140101, // 0003 GETMBR R5 R0 K1
+ 0x7C100200, // 0004 CALL R4 1
+ 0x14100404, // 0005 LT R4 R2 R4
+ 0x78120008, // 0006 JMPF R4 #0010
+ 0x94100602, // 0007 GETIDX R4 R3 R2
+ 0x1C100801, // 0008 EQ R4 R4 R1
+ 0x78120003, // 0009 JMPF R4 #000E
+ 0x8C100702, // 000A GETMET R4 R3 K2
+ 0x5C180400, // 000B MOVE R6 R2
+ 0x7C100400, // 000C CALL R4 2
+ 0x70020000, // 000D JMP #000F
+ 0x00080503, // 000E ADD R2 R2 K3
+ 0x7001FFF1, // 000F JMP #0002
+ 0x80000000, // 0010 RET 0
})
)
);
@@ -1350,40 +687,711 @@ be_local_closure(Matter_Session_Store_add_fabric, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: find_fabric_by_index
+********************************************************************/
+be_local_closure(Matter_Session_Store_find_fabric_by_index, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(active_fabrics),
+ /* K1 */ be_nested_str_weak(get_fabric_index),
+ /* K2 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(find_fabric_by_index),
+ &be_const_str_solidified,
+ ( &(const binstruction[19]) { /* code */
+ 0x60080010, // 0000 GETGBL R2 G16
+ 0x8C0C0100, // 0001 GETMET R3 R0 K0
+ 0x7C0C0200, // 0002 CALL R3 1
+ 0x7C080200, // 0003 CALL R2 1
+ 0xA8020008, // 0004 EXBLK 0 #000E
+ 0x5C0C0400, // 0005 MOVE R3 R2
+ 0x7C0C0000, // 0006 CALL R3 0
+ 0x8C100701, // 0007 GETMET R4 R3 K1
+ 0x7C100200, // 0008 CALL R4 1
+ 0x1C100801, // 0009 EQ R4 R4 R1
+ 0x78120001, // 000A JMPF R4 #000D
+ 0xA8040001, // 000B EXBLK 1 1
+ 0x80040600, // 000C RET 1 R3
+ 0x7001FFF6, // 000D JMP #0005
+ 0x58080002, // 000E LDCONST R2 K2
+ 0xAC080200, // 000F CATCH R2 1 0
+ 0xB0080000, // 0010 RAISE 2 R0 R0
+ 0x4C080000, // 0011 LDNIL R2
+ 0x80040400, // 0012 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: remove_expired
+********************************************************************/
+be_local_closure(Matter_Session_Store_remove_expired, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(every_second),
+ /* K2 */ be_nested_str_weak(fabrics),
+ }),
+ be_str_weak(remove_expired),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x88040102, // 0003 GETMBR R1 R0 K2
+ 0x8C040301, // 0004 GETMET R1 R1 K1
+ 0x7C040200, // 0005 CALL R1 1
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: add_session
+********************************************************************/
+be_local_closure(Matter_Session_Store_add_session, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(set_expire_in_seconds),
+ /* K1 */ be_nested_str_weak(sessions),
+ /* K2 */ be_nested_str_weak(push),
+ }),
+ be_str_weak(add_session),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0x4C0C0000, // 0000 LDNIL R3
+ 0x200C0403, // 0001 NE R3 R2 R3
+ 0x780E0002, // 0002 JMPF R3 #0006
+ 0x8C0C0300, // 0003 GETMET R3 R1 K0
+ 0x5C140400, // 0004 MOVE R5 R2
+ 0x7C0C0400, // 0005 CALL R3 2
+ 0x880C0101, // 0006 GETMBR R3 R0 K1
+ 0x8C0C0702, // 0007 GETMET R3 R3 K2
+ 0x5C140200, // 0008 MOVE R5 R1
+ 0x7C0C0400, // 0009 CALL R3 2
+ 0x80000000, // 000A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: create_session
+********************************************************************/
+be_local_closure(Matter_Session_Store_create_session, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(get_session_by_local_session_id),
+ /* K1 */ be_nested_str_weak(remove_session),
+ /* K2 */ be_nested_str_weak(matter),
+ /* K3 */ be_nested_str_weak(Session),
+ /* K4 */ be_nested_str_weak(sessions),
+ /* K5 */ be_nested_str_weak(push),
+ }),
+ be_str_weak(create_session),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0x8C0C0100, // 0000 GETMET R3 R0 K0
+ 0x5C140200, // 0001 MOVE R5 R1
+ 0x7C0C0400, // 0002 CALL R3 2
+ 0x4C100000, // 0003 LDNIL R4
+ 0x20100604, // 0004 NE R4 R3 R4
+ 0x78120002, // 0005 JMPF R4 #0009
+ 0x8C100101, // 0006 GETMET R4 R0 K1
+ 0x5C180600, // 0007 MOVE R6 R3
+ 0x7C100400, // 0008 CALL R4 2
+ 0xB8120400, // 0009 GETNGBL R4 K2
+ 0x8C100903, // 000A GETMET R4 R4 K3
+ 0x5C180000, // 000B MOVE R6 R0
+ 0x5C1C0200, // 000C MOVE R7 R1
+ 0x5C200400, // 000D MOVE R8 R2
+ 0x7C100800, // 000E CALL R4 4
+ 0x5C0C0800, // 000F MOVE R3 R4
+ 0x88100104, // 0010 GETMBR R4 R0 K4
+ 0x8C100905, // 0011 GETMET R4 R4 K5
+ 0x5C180600, // 0012 MOVE R6 R3
+ 0x7C100400, // 0013 CALL R4 2
+ 0x80040600, // 0014 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Session_Store_init, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(sessions),
+ /* K2 */ be_nested_str_weak(matter),
+ /* K3 */ be_nested_str_weak(Expirable_list),
+ /* K4 */ be_nested_str_weak(fabrics),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x90020001, // 0000 SETMBR R0 K0 R1
+ 0xB80A0400, // 0001 GETNGBL R2 K2
+ 0x8C080503, // 0002 GETMET R2 R2 K3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x90020202, // 0004 SETMBR R0 K1 R2
+ 0xB80A0400, // 0005 GETNGBL R2 K2
+ 0x8C080503, // 0006 GETMET R2 R2 K3
+ 0x7C080200, // 0007 CALL R2 1
+ 0x90020802, // 0008 SETMBR R0 K4 R2
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_session_by_local_session_id
+********************************************************************/
+be_local_closure(Matter_Session_Store_get_session_by_local_session_id, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_const_int(0),
+ /* K2 */ be_nested_str_weak(local_session_id),
+ /* K3 */ be_nested_str_weak(update),
+ /* K4 */ be_const_int(1),
+ }),
+ be_str_weak(get_session_by_local_session_id),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x1C080202, // 0001 EQ R2 R1 R2
+ 0x780A0001, // 0002 JMPF R2 #0005
+ 0x4C080000, // 0003 LDNIL R2
+ 0x80040400, // 0004 RET 1 R2
+ 0x6008000C, // 0005 GETGBL R2 G12
+ 0x880C0100, // 0006 GETMBR R3 R0 K0
+ 0x7C080200, // 0007 CALL R2 1
+ 0x580C0001, // 0008 LDCONST R3 K1
+ 0x88100100, // 0009 GETMBR R4 R0 K0
+ 0x14140602, // 000A LT R5 R3 R2
+ 0x78160008, // 000B JMPF R5 #0015
+ 0x94140803, // 000C GETIDX R5 R4 R3
+ 0x88180B02, // 000D GETMBR R6 R5 K2
+ 0x1C180C01, // 000E EQ R6 R6 R1
+ 0x781A0002, // 000F JMPF R6 #0013
+ 0x8C180B03, // 0010 GETMET R6 R5 K3
+ 0x7C180200, // 0011 CALL R6 1
+ 0x80040A00, // 0012 RET 1 R5
+ 0x000C0704, // 0013 ADD R3 R3 K4
+ 0x7001FFF4, // 0014 JMP #000A
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Session_Store_every_second, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(remove_expired),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x80000000, // 0002 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: find_session_source_id_unsecure
+********************************************************************/
+be_local_closure(Matter_Session_Store_find_session_source_id_unsecure, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(get_session_by_source_node_id),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(Session),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_nested_str_weak(_source_node_id),
+ /* K5 */ be_nested_str_weak(sessions),
+ /* K6 */ be_nested_str_weak(push),
+ /* K7 */ be_nested_str_weak(set_expire_in_seconds),
+ /* K8 */ be_nested_str_weak(update),
+ }),
+ be_str_weak(find_session_source_id_unsecure),
+ &be_const_str_solidified,
+ ( &(const binstruction[24]) { /* code */
+ 0x8C0C0100, // 0000 GETMET R3 R0 K0
+ 0x5C140200, // 0001 MOVE R5 R1
+ 0x7C0C0400, // 0002 CALL R3 2
+ 0x4C100000, // 0003 LDNIL R4
+ 0x1C100604, // 0004 EQ R4 R3 R4
+ 0x7812000E, // 0005 JMPF R4 #0015
+ 0xB8120200, // 0006 GETNGBL R4 K1
+ 0x8C100902, // 0007 GETMET R4 R4 K2
+ 0x5C180000, // 0008 MOVE R6 R0
+ 0x581C0003, // 0009 LDCONST R7 K3
+ 0x58200003, // 000A LDCONST R8 K3
+ 0x7C100800, // 000B CALL R4 4
+ 0x5C0C0800, // 000C MOVE R3 R4
+ 0x900E0801, // 000D SETMBR R3 K4 R1
+ 0x88100105, // 000E GETMBR R4 R0 K5
+ 0x8C100906, // 000F GETMET R4 R4 K6
+ 0x5C180600, // 0010 MOVE R6 R3
+ 0x7C100400, // 0011 CALL R4 2
+ 0x8C100707, // 0012 GETMET R4 R3 K7
+ 0x5C180400, // 0013 MOVE R6 R2
+ 0x7C100400, // 0014 CALL R4 2
+ 0x8C100708, // 0015 GETMET R4 R3 K8
+ 0x7C100200, // 0016 CALL R4 1
+ 0x80040600, // 0017 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: sessions_active
+********************************************************************/
+be_local_closure(Matter_Session_Store_sessions_active, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(sessions),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(push),
+ /* K5 */ be_const_int(1),
+ }),
+ be_str_weak(sessions_active),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040012, // 0000 GETGBL R1 G18
+ 0x7C040000, // 0001 CALL R1 0
+ 0x58080000, // 0002 LDCONST R2 K0
+ 0x600C000C, // 0003 GETGBL R3 G12
+ 0x88100101, // 0004 GETMBR R4 R0 K1
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x140C0403, // 0006 LT R3 R2 R3
+ 0x780E000C, // 0007 JMPF R3 #0015
+ 0x880C0101, // 0008 GETMBR R3 R0 K1
+ 0x940C0602, // 0009 GETIDX R3 R3 R2
+ 0x8C100702, // 000A GETMET R4 R3 K2
+ 0x7C100200, // 000B CALL R4 1
+ 0x78120005, // 000C JMPF R4 #0013
+ 0x8C100703, // 000D GETMET R4 R3 K3
+ 0x7C100200, // 000E CALL R4 1
+ 0x78120002, // 000F JMPF R4 #0013
+ 0x8C100304, // 0010 GETMET R4 R1 K4
+ 0x5C180600, // 0011 MOVE R6 R3
+ 0x7C100400, // 0012 CALL R4 2
+ 0x00080505, // 0013 ADD R2 R2 K5
+ 0x7001FFED, // 0014 JMP #0003
+ 0x80040200, // 0015 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: find_session_by_resumption_id
+********************************************************************/
+be_local_closure(Matter_Session_Store_find_session_by_resumption_id, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_const_int(0),
+ /* K2 */ be_nested_str_weak(sessions),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20session_X2Eresumption_id_X3D_X25s_X20vs_X20_X25s),
+ /* K7 */ be_nested_str_weak(resumption_id),
+ /* K8 */ be_const_int(3),
+ /* K9 */ be_nested_str_weak(shared_secret),
+ /* K10 */ be_nested_str_weak(MTR_X3A_X20session_X2Eshared_secret_X3D_X25s),
+ /* K11 */ be_nested_str_weak(update),
+ /* K12 */ be_const_int(1),
+ }),
+ be_str_weak(find_session_by_resumption_id),
+ &be_const_str_solidified,
+ ( &(const binstruction[49]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x740E0001, // 0002 JMPT R3 #0005
+ 0x4C0C0000, // 0003 LDNIL R3
+ 0x80040600, // 0004 RET 1 R3
+ 0x580C0001, // 0005 LDCONST R3 K1
+ 0x88100102, // 0006 GETMBR R4 R0 K2
+ 0x6014000C, // 0007 GETGBL R5 G12
+ 0x5C180800, // 0008 MOVE R6 R4
+ 0x7C140200, // 0009 CALL R5 1
+ 0x14140605, // 000A LT R5 R3 R5
+ 0x78160023, // 000B JMPF R5 #0030
+ 0x94140803, // 000C GETIDX R5 R4 R3
+ 0xB81A0600, // 000D GETNGBL R6 K3
+ 0x8C180D04, // 000E GETMET R6 R6 K4
+ 0x8C200505, // 000F GETMET R8 R2 K5
+ 0x58280006, // 0010 LDCONST R10 K6
+ 0x602C0008, // 0011 GETGBL R11 G8
+ 0x88300B07, // 0012 GETMBR R12 R5 K7
+ 0x7C2C0200, // 0013 CALL R11 1
+ 0x60300008, // 0014 GETGBL R12 G8
+ 0x5C340200, // 0015 MOVE R13 R1
+ 0x7C300200, // 0016 CALL R12 1
+ 0x7C200800, // 0017 CALL R8 4
+ 0x58240008, // 0018 LDCONST R9 K8
+ 0x7C180600, // 0019 CALL R6 3
+ 0x88180B07, // 001A GETMBR R6 R5 K7
+ 0x1C180C01, // 001B EQ R6 R6 R1
+ 0x781A0010, // 001C JMPF R6 #002E
+ 0x88180B09, // 001D GETMBR R6 R5 K9
+ 0x4C1C0000, // 001E LDNIL R7
+ 0x20180C07, // 001F NE R6 R6 R7
+ 0x781A000C, // 0020 JMPF R6 #002E
+ 0xB81A0600, // 0021 GETNGBL R6 K3
+ 0x8C180D04, // 0022 GETMET R6 R6 K4
+ 0x8C200505, // 0023 GETMET R8 R2 K5
+ 0x5828000A, // 0024 LDCONST R10 K10
+ 0x602C0008, // 0025 GETGBL R11 G8
+ 0x88300B09, // 0026 GETMBR R12 R5 K9
+ 0x7C2C0200, // 0027 CALL R11 1
+ 0x7C200600, // 0028 CALL R8 3
+ 0x58240008, // 0029 LDCONST R9 K8
+ 0x7C180600, // 002A CALL R6 3
+ 0x8C180B0B, // 002B GETMET R6 R5 K11
+ 0x7C180200, // 002C CALL R6 1
+ 0x80040A00, // 002D RET 1 R5
+ 0x000C070C, // 002E ADD R3 R3 K12
+ 0x7001FFD6, // 002F JMP #0007
+ 0x80000000, // 0030 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: save_fabrics
+********************************************************************/
+be_local_closure(Matter_Session_Store_save_fabrics, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(json),
+ /* K1 */ be_nested_str_weak(remove_expired),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(fabrics),
+ /* K4 */ be_nested_str_weak(persistables),
+ /* K5 */ be_nested_str_weak(_sessions),
+ /* K6 */ be_const_int(1),
+ /* K7 */ be_nested_str_weak(stop_iteration),
+ /* K8 */ be_nested_str_weak(push),
+ /* K9 */ be_nested_str_weak(tojson),
+ /* K10 */ be_nested_str_weak(_X5B),
+ /* K11 */ be_nested_str_weak(concat),
+ /* K12 */ be_nested_str_weak(_X2C),
+ /* K13 */ be_nested_str_weak(_X5D),
+ /* K14 */ be_nested_str_weak(string),
+ /* K15 */ be_nested_str_weak(_FABRICS),
+ /* K16 */ be_nested_str_weak(w),
+ /* K17 */ be_nested_str_weak(write),
+ /* K18 */ be_nested_str_weak(close),
+ /* K19 */ be_nested_str_weak(tasmota),
+ /* K20 */ be_nested_str_weak(log),
+ /* K21 */ be_nested_str_weak(format),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20_X25i_X20fabric_X28s_X29_X20and_X20_X25i_X20session_X28s_X29),
+ /* K23 */ be_const_int(2),
+ /* K24 */ be_nested_str_weak(device),
+ /* K25 */ be_nested_str_weak(event_fabrics_saved),
+ /* K26 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
+ /* K27 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(save_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[87]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080101, // 0001 GETMET R2 R0 K1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x58080002, // 0003 LDCONST R2 K2
+ 0x600C0012, // 0004 GETGBL R3 G18
+ 0x7C0C0000, // 0005 CALL R3 0
+ 0x60100010, // 0006 GETGBL R4 G16
+ 0x88140103, // 0007 GETMBR R5 R0 K3
+ 0x8C140B04, // 0008 GETMET R5 R5 K4
+ 0x7C140200, // 0009 CALL R5 1
+ 0x7C100200, // 000A CALL R4 1
+ 0xA8020013, // 000B EXBLK 0 #0020
+ 0x5C140800, // 000C MOVE R5 R4
+ 0x7C140000, // 000D CALL R5 0
+ 0x60180010, // 000E GETGBL R6 G16
+ 0x881C0B05, // 000F GETMBR R7 R5 K5
+ 0x8C1C0F04, // 0010 GETMET R7 R7 K4
+ 0x7C1C0200, // 0011 CALL R7 1
+ 0x7C180200, // 0012 CALL R6 1
+ 0xA8020003, // 0013 EXBLK 0 #0018
+ 0x5C1C0C00, // 0014 MOVE R7 R6
+ 0x7C1C0000, // 0015 CALL R7 0
+ 0x00080506, // 0016 ADD R2 R2 K6
+ 0x7001FFFB, // 0017 JMP #0014
+ 0x58180007, // 0018 LDCONST R6 K7
+ 0xAC180200, // 0019 CATCH R6 1 0
+ 0xB0080000, // 001A RAISE 2 R0 R0
+ 0x8C180708, // 001B GETMET R6 R3 K8
+ 0x8C200B09, // 001C GETMET R8 R5 K9
+ 0x7C200200, // 001D CALL R8 1
+ 0x7C180400, // 001E CALL R6 2
+ 0x7001FFEB, // 001F JMP #000C
+ 0x58100007, // 0020 LDCONST R4 K7
+ 0xAC100200, // 0021 CATCH R4 1 0
+ 0xB0080000, // 0022 RAISE 2 R0 R0
+ 0x6010000C, // 0023 GETGBL R4 G12
+ 0x5C140600, // 0024 MOVE R5 R3
+ 0x7C100200, // 0025 CALL R4 1
+ 0x8C14070B, // 0026 GETMET R5 R3 K11
+ 0x581C000C, // 0027 LDCONST R7 K12
+ 0x7C140400, // 0028 CALL R5 2
+ 0x00161405, // 0029 ADD R5 K10 R5
+ 0x00140B0D, // 002A ADD R5 R5 K13
+ 0x5C0C0A00, // 002B MOVE R3 R5
+ 0xA8020017, // 002C EXBLK 0 #0045
+ 0xA4161C00, // 002D IMPORT R5 K14
+ 0x60180011, // 002E GETGBL R6 G17
+ 0x881C010F, // 002F GETMBR R7 R0 K15
+ 0x58200010, // 0030 LDCONST R8 K16
+ 0x7C180400, // 0031 CALL R6 2
+ 0x8C1C0D11, // 0032 GETMET R7 R6 K17
+ 0x5C240600, // 0033 MOVE R9 R3
+ 0x7C1C0400, // 0034 CALL R7 2
+ 0x8C1C0D12, // 0035 GETMET R7 R6 K18
+ 0x7C1C0200, // 0036 CALL R7 1
+ 0xB81E2600, // 0037 GETNGBL R7 K19
+ 0x8C1C0F14, // 0038 GETMET R7 R7 K20
+ 0x8C240B15, // 0039 GETMET R9 R5 K21
+ 0x582C0016, // 003A LDCONST R11 K22
+ 0x5C300800, // 003B MOVE R12 R4
+ 0x5C340400, // 003C MOVE R13 R2
+ 0x7C240800, // 003D CALL R9 4
+ 0x58280017, // 003E LDCONST R10 K23
+ 0x7C1C0600, // 003F CALL R7 3
+ 0x881C0118, // 0040 GETMBR R7 R0 K24
+ 0x8C1C0F19, // 0041 GETMET R7 R7 K25
+ 0x7C1C0200, // 0042 CALL R7 1
+ 0xA8040001, // 0043 EXBLK 1 1
+ 0x70020010, // 0044 JMP #0056
+ 0xAC140002, // 0045 CATCH R5 0 2
+ 0x7002000D, // 0046 JMP #0055
+ 0xB81E2600, // 0047 GETNGBL R7 K19
+ 0x8C1C0F14, // 0048 GETMET R7 R7 K20
+ 0x60240008, // 0049 GETGBL R9 G8
+ 0x5C280A00, // 004A MOVE R10 R5
+ 0x7C240200, // 004B CALL R9 1
+ 0x00263409, // 004C ADD R9 K26 R9
+ 0x0024131B, // 004D ADD R9 R9 K27
+ 0x60280008, // 004E GETGBL R10 G8
+ 0x5C2C0C00, // 004F MOVE R11 R6
+ 0x7C280200, // 0050 CALL R10 1
+ 0x0024120A, // 0051 ADD R9 R9 R10
+ 0x58280017, // 0052 LDCONST R10 K23
+ 0x7C1C0600, // 0053 CALL R7 3
+ 0x70020000, // 0054 JMP #0056
+ 0xB0080000, // 0055 RAISE 2 R0 R0
+ 0x80000000, // 0056 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: gen_local_session_id
+********************************************************************/
+be_local_closure(Matter_Session_Store_gen_local_session_id, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(random),
+ /* K2 */ be_const_int(2),
+ /* K3 */ be_nested_str_weak(get),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(get_session_by_local_session_id),
+ }),
+ be_str_weak(gen_local_session_id),
+ &be_const_str_solidified,
+ ( &(const binstruction[19]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x50080200, // 0001 LDBOOL R2 1 0
+ 0x780A000E, // 0002 JMPF R2 #0012
+ 0x8C080301, // 0003 GETMET R2 R1 K1
+ 0x58100002, // 0004 LDCONST R4 K2
+ 0x7C080400, // 0005 CALL R2 2
+ 0x8C080503, // 0006 GETMET R2 R2 K3
+ 0x58100004, // 0007 LDCONST R4 K4
+ 0x58140002, // 0008 LDCONST R5 K2
+ 0x7C080600, // 0009 CALL R2 3
+ 0x8C0C0105, // 000A GETMET R3 R0 K5
+ 0x5C140400, // 000B MOVE R5 R2
+ 0x7C0C0400, // 000C CALL R3 2
+ 0x4C100000, // 000D LDNIL R4
+ 0x1C0C0604, // 000E EQ R3 R3 R4
+ 0x780E0000, // 000F JMPF R3 #0011
+ 0x80040400, // 0010 RET 1 R2
+ 0x7001FFEE, // 0011 JMP #0001
+ 0x80000000, // 0012 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Session_Store
********************************************************************/
be_local_class(Matter_Session_Store,
- 2,
+ 3,
NULL,
- be_nested_map(26,
+ be_nested_map(27,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(gen_local_session_id, 25), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) },
- { be_const_key_weak(remove_redundant_fabric, 15), be_const_closure(Matter_Session_Store_remove_redundant_fabric_closure) },
- { be_const_key_weak(find_session_by_resumption_id, -1), be_const_closure(Matter_Session_Store_find_session_by_resumption_id_closure) },
- { be_const_key_weak(fabrics, 5), be_const_var(1) },
- { be_const_key_weak(add_fabric, -1), be_const_closure(Matter_Session_Store_add_fabric_closure) },
+ { be_const_key_weak(gen_local_session_id, -1), be_const_closure(Matter_Session_Store_gen_local_session_id_closure) },
{ be_const_key_weak(create_fabric, -1), be_const_closure(Matter_Session_Store_create_fabric_closure) },
- { be_const_key_weak(sessions_active, -1), be_const_closure(Matter_Session_Store_sessions_active_closure) },
- { be_const_key_weak(add_session, -1), be_const_closure(Matter_Session_Store_add_session_closure) },
- { be_const_key_weak(count_active_fabrics, -1), be_const_closure(Matter_Session_Store_count_active_fabrics_closure) },
- { be_const_key_weak(remove_expired, 17), be_const_closure(Matter_Session_Store_remove_expired_closure) },
- { be_const_key_weak(_FABRICS, -1), be_nested_str_weak(_matter_fabrics_X2Ejson) },
- { be_const_key_weak(find_fabric_by_index, -1), be_const_closure(Matter_Session_Store_find_fabric_by_index_closure) },
- { be_const_key_weak(sessions, 4), be_const_var(0) },
- { be_const_key_weak(get_session_by_source_node_id, 11), be_const_closure(Matter_Session_Store_get_session_by_source_node_id_closure) },
- { be_const_key_weak(next_fabric_idx, -1), be_const_closure(Matter_Session_Store_next_fabric_idx_closure) },
- { be_const_key_weak(get_session_by_local_session_id, 24), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) },
- { be_const_key_weak(active_fabrics, -1), be_const_closure(Matter_Session_Store_active_fabrics_closure) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Session_Store_every_second_closure) },
- { be_const_key_weak(remove_session, -1), be_const_closure(Matter_Session_Store_remove_session_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Session_Store_init_closure) },
- { be_const_key_weak(create_session, -1), be_const_closure(Matter_Session_Store_create_session_closure) },
+ { be_const_key_weak(get_session_by_source_node_id, -1), be_const_closure(Matter_Session_Store_get_session_by_source_node_id_closure) },
{ be_const_key_weak(save_fabrics, -1), be_const_closure(Matter_Session_Store_save_fabrics_closure) },
- { be_const_key_weak(load_fabrics, -1), be_const_closure(Matter_Session_Store_load_fabrics_closure) },
- { be_const_key_weak(remove_fabric, 6), be_const_closure(Matter_Session_Store_remove_fabric_closure) },
- { be_const_key_weak(find_children_fabrics, -1), be_const_closure(Matter_Session_Store_find_children_fabrics_closure) },
- { be_const_key_weak(find_session_source_id_unsecure, -1), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) },
+ { be_const_key_weak(active_fabrics, 10), be_const_closure(Matter_Session_Store_active_fabrics_closure) },
+ { be_const_key_weak(find_session_by_resumption_id, 20), be_const_closure(Matter_Session_Store_find_session_by_resumption_id_closure) },
+ { be_const_key_weak(sessions_active, -1), be_const_closure(Matter_Session_Store_sessions_active_closure) },
+ { be_const_key_weak(sessions, -1), be_const_var(1) },
+ { be_const_key_weak(fabrics, -1), be_const_var(2) },
+ { be_const_key_weak(load_fabrics, 6), be_const_closure(Matter_Session_Store_load_fabrics_closure) },
+ { be_const_key_weak(find_session_source_id_unsecure, 23), be_const_closure(Matter_Session_Store_find_session_source_id_unsecure_closure) },
+ { be_const_key_weak(_FABRICS, -1), be_nested_str_weak(_matter_fabrics_X2Ejson) },
+ { be_const_key_weak(remove_session, -1), be_const_closure(Matter_Session_Store_remove_session_closure) },
+ { be_const_key_weak(remove_fabric, 22), be_const_closure(Matter_Session_Store_remove_fabric_closure) },
+ { be_const_key_weak(find_fabric_by_index, 19), be_const_closure(Matter_Session_Store_find_fabric_by_index_closure) },
+ { be_const_key_weak(remove_expired, -1), be_const_closure(Matter_Session_Store_remove_expired_closure) },
+ { be_const_key_weak(add_session, -1), be_const_closure(Matter_Session_Store_add_session_closure) },
+ { be_const_key_weak(remove_redundant_fabric, 11), be_const_closure(Matter_Session_Store_remove_redundant_fabric_closure) },
+ { be_const_key_weak(create_session, -1), be_const_closure(Matter_Session_Store_create_session_closure) },
+ { be_const_key_weak(get_session_by_local_session_id, -1), be_const_closure(Matter_Session_Store_get_session_by_local_session_id_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Session_Store_init_closure) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Session_Store_every_second_closure) },
+ { be_const_key_weak(add_fabric, -1), be_const_closure(Matter_Session_Store_add_fabric_closure) },
+ { be_const_key_weak(count_active_fabrics, -1), be_const_closure(Matter_Session_Store_count_active_fabrics_closure) },
+ { be_const_key_weak(device, 5), be_const_var(0) },
+ { be_const_key_weak(next_fabric_idx, 3), be_const_closure(Matter_Session_Store_next_fabric_idx_closure) },
+ { be_const_key_weak(find_children_fabrics, 0), be_const_closure(Matter_Session_Store_find_children_fabrics_closure) },
})),
be_str_weak(Matter_Session_Store)
);
From f9e3b25c9b2eecce33a8129d519075126cb2f6e4 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sat, 22 Apr 2023 23:56:35 +0200
Subject: [PATCH 028/289] Matter persist plugins when fabrics (#18487)
---
.../src/embedded/Matter_Device.be | 8 ++--
.../src/solidify/solidified_Matter_Device.h | 38 +++++++++++--------
2 files changed, 26 insertions(+), 20 deletions(-)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index dec7f2c9e..23b4e2fde 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -111,10 +111,6 @@ class Matter_Device
tasmota.add_driver(self)
self.register_commands()
-
- if self.sessions.count_active_fabrics() > 0
- self.plugins_persist = true # if there are active fabrics, then we persist plugins configuration
- end
end
#############################################################
@@ -983,6 +979,10 @@ class Matter_Device
tasmota.log("MTR: autoconfig = " + str(config), 3)
self._load_plugins_config(config)
+ if !self.plugins_persist && self.sessions.count_active_fabrics() > 0
+ self.plugins_persist = true
+ self.save_param()
+ end
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index b34301182..6404ddaf1 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -2012,7 +2012,7 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[10]) { /* constants */
+ ( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(json),
/* K2 */ be_nested_str_weak(plugins),
@@ -2023,10 +2023,14 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
/* K7 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
/* K8 */ be_const_int(3),
/* K9 */ be_nested_str_weak(_load_plugins_config),
+ /* K10 */ be_nested_str_weak(plugins_persist),
+ /* K11 */ be_nested_str_weak(sessions),
+ /* K12 */ be_nested_str_weak(count_active_fabrics),
+ /* K13 */ be_nested_str_weak(save_param),
}),
be_str_weak(autoconf_device),
&be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
+ ( &(const binstruction[33]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x600C000C, // 0002 GETGBL R3 G12
@@ -2048,7 +2052,18 @@ be_local_closure(Matter_Device_autoconf_device, /* name */
0x8C100109, // 0012 GETMET R4 R0 K9
0x5C180600, // 0013 MOVE R6 R3
0x7C100400, // 0014 CALL R4 2
- 0x80000000, // 0015 RET 0
+ 0x8810010A, // 0015 GETMBR R4 R0 K10
+ 0x74120008, // 0016 JMPT R4 #0020
+ 0x8810010B, // 0017 GETMBR R4 R0 K11
+ 0x8C10090C, // 0018 GETMET R4 R4 K12
+ 0x7C100200, // 0019 CALL R4 1
+ 0x24100903, // 001A GT R4 R4 K3
+ 0x78120003, // 001B JMPF R4 #0020
+ 0x50100200, // 001C LDBOOL R4 1 0
+ 0x90021404, // 001D SETMBR R0 K10 R4
+ 0x8C10010D, // 001E GETMET R4 R0 K13
+ 0x7C100200, // 001F CALL R4 1
+ 0x80000000, // 0020 RET 0
})
)
);
@@ -2275,7 +2290,7 @@ be_local_closure(Matter_Device_init, /* name */
),
}),
1, /* has constants */
- ( &(const bvalue[41]) { /* constants */
+ ( &(const bvalue[39]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(tasmota),
@@ -2315,12 +2330,10 @@ be_local_closure(Matter_Device_init, /* name */
/* K36 */ be_nested_str_weak(_init_basic_commissioning),
/* K37 */ be_nested_str_weak(add_driver),
/* K38 */ be_nested_str_weak(register_commands),
- /* K39 */ be_nested_str_weak(count_active_fabrics),
- /* K40 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[108]) { /* code */
+ ( &(const binstruction[101]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0xB80E0400, // 0002 GETNGBL R3 K2
@@ -2420,15 +2433,8 @@ be_local_closure(Matter_Device_init, /* name */
0x7C0C0400, // 0060 CALL R3 2
0x8C0C0126, // 0061 GETMET R3 R0 K38
0x7C0C0200, // 0062 CALL R3 1
- 0x880C0116, // 0063 GETMBR R3 R0 K22
- 0x8C0C0727, // 0064 GETMET R3 R3 K39
- 0x7C0C0200, // 0065 CALL R3 1
- 0x240C0728, // 0066 GT R3 R3 K40
- 0x780E0001, // 0067 JMPF R3 #006A
- 0x500C0200, // 0068 LDBOOL R3 1 0
- 0x90021203, // 0069 SETMBR R0 K9 R3
- 0xA0000000, // 006A CLOSE R0
- 0x80000000, // 006B RET 0
+ 0xA0000000, // 0063 CLOSE R0
+ 0x80000000, // 0064 RET 0
})
)
);
From 799ba675eb523afc2c2b3314e5c04bfe180869e6 Mon Sep 17 00:00:00 2001
From: gemu
Date: Sun, 23 Apr 2023 10:19:31 +0200
Subject: [PATCH 029/289] add xpt2046 option for spi bus 2 (#18480)
* allow spi bus 2
* xpt spi bus 2
* xpt option bus
* xpt option spi bus 2
* exclude c3
* exclude s2
* fix s3
* typo
---
.../XPT2046_Touchscreen.cpp | 25 ++++++++++++++--
.../XPT2046_Touchscreen/XPT2046_Touchscreen.h | 6 ++--
tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino | 29 +++++++++++++++++--
.../tasmota_xdsp_display/xdsp_04_ili9341.ino | 2 +-
.../xdsp_17_universal.ino | 14 +++++++--
5 files changed, 66 insertions(+), 10 deletions(-)
diff --git a/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp b/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp
index 3b9bc4077..3972f0a49 100755
--- a/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp
+++ b/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.cpp
@@ -30,10 +30,31 @@
static XPT2046_Touchscreen *isrPinptr;
void isrPin(void);
-bool XPT2046_Touchscreen::begin(SPIClass &wspi)
-{
+bool XPT2046_Touchscreen::begin(SPIClass &wspi) {
+
+#ifdef ESP32
+ if (!bus) {
+ _pspi = &wspi;
+ } else {
+#ifndef CONFIG_IDF_TARGET_ESP32C3
+#ifndef CONFIG_IDF_TARGET_ESP32S2
+ if (bus == 1) {
+ _pspi = new SPIClass(HSPI);
+ } else {
+#ifndef CONFIG_IDF_TARGET_ESP32S3
+ _pspi = new SPIClass(VSPI);
+#endif
+ }
+#endif
+#endif
+ }
+ //Serial.printf("sclk=%d :: miso=%d, mosi=%d, irq=%d, bus=%d ", sclk, miso, mosi, tirqPin, bus);
+ _pspi->begin(sclk, miso, mosi, -1);
+#else
_pspi = &wspi;
_pspi->begin();
+#endif
+
pinMode(csPin, OUTPUT);
digitalWrite(csPin, HIGH);
if (255 != tirqPin) {
diff --git a/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.h b/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.h
index 279bebe8e..30e5066dd 100755
--- a/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.h
+++ b/lib/lib_display/XPT2046_Touchscreen/XPT2046_Touchscreen.h
@@ -47,8 +47,8 @@ public:
class XPT2046_Touchscreen {
public:
- constexpr XPT2046_Touchscreen(uint8_t cspin, uint8_t tirq=255)
- : csPin(cspin), tirqPin(tirq) { }
+ constexpr XPT2046_Touchscreen(uint8_t cspin, uint8_t tirq=255, uint8_t bus=0, uint8_t sclk=0, uint8_t miso=0, uint8_t mosi=0)
+ : csPin(cspin), tirqPin(tirq), bus(bus), sclk(sclk), miso(miso), mosi(mosi) { }
bool begin(SPIClass &wspi = SPI);
#if defined(_FLEXIO_SPI_H_)
bool begin(FlexIOSPI &wflexspi);
@@ -66,7 +66,7 @@ public:
private:
void update();
- uint8_t csPin, tirqPin, rotation=1;
+ uint8_t csPin, tirqPin, rotation=1, bus=0, sclk=0, miso=0, mosi=0;
int16_t xraw=0, yraw=0, zraw=0;
uint32_t msraw=0x80000000;
SPIClass *_pspi = nullptr;
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino b/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino
index 69843572b..01bbe97ca 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino
@@ -228,6 +228,8 @@ bool GT911_Touch_Init(TwoWire *i2c, int8_t irq_pin, int8_t rst_pin, uint16_t xs,
if (ESP_OK == GT911_touchp->begin(i2c, irq_pin, rst_pin, xs, ys)) {
AddLog(LOG_LEVEL_INFO, PSTR("TI: GT911"));
GT911_found = true;
+ } else {
+ AddLog(LOG_LEVEL_INFO, PSTR("TI: GT911 failed"));
}
return GT911_found;
}
@@ -247,8 +249,31 @@ void GT911_CheckTouch(void) {
#include
XPT2046_Touchscreen *XPT2046_touchp;
-bool XPT2046_Touch_Init(uint16_t CS) {
- XPT2046_touchp = new XPT2046_Touchscreen(CS);
+bool XPT2046_Touch_Init(uint16_t CS, int8_t irqpin, uint8_t bus) {
+ int8_t sclk = -1;
+ int8_t mosi = -1;
+ int8_t miso = -1;
+ uint8_t xbus = bus;
+ bus &= 1;
+ #ifdef ESP32
+ if (PinUsed(GPIO_SPI_CLK, bus) && PinUsed(GPIO_SPI_MISO, bus) && PinUsed(GPIO_SPI_MOSI, bus)) {
+ // must init SPI with pins
+ sclk = Pin(GPIO_SPI_CLK, bus);
+ miso = Pin(GPIO_SPI_MISO, bus);
+ mosi = Pin(GPIO_SPI_MOSI, bus);
+ }
+ #endif // ESP32
+
+ #ifdef ESP8266
+ if (PinUsed(GPIO_SPI_CLK) && PinUsed(GPIO_SPI_MISO) && PinUsed(GPIO_SPI_MOSI)) {
+ // must init SPI with pins
+ sclk = Pin(GPIO_SPI_CLK);
+ miso = Pin(GPIO_SPI_MISO);
+ mosi = Pin(GPIO_SPI_MOSI);
+ }
+ #endif // ESP8266
+
+ XPT2046_touchp = new XPT2046_Touchscreen(CS, irqpin, xbus, sclk, miso, mosi);
XPT2046_found = XPT2046_touchp->begin();
if (XPT2046_found) {
AddLog(LOG_LEVEL_INFO, PSTR("TS: XPT2046"));
diff --git a/tasmota/tasmota_xdsp_display/xdsp_04_ili9341.ino b/tasmota/tasmota_xdsp_display/xdsp_04_ili9341.ino
index 96dae6558..169e223c2 100644
--- a/tasmota/tasmota_xdsp_display/xdsp_04_ili9341.ino
+++ b/tasmota/tasmota_xdsp_display/xdsp_04_ili9341.ino
@@ -132,7 +132,7 @@ void ILI9341_InitDriver()
#endif // ESP32
#ifdef USE_XPT2046
- XPT2046_Touch_Init(Pin(GPIO_XPT2046_CS));
+ XPT2046_Touch_Init(Pin(GPIO_XPT2046_CS),-1,0);
#endif
tft_init_done = true;
diff --git a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
index c3154cd60..c784ed31c 100644
--- a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
+++ b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
@@ -392,9 +392,19 @@ int8_t cs;
#ifdef USE_XPT2046
cp = strstr(ddesc, ":TS,");
if (cp) {
- cp+=4;
+ cp += 4;
uint8_t touch_cs = replacepin(&cp, Pin(GPIO_XPT2046_CS));
- XPT2046_Touch_Init(touch_cs);
+ int8_t irqpin = -1;
+ if (*(cp - 1) == ',') {
+ irqpin = strtol(cp, &cp, 10);
+ }
+ uint8_t bus = 1;
+ if (*cp == ',') {
+ cp++;
+ bus = strtol(cp, &cp, 10);
+ if (bus < 1) bus = 1;
+ }
+ XPT2046_Touch_Init(touch_cs, irqpin, bus - 1);
}
#endif // USE_XPT2046
From 21bb822dec0cd13f8af66a532297cfa70db4ef7a Mon Sep 17 00:00:00 2001
From: Felix Laevsky
Date: Sun, 23 Apr 2023 11:51:00 +0300
Subject: [PATCH 030/289] Fix for ModuleAddress command (#18490)
---
tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino
index 03c0f1e10..a1ca3c610 100644
--- a/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino
+++ b/tasmota/tasmota_xnrg_energy/xnrg_05_pzem_ac.ino
@@ -50,6 +50,7 @@ struct PZEMAC {
void PzemAcEverySecond(void)
{
bool data_ready = PzemAcModbus->ReceiveReady();
+ uint16_t addr;
if (data_ready) {
uint8_t buffer[30]; // At least 5 + (2 * 10) = 25
@@ -95,7 +96,8 @@ void PzemAcEverySecond(void)
}
PzemAc.send_retry = ENERGY_WATCHDOG;
if (ADDR_SEND == PzemAc.address_step) {
- PzemAcModbus->Send(0xF8, 0x06, 0x0002, (uint16_t)PzemAc.address);
+ addr = PzemAc.address;
+ PzemAcModbus->Send(0xF8, 0x06, 0x0002, 1, (uint16_t *) &addr);
PzemAc.address_step--;
} else {
PzemAcModbus->Send(PZEM_AC_DEVICE_ADDRESS + PzemAc.phase, 0x04, 0, 10);
From c1db67ce376ae5bf93c8abc0092632cbe595157d Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sun, 23 Apr 2023 18:09:33 +0200
Subject: [PATCH 031/289] Refactor GDK101 driver
---
.../tasmota_xsns_sensor/xsns_106_gdk101.ino | 263 ++++++++----------
1 file changed, 121 insertions(+), 142 deletions(-)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_106_gdk101.ino b/tasmota/tasmota_xsns_sensor/xsns_106_gdk101.ino
index e8cdcb782..cdccf5ce8 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_106_gdk101.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_106_gdk101.ino
@@ -1,7 +1,7 @@
/*
xsns_106_gdk101.ino - Support for GDK101 gamma radiation sensor
-
- Copyright (C) 2019 Petr Novacek
+
+ Copyright (C) 2019 Petr Novacek
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,37 +23,35 @@
/*********************************************************************************************\
* GDK101 gamma radiation sensor ftlab.co.kr
*
- * For background information see http://allsmartlab.com/eng/294-2/
+ * For background information see http://allsmartlab.com/eng/294-2/ and AN_GDK101_V1.1_I2C.pdf
*
- * I2C Address:
+ * I2C Address:
* A0 Short, A1 Short : 0x18
* A0 Open, A1 Short : 0x19
* A0 Short, A1 Open : 0x1A
* A0 Open, A1 Open : 0x1B
\*********************************************************************************************/
-#define XSNS_106 106
+#define XSNS_106 106
-#define XI2C_79 79 // See I2CDEVICES.md
+#define XI2C_79 79 // See I2CDEVICES.md
// I2C adresses
-#define GDK101_ADDRESS1 0x18
-#define GDK101_ADDRESS2 0x19
-#define GDK101_ADDRESS3 0x1A
-#define GDK101_ADDRESS4 0x1B
+#define GDK101_ADDRESS1 0x18
+#define GDK101_ADDRESS2 0x19
+#define GDK101_ADDRESS3 0x1A
+#define GDK101_ADDRESS4 0x1B
// I2C register
-#define READ_FIRMWARE 0xB4
-#define RESET 0xA0
-#define READ_STATUS 0xB0
-#define READ_MEASURING_TIME 0xB1
-#define READ_10MIN_AVG 0xB2
-#define READ_1MIN_AVG 0xB3
+#define GDK101_RESET 0xA0
+#define GDK101_READ_STATUS 0xB0
+#define GDK101_READ_MEASURING_TIME 0xB1
+#define GDK101_READ_10MIN_AVG 0xB2
+#define GDK101_READ_1MIN_AVG 0xB3
+#define GDK101_READ_FIRMWARE 0xB4
// gdk101 variables
-uint8_t gdk101_address;
uint8_t gdk101_addresses[] = { GDK101_ADDRESS1, GDK101_ADDRESS2, GDK101_ADDRESS3, GDK101_ADDRESS4 };
-uint8_t gdk101_discovered = false;
typedef enum {
GDK_STATUS_READY,
@@ -82,86 +80,69 @@ typedef struct gdk_avg_dose {
uint8_t fractional;
} gdk_avg_dose_t;
-bool gdk_ready = false;
-gdk_fW_version_t fw_version;
-gdk_avg_dose_t mea_10min_avg;
-gdk_avg_dose_t mea_1min_avg;
-gdk_status_data_t gdk_status = {GDK_STATUS_INVALID, false};
-gdk_measuring_time_t gdk_time = {0, 0};
-uint8_t evr10 = 0;
-// uint8_t vibr = 0;
+struct GDK {
+ uint32_t time;
+// gdk_measuring_time_t time = {0, 0};
+ gdk_fW_version_t version;
+ gdk_avg_dose_t ard_10min;
+ gdk_avg_dose_t ard_1min;
+ gdk_status_data_t status = {GDK_STATUS_INVALID, false};
+ uint8_t address;
+ uint8_t evr10 = 0;
+ bool ready = false;
+} Gdk;
-#ifdef USE_WEBSERVER
-const char HTTP_GDK101_FW[] PROGMEM = "{s}%s " "FW Version" "{m}%d.%d{e}";
-const char HTTP_GDK101_STATUS[] PROGMEM = "{s}%s " "Status" "{m}%d{e}";
-const char HTTP_GDK101_VIB_STATUS[] PROGMEM = "{s}%s " "Vibration Status" "{m}%d{e}";
-const char HTTP_GDK101_MEAS_TIME[] PROGMEM = "{s}%s " "Measurement Time" "{m}%d:%02d{e}";
-#endif // USE_WEBSERVER
+/********************************************************************************************/
-bool gdk101_reset(bool *reset);
-
-void gdk101_err_log(bool ret) {
- if(!ret) {
+void Gdk101ErrLog(bool ret) {
+ if (!ret) {
DEBUG_SENSOR_LOG("GDK101: I2C read error");
}
}
-void gdk101_detect(void)
-{
- bool ret = false;
- bool reset = false;
+void Gdk101Detect(void) {
for (uint32_t i = 0; i < sizeof(gdk101_addresses); i++) {
- gdk101_address = gdk101_addresses[i];
- if (!I2cSetDevice(gdk101_address)) {
- continue; // do not make the next step without a confirmed device on the bus
+ Gdk.address = gdk101_addresses[i];
+ if (!I2cSetDevice(Gdk.address)) {
+ continue; // Do not make the next step without a confirmed device on the bus
}
- ret = gdk101_reset(&reset);
- if(ret) {
- if(reset) {
+ bool reset = false;
+ bool ret = Gdk101Reset(&reset);
+ if (ret) {
+ if (reset) {
delay(10);
- I2cSetActiveFound(gdk101_address, "GDK101");
- ret = gdk101_get_fw_version(&fw_version);
- gdk101_err_log(ret);
- gdk_ready = true;
+ I2cSetActiveFound(Gdk.address, "GDK101");
+ ret = Gdk101Firmware(&Gdk.version);
+ Gdk101ErrLog(ret);
+ Gdk.ready = true;
break;
}
}
}
}
-void gdk101_init() {
-
- if (gdk_ready) return;
-
- gdk101_detect();
-
-}
-
-bool gdk101_reset(bool *reset) {
+bool Gdk101Reset(bool *reset) {
uint8_t buf;
- bool ret = false;
- ret = I2cValidRead8(&buf, gdk101_address, RESET);
+ bool ret = I2cValidRead8(&buf, Gdk.address, GDK101_RESET);
if (ret) {
- *reset = (bool) buf;
+ *reset = (bool) buf; // 0 = Reset fail, 1 = Reset success
}
return ret;
}
-bool gdk101_get_fw_version(struct gdk_fW_version *fw) {
+bool Gdk101Firmware(struct gdk_fW_version *fw) {
uint8_t buf[2];
- bool ret = false;
- ret = I2cValidRead16LE((uint16_t*) buf, gdk101_address, READ_FIRMWARE);
+ bool ret = I2cValidRead16LE((uint16_t*) buf, Gdk.address, GDK101_READ_FIRMWARE);
if (ret) {
- fw->major = buf[0];
- fw->minor = buf[1];
+ fw->major = buf[0]; // 0
+ fw->minor = buf[1]; // 6
}
return ret;
}
-bool gdk101_get_10min_avg(struct gdk_avg_dose *avg) {
+bool Gdk101Ard10min(struct gdk_avg_dose *avg) {
uint8_t buf[2];
- bool ret = false;
- ret = I2cValidRead16LE((uint16_t*) buf, gdk101_address, READ_10MIN_AVG);
+ bool ret = I2cValidRead16LE((uint16_t*) buf, Gdk.address, GDK101_READ_10MIN_AVG);
if (ret) {
avg->integral = buf[0];
avg->fractional = buf[1];
@@ -169,10 +150,9 @@ bool gdk101_get_10min_avg(struct gdk_avg_dose *avg) {
return ret;
}
-bool gdk101_get_1min_avg(struct gdk_avg_dose *avg) {
+bool Gdk101Ard1min(struct gdk_avg_dose *avg) {
uint8_t buf[2];
- bool ret = false;
- ret = I2cValidRead16LE((uint16_t*) buf, gdk101_address, READ_1MIN_AVG);
+ bool ret = I2cValidRead16LE((uint16_t*) buf, Gdk.address, GDK101_READ_1MIN_AVG);
if (ret) {
avg->integral = buf[0];
avg->fractional = buf[1];
@@ -180,21 +160,20 @@ bool gdk101_get_1min_avg(struct gdk_avg_dose *avg) {
return ret;
}
-bool gdk101_get_status(struct gdk_status_data *status) {
+bool Gdk101Status(struct gdk_status_data *status) {
uint8_t buf[2];
- bool ret = false;
- ret = I2cValidRead16LE((uint16_t*) buf, gdk101_address, READ_STATUS);
+ bool ret = I2cValidRead16LE((uint16_t*) buf, Gdk.address, GDK101_READ_STATUS);
if (ret) {
- status->status = (gdk_status_t) buf[0];
- status->vibration = (bool) buf[1];
+ status->status = (gdk_status_t) buf[0]; // 0 = Ready, 1 = 10min Waiting, 2 = Normal
+ status->vibration = (bool) buf[1]; // 0 = Off, 1 = On
}
return ret;
}
-bool gdk101_get_measuring_time(struct gdk_measuring_time *meas_time) {
+bool Gdk101MeasuringTime(struct gdk_measuring_time *meas_time) {
+ // Can return 255 minutes and 60 seconds - Not used in Application Note AN_GDK101_V1.1
uint8_t buf[2];
- bool ret = false;
- ret = I2cValidRead16LE((uint16_t*) buf, gdk101_address, READ_MEASURING_TIME);
+ bool ret = I2cValidRead16LE((uint16_t*) buf, Gdk.address, GDK101_READ_MEASURING_TIME);
if (ret) {
meas_time->min = buf[0];
meas_time->sec = buf[1];
@@ -202,98 +181,98 @@ bool gdk101_get_measuring_time(struct gdk_measuring_time *meas_time) {
return ret;
}
-void every_second(void) {
- if (!gdk_ready) return;
-
- gdk101_every_second();
-
- if (evr10 == 10) {
- gdk101_every_10_second();
- evr10 = 1;
- }
- else {
- evr10++;
+void Gdk101EverySecond(void) {
+ bool ret = Gdk101Status(&Gdk.status);
+ Gdk101ErrLog(ret);
+ if (Gdk.status.status > GDK_STATUS_READY) {
+ Gdk.time++;
+ } else {
+ Gdk.time = 0;
}
+ Gdk.evr10++;
+ if (10 == Gdk.evr10) {
+ Gdk.evr10 = 0;
+
+ ret = Gdk101Ard10min(&Gdk.ard_10min);
+ Gdk101ErrLog(ret);
+ ret = Gdk101Ard1min(&Gdk.ard_1min);
+ Gdk101ErrLog(ret);
+// ret = Gdk101MeasuringTime(&Gdk.time);
+// Gdk101ErrLog(ret);
+ }
}
-void gdk101_every_second(void) {
- bool ret = false;
+#ifdef USE_WEBSERVER
+const char HTTP_GDK101_FW[] PROGMEM = "{s}%s " "FW Version" "{m}%d.%d{e}";
+const char HTTP_GDK101_STATUS[] PROGMEM = "{s}%s " "Status" "{m}%d{e}";
+const char HTTP_GDK101_VIB_STATUS[] PROGMEM = "{s}%s " "Vibration Status" "{m}%d{e}";
+//const char HTTP_GDK101_MEAS_TIME[] PROGMEM = "{s}%s " "Measurement Time" "{m}%d:%02d{e}";
+const char HTTP_GDK101_MEAS_TIME[] PROGMEM = "{s}%s " "Measurement" "{m}%s{e}";
+#endif // USE_WEBSERVER
- ret = gdk101_get_status(&gdk_status);
- gdk101_err_log(ret);
-}
-void gdk101_every_10_second(void) {
- bool ret = false;
-
- ret = gdk101_get_10min_avg(&mea_10min_avg);
- gdk101_err_log(ret);
- ret = gdk101_get_1min_avg(&mea_1min_avg);
- gdk101_err_log(ret);
- ret = gdk101_get_measuring_time(&gdk_time);
- gdk101_err_log(ret);
-}
-
-void gdk101_show(uint8_t json) {
+void Gdk101Show(uint8_t json) {
char types[16];
strcpy_P(types, PSTR("GDK101"));
- if (!gdk_ready) return;
-
if (json) {
ResponseAppend_P(PSTR(",\"%s\":{"), types);
- ResponseAppend_P(PSTR("\"FW_V\":%i.%i,"), fw_version.major, fw_version.minor);
- ResponseAppend_P(PSTR("\"10MIN_AVG\":%i.%02i,"), mea_10min_avg.integral, mea_10min_avg.fractional);
- ResponseAppend_P(PSTR("\"1MIN_AVG\":%i.%02i,"), mea_1min_avg.integral, mea_1min_avg.fractional);
- ResponseAppend_P(PSTR("\"STATUS\":%i,"), gdk_status.status);
- ResponseAppend_P(PSTR("\"VIBRATION\":%i,"), gdk_status.vibration);
- ResponseAppend_P(PSTR("\"MEAS_TIME\":\"%i:%02i\""), gdk_time.min, gdk_time.sec);
+ ResponseAppend_P(PSTR("\"Firmware\":%i.%i,"), Gdk.version.major, Gdk.version.minor);
+ ResponseAppend_P(PSTR("\"RadiationAvg10Min\":%i.%02i,"), Gdk.ard_10min.integral, Gdk.ard_10min.fractional);
+ ResponseAppend_P(PSTR("\"RadiationAvg1Min\":%i.%02i,"), Gdk.ard_1min.integral, Gdk.ard_1min.fractional);
+ ResponseAppend_P(PSTR("\"Status\":%i,"), Gdk.status.status);
+ ResponseAppend_P(PSTR("\"Vibration\":%i,"), Gdk.status.vibration);
+// ResponseAppend_P(PSTR("\"MeasTime\":\"%i:%02i\""), Gdk.time.min, Gdk.time.sec);
+ ResponseAppend_P(PSTR("\"Measurement\":\"%s\""), GetDuration(Gdk.time).c_str());
ResponseJsonEnd();
#ifdef USE_WEBSERVER
} else {
#ifdef GDK101_SHOW_FW_VERSION
- WSContentSend_PD(HTTP_GDK101_FW, types, fw_version.major, fw_version.minor);
+ WSContentSend_PD(HTTP_GDK101_FW, types, Gdk.version.major, Gdk.version.minor);
#endif
- WSContentSend_PD(HTTP_SNS_AVG_RAD_DOSE, types, "@10", mea_10min_avg.integral, mea_10min_avg.fractional);
- WSContentSend_PD(HTTP_SNS_AVG_RAD_DOSE, types, "@1", mea_1min_avg.integral, mea_1min_avg.fractional);
+ WSContentSend_PD(HTTP_SNS_AVG_RAD_DOSE, types, "10", Gdk.ard_10min.integral, Gdk.ard_10min.fractional);
+ WSContentSend_PD(HTTP_SNS_AVG_RAD_DOSE, types, "1", Gdk.ard_1min.integral, Gdk.ard_1min.fractional);
#ifdef GDK101_SHOW_STATUS
- WSContentSend_PD(HTTP_GDK101_STATUS, types, gdk_status.status);
+ WSContentSend_PD(HTTP_GDK101_STATUS, types, Gdk.status.status);
#endif
#ifdef GDK101_SHOW_VIBRATION_STATUS
- WSContentSend_PD(HTTP_GDK101_VIB_STATUS, types, gdk_status.vibration);
-#endif
-#ifdef GDK101_SHOW_MEAS_TIME
- WSContentSend_PD(HTTP_GDK101_MEAS_TIME, types, gdk_time.min, gdk_time.sec);
+ WSContentSend_PD(HTTP_GDK101_VIB_STATUS, types, Gdk.status.vibration);
#endif
+//#ifdef GDK101_SHOW_MEAS_TIME
+// WSContentSend_PD(HTTP_GDK101_MEAS_TIME, types, Gdk.time.min, Gdk.time.sec);
+ WSContentSend_PD(HTTP_GDK101_MEAS_TIME, types, GetDuration(Gdk.time).c_str());
+//#endif
#endif // USE_WEBSERVER
}
}
+
/*********************************************************************************************\
Interface
\*********************************************************************************************/
-bool Xsns106(uint32_t function)
-{
- bool result = false;
-
+bool Xsns106(uint32_t function) {
if (!I2cEnabled(XI2C_79)) { return false; }
- switch (function) {
- case FUNC_INIT:
- gdk101_init();
- break;
- case FUNC_EVERY_SECOND:
- every_second();
- break;
- case FUNC_JSON_APPEND:
- gdk101_show(1);
- break;
+ bool result = false;
+
+ if (FUNC_INIT == function) {
+ Gdk101Detect();
+ }
+ else if (Gdk.ready) {
+ switch (function) {
+ case FUNC_EVERY_SECOND:
+ Gdk101EverySecond();
+ break;
+ case FUNC_JSON_APPEND:
+ Gdk101Show(1);
+ break;
#ifdef USE_WEBSERVER
- case FUNC_WEB_SENSOR:
- gdk101_show(0);
- break;
+ case FUNC_WEB_SENSOR:
+ Gdk101Show(0);
+ break;
#endif // USE_WEBSERVER
+ }
}
return result;
}
From 763a8671ab320dd16856da7b8275840a1b93de7b Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Mon, 24 Apr 2023 16:11:54 +0200
Subject: [PATCH 032/289] fix c3 exceptions when using lvgl (#18493)
---
lib/libesp32/berry/default/berry_conf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libesp32/berry/default/berry_conf.h b/lib/libesp32/berry/default/berry_conf.h
index d4aa71573..18d64ad81 100644
--- a/lib/libesp32/berry/default/berry_conf.h
+++ b/lib/libesp32/berry/default/berry_conf.h
@@ -226,7 +226,7 @@
#define BE_USE_OS_MODULE 0
#define BE_USE_GLOBAL_MODULE 1
#define BE_USE_SYS_MODULE 1
- #define BE_USE_DEBUG_MODULE 1
+ #define BE_USE_DEBUG_MODULE 0
#define BE_USE_GC_MODULE 1
#define BE_USE_SOLIDIFY_MODULE 0
#define BE_USE_INTROSPECT_MODULE 1
From 98cad1a192453e48f03b000a358c1aeb40f4d8e9 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Mon, 24 Apr 2023 16:53:37 +0200
Subject: [PATCH 033/289] Create ST7735S_Air101-LCD_display.ini
---
.../ST7735S_Air101-LCD_display.ini | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 tasmota/displaydesc/ST7735S_Air101-LCD_display.ini
diff --git a/tasmota/displaydesc/ST7735S_Air101-LCD_display.ini b/tasmota/displaydesc/ST7735S_Air101-LCD_display.ini
new file mode 100644
index 000000000..daf3ce691
--- /dev/null
+++ b/tasmota/displaydesc/ST7735S_Air101-LCD_display.ini
@@ -0,0 +1,32 @@
+:H,ST7735S,160,80,16,SPI,1,7,2,3,6,11,10,*,16
+:S,2,1,1,0,30,30
+:I
+01,80
+11,80
+B1,3,01,2C,2D
+B2,3,01,2C,2D
+B3,6,01,2C,2D,01,2C,2D
+B4,1,07
+C0,3,A2,04,84
+C1,1,C5
+C2,2,0A,00
+C3,2,8A,2A
+C4,2,8A,EE
+C5,1,0E
+20,0
+36,1,C8
+3A,1,05
+2A,4,00,02,00,7F
+2B,4,00,01,00,7F
+E0,10,02,1C,07,12,37,32,29,2D,29,25,2B,39,00,01,03,10
+E1,10,03,1D,07,06,2E,2C,29,2D,2E,2E,37,3F,00,00,02,10
+13,80
+29,80
+:o,28
+:O,29
+:A,2A,2B,2C,16
+:R,36
+:0,60,00,18,00
+:i,20,21
+:B,60,1
+#
From fba15dea717b98258b0ad5313beac60ad0eac9d5 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Mon, 24 Apr 2023 23:01:02 +0200
Subject: [PATCH 034/289] Matter add UI to change endpoints configuration
(#18498)
---
CHANGELOG.md | 1 +
.../src/embedded/Matter_Base38.be | 5 +
.../src/embedded/Matter_Device.be | 74 +-
.../src/embedded/Matter_MessageHandler.be | 6 +-
.../src/embedded/Matter_Plugin.be | 29 +-
.../src/embedded/Matter_Plugin_Light0.be | 3 +-
.../src/embedded/Matter_Plugin_Light1.be | 3 +-
.../src/embedded/Matter_Plugin_Light2.be | 3 +-
.../src/embedded/Matter_Plugin_Light3.be | 3 +-
.../src/embedded/Matter_Plugin_OnOff.be | 18 +-
.../src/embedded/Matter_Plugin_Root.be | 3 +-
.../src/embedded/Matter_Plugin_Sensor.be | 14 +-
.../embedded/Matter_Plugin_Sensor_Humidity.be | 3 +-
.../Matter_Plugin_Sensor_Illuminance.be | 3 +-
.../embedded/Matter_Plugin_Sensor_Pressure.be | 3 +-
.../src/embedded/Matter_Plugin_Sensor_Temp.be | 3 +-
.../src/embedded/Matter_Session.be | 2 +-
.../berry_matter/src/embedded/Matter_UI.be | 183 +-
.../src/solidify/solidified_Matter_Device.h | 5603 +++++++++--------
.../solidified_Matter_MessageHandler.h | 31 +-
.../src/solidify/solidified_Matter_Plugin.h | 567 +-
.../solidified_Matter_Plugin_Light0.h | 23 +-
.../solidified_Matter_Plugin_Light1.h | 391 +-
.../solidified_Matter_Plugin_Light2.h | 351 +-
.../solidified_Matter_Plugin_Light3.h | 577 +-
.../solidify/solidified_Matter_Plugin_OnOff.h | 374 +-
.../solidify/solidified_Matter_Plugin_Root.h | 373 +-
.../solidified_Matter_Plugin_Sensor.h | 99 +-
...solidified_Matter_Plugin_Sensor_Humidity.h | 141 +-
...idified_Matter_Plugin_Sensor_Illuminance.h | 139 +-
...solidified_Matter_Plugin_Sensor_Pressure.h | 139 +-
.../solidified_Matter_Plugin_Sensor_Temp.h | 141 +-
.../src/solidify/solidified_Matter_UI.h | 2260 ++++---
33 files changed, 6132 insertions(+), 5436 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1365dcecf..acc56390f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
+- Matter add UI to change endpoints configuration
### Breaking Changed
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Base38.be b/lib/libesp32/berry_matter/src/embedded/Matter_Base38.be
index 0992d682d..7a5c84d40 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Base38.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Base38.be
@@ -68,4 +68,9 @@ matter.Base38 = Matter_Base38
#-
+assert(matter.Base38.encode(bytes("DEADBEEF")) == "C.R.5B6")
+assert(matter.Base38.encode(bytes("")) == "")
+assert(matter.Base38.encode(bytes("00")) == "00")
+assert(matter.Base38.encode(bytes("FFFFFFFF")) == "PLS18R6")
+
-#
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index 23b4e2fde..3dc514d64 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -21,16 +21,16 @@
class Matter_Device
static var UDP_PORT = 5540 # this is the default port for group multicast, we also use it for unicast
- static var PASSCODE_DEFAULT = 20202021
static var PBKDF_ITERATIONS = 1000 # I don't see any reason to choose a different number
static var VENDOR_ID = 0xFFF1
static var PRODUCT_ID = 0x8000
static var FILENAME = "_matter_device.json"
static var PASE_TIMEOUT = 10*60 # default open commissioning window (10 minutes)
var started # is the Matter Device started (configured, mDNS and UDPServer started)
- var plugins # list of plugins
+ var plugins # list of plugins instances
var plugins_persist # true if plugins configuration needs to be saved
var plugins_classes # map of registered classes by type name
+ var plugins_config # map of JSON configuration for plugins
var udp_server # `matter.UDPServer()` object
var message_handler # `matter.MessageHandler()` object
var sessions # `matter.Session_Store()` objet
@@ -600,10 +600,11 @@ class Matter_Device
#
def save_param()
import string
+ import json
var j = string.format('{"distinguish":%i,"passcode":%i,"ipv4only":%s', self.root_discriminator, self.root_passcode, self.ipv4only ? 'true':'false')
if self.plugins_persist
j += ',"config":'
- j += self.plugins_to_json()
+ j += json.dump(self.plugins_config)
end
j += '}'
try
@@ -635,9 +636,9 @@ class Matter_Device
self.root_discriminator = j.find("distinguish", self.root_discriminator)
self.root_passcode = j.find("passcode", self.root_passcode)
self.ipv4only = bool(j.find("ipv4only", false))
- var config = j.find("config")
- if config
- self._load_plugins_config(config)
+ self.plugins_config = j.find("config")
+ if self.plugins_config
+ self._load_plugins_config(self.plugins_config)
self.plugins_persist = true
end
except .. as e, m
@@ -652,7 +653,7 @@ class Matter_Device
dirty = true
end
if self.root_passcode == nil
- self.root_passcode = self.PASSCODE_DEFAULT
+ self.root_passcode = self.generate_random_passcode()
dirty = true
end
if dirty self.save_param() end
@@ -975,9 +976,9 @@ class Matter_Device
if size(self.plugins) > 0 return end # already configured
- var config = self.autoconf_device_map()
- tasmota.log("MTR: autoconfig = " + str(config), 3)
- self._load_plugins_config(config)
+ self.plugins_config = self.autoconf_device_map()
+ tasmota.log("MTR: autoconfig = " + str(self.plugins_config), 3)
+ self._load_plugins_config(self.plugins_config)
if !self.plugins_persist && self.sessions.count_active_fabrics() > 0
self.plugins_persist = true
@@ -1096,24 +1097,6 @@ class Matter_Device
for i:1..size(l)-1 var k = l[i] var j = i while (j > 0) && (l[j-1] > k) l[j] = l[j-1] j -= 1 end l[j] = k end return l
end
- #############################################################
- # plugins_to_json
- #
- # Export plugins configuration as a JSON string
- def plugins_to_json()
- import string
- var s = '{'
- var i = 0
- while i < size(self.plugins)
- var pi = self.plugins[i]
- if i > 0 s += ',' end
- s += string.format('"%i":%s', pi.get_endpoint(), pi.to_json())
- i += 1
- end
- s += '}'
- return s
- end
-
#############################################################
# register_plugin_class
#
@@ -1122,6 +1105,24 @@ class Matter_Device
self.plugins_classes[name] = cl
end
+ #############################################################
+ # get_plugin_class_displayname
+ #
+ # get a class name light "light0" and return displayname
+ def get_plugin_class_displayname(name)
+ var cl = self.plugins_classes.find(name)
+ return cl ? cl.NAME : ""
+ end
+
+ #############################################################
+ # get_plugin_class_arg
+ #
+ # get a class name light "light0" and return the name of the json argumen (or empty)
+ def get_plugin_class_arg(name)
+ var cl = self.plugins_classes.find(name)
+ return cl ? cl.ARG : ""
+ end
+
#############################################################
# register_native_classes
#
@@ -1151,6 +1152,23 @@ class Matter_Device
end
end
+ #####################################################################
+ # Generate random passcode
+ #####################################################################
+ static var PASSCODE_INVALID = [ 0, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321]
+ def generate_random_passcode()
+ import crypto
+ var passcode
+ while true
+ passcode = crypto.random(4).get(0, 4) & 0x7FFFFFF
+ if passcode > 0x5F5E0FE continue end # larger than allowed
+ for inv: self.PASSCODE_INVALID
+ if passcode == inv passcode = nil end
+ end
+ if passcode != nil return passcode end
+ end
+ end
+
#####################################################################
# Commands `Mtr___`
#####################################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
index 6c448b9cd..651731c99 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
@@ -203,8 +203,10 @@ class Matter_MessageHandler
return ret
except .. as e, m
tasmota.log("MTR: MessageHandler::msg_received exception: "+str(e)+";"+str(m))
- import debug
- debug.traceback()
+ if self._debug_present
+ import debug
+ debug.traceback()
+ end
return false
end
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
index 659e39fc4..e36f99d88 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
@@ -23,7 +23,10 @@
#@ solidify:Matter_Plugin,weak
class Matter_Plugin
- static var NAME = "generic" # name of the plug-in in json
+ static var TYPE = "generic" # name of the plug-in in json
+ static var NAME = "" # display name of the plug-in
+ static var ARG = "" # additional argument name (or empty if none)
+ static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
static var CLUSTERS = {
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
}
@@ -220,30 +223,6 @@ class Matter_Plugin
self.update_shadow() # force reading value and sending subscriptions
end
- #############################################################
- # to_json
- #
- # generate the json string for parameter of the plug-in
- # this function calls a method to be overriden with custom parameters
- def to_json()
- import string
- var s = string.format('{"type":"%s"', self.NAME)
- s = self.to_json_parameters(s)
- s += '}'
- return s
- end
-
- #############################################################
- # to_json_parameters
- #
- # To be overriden.
- # returns a json sub-string to add after endpoint and type name
- def to_json_parameters(s)
- # s += ',"my_param":"my_value"'
- return s
- end
-
-
end
matter.Plugin = Matter_Plugin
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
index 0c0b02465..a5803101d 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
@@ -25,7 +25,8 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Light0,weak
class Matter_Plugin_Light0 : Matter_Plugin
- static var NAME = "light0" # name of the plug-in in json
+ static var TYPE = "light0" # name of the plug-in in json
+ static var NAME = "Light 0 On" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
index 518b48137..656fbc666 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Light0 end
#@ solidify:Matter_Plugin_Light1,weak
class Matter_Plugin_Light1 : Matter_Plugin_Light0
- static var NAME = "light1" # name of the plug-in in json
+ static var TYPE = "light1" # name of the plug-in in json
+ static var NAME = "Light 1 Dimmer" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
index 928d0a8f5..8c0cde617 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light2,weak
class Matter_Plugin_Light2 : Matter_Plugin_Light1
- static var NAME = "light2" # name of the plug-in in json
+ static var TYPE = "light2" # name of the plug-in in json
+ static var NAME = "Light 2 CT" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
index dec133661..8e1f63d04 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Light1 end
#@ solidify:Matter_Plugin_Light3,weak
class Matter_Plugin_Light3 : Matter_Plugin_Light1
- static var NAME = "light3" # name of the plug-in in json
+ static var TYPE = "light3" # name of the plug-in in json
+ static var NAME = "Light 3 RGB" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
index fd6245ee2..f45a671f8 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
@@ -25,7 +25,10 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_OnOff,weak
class Matter_Plugin_OnOff : Matter_Plugin
- static var NAME = "relay" # name of the plug-in in json
+ static var TYPE = "relay" # name of the plug-in in json
+ static var NAME = "Relay" # display name of the plug-in
+ static var ARG = "relay" # additional argument name (or empty if none)
+ static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
@@ -44,7 +47,7 @@ class Matter_Plugin_OnOff : Matter_Plugin
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.get_onoff() # read actual value
- self.tasmota_relay_index = arguments.find('relay')
+ self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#)
if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
end
@@ -215,17 +218,6 @@ class Matter_Plugin_OnOff : Matter_Plugin
self.attribute_updated(nil, 0x0006, 0x0000) # send to all endpoints
end
- #############################################################
- # to_json_parameters
- #
- # To be overriden.
- # returns a json sub-string to add after endpoint and type name
- def to_json_parameters(s)
- import string
- s += string.format(',"relay":%i', self.tasmota_relay_index)
- return s
- end
-
#############################################################
# every_second
def every_second()
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
index dce3c003f..0427ed022 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
@@ -25,7 +25,8 @@ class Matter_Plugin end
#@ solidify:Matter_Plugin_Root,weak
class Matter_Plugin_Root : Matter_Plugin
- static var NAME = "root" # name of the plug-in in json
+ static var TYPE = "root" # name of the plug-in in json
+ static var NAME = "Root node" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x001F: [0,2,3,4], # Access Control Cluster, p.461
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
index 42511fd7e..45b2ee983 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
@@ -25,6 +25,7 @@ class Matter_Plugin_Device end
#@ solidify:Matter_Plugin_Sensor,weak
class Matter_Plugin_Sensor : Matter_Plugin_Device
+ static var ARG = "filter" # additional argument name (or empty if none)
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
var tasmota_sensor_matcher # Actual matcher object
var shadow_value # Last known value
@@ -33,7 +34,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
- self.tasmota_sensor_filter = arguments.find('filter')
+ self.tasmota_sensor_filter = arguments.find(self.ARG#-'filter'-#)
if self.tasmota_sensor_filter
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
end
@@ -74,16 +75,5 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
return val
end
- #############################################################
- # to_json_parameters
- #
- # To be overriden.
- # returns a json sub-string to add after endpoint and type name
- def to_json_parameters(s)
- import string
- s += string.format(',"filter":"%s"', self.tasmota_sensor_filter)
- return s
- end
-
end
matter.Plugin_Sensor = Matter_Plugin_Sensor
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
index 1f85523aa..b31e12965 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Humidity,weak
class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
- static var NAME = "humidity" # name of the plug-in in json
+ static var TYPE = "humidity" # name of the plug-in in json
+ static var NAME = "Humidity" # display name of the plug-in
static var CLUSTERS = {
0x0405: [0,1,2,0xFFFC,0xFFFD], # Humidity Measurement p.102 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
index bdf631452..f7619bdfb 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Illuminance,weak
class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
- static var NAME = "illuminance" # name of the plug-in in json
+ static var TYPE = "illuminance" # name of the plug-in in json
+ static var NAME = "Illuminance" # display name of the plug-in
static var CLUSTERS = {
0x0400: [0,1,2,0xFFFC,0xFFFD], # Illuminance Measurement p.95 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
index c39de113e..47a2110cb 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Pressure,weak
class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
- static var NAME = "pressure" # name of the plug-in in json
+ static var TYPE = "pressure" # name of the plug-in in json
+ static var NAME = "Pressure" # display name of the plug-in
static var CLUSTERS = {
0x0403: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
index 6dff99c57..9944633be 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
@@ -25,7 +25,8 @@ class Matter_Plugin_Sensor end
#@ solidify:Matter_Plugin_Sensor_Temp,weak
class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
- static var NAME = "temperature" # name of the plug-in in json
+ static var TYPE = "temperature" # name of the plug-in in json
+ static var NAME = "Temperature" # display name of the plug-in
static var CLUSTERS = {
0x0402: [0,1,2,0xFFFC,0xFFFD], # Temperature Measurement p.97 - no writable
}
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be
index 5936c44cf..b0fe0185c 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Session.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Session.be
@@ -328,7 +328,7 @@ class Matter_Session : Matter_Expirable
end
#############################################################
- # Session::to_json()
+ # Session::tojson()
#
# convert a single entry as json
# returns a JSON string
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index 605c55738..5eb86378b 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -32,6 +32,8 @@ import matter
# WebUI for the partition manager
#################################################################################
class Matter_UI
+ static var _CLASSES_TYPES = "root|relay|light0|light1|light2|light3"
+ "|temperature|pressure|illuminance|humidity"
var device
def init(device)
@@ -64,7 +66,7 @@ class Matter_UI
webserver.content_send(string.format(" Matter %s
",
matter_enabled ? "Enabled" : "Disabled"))
- webserver.content_send("Matter support is experimental.
")
+ webserver.content_send("Check the Matter documentation .
")
webserver.content_send("
")
@@ -210,6 +212,79 @@ class Matter_UI
end
+ #- ---------------------------------------------------------------------- -#
+ #- Show plugins configuration
+ #- ---------------------------------------------------------------------- -#
+ def show_plugins_configuration()
+ import webserver
+ import string
+
+ webserver.content_send(" Current Configuration
")
+
+ webserver.content_send("")
+ webserver.content_send("Reset to default
")
+
+ webserver.content_send("")
+ webserver.content_send("")
+ webserver.content_send("Ep. Type Param ")
+
+ # display one line per plug-in
+ var endpoints = self.device.k2l_num(self.device.plugins_config)
+ var i = 0
+ while i < size(endpoints)
+ var ep = endpoints[i]
+ var conf = self.device.plugins_config[str(ep)]
+ var typ = conf.find('type')
+ if !typ continue end
+
+ var arg_name = self.device.get_plugin_class_arg(typ)
+ var arg = arg_name ? str(conf.find(arg_name, '')) : ''
+
+ webserver.content_send(string.format(" ", i, ep))
+
+ webserver.content_send(string.format("", i))
+ self.plugin_option(conf.find('type', ''))
+ webserver.content_send(string.format(" "))
+ webserver.content_send(string.format(" ",
+ i, webserver.html_escape(arg)))
+
+ i += 1
+ end
+
+ # add an empty line for adding a configuration
+ webserver.content_send(string.format(" ", i))
+ webserver.content_send(string.format("", i))
+ self.plugin_option('')
+ webserver.content_send(string.format(" "))
+ webserver.content_send(string.format(" ", i))
+
+ webserver.content_send("
")
+ webserver.content_send("Change configuration ")
+
+ webserver.content_send("
")
+
+ end
+
+ #- ---------------------------------------------------------------------- -#
+ #- Show all possible classes for plugin
+ #- ---------------------------------------------------------------------- -#
+ def plugin_option(cur)
+ import webserver
+ import string
+ var class_types = string.split(self._CLASSES_TYPES, '|')
+
+ var i = 0
+ webserver.content_send(" ")
+ while i < size(class_types)
+ var typ = class_types[i]
+ var nam = self.device.get_plugin_class_displayname(typ)
+ webserver.content_send(string.format("%s ", typ, (typ == cur) ? " selected" : "", nam))
+ i += 1
+ end
+ end
+
#######################################################################
# Display the complete page
#######################################################################
@@ -224,6 +299,7 @@ class Matter_UI
if self.show_enable()
self.show_passcode_form()
+ self.show_plugins_configuration()
self.show_fabric_info()
end
webserver.content_button(webserver.BUTTON_CONFIGURATION)
@@ -241,9 +317,7 @@ class Matter_UI
import partition_core
import persist
-
- #- check that the partition is valid -#
- var p = partition_core.Partition()
+ var error
try
@@ -251,6 +325,7 @@ class Matter_UI
# Change Passcode and/or Passcode
#---------------------------------------------------------------------#
if webserver.has_arg("passcode") || webserver.has_arg("discriminator")
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'passcode'), 3)
if webserver.has_arg("passcode")
self.device.root_passcode = int(webserver.arg("passcode"))
end
@@ -263,17 +338,29 @@ class Matter_UI
#- and force restart -#
webserver.redirect("/?rst=")
+ #---------------------------------------------------------------------#
+ # Enable Matter
+ #---------------------------------------------------------------------#
elif webserver.has_arg("enable")
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'enable'), 3)
tasmota.cmd("SetOption" + str(matter.MATTER_OPTION) + " 1")
#- and force restart -#
webserver.redirect("/?rst=")
+ #---------------------------------------------------------------------#
+ # Disable Matter
+ #---------------------------------------------------------------------#
elif webserver.has_arg("disable")
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'disable'), 3)
tasmota.cmd("SetOption" + str(matter.MATTER_OPTION) + " 0")
#- and force restart -#
webserver.redirect("/?rst=")
+ #---------------------------------------------------------------------#
+ # Delete Fabric
+ #---------------------------------------------------------------------#
elif webserver.has_arg("del_fabric")
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'del_fabric'), 3)
var del_fabric = int(webserver.arg("del_fabric"))
var idx = 0
var fabrics = self.device.sessions.fabrics
@@ -285,11 +372,87 @@ class Matter_UI
idx += 1
end
end
-
- #- and force restart -#
+ #- reload same page -#
webserver.redirect("/matterc?")
+ #---------------------------------------------------------------------#
+ # Reset to default auto-configuration
+ #---------------------------------------------------------------------#
+ elif webserver.has_arg("auto")
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'auto'), 3)
+ self.device.plugins_persist = false
+ self.device.save_param()
+ #- and force restart -#
+ webserver.redirect("/?rst=")
+
+ #---------------------------------------------------------------------#
+ # Apply new configuration template
+ #---------------------------------------------------------------------#
+ elif webserver.has_arg("config")
+ var config = {}
+
+ tasmota.log(string.format("MTR: /matterc received '%s' command", 'config'), 3)
+ # iterate by id
+ var idx = 0
+ var idx_str = string.format("%03i", idx)
+ while webserver.has_arg('ep'+idx_str)
+
+ var ep = webserver.arg('ep'+idx_str)
+ var ep_int = int(ep)
+ var typ = webserver.arg('pi'+idx_str)
+ var arg = webserver.arg('arg'+idx_str)
+ tasmota.log(string.format("MTR: ep=%i type=%s arg=%s", ep, typ, arg), 3)
+
+ if ep != '' && typ != ''
+
+ # check if type exists
+ var typ_class = self.device.plugins_classes.find(typ)
+ if typ_class != nil
+ var elt = {'type':typ}
+ var arg_name = typ_class.ARG
+ var arg_type = typ_class.ARG_TYPE
+ if arg && arg_name
+ elt[arg_name] = arg_type(arg)
+ end
+ config[ep] = elt
+
+ else
+ tasmota.log(string.format("MTR: unknown type = %s", typ), 2)
+ end
+
+ else
+ tasmota.log("MTR: skipping parameter", 2)
+ end
+
+ idx += 1
+ idx_str = string.format("%03i", idx)
end
+
+ tasmota.log(string.format("MTR: config = %s", str(config)), 3)
+
+ # sanity check
+ if !config.contains("0") error = "Missing endpoint 0" end
+
+ if error
+ tasmota.log(string.format("MTR: config error = %s", error), 3)
+ else
+ self.device.plugins_config = config
+ self.device.plugins_persist = true
+ self.device.save_param()
+ #- and force restart -#
+ webserver.redirect("/?rst=")
+ end
+
+ end
+
+ if error
+ webserver.content_start("Parameter error") #- title of the web page -#
+ webserver.content_send_style() #- send standard Tasmota styles -#
+ webserver.content_send(string.format("Error: %s
", webserver.html_escape(error)))
+ webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to configuration page -#
+ webserver.content_stop() #- end of web page -#
+ end
+
except .. as e, m
tasmota.log(string.format("BRY: Exception> '%s' - %s", e, m), 2)
#- display error page -#
@@ -298,7 +461,7 @@ class Matter_UI
webserver.content_send(string.format("Exception: '%s' %s
", e, m))
- webserver.content_button(webserver.BUTTON_MANAGEMENT) #- button back to management page -#
+ webserver.content_button(webserver.BUTTON_CONFIGURATION) #- button back to configuration page -#
webserver.content_stop() #- end of web page -#
end
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index 6404ddaf1..d4d47b146 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -6,6 +6,193 @@
extern const bclass be_class_Matter_Device;
+/********************************************************************
+** Solidified function: save_param
+********************************************************************/
+be_local_closure(Matter_Device_save_param, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[26]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(format),
+ /* K3 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s),
+ /* K4 */ be_nested_str_weak(root_discriminator),
+ /* K5 */ be_nested_str_weak(root_passcode),
+ /* K6 */ be_nested_str_weak(ipv4only),
+ /* K7 */ be_nested_str_weak(true),
+ /* K8 */ be_nested_str_weak(false),
+ /* K9 */ be_nested_str_weak(plugins_persist),
+ /* K10 */ be_nested_str_weak(_X2C_X22config_X22_X3A),
+ /* K11 */ be_nested_str_weak(dump),
+ /* K12 */ be_nested_str_weak(plugins_config),
+ /* K13 */ be_nested_str_weak(_X7D),
+ /* K14 */ be_nested_str_weak(FILENAME),
+ /* K15 */ be_nested_str_weak(w),
+ /* K16 */ be_nested_str_weak(write),
+ /* K17 */ be_nested_str_weak(close),
+ /* K18 */ be_nested_str_weak(tasmota),
+ /* K19 */ be_nested_str_weak(log),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s),
+ /* K21 */ be_nested_str_weak(_X20and_X20condiguration),
+ /* K22 */ be_nested_str_weak(),
+ /* K23 */ be_const_int(2),
+ /* K24 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
+ /* K25 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(save_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[65]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x88180104, // 0004 GETMBR R6 R0 K4
+ 0x881C0105, // 0005 GETMBR R7 R0 K5
+ 0x88200106, // 0006 GETMBR R8 R0 K6
+ 0x78220001, // 0007 JMPF R8 #000A
+ 0x58200007, // 0008 LDCONST R8 K7
+ 0x70020000, // 0009 JMP #000B
+ 0x58200008, // 000A LDCONST R8 K8
+ 0x7C0C0A00, // 000B CALL R3 5
+ 0x88100109, // 000C GETMBR R4 R0 K9
+ 0x78120004, // 000D JMPF R4 #0013
+ 0x000C070A, // 000E ADD R3 R3 K10
+ 0x8C10050B, // 000F GETMET R4 R2 K11
+ 0x8818010C, // 0010 GETMBR R6 R0 K12
+ 0x7C100400, // 0011 CALL R4 2
+ 0x000C0604, // 0012 ADD R3 R3 R4
+ 0x000C070D, // 0013 ADD R3 R3 K13
+ 0xA8020018, // 0014 EXBLK 0 #002E
+ 0x60100011, // 0015 GETGBL R4 G17
+ 0x8814010E, // 0016 GETMBR R5 R0 K14
+ 0x5818000F, // 0017 LDCONST R6 K15
+ 0x7C100400, // 0018 CALL R4 2
+ 0x8C140910, // 0019 GETMET R5 R4 K16
+ 0x5C1C0600, // 001A MOVE R7 R3
+ 0x7C140400, // 001B CALL R5 2
+ 0x8C140911, // 001C GETMET R5 R4 K17
+ 0x7C140200, // 001D CALL R5 1
+ 0xB8162400, // 001E GETNGBL R5 K18
+ 0x8C140B13, // 001F GETMET R5 R5 K19
+ 0x8C1C0302, // 0020 GETMET R7 R1 K2
+ 0x58240014, // 0021 LDCONST R9 K20
+ 0x88280109, // 0022 GETMBR R10 R0 K9
+ 0x782A0001, // 0023 JMPF R10 #0026
+ 0x58280015, // 0024 LDCONST R10 K21
+ 0x70020000, // 0025 JMP #0027
+ 0x58280016, // 0026 LDCONST R10 K22
+ 0x7C1C0600, // 0027 CALL R7 3
+ 0x58200017, // 0028 LDCONST R8 K23
+ 0x7C140600, // 0029 CALL R5 3
+ 0xA8040001, // 002A EXBLK 1 1
+ 0x80040600, // 002B RET 1 R3
+ 0xA8040001, // 002C EXBLK 1 1
+ 0x70020011, // 002D JMP #0040
+ 0xAC100002, // 002E CATCH R4 0 2
+ 0x7002000E, // 002F JMP #003F
+ 0xB81A2400, // 0030 GETNGBL R6 K18
+ 0x8C180D13, // 0031 GETMET R6 R6 K19
+ 0x60200008, // 0032 GETGBL R8 G8
+ 0x5C240800, // 0033 MOVE R9 R4
+ 0x7C200200, // 0034 CALL R8 1
+ 0x00223008, // 0035 ADD R8 K24 R8
+ 0x00201119, // 0036 ADD R8 R8 K25
+ 0x60240008, // 0037 GETGBL R9 G8
+ 0x5C280A00, // 0038 MOVE R10 R5
+ 0x7C240200, // 0039 CALL R9 1
+ 0x00201009, // 003A ADD R8 R8 R9
+ 0x58240017, // 003B LDCONST R9 K23
+ 0x7C180600, // 003C CALL R6 3
+ 0x80040600, // 003D RET 1 R3
+ 0x70020000, // 003E JMP #0040
+ 0xB0080000, // 003F RAISE 2 R0 R0
+ 0x80000000, // 0040 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _trigger_read_sensors
+********************************************************************/
+be_local_closure(Matter_Device__trigger_read_sensors, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(json),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(read_sensors),
+ /* K3 */ be_nested_str_weak(load),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(plugins),
+ /* K6 */ be_nested_str_weak(parse_sensors),
+ /* K7 */ be_const_int(1),
+ /* K8 */ be_nested_str_weak(log),
+ /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
+ /* K10 */ be_const_int(3),
+ }),
+ be_str_weak(_trigger_read_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[37]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xB80A0200, // 0001 GETNGBL R2 K1
+ 0x8C080502, // 0002 GETMET R2 R2 K2
+ 0x7C080200, // 0003 CALL R2 1
+ 0x4C0C0000, // 0004 LDNIL R3
+ 0x1C0C0403, // 0005 EQ R3 R2 R3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0303, // 0008 GETMET R3 R1 K3
+ 0x5C140400, // 0009 MOVE R5 R2
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x4C100000, // 000B LDNIL R4
+ 0x20100604, // 000C NE R4 R3 R4
+ 0x7812000D, // 000D JMPF R4 #001C
+ 0x58100004, // 000E LDCONST R4 K4
+ 0x6014000C, // 000F GETGBL R5 G12
+ 0x88180105, // 0010 GETMBR R6 R0 K5
+ 0x7C140200, // 0011 CALL R5 1
+ 0x14140805, // 0012 LT R5 R4 R5
+ 0x78160006, // 0013 JMPF R5 #001B
+ 0x88140105, // 0014 GETMBR R5 R0 K5
+ 0x94140A04, // 0015 GETIDX R5 R5 R4
+ 0x8C140B06, // 0016 GETMET R5 R5 K6
+ 0x5C1C0600, // 0017 MOVE R7 R3
+ 0x7C140400, // 0018 CALL R5 2
+ 0x00100907, // 0019 ADD R4 R4 K7
+ 0x7001FFF3, // 001A JMP #000F
+ 0x70020007, // 001B JMP #0024
+ 0xB8120200, // 001C GETNGBL R4 K1
+ 0x8C100908, // 001D GETMET R4 R4 K8
+ 0x60180008, // 001E GETGBL R6 G8
+ 0x5C1C0400, // 001F MOVE R7 R2
+ 0x7C180200, // 0020 CALL R6 1
+ 0x001A1206, // 0021 ADD R6 K9 R6
+ 0x581C000A, // 0022 LDCONST R7 K10
+ 0x7C100600, // 0023 CALL R4 3
+ 0x80000000, // 0024 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: register_plugin_class
********************************************************************/
@@ -35,75 +222,72 @@ be_local_closure(Matter_Device_register_plugin_class, /* name */
/********************************************************************
-** Solidified function: _compute_pbkdf
+** Solidified function: autoconf_device
********************************************************************/
-be_local_closure(Matter_Device__compute_pbkdf, /* name */
+be_local_closure(Matter_Device_autoconf_device, /* name */
be_nested_proto(
- 14, /* nstack */
- 4, /* argc */
+ 7, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(add),
- /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
- /* K4 */ be_nested_str_weak(derive),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(root_w0),
- /* K7 */ be_nested_str_weak(EC_P256),
- /* K8 */ be_nested_str_weak(mod),
- /* K9 */ be_nested_str_weak(root_L),
- /* K10 */ be_nested_str_weak(public_key),
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_nested_str_weak(plugins_config),
+ /* K5 */ be_nested_str_weak(autoconf_device_map),
+ /* K6 */ be_nested_str_weak(tasmota),
+ /* K7 */ be_nested_str_weak(log),
+ /* K8 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
+ /* K9 */ be_const_int(3),
+ /* K10 */ be_nested_str_weak(_load_plugins_config),
+ /* K11 */ be_nested_str_weak(plugins_persist),
+ /* K12 */ be_nested_str_weak(sessions),
+ /* K13 */ be_nested_str_weak(count_active_fabrics),
+ /* K14 */ be_nested_str_weak(save_param),
}),
- be_str_weak(_compute_pbkdf),
+ be_str_weak(autoconf_device),
&be_const_str_solidified,
- ( &(const binstruction[41]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xA4160200, // 0001 IMPORT R5 K1
- 0x60180015, // 0002 GETGBL R6 G21
- 0x7C180000, // 0003 CALL R6 0
- 0x8C180D02, // 0004 GETMET R6 R6 K2
- 0x5C200200, // 0005 MOVE R8 R1
- 0x54260003, // 0006 LDINT R9 4
- 0x7C180600, // 0007 CALL R6 3
- 0x8C1C0903, // 0008 GETMET R7 R4 K3
- 0x7C1C0200, // 0009 CALL R7 1
- 0x8C1C0F04, // 000A GETMET R7 R7 K4
- 0x5C240C00, // 000B MOVE R9 R6
- 0x5C280600, // 000C MOVE R10 R3
- 0x5C2C0400, // 000D MOVE R11 R2
- 0x5432004F, // 000E LDINT R12 80
- 0x7C1C0A00, // 000F CALL R7 5
- 0x54220026, // 0010 LDINT R8 39
- 0x40220A08, // 0011 CONNECT R8 K5 R8
- 0x94200E08, // 0012 GETIDX R8 R7 R8
- 0x54260027, // 0013 LDINT R9 40
- 0x542A004E, // 0014 LDINT R10 79
- 0x4024120A, // 0015 CONNECT R9 R9 R10
- 0x94240E09, // 0016 GETIDX R9 R7 R9
- 0x8C280907, // 0017 GETMET R10 R4 K7
- 0x7C280200, // 0018 CALL R10 1
- 0x8C281508, // 0019 GETMET R10 R10 K8
- 0x5C301000, // 001A MOVE R12 R8
- 0x7C280400, // 001B CALL R10 2
- 0x90020C0A, // 001C SETMBR R0 K6 R10
- 0x8C280907, // 001D GETMET R10 R4 K7
- 0x7C280200, // 001E CALL R10 1
- 0x8C281508, // 001F GETMET R10 R10 K8
- 0x5C301200, // 0020 MOVE R12 R9
- 0x7C280400, // 0021 CALL R10 2
- 0x8C2C0907, // 0022 GETMET R11 R4 K7
- 0x7C2C0200, // 0023 CALL R11 1
- 0x8C2C170A, // 0024 GETMET R11 R11 K10
- 0x5C341400, // 0025 MOVE R13 R10
- 0x7C2C0400, // 0026 CALL R11 2
- 0x9002120B, // 0027 SETMBR R0 K9 R11
- 0x80000000, // 0028 RET 0
+ ( &(const binstruction[34]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x88100102, // 0003 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x240C0703, // 0005 GT R3 R3 K3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0105, // 0008 GETMET R3 R0 K5
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x90020803, // 000A SETMBR R0 K4 R3
+ 0xB80E0C00, // 000B GETNGBL R3 K6
+ 0x8C0C0707, // 000C GETMET R3 R3 K7
+ 0x60140008, // 000D GETGBL R5 G8
+ 0x88180104, // 000E GETMBR R6 R0 K4
+ 0x7C140200, // 000F CALL R5 1
+ 0x00161005, // 0010 ADD R5 K8 R5
+ 0x58180009, // 0011 LDCONST R6 K9
+ 0x7C0C0600, // 0012 CALL R3 3
+ 0x8C0C010A, // 0013 GETMET R3 R0 K10
+ 0x88140104, // 0014 GETMBR R5 R0 K4
+ 0x7C0C0400, // 0015 CALL R3 2
+ 0x880C010B, // 0016 GETMBR R3 R0 K11
+ 0x740E0008, // 0017 JMPT R3 #0021
+ 0x880C010C, // 0018 GETMBR R3 R0 K12
+ 0x8C0C070D, // 0019 GETMET R3 R3 K13
+ 0x7C0C0200, // 001A CALL R3 1
+ 0x240C0703, // 001B GT R3 R3 K3
+ 0x780E0003, // 001C JMPF R3 #0021
+ 0x500C0200, // 001D LDBOOL R3 1 0
+ 0x90021603, // 001E SETMBR R0 K11 R3
+ 0x8C0C010E, // 001F GETMET R3 R0 K14
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x80000000, // 0021 RET 0
})
)
);
@@ -111,223 +295,506 @@ be_local_closure(Matter_Device__compute_pbkdf, /* name */
/********************************************************************
-** Solidified function: _mdns_announce_hostname
+** Solidified function: generate_random_passcode
********************************************************************/
-be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
+be_local_closure(Matter_Device_generate_random_passcode, /* name */
be_nested_proto(
- 16, /* nstack */
- 2, /* argc */
+ 7, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(start),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(eth),
- /* K5 */ be_nested_str_weak(hostname_eth),
- /* K6 */ be_nested_str_weak(replace),
- /* K7 */ be_nested_str_weak(find),
- /* K8 */ be_nested_str_weak(mac),
- /* K9 */ be_nested_str_weak(_X3A),
- /* K10 */ be_nested_str_weak(),
- /* K11 */ be_nested_str_weak(ipv4only),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K15 */ be_nested_str_weak(ip6local),
- /* K16 */ be_nested_str_weak(ip),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(add_hostname),
- /* K19 */ be_nested_str_weak(ip6),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
- /* K21 */ be_nested_str_weak(wifi),
- /* K22 */ be_nested_str_weak(hostname_wifi),
- /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
- /* K24 */ be_const_int(2),
- /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K26 */ be_nested_str_weak(_X7C),
- /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(random),
+ /* K2 */ be_nested_str_weak(get),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_const_int(134217727),
+ /* K5 */ be_const_int(99999998),
+ /* K6 */ be_nested_str_weak(PASSCODE_INVALID),
+ /* K7 */ be_nested_str_weak(stop_iteration),
}),
- be_str_weak(_mdns_announce_hostname),
+ be_str_weak(generate_random_passcode),
&be_const_str_solidified,
- ( &(const binstruction[172]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100502, // 0002 GETMET R4 R2 K2
- 0x7C100200, // 0003 CALL R4 1
- 0xA8020092, // 0004 EXBLK 0 #0098
- 0x78060040, // 0005 JMPF R1 #0047
- 0xB8120600, // 0006 GETNGBL R4 K3
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140706, // 0009 GETMET R5 R3 K6
- 0x8C1C0907, // 000A GETMET R7 R4 K7
- 0x58240008, // 000B LDCONST R9 K8
- 0x7C1C0400, // 000C CALL R7 2
- 0x58200009, // 000D LDCONST R8 K9
- 0x5824000A, // 000E LDCONST R9 K10
- 0x7C140800, // 000F CALL R5 4
- 0x90020A05, // 0010 SETMBR R0 K5 R5
- 0x8814010B, // 0011 GETMBR R5 R0 K11
- 0x7416001F, // 0012 JMPT R5 #0033
- 0xB8160600, // 0013 GETNGBL R5 K3
- 0x8C140B0C, // 0014 GETMET R5 R5 K12
- 0x8C1C070D, // 0015 GETMET R7 R3 K13
- 0x5824000E, // 0016 LDCONST R9 K14
- 0x88280105, // 0017 GETMBR R10 R0 K5
- 0x8C2C0907, // 0018 GETMET R11 R4 K7
- 0x5834000F, // 0019 LDCONST R13 K15
- 0x5838000A, // 001A LDCONST R14 K10
- 0x7C2C0600, // 001B CALL R11 3
- 0x8C300907, // 001C GETMET R12 R4 K7
- 0x58380010, // 001D LDCONST R14 K16
- 0x583C000A, // 001E LDCONST R15 K10
- 0x7C300600, // 001F CALL R12 3
- 0x7C1C0A00, // 0020 CALL R7 5
- 0x58200011, // 0021 LDCONST R8 K17
- 0x7C140600, // 0022 CALL R5 3
- 0x8C140512, // 0023 GETMET R5 R2 K18
- 0x881C0105, // 0024 GETMBR R7 R0 K5
- 0x8C200907, // 0025 GETMET R8 R4 K7
- 0x5828000F, // 0026 LDCONST R10 K15
- 0x582C000A, // 0027 LDCONST R11 K10
- 0x7C200600, // 0028 CALL R8 3
- 0x8C240907, // 0029 GETMET R9 R4 K7
- 0x582C0010, // 002A LDCONST R11 K16
- 0x5830000A, // 002B LDCONST R12 K10
- 0x7C240600, // 002C CALL R9 3
- 0x8C280907, // 002D GETMET R10 R4 K7
- 0x58300013, // 002E LDCONST R12 K19
- 0x5834000A, // 002F LDCONST R13 K10
- 0x7C280600, // 0030 CALL R10 3
- 0x7C140A00, // 0031 CALL R5 5
- 0x70020012, // 0032 JMP #0046
- 0xB8160600, // 0033 GETNGBL R5 K3
- 0x8C140B0C, // 0034 GETMET R5 R5 K12
- 0x8C1C070D, // 0035 GETMET R7 R3 K13
- 0x58240014, // 0036 LDCONST R9 K20
- 0x88280105, // 0037 GETMBR R10 R0 K5
- 0x8C2C0907, // 0038 GETMET R11 R4 K7
- 0x58340010, // 0039 LDCONST R13 K16
- 0x5838000A, // 003A LDCONST R14 K10
- 0x7C2C0600, // 003B CALL R11 3
- 0x7C1C0800, // 003C CALL R7 4
- 0x58200011, // 003D LDCONST R8 K17
- 0x7C140600, // 003E CALL R5 3
- 0x8C140512, // 003F GETMET R5 R2 K18
- 0x881C0105, // 0040 GETMBR R7 R0 K5
- 0x8C200907, // 0041 GETMET R8 R4 K7
- 0x58280010, // 0042 LDCONST R10 K16
- 0x582C000A, // 0043 LDCONST R11 K10
- 0x7C200600, // 0044 CALL R8 3
- 0x7C140600, // 0045 CALL R5 3
- 0x7002003F, // 0046 JMP #0087
- 0xB8120600, // 0047 GETNGBL R4 K3
- 0x8C100915, // 0048 GETMET R4 R4 K21
- 0x7C100200, // 0049 CALL R4 1
- 0x8C140706, // 004A GETMET R5 R3 K6
- 0x8C1C0907, // 004B GETMET R7 R4 K7
- 0x58240008, // 004C LDCONST R9 K8
- 0x7C1C0400, // 004D CALL R7 2
- 0x58200009, // 004E LDCONST R8 K9
- 0x5824000A, // 004F LDCONST R9 K10
- 0x7C140800, // 0050 CALL R5 4
- 0x90022C05, // 0051 SETMBR R0 K22 R5
- 0x8814010B, // 0052 GETMBR R5 R0 K11
- 0x7416001F, // 0053 JMPT R5 #0074
- 0xB8160600, // 0054 GETNGBL R5 K3
- 0x8C140B0C, // 0055 GETMET R5 R5 K12
- 0x8C1C070D, // 0056 GETMET R7 R3 K13
- 0x5824000E, // 0057 LDCONST R9 K14
- 0x88280116, // 0058 GETMBR R10 R0 K22
- 0x8C2C0907, // 0059 GETMET R11 R4 K7
- 0x5834000F, // 005A LDCONST R13 K15
- 0x5838000A, // 005B LDCONST R14 K10
- 0x7C2C0600, // 005C CALL R11 3
- 0x8C300907, // 005D GETMET R12 R4 K7
- 0x58380010, // 005E LDCONST R14 K16
- 0x583C000A, // 005F LDCONST R15 K10
- 0x7C300600, // 0060 CALL R12 3
- 0x7C1C0A00, // 0061 CALL R7 5
- 0x58200011, // 0062 LDCONST R8 K17
- 0x7C140600, // 0063 CALL R5 3
- 0x8C140512, // 0064 GETMET R5 R2 K18
- 0x881C0116, // 0065 GETMBR R7 R0 K22
- 0x8C200907, // 0066 GETMET R8 R4 K7
- 0x5828000F, // 0067 LDCONST R10 K15
- 0x582C000A, // 0068 LDCONST R11 K10
- 0x7C200600, // 0069 CALL R8 3
- 0x8C240907, // 006A GETMET R9 R4 K7
- 0x582C0010, // 006B LDCONST R11 K16
- 0x5830000A, // 006C LDCONST R12 K10
- 0x7C240600, // 006D CALL R9 3
- 0x8C280907, // 006E GETMET R10 R4 K7
- 0x58300013, // 006F LDCONST R12 K19
- 0x5834000A, // 0070 LDCONST R13 K10
- 0x7C280600, // 0071 CALL R10 3
- 0x7C140A00, // 0072 CALL R5 5
- 0x70020012, // 0073 JMP #0087
- 0xB8160600, // 0074 GETNGBL R5 K3
- 0x8C140B0C, // 0075 GETMET R5 R5 K12
- 0x8C1C070D, // 0076 GETMET R7 R3 K13
- 0x58240014, // 0077 LDCONST R9 K20
- 0x88280105, // 0078 GETMBR R10 R0 K5
- 0x8C2C0907, // 0079 GETMET R11 R4 K7
- 0x58340010, // 007A LDCONST R13 K16
- 0x5838000A, // 007B LDCONST R14 K10
- 0x7C2C0600, // 007C CALL R11 3
- 0x7C1C0800, // 007D CALL R7 4
- 0x58200011, // 007E LDCONST R8 K17
- 0x7C140600, // 007F CALL R5 3
- 0x8C140512, // 0080 GETMET R5 R2 K18
- 0x881C0116, // 0081 GETMBR R7 R0 K22
- 0x8C200907, // 0082 GETMET R8 R4 K7
- 0x58280010, // 0083 LDCONST R10 K16
- 0x582C000A, // 0084 LDCONST R11 K10
- 0x7C200600, // 0085 CALL R8 3
- 0x7C140600, // 0086 CALL R5 3
- 0xB8120600, // 0087 GETNGBL R4 K3
- 0x8C10090C, // 0088 GETMET R4 R4 K12
- 0x8C18070D, // 0089 GETMET R6 R3 K13
- 0x58200017, // 008A LDCONST R8 K23
- 0x78060001, // 008B JMPF R1 #008E
- 0x58240004, // 008C LDCONST R9 K4
- 0x70020000, // 008D JMP #008F
- 0x58240015, // 008E LDCONST R9 K21
- 0x78060001, // 008F JMPF R1 #0092
- 0x88280105, // 0090 GETMBR R10 R0 K5
- 0x70020000, // 0091 JMP #0093
- 0x88280116, // 0092 GETMBR R10 R0 K22
- 0x7C180800, // 0093 CALL R6 4
- 0x581C0018, // 0094 LDCONST R7 K24
- 0x7C100600, // 0095 CALL R4 3
- 0xA8040001, // 0096 EXBLK 1 1
- 0x70020010, // 0097 JMP #00A9
- 0xAC100002, // 0098 CATCH R4 0 2
- 0x7002000D, // 0099 JMP #00A8
- 0xB81A0600, // 009A GETNGBL R6 K3
- 0x8C180D0C, // 009B GETMET R6 R6 K12
- 0x60200008, // 009C GETGBL R8 G8
- 0x5C240800, // 009D MOVE R9 R4
- 0x7C200200, // 009E CALL R8 1
- 0x00223208, // 009F ADD R8 K25 R8
- 0x0020111A, // 00A0 ADD R8 R8 K26
- 0x60240008, // 00A1 GETGBL R9 G8
- 0x5C280A00, // 00A2 MOVE R10 R5
- 0x7C240200, // 00A3 CALL R9 1
- 0x00201009, // 00A4 ADD R8 R8 R9
- 0x58240018, // 00A5 LDCONST R9 K24
- 0x7C180600, // 00A6 CALL R6 3
- 0x70020000, // 00A7 JMP #00A9
- 0xB0080000, // 00A8 RAISE 2 R0 R0
- 0x8C10011B, // 00A9 GETMET R4 R0 K27
- 0x7C100200, // 00AA CALL R4 1
- 0x80000000, // 00AB RET 0
+ ( &(const binstruction[35]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x500C0200, // 0002 LDBOOL R3 1 0
+ 0x780E001D, // 0003 JMPF R3 #0022
+ 0x8C0C0301, // 0004 GETMET R3 R1 K1
+ 0x54160003, // 0005 LDINT R5 4
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x8C0C0702, // 0007 GETMET R3 R3 K2
+ 0x58140003, // 0008 LDCONST R5 K3
+ 0x541A0003, // 0009 LDINT R6 4
+ 0x7C0C0600, // 000A CALL R3 3
+ 0x2C0C0704, // 000B AND R3 R3 K4
+ 0x5C080600, // 000C MOVE R2 R3
+ 0x240C0505, // 000D GT R3 R2 K5
+ 0x780E0000, // 000E JMPF R3 #0010
+ 0x7001FFF1, // 000F JMP #0002
+ 0x600C0010, // 0010 GETGBL R3 G16
+ 0x88100106, // 0011 GETMBR R4 R0 K6
+ 0x7C0C0200, // 0012 CALL R3 1
+ 0xA8020005, // 0013 EXBLK 0 #001A
+ 0x5C100600, // 0014 MOVE R4 R3
+ 0x7C100000, // 0015 CALL R4 0
+ 0x1C140404, // 0016 EQ R5 R2 R4
+ 0x78160000, // 0017 JMPF R5 #0019
+ 0x4C080000, // 0018 LDNIL R2
+ 0x7001FFF9, // 0019 JMP #0014
+ 0x580C0007, // 001A LDCONST R3 K7
+ 0xAC0C0200, // 001B CATCH R3 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x4C0C0000, // 001D LDNIL R3
+ 0x200C0403, // 001E NE R3 R2 R3
+ 0x780E0000, // 001F JMPF R3 #0021
+ 0x80040400, // 0020 RET 1 R2
+ 0x7001FFDF, // 0021 JMP #0002
+ 0x80000000, // 0022 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_commands
+********************************************************************/
+be_local_closure(Matter_Device_register_commands, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* 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(MtrJoin),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x68100000, // 0000 GETUPV R4 U0
+ 0x8C100900, // 0001 GETMET R4 R4 K0
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80040800, // 0007 RET 1 R4
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(add_cmd),
+ /* K2 */ be_nested_str_weak(MtrJoin),
+ }),
+ be_str_weak(register_commands),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x84100000, // 0003 CLOSURE R4 P0
+ 0x7C040600, // 0004 CALL R1 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_commissioning_open
+********************************************************************/
+be_local_closure(Matter_Device_is_commissioning_open, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ }),
+ be_str_weak(is_commissioning_open),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: k2l
+********************************************************************/
+be_local_closure(Matter_Device_k2l, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(0),
+ }),
+ be_str_weak(k2l),
+ &be_const_str_solidified,
+ ( &(const binstruction[50]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 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
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 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
+ 0x8C140502, // 000E GETMET R5 R2 K2
+ 0x5C1C0800, // 000F MOVE R7 R4
+ 0x7C140400, // 0010 CALL R5 2
+ 0x7001FFF9, // 0011 JMP #000C
+ 0x580C0003, // 0012 LDCONST R3 K3
+ 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
+ 0x04100904, // 0019 SUB R4 R4 K4
+ 0x40120804, // 001A CONNECT R4 K4 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
+ 0x241C0D05, // 0021 GT R7 R6 K5
+ 0x781E0008, // 0022 JMPF R7 #002C
+ 0x041C0D04, // 0023 SUB R7 R6 K4
+ 0x941C0407, // 0024 GETIDX R7 R2 R7
+ 0x241C0E05, // 0025 GT R7 R7 R5
+ 0x781E0004, // 0026 JMPF R7 #002C
+ 0x041C0D04, // 0027 SUB R7 R6 K4
+ 0x941C0407, // 0028 GETIDX R7 R2 R7
+ 0x98080C07, // 0029 SETIDX R2 R6 R7
+ 0x04180D04, // 002A SUB R6 R6 K4
+ 0x7001FFF4, // 002B JMP #0021
+ 0x98080C05, // 002C SETIDX R2 R6 R5
+ 0x7001FFEE, // 002D JMP #001D
+ 0x580C0003, // 002E LDCONST R3 K3
+ 0xAC0C0200, // 002F CATCH R3 1 0
+ 0xB0080000, // 0030 RAISE 2 R0 R0
+ 0x80040400, // 0031 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_operational_discovery_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_operational_discovery),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_operational_discovery_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: attribute_updated
+********************************************************************/
+be_local_closure(Matter_Device_attribute_updated, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(Path),
+ /* K2 */ be_nested_str_weak(endpoint),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(message_handler),
+ /* K6 */ be_nested_str_weak(im),
+ /* K7 */ be_nested_str_weak(subs_shop),
+ /* K8 */ be_nested_str_weak(attribute_updated_ctx),
+ }),
+ 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
+ 0xB8160000, // 0004 GETNGBL R5 K0
+ 0x8C140B01, // 0005 GETMET R5 R5 K1
+ 0x7C140200, // 0006 CALL R5 1
+ 0x90160401, // 0007 SETMBR R5 K2 R1
+ 0x90160602, // 0008 SETMBR R5 K3 R2
+ 0x90160803, // 0009 SETMBR R5 K4 R3
+ 0x88180105, // 000A GETMBR R6 R0 K5
+ 0x88180D06, // 000B GETMBR R6 R6 K6
+ 0x88180D07, // 000C GETMBR R6 R6 K7
+ 0x8C180D08, // 000D GETMET R6 R6 K8
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x5C240800, // 000F MOVE R9 R4
+ 0x7C180600, // 0010 CALL R6 3
+ 0x80000000, // 0011 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: compute_qrcode_content
+********************************************************************/
+be_local_closure(Matter_Device_compute_qrcode_content, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(resize),
+ /* K1 */ be_nested_str_weak(setbits),
+ /* K2 */ be_const_int(3),
+ /* K3 */ be_nested_str_weak(vendorid),
+ /* K4 */ be_nested_str_weak(productid),
+ /* K5 */ be_nested_str_weak(root_discriminator),
+ /* K6 */ be_nested_str_weak(root_passcode),
+ /* K7 */ be_const_int(134217727),
+ /* K8 */ be_nested_str_weak(MT_X3A),
+ /* K9 */ be_nested_str_weak(matter),
+ /* K10 */ be_nested_str_weak(Base38),
+ /* K11 */ be_nested_str_weak(encode),
+ }),
+ be_str_weak(compute_qrcode_content),
+ &be_const_str_solidified,
+ ( &(const binstruction[40]) { /* code */
+ 0x60040015, // 0000 GETGBL R1 G21
+ 0x7C040000, // 0001 CALL R1 0
+ 0x8C040300, // 0002 GETMET R1 R1 K0
+ 0x540E000A, // 0003 LDINT R3 11
+ 0x7C040400, // 0004 CALL R1 2
+ 0x8C080301, // 0005 GETMET R2 R1 K1
+ 0x58100002, // 0006 LDCONST R4 K2
+ 0x5416000F, // 0007 LDINT R5 16
+ 0x88180103, // 0008 GETMBR R6 R0 K3
+ 0x7C080800, // 0009 CALL R2 4
+ 0x8C080301, // 000A GETMET R2 R1 K1
+ 0x54120012, // 000B LDINT R4 19
+ 0x5416000F, // 000C LDINT R5 16
+ 0x88180104, // 000D GETMBR R6 R0 K4
+ 0x7C080800, // 000E CALL R2 4
+ 0x8C080301, // 000F GETMET R2 R1 K1
+ 0x54120024, // 0010 LDINT R4 37
+ 0x54160007, // 0011 LDINT R5 8
+ 0x541A0003, // 0012 LDINT R6 4
+ 0x7C080800, // 0013 CALL R2 4
+ 0x8C080301, // 0014 GETMET R2 R1 K1
+ 0x5412002C, // 0015 LDINT R4 45
+ 0x5416000B, // 0016 LDINT R5 12
+ 0x88180105, // 0017 GETMBR R6 R0 K5
+ 0x541E0FFE, // 0018 LDINT R7 4095
+ 0x2C180C07, // 0019 AND R6 R6 R7
+ 0x7C080800, // 001A CALL R2 4
+ 0x8C080301, // 001B GETMET R2 R1 K1
+ 0x54120038, // 001C LDINT R4 57
+ 0x5416001A, // 001D LDINT R5 27
+ 0x88180106, // 001E GETMBR R6 R0 K6
+ 0x2C180D07, // 001F AND R6 R6 K7
+ 0x7C080800, // 0020 CALL R2 4
+ 0xB80A1200, // 0021 GETNGBL R2 K9
+ 0x8808050A, // 0022 GETMBR R2 R2 K10
+ 0x8C08050B, // 0023 GETMET R2 R2 K11
+ 0x5C100200, // 0024 MOVE R4 R1
+ 0x7C080400, // 0025 CALL R2 2
+ 0x000A1002, // 0026 ADD R2 K8 R2
+ 0x80040400, // 0027 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: sort_distinct
+********************************************************************/
+be_local_closure(Matter_Device_sort_distinct, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_const_int(1),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_nested_str_weak(remove),
+ }),
+ be_str_weak(sort_distinct),
+ &be_const_str_solidified,
+ ( &(const binstruction[53]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 0x60080010, // 0001 GETGBL R2 G16
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x040C0701, // 0005 SUB R3 R3 K1
+ 0x400E0203, // 0006 CONNECT R3 K1 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
+ 0x24180B02, // 000D GT R6 R5 K2
+ 0x781A0008, // 000E JMPF R6 #0018
+ 0x04180B01, // 000F SUB R6 R5 K1
+ 0x94180006, // 0010 GETIDX R6 R0 R6
+ 0x24180C04, // 0011 GT R6 R6 R4
+ 0x781A0004, // 0012 JMPF R6 #0018
+ 0x04180B01, // 0013 SUB R6 R5 K1
+ 0x94180006, // 0014 GETIDX R6 R0 R6
+ 0x98000A06, // 0015 SETIDX R0 R5 R6
+ 0x04140B01, // 0016 SUB R5 R5 K1
+ 0x7001FFF4, // 0017 JMP #000D
+ 0x98000A04, // 0018 SETIDX R0 R5 R4
+ 0x7001FFEE, // 0019 JMP #0009
+ 0x58080003, // 001A LDCONST R2 K3
+ 0xAC080200, // 001B CATCH R2 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x58080001, // 001D LDCONST R2 K1
+ 0x600C000C, // 001E GETGBL R3 G12
+ 0x5C100000, // 001F MOVE R4 R0
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x180C0701, // 0021 LE R3 R3 K1
+ 0x780E0000, // 0022 JMPF R3 #0024
+ 0x80040000, // 0023 RET 1 R0
+ 0x940C0102, // 0024 GETIDX R3 R0 K2
+ 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
+ 0x8C100104, // 002D GETMET R4 R0 K4
+ 0x5C180400, // 002E MOVE R6 R2
+ 0x7C100400, // 002F CALL R4 2
+ 0x70020001, // 0030 JMP #0033
+ 0x940C0002, // 0031 GETIDX R3 R0 R2
+ 0x00080501, // 0032 ADD R2 R2 K1
+ 0x7001FFF0, // 0033 JMP #0025
+ 0x80040000, // 0034 RET 1 R0
})
)
);
@@ -509,473 +976,6 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: stop
-********************************************************************/
-be_local_closure(Matter_Device_stop, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(remove_driver),
- /* K2 */ be_nested_str_weak(udp_server),
- /* K3 */ be_nested_str_weak(stop),
- }),
- be_str_weak(stop),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C040400, // 0003 CALL R1 2
- 0x88040102, // 0004 GETMBR R1 R0 K2
- 0x78060002, // 0005 JMPF R1 #0009
- 0x88040102, // 0006 GETMBR R1 R0 K2
- 0x8C040303, // 0007 GETMET R1 R1 K3
- 0x7C040200, // 0008 CALL R1 1
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: register_commands
-********************************************************************/
-be_local_closure(Matter_Device_register_commands, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 10, /* nstack */
- 4, /* 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(MtrJoin),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x68100000, // 0000 GETUPV R4 U0
- 0x8C100900, // 0001 GETMET R4 R4 K0
- 0x5C180000, // 0002 MOVE R6 R0
- 0x5C1C0200, // 0003 MOVE R7 R1
- 0x5C200400, // 0004 MOVE R8 R2
- 0x5C240600, // 0005 MOVE R9 R3
- 0x7C100A00, // 0006 CALL R4 5
- 0x80040800, // 0007 RET 1 R4
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(add_cmd),
- /* K2 */ be_nested_str_weak(MtrJoin),
- }),
- be_str_weak(register_commands),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x84100000, // 0003 CLOSURE R4 P0
- 0x7C040600, // 0004 CALL R1 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: msg_send
-********************************************************************/
-be_local_closure(Matter_Device_msg_send, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(send_UDP),
- }),
- be_str_weak(msg_send),
- &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: save_param
-********************************************************************/
-be_local_closure(Matter_Device_save_param, /* name */
- be_nested_proto(
- 10, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(format),
- /* K2 */ be_nested_str_weak(_X7B_X22distinguish_X22_X3A_X25i_X2C_X22passcode_X22_X3A_X25i_X2C_X22ipv4only_X22_X3A_X25s),
- /* K3 */ be_nested_str_weak(root_discriminator),
- /* K4 */ be_nested_str_weak(root_passcode),
- /* K5 */ be_nested_str_weak(ipv4only),
- /* K6 */ be_nested_str_weak(true),
- /* K7 */ be_nested_str_weak(false),
- /* K8 */ be_nested_str_weak(plugins_persist),
- /* K9 */ be_nested_str_weak(_X2C_X22config_X22_X3A),
- /* K10 */ be_nested_str_weak(plugins_to_json),
- /* K11 */ be_nested_str_weak(_X7D),
- /* K12 */ be_nested_str_weak(FILENAME),
- /* K13 */ be_nested_str_weak(w),
- /* K14 */ be_nested_str_weak(write),
- /* K15 */ be_nested_str_weak(close),
- /* K16 */ be_nested_str_weak(tasmota),
- /* K17 */ be_nested_str_weak(log),
- /* K18 */ be_nested_str_weak(MTR_X3A_X20_X3DSaved_X20_X20_X20_X20_X20parameters_X25s),
- /* K19 */ be_nested_str_weak(_X20and_X20condiguration),
- /* K20 */ be_nested_str_weak(),
- /* K21 */ be_const_int(2),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Asave_X20Exception_X3A),
- /* K23 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(save_param),
- &be_const_str_solidified,
- ( &(const binstruction[63]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x88140103, // 0003 GETMBR R5 R0 K3
- 0x88180104, // 0004 GETMBR R6 R0 K4
- 0x881C0105, // 0005 GETMBR R7 R0 K5
- 0x781E0001, // 0006 JMPF R7 #0009
- 0x581C0006, // 0007 LDCONST R7 K6
- 0x70020000, // 0008 JMP #000A
- 0x581C0007, // 0009 LDCONST R7 K7
- 0x7C080A00, // 000A CALL R2 5
- 0x880C0108, // 000B GETMBR R3 R0 K8
- 0x780E0003, // 000C JMPF R3 #0011
- 0x00080509, // 000D ADD R2 R2 K9
- 0x8C0C010A, // 000E GETMET R3 R0 K10
- 0x7C0C0200, // 000F CALL R3 1
- 0x00080403, // 0010 ADD R2 R2 R3
- 0x0008050B, // 0011 ADD R2 R2 K11
- 0xA8020018, // 0012 EXBLK 0 #002C
- 0x600C0011, // 0013 GETGBL R3 G17
- 0x8810010C, // 0014 GETMBR R4 R0 K12
- 0x5814000D, // 0015 LDCONST R5 K13
- 0x7C0C0400, // 0016 CALL R3 2
- 0x8C10070E, // 0017 GETMET R4 R3 K14
- 0x5C180400, // 0018 MOVE R6 R2
- 0x7C100400, // 0019 CALL R4 2
- 0x8C10070F, // 001A GETMET R4 R3 K15
- 0x7C100200, // 001B CALL R4 1
- 0xB8122000, // 001C GETNGBL R4 K16
- 0x8C100911, // 001D GETMET R4 R4 K17
- 0x8C180301, // 001E GETMET R6 R1 K1
- 0x58200012, // 001F LDCONST R8 K18
- 0x88240108, // 0020 GETMBR R9 R0 K8
- 0x78260001, // 0021 JMPF R9 #0024
- 0x58240013, // 0022 LDCONST R9 K19
- 0x70020000, // 0023 JMP #0025
- 0x58240014, // 0024 LDCONST R9 K20
- 0x7C180600, // 0025 CALL R6 3
- 0x581C0015, // 0026 LDCONST R7 K21
- 0x7C100600, // 0027 CALL R4 3
- 0xA8040001, // 0028 EXBLK 1 1
- 0x80040400, // 0029 RET 1 R2
- 0xA8040001, // 002A EXBLK 1 1
- 0x70020011, // 002B JMP #003E
- 0xAC0C0002, // 002C CATCH R3 0 2
- 0x7002000E, // 002D JMP #003D
- 0xB8162000, // 002E GETNGBL R5 K16
- 0x8C140B11, // 002F GETMET R5 R5 K17
- 0x601C0008, // 0030 GETGBL R7 G8
- 0x5C200600, // 0031 MOVE R8 R3
- 0x7C1C0200, // 0032 CALL R7 1
- 0x001E2C07, // 0033 ADD R7 K22 R7
- 0x001C0F17, // 0034 ADD R7 R7 K23
- 0x60200008, // 0035 GETGBL R8 G8
- 0x5C240800, // 0036 MOVE R9 R4
- 0x7C200200, // 0037 CALL R8 1
- 0x001C0E08, // 0038 ADD R7 R7 R8
- 0x58200015, // 0039 LDCONST R8 K21
- 0x7C140600, // 003A CALL R5 3
- 0x80040400, // 003B RET 1 R2
- 0x70020000, // 003C JMP #003E
- 0xB0080000, // 003D RAISE 2 R0 R0
- 0x80000000, // 003E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_announce_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(mdns_announce_op_discovery_all_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_operational_discovery_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_operational_discovery),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(start_operational_discovery_deferred),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(log),
- /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
- /* K3 */ be_const_int(2),
- /* K4 */ be_nested_str_weak(stop_basic_commissioning),
- }),
- be_str_weak(start_commissioning_complete),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C080600, // 0004 CALL R2 3
- 0x8C080104, // 0005 GETMET R2 R0 K4
- 0x7C080200, // 0006 CALL R2 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: compute_qrcode_content
-********************************************************************/
-be_local_closure(Matter_Device_compute_qrcode_content, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(resize),
- /* K1 */ be_nested_str_weak(setbits),
- /* K2 */ be_const_int(3),
- /* K3 */ be_nested_str_weak(vendorid),
- /* K4 */ be_nested_str_weak(productid),
- /* K5 */ be_nested_str_weak(root_discriminator),
- /* K6 */ be_nested_str_weak(root_passcode),
- /* K7 */ be_const_int(134217727),
- /* K8 */ be_nested_str_weak(MT_X3A),
- /* K9 */ be_nested_str_weak(matter),
- /* K10 */ be_nested_str_weak(Base38),
- /* K11 */ be_nested_str_weak(encode),
- }),
- be_str_weak(compute_qrcode_content),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0x60040015, // 0000 GETGBL R1 G21
- 0x7C040000, // 0001 CALL R1 0
- 0x8C040300, // 0002 GETMET R1 R1 K0
- 0x540E000A, // 0003 LDINT R3 11
- 0x7C040400, // 0004 CALL R1 2
- 0x8C080301, // 0005 GETMET R2 R1 K1
- 0x58100002, // 0006 LDCONST R4 K2
- 0x5416000F, // 0007 LDINT R5 16
- 0x88180103, // 0008 GETMBR R6 R0 K3
- 0x7C080800, // 0009 CALL R2 4
- 0x8C080301, // 000A GETMET R2 R1 K1
- 0x54120012, // 000B LDINT R4 19
- 0x5416000F, // 000C LDINT R5 16
- 0x88180104, // 000D GETMBR R6 R0 K4
- 0x7C080800, // 000E CALL R2 4
- 0x8C080301, // 000F GETMET R2 R1 K1
- 0x54120024, // 0010 LDINT R4 37
- 0x54160007, // 0011 LDINT R5 8
- 0x541A0003, // 0012 LDINT R6 4
- 0x7C080800, // 0013 CALL R2 4
- 0x8C080301, // 0014 GETMET R2 R1 K1
- 0x5412002C, // 0015 LDINT R4 45
- 0x5416000B, // 0016 LDINT R5 12
- 0x88180105, // 0017 GETMBR R6 R0 K5
- 0x541E0FFE, // 0018 LDINT R7 4095
- 0x2C180C07, // 0019 AND R6 R6 R7
- 0x7C080800, // 001A CALL R2 4
- 0x8C080301, // 001B GETMET R2 R1 K1
- 0x54120038, // 001C LDINT R4 57
- 0x5416001A, // 001D LDINT R5 27
- 0x88180106, // 001E GETMBR R6 R0 K6
- 0x2C180D07, // 001F AND R6 R6 K7
- 0x7C080800, // 0020 CALL R2 4
- 0xB80A1200, // 0021 GETNGBL R2 K9
- 0x8808050A, // 0022 GETMBR R2 R2 K10
- 0x8C08050B, // 0023 GETMET R2 R2 K11
- 0x5C100200, // 0024 MOVE R4 R1
- 0x7C080400, // 0025 CALL R2 2
- 0x000A1002, // 0026 ADD R2 K8 R2
- 0x80040400, // 0027 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: compute_manual_pairing_code
********************************************************************/
@@ -1039,819 +1039,6 @@ be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: k2l
-********************************************************************/
-be_local_closure(Matter_Device_k2l, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 4, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_const_int(1),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(k2l),
- &be_const_str_solidified,
- ( &(const binstruction[50]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 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
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 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
- 0x8C140502, // 000E GETMET R5 R2 K2
- 0x5C1C0800, // 000F MOVE R7 R4
- 0x7C140400, // 0010 CALL R5 2
- 0x7001FFF9, // 0011 JMP #000C
- 0x580C0003, // 0012 LDCONST R3 K3
- 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
- 0x04100904, // 0019 SUB R4 R4 K4
- 0x40120804, // 001A CONNECT R4 K4 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
- 0x241C0D05, // 0021 GT R7 R6 K5
- 0x781E0008, // 0022 JMPF R7 #002C
- 0x041C0D04, // 0023 SUB R7 R6 K4
- 0x941C0407, // 0024 GETIDX R7 R2 R7
- 0x241C0E05, // 0025 GT R7 R7 R5
- 0x781E0004, // 0026 JMPF R7 #002C
- 0x041C0D04, // 0027 SUB R7 R6 K4
- 0x941C0407, // 0028 GETIDX R7 R2 R7
- 0x98080C07, // 0029 SETIDX R2 R6 R7
- 0x04180D04, // 002A SUB R6 R6 K4
- 0x7001FFF4, // 002B JMP #0021
- 0x98080C05, // 002C SETIDX R2 R6 R5
- 0x7001FFEE, // 002D JMP #001D
- 0x580C0003, // 002E LDCONST R3 K3
- 0xAC0C0200, // 002F CATCH R3 1 0
- 0xB0080000, // 0030 RAISE 2 R0 R0
- 0x80040400, // 0031 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_mdns_announce_hostnames
-********************************************************************/
-be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* 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(_mdns_announce_hostname),
- /* 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_mdns_host),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x50080000, // 0002 LDBOOL R2 0 0
- 0x7C000400, // 0003 CALL R0 2
- 0xB8020200, // 0004 GETNGBL R0 K1
- 0x8C000102, // 0005 GETMET R0 R0 K2
- 0x58080003, // 0006 LDCONST R2 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x7C000600, // 0008 CALL R0 3
- 0x80000000, // 0009 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(_mdns_announce_hostname),
- /* 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_mdns_host),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x50080200, // 0002 LDBOOL R2 1 0
- 0x7C000400, // 0003 CALL R0 2
- 0xB8020200, // 0004 GETNGBL R0 K1
- 0x8C000102, // 0005 GETMET R0 R0 K2
- 0x58080003, // 0006 LDCONST R2 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x7C000600, // 0008 CALL R0 3
- 0x80000000, // 0009 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(wifi),
- /* K2 */ be_nested_str_weak(up),
- /* K3 */ be_nested_str_weak(_mdns_announce_hostname),
- /* K4 */ be_nested_str_weak(add_rule),
- /* K5 */ be_nested_str_weak(Wifi_X23Connected),
- /* K6 */ be_nested_str_weak(matter_mdns_host),
- /* K7 */ be_nested_str_weak(eth),
- /* K8 */ be_nested_str_weak(Eth_X23Connected),
- }),
- be_str_weak(start_mdns_announce_hostnames),
- &be_const_str_solidified,
- ( &(const binstruction[32]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x94040302, // 0003 GETIDX R1 R1 K2
- 0x78060003, // 0004 JMPF R1 #0009
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x500C0000, // 0006 LDBOOL R3 0 0
- 0x7C040400, // 0007 CALL R1 2
- 0x70020005, // 0008 JMP #000F
- 0xB8060000, // 0009 GETNGBL R1 K0
- 0x8C040304, // 000A GETMET R1 R1 K4
- 0x580C0005, // 000B LDCONST R3 K5
- 0x84100000, // 000C CLOSURE R4 P0
- 0x58140006, // 000D LDCONST R5 K6
- 0x7C040800, // 000E CALL R1 4
- 0xB8060000, // 000F GETNGBL R1 K0
- 0x8C040307, // 0010 GETMET R1 R1 K7
- 0x7C040200, // 0011 CALL R1 1
- 0x94040302, // 0012 GETIDX R1 R1 K2
- 0x78060003, // 0013 JMPF R1 #0018
- 0x8C040103, // 0014 GETMET R1 R0 K3
- 0x500C0200, // 0015 LDBOOL R3 1 0
- 0x7C040400, // 0016 CALL R1 2
- 0x70020005, // 0017 JMP #001E
- 0xB8060000, // 0018 GETNGBL R1 K0
- 0x8C040304, // 0019 GETMET R1 R1 K4
- 0x580C0008, // 001A LDCONST R3 K8
- 0x84100001, // 001B CLOSURE R4 P1
- 0x58140006, // 001C LDCONST R5 K6
- 0x7C040800, // 001D CALL R1 4
- 0xA0000000, // 001E CLOSE R0
- 0x80000000, // 001F RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: MtrJoin
-********************************************************************/
-be_local_closure(Matter_Device_MtrJoin, /* name */
- be_nested_proto(
- 8, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
- /* K1 */ be_nested_str_weak(stop_basic_commissioning),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(resp_cmnd_done),
- }),
- be_str_weak(MtrJoin),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x60140009, // 0000 GETGBL R5 G9
- 0x5C180600, // 0001 MOVE R6 R3
- 0x7C140200, // 0002 CALL R5 1
- 0x78160002, // 0003 JMPF R5 #0007
- 0x8C180100, // 0004 GETMET R6 R0 K0
- 0x7C180200, // 0005 CALL R6 1
- 0x70020001, // 0006 JMP #0009
- 0x8C180101, // 0007 GETMET R6 R0 K1
- 0x7C180200, // 0008 CALL R6 1
- 0xB81A0400, // 0009 GETNGBL R6 K2
- 0x8C180D03, // 000A GETMET R6 R6 K3
- 0x7C180200, // 000B CALL R6 1
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: process_attribute_expansion
-********************************************************************/
-be_local_closure(Matter_Device_process_attribute_expansion, /* name */
- be_nested_proto(
- 29, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 0, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(keys),
- /* K1 */ be_nested_str_weak(push),
- /* K2 */ be_nested_str_weak(stop_iteration),
- /* K3 */ be_const_int(1),
- /* K4 */ be_const_int(0),
- }),
- be_str_weak(keys_sorted),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0x60040012, // 0000 GETGBL R1 G18
- 0x7C040000, // 0001 CALL R1 0
- 0x60080010, // 0002 GETGBL R2 G16
- 0x8C0C0100, // 0003 GETMET R3 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x7C080200, // 0005 CALL R2 1
- 0xA8020005, // 0006 EXBLK 0 #000D
- 0x5C0C0400, // 0007 MOVE R3 R2
- 0x7C0C0000, // 0008 CALL R3 0
- 0x8C100301, // 0009 GETMET R4 R1 K1
- 0x5C180600, // 000A MOVE R6 R3
- 0x7C100400, // 000B CALL R4 2
- 0x7001FFF9, // 000C JMP #0007
- 0x58080002, // 000D LDCONST R2 K2
- 0xAC080200, // 000E CATCH R2 1 0
- 0xB0080000, // 000F RAISE 2 R0 R0
- 0x60080010, // 0010 GETGBL R2 G16
- 0x600C000C, // 0011 GETGBL R3 G12
- 0x5C100200, // 0012 MOVE R4 R1
- 0x7C0C0200, // 0013 CALL R3 1
- 0x040C0703, // 0014 SUB R3 R3 K3
- 0x400E0603, // 0015 CONNECT R3 K3 R3
- 0x7C080200, // 0016 CALL R2 1
- 0xA8020010, // 0017 EXBLK 0 #0029
- 0x5C0C0400, // 0018 MOVE R3 R2
- 0x7C0C0000, // 0019 CALL R3 0
- 0x94100203, // 001A GETIDX R4 R1 R3
- 0x5C140600, // 001B MOVE R5 R3
- 0x24180B04, // 001C GT R6 R5 K4
- 0x781A0008, // 001D JMPF R6 #0027
- 0x04180B03, // 001E SUB R6 R5 K3
- 0x94180206, // 001F GETIDX R6 R1 R6
- 0x24180C04, // 0020 GT R6 R6 R4
- 0x781A0004, // 0021 JMPF R6 #0027
- 0x04180B03, // 0022 SUB R6 R5 K3
- 0x94180206, // 0023 GETIDX R6 R1 R6
- 0x98040A06, // 0024 SETIDX R1 R5 R6
- 0x04140B03, // 0025 SUB R5 R5 K3
- 0x7001FFF4, // 0026 JMP #001C
- 0x98040A04, // 0027 SETIDX R1 R5 R4
- 0x7001FFEE, // 0028 JMP #0018
- 0x58080002, // 0029 LDCONST R2 K2
- 0xAC080200, // 002A CATCH R2 1 0
- 0xB0080000, // 002B RAISE 2 R0 R0
- 0x80040200, // 002C RET 1 R1
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(attribute),
- /* K4 */ be_nested_str_weak(plugins),
- /* K5 */ be_nested_str_weak(get_endpoint),
- /* K6 */ be_nested_str_weak(contains),
- /* K7 */ be_nested_str_weak(get_cluster_list),
- /* K8 */ be_nested_str_weak(get_attribute_list),
- /* K9 */ be_nested_str_weak(push),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(tasmota),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
- /* K15 */ be_const_int(3),
- /* K16 */ be_nested_str_weak(status),
- /* K17 */ be_nested_str_weak(matter),
- /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
- /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
- /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
- }),
- be_str_weak(process_attribute_expansion),
- &be_const_str_solidified,
- ( &(const binstruction[216]) { /* code */
- 0x840C0000, // 0000 CLOSURE R3 P0
- 0xA4120000, // 0001 IMPORT R4 K0
- 0x88140301, // 0002 GETMBR R5 R1 K1
- 0x50180000, // 0003 LDBOOL R6 0 0
- 0x881C0302, // 0004 GETMBR R7 R1 K2
- 0x50200000, // 0005 LDBOOL R8 0 0
- 0x88240303, // 0006 GETMBR R9 R1 K3
- 0x50280000, // 0007 LDBOOL R10 0 0
- 0x882C0301, // 0008 GETMBR R11 R1 K1
- 0x4C300000, // 0009 LDNIL R12
- 0x202C160C, // 000A NE R11 R11 R12
- 0x782E0007, // 000B JMPF R11 #0014
- 0x882C0302, // 000C GETMBR R11 R1 K2
- 0x4C300000, // 000D LDNIL R12
- 0x202C160C, // 000E NE R11 R11 R12
- 0x782E0003, // 000F JMPF R11 #0014
- 0x882C0303, // 0010 GETMBR R11 R1 K3
- 0x4C300000, // 0011 LDNIL R12
- 0x202C160C, // 0012 NE R11 R11 R12
- 0x742E0000, // 0013 JMPT R11 #0015
- 0x502C0001, // 0014 LDBOOL R11 0 1
- 0x502C0200, // 0015 LDBOOL R11 1 0
- 0x60300013, // 0016 GETGBL R12 G19
- 0x7C300000, // 0017 CALL R12 0
- 0x60340010, // 0018 GETGBL R13 G16
- 0x88380104, // 0019 GETMBR R14 R0 K4
- 0x7C340200, // 001A CALL R13 1
- 0xA8020055, // 001B EXBLK 0 #0072
- 0x5C381A00, // 001C MOVE R14 R13
- 0x7C380000, // 001D CALL R14 0
- 0x8C3C1D05, // 001E GETMET R15 R14 K5
- 0x7C3C0200, // 001F CALL R15 1
- 0x4C400000, // 0020 LDNIL R16
- 0x20400A10, // 0021 NE R16 R5 R16
- 0x78420002, // 0022 JMPF R16 #0026
- 0x20401E05, // 0023 NE R16 R15 R5
- 0x78420000, // 0024 JMPF R16 #0026
- 0x7001FFF5, // 0025 JMP #001C
- 0x8C401906, // 0026 GETMET R16 R12 K6
- 0x5C481E00, // 0027 MOVE R18 R15
- 0x7C400400, // 0028 CALL R16 2
- 0x74420002, // 0029 JMPT R16 #002D
- 0x60400013, // 002A GETGBL R16 G19
- 0x7C400000, // 002B CALL R16 0
- 0x98301E10, // 002C SETIDX R12 R15 R16
- 0x50180200, // 002D LDBOOL R6 1 0
- 0x8C401D07, // 002E GETMET R16 R14 K7
- 0x5C481E00, // 002F MOVE R18 R15
- 0x7C400400, // 0030 CALL R16 2
- 0x60440010, // 0031 GETGBL R17 G16
- 0x5C482000, // 0032 MOVE R18 R16
- 0x7C440200, // 0033 CALL R17 1
- 0xA8020038, // 0034 EXBLK 0 #006E
- 0x5C482200, // 0035 MOVE R18 R17
- 0x7C480000, // 0036 CALL R18 0
- 0x4C4C0000, // 0037 LDNIL R19
- 0x204C0E13, // 0038 NE R19 R7 R19
- 0x784E0002, // 0039 JMPF R19 #003D
- 0x204C2407, // 003A NE R19 R18 R7
- 0x784E0000, // 003B JMPF R19 #003D
- 0x7001FFF7, // 003C JMP #0035
- 0x944C180F, // 003D GETIDX R19 R12 R15
- 0x8C4C2706, // 003E GETMET R19 R19 K6
- 0x5C542400, // 003F MOVE R21 R18
- 0x7C4C0400, // 0040 CALL R19 2
- 0x744E0003, // 0041 JMPT R19 #0046
- 0x944C180F, // 0042 GETIDX R19 R12 R15
- 0x60500013, // 0043 GETGBL R20 G19
- 0x7C500000, // 0044 CALL R20 0
- 0x984C2414, // 0045 SETIDX R19 R18 R20
- 0x50200200, // 0046 LDBOOL R8 1 0
- 0x8C4C1D08, // 0047 GETMET R19 R14 K8
- 0x5C541E00, // 0048 MOVE R21 R15
- 0x5C582400, // 0049 MOVE R22 R18
- 0x7C4C0600, // 004A CALL R19 3
- 0x60500010, // 004B GETGBL R20 G16
- 0x5C542600, // 004C MOVE R21 R19
- 0x7C500200, // 004D CALL R20 1
- 0xA802001A, // 004E EXBLK 0 #006A
- 0x5C542800, // 004F MOVE R21 R20
- 0x7C540000, // 0050 CALL R21 0
- 0x4C580000, // 0051 LDNIL R22
- 0x20581216, // 0052 NE R22 R9 R22
- 0x785A0002, // 0053 JMPF R22 #0057
- 0x20582A09, // 0054 NE R22 R21 R9
- 0x785A0000, // 0055 JMPF R22 #0057
- 0x7001FFF7, // 0056 JMP #004F
- 0x9458180F, // 0057 GETIDX R22 R12 R15
- 0x94582C12, // 0058 GETIDX R22 R22 R18
- 0x8C582D06, // 0059 GETMET R22 R22 K6
- 0x5C602A00, // 005A MOVE R24 R21
- 0x7C580400, // 005B CALL R22 2
- 0x745A0004, // 005C JMPT R22 #0062
- 0x9458180F, // 005D GETIDX R22 R12 R15
- 0x94582C12, // 005E GETIDX R22 R22 R18
- 0x605C0012, // 005F GETGBL R23 G18
- 0x7C5C0000, // 0060 CALL R23 0
- 0x98582A17, // 0061 SETIDX R22 R21 R23
- 0x50280200, // 0062 LDBOOL R10 1 0
- 0x9458180F, // 0063 GETIDX R22 R12 R15
- 0x94582C12, // 0064 GETIDX R22 R22 R18
- 0x94582C15, // 0065 GETIDX R22 R22 R21
- 0x8C582D09, // 0066 GETMET R22 R22 K9
- 0x5C601C00, // 0067 MOVE R24 R14
- 0x7C580400, // 0068 CALL R22 2
- 0x7001FFE4, // 0069 JMP #004F
- 0x5850000A, // 006A LDCONST R20 K10
- 0xAC500200, // 006B CATCH R20 1 0
- 0xB0080000, // 006C RAISE 2 R0 R0
- 0x7001FFC6, // 006D JMP #0035
- 0x5844000A, // 006E LDCONST R17 K10
- 0xAC440200, // 006F CATCH R17 1 0
- 0xB0080000, // 0070 RAISE 2 R0 R0
- 0x7001FFA9, // 0071 JMP #001C
- 0x5834000A, // 0072 LDCONST R13 K10
- 0xAC340200, // 0073 CATCH R13 1 0
- 0xB0080000, // 0074 RAISE 2 R0 R0
- 0x60340010, // 0075 GETGBL R13 G16
- 0x5C380600, // 0076 MOVE R14 R3
- 0x5C3C1800, // 0077 MOVE R15 R12
- 0x7C380200, // 0078 CALL R14 1
- 0x7C340200, // 0079 CALL R13 1
- 0xA802003D, // 007A EXBLK 0 #00B9
- 0x5C381A00, // 007B MOVE R14 R13
- 0x7C380000, // 007C CALL R14 0
- 0x603C0010, // 007D GETGBL R15 G16
- 0x5C400600, // 007E MOVE R16 R3
- 0x9444180E, // 007F GETIDX R17 R12 R14
- 0x7C400200, // 0080 CALL R16 1
- 0x7C3C0200, // 0081 CALL R15 1
- 0xA8020031, // 0082 EXBLK 0 #00B5
- 0x5C401E00, // 0083 MOVE R16 R15
- 0x7C400000, // 0084 CALL R16 0
- 0x60440010, // 0085 GETGBL R17 G16
- 0x5C480600, // 0086 MOVE R18 R3
- 0x944C180E, // 0087 GETIDX R19 R12 R14
- 0x944C2610, // 0088 GETIDX R19 R19 R16
- 0x7C480200, // 0089 CALL R18 1
- 0x7C440200, // 008A CALL R17 1
- 0xA8020024, // 008B EXBLK 0 #00B1
- 0x5C482200, // 008C MOVE R18 R17
- 0x7C480000, // 008D CALL R18 0
- 0x604C0010, // 008E GETGBL R19 G16
- 0x9450180E, // 008F GETIDX R20 R12 R14
- 0x94502810, // 0090 GETIDX R20 R20 R16
- 0x94502812, // 0091 GETIDX R20 R20 R18
- 0x7C4C0200, // 0092 CALL R19 1
- 0xA8020018, // 0093 EXBLK 0 #00AD
- 0x5C502600, // 0094 MOVE R20 R19
- 0x7C500000, // 0095 CALL R20 0
- 0xB8561600, // 0096 GETNGBL R21 K11
- 0x8C542B0C, // 0097 GETMET R21 R21 K12
- 0x8C5C090D, // 0098 GETMET R23 R4 K13
- 0x5864000E, // 0099 LDCONST R25 K14
- 0x5C681C00, // 009A MOVE R26 R14
- 0x5C6C2000, // 009B MOVE R27 R16
- 0x5C702400, // 009C MOVE R28 R18
- 0x7C5C0A00, // 009D CALL R23 5
- 0x5860000F, // 009E LDCONST R24 K15
- 0x7C540600, // 009F CALL R21 3
- 0x9006020E, // 00A0 SETMBR R1 K1 R14
- 0x90060410, // 00A1 SETMBR R1 K2 R16
- 0x90060612, // 00A2 SETMBR R1 K3 R18
- 0x5C540400, // 00A3 MOVE R21 R2
- 0x5C582800, // 00A4 MOVE R22 R20
- 0x5C5C0200, // 00A5 MOVE R23 R1
- 0x5C601600, // 00A6 MOVE R24 R11
- 0x7C540600, // 00A7 CALL R21 3
- 0x782E0002, // 00A8 JMPF R11 #00AC
- 0x78560001, // 00A9 JMPF R21 #00AC
- 0xA8040004, // 00AA EXBLK 1 4
- 0x80002C00, // 00AB RET 0
- 0x7001FFE6, // 00AC JMP #0094
- 0x584C000A, // 00AD LDCONST R19 K10
- 0xAC4C0200, // 00AE CATCH R19 1 0
- 0xB0080000, // 00AF RAISE 2 R0 R0
- 0x7001FFDA, // 00B0 JMP #008C
- 0x5844000A, // 00B1 LDCONST R17 K10
- 0xAC440200, // 00B2 CATCH R17 1 0
- 0xB0080000, // 00B3 RAISE 2 R0 R0
- 0x7001FFCD, // 00B4 JMP #0083
- 0x583C000A, // 00B5 LDCONST R15 K10
- 0xAC3C0200, // 00B6 CATCH R15 1 0
- 0xB0080000, // 00B7 RAISE 2 R0 R0
- 0x7001FFC1, // 00B8 JMP #007B
- 0x5834000A, // 00B9 LDCONST R13 K10
- 0xAC340200, // 00BA CATCH R13 1 0
- 0xB0080000, // 00BB RAISE 2 R0 R0
- 0x782E0019, // 00BC JMPF R11 #00D7
- 0x5C340C00, // 00BD MOVE R13 R6
- 0x74360003, // 00BE JMPT R13 #00C3
- 0xB8362200, // 00BF GETNGBL R13 K17
- 0x88341B12, // 00C0 GETMBR R13 R13 K18
- 0x9006200D, // 00C1 SETMBR R1 K16 R13
- 0x7002000E, // 00C2 JMP #00D2
- 0x5C341000, // 00C3 MOVE R13 R8
- 0x74360003, // 00C4 JMPT R13 #00C9
- 0xB8362200, // 00C5 GETNGBL R13 K17
- 0x88341B13, // 00C6 GETMBR R13 R13 K19
- 0x9006200D, // 00C7 SETMBR R1 K16 R13
- 0x70020008, // 00C8 JMP #00D2
- 0x5C341400, // 00C9 MOVE R13 R10
- 0x74360003, // 00CA JMPT R13 #00CF
- 0xB8362200, // 00CB GETNGBL R13 K17
- 0x88341B14, // 00CC GETMBR R13 R13 K20
- 0x9006200D, // 00CD SETMBR R1 K16 R13
- 0x70020002, // 00CE JMP #00D2
- 0xB8362200, // 00CF GETNGBL R13 K17
- 0x88341B15, // 00D0 GETMBR R13 R13 K21
- 0x9006200D, // 00D1 SETMBR R1 K16 R13
- 0x5C340400, // 00D2 MOVE R13 R2
- 0x4C380000, // 00D3 LDNIL R14
- 0x5C3C0200, // 00D4 MOVE R15 R1
- 0x50400200, // 00D5 LDBOOL R16 1 0
- 0x7C340600, // 00D6 CALL R13 3
- 0x80000000, // 00D7 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: received_ack
-********************************************************************/
-be_local_closure(Matter_Device_received_ack, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(received_ack),
- }),
- be_str_weak(received_ack),
- &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: _trigger_read_sensors
-********************************************************************/
-be_local_closure(Matter_Device__trigger_read_sensors, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(read_sensors),
- /* K3 */ be_nested_str_weak(load),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(plugins),
- /* K6 */ be_nested_str_weak(parse_sensors),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str_weak(log),
- /* K9 */ be_nested_str_weak(MTR_X3A_X20unable_X20to_X20parse_X20read_sensors_X3A_X20),
- /* K10 */ be_const_int(3),
- }),
- be_str_weak(_trigger_read_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xB80A0200, // 0001 GETNGBL R2 K1
- 0x8C080502, // 0002 GETMET R2 R2 K2
- 0x7C080200, // 0003 CALL R2 1
- 0x4C0C0000, // 0004 LDNIL R3
- 0x1C0C0403, // 0005 EQ R3 R2 R3
- 0x780E0000, // 0006 JMPF R3 #0008
- 0x80000600, // 0007 RET 0
- 0x8C0C0303, // 0008 GETMET R3 R1 K3
- 0x5C140400, // 0009 MOVE R5 R2
- 0x7C0C0400, // 000A CALL R3 2
- 0x4C100000, // 000B LDNIL R4
- 0x20100604, // 000C NE R4 R3 R4
- 0x7812000D, // 000D JMPF R4 #001C
- 0x58100004, // 000E LDCONST R4 K4
- 0x6014000C, // 000F GETGBL R5 G12
- 0x88180105, // 0010 GETMBR R6 R0 K5
- 0x7C140200, // 0011 CALL R5 1
- 0x14140805, // 0012 LT R5 R4 R5
- 0x78160006, // 0013 JMPF R5 #001B
- 0x88140105, // 0014 GETMBR R5 R0 K5
- 0x94140A04, // 0015 GETIDX R5 R5 R4
- 0x8C140B06, // 0016 GETMET R5 R5 K6
- 0x5C1C0600, // 0017 MOVE R7 R3
- 0x7C140400, // 0018 CALL R5 2
- 0x00100907, // 0019 ADD R4 R4 K7
- 0x7001FFF3, // 001A JMP #000F
- 0x70020007, // 001B JMP #0024
- 0xB8120200, // 001C GETNGBL R4 K1
- 0x8C100908, // 001D GETMET R4 R4 K8
- 0x60180008, // 001E GETGBL R6 G8
- 0x5C1C0400, // 001F MOVE R7 R2
- 0x7C180200, // 0020 CALL R6 1
- 0x001A1206, // 0021 ADD R6 K9 R6
- 0x581C000A, // 0022 LDCONST R7 K10
- 0x7C100600, // 0023 CALL R4 3
- 0x80000000, // 0024 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_root_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(is_root_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x78060003, // 0003 JMPF R1 #0008
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x4C080000, // 0005 LDNIL R2
- 0x1C040202, // 0006 EQ R1 R1 R2
- 0x74060000, // 0007 JMPT R1 #0009
- 0x50040001, // 0008 LDBOOL R1 0 1
- 0x50040200, // 0009 LDBOOL R1 1 0
- 0x80040200, // 000A RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_commissioning_open, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- }),
- be_str_weak(is_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(is_root_commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(publish_result),
- /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(commissioning_open),
- /* K6 */ be_nested_str_weak(mdns_remove_PASE),
- /* K7 */ be_nested_str_weak(commissioning_iterations),
- /* K8 */ be_nested_str_weak(commissioning_discriminator),
- /* K9 */ be_nested_str_weak(commissioning_salt),
- /* K10 */ be_nested_str_weak(commissioning_w0),
- /* K11 */ be_nested_str_weak(commissioning_L),
- /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(stop_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x78060004, // 0002 JMPF R1 #0008
- 0xB8060200, // 0003 GETNGBL R1 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0x580C0003, // 0005 LDCONST R3 K3
- 0x58100004, // 0006 LDCONST R4 K4
- 0x7C040600, // 0007 CALL R1 3
- 0x4C040000, // 0008 LDNIL R1
- 0x90020A01, // 0009 SETMBR R0 K5 R1
- 0x8C040106, // 000A GETMET R1 R0 K6
- 0x7C040200, // 000B CALL R1 1
- 0x4C040000, // 000C LDNIL R1
- 0x90020E01, // 000D SETMBR R0 K7 R1
- 0x4C040000, // 000E LDNIL R1
- 0x90021001, // 000F SETMBR R0 K8 R1
- 0x4C040000, // 0010 LDNIL R1
- 0x90021201, // 0011 SETMBR R0 K9 R1
- 0x4C040000, // 0012 LDNIL R1
- 0x90021401, // 0013 SETMBR R0 K10 R1
- 0x4C040000, // 0014 LDNIL R1
- 0x90021601, // 0015 SETMBR R0 K11 R1
- 0x4C040000, // 0016 LDNIL R1
- 0x90021801, // 0017 SETMBR R0 K12 R1
- 0x80000000, // 0018 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: start_root_basic_commissioning
********************************************************************/
@@ -1949,263 +1136,36 @@ be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
/********************************************************************
-** Solidified function: attribute_updated
+** Solidified function: start_commissioning_complete
********************************************************************/
-be_local_closure(Matter_Device_attribute_updated, /* name */
- be_nested_proto(
- 10, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(Path),
- /* K2 */ be_nested_str_weak(endpoint),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(message_handler),
- /* K6 */ be_nested_str_weak(im),
- /* K7 */ be_nested_str_weak(subs_shop),
- /* K8 */ be_nested_str_weak(attribute_updated_ctx),
- }),
- 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
- 0xB8160000, // 0004 GETNGBL R5 K0
- 0x8C140B01, // 0005 GETMET R5 R5 K1
- 0x7C140200, // 0006 CALL R5 1
- 0x90160401, // 0007 SETMBR R5 K2 R1
- 0x90160602, // 0008 SETMBR R5 K3 R2
- 0x90160803, // 0009 SETMBR R5 K4 R3
- 0x88180105, // 000A GETMBR R6 R0 K5
- 0x88180D06, // 000B GETMBR R6 R6 K6
- 0x88180D07, // 000C GETMBR R6 R6 K7
- 0x8C180D08, // 000D GETMET R6 R6 K8
- 0x5C200A00, // 000E MOVE R8 R5
- 0x5C240800, // 000F MOVE R9 R4
- 0x7C180600, // 0010 CALL R6 3
- 0x80000000, // 0011 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: autoconf_device
-********************************************************************/
-be_local_closure(Matter_Device_autoconf_device, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(json),
- /* K2 */ be_nested_str_weak(plugins),
- /* K3 */ be_const_int(0),
- /* K4 */ be_nested_str_weak(autoconf_device_map),
- /* K5 */ be_nested_str_weak(tasmota),
- /* K6 */ be_nested_str_weak(log),
- /* K7 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
- /* K8 */ be_const_int(3),
- /* K9 */ be_nested_str_weak(_load_plugins_config),
- /* K10 */ be_nested_str_weak(plugins_persist),
- /* K11 */ be_nested_str_weak(sessions),
- /* K12 */ be_nested_str_weak(count_active_fabrics),
- /* K13 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(autoconf_device),
- &be_const_str_solidified,
- ( &(const binstruction[33]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x88100102, // 0003 GETMBR R4 R0 K2
- 0x7C0C0200, // 0004 CALL R3 1
- 0x240C0703, // 0005 GT R3 R3 K3
- 0x780E0000, // 0006 JMPF R3 #0008
- 0x80000600, // 0007 RET 0
- 0x8C0C0104, // 0008 GETMET R3 R0 K4
- 0x7C0C0200, // 0009 CALL R3 1
- 0xB8120A00, // 000A GETNGBL R4 K5
- 0x8C100906, // 000B GETMET R4 R4 K6
- 0x60180008, // 000C GETGBL R6 G8
- 0x5C1C0600, // 000D MOVE R7 R3
- 0x7C180200, // 000E CALL R6 1
- 0x001A0E06, // 000F ADD R6 K7 R6
- 0x581C0008, // 0010 LDCONST R7 K8
- 0x7C100600, // 0011 CALL R4 3
- 0x8C100109, // 0012 GETMET R4 R0 K9
- 0x5C180600, // 0013 MOVE R6 R3
- 0x7C100400, // 0014 CALL R4 2
- 0x8810010A, // 0015 GETMBR R4 R0 K10
- 0x74120008, // 0016 JMPT R4 #0020
- 0x8810010B, // 0017 GETMBR R4 R0 K11
- 0x8C10090C, // 0018 GETMET R4 R4 K12
- 0x7C100200, // 0019 CALL R4 1
- 0x24100903, // 001A GT R4 R4 K3
- 0x78120003, // 001B JMPF R4 #0020
- 0x50100200, // 001C LDBOOL R4 1 0
- 0x90021404, // 001D SETMBR R0 K10 R4
- 0x8C10010D, // 001E GETMET R4 R0 K13
- 0x7C100200, // 001F CALL R4 1
- 0x80000000, // 0020 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_250ms
-********************************************************************/
-be_local_closure(Matter_Device_every_250ms, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(every_250ms),
- }),
- be_str_weak(every_250ms),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(mdns_remove_op_discovery_all_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
+be_local_closure(Matter_Device_start_commissioning_complete, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_commissioning_complete),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
+ ( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(log),
+ /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
+ /* K3 */ be_const_int(2),
+ /* K4 */ be_nested_str_weak(stop_basic_commissioning),
}),
- be_str_weak(start_commissioning_complete_deferred),
+ be_str_weak(start_commissioning_complete),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
+ ( &(const binstruction[ 8]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
+ 0x58140003, // 0003 LDCONST R5 K3
0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
+ 0x8C080104, // 0005 GETMET R2 R0 K4
+ 0x7C080200, // 0006 CALL R2 1
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -2442,9 +1402,618 @@ be_local_closure(Matter_Device_init, /* name */
/********************************************************************
-** Solidified function: _init_basic_commissioning
+** Solidified function: start
********************************************************************/
-be_local_closure(Matter_Device__init_basic_commissioning, /* name */
+be_local_closure(Matter_Device_start, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(_trigger_read_sensors),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80000000, // 0003 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(started),
+ /* K1 */ be_nested_str_weak(autoconf_device),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(add_cron),
+ /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
+ /* K5 */ be_nested_str_weak(matter_sensors_30s),
+ /* K6 */ be_nested_str_weak(_start_udp),
+ /* K7 */ be_nested_str_weak(UDP_PORT),
+ /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames),
+ }),
+ be_str_weak(start),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x78060000, // 0001 JMPF R1 #0003
+ 0x80000200, // 0002 RET 0
+ 0x8C040101, // 0003 GETMET R1 R0 K1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xB8060400, // 0005 GETNGBL R1 K2
+ 0x8C040303, // 0006 GETMET R1 R1 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x84100000, // 0008 CLOSURE R4 P0
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C040800, // 000A CALL R1 4
+ 0x8C040106, // 000B GETMET R1 R0 K6
+ 0x880C0107, // 000C GETMBR R3 R0 K7
+ 0x7C040400, // 000D CALL R1 2
+ 0x8C040108, // 000E GETMET R1 R0 K8
+ 0x7C040200, // 000F CALL R1 1
+ 0x50040200, // 0010 LDBOOL R1 1 0
+ 0x90020001, // 0011 SETMBR R0 K0 R1
+ 0xA0000000, // 0012 CLOSE R0
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: load_param
+********************************************************************/
+be_local_closure(Matter_Device_load_param, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(crypto),
+ /* K2 */ be_nested_str_weak(FILENAME),
+ /* K3 */ be_nested_str_weak(read),
+ /* K4 */ be_nested_str_weak(close),
+ /* K5 */ be_nested_str_weak(json),
+ /* K6 */ be_nested_str_weak(load),
+ /* K7 */ be_nested_str_weak(root_discriminator),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(distinguish),
+ /* K10 */ be_nested_str_weak(root_passcode),
+ /* K11 */ be_nested_str_weak(passcode),
+ /* K12 */ be_nested_str_weak(ipv4only),
+ /* K13 */ be_nested_str_weak(plugins_config),
+ /* K14 */ be_nested_str_weak(config),
+ /* K15 */ be_nested_str_weak(_load_plugins_config),
+ /* K16 */ be_nested_str_weak(plugins_persist),
+ /* K17 */ be_nested_str_weak(io_error),
+ /* K18 */ be_nested_str_weak(tasmota),
+ /* K19 */ be_nested_str_weak(log),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
+ /* K21 */ be_nested_str_weak(_X7C),
+ /* K22 */ be_const_int(2),
+ /* K23 */ be_nested_str_weak(random),
+ /* K24 */ be_nested_str_weak(get),
+ /* K25 */ be_const_int(0),
+ /* K26 */ be_nested_str_weak(generate_random_passcode),
+ /* K27 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(load_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[91]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA8020028, // 0002 EXBLK 0 #002C
+ 0x600C0011, // 0003 GETGBL R3 G17
+ 0x88100102, // 0004 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x8C100703, // 0006 GETMET R4 R3 K3
+ 0x7C100200, // 0007 CALL R4 1
+ 0x8C140704, // 0008 GETMET R5 R3 K4
+ 0x7C140200, // 0009 CALL R5 1
+ 0xA4160A00, // 000A IMPORT R5 K5
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x5C200800, // 000C MOVE R8 R4
+ 0x7C180400, // 000D CALL R6 2
+ 0x8C1C0D08, // 000E GETMET R7 R6 K8
+ 0x58240009, // 000F LDCONST R9 K9
+ 0x88280107, // 0010 GETMBR R10 R0 K7
+ 0x7C1C0600, // 0011 CALL R7 3
+ 0x90020E07, // 0012 SETMBR R0 K7 R7
+ 0x8C1C0D08, // 0013 GETMET R7 R6 K8
+ 0x5824000B, // 0014 LDCONST R9 K11
+ 0x8828010A, // 0015 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0016 CALL R7 3
+ 0x90021407, // 0017 SETMBR R0 K10 R7
+ 0x601C0017, // 0018 GETGBL R7 G23
+ 0x8C200D08, // 0019 GETMET R8 R6 K8
+ 0x5828000C, // 001A LDCONST R10 K12
+ 0x502C0000, // 001B LDBOOL R11 0 0
+ 0x7C200600, // 001C CALL R8 3
+ 0x7C1C0200, // 001D CALL R7 1
+ 0x90021807, // 001E SETMBR R0 K12 R7
+ 0x8C1C0D08, // 001F GETMET R7 R6 K8
+ 0x5824000E, // 0020 LDCONST R9 K14
+ 0x7C1C0400, // 0021 CALL R7 2
+ 0x90021A07, // 0022 SETMBR R0 K13 R7
+ 0x881C010D, // 0023 GETMBR R7 R0 K13
+ 0x781E0004, // 0024 JMPF R7 #002A
+ 0x8C1C010F, // 0025 GETMET R7 R0 K15
+ 0x8824010D, // 0026 GETMBR R9 R0 K13
+ 0x7C1C0400, // 0027 CALL R7 2
+ 0x501C0200, // 0028 LDBOOL R7 1 0
+ 0x90022007, // 0029 SETMBR R0 K16 R7
+ 0xA8040001, // 002A EXBLK 1 1
+ 0x70020012, // 002B JMP #003F
+ 0xAC0C0002, // 002C CATCH R3 0 2
+ 0x7002000F, // 002D JMP #003E
+ 0x20140711, // 002E NE R5 R3 K17
+ 0x7816000C, // 002F JMPF R5 #003D
+ 0xB8162400, // 0030 GETNGBL R5 K18
+ 0x8C140B13, // 0031 GETMET R5 R5 K19
+ 0x601C0008, // 0032 GETGBL R7 G8
+ 0x5C200600, // 0033 MOVE R8 R3
+ 0x7C1C0200, // 0034 CALL R7 1
+ 0x001E2807, // 0035 ADD R7 K20 R7
+ 0x001C0F15, // 0036 ADD R7 R7 K21
+ 0x60200008, // 0037 GETGBL R8 G8
+ 0x5C240800, // 0038 MOVE R9 R4
+ 0x7C200200, // 0039 CALL R8 1
+ 0x001C0E08, // 003A ADD R7 R7 R8
+ 0x58200016, // 003B LDCONST R8 K22
+ 0x7C140600, // 003C CALL R5 3
+ 0x70020000, // 003D JMP #003F
+ 0xB0080000, // 003E RAISE 2 R0 R0
+ 0x500C0000, // 003F LDBOOL R3 0 0
+ 0x88100107, // 0040 GETMBR R4 R0 K7
+ 0x4C140000, // 0041 LDNIL R5
+ 0x1C100805, // 0042 EQ R4 R4 R5
+ 0x7812000A, // 0043 JMPF R4 #004F
+ 0x8C100517, // 0044 GETMET R4 R2 K23
+ 0x58180016, // 0045 LDCONST R6 K22
+ 0x7C100400, // 0046 CALL R4 2
+ 0x8C100918, // 0047 GETMET R4 R4 K24
+ 0x58180019, // 0048 LDCONST R6 K25
+ 0x581C0016, // 0049 LDCONST R7 K22
+ 0x7C100600, // 004A CALL R4 3
+ 0x54160FFE, // 004B LDINT R5 4095
+ 0x2C100805, // 004C AND R4 R4 R5
+ 0x90020E04, // 004D SETMBR R0 K7 R4
+ 0x500C0200, // 004E LDBOOL R3 1 0
+ 0x8810010A, // 004F GETMBR R4 R0 K10
+ 0x4C140000, // 0050 LDNIL R5
+ 0x1C100805, // 0051 EQ R4 R4 R5
+ 0x78120003, // 0052 JMPF R4 #0057
+ 0x8C10011A, // 0053 GETMET R4 R0 K26
+ 0x7C100200, // 0054 CALL R4 1
+ 0x90021404, // 0055 SETMBR R0 K10 R4
+ 0x500C0200, // 0056 LDBOOL R3 1 0
+ 0x780E0001, // 0057 JMPF R3 #005A
+ 0x8C10011B, // 0058 GETMET R4 R0 K27
+ 0x7C100200, // 0059 CALL R4 1
+ 0x80000000, // 005A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_native_classes
+********************************************************************/
+be_local_closure(Matter_Device_register_native_classes, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(register_plugin_class),
+ /* K1 */ be_nested_str_weak(root),
+ /* K2 */ be_nested_str_weak(matter),
+ /* K3 */ be_nested_str_weak(Plugin_Root),
+ /* K4 */ be_nested_str_weak(light0),
+ /* K5 */ be_nested_str_weak(Plugin_Light0),
+ /* K6 */ be_nested_str_weak(light1),
+ /* K7 */ be_nested_str_weak(Plugin_Light1),
+ /* K8 */ be_nested_str_weak(light2),
+ /* K9 */ be_nested_str_weak(Plugin_Light2),
+ /* K10 */ be_nested_str_weak(light3),
+ /* K11 */ be_nested_str_weak(Plugin_Light3),
+ /* K12 */ be_nested_str_weak(relay),
+ /* K13 */ be_nested_str_weak(Plugin_OnOff),
+ /* K14 */ be_nested_str_weak(temperature),
+ /* K15 */ be_nested_str_weak(Plugin_Sensor_Temp),
+ /* K16 */ be_nested_str_weak(humidity),
+ /* K17 */ be_nested_str_weak(Plugin_Sensor_Humidity),
+ /* K18 */ be_nested_str_weak(illuminance),
+ /* K19 */ be_nested_str_weak(Plugin_Sensor_Illuminance),
+ /* K20 */ be_nested_str_weak(pressure),
+ /* K21 */ be_nested_str_weak(Plugin_Sensor_Pressure),
+ /* K22 */ be_nested_str_weak(tasmota),
+ /* K23 */ be_nested_str_weak(log),
+ /* K24 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20),
+ /* K25 */ be_nested_str_weak(k2l),
+ /* K26 */ be_nested_str_weak(plugins_classes),
+ /* K27 */ be_const_int(3),
+ }),
+ be_str_weak(register_native_classes),
+ &be_const_str_solidified,
+ ( &(const binstruction[61]) { /* code */
+ 0x8C0C0100, // 0000 GETMET R3 R0 K0
+ 0x58140001, // 0001 LDCONST R5 K1
+ 0xB81A0400, // 0002 GETNGBL R6 K2
+ 0x88180D03, // 0003 GETMBR R6 R6 K3
+ 0x7C0C0600, // 0004 CALL R3 3
+ 0x8C0C0100, // 0005 GETMET R3 R0 K0
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0xB81A0400, // 0007 GETNGBL R6 K2
+ 0x88180D05, // 0008 GETMBR R6 R6 K5
+ 0x7C0C0600, // 0009 CALL R3 3
+ 0x8C0C0100, // 000A GETMET R3 R0 K0
+ 0x58140006, // 000B LDCONST R5 K6
+ 0xB81A0400, // 000C GETNGBL R6 K2
+ 0x88180D07, // 000D GETMBR R6 R6 K7
+ 0x7C0C0600, // 000E CALL R3 3
+ 0x8C0C0100, // 000F GETMET R3 R0 K0
+ 0x58140008, // 0010 LDCONST R5 K8
+ 0xB81A0400, // 0011 GETNGBL R6 K2
+ 0x88180D09, // 0012 GETMBR R6 R6 K9
+ 0x7C0C0600, // 0013 CALL R3 3
+ 0x8C0C0100, // 0014 GETMET R3 R0 K0
+ 0x5814000A, // 0015 LDCONST R5 K10
+ 0xB81A0400, // 0016 GETNGBL R6 K2
+ 0x88180D0B, // 0017 GETMBR R6 R6 K11
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x8C0C0100, // 0019 GETMET R3 R0 K0
+ 0x5814000C, // 001A LDCONST R5 K12
+ 0xB81A0400, // 001B GETNGBL R6 K2
+ 0x88180D0D, // 001C GETMBR R6 R6 K13
+ 0x7C0C0600, // 001D CALL R3 3
+ 0x8C0C0100, // 001E GETMET R3 R0 K0
+ 0x5814000E, // 001F LDCONST R5 K14
+ 0xB81A0400, // 0020 GETNGBL R6 K2
+ 0x88180D0F, // 0021 GETMBR R6 R6 K15
+ 0x7C0C0600, // 0022 CALL R3 3
+ 0x8C0C0100, // 0023 GETMET R3 R0 K0
+ 0x58140010, // 0024 LDCONST R5 K16
+ 0xB81A0400, // 0025 GETNGBL R6 K2
+ 0x88180D11, // 0026 GETMBR R6 R6 K17
+ 0x7C0C0600, // 0027 CALL R3 3
+ 0x8C0C0100, // 0028 GETMET R3 R0 K0
+ 0x58140012, // 0029 LDCONST R5 K18
+ 0xB81A0400, // 002A GETNGBL R6 K2
+ 0x88180D13, // 002B GETMBR R6 R6 K19
+ 0x7C0C0600, // 002C CALL R3 3
+ 0x8C0C0100, // 002D GETMET R3 R0 K0
+ 0x58140014, // 002E LDCONST R5 K20
+ 0xB81A0400, // 002F GETNGBL R6 K2
+ 0x88180D15, // 0030 GETMBR R6 R6 K21
+ 0x7C0C0600, // 0031 CALL R3 3
+ 0xB80E2C00, // 0032 GETNGBL R3 K22
+ 0x8C0C0717, // 0033 GETMET R3 R3 K23
+ 0x60140008, // 0034 GETGBL R5 G8
+ 0x8C180119, // 0035 GETMET R6 R0 K25
+ 0x8820011A, // 0036 GETMBR R8 R0 K26
+ 0x7C180400, // 0037 CALL R6 2
+ 0x7C140200, // 0038 CALL R5 1
+ 0x00163005, // 0039 ADD R5 K24 R5
+ 0x5818001B, // 003A LDCONST R6 K27
+ 0x7C0C0600, // 003B CALL R3 3
+ 0x80000000, // 003C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _mdns_announce_hostname
+********************************************************************/
+be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(start),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(eth),
+ /* K5 */ be_nested_str_weak(hostname_eth),
+ /* K6 */ be_nested_str_weak(replace),
+ /* K7 */ be_nested_str_weak(find),
+ /* K8 */ be_nested_str_weak(mac),
+ /* K9 */ be_nested_str_weak(_X3A),
+ /* K10 */ be_nested_str_weak(),
+ /* K11 */ be_nested_str_weak(ipv4only),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K15 */ be_nested_str_weak(ip6local),
+ /* K16 */ be_nested_str_weak(ip),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(add_hostname),
+ /* K19 */ be_nested_str_weak(ip6),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
+ /* K21 */ be_nested_str_weak(wifi),
+ /* K22 */ be_nested_str_weak(hostname_wifi),
+ /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
+ /* K24 */ be_const_int(2),
+ /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K26 */ be_nested_str_weak(_X7C),
+ /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
+ }),
+ be_str_weak(_mdns_announce_hostname),
+ &be_const_str_solidified,
+ ( &(const binstruction[172]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0x8C100502, // 0002 GETMET R4 R2 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0xA8020092, // 0004 EXBLK 0 #0098
+ 0x78060040, // 0005 JMPF R1 #0047
+ 0xB8120600, // 0006 GETNGBL R4 K3
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140706, // 0009 GETMET R5 R3 K6
+ 0x8C1C0907, // 000A GETMET R7 R4 K7
+ 0x58240008, // 000B LDCONST R9 K8
+ 0x7C1C0400, // 000C CALL R7 2
+ 0x58200009, // 000D LDCONST R8 K9
+ 0x5824000A, // 000E LDCONST R9 K10
+ 0x7C140800, // 000F CALL R5 4
+ 0x90020A05, // 0010 SETMBR R0 K5 R5
+ 0x8814010B, // 0011 GETMBR R5 R0 K11
+ 0x7416001F, // 0012 JMPT R5 #0033
+ 0xB8160600, // 0013 GETNGBL R5 K3
+ 0x8C140B0C, // 0014 GETMET R5 R5 K12
+ 0x8C1C070D, // 0015 GETMET R7 R3 K13
+ 0x5824000E, // 0016 LDCONST R9 K14
+ 0x88280105, // 0017 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0018 GETMET R11 R4 K7
+ 0x5834000F, // 0019 LDCONST R13 K15
+ 0x5838000A, // 001A LDCONST R14 K10
+ 0x7C2C0600, // 001B CALL R11 3
+ 0x8C300907, // 001C GETMET R12 R4 K7
+ 0x58380010, // 001D LDCONST R14 K16
+ 0x583C000A, // 001E LDCONST R15 K10
+ 0x7C300600, // 001F CALL R12 3
+ 0x7C1C0A00, // 0020 CALL R7 5
+ 0x58200011, // 0021 LDCONST R8 K17
+ 0x7C140600, // 0022 CALL R5 3
+ 0x8C140512, // 0023 GETMET R5 R2 K18
+ 0x881C0105, // 0024 GETMBR R7 R0 K5
+ 0x8C200907, // 0025 GETMET R8 R4 K7
+ 0x5828000F, // 0026 LDCONST R10 K15
+ 0x582C000A, // 0027 LDCONST R11 K10
+ 0x7C200600, // 0028 CALL R8 3
+ 0x8C240907, // 0029 GETMET R9 R4 K7
+ 0x582C0010, // 002A LDCONST R11 K16
+ 0x5830000A, // 002B LDCONST R12 K10
+ 0x7C240600, // 002C CALL R9 3
+ 0x8C280907, // 002D GETMET R10 R4 K7
+ 0x58300013, // 002E LDCONST R12 K19
+ 0x5834000A, // 002F LDCONST R13 K10
+ 0x7C280600, // 0030 CALL R10 3
+ 0x7C140A00, // 0031 CALL R5 5
+ 0x70020012, // 0032 JMP #0046
+ 0xB8160600, // 0033 GETNGBL R5 K3
+ 0x8C140B0C, // 0034 GETMET R5 R5 K12
+ 0x8C1C070D, // 0035 GETMET R7 R3 K13
+ 0x58240014, // 0036 LDCONST R9 K20
+ 0x88280105, // 0037 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0038 GETMET R11 R4 K7
+ 0x58340010, // 0039 LDCONST R13 K16
+ 0x5838000A, // 003A LDCONST R14 K10
+ 0x7C2C0600, // 003B CALL R11 3
+ 0x7C1C0800, // 003C CALL R7 4
+ 0x58200011, // 003D LDCONST R8 K17
+ 0x7C140600, // 003E CALL R5 3
+ 0x8C140512, // 003F GETMET R5 R2 K18
+ 0x881C0105, // 0040 GETMBR R7 R0 K5
+ 0x8C200907, // 0041 GETMET R8 R4 K7
+ 0x58280010, // 0042 LDCONST R10 K16
+ 0x582C000A, // 0043 LDCONST R11 K10
+ 0x7C200600, // 0044 CALL R8 3
+ 0x7C140600, // 0045 CALL R5 3
+ 0x7002003F, // 0046 JMP #0087
+ 0xB8120600, // 0047 GETNGBL R4 K3
+ 0x8C100915, // 0048 GETMET R4 R4 K21
+ 0x7C100200, // 0049 CALL R4 1
+ 0x8C140706, // 004A GETMET R5 R3 K6
+ 0x8C1C0907, // 004B GETMET R7 R4 K7
+ 0x58240008, // 004C LDCONST R9 K8
+ 0x7C1C0400, // 004D CALL R7 2
+ 0x58200009, // 004E LDCONST R8 K9
+ 0x5824000A, // 004F LDCONST R9 K10
+ 0x7C140800, // 0050 CALL R5 4
+ 0x90022C05, // 0051 SETMBR R0 K22 R5
+ 0x8814010B, // 0052 GETMBR R5 R0 K11
+ 0x7416001F, // 0053 JMPT R5 #0074
+ 0xB8160600, // 0054 GETNGBL R5 K3
+ 0x8C140B0C, // 0055 GETMET R5 R5 K12
+ 0x8C1C070D, // 0056 GETMET R7 R3 K13
+ 0x5824000E, // 0057 LDCONST R9 K14
+ 0x88280116, // 0058 GETMBR R10 R0 K22
+ 0x8C2C0907, // 0059 GETMET R11 R4 K7
+ 0x5834000F, // 005A LDCONST R13 K15
+ 0x5838000A, // 005B LDCONST R14 K10
+ 0x7C2C0600, // 005C CALL R11 3
+ 0x8C300907, // 005D GETMET R12 R4 K7
+ 0x58380010, // 005E LDCONST R14 K16
+ 0x583C000A, // 005F LDCONST R15 K10
+ 0x7C300600, // 0060 CALL R12 3
+ 0x7C1C0A00, // 0061 CALL R7 5
+ 0x58200011, // 0062 LDCONST R8 K17
+ 0x7C140600, // 0063 CALL R5 3
+ 0x8C140512, // 0064 GETMET R5 R2 K18
+ 0x881C0116, // 0065 GETMBR R7 R0 K22
+ 0x8C200907, // 0066 GETMET R8 R4 K7
+ 0x5828000F, // 0067 LDCONST R10 K15
+ 0x582C000A, // 0068 LDCONST R11 K10
+ 0x7C200600, // 0069 CALL R8 3
+ 0x8C240907, // 006A GETMET R9 R4 K7
+ 0x582C0010, // 006B LDCONST R11 K16
+ 0x5830000A, // 006C LDCONST R12 K10
+ 0x7C240600, // 006D CALL R9 3
+ 0x8C280907, // 006E GETMET R10 R4 K7
+ 0x58300013, // 006F LDCONST R12 K19
+ 0x5834000A, // 0070 LDCONST R13 K10
+ 0x7C280600, // 0071 CALL R10 3
+ 0x7C140A00, // 0072 CALL R5 5
+ 0x70020012, // 0073 JMP #0087
+ 0xB8160600, // 0074 GETNGBL R5 K3
+ 0x8C140B0C, // 0075 GETMET R5 R5 K12
+ 0x8C1C070D, // 0076 GETMET R7 R3 K13
+ 0x58240014, // 0077 LDCONST R9 K20
+ 0x88280105, // 0078 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0079 GETMET R11 R4 K7
+ 0x58340010, // 007A LDCONST R13 K16
+ 0x5838000A, // 007B LDCONST R14 K10
+ 0x7C2C0600, // 007C CALL R11 3
+ 0x7C1C0800, // 007D CALL R7 4
+ 0x58200011, // 007E LDCONST R8 K17
+ 0x7C140600, // 007F CALL R5 3
+ 0x8C140512, // 0080 GETMET R5 R2 K18
+ 0x881C0116, // 0081 GETMBR R7 R0 K22
+ 0x8C200907, // 0082 GETMET R8 R4 K7
+ 0x58280010, // 0083 LDCONST R10 K16
+ 0x582C000A, // 0084 LDCONST R11 K10
+ 0x7C200600, // 0085 CALL R8 3
+ 0x7C140600, // 0086 CALL R5 3
+ 0xB8120600, // 0087 GETNGBL R4 K3
+ 0x8C10090C, // 0088 GETMET R4 R4 K12
+ 0x8C18070D, // 0089 GETMET R6 R3 K13
+ 0x58200017, // 008A LDCONST R8 K23
+ 0x78060001, // 008B JMPF R1 #008E
+ 0x58240004, // 008C LDCONST R9 K4
+ 0x70020000, // 008D JMP #008F
+ 0x58240015, // 008E LDCONST R9 K21
+ 0x78060001, // 008F JMPF R1 #0092
+ 0x88280105, // 0090 GETMBR R10 R0 K5
+ 0x70020000, // 0091 JMP #0093
+ 0x88280116, // 0092 GETMBR R10 R0 K22
+ 0x7C180800, // 0093 CALL R6 4
+ 0x581C0018, // 0094 LDCONST R7 K24
+ 0x7C100600, // 0095 CALL R4 3
+ 0xA8040001, // 0096 EXBLK 1 1
+ 0x70020010, // 0097 JMP #00A9
+ 0xAC100002, // 0098 CATCH R4 0 2
+ 0x7002000D, // 0099 JMP #00A8
+ 0xB81A0600, // 009A GETNGBL R6 K3
+ 0x8C180D0C, // 009B GETMET R6 R6 K12
+ 0x60200008, // 009C GETGBL R8 G8
+ 0x5C240800, // 009D MOVE R9 R4
+ 0x7C200200, // 009E CALL R8 1
+ 0x00223208, // 009F ADD R8 K25 R8
+ 0x0020111A, // 00A0 ADD R8 R8 K26
+ 0x60240008, // 00A1 GETGBL R9 G8
+ 0x5C280A00, // 00A2 MOVE R10 R5
+ 0x7C240200, // 00A3 CALL R9 1
+ 0x00201009, // 00A4 ADD R8 R8 R9
+ 0x58240018, // 00A5 LDCONST R9 K24
+ 0x7C180600, // 00A6 CALL R6 3
+ 0x70020000, // 00A7 JMP #00A9
+ 0xB0080000, // 00A8 RAISE 2 R0 R0
+ 0x8C10011B, // 00A9 GETMET R4 R0 K27
+ 0x7C100200, // 00AA CALL R4 1
+ 0x80000000, // 00AB RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_remove_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: event_fabrics_saved
+********************************************************************/
+be_local_closure(Matter_Device_event_fabrics_saved, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -2454,23 +2023,66 @@ be_local_closure(Matter_Device__init_basic_commissioning, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(plugins_persist),
+ /* K4 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(event_fabrics_saved),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x24040302, // 0003 GT R1 R1 K2
+ 0x78060005, // 0004 JMPF R1 #000B
+ 0x88040103, // 0005 GETMBR R1 R0 K3
+ 0x74060003, // 0006 JMPT R1 #000B
+ 0x50040200, // 0007 LDBOOL R1 1 0
+ 0x90020601, // 0008 SETMBR R0 K3 R1
+ 0x8C040104, // 0009 GETMET R1 R0 K4
+ 0x7C040200, // 000A CALL R1 1
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: stop
+********************************************************************/
+be_local_closure(Matter_Device_stop, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(remove_driver),
+ /* K2 */ be_nested_str_weak(udp_server),
+ /* K3 */ be_nested_str_weak(stop),
}),
- be_str_weak(_init_basic_commissioning),
+ be_str_weak(stop),
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
+ ( &(const binstruction[10]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x1C040302, // 0003 EQ R1 R1 K2
- 0x78060001, // 0004 JMPF R1 #0007
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x7C040200, // 0006 CALL R1 1
- 0x80000000, // 0007 RET 0
+ 0x5C0C0000, // 0002 MOVE R3 R0
+ 0x7C040400, // 0003 CALL R1 2
+ 0x88040102, // 0004 GETMBR R1 R0 K2
+ 0x78060002, // 0005 JMPF R1 #0009
+ 0x88040102, // 0006 GETMBR R1 R0 K2
+ 0x8C040303, // 0007 GETMET R1 R1 K3
+ 0x7C040200, // 0008 CALL R1 1
+ 0x80000000, // 0009 RET 0
})
)
);
@@ -2478,11 +2090,11 @@ be_local_closure(Matter_Device__init_basic_commissioning, /* name */
/********************************************************************
-** Solidified function: save_before_restart
+** Solidified function: stop_basic_commissioning
********************************************************************/
-be_local_closure(Matter_Device_save_before_restart, /* name */
+be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
be_nested_proto(
- 3, /* nstack */
+ 5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -2490,68 +2102,49 @@ be_local_closure(Matter_Device_save_before_restart, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(stop_basic_commissioning),
- /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(publish_result),
+ /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(commissioning_open),
+ /* K6 */ be_nested_str_weak(mdns_remove_PASE),
+ /* K7 */ be_nested_str_weak(commissioning_iterations),
+ /* K8 */ be_nested_str_weak(commissioning_discriminator),
+ /* K9 */ be_nested_str_weak(commissioning_salt),
+ /* K10 */ be_nested_str_weak(commissioning_w0),
+ /* K11 */ be_nested_str_weak(commissioning_L),
+ /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
}),
- be_str_weak(save_before_restart),
+ be_str_weak(stop_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
+ ( &(const binstruction[25]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
- 0x8C040101, // 0002 GETMET R1 R0 K1
- 0x7C040200, // 0003 CALL R1 1
- 0x80000000, // 0004 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_operational_discovery
-********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(mdns),
- /* K2 */ be_nested_str_weak(string),
- /* K3 */ be_nested_str_weak(stop_basic_commissioning),
- /* K4 */ be_nested_str_weak(root_w0),
- /* K5 */ be_nested_str_weak(root_L),
- /* K6 */ be_nested_str_weak(set_expire_in_seconds),
- /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K8 */ be_nested_str_weak(get_fabric),
- }),
- be_str_weak(start_operational_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA4120400, // 0002 IMPORT R4 K2
- 0x8C140103, // 0003 GETMET R5 R0 K3
- 0x7C140200, // 0004 CALL R5 1
- 0x4C140000, // 0005 LDNIL R5
- 0x90020805, // 0006 SETMBR R0 K4 R5
- 0x4C140000, // 0007 LDNIL R5
- 0x90020A05, // 0008 SETMBR R0 K5 R5
- 0x8C140306, // 0009 GETMET R5 R1 K6
- 0x541E003B, // 000A LDINT R7 60
- 0x7C140400, // 000B CALL R5 2
- 0x8C140107, // 000C GETMET R5 R0 K7
- 0x8C1C0308, // 000D GETMET R7 R1 K8
- 0x7C1C0200, // 000E CALL R7 1
- 0x7C140400, // 000F CALL R5 2
- 0x80000000, // 0010 RET 0
+ 0x78060004, // 0002 JMPF R1 #0008
+ 0xB8060200, // 0003 GETNGBL R1 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0x580C0003, // 0005 LDCONST R3 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C040600, // 0007 CALL R1 3
+ 0x4C040000, // 0008 LDNIL R1
+ 0x90020A01, // 0009 SETMBR R0 K5 R1
+ 0x8C040106, // 000A GETMET R1 R0 K6
+ 0x7C040200, // 000B CALL R1 1
+ 0x4C040000, // 000C LDNIL R1
+ 0x90020E01, // 000D SETMBR R0 K7 R1
+ 0x4C040000, // 000E LDNIL R1
+ 0x90021001, // 000F SETMBR R0 K8 R1
+ 0x4C040000, // 0010 LDNIL R1
+ 0x90021201, // 0011 SETMBR R0 K9 R1
+ 0x4C040000, // 0012 LDNIL R1
+ 0x90021401, // 0013 SETMBR R0 K10 R1
+ 0x4C040000, // 0014 LDNIL R1
+ 0x90021601, // 0015 SETMBR R0 K11 R1
+ 0x4C040000, // 0016 LDNIL R1
+ 0x90021801, // 0017 SETMBR R0 K12 R1
+ 0x80000000, // 0018 RET 0
})
)
);
@@ -2702,12 +2295,12 @@ be_local_closure(Matter_Device_start_basic_commissioning, /* name */
/********************************************************************
-** Solidified function: msg_received
+** Solidified function: msg_send
********************************************************************/
-be_local_closure(Matter_Device_msg_received, /* name */
+be_local_closure(Matter_Device_msg_send, /* name */
be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
+ 5, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -2715,19 +2308,17 @@ be_local_closure(Matter_Device_msg_received, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(msg_received),
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(send_UDP),
}),
- be_str_weak(msg_received),
+ be_str_weak(msg_send),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x88100100, // 0000 GETMBR R4 R0 K0
- 0x8C100901, // 0001 GETMET R4 R4 K1
- 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
+ ( &(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
})
)
);
@@ -2735,9 +2326,9 @@ be_local_closure(Matter_Device_msg_received, /* name */
/********************************************************************
-** Solidified function: _start_udp
+** Solidified function: start_commissioning_complete_deferred
********************************************************************/
-be_local_closure(Matter_Device__start_udp, /* name */
+be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
@@ -2747,74 +2338,47 @@ be_local_closure(Matter_Device__start_udp, /* name */
1, /* has sup protos */
( &(const struct bproto*[ 1]) {
be_nested_proto(
- 8, /* nstack */
- 3, /* argc */
+ 3, /* nstack */
+ 0, /* argc */
0, /* varg */
1, /* has upvals */
- ( &(const bupvaldesc[ 1]) { /* upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
}),
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(msg_received),
+ /* K0 */ be_nested_str_weak(start_commissioning_complete),
}),
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
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
})
),
}),
1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(log),
- /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
- /* K4 */ be_const_int(2),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(UDPServer),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_nested_str_weak(start),
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
}),
- be_str_weak(_start_udp),
+ be_str_weak(start_commissioning_complete_deferred),
&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
- 0xB80A0200, // 0007 GETNGBL R2 K1
- 0x8C080502, // 0008 GETMET R2 R2 K2
- 0x60100008, // 0009 GETGBL R4 G8
- 0x5C140200, // 000A MOVE R5 R1
- 0x7C100200, // 000B CALL R4 1
- 0x00120604, // 000C ADD R4 K3 R4
- 0x58140004, // 000D LDCONST R5 K4
- 0x7C080600, // 000E CALL R2 3
- 0xB80A0A00, // 000F GETNGBL R2 K5
- 0x8C080506, // 0010 GETMET R2 R2 K6
- 0x58100007, // 0011 LDCONST R4 K7
- 0x5C140200, // 0012 MOVE R5 R1
- 0x7C080600, // 0013 CALL R2 3
- 0x90020002, // 0014 SETMBR R0 K0 R2
- 0x88080100, // 0015 GETMBR R2 R0 K0
- 0x8C080508, // 0016 GETMET R2 R2 K8
- 0x84100000, // 0017 CLOSURE R4 P0
- 0x7C080400, // 0018 CALL R2 2
- 0xA0000000, // 0019 CLOSE R0
- 0x80000000, // 001A RET 0
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
})
)
);
@@ -2822,140 +2386,11 @@ be_local_closure(Matter_Device__start_udp, /* name */
/********************************************************************
-** Solidified function: mdns_remove_op_discovery
+** Solidified function: is_root_commissioning_open
********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
+be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(copy),
- /* K4 */ be_nested_str_weak(reverse),
- /* K5 */ be_nested_str_weak(get_fabric_compressed),
- /* K6 */ be_nested_str_weak(tohex),
- /* K7 */ be_nested_str_weak(_X2D),
- /* K8 */ be_nested_str_weak(tasmota),
- /* K9 */ be_nested_str_weak(eth),
- /* K10 */ be_nested_str_weak(find),
- /* K11 */ be_nested_str_weak(up),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K15 */ be_const_int(2),
- /* K16 */ be_nested_str_weak(remove_service),
- /* K17 */ be_nested_str_weak(_matter),
- /* K18 */ be_nested_str_weak(_tcp),
- /* K19 */ be_nested_str_weak(hostname_eth),
- /* K20 */ be_nested_str_weak(wifi),
- /* K21 */ be_nested_str_weak(hostname_wifi),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K23 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(mdns_remove_op_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[81]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA802003B, // 0002 EXBLK 0 #003F
- 0x8C100302, // 0003 GETMET R4 R1 K2
- 0x7C100200, // 0004 CALL R4 1
- 0x8C100903, // 0005 GETMET R4 R4 K3
- 0x7C100200, // 0006 CALL R4 1
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140305, // 0009 GETMET R5 R1 K5
- 0x7C140200, // 000A CALL R5 1
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x7C180200, // 000C CALL R6 1
- 0x00180D07, // 000D ADD R6 R6 K7
- 0x8C1C0906, // 000E GETMET R7 R4 K6
- 0x7C1C0200, // 000F CALL R7 1
- 0x00180C07, // 0010 ADD R6 R6 R7
- 0xB81E1000, // 0011 GETNGBL R7 K8
- 0x8C1C0F09, // 0012 GETMET R7 R7 K9
- 0x7C1C0200, // 0013 CALL R7 1
- 0x8C1C0F0A, // 0014 GETMET R7 R7 K10
- 0x5824000B, // 0015 LDCONST R9 K11
- 0x7C1C0400, // 0016 CALL R7 2
- 0x781E000E, // 0017 JMPF R7 #0027
- 0xB81E1000, // 0018 GETNGBL R7 K8
- 0x8C1C0F0C, // 0019 GETMET R7 R7 K12
- 0x8C24070D, // 001A GETMET R9 R3 K13
- 0x582C000E, // 001B LDCONST R11 K14
- 0x58300009, // 001C LDCONST R12 K9
- 0x5C340C00, // 001D MOVE R13 R6
- 0x7C240800, // 001E CALL R9 4
- 0x5828000F, // 001F LDCONST R10 K15
- 0x7C1C0600, // 0020 CALL R7 3
- 0x8C1C0510, // 0021 GETMET R7 R2 K16
- 0x58240011, // 0022 LDCONST R9 K17
- 0x58280012, // 0023 LDCONST R10 K18
- 0x5C2C0C00, // 0024 MOVE R11 R6
- 0x88300113, // 0025 GETMBR R12 R0 K19
- 0x7C1C0A00, // 0026 CALL R7 5
- 0xB81E1000, // 0027 GETNGBL R7 K8
- 0x8C1C0F14, // 0028 GETMET R7 R7 K20
- 0x7C1C0200, // 0029 CALL R7 1
- 0x8C1C0F0A, // 002A GETMET R7 R7 K10
- 0x5824000B, // 002B LDCONST R9 K11
- 0x7C1C0400, // 002C CALL R7 2
- 0x781E000E, // 002D JMPF R7 #003D
- 0xB81E1000, // 002E GETNGBL R7 K8
- 0x8C1C0F0C, // 002F GETMET R7 R7 K12
- 0x8C24070D, // 0030 GETMET R9 R3 K13
- 0x582C000E, // 0031 LDCONST R11 K14
- 0x58300014, // 0032 LDCONST R12 K20
- 0x5C340C00, // 0033 MOVE R13 R6
- 0x7C240800, // 0034 CALL R9 4
- 0x5828000F, // 0035 LDCONST R10 K15
- 0x7C1C0600, // 0036 CALL R7 3
- 0x8C1C0510, // 0037 GETMET R7 R2 K16
- 0x58240011, // 0038 LDCONST R9 K17
- 0x58280012, // 0039 LDCONST R10 K18
- 0x5C2C0C00, // 003A MOVE R11 R6
- 0x88300115, // 003B GETMBR R12 R0 K21
- 0x7C1C0A00, // 003C CALL R7 5
- 0xA8040001, // 003D EXBLK 1 1
- 0x70020010, // 003E JMP #0050
- 0xAC100002, // 003F CATCH R4 0 2
- 0x7002000D, // 0040 JMP #004F
- 0xB81A1000, // 0041 GETNGBL R6 K8
- 0x8C180D0C, // 0042 GETMET R6 R6 K12
- 0x60200008, // 0043 GETGBL R8 G8
- 0x5C240800, // 0044 MOVE R9 R4
- 0x7C200200, // 0045 CALL R8 1
- 0x00222C08, // 0046 ADD R8 K22 R8
- 0x00201117, // 0047 ADD R8 R8 K23
- 0x60240008, // 0048 GETGBL R9 G8
- 0x5C280A00, // 0049 MOVE R10 R5
- 0x7C240200, // 004A CALL R9 1
- 0x00201009, // 004B ADD R8 R8 R9
- 0x5824000F, // 004C LDCONST R9 K15
- 0x7C180600, // 004D CALL R6 3
- 0x70020000, // 004E JMP #0050
- 0xB0080000, // 004F RAISE 2 R0 R0
- 0x80000000, // 0050 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: load_param
-********************************************************************/
-be_local_closure(Matter_Device_load_param, /* name */
- be_nested_proto(
- 12, /* nstack */
+ 3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -2963,126 +2398,24 @@ be_local_closure(Matter_Device_load_param, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[27]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(crypto),
- /* K2 */ be_nested_str_weak(FILENAME),
- /* K3 */ be_nested_str_weak(read),
- /* K4 */ be_nested_str_weak(close),
- /* K5 */ be_nested_str_weak(json),
- /* K6 */ be_nested_str_weak(load),
- /* K7 */ be_nested_str_weak(root_discriminator),
- /* K8 */ be_nested_str_weak(find),
- /* K9 */ be_nested_str_weak(distinguish),
- /* K10 */ be_nested_str_weak(root_passcode),
- /* K11 */ be_nested_str_weak(passcode),
- /* K12 */ be_nested_str_weak(ipv4only),
- /* K13 */ be_nested_str_weak(config),
- /* K14 */ be_nested_str_weak(_load_plugins_config),
- /* K15 */ be_nested_str_weak(plugins_persist),
- /* K16 */ be_nested_str_weak(io_error),
- /* K17 */ be_nested_str_weak(tasmota),
- /* K18 */ be_nested_str_weak(log),
- /* K19 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
- /* K20 */ be_nested_str_weak(_X7C),
- /* K21 */ be_const_int(2),
- /* K22 */ be_nested_str_weak(random),
- /* K23 */ be_nested_str_weak(get),
- /* K24 */ be_const_int(0),
- /* K25 */ be_nested_str_weak(PASSCODE_DEFAULT),
- /* K26 */ be_nested_str_weak(save_param),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(commissioning_admin_fabric),
}),
- be_str_weak(load_param),
+ be_str_weak(is_root_commissioning_open),
&be_const_str_solidified,
- ( &(const binstruction[88]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA8020026, // 0002 EXBLK 0 #002A
- 0x600C0011, // 0003 GETGBL R3 G17
- 0x88100102, // 0004 GETMBR R4 R0 K2
- 0x7C0C0200, // 0005 CALL R3 1
- 0x8C100703, // 0006 GETMET R4 R3 K3
- 0x7C100200, // 0007 CALL R4 1
- 0x8C140704, // 0008 GETMET R5 R3 K4
- 0x7C140200, // 0009 CALL R5 1
- 0xA4160A00, // 000A IMPORT R5 K5
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x5C200800, // 000C MOVE R8 R4
- 0x7C180400, // 000D CALL R6 2
- 0x8C1C0D08, // 000E GETMET R7 R6 K8
- 0x58240009, // 000F LDCONST R9 K9
- 0x88280107, // 0010 GETMBR R10 R0 K7
- 0x7C1C0600, // 0011 CALL R7 3
- 0x90020E07, // 0012 SETMBR R0 K7 R7
- 0x8C1C0D08, // 0013 GETMET R7 R6 K8
- 0x5824000B, // 0014 LDCONST R9 K11
- 0x8828010A, // 0015 GETMBR R10 R0 K10
- 0x7C1C0600, // 0016 CALL R7 3
- 0x90021407, // 0017 SETMBR R0 K10 R7
- 0x601C0017, // 0018 GETGBL R7 G23
- 0x8C200D08, // 0019 GETMET R8 R6 K8
- 0x5828000C, // 001A LDCONST R10 K12
- 0x502C0000, // 001B LDBOOL R11 0 0
- 0x7C200600, // 001C CALL R8 3
- 0x7C1C0200, // 001D CALL R7 1
- 0x90021807, // 001E SETMBR R0 K12 R7
- 0x8C1C0D08, // 001F GETMET R7 R6 K8
- 0x5824000D, // 0020 LDCONST R9 K13
- 0x7C1C0400, // 0021 CALL R7 2
- 0x781E0004, // 0022 JMPF R7 #0028
- 0x8C20010E, // 0023 GETMET R8 R0 K14
- 0x5C280E00, // 0024 MOVE R10 R7
- 0x7C200400, // 0025 CALL R8 2
- 0x50200200, // 0026 LDBOOL R8 1 0
- 0x90021E08, // 0027 SETMBR R0 K15 R8
- 0xA8040001, // 0028 EXBLK 1 1
- 0x70020012, // 0029 JMP #003D
- 0xAC0C0002, // 002A CATCH R3 0 2
- 0x7002000F, // 002B JMP #003C
- 0x20140710, // 002C NE R5 R3 K16
- 0x7816000C, // 002D JMPF R5 #003B
- 0xB8162200, // 002E GETNGBL R5 K17
- 0x8C140B12, // 002F GETMET R5 R5 K18
- 0x601C0008, // 0030 GETGBL R7 G8
- 0x5C200600, // 0031 MOVE R8 R3
- 0x7C1C0200, // 0032 CALL R7 1
- 0x001E2607, // 0033 ADD R7 K19 R7
- 0x001C0F14, // 0034 ADD R7 R7 K20
- 0x60200008, // 0035 GETGBL R8 G8
- 0x5C240800, // 0036 MOVE R9 R4
- 0x7C200200, // 0037 CALL R8 1
- 0x001C0E08, // 0038 ADD R7 R7 R8
- 0x58200015, // 0039 LDCONST R8 K21
- 0x7C140600, // 003A CALL R5 3
- 0x70020000, // 003B JMP #003D
- 0xB0080000, // 003C RAISE 2 R0 R0
- 0x500C0000, // 003D LDBOOL R3 0 0
- 0x88100107, // 003E GETMBR R4 R0 K7
- 0x4C140000, // 003F LDNIL R5
- 0x1C100805, // 0040 EQ R4 R4 R5
- 0x7812000A, // 0041 JMPF R4 #004D
- 0x8C100516, // 0042 GETMET R4 R2 K22
- 0x58180015, // 0043 LDCONST R6 K21
- 0x7C100400, // 0044 CALL R4 2
- 0x8C100917, // 0045 GETMET R4 R4 K23
- 0x58180018, // 0046 LDCONST R6 K24
- 0x581C0015, // 0047 LDCONST R7 K21
- 0x7C100600, // 0048 CALL R4 3
- 0x54160FFE, // 0049 LDINT R5 4095
- 0x2C100805, // 004A AND R4 R4 R5
- 0x90020E04, // 004B SETMBR R0 K7 R4
- 0x500C0200, // 004C LDBOOL R3 1 0
- 0x8810010A, // 004D GETMBR R4 R0 K10
- 0x4C140000, // 004E LDNIL R5
- 0x1C100805, // 004F EQ R4 R4 R5
- 0x78120002, // 0050 JMPF R4 #0054
- 0x88100119, // 0051 GETMBR R4 R0 K25
- 0x90021404, // 0052 SETMBR R0 K10 R4
- 0x500C0200, // 0053 LDBOOL R3 1 0
- 0x780E0001, // 0054 JMPF R3 #0057
- 0x8C10011A, // 0055 GETMET R4 R0 K26
- 0x7C100200, // 0056 CALL R4 1
- 0x80000000, // 0057 RET 0
+ ( &(const binstruction[11]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x78060003, // 0003 JMPF R1 #0008
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x4C080000, // 0005 LDNIL R2
+ 0x1C040202, // 0006 EQ R1 R1 R2
+ 0x74060000, // 0007 JMPT R1 #0009
+ 0x50040001, // 0008 LDBOOL R1 0 1
+ 0x50040200, // 0009 LDBOOL R1 1 0
+ 0x80040200, // 000A RET 1 R1
})
)
);
@@ -3273,6 +2606,78 @@ be_local_closure(Matter_Device__load_plugins_config, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: received_ack
+********************************************************************/
+be_local_closure(Matter_Device_received_ack, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(received_ack),
+ }),
+ be_str_weak(received_ack),
+ &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: MtrJoin
+********************************************************************/
+be_local_closure(Matter_Device_MtrJoin, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K1 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(resp_cmnd_done),
+ }),
+ be_str_weak(MtrJoin),
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x60140009, // 0000 GETGBL R5 G9
+ 0x5C180600, // 0001 MOVE R6 R3
+ 0x7C140200, // 0002 CALL R5 1
+ 0x78160002, // 0003 JMPF R5 #0007
+ 0x8C180100, // 0004 GETMET R6 R0 K0
+ 0x7C180200, // 0005 CALL R6 1
+ 0x70020001, // 0006 JMP #0009
+ 0x8C180101, // 0007 GETMET R6 R0 K1
+ 0x7C180200, // 0008 CALL R6 1
+ 0xB81A0400, // 0009 GETNGBL R6 K2
+ 0x8C180D03, // 000A GETMET R6 R6 K3
+ 0x7C180200, // 000B CALL R6 1
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: autoconf_device_map
********************************************************************/
@@ -3648,11 +3053,11 @@ be_local_closure(Matter_Device_remove_fabric, /* name */
/********************************************************************
-** Solidified function: every_second
+** Solidified function: _init_basic_commissioning
********************************************************************/
-be_local_closure(Matter_Device_every_second, /* name */
+be_local_closure(Matter_Device__init_basic_commissioning, /* name */
be_nested_proto(
- 4, /* nstack */
+ 3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -3660,50 +3065,23 @@ be_local_closure(Matter_Device_every_second, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
+ ( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(every_second),
- /* K2 */ be_nested_str_weak(message_handler),
- /* K3 */ be_nested_str_weak(commissioning_open),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(time_reached),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(plugins),
- /* K8 */ be_const_int(1),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
}),
- be_str_weak(every_second),
+ be_str_weak(_init_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
+ ( &(const binstruction[ 8]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
- 0x88040102, // 0003 GETMBR R1 R0 K2
- 0x8C040301, // 0004 GETMET R1 R1 K1
- 0x7C040200, // 0005 CALL R1 1
- 0x88040103, // 0006 GETMBR R1 R0 K3
- 0x4C080000, // 0007 LDNIL R2
- 0x20040202, // 0008 NE R1 R1 R2
- 0x78060006, // 0009 JMPF R1 #0011
- 0xB8060800, // 000A GETNGBL R1 K4
- 0x8C040305, // 000B GETMET R1 R1 K5
- 0x880C0103, // 000C GETMBR R3 R0 K3
- 0x7C040400, // 000D CALL R1 2
- 0x78060001, // 000E JMPF R1 #0011
- 0x4C040000, // 000F LDNIL R1
- 0x90020601, // 0010 SETMBR R0 K3 R1
- 0x58040006, // 0011 LDCONST R1 K6
- 0x6008000C, // 0012 GETGBL R2 G12
- 0x880C0107, // 0013 GETMBR R3 R0 K7
- 0x7C080200, // 0014 CALL R2 1
- 0x14080202, // 0015 LT R2 R1 R2
- 0x780A0005, // 0016 JMPF R2 #001D
- 0x88080107, // 0017 GETMBR R2 R0 K7
- 0x94080401, // 0018 GETIDX R2 R2 R1
- 0x8C080501, // 0019 GETMET R2 R2 K1
- 0x7C080200, // 001A CALL R2 1
- 0x00040308, // 001B ADD R1 R1 K8
- 0x7001FFF4, // 001C JMP #0012
- 0x80000000, // 001D RET 0
+ 0x1C040302, // 0003 EQ R1 R1 K2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x7C040200, // 0006 CALL R1 1
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -3711,57 +3089,563 @@ be_local_closure(Matter_Device_every_second, /* name */
/********************************************************************
-** Solidified function: get_active_endpoints
+** Solidified function: every_250ms
********************************************************************/
-be_local_closure(Matter_Device_get_active_endpoints, /* name */
+be_local_closure(Matter_Device_every_250ms, /* name */
be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
+ 3, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins),
- /* K1 */ be_nested_str_weak(get_endpoint),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(push),
- /* K5 */ be_nested_str_weak(stop_iteration),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(every_250ms),
}),
- be_str_weak(get_active_endpoints),
+ be_str_weak(every_250ms),
&be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0x60080012, // 0000 GETGBL R2 G18
- 0x7C080000, // 0001 CALL R2 0
- 0x600C0010, // 0002 GETGBL R3 G16
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0xA8020011, // 0005 EXBLK 0 #0018
- 0x5C100600, // 0006 MOVE R4 R3
- 0x7C100000, // 0007 CALL R4 0
- 0x8C140901, // 0008 GETMET R5 R4 K1
- 0x7C140200, // 0009 CALL R5 1
- 0x78060002, // 000A JMPF R1 #000E
- 0x1C180B02, // 000B EQ R6 R5 K2
- 0x781A0000, // 000C JMPF R6 #000E
- 0x7001FFF7, // 000D JMP #0006
- 0x8C180503, // 000E GETMET R6 R2 K3
- 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
- 0x8C180504, // 0014 GETMET R6 R2 K4
- 0x5C200A00, // 0015 MOVE R8 R5
- 0x7C180400, // 0016 CALL R6 2
- 0x7001FFED, // 0017 JMP #0006
- 0x580C0005, // 0018 LDCONST R3 K5
- 0xAC0C0200, // 0019 CATCH R3 1 0
- 0xB0080000, // 001A RAISE 2 R0 R0
- 0x80040400, // 001B RET 1 R2
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: process_attribute_expansion
+********************************************************************/
+be_local_closure(Matter_Device_process_attribute_expansion, /* name */
+ be_nested_proto(
+ 29, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(keys),
+ /* K1 */ be_nested_str_weak(push),
+ /* K2 */ be_nested_str_weak(stop_iteration),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_const_int(0),
+ }),
+ be_str_weak(keys_sorted),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0x60040012, // 0000 GETGBL R1 G18
+ 0x7C040000, // 0001 CALL R1 0
+ 0x60080010, // 0002 GETGBL R2 G16
+ 0x8C0C0100, // 0003 GETMET R3 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x7C080200, // 0005 CALL R2 1
+ 0xA8020005, // 0006 EXBLK 0 #000D
+ 0x5C0C0400, // 0007 MOVE R3 R2
+ 0x7C0C0000, // 0008 CALL R3 0
+ 0x8C100301, // 0009 GETMET R4 R1 K1
+ 0x5C180600, // 000A MOVE R6 R3
+ 0x7C100400, // 000B CALL R4 2
+ 0x7001FFF9, // 000C JMP #0007
+ 0x58080002, // 000D LDCONST R2 K2
+ 0xAC080200, // 000E CATCH R2 1 0
+ 0xB0080000, // 000F RAISE 2 R0 R0
+ 0x60080010, // 0010 GETGBL R2 G16
+ 0x600C000C, // 0011 GETGBL R3 G12
+ 0x5C100200, // 0012 MOVE R4 R1
+ 0x7C0C0200, // 0013 CALL R3 1
+ 0x040C0703, // 0014 SUB R3 R3 K3
+ 0x400E0603, // 0015 CONNECT R3 K3 R3
+ 0x7C080200, // 0016 CALL R2 1
+ 0xA8020010, // 0017 EXBLK 0 #0029
+ 0x5C0C0400, // 0018 MOVE R3 R2
+ 0x7C0C0000, // 0019 CALL R3 0
+ 0x94100203, // 001A GETIDX R4 R1 R3
+ 0x5C140600, // 001B MOVE R5 R3
+ 0x24180B04, // 001C GT R6 R5 K4
+ 0x781A0008, // 001D JMPF R6 #0027
+ 0x04180B03, // 001E SUB R6 R5 K3
+ 0x94180206, // 001F GETIDX R6 R1 R6
+ 0x24180C04, // 0020 GT R6 R6 R4
+ 0x781A0004, // 0021 JMPF R6 #0027
+ 0x04180B03, // 0022 SUB R6 R5 K3
+ 0x94180206, // 0023 GETIDX R6 R1 R6
+ 0x98040A06, // 0024 SETIDX R1 R5 R6
+ 0x04140B03, // 0025 SUB R5 R5 K3
+ 0x7001FFF4, // 0026 JMP #001C
+ 0x98040A04, // 0027 SETIDX R1 R5 R4
+ 0x7001FFEE, // 0028 JMP #0018
+ 0x58080002, // 0029 LDCONST R2 K2
+ 0xAC080200, // 002A CATCH R2 1 0
+ 0xB0080000, // 002B RAISE 2 R0 R0
+ 0x80040200, // 002C RET 1 R1
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(attribute),
+ /* K4 */ be_nested_str_weak(plugins),
+ /* K5 */ be_nested_str_weak(get_endpoint),
+ /* K6 */ be_nested_str_weak(contains),
+ /* K7 */ be_nested_str_weak(get_cluster_list),
+ /* K8 */ be_nested_str_weak(get_attribute_list),
+ /* K9 */ be_nested_str_weak(push),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
+ /* K15 */ be_const_int(3),
+ /* K16 */ be_nested_str_weak(status),
+ /* K17 */ be_nested_str_weak(matter),
+ /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
+ /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
+ /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
+ /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
+ }),
+ be_str_weak(process_attribute_expansion),
+ &be_const_str_solidified,
+ ( &(const binstruction[216]) { /* code */
+ 0x840C0000, // 0000 CLOSURE R3 P0
+ 0xA4120000, // 0001 IMPORT R4 K0
+ 0x88140301, // 0002 GETMBR R5 R1 K1
+ 0x50180000, // 0003 LDBOOL R6 0 0
+ 0x881C0302, // 0004 GETMBR R7 R1 K2
+ 0x50200000, // 0005 LDBOOL R8 0 0
+ 0x88240303, // 0006 GETMBR R9 R1 K3
+ 0x50280000, // 0007 LDBOOL R10 0 0
+ 0x882C0301, // 0008 GETMBR R11 R1 K1
+ 0x4C300000, // 0009 LDNIL R12
+ 0x202C160C, // 000A NE R11 R11 R12
+ 0x782E0007, // 000B JMPF R11 #0014
+ 0x882C0302, // 000C GETMBR R11 R1 K2
+ 0x4C300000, // 000D LDNIL R12
+ 0x202C160C, // 000E NE R11 R11 R12
+ 0x782E0003, // 000F JMPF R11 #0014
+ 0x882C0303, // 0010 GETMBR R11 R1 K3
+ 0x4C300000, // 0011 LDNIL R12
+ 0x202C160C, // 0012 NE R11 R11 R12
+ 0x742E0000, // 0013 JMPT R11 #0015
+ 0x502C0001, // 0014 LDBOOL R11 0 1
+ 0x502C0200, // 0015 LDBOOL R11 1 0
+ 0x60300013, // 0016 GETGBL R12 G19
+ 0x7C300000, // 0017 CALL R12 0
+ 0x60340010, // 0018 GETGBL R13 G16
+ 0x88380104, // 0019 GETMBR R14 R0 K4
+ 0x7C340200, // 001A CALL R13 1
+ 0xA8020055, // 001B EXBLK 0 #0072
+ 0x5C381A00, // 001C MOVE R14 R13
+ 0x7C380000, // 001D CALL R14 0
+ 0x8C3C1D05, // 001E GETMET R15 R14 K5
+ 0x7C3C0200, // 001F CALL R15 1
+ 0x4C400000, // 0020 LDNIL R16
+ 0x20400A10, // 0021 NE R16 R5 R16
+ 0x78420002, // 0022 JMPF R16 #0026
+ 0x20401E05, // 0023 NE R16 R15 R5
+ 0x78420000, // 0024 JMPF R16 #0026
+ 0x7001FFF5, // 0025 JMP #001C
+ 0x8C401906, // 0026 GETMET R16 R12 K6
+ 0x5C481E00, // 0027 MOVE R18 R15
+ 0x7C400400, // 0028 CALL R16 2
+ 0x74420002, // 0029 JMPT R16 #002D
+ 0x60400013, // 002A GETGBL R16 G19
+ 0x7C400000, // 002B CALL R16 0
+ 0x98301E10, // 002C SETIDX R12 R15 R16
+ 0x50180200, // 002D LDBOOL R6 1 0
+ 0x8C401D07, // 002E GETMET R16 R14 K7
+ 0x5C481E00, // 002F MOVE R18 R15
+ 0x7C400400, // 0030 CALL R16 2
+ 0x60440010, // 0031 GETGBL R17 G16
+ 0x5C482000, // 0032 MOVE R18 R16
+ 0x7C440200, // 0033 CALL R17 1
+ 0xA8020038, // 0034 EXBLK 0 #006E
+ 0x5C482200, // 0035 MOVE R18 R17
+ 0x7C480000, // 0036 CALL R18 0
+ 0x4C4C0000, // 0037 LDNIL R19
+ 0x204C0E13, // 0038 NE R19 R7 R19
+ 0x784E0002, // 0039 JMPF R19 #003D
+ 0x204C2407, // 003A NE R19 R18 R7
+ 0x784E0000, // 003B JMPF R19 #003D
+ 0x7001FFF7, // 003C JMP #0035
+ 0x944C180F, // 003D GETIDX R19 R12 R15
+ 0x8C4C2706, // 003E GETMET R19 R19 K6
+ 0x5C542400, // 003F MOVE R21 R18
+ 0x7C4C0400, // 0040 CALL R19 2
+ 0x744E0003, // 0041 JMPT R19 #0046
+ 0x944C180F, // 0042 GETIDX R19 R12 R15
+ 0x60500013, // 0043 GETGBL R20 G19
+ 0x7C500000, // 0044 CALL R20 0
+ 0x984C2414, // 0045 SETIDX R19 R18 R20
+ 0x50200200, // 0046 LDBOOL R8 1 0
+ 0x8C4C1D08, // 0047 GETMET R19 R14 K8
+ 0x5C541E00, // 0048 MOVE R21 R15
+ 0x5C582400, // 0049 MOVE R22 R18
+ 0x7C4C0600, // 004A CALL R19 3
+ 0x60500010, // 004B GETGBL R20 G16
+ 0x5C542600, // 004C MOVE R21 R19
+ 0x7C500200, // 004D CALL R20 1
+ 0xA802001A, // 004E EXBLK 0 #006A
+ 0x5C542800, // 004F MOVE R21 R20
+ 0x7C540000, // 0050 CALL R21 0
+ 0x4C580000, // 0051 LDNIL R22
+ 0x20581216, // 0052 NE R22 R9 R22
+ 0x785A0002, // 0053 JMPF R22 #0057
+ 0x20582A09, // 0054 NE R22 R21 R9
+ 0x785A0000, // 0055 JMPF R22 #0057
+ 0x7001FFF7, // 0056 JMP #004F
+ 0x9458180F, // 0057 GETIDX R22 R12 R15
+ 0x94582C12, // 0058 GETIDX R22 R22 R18
+ 0x8C582D06, // 0059 GETMET R22 R22 K6
+ 0x5C602A00, // 005A MOVE R24 R21
+ 0x7C580400, // 005B CALL R22 2
+ 0x745A0004, // 005C JMPT R22 #0062
+ 0x9458180F, // 005D GETIDX R22 R12 R15
+ 0x94582C12, // 005E GETIDX R22 R22 R18
+ 0x605C0012, // 005F GETGBL R23 G18
+ 0x7C5C0000, // 0060 CALL R23 0
+ 0x98582A17, // 0061 SETIDX R22 R21 R23
+ 0x50280200, // 0062 LDBOOL R10 1 0
+ 0x9458180F, // 0063 GETIDX R22 R12 R15
+ 0x94582C12, // 0064 GETIDX R22 R22 R18
+ 0x94582C15, // 0065 GETIDX R22 R22 R21
+ 0x8C582D09, // 0066 GETMET R22 R22 K9
+ 0x5C601C00, // 0067 MOVE R24 R14
+ 0x7C580400, // 0068 CALL R22 2
+ 0x7001FFE4, // 0069 JMP #004F
+ 0x5850000A, // 006A LDCONST R20 K10
+ 0xAC500200, // 006B CATCH R20 1 0
+ 0xB0080000, // 006C RAISE 2 R0 R0
+ 0x7001FFC6, // 006D JMP #0035
+ 0x5844000A, // 006E LDCONST R17 K10
+ 0xAC440200, // 006F CATCH R17 1 0
+ 0xB0080000, // 0070 RAISE 2 R0 R0
+ 0x7001FFA9, // 0071 JMP #001C
+ 0x5834000A, // 0072 LDCONST R13 K10
+ 0xAC340200, // 0073 CATCH R13 1 0
+ 0xB0080000, // 0074 RAISE 2 R0 R0
+ 0x60340010, // 0075 GETGBL R13 G16
+ 0x5C380600, // 0076 MOVE R14 R3
+ 0x5C3C1800, // 0077 MOVE R15 R12
+ 0x7C380200, // 0078 CALL R14 1
+ 0x7C340200, // 0079 CALL R13 1
+ 0xA802003D, // 007A EXBLK 0 #00B9
+ 0x5C381A00, // 007B MOVE R14 R13
+ 0x7C380000, // 007C CALL R14 0
+ 0x603C0010, // 007D GETGBL R15 G16
+ 0x5C400600, // 007E MOVE R16 R3
+ 0x9444180E, // 007F GETIDX R17 R12 R14
+ 0x7C400200, // 0080 CALL R16 1
+ 0x7C3C0200, // 0081 CALL R15 1
+ 0xA8020031, // 0082 EXBLK 0 #00B5
+ 0x5C401E00, // 0083 MOVE R16 R15
+ 0x7C400000, // 0084 CALL R16 0
+ 0x60440010, // 0085 GETGBL R17 G16
+ 0x5C480600, // 0086 MOVE R18 R3
+ 0x944C180E, // 0087 GETIDX R19 R12 R14
+ 0x944C2610, // 0088 GETIDX R19 R19 R16
+ 0x7C480200, // 0089 CALL R18 1
+ 0x7C440200, // 008A CALL R17 1
+ 0xA8020024, // 008B EXBLK 0 #00B1
+ 0x5C482200, // 008C MOVE R18 R17
+ 0x7C480000, // 008D CALL R18 0
+ 0x604C0010, // 008E GETGBL R19 G16
+ 0x9450180E, // 008F GETIDX R20 R12 R14
+ 0x94502810, // 0090 GETIDX R20 R20 R16
+ 0x94502812, // 0091 GETIDX R20 R20 R18
+ 0x7C4C0200, // 0092 CALL R19 1
+ 0xA8020018, // 0093 EXBLK 0 #00AD
+ 0x5C502600, // 0094 MOVE R20 R19
+ 0x7C500000, // 0095 CALL R20 0
+ 0xB8561600, // 0096 GETNGBL R21 K11
+ 0x8C542B0C, // 0097 GETMET R21 R21 K12
+ 0x8C5C090D, // 0098 GETMET R23 R4 K13
+ 0x5864000E, // 0099 LDCONST R25 K14
+ 0x5C681C00, // 009A MOVE R26 R14
+ 0x5C6C2000, // 009B MOVE R27 R16
+ 0x5C702400, // 009C MOVE R28 R18
+ 0x7C5C0A00, // 009D CALL R23 5
+ 0x5860000F, // 009E LDCONST R24 K15
+ 0x7C540600, // 009F CALL R21 3
+ 0x9006020E, // 00A0 SETMBR R1 K1 R14
+ 0x90060410, // 00A1 SETMBR R1 K2 R16
+ 0x90060612, // 00A2 SETMBR R1 K3 R18
+ 0x5C540400, // 00A3 MOVE R21 R2
+ 0x5C582800, // 00A4 MOVE R22 R20
+ 0x5C5C0200, // 00A5 MOVE R23 R1
+ 0x5C601600, // 00A6 MOVE R24 R11
+ 0x7C540600, // 00A7 CALL R21 3
+ 0x782E0002, // 00A8 JMPF R11 #00AC
+ 0x78560001, // 00A9 JMPF R21 #00AC
+ 0xA8040004, // 00AA EXBLK 1 4
+ 0x80002C00, // 00AB RET 0
+ 0x7001FFE6, // 00AC JMP #0094
+ 0x584C000A, // 00AD LDCONST R19 K10
+ 0xAC4C0200, // 00AE CATCH R19 1 0
+ 0xB0080000, // 00AF RAISE 2 R0 R0
+ 0x7001FFDA, // 00B0 JMP #008C
+ 0x5844000A, // 00B1 LDCONST R17 K10
+ 0xAC440200, // 00B2 CATCH R17 1 0
+ 0xB0080000, // 00B3 RAISE 2 R0 R0
+ 0x7001FFCD, // 00B4 JMP #0083
+ 0x583C000A, // 00B5 LDCONST R15 K10
+ 0xAC3C0200, // 00B6 CATCH R15 1 0
+ 0xB0080000, // 00B7 RAISE 2 R0 R0
+ 0x7001FFC1, // 00B8 JMP #007B
+ 0x5834000A, // 00B9 LDCONST R13 K10
+ 0xAC340200, // 00BA CATCH R13 1 0
+ 0xB0080000, // 00BB RAISE 2 R0 R0
+ 0x782E0019, // 00BC JMPF R11 #00D7
+ 0x5C340C00, // 00BD MOVE R13 R6
+ 0x74360003, // 00BE JMPT R13 #00C3
+ 0xB8362200, // 00BF GETNGBL R13 K17
+ 0x88341B12, // 00C0 GETMBR R13 R13 K18
+ 0x9006200D, // 00C1 SETMBR R1 K16 R13
+ 0x7002000E, // 00C2 JMP #00D2
+ 0x5C341000, // 00C3 MOVE R13 R8
+ 0x74360003, // 00C4 JMPT R13 #00C9
+ 0xB8362200, // 00C5 GETNGBL R13 K17
+ 0x88341B13, // 00C6 GETMBR R13 R13 K19
+ 0x9006200D, // 00C7 SETMBR R1 K16 R13
+ 0x70020008, // 00C8 JMP #00D2
+ 0x5C341400, // 00C9 MOVE R13 R10
+ 0x74360003, // 00CA JMPT R13 #00CF
+ 0xB8362200, // 00CB GETNGBL R13 K17
+ 0x88341B14, // 00CC GETMBR R13 R13 K20
+ 0x9006200D, // 00CD SETMBR R1 K16 R13
+ 0x70020002, // 00CE JMP #00D2
+ 0xB8362200, // 00CF GETNGBL R13 K17
+ 0x88341B15, // 00D0 GETMBR R13 R13 K21
+ 0x9006200D, // 00D1 SETMBR R1 K16 R13
+ 0x5C340400, // 00D2 MOVE R13 R2
+ 0x4C380000, // 00D3 LDNIL R14
+ 0x5C3C0200, // 00D4 MOVE R15 R1
+ 0x50400200, // 00D5 LDBOOL R16 1 0
+ 0x7C340600, // 00D6 CALL R13 3
+ 0x80000000, // 00D7 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_PASE
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(mdns_pase_eth),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K7 */ be_nested_str_weak(_matterc),
+ /* K8 */ be_nested_str_weak(_udp),
+ /* K9 */ be_nested_str_weak(commissioning_instance_eth),
+ /* K10 */ be_nested_str_weak(hostname_eth),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K13 */ be_nested_str_weak(eth),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(remove_service),
+ /* K16 */ be_nested_str_weak(mdns_pase_wifi),
+ /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
+ /* K18 */ be_nested_str_weak(hostname_wifi),
+ /* K19 */ be_nested_str_weak(wifi),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K21 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(mdns_remove_PASE),
+ &be_const_str_solidified,
+ ( &(const binstruction[83]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA802003D, // 0002 EXBLK 0 #0041
+ 0x880C0102, // 0003 GETMBR R3 R0 K2
+ 0x780E001B, // 0004 JMPF R3 #0021
+ 0xB80E0600, // 0005 GETNGBL R3 K3
+ 0x8C0C0704, // 0006 GETMET R3 R3 K4
+ 0x8C140505, // 0007 GETMET R5 R2 K5
+ 0x581C0006, // 0008 LDCONST R7 K6
+ 0x58200007, // 0009 LDCONST R8 K7
+ 0x58240008, // 000A LDCONST R9 K8
+ 0x88280109, // 000B GETMBR R10 R0 K9
+ 0x882C010A, // 000C GETMBR R11 R0 K10
+ 0x7C140C00, // 000D CALL R5 6
+ 0x5818000B, // 000E LDCONST R6 K11
+ 0x7C0C0600, // 000F CALL R3 3
+ 0xB80E0600, // 0010 GETNGBL R3 K3
+ 0x8C0C0704, // 0011 GETMET R3 R3 K4
+ 0x8C140505, // 0012 GETMET R5 R2 K5
+ 0x581C000C, // 0013 LDCONST R7 K12
+ 0x5820000D, // 0014 LDCONST R8 K13
+ 0x88240109, // 0015 GETMBR R9 R0 K9
+ 0x7C140800, // 0016 CALL R5 4
+ 0x5818000E, // 0017 LDCONST R6 K14
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x500C0000, // 0019 LDBOOL R3 0 0
+ 0x90020403, // 001A SETMBR R0 K2 R3
+ 0x8C0C030F, // 001B GETMET R3 R1 K15
+ 0x58140007, // 001C LDCONST R5 K7
+ 0x58180008, // 001D LDCONST R6 K8
+ 0x881C0109, // 001E GETMBR R7 R0 K9
+ 0x8820010A, // 001F GETMBR R8 R0 K10
+ 0x7C0C0A00, // 0020 CALL R3 5
+ 0x880C0110, // 0021 GETMBR R3 R0 K16
+ 0x780E001B, // 0022 JMPF R3 #003F
+ 0xB80E0600, // 0023 GETNGBL R3 K3
+ 0x8C0C0704, // 0024 GETMET R3 R3 K4
+ 0x8C140505, // 0025 GETMET R5 R2 K5
+ 0x581C0006, // 0026 LDCONST R7 K6
+ 0x58200007, // 0027 LDCONST R8 K7
+ 0x58240008, // 0028 LDCONST R9 K8
+ 0x88280111, // 0029 GETMBR R10 R0 K17
+ 0x882C0112, // 002A GETMBR R11 R0 K18
+ 0x7C140C00, // 002B CALL R5 6
+ 0x5818000B, // 002C LDCONST R6 K11
+ 0x7C0C0600, // 002D CALL R3 3
+ 0xB80E0600, // 002E GETNGBL R3 K3
+ 0x8C0C0704, // 002F GETMET R3 R3 K4
+ 0x8C140505, // 0030 GETMET R5 R2 K5
+ 0x581C000C, // 0031 LDCONST R7 K12
+ 0x58200013, // 0032 LDCONST R8 K19
+ 0x88240111, // 0033 GETMBR R9 R0 K17
+ 0x7C140800, // 0034 CALL R5 4
+ 0x5818000E, // 0035 LDCONST R6 K14
+ 0x7C0C0600, // 0036 CALL R3 3
+ 0x500C0000, // 0037 LDBOOL R3 0 0
+ 0x90022003, // 0038 SETMBR R0 K16 R3
+ 0x8C0C030F, // 0039 GETMET R3 R1 K15
+ 0x58140007, // 003A LDCONST R5 K7
+ 0x58180008, // 003B LDCONST R6 K8
+ 0x881C0111, // 003C GETMBR R7 R0 K17
+ 0x88200112, // 003D GETMBR R8 R0 K18
+ 0x7C0C0A00, // 003E CALL R3 5
+ 0xA8040001, // 003F EXBLK 1 1
+ 0x70020010, // 0040 JMP #0052
+ 0xAC0C0002, // 0041 CATCH R3 0 2
+ 0x7002000D, // 0042 JMP #0051
+ 0xB8160600, // 0043 GETNGBL R5 K3
+ 0x8C140B04, // 0044 GETMET R5 R5 K4
+ 0x601C0008, // 0045 GETGBL R7 G8
+ 0x5C200600, // 0046 MOVE R8 R3
+ 0x7C1C0200, // 0047 CALL R7 1
+ 0x001E2807, // 0048 ADD R7 K20 R7
+ 0x001C0F15, // 0049 ADD R7 R7 K21
+ 0x60200008, // 004A GETGBL R8 G8
+ 0x5C240800, // 004B MOVE R9 R4
+ 0x7C200200, // 004C CALL R8 1
+ 0x001C0E08, // 004D ADD R7 R7 R8
+ 0x5820000E, // 004E LDCONST R8 K14
+ 0x7C140600, // 004F CALL R5 3
+ 0x70020000, // 0050 JMP #0052
+ 0xB0080000, // 0051 RAISE 2 R0 R0
+ 0x80000000, // 0052 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _compute_pbkdf
+********************************************************************/
+be_local_closure(Matter_Device__compute_pbkdf, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(add),
+ /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
+ /* K4 */ be_nested_str_weak(derive),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(root_w0),
+ /* K7 */ be_nested_str_weak(EC_P256),
+ /* K8 */ be_nested_str_weak(mod),
+ /* K9 */ be_nested_str_weak(root_L),
+ /* K10 */ be_nested_str_weak(public_key),
+ }),
+ be_str_weak(_compute_pbkdf),
+ &be_const_str_solidified,
+ ( &(const binstruction[41]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xA4160200, // 0001 IMPORT R5 K1
+ 0x60180015, // 0002 GETGBL R6 G21
+ 0x7C180000, // 0003 CALL R6 0
+ 0x8C180D02, // 0004 GETMET R6 R6 K2
+ 0x5C200200, // 0005 MOVE R8 R1
+ 0x54260003, // 0006 LDINT R9 4
+ 0x7C180600, // 0007 CALL R6 3
+ 0x8C1C0903, // 0008 GETMET R7 R4 K3
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x8C1C0F04, // 000A GETMET R7 R7 K4
+ 0x5C240C00, // 000B MOVE R9 R6
+ 0x5C280600, // 000C MOVE R10 R3
+ 0x5C2C0400, // 000D MOVE R11 R2
+ 0x5432004F, // 000E LDINT R12 80
+ 0x7C1C0A00, // 000F CALL R7 5
+ 0x54220026, // 0010 LDINT R8 39
+ 0x40220A08, // 0011 CONNECT R8 K5 R8
+ 0x94200E08, // 0012 GETIDX R8 R7 R8
+ 0x54260027, // 0013 LDINT R9 40
+ 0x542A004E, // 0014 LDINT R10 79
+ 0x4024120A, // 0015 CONNECT R9 R9 R10
+ 0x94240E09, // 0016 GETIDX R9 R7 R9
+ 0x8C280907, // 0017 GETMET R10 R4 K7
+ 0x7C280200, // 0018 CALL R10 1
+ 0x8C281508, // 0019 GETMET R10 R10 K8
+ 0x5C301000, // 001A MOVE R12 R8
+ 0x7C280400, // 001B CALL R10 2
+ 0x90020C0A, // 001C SETMBR R0 K6 R10
+ 0x8C280907, // 001D GETMET R10 R4 K7
+ 0x7C280200, // 001E CALL R10 1
+ 0x8C281508, // 001F GETMET R10 R10 K8
+ 0x5C301200, // 0020 MOVE R12 R9
+ 0x7C280400, // 0021 CALL R10 2
+ 0x8C2C0907, // 0022 GETMET R11 R4 K7
+ 0x7C2C0200, // 0023 CALL R11 1
+ 0x8C2C170A, // 0024 GETMET R11 R11 K10
+ 0x5C341400, // 0025 MOVE R13 R10
+ 0x7C2C0400, // 0026 CALL R11 2
+ 0x9002120B, // 0027 SETMBR R0 K9 R11
+ 0x80000000, // 0028 RET 0
})
)
);
@@ -3825,20 +3709,20 @@ be_local_closure(Matter_Device_invoke_request, /* name */
/********************************************************************
-** Solidified function: start
+** Solidified function: _start_udp
********************************************************************/
-be_local_closure(Matter_Device_start, /* name */
+be_local_closure(Matter_Device__start_udp, /* name */
be_nested_proto(
6, /* nstack */
- 1, /* argc */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
1, /* has sup protos */
( &(const struct bproto*[ 1]) {
be_nested_proto(
- 2, /* nstack */
- 0, /* argc */
+ 8, /* nstack */
+ 3, /* argc */
0, /* varg */
1, /* has upvals */
( &(const bupvaldesc[ 1]) { /* upvals */
@@ -3848,113 +3732,63 @@ be_local_closure(Matter_Device_start, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(_trigger_read_sensors),
+ /* K0 */ be_nested_str_weak(msg_received),
}),
- be_str_weak(_anonymous_),
+ be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80000000, // 0003 RET 0
+ ( &(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 */
( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(started),
- /* K1 */ be_nested_str_weak(autoconf_device),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(add_cron),
- /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
- /* K5 */ be_nested_str_weak(matter_sensors_30s),
- /* K6 */ be_nested_str_weak(_start_udp),
- /* K7 */ be_nested_str_weak(UDP_PORT),
- /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames),
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(log),
+ /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
+ /* K4 */ be_const_int(2),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(UDPServer),
+ /* K7 */ be_nested_str_weak(),
+ /* K8 */ be_nested_str_weak(start),
}),
- be_str_weak(start),
+ be_str_weak(_start_udp),
&be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x78060000, // 0001 JMPF R1 #0003
- 0x80000200, // 0002 RET 0
- 0x8C040101, // 0003 GETMET R1 R0 K1
- 0x7C040200, // 0004 CALL R1 1
- 0xB8060400, // 0005 GETNGBL R1 K2
- 0x8C040303, // 0006 GETMET R1 R1 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x84100000, // 0008 CLOSURE R4 P0
- 0x58140005, // 0009 LDCONST R5 K5
- 0x7C040800, // 000A CALL R1 4
- 0x8C040106, // 000B GETMET R1 R0 K6
- 0x880C0107, // 000C GETMBR R3 R0 K7
- 0x7C040400, // 000D CALL R1 2
- 0x8C040108, // 000E GETMET R1 R0 K8
- 0x7C040200, // 000F CALL R1 1
- 0x50040200, // 0010 LDBOOL R1 1 0
- 0x90020001, // 0011 SETMBR R0 K0 R1
- 0xA0000000, // 0012 CLOSE R0
- 0x80000000, // 0013 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: plugins_to_json
-********************************************************************/
-be_local_closure(Matter_Device_plugins_to_json, /* name */
- be_nested_proto(
- 11, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(_X7B),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(plugins),
- /* K4 */ be_nested_str_weak(_X2C),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(_X22_X25i_X22_X3A_X25s),
- /* K7 */ be_nested_str_weak(get_endpoint),
- /* K8 */ be_nested_str_weak(to_json),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(_X7D),
- }),
- be_str_weak(plugins_to_json),
- &be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x58080001, // 0001 LDCONST R2 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x6010000C, // 0003 GETGBL R4 G12
- 0x88140103, // 0004 GETMBR R5 R0 K3
- 0x7C100200, // 0005 CALL R4 1
- 0x14100604, // 0006 LT R4 R3 R4
- 0x7812000E, // 0007 JMPF R4 #0017
- 0x88100103, // 0008 GETMBR R4 R0 K3
- 0x94100803, // 0009 GETIDX R4 R4 R3
- 0x24140702, // 000A GT R5 R3 K2
- 0x78160000, // 000B JMPF R5 #000D
- 0x00080504, // 000C ADD R2 R2 K4
- 0x8C140305, // 000D GETMET R5 R1 K5
- 0x581C0006, // 000E LDCONST R7 K6
- 0x8C200907, // 000F GETMET R8 R4 K7
- 0x7C200200, // 0010 CALL R8 1
- 0x8C240908, // 0011 GETMET R9 R4 K8
- 0x7C240200, // 0012 CALL R9 1
- 0x7C140800, // 0013 CALL R5 4
- 0x00080405, // 0014 ADD R2 R2 R5
- 0x000C0709, // 0015 ADD R3 R3 K9
- 0x7001FFEB, // 0016 JMP #0003
- 0x0008050A, // 0017 ADD R2 R2 K10
- 0x80040400, // 0018 RET 1 R2
+ ( &(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
+ 0xB80A0200, // 0007 GETNGBL R2 K1
+ 0x8C080502, // 0008 GETMET R2 R2 K2
+ 0x60100008, // 0009 GETGBL R4 G8
+ 0x5C140200, // 000A MOVE R5 R1
+ 0x7C100200, // 000B CALL R4 1
+ 0x00120604, // 000C ADD R4 K3 R4
+ 0x58140004, // 000D LDCONST R5 K4
+ 0x7C080600, // 000E CALL R2 3
+ 0xB80A0A00, // 000F GETNGBL R2 K5
+ 0x8C080506, // 0010 GETMET R2 R2 K6
+ 0x58100007, // 0011 LDCONST R4 K7
+ 0x5C140200, // 0012 MOVE R5 R1
+ 0x7C080600, // 0013 CALL R2 3
+ 0x90020002, // 0014 SETMBR R0 K0 R2
+ 0x88080100, // 0015 GETMBR R2 R0 K0
+ 0x8C080508, // 0016 GETMET R2 R2 K8
+ 0x84100000, // 0017 CLOSURE R4 P0
+ 0x7C080400, // 0018 CALL R2 2
+ 0xA0000000, // 0019 CLOSE R0
+ 0x80000000, // 001A RET 0
})
)
);
@@ -4297,112 +4131,49 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */
/********************************************************************
-** Solidified function: register_native_classes
+** Solidified function: start_operational_discovery
********************************************************************/
-be_local_closure(Matter_Device_register_native_classes, /* name */
+be_local_closure(Matter_Device_start_operational_discovery, /* name */
be_nested_proto(
9, /* nstack */
- 3, /* argc */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(register_plugin_class),
- /* K1 */ be_nested_str_weak(root),
- /* K2 */ be_nested_str_weak(matter),
- /* K3 */ be_nested_str_weak(Plugin_Root),
- /* K4 */ be_nested_str_weak(light0),
- /* K5 */ be_nested_str_weak(Plugin_Light0),
- /* K6 */ be_nested_str_weak(light1),
- /* K7 */ be_nested_str_weak(Plugin_Light1),
- /* K8 */ be_nested_str_weak(light2),
- /* K9 */ be_nested_str_weak(Plugin_Light2),
- /* K10 */ be_nested_str_weak(light3),
- /* K11 */ be_nested_str_weak(Plugin_Light3),
- /* K12 */ be_nested_str_weak(relay),
- /* K13 */ be_nested_str_weak(Plugin_OnOff),
- /* K14 */ be_nested_str_weak(temperature),
- /* K15 */ be_nested_str_weak(Plugin_Sensor_Temp),
- /* K16 */ be_nested_str_weak(humidity),
- /* K17 */ be_nested_str_weak(Plugin_Sensor_Humidity),
- /* K18 */ be_nested_str_weak(illuminance),
- /* K19 */ be_nested_str_weak(Plugin_Sensor_Illuminance),
- /* K20 */ be_nested_str_weak(pressure),
- /* K21 */ be_nested_str_weak(Plugin_Sensor_Pressure),
- /* K22 */ be_nested_str_weak(tasmota),
- /* K23 */ be_nested_str_weak(log),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20),
- /* K25 */ be_nested_str_weak(k2l),
- /* K26 */ be_nested_str_weak(plugins_classes),
- /* K27 */ be_const_int(3),
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(mdns),
+ /* K2 */ be_nested_str_weak(string),
+ /* K3 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K4 */ be_nested_str_weak(root_w0),
+ /* K5 */ be_nested_str_weak(root_L),
+ /* K6 */ be_nested_str_weak(set_expire_in_seconds),
+ /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K8 */ be_nested_str_weak(get_fabric),
}),
- be_str_weak(register_native_classes),
+ be_str_weak(start_operational_discovery),
&be_const_str_solidified,
- ( &(const binstruction[61]) { /* code */
- 0x8C0C0100, // 0000 GETMET R3 R0 K0
- 0x58140001, // 0001 LDCONST R5 K1
- 0xB81A0400, // 0002 GETNGBL R6 K2
- 0x88180D03, // 0003 GETMBR R6 R6 K3
- 0x7C0C0600, // 0004 CALL R3 3
- 0x8C0C0100, // 0005 GETMET R3 R0 K0
- 0x58140004, // 0006 LDCONST R5 K4
- 0xB81A0400, // 0007 GETNGBL R6 K2
- 0x88180D05, // 0008 GETMBR R6 R6 K5
- 0x7C0C0600, // 0009 CALL R3 3
- 0x8C0C0100, // 000A GETMET R3 R0 K0
- 0x58140006, // 000B LDCONST R5 K6
- 0xB81A0400, // 000C GETNGBL R6 K2
- 0x88180D07, // 000D GETMBR R6 R6 K7
- 0x7C0C0600, // 000E CALL R3 3
- 0x8C0C0100, // 000F GETMET R3 R0 K0
- 0x58140008, // 0010 LDCONST R5 K8
- 0xB81A0400, // 0011 GETNGBL R6 K2
- 0x88180D09, // 0012 GETMBR R6 R6 K9
- 0x7C0C0600, // 0013 CALL R3 3
- 0x8C0C0100, // 0014 GETMET R3 R0 K0
- 0x5814000A, // 0015 LDCONST R5 K10
- 0xB81A0400, // 0016 GETNGBL R6 K2
- 0x88180D0B, // 0017 GETMBR R6 R6 K11
- 0x7C0C0600, // 0018 CALL R3 3
- 0x8C0C0100, // 0019 GETMET R3 R0 K0
- 0x5814000C, // 001A LDCONST R5 K12
- 0xB81A0400, // 001B GETNGBL R6 K2
- 0x88180D0D, // 001C GETMBR R6 R6 K13
- 0x7C0C0600, // 001D CALL R3 3
- 0x8C0C0100, // 001E GETMET R3 R0 K0
- 0x5814000E, // 001F LDCONST R5 K14
- 0xB81A0400, // 0020 GETNGBL R6 K2
- 0x88180D0F, // 0021 GETMBR R6 R6 K15
- 0x7C0C0600, // 0022 CALL R3 3
- 0x8C0C0100, // 0023 GETMET R3 R0 K0
- 0x58140010, // 0024 LDCONST R5 K16
- 0xB81A0400, // 0025 GETNGBL R6 K2
- 0x88180D11, // 0026 GETMBR R6 R6 K17
- 0x7C0C0600, // 0027 CALL R3 3
- 0x8C0C0100, // 0028 GETMET R3 R0 K0
- 0x58140012, // 0029 LDCONST R5 K18
- 0xB81A0400, // 002A GETNGBL R6 K2
- 0x88180D13, // 002B GETMBR R6 R6 K19
- 0x7C0C0600, // 002C CALL R3 3
- 0x8C0C0100, // 002D GETMET R3 R0 K0
- 0x58140014, // 002E LDCONST R5 K20
- 0xB81A0400, // 002F GETNGBL R6 K2
- 0x88180D15, // 0030 GETMBR R6 R6 K21
- 0x7C0C0600, // 0031 CALL R3 3
- 0xB80E2C00, // 0032 GETNGBL R3 K22
- 0x8C0C0717, // 0033 GETMET R3 R3 K23
- 0x60140008, // 0034 GETGBL R5 G8
- 0x8C180119, // 0035 GETMET R6 R0 K25
- 0x8820011A, // 0036 GETMBR R8 R0 K26
- 0x7C180400, // 0037 CALL R6 2
- 0x7C140200, // 0038 CALL R5 1
- 0x00163005, // 0039 ADD R5 K24 R5
- 0x5818001B, // 003A LDCONST R6 K27
- 0x7C0C0600, // 003B CALL R3 3
- 0x80000000, // 003C RET 0
+ ( &(const binstruction[17]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA4120400, // 0002 IMPORT R4 K2
+ 0x8C140103, // 0003 GETMET R5 R0 K3
+ 0x7C140200, // 0004 CALL R5 1
+ 0x4C140000, // 0005 LDNIL R5
+ 0x90020805, // 0006 SETMBR R0 K4 R5
+ 0x4C140000, // 0007 LDNIL R5
+ 0x90020A05, // 0008 SETMBR R0 K5 R5
+ 0x8C140306, // 0009 GETMET R5 R1 K6
+ 0x541E003B, // 000A LDINT R7 60
+ 0x7C140400, // 000B CALL R5 2
+ 0x8C140107, // 000C GETMET R5 R0 K7
+ 0x8C1C0308, // 000D GETMET R7 R1 K8
+ 0x7C1C0200, // 000E CALL R7 1
+ 0x7C140400, // 000F CALL R5 2
+ 0x80000000, // 0010 RET 0
})
)
);
@@ -4410,9 +4181,119 @@ be_local_closure(Matter_Device_register_native_classes, /* name */
/********************************************************************
-** Solidified function: event_fabrics_saved
+** Solidified function: get_active_endpoints
********************************************************************/
-be_local_closure(Matter_Device_event_fabrics_saved, /* name */
+be_local_closure(Matter_Device_get_active_endpoints, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins),
+ /* K1 */ be_nested_str_weak(get_endpoint),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(push),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ 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
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0xA8020011, // 0005 EXBLK 0 #0018
+ 0x5C100600, // 0006 MOVE R4 R3
+ 0x7C100000, // 0007 CALL R4 0
+ 0x8C140901, // 0008 GETMET R5 R4 K1
+ 0x7C140200, // 0009 CALL R5 1
+ 0x78060002, // 000A JMPF R1 #000E
+ 0x1C180B02, // 000B EQ R6 R5 K2
+ 0x781A0000, // 000C JMPF R6 #000E
+ 0x7001FFF7, // 000D JMP #0006
+ 0x8C180503, // 000E GETMET R6 R2 K3
+ 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
+ 0x8C180504, // 0014 GETMET R6 R2 K4
+ 0x5C200A00, // 0015 MOVE R8 R5
+ 0x7C180400, // 0016 CALL R6 2
+ 0x7001FFED, // 0017 JMP #0006
+ 0x580C0005, // 0018 LDCONST R3 K5
+ 0xAC0C0200, // 0019 CATCH R3 1 0
+ 0xB0080000, // 001A RAISE 2 R0 R0
+ 0x80040400, // 001B RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_announce_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: save_before_restart
+********************************************************************/
+be_local_closure(Matter_Device_save_before_restart, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -4422,28 +4303,88 @@ be_local_closure(Matter_Device_event_fabrics_saved, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(plugins_persist),
- /* K4 */ be_nested_str_weak(save_param),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
}),
- be_str_weak(event_fabrics_saved),
+ be_str_weak(save_before_restart),
&be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x24040302, // 0003 GT R1 R1 K2
- 0x78060005, // 0004 JMPF R1 #000B
- 0x88040103, // 0005 GETMBR R1 R0 K3
- 0x74060003, // 0006 JMPT R1 #000B
- 0x50040200, // 0007 LDBOOL R1 1 0
- 0x90020601, // 0008 SETMBR R0 K3 R1
- 0x8C040104, // 0009 GETMET R1 R0 K4
- 0x7C040200, // 000A CALL R1 1
- 0x80000000, // 000B RET 0
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x8C040101, // 0002 GETMET R1 R0 K1
+ 0x7C040200, // 0003 CALL R1 1
+ 0x80000000, // 0004 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_plugin_class_arg
+********************************************************************/
+be_local_closure(Matter_Device_get_plugin_class_arg, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins_classes),
+ /* K1 */ be_nested_str_weak(find),
+ /* K2 */ be_nested_str_weak(ARG),
+ /* K3 */ be_nested_str_weak(),
+ }),
+ be_str_weak(get_plugin_class_arg),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 9]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x5C100200, // 0002 MOVE R4 R1
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0001, // 0004 JMPF R2 #0007
+ 0x880C0502, // 0005 GETMBR R3 R2 K2
+ 0x70020000, // 0006 JMP #0008
+ 0x580C0003, // 0007 LDCONST R3 K3
+ 0x80040600, // 0008 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_received
+********************************************************************/
+be_local_closure(Matter_Device_msg_received, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(msg_received),
+ }),
+ be_str_weak(msg_received),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 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
})
)
);
@@ -4533,128 +4474,128 @@ be_local_closure(Matter_Device_k2l_num, /* name */
/********************************************************************
-** Solidified function: mdns_remove_PASE
+** Solidified function: mdns_remove_op_discovery
********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
+ 14, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
+ ( &(const bvalue[24]) { /* constants */
/* K0 */ be_nested_str_weak(mdns),
/* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(mdns_pase_eth),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K7 */ be_nested_str_weak(_matterc),
- /* K8 */ be_nested_str_weak(_udp),
- /* K9 */ be_nested_str_weak(commissioning_instance_eth),
- /* K10 */ be_nested_str_weak(hostname_eth),
- /* K11 */ be_const_int(3),
- /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K13 */ be_nested_str_weak(eth),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(remove_service),
- /* K16 */ be_nested_str_weak(mdns_pase_wifi),
- /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
- /* K18 */ be_nested_str_weak(hostname_wifi),
- /* K19 */ be_nested_str_weak(wifi),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K21 */ be_nested_str_weak(_X7C),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(copy),
+ /* K4 */ be_nested_str_weak(reverse),
+ /* K5 */ be_nested_str_weak(get_fabric_compressed),
+ /* K6 */ be_nested_str_weak(tohex),
+ /* K7 */ be_nested_str_weak(_X2D),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(eth),
+ /* K10 */ be_nested_str_weak(find),
+ /* K11 */ be_nested_str_weak(up),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K15 */ be_const_int(2),
+ /* K16 */ be_nested_str_weak(remove_service),
+ /* K17 */ be_nested_str_weak(_matter),
+ /* K18 */ be_nested_str_weak(_tcp),
+ /* K19 */ be_nested_str_weak(hostname_eth),
+ /* K20 */ be_nested_str_weak(wifi),
+ /* K21 */ be_nested_str_weak(hostname_wifi),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K23 */ be_nested_str_weak(_X7C),
}),
- be_str_weak(mdns_remove_PASE),
+ be_str_weak(mdns_remove_op_discovery),
&be_const_str_solidified,
- ( &(const binstruction[83]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802003D, // 0002 EXBLK 0 #0041
- 0x880C0102, // 0003 GETMBR R3 R0 K2
- 0x780E001B, // 0004 JMPF R3 #0021
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x8C140505, // 0007 GETMET R5 R2 K5
- 0x581C0006, // 0008 LDCONST R7 K6
- 0x58200007, // 0009 LDCONST R8 K7
- 0x58240008, // 000A LDCONST R9 K8
- 0x88280109, // 000B GETMBR R10 R0 K9
- 0x882C010A, // 000C GETMBR R11 R0 K10
- 0x7C140C00, // 000D CALL R5 6
- 0x5818000B, // 000E LDCONST R6 K11
- 0x7C0C0600, // 000F CALL R3 3
- 0xB80E0600, // 0010 GETNGBL R3 K3
- 0x8C0C0704, // 0011 GETMET R3 R3 K4
- 0x8C140505, // 0012 GETMET R5 R2 K5
- 0x581C000C, // 0013 LDCONST R7 K12
- 0x5820000D, // 0014 LDCONST R8 K13
- 0x88240109, // 0015 GETMBR R9 R0 K9
- 0x7C140800, // 0016 CALL R5 4
- 0x5818000E, // 0017 LDCONST R6 K14
- 0x7C0C0600, // 0018 CALL R3 3
- 0x500C0000, // 0019 LDBOOL R3 0 0
- 0x90020403, // 001A SETMBR R0 K2 R3
- 0x8C0C030F, // 001B GETMET R3 R1 K15
- 0x58140007, // 001C LDCONST R5 K7
- 0x58180008, // 001D LDCONST R6 K8
- 0x881C0109, // 001E GETMBR R7 R0 K9
- 0x8820010A, // 001F GETMBR R8 R0 K10
- 0x7C0C0A00, // 0020 CALL R3 5
- 0x880C0110, // 0021 GETMBR R3 R0 K16
- 0x780E001B, // 0022 JMPF R3 #003F
- 0xB80E0600, // 0023 GETNGBL R3 K3
- 0x8C0C0704, // 0024 GETMET R3 R3 K4
- 0x8C140505, // 0025 GETMET R5 R2 K5
- 0x581C0006, // 0026 LDCONST R7 K6
- 0x58200007, // 0027 LDCONST R8 K7
- 0x58240008, // 0028 LDCONST R9 K8
- 0x88280111, // 0029 GETMBR R10 R0 K17
- 0x882C0112, // 002A GETMBR R11 R0 K18
- 0x7C140C00, // 002B CALL R5 6
- 0x5818000B, // 002C LDCONST R6 K11
- 0x7C0C0600, // 002D CALL R3 3
- 0xB80E0600, // 002E GETNGBL R3 K3
- 0x8C0C0704, // 002F GETMET R3 R3 K4
- 0x8C140505, // 0030 GETMET R5 R2 K5
- 0x581C000C, // 0031 LDCONST R7 K12
- 0x58200013, // 0032 LDCONST R8 K19
- 0x88240111, // 0033 GETMBR R9 R0 K17
- 0x7C140800, // 0034 CALL R5 4
- 0x5818000E, // 0035 LDCONST R6 K14
- 0x7C0C0600, // 0036 CALL R3 3
- 0x500C0000, // 0037 LDBOOL R3 0 0
- 0x90022003, // 0038 SETMBR R0 K16 R3
- 0x8C0C030F, // 0039 GETMET R3 R1 K15
- 0x58140007, // 003A LDCONST R5 K7
- 0x58180008, // 003B LDCONST R6 K8
- 0x881C0111, // 003C GETMBR R7 R0 K17
- 0x88200112, // 003D GETMBR R8 R0 K18
- 0x7C0C0A00, // 003E CALL R3 5
- 0xA8040001, // 003F EXBLK 1 1
- 0x70020010, // 0040 JMP #0052
- 0xAC0C0002, // 0041 CATCH R3 0 2
- 0x7002000D, // 0042 JMP #0051
- 0xB8160600, // 0043 GETNGBL R5 K3
- 0x8C140B04, // 0044 GETMET R5 R5 K4
- 0x601C0008, // 0045 GETGBL R7 G8
- 0x5C200600, // 0046 MOVE R8 R3
- 0x7C1C0200, // 0047 CALL R7 1
- 0x001E2807, // 0048 ADD R7 K20 R7
- 0x001C0F15, // 0049 ADD R7 R7 K21
- 0x60200008, // 004A GETGBL R8 G8
- 0x5C240800, // 004B MOVE R9 R4
- 0x7C200200, // 004C CALL R8 1
- 0x001C0E08, // 004D ADD R7 R7 R8
- 0x5820000E, // 004E LDCONST R8 K14
- 0x7C140600, // 004F CALL R5 3
- 0x70020000, // 0050 JMP #0052
- 0xB0080000, // 0051 RAISE 2 R0 R0
- 0x80000000, // 0052 RET 0
+ ( &(const binstruction[81]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA802003B, // 0002 EXBLK 0 #003F
+ 0x8C100302, // 0003 GETMET R4 R1 K2
+ 0x7C100200, // 0004 CALL R4 1
+ 0x8C100903, // 0005 GETMET R4 R4 K3
+ 0x7C100200, // 0006 CALL R4 1
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140305, // 0009 GETMET R5 R1 K5
+ 0x7C140200, // 000A CALL R5 1
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x7C180200, // 000C CALL R6 1
+ 0x00180D07, // 000D ADD R6 R6 K7
+ 0x8C1C0906, // 000E GETMET R7 R4 K6
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x00180C07, // 0010 ADD R6 R6 R7
+ 0xB81E1000, // 0011 GETNGBL R7 K8
+ 0x8C1C0F09, // 0012 GETMET R7 R7 K9
+ 0x7C1C0200, // 0013 CALL R7 1
+ 0x8C1C0F0A, // 0014 GETMET R7 R7 K10
+ 0x5824000B, // 0015 LDCONST R9 K11
+ 0x7C1C0400, // 0016 CALL R7 2
+ 0x781E000E, // 0017 JMPF R7 #0027
+ 0xB81E1000, // 0018 GETNGBL R7 K8
+ 0x8C1C0F0C, // 0019 GETMET R7 R7 K12
+ 0x8C24070D, // 001A GETMET R9 R3 K13
+ 0x582C000E, // 001B LDCONST R11 K14
+ 0x58300009, // 001C LDCONST R12 K9
+ 0x5C340C00, // 001D MOVE R13 R6
+ 0x7C240800, // 001E CALL R9 4
+ 0x5828000F, // 001F LDCONST R10 K15
+ 0x7C1C0600, // 0020 CALL R7 3
+ 0x8C1C0510, // 0021 GETMET R7 R2 K16
+ 0x58240011, // 0022 LDCONST R9 K17
+ 0x58280012, // 0023 LDCONST R10 K18
+ 0x5C2C0C00, // 0024 MOVE R11 R6
+ 0x88300113, // 0025 GETMBR R12 R0 K19
+ 0x7C1C0A00, // 0026 CALL R7 5
+ 0xB81E1000, // 0027 GETNGBL R7 K8
+ 0x8C1C0F14, // 0028 GETMET R7 R7 K20
+ 0x7C1C0200, // 0029 CALL R7 1
+ 0x8C1C0F0A, // 002A GETMET R7 R7 K10
+ 0x5824000B, // 002B LDCONST R9 K11
+ 0x7C1C0400, // 002C CALL R7 2
+ 0x781E000E, // 002D JMPF R7 #003D
+ 0xB81E1000, // 002E GETNGBL R7 K8
+ 0x8C1C0F0C, // 002F GETMET R7 R7 K12
+ 0x8C24070D, // 0030 GETMET R9 R3 K13
+ 0x582C000E, // 0031 LDCONST R11 K14
+ 0x58300014, // 0032 LDCONST R12 K20
+ 0x5C340C00, // 0033 MOVE R13 R6
+ 0x7C240800, // 0034 CALL R9 4
+ 0x5828000F, // 0035 LDCONST R10 K15
+ 0x7C1C0600, // 0036 CALL R7 3
+ 0x8C1C0510, // 0037 GETMET R7 R2 K16
+ 0x58240011, // 0038 LDCONST R9 K17
+ 0x58280012, // 0039 LDCONST R10 K18
+ 0x5C2C0C00, // 003A MOVE R11 R6
+ 0x88300115, // 003B GETMBR R12 R0 K21
+ 0x7C1C0A00, // 003C CALL R7 5
+ 0xA8040001, // 003D EXBLK 1 1
+ 0x70020010, // 003E JMP #0050
+ 0xAC100002, // 003F CATCH R4 0 2
+ 0x7002000D, // 0040 JMP #004F
+ 0xB81A1000, // 0041 GETNGBL R6 K8
+ 0x8C180D0C, // 0042 GETMET R6 R6 K12
+ 0x60200008, // 0043 GETGBL R8 G8
+ 0x5C240800, // 0044 MOVE R9 R4
+ 0x7C200200, // 0045 CALL R8 1
+ 0x00222C08, // 0046 ADD R8 K22 R8
+ 0x00201117, // 0047 ADD R8 R8 K23
+ 0x60240008, // 0048 GETGBL R9 G8
+ 0x5C280A00, // 0049 MOVE R10 R5
+ 0x7C240200, // 004A CALL R9 1
+ 0x00201009, // 004B ADD R8 R8 R9
+ 0x5824000F, // 004C LDCONST R9 K15
+ 0x7C180600, // 004D CALL R6 3
+ 0x70020000, // 004E JMP #0050
+ 0xB0080000, // 004F RAISE 2 R0 R0
+ 0x80000000, // 0050 RET 0
})
)
);
@@ -4662,81 +4603,231 @@ be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
/********************************************************************
-** Solidified function: sort_distinct
+** Solidified function: get_plugin_class_displayname
********************************************************************/
-be_local_closure(Matter_Device_sort_distinct, /* name */
+be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */
be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 4, /* varg */
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_const_int(1),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_nested_str_weak(remove),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins_classes),
+ /* K1 */ be_nested_str_weak(find),
+ /* K2 */ be_nested_str_weak(NAME),
+ /* K3 */ be_nested_str_weak(),
}),
- be_str_weak(sort_distinct),
+ be_str_weak(get_plugin_class_displayname),
&be_const_str_solidified,
- ( &(const binstruction[53]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 0x60080010, // 0001 GETGBL R2 G16
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x040C0701, // 0005 SUB R3 R3 K1
- 0x400E0203, // 0006 CONNECT R3 K1 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
- 0x24180B02, // 000D GT R6 R5 K2
- 0x781A0008, // 000E JMPF R6 #0018
- 0x04180B01, // 000F SUB R6 R5 K1
- 0x94180006, // 0010 GETIDX R6 R0 R6
- 0x24180C04, // 0011 GT R6 R6 R4
- 0x781A0004, // 0012 JMPF R6 #0018
- 0x04180B01, // 0013 SUB R6 R5 K1
- 0x94180006, // 0014 GETIDX R6 R0 R6
- 0x98000A06, // 0015 SETIDX R0 R5 R6
- 0x04140B01, // 0016 SUB R5 R5 K1
- 0x7001FFF4, // 0017 JMP #000D
- 0x98000A04, // 0018 SETIDX R0 R5 R4
- 0x7001FFEE, // 0019 JMP #0009
- 0x58080003, // 001A LDCONST R2 K3
- 0xAC080200, // 001B CATCH R2 1 0
- 0xB0080000, // 001C RAISE 2 R0 R0
- 0x58080001, // 001D LDCONST R2 K1
- 0x600C000C, // 001E GETGBL R3 G12
- 0x5C100000, // 001F MOVE R4 R0
- 0x7C0C0200, // 0020 CALL R3 1
- 0x180C0701, // 0021 LE R3 R3 K1
- 0x780E0000, // 0022 JMPF R3 #0024
- 0x80040000, // 0023 RET 1 R0
- 0x940C0102, // 0024 GETIDX R3 R0 K2
- 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
- 0x8C100104, // 002D GETMET R4 R0 K4
- 0x5C180400, // 002E MOVE R6 R2
- 0x7C100400, // 002F CALL R4 2
- 0x70020001, // 0030 JMP #0033
- 0x940C0002, // 0031 GETIDX R3 R0 R2
- 0x00080501, // 0032 ADD R2 R2 K1
- 0x7001FFF0, // 0033 JMP #0025
- 0x80040000, // 0034 RET 1 R0
+ ( &(const binstruction[ 9]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x5C100200, // 0002 MOVE R4 R1
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0001, // 0004 JMPF R2 #0007
+ 0x880C0502, // 0005 GETMBR R3 R2 K2
+ 0x70020000, // 0006 JMP #0008
+ 0x580C0003, // 0007 LDCONST R3 K3
+ 0x80040600, // 0008 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Device_every_second, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(every_second),
+ /* K2 */ be_nested_str_weak(message_handler),
+ /* K3 */ be_nested_str_weak(commissioning_open),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(time_reached),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(plugins),
+ /* K8 */ be_const_int(1),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[30]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x88040102, // 0003 GETMBR R1 R0 K2
+ 0x8C040301, // 0004 GETMET R1 R1 K1
+ 0x7C040200, // 0005 CALL R1 1
+ 0x88040103, // 0006 GETMBR R1 R0 K3
+ 0x4C080000, // 0007 LDNIL R2
+ 0x20040202, // 0008 NE R1 R1 R2
+ 0x78060006, // 0009 JMPF R1 #0011
+ 0xB8060800, // 000A GETNGBL R1 K4
+ 0x8C040305, // 000B GETMET R1 R1 K5
+ 0x880C0103, // 000C GETMBR R3 R0 K3
+ 0x7C040400, // 000D CALL R1 2
+ 0x78060001, // 000E JMPF R1 #0011
+ 0x4C040000, // 000F LDNIL R1
+ 0x90020601, // 0010 SETMBR R0 K3 R1
+ 0x58040006, // 0011 LDCONST R1 K6
+ 0x6008000C, // 0012 GETGBL R2 G12
+ 0x880C0107, // 0013 GETMBR R3 R0 K7
+ 0x7C080200, // 0014 CALL R2 1
+ 0x14080202, // 0015 LT R2 R1 R2
+ 0x780A0005, // 0016 JMPF R2 #001D
+ 0x88080107, // 0017 GETMBR R2 R0 K7
+ 0x94080401, // 0018 GETIDX R2 R2 R1
+ 0x8C080501, // 0019 GETMET R2 R2 K1
+ 0x7C080200, // 001A CALL R2 1
+ 0x00040308, // 001B ADD R1 R1 K8
+ 0x7001FFF4, // 001C JMP #0012
+ 0x80000000, // 001D RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_mdns_announce_hostnames
+********************************************************************/
+be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* 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(_mdns_announce_hostname),
+ /* 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_mdns_host),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x50080000, // 0002 LDBOOL R2 0 0
+ 0x7C000400, // 0003 CALL R0 2
+ 0xB8020200, // 0004 GETNGBL R0 K1
+ 0x8C000102, // 0005 GETMET R0 R0 K2
+ 0x58080003, // 0006 LDCONST R2 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x7C000600, // 0008 CALL R0 3
+ 0x80000000, // 0009 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(_mdns_announce_hostname),
+ /* 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_mdns_host),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x50080200, // 0002 LDBOOL R2 1 0
+ 0x7C000400, // 0003 CALL R0 2
+ 0xB8020200, // 0004 GETNGBL R0 K1
+ 0x8C000102, // 0005 GETMET R0 R0 K2
+ 0x58080003, // 0006 LDCONST R2 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x7C000600, // 0008 CALL R0 3
+ 0x80000000, // 0009 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(wifi),
+ /* K2 */ be_nested_str_weak(up),
+ /* K3 */ be_nested_str_weak(_mdns_announce_hostname),
+ /* K4 */ be_nested_str_weak(add_rule),
+ /* K5 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K6 */ be_nested_str_weak(matter_mdns_host),
+ /* K7 */ be_nested_str_weak(eth),
+ /* K8 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ be_str_weak(start_mdns_announce_hostnames),
+ &be_const_str_solidified,
+ ( &(const binstruction[32]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x94040302, // 0003 GETIDX R1 R1 K2
+ 0x78060003, // 0004 JMPF R1 #0009
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x500C0000, // 0006 LDBOOL R3 0 0
+ 0x7C040400, // 0007 CALL R1 2
+ 0x70020005, // 0008 JMP #000F
+ 0xB8060000, // 0009 GETNGBL R1 K0
+ 0x8C040304, // 000A GETMET R1 R1 K4
+ 0x580C0005, // 000B LDCONST R3 K5
+ 0x84100000, // 000C CLOSURE R4 P0
+ 0x58140006, // 000D LDCONST R5 K6
+ 0x7C040800, // 000E CALL R1 4
+ 0xB8060000, // 000F GETNGBL R1 K0
+ 0x8C040307, // 0010 GETMET R1 R1 K7
+ 0x7C040200, // 0011 CALL R1 1
+ 0x94040302, // 0012 GETIDX R1 R1 K2
+ 0x78060003, // 0013 JMPF R1 #0018
+ 0x8C040103, // 0014 GETMET R1 R0 K3
+ 0x500C0200, // 0015 LDBOOL R3 1 0
+ 0x7C040400, // 0016 CALL R1 2
+ 0x70020005, // 0017 JMP #001E
+ 0xB8060000, // 0018 GETNGBL R1 K0
+ 0x8C040304, // 0019 GETMET R1 R1 K4
+ 0x580C0008, // 001A LDCONST R3 K8
+ 0x84100001, // 001B CLOSURE R4 P1
+ 0x58140006, // 001C LDCONST R5 K6
+ 0x7C040800, // 001D CALL R1 4
+ 0xA0000000, // 001E CLOSE R0
+ 0x80000000, // 001F RET 0
})
)
);
@@ -4747,98 +4838,116 @@ be_local_closure(Matter_Device_sort_distinct, /* name */
** Solidified class: Matter_Device
********************************************************************/
be_local_class(Matter_Device,
- 30,
+ 31,
NULL,
- be_nested_map(88,
+ be_nested_map(91,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(root_L, -1), be_const_var(29) },
- { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
- { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
- { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
- { be_const_key_weak(mdns_remove_PASE, 51), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
- { be_const_key_weak(stop, 56), be_const_closure(Matter_Device_stop_closure) },
- { be_const_key_weak(udp_server, 0), be_const_var(4) },
- { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) },
- { be_const_key_weak(commissioning_discriminator, -1), be_const_var(10) },
- { be_const_key_weak(msg_send, 26), be_const_closure(Matter_Device_msg_send_closure) },
- { be_const_key_weak(save_param, 4), be_const_closure(Matter_Device_save_param_closure) },
- { be_const_key_weak(mdns_pase_eth, -1), be_const_var(21) },
- { be_const_key_weak(hostname_eth, -1), be_const_var(18) },
- { be_const_key_weak(productid, -1), be_const_var(20) },
- { be_const_key_weak(vendorid, 69), be_const_var(19) },
- { be_const_key_weak(start_commissioning_complete, 3), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
- { be_const_key_weak(commissioning_salt, -1), be_const_var(11) },
- { be_const_key_weak(commissioning_open, -1), be_const_var(8) },
- { be_const_key_weak(compute_manual_pairing_code, -1), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
- { be_const_key_weak(commissioning_L, -1), be_const_var(13) },
- { be_const_key_weak(hostname_wifi, 85), be_const_var(17) },
+ { be_const_key_weak(save_param, 26), be_const_closure(Matter_Device_save_param_closure) },
+ { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
+ { be_const_key_weak(root_L, 10), be_const_var(30) },
+ { be_const_key_weak(plugins, -1), be_const_var(1) },
+ { be_const_key_weak(register_plugin_class, -1), be_const_closure(Matter_Device_register_plugin_class_closure) },
+ { be_const_key_weak(commissioning_open, 56), be_const_var(9) },
{ be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
- { be_const_key_weak(root_passcode, 7), be_const_var(24) },
- { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
- { be_const_key_weak(received_ack, 12), be_const_closure(Matter_Device_received_ack_closure) },
- { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) },
- { be_const_key_weak(start_root_basic_commissioning, 16), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
- { be_const_key_weak(ui, -1), be_const_var(7) },
- { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) },
- { be_const_key_weak(commissioning_iterations, -1), be_const_var(9) },
- { be_const_key_weak(mdns_announce_op_discovery, 22), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
- { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
- { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
- { be_const_key_weak(mdns_announce_PASE, 35), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
- { be_const_key_weak(is_commissioning_open, 44), be_const_closure(Matter_Device_is_commissioning_open_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
- { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
- { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
- { be_const_key_weak(plugins_to_json, -1), be_const_closure(Matter_Device_plugins_to_json_closure) },
- { be_const_key_weak(_trigger_read_sensors, 53), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
- { be_const_key_weak(every_250ms, 61), be_const_closure(Matter_Device_every_250ms_closure) },
- { be_const_key_weak(root_w0, -1), be_const_var(28) },
- { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(start_commissioning_complete_deferred, 48), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
- { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(15) },
- { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
- { be_const_key_weak(started, -1), be_const_var(0) },
- { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
- { be_const_key_weak(invoke_request, 68), be_const_closure(Matter_Device_invoke_request_closure) },
- { be_const_key_weak(start_operational_discovery, -1), be_const_closure(Matter_Device_start_operational_discovery_closure) },
- { be_const_key_weak(PASE_TIMEOUT, 66), be_const_int(600) },
- { be_const_key_weak(root_salt, 37), be_const_var(27) },
- { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
- { be_const_key_weak(message_handler, 47), be_const_var(5) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
- { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
- { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(22) },
- { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
- { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
- { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) },
- { be_const_key_weak(_load_plugins_config, -1), be_const_closure(Matter_Device__load_plugins_config_closure) },
+ { be_const_key_weak(PASE_TIMEOUT, -1), be_const_int(600) },
{ be_const_key_weak(plugins_classes, -1), be_const_var(3) },
- { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) },
- { be_const_key_weak(attribute_updated, 57), be_const_closure(Matter_Device_attribute_updated_closure) },
- { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(14) },
- { be_const_key_weak(register_plugin_class, 54), be_const_closure(Matter_Device_register_plugin_class_closure) },
- { be_const_key_weak(commissioning_instance_eth, 70), be_const_var(16) },
- { be_const_key_weak(plugins, 52), be_const_var(1) },
- { be_const_key_weak(PASSCODE_DEFAULT, -1), be_const_int(20202021) },
- { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
- { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
- { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) },
- { be_const_key_weak(msg_received, 38), be_const_closure(Matter_Device_msg_received_closure) },
- { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
- { be_const_key_weak(commissioning_w0, -1), be_const_var(12) },
- { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, 33), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(plugins_persist, 28), be_const_var(2) },
- { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) },
- { be_const_key_weak(root_discriminator, 25), be_const_var(23) },
- { be_const_key_weak(k2l_num, -1), be_const_static_closure(Matter_Device_k2l_num_closure) },
- { be_const_key_weak(ipv4only, -1), be_const_var(25) },
- { be_const_key_weak(start_operational_discovery_deferred, 13), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
- { be_const_key_weak(root_iterations, -1), be_const_var(26) },
- { be_const_key_weak(register_commands, 8), be_const_closure(Matter_Device_register_commands_closure) },
- { be_const_key_weak(sessions, -1), be_const_var(6) },
- { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
+ { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
+ { be_const_key_weak(PASSCODE_INVALID, 16), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(12,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(11111111),
+ be_const_int(22222222),
+ be_const_int(33333333),
+ be_const_int(44444444),
+ be_const_int(55555555),
+ be_const_int(66666666),
+ be_const_int(77777777),
+ be_const_int(88888888),
+ be_const_int(99999999),
+ be_const_int(12345678),
+ be_const_int(87654321),
+ })) ) } )) },
{ be_const_key_weak(sort_distinct, -1), be_const_static_closure(Matter_Device_sort_distinct_closure) },
- { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) },
+ { be_const_key_weak(root_passcode, -1), be_const_var(25) },
+ { be_const_key_weak(generate_random_passcode, 14), be_const_closure(Matter_Device_generate_random_passcode_closure) },
+ { be_const_key_weak(hostname_eth, -1), be_const_var(19) },
+ { be_const_key_weak(register_commands, 85), be_const_closure(Matter_Device_register_commands_closure) },
+ { be_const_key_weak(get_plugin_class_displayname, -1), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) },
+ { be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
+ { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) },
+ { be_const_key_weak(productid, 84), be_const_var(21) },
+ { be_const_key_weak(ipv4only, 17), be_const_var(26) },
+ { be_const_key_weak(UDP_PORT, 68), be_const_int(5540) },
+ { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) },
+ { be_const_key_weak(k2l_num, 65), be_const_static_closure(Matter_Device_k2l_num_closure) },
+ { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) },
+ { be_const_key_weak(mdns_announce_op_discovery, 27), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
+ { be_const_key_weak(commissioning_L, -1), be_const_var(14) },
+ { be_const_key_weak(start_basic_commissioning, 80), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
+ { be_const_key_weak(compute_manual_pairing_code, 6), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
+ { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
+ { be_const_key_weak(message_handler, 89), be_const_var(6) },
+ { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
+ { be_const_key_weak(PRODUCT_ID, 24), be_const_int(32768) },
+ { be_const_key_weak(msg_send, 11), be_const_closure(Matter_Device_msg_send_closure) },
+ { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) },
+ { be_const_key_weak(load_param, 38), be_const_closure(Matter_Device_load_param_closure) },
+ { be_const_key_weak(commissioning_salt, 22), be_const_var(12) },
+ { be_const_key_weak(root_iterations, -1), be_const_var(27) },
+ { be_const_key_weak(vendorid, -1), be_const_var(20) },
+ { be_const_key_weak(udp_server, 81), be_const_var(5) },
+ { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, 63), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
+ { be_const_key_weak(start_operational_discovery, 51), be_const_closure(Matter_Device_start_operational_discovery_closure) },
+ { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) },
+ { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
+ { be_const_key_weak(stop, 2), be_const_closure(Matter_Device_stop_closure) },
+ { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
+ { be_const_key_weak(plugins_config, 30), be_const_var(4) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) },
+ { be_const_key_weak(is_root_commissioning_open, 82), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
+ { be_const_key_weak(commissioning_instance_eth, 33), be_const_var(17) },
+ { be_const_key_weak(mdns_remove_PASE, -1), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
+ { be_const_key_weak(hostname_wifi, 47), be_const_var(18) },
+ { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
+ { be_const_key_weak(process_attribute_expansion, 57), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
+ { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
+ { be_const_key_weak(commissioning_w0, -1), be_const_var(13) },
+ { be_const_key_weak(plugins_persist, 49), be_const_var(2) },
+ { be_const_key_weak(start_operational_discovery_deferred, 66), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
+ { be_const_key_weak(commissioning_discriminator, 23), be_const_var(11) },
+ { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(15) },
+ { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) },
+ { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
+ { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
+ { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) },
+ { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) },
+ { be_const_key_weak(received_ack, 88), be_const_closure(Matter_Device_received_ack_closure) },
+ { be_const_key_weak(start_root_basic_commissioning, 54), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
+ { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(16) },
+ { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
+ { be_const_key_weak(PBKDF_ITERATIONS, 48), be_const_int(1000) },
+ { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
+ { be_const_key_weak(started, 44), be_const_var(0) },
+ { be_const_key_weak(ui, 42), be_const_var(8) },
+ { be_const_key_weak(mdns_pase_wifi, 41), be_const_var(23) },
+ { be_const_key_weak(root_salt, -1), be_const_var(28) },
+ { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(sessions, -1), be_const_var(7) },
+ { be_const_key_weak(_load_plugins_config, 29), be_const_closure(Matter_Device__load_plugins_config_closure) },
+ { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(Matter_Device_get_plugin_class_arg_closure) },
+ { be_const_key_weak(commissioning_iterations, -1), be_const_var(10) },
+ { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
+ { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
+ { be_const_key_weak(root_discriminator, -1), be_const_var(24) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(root_w0, 90), be_const_var(29) },
+ { be_const_key_weak(mdns_pase_eth, -1), be_const_var(22) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
+ { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
+ { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
+ { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) },
})),
be_str_weak(Matter_Device)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
index a61a98163..4e0419fb8 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
@@ -221,7 +221,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[74]) { /* constants */
+ ( &(const bvalue[75]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(Frame),
@@ -294,12 +294,13 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
/* K69 */ be_nested_str_weak(MTR_X3A_X20ignoring_X20unhandled_X20protocol_id_X3A),
/* K70 */ be_nested_str_weak(MTR_X3A_X20MessageHandler_X3A_X3Amsg_received_X20exception_X3A_X20),
/* K71 */ be_nested_str_weak(_X3B),
- /* K72 */ be_nested_str_weak(debug),
- /* K73 */ be_nested_str_weak(traceback),
+ /* K72 */ be_nested_str_weak(_debug_present),
+ /* K73 */ be_nested_str_weak(debug),
+ /* K74 */ be_nested_str_weak(traceback),
}),
be_str_weak(msg_received),
&be_const_str_solidified,
- ( &(const binstruction[388]) { /* code */
+ ( &(const binstruction[390]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0x50140000, // 0001 LDBOOL R5 0 0
0xA802016A, // 0002 EXBLK 0 #016E
@@ -665,9 +666,9 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0xA8040001, // 016A EXBLK 1 1
0x80040A00, // 016B RET 1 R5
0xA8040001, // 016C EXBLK 1 1
- 0x70020014, // 016D JMP #0183
+ 0x70020016, // 016D JMP #0185
0xAC180002, // 016E CATCH R6 0 2
- 0x70020011, // 016F JMP #0182
+ 0x70020013, // 016F JMP #0184
0xB8220A00, // 0170 GETNGBL R8 K5
0x8C201106, // 0171 GETMET R8 R8 K6
0x60280008, // 0172 GETGBL R10 G8
@@ -680,14 +681,16 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x7C2C0200, // 0179 CALL R11 1
0x0028140B, // 017A ADD R10 R10 R11
0x7C200400, // 017B CALL R8 2
- 0xA4229000, // 017C IMPORT R8 K72
- 0x8C241149, // 017D GETMET R9 R8 K73
- 0x7C240200, // 017E CALL R9 1
- 0x50240000, // 017F LDBOOL R9 0 0
- 0x80041200, // 0180 RET 1 R9
- 0x70020000, // 0181 JMP #0183
- 0xB0080000, // 0182 RAISE 2 R0 R0
- 0x80000000, // 0183 RET 0
+ 0x88200148, // 017C GETMBR R8 R0 K72
+ 0x78220002, // 017D JMPF R8 #0181
+ 0xA4229200, // 017E IMPORT R8 K73
+ 0x8C24114A, // 017F GETMET R9 R8 K74
+ 0x7C240200, // 0180 CALL R9 1
+ 0x50200000, // 0181 LDBOOL R8 0 0
+ 0x80041000, // 0182 RET 1 R8
+ 0x70020000, // 0183 JMP #0185
+ 0xB0080000, // 0184 RAISE 2 R0 R0
+ 0x80000000, // 0185 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
index 458456859..00fe4a9f5 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
@@ -7,26 +7,38 @@
extern const bclass be_class_Matter_Plugin;
/********************************************************************
-** Solidified function: get_endpoint
+** Solidified function: attribute_updated
********************************************************************/
-be_local_closure(Matter_Plugin_get_endpoint, /* name */
+be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
+ 11, /* nstack */
+ 5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
+ ( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(endpoint),
+ /* K1 */ be_nested_str_weak(device),
+ /* K2 */ be_nested_str_weak(attribute_updated),
}),
- be_str_weak(get_endpoint),
+ be_str_weak(attribute_updated),
&be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
+ ( &(const binstruction[12]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x1C140205, // 0001 EQ R5 R1 R5
+ 0x78160000, // 0002 JMPF R5 #0004
+ 0x88040100, // 0003 GETMBR R1 R0 K0
+ 0x88140101, // 0004 GETMBR R5 R0 K1
+ 0x8C140B02, // 0005 GETMET R5 R5 K2
+ 0x5C1C0200, // 0006 MOVE R7 R1
+ 0x5C200400, // 0007 MOVE R8 R2
+ 0x5C240600, // 0008 MOVE R9 R3
+ 0x5C280800, // 0009 MOVE R10 R4
+ 0x7C140A00, // 000A CALL R5 5
+ 0x80000000, // 000B RET 0
})
)
);
@@ -59,126 +71,11 @@ be_local_closure(Matter_Plugin_timed_request, /* name */
/********************************************************************
-** Solidified function: to_json_parameters
+** Solidified function: get_endpoint
********************************************************************/
-be_local_closure(Matter_Plugin_to_json_parameters, /* name */
+be_local_closure(Matter_Plugin_get_endpoint, /* name */
be_nested_proto(
2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(to_json_parameters),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80040200, // 0000 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_event
-********************************************************************/
-be_local_closure(Matter_Plugin_read_event, /* name */
- be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(read_event),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: to_json
-********************************************************************/
-be_local_closure(Matter_Plugin_to_json, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(format),
- /* K2 */ be_nested_str_weak(_X7B_X22type_X22_X3A_X22_X25s_X22),
- /* K3 */ be_nested_str_weak(NAME),
- /* K4 */ be_nested_str_weak(to_json_parameters),
- /* K5 */ be_nested_str_weak(_X7D),
- }),
- be_str_weak(to_json),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x88140103, // 0003 GETMBR R5 R0 K3
- 0x7C080600, // 0004 CALL R2 3
- 0x8C0C0104, // 0005 GETMET R3 R0 K4
- 0x5C140400, // 0006 MOVE R5 R2
- 0x7C0C0400, // 0007 CALL R3 2
- 0x5C080600, // 0008 MOVE R2 R3
- 0x00080505, // 0009 ADD R2 R2 K5
- 0x80040400, // 000A RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: subscribe_event
-********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_event, /* name */
- be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(subscribe_event),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Plugin_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -187,39 +84,13 @@ be_local_closure(Matter_Plugin_every_second, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(update_shadow),
+ /* K0 */ be_nested_str_weak(endpoint),
}),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_invoke_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(invoke_request),
+ be_str_weak(get_endpoint),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
})
)
);
@@ -227,12 +98,12 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */
/********************************************************************
-** Solidified function: parse_sensors
+** Solidified function: subscribe_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_parse_sensors, /* name */
+be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
+ 6, /* nstack */
+ 5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -240,59 +111,11 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(parse_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_update_shadow, /* name */
- be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: write_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_write_attribute, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(write_attribute),
+ be_str_weak(subscribe_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
})
)
);
@@ -334,38 +157,144 @@ be_local_closure(Matter_Plugin_init, /* name */
/********************************************************************
-** Solidified function: attribute_updated
+** Solidified function: write_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_attribute_updated, /* name */
+be_local_closure(Matter_Plugin_write_attribute, /* name */
be_nested_proto(
- 11, /* nstack */
- 5, /* argc */
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(write_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: has
+********************************************************************/
+be_local_closure(Matter_Plugin_has, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
- /* K1 */ be_nested_str_weak(device),
- /* K2 */ be_nested_str_weak(attribute_updated),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(clusters),
+ /* K1 */ be_nested_str_weak(contains),
+ /* K2 */ be_nested_str_weak(endpoints),
+ /* K3 */ be_nested_str_weak(find),
}),
- be_str_weak(attribute_updated),
+ be_str_weak(has),
&be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x1C140205, // 0001 EQ R5 R1 R5
- 0x78160000, // 0002 JMPF R5 #0004
- 0x88040100, // 0003 GETMBR R1 R0 K0
- 0x88140101, // 0004 GETMBR R5 R0 K1
- 0x8C140B02, // 0005 GETMET R5 R5 K2
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x5C200400, // 0007 MOVE R8 R2
- 0x5C240600, // 0008 MOVE R9 R3
- 0x5C280800, // 0009 MOVE R10 R4
- 0x7C140A00, // 000A CALL R5 5
- 0x80000000, // 000B RET 0
+ ( &(const binstruction[15]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0001 GETMET R3 R3 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x780E0006, // 0004 JMPF R3 #000C
+ 0x880C0102, // 0005 GETMBR R3 R0 K2
+ 0x8C0C0703, // 0006 GETMET R3 R3 K3
+ 0x5C140400, // 0007 MOVE R5 R2
+ 0x7C0C0400, // 0008 CALL R3 2
+ 0x4C100000, // 0009 LDNIL R4
+ 0x200C0604, // 000A NE R3 R3 R4
+ 0x740E0000, // 000B JMPT R3 #000D
+ 0x500C0001, // 000C LDBOOL R3 0 1
+ 0x500C0200, // 000D LDBOOL R3 1 0
+ 0x80040600, // 000E RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_invoke_request, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_update_shadow, /* name */
+ be_nested_proto(
+ 1, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Plugin_every_second, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x80000000, // 0002 RET 0
})
)
);
@@ -507,49 +436,6 @@ be_local_closure(Matter_Plugin_read_attribute, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: has
-********************************************************************/
-be_local_closure(Matter_Plugin_has, /* name */
- be_nested_proto(
- 6, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(contains),
- /* K2 */ be_nested_str_weak(endpoints),
- /* K3 */ be_nested_str_weak(find),
- }),
- be_str_weak(has),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x880C0100, // 0000 GETMBR R3 R0 K0
- 0x8C0C0701, // 0001 GETMET R3 R3 K1
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0x780E0006, // 0004 JMPF R3 #000C
- 0x880C0102, // 0005 GETMBR R3 R0 K2
- 0x8C0C0703, // 0006 GETMET R3 R3 K3
- 0x5C140400, // 0007 MOVE R5 R2
- 0x7C0C0400, // 0008 CALL R3 2
- 0x4C100000, // 0009 LDNIL R4
- 0x200C0604, // 000A NE R3 R3 R4
- 0x740E0000, // 000B JMPT R3 #000D
- 0x500C0001, // 000C LDBOOL R3 0 1
- 0x500C0200, // 000D LDBOOL R3 1 0
- 0x80040600, // 000E RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: consolidate_clusters
********************************************************************/
@@ -653,6 +539,33 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040008, // 0000 GETGBL R1 G8
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: get_attribute_list
********************************************************************/
@@ -686,6 +599,55 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: read_event
+********************************************************************/
+be_local_closure(Matter_Plugin_read_event, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(read_event),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_parse_sensors, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: get_cluster_list
********************************************************************/
@@ -733,9 +695,9 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
/********************************************************************
-** Solidified function: subscribe_attribute
+** Solidified function: subscribe_event
********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
+be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
@@ -746,7 +708,7 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(subscribe_attribute),
+ be_str_weak(subscribe_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
@@ -763,30 +725,11 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
be_local_class(Matter_Plugin,
3,
NULL,
- be_nested_map(24,
+ be_nested_map(25,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(subscribe_attribute, 23), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
- { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
- { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
- { be_const_key_weak(device, 21), be_const_var(0) },
- { be_const_key_weak(endpoint, 0), be_const_var(1) },
- { be_const_key_weak(get_cluster_list, 17), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(generic) },
- { be_const_key_weak(to_json, 5), be_const_closure(Matter_Plugin_to_json_closure) },
- { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
- { be_const_key_weak(every_second, 8), be_const_closure(Matter_Plugin_every_second_closure) },
- { be_const_key_weak(clusters, 22), be_const_var(2) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
- { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
- { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
- { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
{ be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
- { be_const_key_weak(read_event, 16), be_const_closure(Matter_Plugin_read_event_closure) },
- { be_const_key_weak(write_attribute, 15), be_const_closure(Matter_Plugin_write_attribute_closure) },
- { be_const_key_weak(subscribe_event, 14), be_const_closure(Matter_Plugin_subscribe_event_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
+ { be_const_key_weak(timed_request, 7), be_const_closure(Matter_Plugin_timed_request_closure) },
+ { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -801,7 +744,27 @@ be_local_class(Matter_Plugin,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_to_json_parameters_closure) },
+ { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
+ { be_const_key_weak(subscribe_event, 18), be_const_closure(Matter_Plugin_subscribe_event_closure) },
+ { be_const_key_weak(clusters, -1), be_const_var(2) },
+ { be_const_key_weak(endpoint, -1), be_const_var(1) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) },
+ { be_const_key_weak(device, -1), be_const_var(0) },
+ { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_invoke_request_closure) },
+ { be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) },
+ { be_const_key_weak(TYPE, 9), be_nested_str_weak(generic) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
+ { be_const_key_weak(get_attribute_list, 17), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
+ { be_const_key_weak(ARG, 16), be_nested_str_weak() },
+ { be_const_key_weak(consolidate_clusters, 13), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
+ { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
+ { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
+ { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
+ { be_const_key_weak(NAME, 3), be_nested_str_weak() },
})),
be_str_weak(Matter_Plugin)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
index d2eab2b66..287a29d30 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
@@ -390,11 +390,17 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Light0,
1,
&be_class_Matter_Plugin,
- be_nested_map(8,
+ be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
- { be_const_key_weak(CLUSTERS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(shadow_onoff, 8), be_const_var(0) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(256, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -432,15 +438,10 @@ be_local_class(Matter_Plugin_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
- { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(light0) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(256, -1), be_const_int(2) },
- })) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
})),
be_str_weak(Matter_Plugin_Light0)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
index 54d712ba6..b0f2d5523 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
@@ -7,151 +7,69 @@
extern const bclass be_class_Matter_Plugin_Light1;
/********************************************************************
-** Solidified function: init
+** Solidified function: update_shadow
********************************************************************/
-be_local_closure(Matter_Plugin_Light1_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_bri),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x90020302, // 0008 SETMBR R0 K1 K2
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
+be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
be_nested_proto(
11, /* nstack */
- 3, /* argc */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_bri),
- /* K9 */ be_const_int(2),
- /* K10 */ be_const_int(3),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_const_int(1),
- /* K13 */ be_nested_str_weak(read_attribute),
+ ( &(const bvalue[10]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(get),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(bri),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(scale_uint),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(shadow_bri),
+ /* K8 */ be_nested_str_weak(attribute_updated),
+ /* K9 */ be_nested_str_weak(update_shadow),
}),
- be_str_weak(read_attribute),
+ be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[77]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E0007, // 0005 LDINT R7 8
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E003B, // 0007 JMPF R7 #0044
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x70020032, // 000F JMP #0043
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x58280005, // 0014 LDCONST R10 K5
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x7002002A, // 0017 JMP #0043
- 0x1C1C0D0A, // 0018 EQ R7 R6 K10
- 0x781E0005, // 0019 JMPF R7 #0020
- 0x8C1C0906, // 001A GETMET R7 R4 K6
- 0x88240907, // 001B GETMBR R9 R4 K7
- 0x542A00FD, // 001C LDINT R10 254
- 0x7C1C0600, // 001D CALL R7 3
- 0x80040E00, // 001E RET 1 R7
- 0x70020022, // 001F JMP #0043
- 0x541E000E, // 0020 LDINT R7 15
- 0x1C1C0C07, // 0021 EQ R7 R6 R7
- 0x781E0005, // 0022 JMPF R7 #0029
- 0x8C1C0906, // 0023 GETMET R7 R4 K6
- 0x88240907, // 0024 GETMBR R9 R4 K7
- 0x58280005, // 0025 LDCONST R10 K5
- 0x7C1C0600, // 0026 CALL R7 3
- 0x80040E00, // 0027 RET 1 R7
- 0x70020019, // 0028 JMP #0043
- 0x541E0010, // 0029 LDINT R7 17
- 0x1C1C0C07, // 002A EQ R7 R6 R7
- 0x781E0005, // 002B JMPF R7 #0032
- 0x8C1C0906, // 002C GETMET R7 R4 K6
- 0x88240907, // 002D GETMBR R9 R4 K7
- 0x88280108, // 002E GETMBR R10 R0 K8
- 0x7C1C0600, // 002F CALL R7 3
- 0x80040E00, // 0030 RET 1 R7
- 0x70020010, // 0031 JMP #0043
- 0x541EFFFB, // 0032 LDINT R7 65532
- 0x1C1C0C07, // 0033 EQ R7 R6 R7
- 0x781E0005, // 0034 JMPF R7 #003B
- 0x8C1C0906, // 0035 GETMET R7 R4 K6
- 0x8824090B, // 0036 GETMBR R9 R4 K11
- 0x5828000C, // 0037 LDCONST R10 K12
- 0x7C1C0600, // 0038 CALL R7 3
- 0x80040E00, // 0039 RET 1 R7
- 0x70020007, // 003A JMP #0043
- 0x541EFFFC, // 003B LDINT R7 65533
- 0x1C1C0C07, // 003C EQ R7 R6 R7
- 0x781E0004, // 003D JMPF R7 #0043
- 0x8C1C0906, // 003E GETMET R7 R4 K6
- 0x8824090B, // 003F GETMBR R9 R4 K11
- 0x542A0004, // 0040 LDINT R10 5
- 0x7C1C0600, // 0041 CALL R7 3
- 0x80040E00, // 0042 RET 1 R7
- 0x70020007, // 0043 JMP #004C
- 0x601C0003, // 0044 GETGBL R7 G3
- 0x5C200000, // 0045 MOVE R8 R0
- 0x7C1C0200, // 0046 CALL R7 1
- 0x8C1C0F0D, // 0047 GETMET R7 R7 K13
- 0x5C240200, // 0048 MOVE R9 R1
- 0x5C280400, // 0049 MOVE R10 R2
- 0x7C1C0600, // 004A CALL R7 3
- 0x80040E00, // 004B RET 1 R7
- 0x80000000, // 004C RET 0
+ ( &(const binstruction[36]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x8C0C0502, // 0003 GETMET R3 R2 K2
+ 0x58140003, // 0004 LDCONST R5 K3
+ 0x4C180000, // 0005 LDNIL R6
+ 0x7C0C0600, // 0006 CALL R3 3
+ 0x4C100000, // 0007 LDNIL R4
+ 0x20100604, // 0008 NE R4 R3 R4
+ 0x78120009, // 0009 JMPF R4 #0014
+ 0xB8120800, // 000A GETNGBL R4 K4
+ 0x8C100905, // 000B GETMET R4 R4 K5
+ 0x5C180600, // 000C MOVE R6 R3
+ 0x581C0006, // 000D LDCONST R7 K6
+ 0x542200FE, // 000E LDINT R8 255
+ 0x58240006, // 000F LDCONST R9 K6
+ 0x542A00FD, // 0010 LDINT R10 254
+ 0x7C100C00, // 0011 CALL R4 6
+ 0x5C0C0800, // 0012 MOVE R3 R4
+ 0x70020000, // 0013 JMP #0015
+ 0x880C0107, // 0014 GETMBR R3 R0 K7
+ 0x88100107, // 0015 GETMBR R4 R0 K7
+ 0x20100604, // 0016 NE R4 R3 R4
+ 0x78120005, // 0017 JMPF R4 #001E
+ 0x8C100108, // 0018 GETMET R4 R0 K8
+ 0x4C180000, // 0019 LDNIL R6
+ 0x541E0007, // 001A LDINT R7 8
+ 0x58200006, // 001B LDCONST R8 K6
+ 0x7C100800, // 001C CALL R4 4
+ 0x90020E03, // 001D SETMBR R0 K7 R3
+ 0x60100003, // 001E GETGBL R4 G3
+ 0x5C140000, // 001F MOVE R5 R0
+ 0x7C100200, // 0020 CALL R4 1
+ 0x8C100909, // 0021 GETMET R4 R4 K9
+ 0x7C100200, // 0022 CALL R4 1
+ 0x80000000, // 0023 RET 0
})
)
);
@@ -312,69 +230,151 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
/********************************************************************
-** Solidified function: update_shadow
+** Solidified function: read_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
+be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
be_nested_proto(
11, /* nstack */
- 1, /* argc */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[10]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(get),
- /* K2 */ be_nested_str_weak(find),
- /* K3 */ be_nested_str_weak(bri),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(scale_uint),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(shadow_bri),
- /* K8 */ be_nested_str_weak(attribute_updated),
- /* K9 */ be_nested_str_weak(update_shadow),
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_nested_str_weak(shadow_bri),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_const_int(3),
+ /* K11 */ be_nested_str_weak(U4),
+ /* K12 */ be_const_int(1),
+ /* K13 */ be_nested_str_weak(read_attribute),
}),
- be_str_weak(update_shadow),
+ be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[36]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x7C080200, // 0002 CALL R2 1
- 0x8C0C0502, // 0003 GETMET R3 R2 K2
- 0x58140003, // 0004 LDCONST R5 K3
- 0x4C180000, // 0005 LDNIL R6
- 0x7C0C0600, // 0006 CALL R3 3
- 0x4C100000, // 0007 LDNIL R4
- 0x20100604, // 0008 NE R4 R3 R4
- 0x78120009, // 0009 JMPF R4 #0014
- 0xB8120800, // 000A GETNGBL R4 K4
- 0x8C100905, // 000B GETMET R4 R4 K5
- 0x5C180600, // 000C MOVE R6 R3
- 0x581C0006, // 000D LDCONST R7 K6
- 0x542200FE, // 000E LDINT R8 255
- 0x58240006, // 000F LDCONST R9 K6
- 0x542A00FD, // 0010 LDINT R10 254
- 0x7C100C00, // 0011 CALL R4 6
- 0x5C0C0800, // 0012 MOVE R3 R4
- 0x70020000, // 0013 JMP #0015
- 0x880C0107, // 0014 GETMBR R3 R0 K7
- 0x88100107, // 0015 GETMBR R4 R0 K7
- 0x20100604, // 0016 NE R4 R3 R4
- 0x78120005, // 0017 JMPF R4 #001E
- 0x8C100108, // 0018 GETMET R4 R0 K8
- 0x4C180000, // 0019 LDNIL R6
- 0x541E0007, // 001A LDINT R7 8
- 0x58200006, // 001B LDCONST R8 K6
- 0x7C100800, // 001C CALL R4 4
- 0x90020E03, // 001D SETMBR R0 K7 R3
- 0x60100003, // 001E GETGBL R4 G3
- 0x5C140000, // 001F MOVE R5 R0
- 0x7C100200, // 0020 CALL R4 1
- 0x8C100909, // 0021 GETMET R4 R4 K9
- 0x7C100200, // 0022 CALL R4 1
- 0x80000000, // 0023 RET 0
+ ( &(const binstruction[77]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0007, // 0005 LDINT R7 8
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E003B, // 0007 JMPF R7 #0044
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0005, // 0009 JMPF R7 #0010
+ 0x8C1C0906, // 000A GETMET R7 R4 K6
+ 0x88240907, // 000B GETMBR R9 R4 K7
+ 0x88280108, // 000C GETMBR R10 R0 K8
+ 0x7C1C0600, // 000D CALL R7 3
+ 0x80040E00, // 000E RET 1 R7
+ 0x70020032, // 000F JMP #0043
+ 0x1C1C0D09, // 0010 EQ R7 R6 K9
+ 0x781E0005, // 0011 JMPF R7 #0018
+ 0x8C1C0906, // 0012 GETMET R7 R4 K6
+ 0x88240907, // 0013 GETMBR R9 R4 K7
+ 0x58280005, // 0014 LDCONST R10 K5
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0x80040E00, // 0016 RET 1 R7
+ 0x7002002A, // 0017 JMP #0043
+ 0x1C1C0D0A, // 0018 EQ R7 R6 K10
+ 0x781E0005, // 0019 JMPF R7 #0020
+ 0x8C1C0906, // 001A GETMET R7 R4 K6
+ 0x88240907, // 001B GETMBR R9 R4 K7
+ 0x542A00FD, // 001C LDINT R10 254
+ 0x7C1C0600, // 001D CALL R7 3
+ 0x80040E00, // 001E RET 1 R7
+ 0x70020022, // 001F JMP #0043
+ 0x541E000E, // 0020 LDINT R7 15
+ 0x1C1C0C07, // 0021 EQ R7 R6 R7
+ 0x781E0005, // 0022 JMPF R7 #0029
+ 0x8C1C0906, // 0023 GETMET R7 R4 K6
+ 0x88240907, // 0024 GETMBR R9 R4 K7
+ 0x58280005, // 0025 LDCONST R10 K5
+ 0x7C1C0600, // 0026 CALL R7 3
+ 0x80040E00, // 0027 RET 1 R7
+ 0x70020019, // 0028 JMP #0043
+ 0x541E0010, // 0029 LDINT R7 17
+ 0x1C1C0C07, // 002A EQ R7 R6 R7
+ 0x781E0005, // 002B JMPF R7 #0032
+ 0x8C1C0906, // 002C GETMET R7 R4 K6
+ 0x88240907, // 002D GETMBR R9 R4 K7
+ 0x88280108, // 002E GETMBR R10 R0 K8
+ 0x7C1C0600, // 002F CALL R7 3
+ 0x80040E00, // 0030 RET 1 R7
+ 0x70020010, // 0031 JMP #0043
+ 0x541EFFFB, // 0032 LDINT R7 65532
+ 0x1C1C0C07, // 0033 EQ R7 R6 R7
+ 0x781E0005, // 0034 JMPF R7 #003B
+ 0x8C1C0906, // 0035 GETMET R7 R4 K6
+ 0x8824090B, // 0036 GETMBR R9 R4 K11
+ 0x5828000C, // 0037 LDCONST R10 K12
+ 0x7C1C0600, // 0038 CALL R7 3
+ 0x80040E00, // 0039 RET 1 R7
+ 0x70020007, // 003A JMP #0043
+ 0x541EFFFC, // 003B LDINT R7 65533
+ 0x1C1C0C07, // 003C EQ R7 R6 R7
+ 0x781E0004, // 003D JMPF R7 #0043
+ 0x8C1C0906, // 003E GETMET R7 R4 K6
+ 0x8824090B, // 003F GETMBR R9 R4 K11
+ 0x542A0004, // 0040 LDINT R10 5
+ 0x7C1C0600, // 0041 CALL R7 3
+ 0x80040E00, // 0042 RET 1 R7
+ 0x70020007, // 0043 JMP #004C
+ 0x601C0003, // 0044 GETGBL R7 G3
+ 0x5C200000, // 0045 MOVE R8 R0
+ 0x7C1C0200, // 0046 CALL R7 1
+ 0x8C1C0F0D, // 0047 GETMET R7 R7 K13
+ 0x5C240200, // 0048 MOVE R9 R1
+ 0x5C280400, // 0049 MOVE R10 R2
+ 0x7C1C0600, // 004A CALL R7 3
+ 0x80040E00, // 004B RET 1 R7
+ 0x80000000, // 004C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light1_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_bri),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x90020302, // 0008 SETMBR R0 K1 K2
+ 0x80000000, // 0009 RET 0
})
)
);
@@ -388,15 +388,17 @@ extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_Light1,
1,
&be_class_Matter_Plugin_Light0,
- be_nested_map(8,
+ be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(TYPES, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(light1) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
- { be_const_key_weak(CLUSTERS, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -411,11 +413,10 @@ be_local_class(Matter_Plugin_Light1,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Light1_init_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
- { be_const_key_weak(shadow_bri, 4), be_const_var(0) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(light1) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
+ { be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
+ { be_const_key_weak(shadow_bri, -1), be_const_var(0) },
})),
be_str_weak(Matter_Plugin_Light1)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
index 3ca7c0915..0cce12e73 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
@@ -6,170 +6,6 @@
extern const bclass be_class_Matter_Plugin_Light2;
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
- be_nested_proto(
- 13, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(command),
- /* K5 */ be_nested_str_weak(findsubval),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(ct_min),
- /* K8 */ be_nested_str_weak(ct_max),
- /* K9 */ be_nested_str_weak(set),
- /* K10 */ be_nested_str_weak(ct),
- /* K11 */ be_nested_str_weak(update_shadow),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(ct_X3A),
- /* K14 */ be_nested_str_weak(invoke_request),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[65]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xB8160200, // 0001 GETNGBL R5 K1
- 0x88140B02, // 0002 GETMBR R5 R5 K2
- 0x88180703, // 0003 GETMBR R6 R3 K3
- 0x881C0704, // 0004 GETMBR R7 R3 K4
- 0x542202FF, // 0005 LDINT R8 768
- 0x1C200C08, // 0006 EQ R8 R6 R8
- 0x7822002E, // 0007 JMPF R8 #0037
- 0x54220009, // 0008 LDINT R8 10
- 0x1C200E08, // 0009 EQ R8 R7 R8
- 0x78220019, // 000A JMPF R8 #0025
- 0x8C200505, // 000B GETMET R8 R2 K5
- 0x58280006, // 000C LDCONST R10 K6
- 0x7C200400, // 000D CALL R8 2
- 0x88240107, // 000E GETMBR R9 R0 K7
- 0x14241009, // 000F LT R9 R8 R9
- 0x78260000, // 0010 JMPF R9 #0012
- 0x88200107, // 0011 GETMBR R8 R0 K7
- 0x88240108, // 0012 GETMBR R9 R0 K8
- 0x24241009, // 0013 GT R9 R8 R9
- 0x78260000, // 0014 JMPF R9 #0016
- 0x88200108, // 0015 GETMBR R8 R0 K8
- 0x8C240909, // 0016 GETMET R9 R4 K9
- 0x602C0013, // 0017 GETGBL R11 G19
- 0x7C2C0000, // 0018 CALL R11 0
- 0x982E1408, // 0019 SETIDX R11 K10 R8
- 0x7C240400, // 001A CALL R9 2
- 0x8C24010B, // 001B GETMET R9 R0 K11
- 0x7C240200, // 001C CALL R9 1
- 0x60240008, // 001D GETGBL R9 G8
- 0x5C281000, // 001E MOVE R10 R8
- 0x7C240200, // 001F CALL R9 1
- 0x00261A09, // 0020 ADD R9 K13 R9
- 0x900E1809, // 0021 SETMBR R3 K12 R9
- 0x50240200, // 0022 LDBOOL R9 1 0
- 0x80041200, // 0023 RET 1 R9
- 0x70020010, // 0024 JMP #0036
- 0x54220046, // 0025 LDINT R8 71
- 0x1C200E08, // 0026 EQ R8 R7 R8
- 0x78220002, // 0027 JMPF R8 #002B
- 0x50200200, // 0028 LDBOOL R8 1 0
- 0x80041000, // 0029 RET 1 R8
- 0x7002000A, // 002A JMP #0036
- 0x5422004A, // 002B LDINT R8 75
- 0x1C200E08, // 002C EQ R8 R7 R8
- 0x78220002, // 002D JMPF R8 #0031
- 0x50200200, // 002E LDBOOL R8 1 0
- 0x80041000, // 002F RET 1 R8
- 0x70020004, // 0030 JMP #0036
- 0x5422004B, // 0031 LDINT R8 76
- 0x1C200E08, // 0032 EQ R8 R7 R8
- 0x78220001, // 0033 JMPF R8 #0036
- 0x50200200, // 0034 LDBOOL R8 1 0
- 0x80041000, // 0035 RET 1 R8
- 0x70020008, // 0036 JMP #0040
- 0x60200003, // 0037 GETGBL R8 G3
- 0x5C240000, // 0038 MOVE R9 R0
- 0x7C200200, // 0039 CALL R8 1
- 0x8C20110E, // 003A GETMET R8 R8 K14
- 0x5C280200, // 003B MOVE R10 R1
- 0x5C2C0400, // 003C MOVE R11 R2
- 0x5C300600, // 003D MOVE R12 R3
- 0x7C200800, // 003E CALL R8 4
- 0x80041000, // 003F RET 1 R8
- 0x80000000, // 0040 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
- be_nested_proto(
- 9, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(update_ct_minmax),
- /* K2 */ be_nested_str_weak(update_shadow),
- /* K3 */ be_nested_str_weak(get),
- /* K4 */ be_nested_str_weak(find),
- /* K5 */ be_nested_str_weak(ct),
- /* K6 */ be_nested_str_weak(shadow_ct),
- /* K7 */ be_nested_str_weak(attribute_updated),
- }),
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080101, // 0001 GETMET R2 R0 K1
- 0x7C080200, // 0002 CALL R2 1
- 0x60080003, // 0003 GETGBL R2 G3
- 0x5C0C0000, // 0004 MOVE R3 R0
- 0x7C080200, // 0005 CALL R2 1
- 0x8C080502, // 0006 GETMET R2 R2 K2
- 0x7C080200, // 0007 CALL R2 1
- 0x8C080303, // 0008 GETMET R2 R1 K3
- 0x7C080200, // 0009 CALL R2 1
- 0x8C0C0504, // 000A GETMET R3 R2 K4
- 0x58140005, // 000B LDCONST R5 K5
- 0x4C180000, // 000C LDNIL R6
- 0x7C0C0600, // 000D CALL R3 3
- 0x4C100000, // 000E LDNIL R4
- 0x1C100604, // 000F EQ R4 R3 R4
- 0x78120000, // 0010 JMPF R4 #0012
- 0x880C0106, // 0011 GETMBR R3 R0 K6
- 0x88100106, // 0012 GETMBR R4 R0 K6
- 0x20100604, // 0013 NE R4 R3 R4
- 0x78120005, // 0014 JMPF R4 #001B
- 0x8C100107, // 0015 GETMET R4 R0 K7
- 0x4C180000, // 0016 LDNIL R6
- 0x541E02FF, // 0017 LDINT R7 768
- 0x54220006, // 0018 LDINT R8 7
- 0x7C100800, // 0019 CALL R4 4
- 0x90020C03, // 001A SETMBR R0 K6 R3
- 0x80000000, // 001B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -288,6 +124,66 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(update_ct_minmax),
+ /* K2 */ be_nested_str_weak(update_shadow),
+ /* K3 */ be_nested_str_weak(get),
+ /* K4 */ be_nested_str_weak(find),
+ /* K5 */ be_nested_str_weak(ct),
+ /* K6 */ be_nested_str_weak(shadow_ct),
+ /* K7 */ be_nested_str_weak(attribute_updated),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080101, // 0001 GETMET R2 R0 K1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x60080003, // 0003 GETGBL R2 G3
+ 0x5C0C0000, // 0004 MOVE R3 R0
+ 0x7C080200, // 0005 CALL R2 1
+ 0x8C080502, // 0006 GETMET R2 R2 K2
+ 0x7C080200, // 0007 CALL R2 1
+ 0x8C080303, // 0008 GETMET R2 R1 K3
+ 0x7C080200, // 0009 CALL R2 1
+ 0x8C0C0504, // 000A GETMET R3 R2 K4
+ 0x58140005, // 000B LDCONST R5 K5
+ 0x4C180000, // 000C LDNIL R6
+ 0x7C0C0600, // 000D CALL R3 3
+ 0x4C100000, // 000E LDNIL R4
+ 0x1C100604, // 000F EQ R4 R3 R4
+ 0x78120000, // 0010 JMPF R4 #0012
+ 0x880C0106, // 0011 GETMBR R3 R0 K6
+ 0x88100106, // 0012 GETMBR R4 R0 K6
+ 0x20100604, // 0013 NE R4 R3 R4
+ 0x78120005, // 0014 JMPF R4 #001B
+ 0x8C100107, // 0015 GETMET R4 R0 K7
+ 0x4C180000, // 0016 LDNIL R6
+ 0x541E02FF, // 0017 LDINT R7 768
+ 0x54220006, // 0018 LDINT R8 7
+ 0x7C100800, // 0019 CALL R4 4
+ 0x90020C03, // 001A SETMBR R0 K6 R3
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: init
********************************************************************/
@@ -371,6 +267,110 @@ be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(command),
+ /* K5 */ be_nested_str_weak(findsubval),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(ct_min),
+ /* K8 */ be_nested_str_weak(ct_max),
+ /* K9 */ be_nested_str_weak(set),
+ /* K10 */ be_nested_str_weak(ct),
+ /* K11 */ be_nested_str_weak(update_shadow),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(ct_X3A),
+ /* K14 */ be_nested_str_weak(invoke_request),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[65]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xB8160200, // 0001 GETNGBL R5 K1
+ 0x88140B02, // 0002 GETMBR R5 R5 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x881C0704, // 0004 GETMBR R7 R3 K4
+ 0x542202FF, // 0005 LDINT R8 768
+ 0x1C200C08, // 0006 EQ R8 R6 R8
+ 0x7822002E, // 0007 JMPF R8 #0037
+ 0x54220009, // 0008 LDINT R8 10
+ 0x1C200E08, // 0009 EQ R8 R7 R8
+ 0x78220019, // 000A JMPF R8 #0025
+ 0x8C200505, // 000B GETMET R8 R2 K5
+ 0x58280006, // 000C LDCONST R10 K6
+ 0x7C200400, // 000D CALL R8 2
+ 0x88240107, // 000E GETMBR R9 R0 K7
+ 0x14241009, // 000F LT R9 R8 R9
+ 0x78260000, // 0010 JMPF R9 #0012
+ 0x88200107, // 0011 GETMBR R8 R0 K7
+ 0x88240108, // 0012 GETMBR R9 R0 K8
+ 0x24241009, // 0013 GT R9 R8 R9
+ 0x78260000, // 0014 JMPF R9 #0016
+ 0x88200108, // 0015 GETMBR R8 R0 K8
+ 0x8C240909, // 0016 GETMET R9 R4 K9
+ 0x602C0013, // 0017 GETGBL R11 G19
+ 0x7C2C0000, // 0018 CALL R11 0
+ 0x982E1408, // 0019 SETIDX R11 K10 R8
+ 0x7C240400, // 001A CALL R9 2
+ 0x8C24010B, // 001B GETMET R9 R0 K11
+ 0x7C240200, // 001C CALL R9 1
+ 0x60240008, // 001D GETGBL R9 G8
+ 0x5C281000, // 001E MOVE R10 R8
+ 0x7C240200, // 001F CALL R9 1
+ 0x00261A09, // 0020 ADD R9 K13 R9
+ 0x900E1809, // 0021 SETMBR R3 K12 R9
+ 0x50240200, // 0022 LDBOOL R9 1 0
+ 0x80041200, // 0023 RET 1 R9
+ 0x70020010, // 0024 JMP #0036
+ 0x54220046, // 0025 LDINT R8 71
+ 0x1C200E08, // 0026 EQ R8 R7 R8
+ 0x78220002, // 0027 JMPF R8 #002B
+ 0x50200200, // 0028 LDBOOL R8 1 0
+ 0x80041000, // 0029 RET 1 R8
+ 0x7002000A, // 002A JMP #0036
+ 0x5422004A, // 002B LDINT R8 75
+ 0x1C200E08, // 002C EQ R8 R7 R8
+ 0x78220002, // 002D JMPF R8 #0031
+ 0x50200200, // 002E LDBOOL R8 1 0
+ 0x80041000, // 002F RET 1 R8
+ 0x70020004, // 0030 JMP #0036
+ 0x5422004B, // 0031 LDINT R8 76
+ 0x1C200E08, // 0032 EQ R8 R7 R8
+ 0x78220001, // 0033 JMPF R8 #0036
+ 0x50200200, // 0034 LDBOOL R8 1 0
+ 0x80041000, // 0035 RET 1 R8
+ 0x70020008, // 0036 JMP #0040
+ 0x60200003, // 0037 GETGBL R8 G3
+ 0x5C240000, // 0038 MOVE R9 R0
+ 0x7C200200, // 0039 CALL R8 1
+ 0x8C20110E, // 003A GETMET R8 R8 K14
+ 0x5C280200, // 003B MOVE R10 R1
+ 0x5C2C0400, // 003C MOVE R11 R2
+ 0x5C300600, // 003D MOVE R12 R3
+ 0x7C200800, // 003E CALL R8 4
+ 0x80041000, // 003F RET 1 R8
+ 0x80000000, // 0040 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Light2
********************************************************************/
@@ -378,19 +378,23 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light2,
3,
&be_class_Matter_Plugin_Light1,
- be_nested_map(11,
+ be_nested_map(12,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
- { be_const_key_weak(NAME, 5), be_nested_str_weak(light2) },
- { be_const_key_weak(read_attribute, 8), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
+ { be_const_key_weak(ct_min, -1), be_const_var(1) },
+ { be_const_key_weak(shadow_ct, 8), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(ct_min, 1), be_const_var(1) },
- { be_const_key_weak(CLUSTERS, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(ct_max, 7), be_const_var(2) },
+ { be_const_key_weak(TYPE, 0), be_nested_str_weak(light2) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
+ { be_const_key_weak(NAME, 5), be_nested_str_weak(Light_X202_X20CT) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
+ { be_const_key_weak(update_shadow, 4), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
+ { be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -405,10 +409,7 @@ be_local_class(Matter_Plugin_Light2,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(shadow_ct, -1), be_const_var(0) },
- { be_const_key_weak(ct_max, -1), be_const_var(2) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light2_init_closure) },
- { be_const_key_weak(invoke_request, 0), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Light2)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
index da74ed5c4..b4ebe2fd7 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
@@ -6,6 +6,287 @@
extern const bclass be_class_Matter_Plugin_Light3;
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(update_shadow),
+ /* K2 */ be_nested_str_weak(get),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(hue),
+ /* K5 */ be_nested_str_weak(sat),
+ /* K6 */ be_nested_str_weak(tasmota),
+ /* K7 */ be_nested_str_weak(scale_uint),
+ /* K8 */ be_const_int(0),
+ /* K9 */ be_nested_str_weak(shadow_hue),
+ /* K10 */ be_nested_str_weak(shadow_sat),
+ /* K11 */ be_nested_str_weak(attribute_updated),
+ /* K12 */ be_const_int(1),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[63]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x60080003, // 0001 GETGBL R2 G3
+ 0x5C0C0000, // 0002 MOVE R3 R0
+ 0x7C080200, // 0003 CALL R2 1
+ 0x8C080501, // 0004 GETMET R2 R2 K1
+ 0x7C080200, // 0005 CALL R2 1
+ 0x8C080302, // 0006 GETMET R2 R1 K2
+ 0x7C080200, // 0007 CALL R2 1
+ 0x8C0C0503, // 0008 GETMET R3 R2 K3
+ 0x58140004, // 0009 LDCONST R5 K4
+ 0x4C180000, // 000A LDNIL R6
+ 0x7C0C0600, // 000B CALL R3 3
+ 0x8C100503, // 000C GETMET R4 R2 K3
+ 0x58180005, // 000D LDCONST R6 K5
+ 0x4C1C0000, // 000E LDNIL R7
+ 0x7C100600, // 000F CALL R4 3
+ 0x4C140000, // 0010 LDNIL R5
+ 0x20140605, // 0011 NE R5 R3 R5
+ 0x78160009, // 0012 JMPF R5 #001D
+ 0xB8160C00, // 0013 GETNGBL R5 K6
+ 0x8C140B07, // 0014 GETMET R5 R5 K7
+ 0x5C1C0600, // 0015 MOVE R7 R3
+ 0x58200008, // 0016 LDCONST R8 K8
+ 0x54260167, // 0017 LDINT R9 360
+ 0x58280008, // 0018 LDCONST R10 K8
+ 0x542E00FD, // 0019 LDINT R11 254
+ 0x7C140C00, // 001A CALL R5 6
+ 0x5C0C0A00, // 001B MOVE R3 R5
+ 0x70020000, // 001C JMP #001E
+ 0x880C0109, // 001D GETMBR R3 R0 K9
+ 0x4C140000, // 001E LDNIL R5
+ 0x20140805, // 001F NE R5 R4 R5
+ 0x78160009, // 0020 JMPF R5 #002B
+ 0xB8160C00, // 0021 GETNGBL R5 K6
+ 0x8C140B07, // 0022 GETMET R5 R5 K7
+ 0x5C1C0800, // 0023 MOVE R7 R4
+ 0x58200008, // 0024 LDCONST R8 K8
+ 0x542600FE, // 0025 LDINT R9 255
+ 0x58280008, // 0026 LDCONST R10 K8
+ 0x542E00FD, // 0027 LDINT R11 254
+ 0x7C140C00, // 0028 CALL R5 6
+ 0x5C100A00, // 0029 MOVE R4 R5
+ 0x70020000, // 002A JMP #002C
+ 0x8810010A, // 002B GETMBR R4 R0 K10
+ 0x88140109, // 002C GETMBR R5 R0 K9
+ 0x20140605, // 002D NE R5 R3 R5
+ 0x78160005, // 002E JMPF R5 #0035
+ 0x8C14010B, // 002F GETMET R5 R0 K11
+ 0x4C1C0000, // 0030 LDNIL R7
+ 0x542202FF, // 0031 LDINT R8 768
+ 0x58240008, // 0032 LDCONST R9 K8
+ 0x7C140800, // 0033 CALL R5 4
+ 0x90021203, // 0034 SETMBR R0 K9 R3
+ 0x8814010A, // 0035 GETMBR R5 R0 K10
+ 0x20140805, // 0036 NE R5 R4 R5
+ 0x78160005, // 0037 JMPF R5 #003E
+ 0x8C14010B, // 0038 GETMET R5 R0 K11
+ 0x4C1C0000, // 0039 LDNIL R7
+ 0x542202FF, // 003A LDINT R8 768
+ 0x5824000C, // 003B LDCONST R9 K12
+ 0x7C140800, // 003C CALL R5 4
+ 0x90021404, // 003D SETMBR R0 K10 R4
+ 0x80000000, // 003E RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_nested_str_weak(shadow_hue),
+ /* K9 */ be_const_int(1),
+ /* K10 */ be_nested_str_weak(shadow_sat),
+ /* K11 */ be_nested_str_weak(U4),
+ /* K12 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[105]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E02FF, // 0005 LDINT R7 768
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E0057, // 0007 JMPF R7 #0060
+ 0x1C1C0D05, // 0008 EQ R7 R6 K5
+ 0x781E0005, // 0009 JMPF R7 #0010
+ 0x8C1C0906, // 000A GETMET R7 R4 K6
+ 0x88240907, // 000B GETMBR R9 R4 K7
+ 0x88280108, // 000C GETMBR R10 R0 K8
+ 0x7C1C0600, // 000D CALL R7 3
+ 0x80040E00, // 000E RET 1 R7
+ 0x7002004E, // 000F JMP #005F
+ 0x1C1C0D09, // 0010 EQ R7 R6 K9
+ 0x781E0005, // 0011 JMPF R7 #0018
+ 0x8C1C0906, // 0012 GETMET R7 R4 K6
+ 0x88240907, // 0013 GETMBR R9 R4 K7
+ 0x8828010A, // 0014 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0x80040E00, // 0016 RET 1 R7
+ 0x70020046, // 0017 JMP #005F
+ 0x541E0006, // 0018 LDINT R7 7
+ 0x1C1C0C07, // 0019 EQ R7 R6 R7
+ 0x781E0005, // 001A JMPF R7 #0021
+ 0x8C1C0906, // 001B GETMET R7 R4 K6
+ 0x88240907, // 001C GETMBR R9 R4 K7
+ 0x58280005, // 001D LDCONST R10 K5
+ 0x7C1C0600, // 001E CALL R7 3
+ 0x80040E00, // 001F RET 1 R7
+ 0x7002003D, // 0020 JMP #005F
+ 0x541E0007, // 0021 LDINT R7 8
+ 0x1C1C0C07, // 0022 EQ R7 R6 R7
+ 0x781E0005, // 0023 JMPF R7 #002A
+ 0x8C1C0906, // 0024 GETMET R7 R4 K6
+ 0x88240907, // 0025 GETMBR R9 R4 K7
+ 0x58280005, // 0026 LDCONST R10 K5
+ 0x7C1C0600, // 0027 CALL R7 3
+ 0x80040E00, // 0028 RET 1 R7
+ 0x70020034, // 0029 JMP #005F
+ 0x541E000E, // 002A LDINT R7 15
+ 0x1C1C0C07, // 002B EQ R7 R6 R7
+ 0x781E0005, // 002C JMPF R7 #0033
+ 0x8C1C0906, // 002D GETMET R7 R4 K6
+ 0x88240907, // 002E GETMBR R9 R4 K7
+ 0x58280005, // 002F LDCONST R10 K5
+ 0x7C1C0600, // 0030 CALL R7 3
+ 0x80040E00, // 0031 RET 1 R7
+ 0x7002002B, // 0032 JMP #005F
+ 0x541E4000, // 0033 LDINT R7 16385
+ 0x1C1C0C07, // 0034 EQ R7 R6 R7
+ 0x781E0005, // 0035 JMPF R7 #003C
+ 0x8C1C0906, // 0036 GETMET R7 R4 K6
+ 0x88240907, // 0037 GETMBR R9 R4 K7
+ 0x58280005, // 0038 LDCONST R10 K5
+ 0x7C1C0600, // 0039 CALL R7 3
+ 0x80040E00, // 003A RET 1 R7
+ 0x70020022, // 003B JMP #005F
+ 0x541E4009, // 003C LDINT R7 16394
+ 0x1C1C0C07, // 003D EQ R7 R6 R7
+ 0x781E0005, // 003E JMPF R7 #0045
+ 0x8C1C0906, // 003F GETMET R7 R4 K6
+ 0x88240907, // 0040 GETMBR R9 R4 K7
+ 0x58280005, // 0041 LDCONST R10 K5
+ 0x7C1C0600, // 0042 CALL R7 3
+ 0x80040E00, // 0043 RET 1 R7
+ 0x70020019, // 0044 JMP #005F
+ 0x541E000F, // 0045 LDINT R7 16
+ 0x1C1C0C07, // 0046 EQ R7 R6 R7
+ 0x781E0005, // 0047 JMPF R7 #004E
+ 0x8C1C0906, // 0048 GETMET R7 R4 K6
+ 0x88240907, // 0049 GETMBR R9 R4 K7
+ 0x58280005, // 004A LDCONST R10 K5
+ 0x7C1C0600, // 004B CALL R7 3
+ 0x80040E00, // 004C RET 1 R7
+ 0x70020010, // 004D JMP #005F
+ 0x541EFFFB, // 004E LDINT R7 65532
+ 0x1C1C0C07, // 004F EQ R7 R6 R7
+ 0x781E0005, // 0050 JMPF R7 #0057
+ 0x8C1C0906, // 0051 GETMET R7 R4 K6
+ 0x8824090B, // 0052 GETMBR R9 R4 K11
+ 0x58280009, // 0053 LDCONST R10 K9
+ 0x7C1C0600, // 0054 CALL R7 3
+ 0x80040E00, // 0055 RET 1 R7
+ 0x70020007, // 0056 JMP #005F
+ 0x541EFFFC, // 0057 LDINT R7 65533
+ 0x1C1C0C07, // 0058 EQ R7 R6 R7
+ 0x781E0004, // 0059 JMPF R7 #005F
+ 0x8C1C0906, // 005A GETMET R7 R4 K6
+ 0x8824090B, // 005B GETMBR R9 R4 K11
+ 0x542A0004, // 005C LDINT R10 5
+ 0x7C1C0600, // 005D CALL R7 3
+ 0x80040E00, // 005E RET 1 R7
+ 0x70020007, // 005F JMP #0068
+ 0x601C0003, // 0060 GETGBL R7 G3
+ 0x5C200000, // 0061 MOVE R8 R0
+ 0x7C1C0200, // 0062 CALL R7 1
+ 0x8C1C0F0C, // 0063 GETMET R7 R7 K12
+ 0x5C240200, // 0064 MOVE R9 R1
+ 0x5C280400, // 0065 MOVE R10 R2
+ 0x7C1C0600, // 0066 CALL R7 3
+ 0x80040E00, // 0067 RET 1 R7
+ 0x80000000, // 0068 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light3_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_hue),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(shadow_sat),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x90020302, // 0008 SETMBR R0 K1 K2
+ 0x90020702, // 0009 SETMBR R0 K3 K2
+ 0x80000000, // 000A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -199,287 +480,6 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
- be_nested_proto(
- 11, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_hue),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(shadow_sat),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[105]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E02FF, // 0005 LDINT R7 768
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E0057, // 0007 JMPF R7 #0060
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x7002004E, // 000F JMP #005F
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x8828010A, // 0014 GETMBR R10 R0 K10
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x70020046, // 0017 JMP #005F
- 0x541E0006, // 0018 LDINT R7 7
- 0x1C1C0C07, // 0019 EQ R7 R6 R7
- 0x781E0005, // 001A JMPF R7 #0021
- 0x8C1C0906, // 001B GETMET R7 R4 K6
- 0x88240907, // 001C GETMBR R9 R4 K7
- 0x58280005, // 001D LDCONST R10 K5
- 0x7C1C0600, // 001E CALL R7 3
- 0x80040E00, // 001F RET 1 R7
- 0x7002003D, // 0020 JMP #005F
- 0x541E0007, // 0021 LDINT R7 8
- 0x1C1C0C07, // 0022 EQ R7 R6 R7
- 0x781E0005, // 0023 JMPF R7 #002A
- 0x8C1C0906, // 0024 GETMET R7 R4 K6
- 0x88240907, // 0025 GETMBR R9 R4 K7
- 0x58280005, // 0026 LDCONST R10 K5
- 0x7C1C0600, // 0027 CALL R7 3
- 0x80040E00, // 0028 RET 1 R7
- 0x70020034, // 0029 JMP #005F
- 0x541E000E, // 002A LDINT R7 15
- 0x1C1C0C07, // 002B EQ R7 R6 R7
- 0x781E0005, // 002C JMPF R7 #0033
- 0x8C1C0906, // 002D GETMET R7 R4 K6
- 0x88240907, // 002E GETMBR R9 R4 K7
- 0x58280005, // 002F LDCONST R10 K5
- 0x7C1C0600, // 0030 CALL R7 3
- 0x80040E00, // 0031 RET 1 R7
- 0x7002002B, // 0032 JMP #005F
- 0x541E4000, // 0033 LDINT R7 16385
- 0x1C1C0C07, // 0034 EQ R7 R6 R7
- 0x781E0005, // 0035 JMPF R7 #003C
- 0x8C1C0906, // 0036 GETMET R7 R4 K6
- 0x88240907, // 0037 GETMBR R9 R4 K7
- 0x58280005, // 0038 LDCONST R10 K5
- 0x7C1C0600, // 0039 CALL R7 3
- 0x80040E00, // 003A RET 1 R7
- 0x70020022, // 003B JMP #005F
- 0x541E4009, // 003C LDINT R7 16394
- 0x1C1C0C07, // 003D EQ R7 R6 R7
- 0x781E0005, // 003E JMPF R7 #0045
- 0x8C1C0906, // 003F GETMET R7 R4 K6
- 0x88240907, // 0040 GETMBR R9 R4 K7
- 0x58280005, // 0041 LDCONST R10 K5
- 0x7C1C0600, // 0042 CALL R7 3
- 0x80040E00, // 0043 RET 1 R7
- 0x70020019, // 0044 JMP #005F
- 0x541E000F, // 0045 LDINT R7 16
- 0x1C1C0C07, // 0046 EQ R7 R6 R7
- 0x781E0005, // 0047 JMPF R7 #004E
- 0x8C1C0906, // 0048 GETMET R7 R4 K6
- 0x88240907, // 0049 GETMBR R9 R4 K7
- 0x58280005, // 004A LDCONST R10 K5
- 0x7C1C0600, // 004B CALL R7 3
- 0x80040E00, // 004C RET 1 R7
- 0x70020010, // 004D JMP #005F
- 0x541EFFFB, // 004E LDINT R7 65532
- 0x1C1C0C07, // 004F EQ R7 R6 R7
- 0x781E0005, // 0050 JMPF R7 #0057
- 0x8C1C0906, // 0051 GETMET R7 R4 K6
- 0x8824090B, // 0052 GETMBR R9 R4 K11
- 0x58280009, // 0053 LDCONST R10 K9
- 0x7C1C0600, // 0054 CALL R7 3
- 0x80040E00, // 0055 RET 1 R7
- 0x70020007, // 0056 JMP #005F
- 0x541EFFFC, // 0057 LDINT R7 65533
- 0x1C1C0C07, // 0058 EQ R7 R6 R7
- 0x781E0004, // 0059 JMPF R7 #005F
- 0x8C1C0906, // 005A GETMET R7 R4 K6
- 0x8824090B, // 005B GETMBR R9 R4 K11
- 0x542A0004, // 005C LDINT R10 5
- 0x7C1C0600, // 005D CALL R7 3
- 0x80040E00, // 005E RET 1 R7
- 0x70020007, // 005F JMP #0068
- 0x601C0003, // 0060 GETGBL R7 G3
- 0x5C200000, // 0061 MOVE R8 R0
- 0x7C1C0200, // 0062 CALL R7 1
- 0x8C1C0F0C, // 0063 GETMET R7 R7 K12
- 0x5C240200, // 0064 MOVE R9 R1
- 0x5C280400, // 0065 MOVE R10 R2
- 0x7C1C0600, // 0066 CALL R7 3
- 0x80040E00, // 0067 RET 1 R7
- 0x80000000, // 0068 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
- be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(update_shadow),
- /* K2 */ be_nested_str_weak(get),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(hue),
- /* K5 */ be_nested_str_weak(sat),
- /* K6 */ be_nested_str_weak(tasmota),
- /* K7 */ be_nested_str_weak(scale_uint),
- /* K8 */ be_const_int(0),
- /* K9 */ be_nested_str_weak(shadow_hue),
- /* K10 */ be_nested_str_weak(shadow_sat),
- /* K11 */ be_nested_str_weak(attribute_updated),
- /* K12 */ be_const_int(1),
- }),
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[63]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x60080003, // 0001 GETGBL R2 G3
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C080200, // 0003 CALL R2 1
- 0x8C080501, // 0004 GETMET R2 R2 K1
- 0x7C080200, // 0005 CALL R2 1
- 0x8C080302, // 0006 GETMET R2 R1 K2
- 0x7C080200, // 0007 CALL R2 1
- 0x8C0C0503, // 0008 GETMET R3 R2 K3
- 0x58140004, // 0009 LDCONST R5 K4
- 0x4C180000, // 000A LDNIL R6
- 0x7C0C0600, // 000B CALL R3 3
- 0x8C100503, // 000C GETMET R4 R2 K3
- 0x58180005, // 000D LDCONST R6 K5
- 0x4C1C0000, // 000E LDNIL R7
- 0x7C100600, // 000F CALL R4 3
- 0x4C140000, // 0010 LDNIL R5
- 0x20140605, // 0011 NE R5 R3 R5
- 0x78160009, // 0012 JMPF R5 #001D
- 0xB8160C00, // 0013 GETNGBL R5 K6
- 0x8C140B07, // 0014 GETMET R5 R5 K7
- 0x5C1C0600, // 0015 MOVE R7 R3
- 0x58200008, // 0016 LDCONST R8 K8
- 0x54260167, // 0017 LDINT R9 360
- 0x58280008, // 0018 LDCONST R10 K8
- 0x542E00FD, // 0019 LDINT R11 254
- 0x7C140C00, // 001A CALL R5 6
- 0x5C0C0A00, // 001B MOVE R3 R5
- 0x70020000, // 001C JMP #001E
- 0x880C0109, // 001D GETMBR R3 R0 K9
- 0x4C140000, // 001E LDNIL R5
- 0x20140805, // 001F NE R5 R4 R5
- 0x78160009, // 0020 JMPF R5 #002B
- 0xB8160C00, // 0021 GETNGBL R5 K6
- 0x8C140B07, // 0022 GETMET R5 R5 K7
- 0x5C1C0800, // 0023 MOVE R7 R4
- 0x58200008, // 0024 LDCONST R8 K8
- 0x542600FE, // 0025 LDINT R9 255
- 0x58280008, // 0026 LDCONST R10 K8
- 0x542E00FD, // 0027 LDINT R11 254
- 0x7C140C00, // 0028 CALL R5 6
- 0x5C100A00, // 0029 MOVE R4 R5
- 0x70020000, // 002A JMP #002C
- 0x8810010A, // 002B GETMBR R4 R0 K10
- 0x88140109, // 002C GETMBR R5 R0 K9
- 0x20140605, // 002D NE R5 R3 R5
- 0x78160005, // 002E JMPF R5 #0035
- 0x8C14010B, // 002F GETMET R5 R0 K11
- 0x4C1C0000, // 0030 LDNIL R7
- 0x542202FF, // 0031 LDINT R8 768
- 0x58240008, // 0032 LDCONST R9 K8
- 0x7C140800, // 0033 CALL R5 4
- 0x90021203, // 0034 SETMBR R0 K9 R3
- 0x8814010A, // 0035 GETMBR R5 R0 K10
- 0x20140805, // 0036 NE R5 R4 R5
- 0x78160005, // 0037 JMPF R5 #003E
- 0x8C14010B, // 0038 GETMET R5 R0 K11
- 0x4C1C0000, // 0039 LDNIL R7
- 0x542202FF, // 003A LDINT R8 768
- 0x5824000C, // 003B LDCONST R9 K12
- 0x7C140800, // 003C CALL R5 4
- 0x90021404, // 003D SETMBR R0 K10 R4
- 0x80000000, // 003E RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Light3_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_hue),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(shadow_sat),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x90020302, // 0008 SETMBR R0 K1 K2
- 0x90020702, // 0009 SETMBR R0 K3 K2
- 0x80000000, // 000A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_Light3
********************************************************************/
@@ -487,20 +487,15 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light3,
2,
&be_class_Matter_Plugin_Light1,
- be_nested_map(9,
+ be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
- { be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(light3) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(shadow_hue, 8), be_const_var(0) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
- { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -518,6 +513,12 @@ be_local_class(Matter_Plugin_Light3,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(NAME, 3), be_nested_str_weak(Light_X203_X20RGB) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
+ { be_const_key_weak(shadow_sat, -1), be_const_var(1) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
+ { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
})),
be_str_weak(Matter_Plugin_Light3)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
index 24b8911b4..509ff2714 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
@@ -7,94 +7,49 @@
extern const bclass be_class_Matter_Plugin_OnOff;
/********************************************************************
-** Solidified function: get_onoff
+** Solidified function: init
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
+be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
+ 9, /* nstack */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(get_power),
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(get_onoff),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(shadow_onoff),
- /* K4 */ be_nested_str_weak(onoff_changed),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(ARG),
+ /* K5 */ be_const_int(0),
}),
- be_str_weak(get_onoff),
+ be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x880C0102, // 0002 GETMBR R3 R0 K2
- 0x7C040400, // 0003 CALL R1 2
- 0x4C080000, // 0004 LDNIL R2
- 0x20080202, // 0005 NE R2 R1 R2
- 0x780A000C, // 0006 JMPF R2 #0014
- 0x88080103, // 0007 GETMBR R2 R0 K3
- 0x4C0C0000, // 0008 LDNIL R3
- 0x20080403, // 0009 NE R2 R2 R3
- 0x780A0007, // 000A JMPF R2 #0013
- 0x88080103, // 000B GETMBR R2 R0 K3
- 0x600C0017, // 000C GETGBL R3 G23
- 0x5C100200, // 000D MOVE R4 R1
- 0x7C0C0200, // 000E CALL R3 1
- 0x20080403, // 000F NE R2 R2 R3
- 0x780A0001, // 0010 JMPF R2 #0013
- 0x8C080104, // 0011 GETMET R2 R0 K4
- 0x7C080200, // 0012 CALL R2 1
- 0x90020601, // 0013 SETMBR R0 K3 R1
- 0x88080103, // 0014 GETMBR R2 R0 K3
- 0x4C0C0000, // 0015 LDNIL R3
- 0x1C080403, // 0016 EQ R2 R2 R3
- 0x780A0001, // 0017 JMPF R2 #001A
- 0x50080000, // 0018 LDBOOL R2 0 0
- 0x90020602, // 0019 SETMBR R0 K3 R2
- 0x88080103, // 001A GETMBR R2 R0 K3
- 0x80040400, // 001B RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_onoff
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(get_onoff),
- }),
- be_str_weak(set_onoff),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x88100102, // 0002 GETMBR R4 R0 K2
- 0x60140017, // 0003 GETGBL R5 G23
+ ( &(const binstruction[20]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
- 0x7C140200, // 0005 CALL R5 1
- 0x7C080600, // 0006 CALL R2 3
- 0x8C080103, // 0007 GETMET R2 R0 K3
- 0x7C080200, // 0008 CALL R2 1
- 0x80000000, // 0009 RET 0
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 0x7C100200, // 0009 CALL R4 1
+ 0x8C100703, // 000A GETMET R4 R3 K3
+ 0x88180104, // 000B GETMBR R6 R0 K4
+ 0x7C100400, // 000C CALL R4 2
+ 0x90020404, // 000D SETMBR R0 K2 R4
+ 0x88100102, // 000E GETMBR R4 R0 K2
+ 0x4C140000, // 000F LDNIL R5
+ 0x1C100805, // 0010 EQ R4 R4 R5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020505, // 0012 SETMBR R0 K2 K5
+ 0x80000000, // 0013 RET 0
})
)
);
@@ -258,91 +213,9 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
/********************************************************************
-** Solidified function: init
+** Solidified function: set_onoff
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(get_onoff),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(relay),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 0x7C100200, // 0009 CALL R4 1
- 0x8C100703, // 000A GETMET R4 R3 K3
- 0x58180004, // 000B LDCONST R6 K4
- 0x7C100400, // 000C CALL R4 2
- 0x90020404, // 000D SETMBR R0 K2 R4
- 0x88100102, // 000E GETMBR R4 R0 K2
- 0x4C140000, // 000F LDNIL R5
- 0x1C100805, // 0010 EQ R4 R4 R5
- 0x78120000, // 0011 JMPF R4 #0013
- 0x90020505, // 0012 SETMBR R0 K2 K5
- 0x80000000, // 0013 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: onoff_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(onoff_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x54120005, // 0002 LDINT R4 6
- 0x58140001, // 0003 LDCONST R5 K1
- 0x7C040800, // 0004 CALL R1 4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: to_json_parameters
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
+be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
@@ -353,21 +226,108 @@ be_local_closure(Matter_Plugin_OnOff_to_json_parameters, /* name */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(format),
- /* K2 */ be_nested_str_weak(_X2C_X22relay_X22_X3A_X25i),
- /* K3 */ be_nested_str_weak(tasmota_relay_index),
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(get_onoff),
}),
- be_str_weak(to_json_parameters),
+ be_str_weak(set_onoff),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x8C0C0501, // 0001 GETMET R3 R2 K1
- 0x58140002, // 0002 LDCONST R5 K2
- 0x88180103, // 0003 GETMBR R6 R0 K3
- 0x7C0C0600, // 0004 CALL R3 3
- 0x00040203, // 0005 ADD R1 R1 R3
- 0x80040200, // 0006 RET 1 R1
+ ( &(const binstruction[10]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x60140017, // 0003 GETGBL R5 G23
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x7C140200, // 0005 CALL R5 1
+ 0x7C080600, // 0006 CALL R2 3
+ 0x8C080103, // 0007 GETMET R2 R0 K3
+ 0x7C080200, // 0008 CALL R2 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040009, // 0000 GETGBL R1 G9
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_onoff
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(get_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(shadow_onoff),
+ /* K4 */ be_nested_str_weak(onoff_changed),
+ }),
+ be_str_weak(get_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x880C0102, // 0002 GETMBR R3 R0 K2
+ 0x7C040400, // 0003 CALL R1 2
+ 0x4C080000, // 0004 LDNIL R2
+ 0x20080202, // 0005 NE R2 R1 R2
+ 0x780A000C, // 0006 JMPF R2 #0014
+ 0x88080103, // 0007 GETMBR R2 R0 K3
+ 0x4C0C0000, // 0008 LDNIL R3
+ 0x20080403, // 0009 NE R2 R2 R3
+ 0x780A0007, // 000A JMPF R2 #0013
+ 0x88080103, // 000B GETMBR R2 R0 K3
+ 0x600C0017, // 000C GETGBL R3 G23
+ 0x5C100200, // 000D MOVE R4 R1
+ 0x7C0C0200, // 000E CALL R3 1
+ 0x20080403, // 000F NE R2 R2 R3
+ 0x780A0001, // 0010 JMPF R2 #0013
+ 0x8C080104, // 0011 GETMET R2 R0 K4
+ 0x7C080200, // 0012 CALL R2 1
+ 0x90020601, // 0013 SETMBR R0 K3 R1
+ 0x88080103, // 0014 GETMBR R2 R0 K3
+ 0x4C0C0000, // 0015 LDNIL R3
+ 0x1C080403, // 0016 EQ R2 R2 R3
+ 0x780A0001, // 0017 JMPF R2 #001A
+ 0x50080000, // 0018 LDBOOL R2 0 0
+ 0x90020602, // 0019 SETMBR R0 K3 R2
+ 0x88080103, // 001A GETMBR R2 R0 K3
+ 0x80040400, // 001B RET 1 R2
})
)
);
@@ -615,6 +575,38 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: onoff_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(onoff_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0x54120005, // 0002 LDINT R4 6
+ 0x58140001, // 0003 LDCONST R5 K1
+ 0x7C040800, // 0004 CALL R1 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
@@ -622,19 +614,20 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_OnOff,
2,
&be_class_Matter_Plugin,
- be_nested_map(13,
+ be_nested_map(15,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
- { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
- { be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
+ { be_const_key_weak(init, 8), be_const_closure(Matter_Plugin_OnOff_init_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(266, -1), be_const_int(2) },
+ })) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
- { be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
- { be_const_key_weak(to_json_parameters, -1), be_const_closure(Matter_Plugin_OnOff_to_json_parameters_closure) },
- { be_const_key_weak(NAME, 3), be_nested_str_weak(relay) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
+ { be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
+ { be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(CLUSTERS, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -672,12 +665,13 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(set_onoff, 4), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(266, -1), be_const_int(2) },
- })) ) } )) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
+ { be_const_key_weak(ARG, 11), be_nested_str_weak(relay) },
+ { be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
+ { be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
index 0ed2d4962..05e8ec97d 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
@@ -6,6 +6,181 @@
extern const bclass be_class_Matter_Plugin_Root;
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Root_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 9]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x80000000, // 0008 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(int),
+ /* K7 */ be_nested_str_weak(int64),
+ /* K8 */ be_nested_str_weak(_breadcrumb),
+ /* K9 */ be_nested_str_weak(attribute_updated),
+ /* K10 */ be_nested_str_weak(endpoint),
+ /* K11 */ be_nested_str_weak(status),
+ /* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
+ /* K13 */ be_const_int(1),
+ /* K14 */ be_nested_str_weak(INVALID_ACTION),
+ }),
+ be_str_weak(write_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[102]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xB8160200, // 0001 GETNGBL R5 K1
+ 0x88140B02, // 0002 GETMBR R5 R5 K2
+ 0x88180503, // 0003 GETMBR R6 R2 K3
+ 0x881C0504, // 0004 GETMBR R7 R2 K4
+ 0x5422002F, // 0005 LDINT R8 48
+ 0x1C200C08, // 0006 EQ R8 R6 R8
+ 0x7822001A, // 0007 JMPF R8 #0023
+ 0x1C200F05, // 0008 EQ R8 R7 K5
+ 0x78220017, // 0009 JMPF R8 #0022
+ 0x60200004, // 000A GETGBL R8 G4
+ 0x5C240600, // 000B MOVE R9 R3
+ 0x7C200200, // 000C CALL R8 1
+ 0x1C201106, // 000D EQ R8 R8 K6
+ 0x74220004, // 000E JMPT R8 #0014
+ 0x6020000F, // 000F GETGBL R8 G15
+ 0x5C240600, // 0010 MOVE R9 R3
+ 0xB82A0E00, // 0011 GETNGBL R10 K7
+ 0x7C200400, // 0012 CALL R8 2
+ 0x78220008, // 0013 JMPF R8 #001D
+ 0x90061003, // 0014 SETMBR R1 K8 R3
+ 0x8C200109, // 0015 GETMET R8 R0 K9
+ 0x8828050A, // 0016 GETMBR R10 R2 K10
+ 0x882C0503, // 0017 GETMBR R11 R2 K3
+ 0x88300504, // 0018 GETMBR R12 R2 K4
+ 0x7C200800, // 0019 CALL R8 4
+ 0x50200200, // 001A LDBOOL R8 1 0
+ 0x80041000, // 001B RET 1 R8
+ 0x70020004, // 001C JMP #0022
+ 0xB8220200, // 001D GETNGBL R8 K1
+ 0x8820110C, // 001E GETMBR R8 R8 K12
+ 0x900A1608, // 001F SETMBR R2 K11 R8
+ 0x50200000, // 0020 LDBOOL R8 0 0
+ 0x80041000, // 0021 RET 1 R8
+ 0x70020041, // 0022 JMP #0065
+ 0x5422001E, // 0023 LDINT R8 31
+ 0x1C200C08, // 0024 EQ R8 R6 R8
+ 0x78220004, // 0025 JMPF R8 #002B
+ 0x1C200F05, // 0026 EQ R8 R7 K5
+ 0x78220001, // 0027 JMPF R8 #002A
+ 0x50200200, // 0028 LDBOOL R8 1 0
+ 0x80041000, // 0029 RET 1 R8
+ 0x70020039, // 002A JMP #0065
+ 0x54220027, // 002B LDINT R8 40
+ 0x1C200C08, // 002C EQ R8 R6 R8
+ 0x7822000B, // 002D JMPF R8 #003A
+ 0x54220004, // 002E LDINT R8 5
+ 0x1C200E08, // 002F EQ R8 R7 R8
+ 0x78220002, // 0030 JMPF R8 #0034
+ 0x50200200, // 0031 LDBOOL R8 1 0
+ 0x80041000, // 0032 RET 1 R8
+ 0x70020004, // 0033 JMP #0039
+ 0x54220005, // 0034 LDINT R8 6
+ 0x1C200E08, // 0035 EQ R8 R7 R8
+ 0x78220001, // 0036 JMPF R8 #0039
+ 0x50200200, // 0037 LDBOOL R8 1 0
+ 0x80041000, // 0038 RET 1 R8
+ 0x7002002A, // 0039 JMP #0065
+ 0x54220029, // 003A LDINT R8 42
+ 0x1C200C08, // 003B EQ R8 R6 R8
+ 0x78220004, // 003C JMPF R8 #0042
+ 0x1C200F05, // 003D EQ R8 R7 K5
+ 0x78220001, // 003E JMPF R8 #0041
+ 0x50200200, // 003F LDBOOL R8 1 0
+ 0x80041000, // 0040 RET 1 R8
+ 0x70020022, // 0041 JMP #0065
+ 0x5422002A, // 0042 LDINT R8 43
+ 0x1C200C08, // 0043 EQ R8 R6 R8
+ 0x78220007, // 0044 JMPF R8 #004D
+ 0x1C200F05, // 0045 EQ R8 R7 K5
+ 0x78220004, // 0046 JMPF R8 #004C
+ 0xB8220200, // 0047 GETNGBL R8 K1
+ 0x8820110C, // 0048 GETMBR R8 R8 K12
+ 0x900A1608, // 0049 SETMBR R2 K11 R8
+ 0x50200000, // 004A LDBOOL R8 0 0
+ 0x80041000, // 004B RET 1 R8
+ 0x70020017, // 004C JMP #0065
+ 0x5422002B, // 004D LDINT R8 44
+ 0x1C200C08, // 004E EQ R8 R6 R8
+ 0x78220009, // 004F JMPF R8 #005A
+ 0x1C200F05, // 0050 EQ R8 R7 K5
+ 0x78220002, // 0051 JMPF R8 #0055
+ 0x50200200, // 0052 LDBOOL R8 1 0
+ 0x80041000, // 0053 RET 1 R8
+ 0x70020003, // 0054 JMP #0059
+ 0x1C200F0D, // 0055 EQ R8 R7 K13
+ 0x78220001, // 0056 JMPF R8 #0059
+ 0x50200200, // 0057 LDBOOL R8 1 0
+ 0x80041000, // 0058 RET 1 R8
+ 0x7002000A, // 0059 JMP #0065
+ 0x54220030, // 005A LDINT R8 49
+ 0x1C200C08, // 005B EQ R8 R6 R8
+ 0x78220007, // 005C JMPF R8 #0065
+ 0x54220003, // 005D LDINT R8 4
+ 0x1C200E08, // 005E EQ R8 R7 R8
+ 0x78220004, // 005F JMPF R8 #0065
+ 0xB8220200, // 0060 GETNGBL R8 K1
+ 0x8820110E, // 0061 GETMBR R8 R8 K14
+ 0x900A1608, // 0062 SETMBR R2 K11 R8
+ 0x50200000, // 0063 LDBOOL R8 0 0
+ 0x80041000, // 0064 RET 1 R8
+ 0x80000000, // 0065 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -1005,181 +1180,6 @@ be_local_closure(Matter_Plugin_Root_read_attribute, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: write_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
- be_nested_proto(
- 13, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(int),
- /* K7 */ be_nested_str_weak(int64),
- /* K8 */ be_nested_str_weak(_breadcrumb),
- /* K9 */ be_nested_str_weak(attribute_updated),
- /* K10 */ be_nested_str_weak(endpoint),
- /* K11 */ be_nested_str_weak(status),
- /* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
- /* K13 */ be_const_int(1),
- /* K14 */ be_nested_str_weak(INVALID_ACTION),
- }),
- be_str_weak(write_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[102]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xB8160200, // 0001 GETNGBL R5 K1
- 0x88140B02, // 0002 GETMBR R5 R5 K2
- 0x88180503, // 0003 GETMBR R6 R2 K3
- 0x881C0504, // 0004 GETMBR R7 R2 K4
- 0x5422002F, // 0005 LDINT R8 48
- 0x1C200C08, // 0006 EQ R8 R6 R8
- 0x7822001A, // 0007 JMPF R8 #0023
- 0x1C200F05, // 0008 EQ R8 R7 K5
- 0x78220017, // 0009 JMPF R8 #0022
- 0x60200004, // 000A GETGBL R8 G4
- 0x5C240600, // 000B MOVE R9 R3
- 0x7C200200, // 000C CALL R8 1
- 0x1C201106, // 000D EQ R8 R8 K6
- 0x74220004, // 000E JMPT R8 #0014
- 0x6020000F, // 000F GETGBL R8 G15
- 0x5C240600, // 0010 MOVE R9 R3
- 0xB82A0E00, // 0011 GETNGBL R10 K7
- 0x7C200400, // 0012 CALL R8 2
- 0x78220008, // 0013 JMPF R8 #001D
- 0x90061003, // 0014 SETMBR R1 K8 R3
- 0x8C200109, // 0015 GETMET R8 R0 K9
- 0x8828050A, // 0016 GETMBR R10 R2 K10
- 0x882C0503, // 0017 GETMBR R11 R2 K3
- 0x88300504, // 0018 GETMBR R12 R2 K4
- 0x7C200800, // 0019 CALL R8 4
- 0x50200200, // 001A LDBOOL R8 1 0
- 0x80041000, // 001B RET 1 R8
- 0x70020004, // 001C JMP #0022
- 0xB8220200, // 001D GETNGBL R8 K1
- 0x8820110C, // 001E GETMBR R8 R8 K12
- 0x900A1608, // 001F SETMBR R2 K11 R8
- 0x50200000, // 0020 LDBOOL R8 0 0
- 0x80041000, // 0021 RET 1 R8
- 0x70020041, // 0022 JMP #0065
- 0x5422001E, // 0023 LDINT R8 31
- 0x1C200C08, // 0024 EQ R8 R6 R8
- 0x78220004, // 0025 JMPF R8 #002B
- 0x1C200F05, // 0026 EQ R8 R7 K5
- 0x78220001, // 0027 JMPF R8 #002A
- 0x50200200, // 0028 LDBOOL R8 1 0
- 0x80041000, // 0029 RET 1 R8
- 0x70020039, // 002A JMP #0065
- 0x54220027, // 002B LDINT R8 40
- 0x1C200C08, // 002C EQ R8 R6 R8
- 0x7822000B, // 002D JMPF R8 #003A
- 0x54220004, // 002E LDINT R8 5
- 0x1C200E08, // 002F EQ R8 R7 R8
- 0x78220002, // 0030 JMPF R8 #0034
- 0x50200200, // 0031 LDBOOL R8 1 0
- 0x80041000, // 0032 RET 1 R8
- 0x70020004, // 0033 JMP #0039
- 0x54220005, // 0034 LDINT R8 6
- 0x1C200E08, // 0035 EQ R8 R7 R8
- 0x78220001, // 0036 JMPF R8 #0039
- 0x50200200, // 0037 LDBOOL R8 1 0
- 0x80041000, // 0038 RET 1 R8
- 0x7002002A, // 0039 JMP #0065
- 0x54220029, // 003A LDINT R8 42
- 0x1C200C08, // 003B EQ R8 R6 R8
- 0x78220004, // 003C JMPF R8 #0042
- 0x1C200F05, // 003D EQ R8 R7 K5
- 0x78220001, // 003E JMPF R8 #0041
- 0x50200200, // 003F LDBOOL R8 1 0
- 0x80041000, // 0040 RET 1 R8
- 0x70020022, // 0041 JMP #0065
- 0x5422002A, // 0042 LDINT R8 43
- 0x1C200C08, // 0043 EQ R8 R6 R8
- 0x78220007, // 0044 JMPF R8 #004D
- 0x1C200F05, // 0045 EQ R8 R7 K5
- 0x78220004, // 0046 JMPF R8 #004C
- 0xB8220200, // 0047 GETNGBL R8 K1
- 0x8820110C, // 0048 GETMBR R8 R8 K12
- 0x900A1608, // 0049 SETMBR R2 K11 R8
- 0x50200000, // 004A LDBOOL R8 0 0
- 0x80041000, // 004B RET 1 R8
- 0x70020017, // 004C JMP #0065
- 0x5422002B, // 004D LDINT R8 44
- 0x1C200C08, // 004E EQ R8 R6 R8
- 0x78220009, // 004F JMPF R8 #005A
- 0x1C200F05, // 0050 EQ R8 R7 K5
- 0x78220002, // 0051 JMPF R8 #0055
- 0x50200200, // 0052 LDBOOL R8 1 0
- 0x80041000, // 0053 RET 1 R8
- 0x70020003, // 0054 JMP #0059
- 0x1C200F0D, // 0055 EQ R8 R7 K13
- 0x78220001, // 0056 JMPF R8 #0059
- 0x50200200, // 0057 LDBOOL R8 1 0
- 0x80041000, // 0058 RET 1 R8
- 0x7002000A, // 0059 JMP #0065
- 0x54220030, // 005A LDINT R8 49
- 0x1C200C08, // 005B EQ R8 R6 R8
- 0x78220007, // 005C JMPF R8 #0065
- 0x54220003, // 005D LDINT R8 4
- 0x1C200E08, // 005E EQ R8 R7 R8
- 0x78220004, // 005F JMPF R8 #0065
- 0xB8220200, // 0060 GETNGBL R8 K1
- 0x8820110E, // 0061 GETMBR R8 R8 K14
- 0x900A1608, // 0062 SETMBR R2 K11 R8
- 0x50200000, // 0063 LDBOOL R8 0 0
- 0x80041000, // 0064 RET 1 R8
- 0x80000000, // 0065 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Root_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x80000000, // 0008 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -2074,19 +2074,11 @@ extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Root,
0,
&be_class_Matter_Plugin,
- be_nested_map(7,
+ be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(root) },
- { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(22, -1), be_const_int(1) },
- })) ) } )) },
+ { be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Root_invoke_request_closure) },
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_Root_write_attribute_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Root_init_closure) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(CLUSTERS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(13,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(52, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -2188,6 +2180,15 @@ be_local_class(Matter_Plugin_Root,
be_const_int(2),
be_const_int(8),
})) ) } )) },
+ })) ) } )) },
+ { be_const_key_weak(init, 0), be_const_closure(Matter_Plugin_Root_init_closure) },
+ { be_const_key_weak(read_attribute, 7), be_const_closure(Matter_Plugin_Root_read_attribute_closure) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(root) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Root_X20node) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(22, -1), be_const_int(1) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Root)
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
index 8d7e7df1c..f91cef2c8 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
@@ -47,7 +47,7 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(tasmota_sensor_filter),
/* K2 */ be_nested_str_weak(find),
- /* K3 */ be_nested_str_weak(filter),
+ /* K3 */ be_nested_str_weak(ARG),
/* K4 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K5 */ be_nested_str_weak(tasmota),
/* K6 */ be_nested_str_weak(Rule_Matcher),
@@ -65,7 +65,7 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100702, // 0008 GETMET R4 R3 K2
- 0x58180003, // 0009 LDCONST R6 K3
+ 0x88180103, // 0009 GETMBR R6 R0 K3
0x7C100400, // 000A CALL R4 2
0x90020204, // 000B SETMBR R0 K1 R4
0x88100101, // 000C GETMBR R4 R0 K1
@@ -83,65 +83,6 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: to_json_parameters
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_to_json_parameters, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(format),
- /* K2 */ be_nested_str_weak(_X2C_X22filter_X22_X3A_X22_X25s_X22),
- /* K3 */ be_nested_str_weak(tasmota_sensor_filter),
- }),
- be_str_weak(to_json_parameters),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x8C0C0501, // 0001 GETMET R3 R2 K1
- 0x58140002, // 0002 LDCONST R5 K2
- 0x88180103, // 0003 GETMBR R6 R0 K3
- 0x7C0C0600, // 0004 CALL R3 3
- 0x00040203, // 0005 ADD R1 R1 R3
- 0x80040200, // 0006 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
@@ -192,6 +133,30 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Sensor
********************************************************************/
@@ -202,13 +167,13 @@ be_local_class(Matter_Plugin_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
- { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
- { be_const_key_weak(tasmota_sensor_filter, 7), be_const_var(0) },
- { be_const_key_weak(init, 6), be_const_closure(Matter_Plugin_Sensor_init_closure) },
- { be_const_key_weak(to_json_parameters, 1), be_const_closure(Matter_Plugin_Sensor_to_json_parameters_closure) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
- { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
+ { be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) },
+ { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
+ { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
+ { be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
})),
be_str_weak(Matter_Plugin_Sensor)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
index f04c97ac6..57146e067 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
@@ -6,66 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160404, // 0002 LDINT R5 1029
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -176,6 +116,66 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160404, // 0002 LDINT R5 1029
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Humidity
********************************************************************/
@@ -183,16 +183,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(6,
+ be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(NAME, 1), be_nested_str_weak(humidity) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
- { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(775, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
+ { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -206,7 +200,14 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
+ { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(775, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
index b45eb5f90..1ac6a351d 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
@@ -6,65 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Illuminance;
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x541603FF, // 0002 LDINT R5 1024
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -175,6 +116,65 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x541603FF, // 0002 LDINT R5 1024
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Illuminance
********************************************************************/
@@ -182,16 +182,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(6,
+ be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(NAME, 1), be_nested_str_weak(illuminance) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
- { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(262, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
+ { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -205,7 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
+ { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(262, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Illuminance)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
index 61968c3c1..d0e8aa69d 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
@@ -6,65 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160402, // 0002 LDINT R5 1027
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -175,6 +116,65 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x5C0C0200, // 0001 MOVE R3 R1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x80040400, // 0003 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160402, // 0002 LDINT R5 1027
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Pressure
********************************************************************/
@@ -182,16 +182,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(6,
+ be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(NAME, 1), be_nested_str_weak(pressure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
- { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(773, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
+ { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -205,7 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
+ { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(773, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
index 85e4d894a..48e76493a 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
@@ -6,66 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
-/********************************************************************
-** Solidified function: pre_value
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
- be_nested_proto(
- 4, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(pre_value),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: valued_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(valued_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160401, // 0002 LDINT R5 1026
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -173,6 +113,66 @@ be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: pre_value
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(pre_value),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x60080009, // 0000 GETGBL R2 G9
+ 0x540E0063, // 0001 LDINT R3 100
+ 0x080C0203, // 0002 MUL R3 R1 R3
+ 0x7C080200, // 0003 CALL R2 1
+ 0x80040400, // 0004 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: valued_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(attribute_updated),
+ /* K1 */ be_const_int(0),
+ }),
+ be_str_weak(valued_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x4C100000, // 0001 LDNIL R4
+ 0x54160401, // 0002 LDINT R5 1026
+ 0x58180001, // 0003 LDCONST R6 K1
+ 0x7C080800, // 0004 CALL R2 4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Temp
********************************************************************/
@@ -180,16 +180,10 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Temp,
0,
&be_class_Matter_Plugin_Sensor,
- be_nested_map(6,
+ be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(NAME, 1), be_nested_str_weak(temperature) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
- { be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(1,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(770, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
+ { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -203,7 +197,14 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
+ { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(770, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
+ { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
index 350e3a387..5805865d8 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -6,13 +6,375 @@
extern const bclass be_class_Matter_UI;
+/********************************************************************
+** Solidified function: show_commissioning_info
+********************************************************************/
+be_local_closure(Matter_UI_show_commissioning_info, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[20]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(device),
+ /* K3 */ be_nested_str_weak(commissioning_open),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(millis),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(content_send),
+ /* K8 */ be_nested_str_weak(format),
+ /* K9 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCommissioning_X20open_X20for_X20_X25i_X20min_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K10 */ be_nested_str_weak(compute_manual_pairing_code),
+ /* K11 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E),
+ /* K12 */ be_const_int(3),
+ /* K13 */ be_const_int(2147483647),
+ /* K14 */ be_nested_str_weak(_X3Cdiv_X3E_X3Ccenter_X3E),
+ /* K15 */ be_nested_str_weak(compute_qrcode_content),
+ /* K16 */ be_nested_str_weak(show_qrcode),
+ /* K17 */ be_nested_str_weak(_X3Cp_X3E_X20_X25s_X3C_X2Fp_X3E),
+ /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E),
+ /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_commissioning_info),
+ &be_const_str_solidified,
+ ( &(const binstruction[66]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x880C0102, // 0002 GETMBR R3 R0 K2
+ 0x880C0703, // 0003 GETMBR R3 R3 K3
+ 0xB8120800, // 0004 GETNGBL R4 K4
+ 0x8C100905, // 0005 GETMET R4 R4 K5
+ 0x7C100200, // 0006 CALL R4 1
+ 0x040C0604, // 0007 SUB R3 R3 R4
+ 0x541203E7, // 0008 LDINT R4 1000
+ 0x0C0C0604, // 0009 DIV R3 R3 R4
+ 0x14100706, // 000A LT R4 R3 K6
+ 0x78120000, // 000B JMPF R4 #000D
+ 0x580C0006, // 000C LDCONST R3 K6
+ 0x5412001D, // 000D LDINT R4 30
+ 0x00100604, // 000E ADD R4 R3 R4
+ 0x5416003B, // 000F LDINT R5 60
+ 0x0C100805, // 0010 DIV R4 R4 R5
+ 0x8C140307, // 0011 GETMET R5 R1 K7
+ 0x8C1C0508, // 0012 GETMET R7 R2 K8
+ 0x58240009, // 0013 LDCONST R9 K9
+ 0x5C280800, // 0014 MOVE R10 R4
+ 0x7C1C0600, // 0015 CALL R7 3
+ 0x7C140400, // 0016 CALL R5 2
+ 0x88140102, // 0017 GETMBR R5 R0 K2
+ 0x8C140B0A, // 0018 GETMET R5 R5 K10
+ 0x7C140200, // 0019 CALL R5 1
+ 0x8C180307, // 001A GETMET R6 R1 K7
+ 0x8C200508, // 001B GETMET R8 R2 K8
+ 0x5828000B, // 001C LDCONST R10 K11
+ 0x402E0D0C, // 001D CONNECT R11 K6 K12
+ 0x942C0A0B, // 001E GETIDX R11 R5 R11
+ 0x54320003, // 001F LDINT R12 4
+ 0x54360005, // 0020 LDINT R13 6
+ 0x4030180D, // 0021 CONNECT R12 R12 R13
+ 0x94300A0C, // 0022 GETIDX R12 R5 R12
+ 0x54360006, // 0023 LDINT R13 7
+ 0x40341B0D, // 0024 CONNECT R13 R13 K13
+ 0x94340A0D, // 0025 GETIDX R13 R5 R13
+ 0x7C200A00, // 0026 CALL R8 5
+ 0x7C180400, // 0027 CALL R6 2
+ 0x8C180307, // 0028 GETMET R6 R1 K7
+ 0x8C200508, // 0029 GETMET R8 R2 K8
+ 0x5828000E, // 002A LDCONST R10 K14
+ 0x7C200400, // 002B CALL R8 2
+ 0x7C180400, // 002C CALL R6 2
+ 0x88180102, // 002D GETMBR R6 R0 K2
+ 0x8C180D0F, // 002E GETMET R6 R6 K15
+ 0x7C180200, // 002F CALL R6 1
+ 0x8C1C0110, // 0030 GETMET R7 R0 K16
+ 0x5C240C00, // 0031 MOVE R9 R6
+ 0x7C1C0400, // 0032 CALL R7 2
+ 0x8C1C0307, // 0033 GETMET R7 R1 K7
+ 0x8C240508, // 0034 GETMET R9 R2 K8
+ 0x582C0011, // 0035 LDCONST R11 K17
+ 0x5C300C00, // 0036 MOVE R12 R6
+ 0x7C240600, // 0037 CALL R9 3
+ 0x7C1C0400, // 0038 CALL R7 2
+ 0x8C1C0307, // 0039 GETMET R7 R1 K7
+ 0x8C240508, // 003A GETMET R9 R2 K8
+ 0x582C0012, // 003B LDCONST R11 K18
+ 0x7C240400, // 003C CALL R9 2
+ 0x7C1C0400, // 003D CALL R7 2
+ 0x8C1C0307, // 003E GETMET R7 R1 K7
+ 0x58240013, // 003F LDCONST R9 K19
+ 0x7C1C0400, // 0040 CALL R7 2
+ 0x80000000, // 0041 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show_enable
+********************************************************************/
+be_local_closure(Matter_UI_show_enable, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[20]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(content_send),
+ /* K7 */ be_nested_str_weak(format),
+ /* K8 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K9 */ be_nested_str_weak(Enabled),
+ /* K10 */ be_nested_str_weak(Disabled),
+ /* K11 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A320px_X3B_X27_X3ECheck_X20the_X20_X3Ca_X20href_X3D_X27https_X3A_X2F_X2Ftasmota_X2Egithub_X2Eio_X2Fdocs_X2FMatter_X2F_X27_X20target_X3D_X27_blank_X27_X3EMatter_X20documentation_X3C_X2Fa_X3E_X2E_X3C_X2Fp_X3E),
+ /* K12 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
+ /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27_X25s_X27_X20class_X3D_X27button_X20bgrn_X27_X3E),
+ /* K14 */ be_nested_str_weak(disable),
+ /* K15 */ be_nested_str_weak(enable),
+ /* K16 */ be_nested_str_weak(Disable),
+ /* K17 */ be_nested_str_weak(Enable),
+ /* K18 */ be_nested_str_weak(_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_enable),
+ &be_const_str_solidified,
+ ( &(const binstruction[44]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xB8120400, // 0002 GETNGBL R4 K2
+ 0x8C100903, // 0003 GETMET R4 R4 K3
+ 0xB81A0800, // 0004 GETNGBL R6 K4
+ 0x88180D05, // 0005 GETMBR R6 R6 K5
+ 0x7C100400, // 0006 CALL R4 2
+ 0x8C140506, // 0007 GETMET R5 R2 K6
+ 0x8C1C0707, // 0008 GETMET R7 R3 K7
+ 0x58240008, // 0009 LDCONST R9 K8
+ 0x78120001, // 000A JMPF R4 #000D
+ 0x58280009, // 000B LDCONST R10 K9
+ 0x70020000, // 000C JMP #000E
+ 0x5828000A, // 000D LDCONST R10 K10
+ 0x7C1C0600, // 000E CALL R7 3
+ 0x7C140400, // 000F CALL R5 2
+ 0x8C140506, // 0010 GETMET R5 R2 K6
+ 0x581C000B, // 0011 LDCONST R7 K11
+ 0x7C140400, // 0012 CALL R5 2
+ 0x8C140506, // 0013 GETMET R5 R2 K6
+ 0x581C000C, // 0014 LDCONST R7 K12
+ 0x7C140400, // 0015 CALL R5 2
+ 0x8C140506, // 0016 GETMET R5 R2 K6
+ 0x8C1C0707, // 0017 GETMET R7 R3 K7
+ 0x5824000D, // 0018 LDCONST R9 K13
+ 0x78120001, // 0019 JMPF R4 #001C
+ 0x5828000E, // 001A LDCONST R10 K14
+ 0x70020000, // 001B JMP #001D
+ 0x5828000F, // 001C LDCONST R10 K15
+ 0x7C1C0600, // 001D CALL R7 3
+ 0x7C140400, // 001E CALL R5 2
+ 0x8C140506, // 001F GETMET R5 R2 K6
+ 0x78120001, // 0020 JMPF R4 #0023
+ 0x581C0010, // 0021 LDCONST R7 K16
+ 0x70020000, // 0022 JMP #0024
+ 0x581C0011, // 0023 LDCONST R7 K17
+ 0x7C140400, // 0024 CALL R5 2
+ 0x8C140506, // 0025 GETMET R5 R2 K6
+ 0x581C0012, // 0026 LDCONST R7 K18
+ 0x7C140400, // 0027 CALL R5 2
+ 0x8C140506, // 0028 GETMET R5 R2 K6
+ 0x581C0013, // 0029 LDCONST R7 K19
+ 0x7C140400, // 002A CALL R5 2
+ 0x80040800, // 002B RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_UI_init, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(add_driver),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x90020001, // 0000 SETMBR R0 K0 R1
+ 0xB80A0200, // 0001 GETNGBL R2 K1
+ 0x8C080502, // 0002 GETMET R2 R2 K2
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C080400, // 0004 CALL R2 2
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show_passcode_form
+********************************************************************/
+be_local_closure(Matter_UI_show_passcode_form, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[19]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(content_send),
+ /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
+ /* K5 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E),
+ /* K6 */ be_nested_str_weak(format),
+ /* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E),
+ /* K8 */ be_nested_str_weak(device),
+ /* K9 */ be_nested_str_weak(root_passcode),
+ /* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E),
+ /* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X274095_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E),
+ /* K12 */ be_nested_str_weak(root_discriminator),
+ /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E),
+ /* K14 */ be_nested_str_weak(ipv4only),
+ /* K15 */ be_nested_str_weak(_X20checked),
+ /* K16 */ be_nested_str_weak(),
+ /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ /* K18 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_passcode_form),
+ &be_const_str_solidified,
+ ( &(const binstruction[46]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x8C0C0302, // 0005 GETMET R3 R1 K2
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x8C0C0302, // 0008 GETMET R3 R1 K2
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x8C0C0302, // 000B GETMET R3 R1 K2
+ 0x8C140506, // 000C GETMET R5 R2 K6
+ 0x581C0007, // 000D LDCONST R7 K7
+ 0x88200108, // 000E GETMBR R8 R0 K8
+ 0x88201109, // 000F GETMBR R8 R8 K9
+ 0x7C140600, // 0010 CALL R5 3
+ 0x7C0C0400, // 0011 CALL R3 2
+ 0x8C0C0302, // 0012 GETMET R3 R1 K2
+ 0x5814000A, // 0013 LDCONST R5 K10
+ 0x7C0C0400, // 0014 CALL R3 2
+ 0x8C0C0302, // 0015 GETMET R3 R1 K2
+ 0x8C140506, // 0016 GETMET R5 R2 K6
+ 0x581C000B, // 0017 LDCONST R7 K11
+ 0x88200108, // 0018 GETMBR R8 R0 K8
+ 0x8820110C, // 0019 GETMBR R8 R8 K12
+ 0x7C140600, // 001A CALL R5 3
+ 0x7C0C0400, // 001B CALL R3 2
+ 0x8C0C0302, // 001C GETMET R3 R1 K2
+ 0x8C140506, // 001D GETMET R5 R2 K6
+ 0x581C000D, // 001E LDCONST R7 K13
+ 0x88200108, // 001F GETMBR R8 R0 K8
+ 0x8820110E, // 0020 GETMBR R8 R8 K14
+ 0x78220001, // 0021 JMPF R8 #0024
+ 0x5820000F, // 0022 LDCONST R8 K15
+ 0x70020000, // 0023 JMP #0025
+ 0x58200010, // 0024 LDCONST R8 K16
+ 0x7C140600, // 0025 CALL R5 3
+ 0x7C0C0400, // 0026 CALL R3 2
+ 0x8C0C0302, // 0027 GETMET R3 R1 K2
+ 0x58140011, // 0028 LDCONST R5 K17
+ 0x7C0C0400, // 0029 CALL R3 2
+ 0x8C0C0302, // 002A GETMET R3 R1 K2
+ 0x58140012, // 002B LDCONST R5 K18
+ 0x7C0C0400, // 002C CALL R3 2
+ 0x80000000, // 002D RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_add_config_button
+********************************************************************/
+be_local_closure(Matter_UI_web_add_config_button, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(content_send),
+ /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E),
+ /* K3 */ be_nested_str_weak(matter),
+ /* K4 */ be_nested_str_weak(_LOGO),
+ /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(web_add_config_button),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x8C080301, // 0004 GETMET R2 R1 K1
+ 0xB8120600, // 0005 GETNGBL R4 K3
+ 0x88100904, // 0006 GETMBR R4 R4 K4
+ 0x7C080400, // 0007 CALL R2 2
+ 0x8C080301, // 0008 GETMET R2 R1 K1
+ 0x58100005, // 0009 LDCONST R4 K5
+ 0x7C080400, // 000A CALL R2 2
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: show_fabric_info
********************************************************************/
be_local_closure(Matter_UI_show_fabric_info, /* name */
be_nested_proto(
- 17, /* nstack */
- 2, /* argc */
+ 16, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -45,7 +407,7 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
/* K22 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E),
/* K23 */ be_nested_str_weak(tohex),
/* K24 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B),
- /* K25 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X3E),
+ /* K25 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22Are_X20you_X20sure_X3F_X22_X29_X3B_X27_X3E),
/* K26 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25i_X27_X3E),
/* K27 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
/* K28 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
@@ -54,108 +416,936 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
be_str_weak(show_fabric_info),
&be_const_str_solidified,
( &(const binstruction[102]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x8C0C0302, // 0005 GETMET R3 R1 K2
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x600C000C, // 0008 GETGBL R3 G12
+ 0x88100105, // 0009 GETMBR R4 R0 K5
+ 0x88100906, // 000A GETMBR R4 R4 K6
+ 0x88100906, // 000B GETMBR R4 R4 K6
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x1C0C0707, // 000D EQ R3 R3 K7
+ 0x780E0003, // 000E JMPF R3 #0013
+ 0x8C0C0302, // 000F GETMET R3 R1 K2
+ 0x58140008, // 0010 LDCONST R5 K8
+ 0x7C0C0400, // 0011 CALL R3 2
+ 0x7002004E, // 0012 JMP #0062
+ 0x500C0200, // 0013 LDBOOL R3 1 0
+ 0x60100010, // 0014 GETGBL R4 G16
+ 0x88140105, // 0015 GETMBR R5 R0 K5
+ 0x88140B06, // 0016 GETMBR R5 R5 K6
+ 0x88140B09, // 0017 GETMBR R5 R5 K9
+ 0x8C140B0A, // 0018 GETMET R5 R5 K10
+ 0x7C140200, // 0019 CALL R5 1
+ 0x7C100200, // 001A CALL R4 1
+ 0xA8020042, // 001B EXBLK 0 #005F
+ 0x5C140800, // 001C MOVE R5 R4
+ 0x7C140000, // 001D CALL R5 0
+ 0x5C180600, // 001E MOVE R6 R3
+ 0x741A0002, // 001F JMPT R6 #0023
+ 0x8C180302, // 0020 GETMET R6 R1 K2
+ 0x5820000B, // 0021 LDCONST R8 K11
+ 0x7C180400, // 0022 CALL R6 2
+ 0x500C0000, // 0023 LDBOOL R3 0 0
+ 0x88180B0C, // 0024 GETMBR R6 R5 K12
+ 0x5C1C0C00, // 0025 MOVE R7 R6
+ 0x741E0000, // 0026 JMPT R7 #0028
+ 0x5818000D, // 0027 LDCONST R6 K13
+ 0x8C1C030E, // 0028 GETMET R7 R1 K14
+ 0x5C240C00, // 0029 MOVE R9 R6
+ 0x7C1C0400, // 002A CALL R7 2
+ 0x5C180E00, // 002B MOVE R6 R7
+ 0x8C1C0302, // 002C GETMET R7 R1 K2
+ 0x8C24050F, // 002D GETMET R9 R2 K15
+ 0x582C0010, // 002E LDCONST R11 K16
+ 0x8C300B11, // 002F GETMET R12 R5 K17
+ 0x7C300200, // 0030 CALL R12 1
+ 0x5C340C00, // 0031 MOVE R13 R6
+ 0x7C240800, // 0032 CALL R9 4
+ 0x7C1C0400, // 0033 CALL R7 2
+ 0x8C1C0B12, // 0034 GETMET R7 R5 K18
+ 0x7C1C0200, // 0035 CALL R7 1
+ 0x8C1C0F13, // 0036 GETMET R7 R7 K19
+ 0x7C1C0200, // 0037 CALL R7 1
+ 0x8C1C0F14, // 0038 GETMET R7 R7 K20
+ 0x7C1C0200, // 0039 CALL R7 1
+ 0x8C200B15, // 003A GETMET R8 R5 K21
+ 0x7C200200, // 003B CALL R8 1
+ 0x8C201113, // 003C GETMET R8 R8 K19
+ 0x7C200200, // 003D CALL R8 1
+ 0x8C201114, // 003E GETMET R8 R8 K20
+ 0x7C200200, // 003F CALL R8 1
+ 0x8C240302, // 0040 GETMET R9 R1 K2
+ 0x8C2C050F, // 0041 GETMET R11 R2 K15
+ 0x58340016, // 0042 LDCONST R13 K22
+ 0x8C380F17, // 0043 GETMET R14 R7 K23
+ 0x7C380200, // 0044 CALL R14 1
+ 0x7C2C0600, // 0045 CALL R11 3
+ 0x7C240400, // 0046 CALL R9 2
+ 0x8C240302, // 0047 GETMET R9 R1 K2
+ 0x8C2C050F, // 0048 GETMET R11 R2 K15
+ 0x58340018, // 0049 LDCONST R13 K24
+ 0x8C381117, // 004A GETMET R14 R8 K23
+ 0x7C380200, // 004B CALL R14 1
+ 0x7C2C0600, // 004C CALL R11 3
+ 0x7C240400, // 004D CALL R9 2
+ 0x8C240302, // 004E GETMET R9 R1 K2
+ 0x582C0019, // 004F LDCONST R11 K25
+ 0x7C240400, // 0050 CALL R9 2
+ 0x8C240302, // 0051 GETMET R9 R1 K2
+ 0x8C2C050F, // 0052 GETMET R11 R2 K15
+ 0x5834001A, // 0053 LDCONST R13 K26
+ 0x8C380B11, // 0054 GETMET R14 R5 K17
+ 0x7C380200, // 0055 CALL R14 1
+ 0x7C2C0600, // 0056 CALL R11 3
+ 0x7C240400, // 0057 CALL R9 2
+ 0x8C240302, // 0058 GETMET R9 R1 K2
+ 0x582C001B, // 0059 LDCONST R11 K27
+ 0x7C240400, // 005A CALL R9 2
+ 0x8C240302, // 005B GETMET R9 R1 K2
+ 0x582C001C, // 005C LDCONST R11 K28
+ 0x7C240400, // 005D CALL R9 2
+ 0x7001FFBC, // 005E JMP #001C
+ 0x5810001D, // 005F LDCONST R4 K29
+ 0xAC100200, // 0060 CATCH R4 1 0
+ 0xB0080000, // 0061 RAISE 2 R0 R0
+ 0x8C0C0302, // 0062 GETMET R3 R1 K2
+ 0x5814001C, // 0063 LDCONST R5 K28
+ 0x7C0C0400, // 0064 CALL R3 2
+ 0x80000000, // 0065 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: page_part_mgr
+********************************************************************/
+be_local_closure(Matter_UI_page_part_mgr, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(check_privileged_access),
+ /* K3 */ be_nested_str_weak(content_start),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(content_send_style),
+ /* K6 */ be_nested_str_weak(show_enable),
+ /* K7 */ be_nested_str_weak(show_passcode_form),
+ /* K8 */ be_nested_str_weak(show_plugins_configuration),
+ /* K9 */ be_nested_str_weak(show_fabric_info),
+ /* K10 */ be_nested_str_weak(content_button),
+ /* K11 */ be_nested_str_weak(BUTTON_CONFIGURATION),
+ /* K12 */ be_nested_str_weak(content_stop),
+ }),
+ be_str_weak(page_part_mgr),
+ &be_const_str_solidified,
+ ( &(const binstruction[27]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x7C0C0200, // 0003 CALL R3 1
+ 0x740E0001, // 0004 JMPT R3 #0007
+ 0x4C0C0000, // 0005 LDNIL R3
+ 0x80040600, // 0006 RET 1 R3
+ 0x8C0C0303, // 0007 GETMET R3 R1 K3
+ 0x58140004, // 0008 LDCONST R5 K4
+ 0x7C0C0400, // 0009 CALL R3 2
+ 0x8C0C0305, // 000A GETMET R3 R1 K5
+ 0x7C0C0200, // 000B CALL R3 1
+ 0x8C0C0106, // 000C GETMET R3 R0 K6
+ 0x7C0C0200, // 000D CALL R3 1
+ 0x780E0005, // 000E JMPF R3 #0015
+ 0x8C0C0107, // 000F GETMET R3 R0 K7
+ 0x7C0C0200, // 0010 CALL R3 1
+ 0x8C0C0108, // 0011 GETMET R3 R0 K8
+ 0x7C0C0200, // 0012 CALL R3 1
+ 0x8C0C0109, // 0013 GETMET R3 R0 K9
+ 0x7C0C0200, // 0014 CALL R3 1
+ 0x8C0C030A, // 0015 GETMET R3 R1 K10
+ 0x8814030B, // 0016 GETMBR R5 R1 K11
+ 0x7C0C0400, // 0017 CALL R3 2
+ 0x8C0C030C, // 0018 GETMET R3 R1 K12
+ 0x7C0C0200, // 0019 CALL R3 1
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: page_part_ctl
+********************************************************************/
+be_local_closure(Matter_UI_page_part_ctl, /* name */
+ be_nested_proto(
+ 21, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[72]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(check_privileged_access),
+ /* K2 */ be_nested_str_weak(string),
+ /* K3 */ be_nested_str_weak(partition_core),
+ /* K4 */ be_nested_str_weak(persist),
+ /* K5 */ be_nested_str_weak(has_arg),
+ /* K6 */ be_nested_str_weak(passcode),
+ /* K7 */ be_nested_str_weak(discriminator),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(log),
+ /* K10 */ be_nested_str_weak(format),
+ /* K11 */ be_nested_str_weak(MTR_X3A_X20_X2Fmatterc_X20received_X20_X27_X25s_X27_X20command),
+ /* K12 */ be_const_int(3),
+ /* K13 */ be_nested_str_weak(device),
+ /* K14 */ be_nested_str_weak(root_passcode),
+ /* K15 */ be_nested_str_weak(arg),
+ /* K16 */ be_nested_str_weak(root_discriminator),
+ /* K17 */ be_nested_str_weak(ipv4only),
+ /* K18 */ be_nested_str_weak(ipv4),
+ /* K19 */ be_nested_str_weak(on),
+ /* K20 */ be_nested_str_weak(save_param),
+ /* K21 */ be_nested_str_weak(redirect),
+ /* K22 */ be_nested_str_weak(_X2F_X3Frst_X3D),
+ /* K23 */ be_nested_str_weak(enable),
+ /* K24 */ be_nested_str_weak(cmd),
+ /* K25 */ be_nested_str_weak(SetOption),
+ /* K26 */ be_nested_str_weak(matter),
+ /* K27 */ be_nested_str_weak(MATTER_OPTION),
+ /* K28 */ be_nested_str_weak(_X201),
+ /* K29 */ be_nested_str_weak(disable),
+ /* K30 */ be_nested_str_weak(_X200),
+ /* K31 */ be_nested_str_weak(del_fabric),
+ /* K32 */ be_const_int(0),
+ /* K33 */ be_nested_str_weak(sessions),
+ /* K34 */ be_nested_str_weak(fabrics),
+ /* K35 */ be_nested_str_weak(get_fabric_index),
+ /* K36 */ be_nested_str_weak(remove_fabric),
+ /* K37 */ be_const_int(1),
+ /* K38 */ be_nested_str_weak(_X2Fmatterc_X3F),
+ /* K39 */ be_nested_str_weak(auto),
+ /* K40 */ be_nested_str_weak(plugins_persist),
+ /* K41 */ be_nested_str_weak(config),
+ /* K42 */ be_nested_str_weak(_X2503i),
+ /* K43 */ be_nested_str_weak(ep),
+ /* K44 */ be_nested_str_weak(pi),
+ /* K45 */ be_nested_str_weak(MTR_X3A_X20ep_X3D_X25i_X20type_X3D_X25s_X20arg_X3D_X25s),
+ /* K46 */ be_nested_str_weak(),
+ /* K47 */ be_nested_str_weak(plugins_classes),
+ /* K48 */ be_nested_str_weak(find),
+ /* K49 */ be_nested_str_weak(type),
+ /* K50 */ be_nested_str_weak(ARG),
+ /* K51 */ be_nested_str_weak(ARG_TYPE),
+ /* K52 */ be_nested_str_weak(MTR_X3A_X20unknown_X20type_X20_X3D_X20_X25s),
+ /* K53 */ be_const_int(2),
+ /* K54 */ be_nested_str_weak(MTR_X3A_X20skipping_X20parameter),
+ /* K55 */ be_nested_str_weak(MTR_X3A_X20config_X20_X3D_X20_X25s),
+ /* K56 */ be_nested_str_weak(contains),
+ /* K57 */ be_nested_str_weak(0),
+ /* K58 */ be_nested_str_weak(Missing_X20endpoint_X200),
+ /* K59 */ be_nested_str_weak(MTR_X3A_X20config_X20error_X20_X3D_X20_X25s),
+ /* K60 */ be_nested_str_weak(plugins_config),
+ /* K61 */ be_nested_str_weak(content_start),
+ /* K62 */ be_nested_str_weak(Parameter_X20error),
+ /* K63 */ be_nested_str_weak(content_send_style),
+ /* K64 */ be_nested_str_weak(content_send),
+ /* K65 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EError_X3A_X3C_X2Fb_X3E_X25s_X3C_X2Fp_X3E),
+ /* K66 */ be_nested_str_weak(html_escape),
+ /* K67 */ be_nested_str_weak(content_button),
+ /* K68 */ be_nested_str_weak(BUTTON_CONFIGURATION),
+ /* K69 */ be_nested_str_weak(content_stop),
+ /* K70 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
+ /* K71 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(page_part_ctl),
+ &be_const_str_solidified,
+ ( &(const binstruction[356]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x740A0001, // 0003 JMPT R2 #0006
+ 0x4C080000, // 0004 LDNIL R2
+ 0x80040400, // 0005 RET 1 R2
+ 0xA40A0400, // 0006 IMPORT R2 K2
+ 0xA40E0600, // 0007 IMPORT R3 K3
+ 0xA4120800, // 0008 IMPORT R4 K4
+ 0x4C140000, // 0009 LDNIL R5
+ 0xA8020139, // 000A EXBLK 0 #0145
+ 0x8C180305, // 000B GETMET R6 R1 K5
+ 0x58200006, // 000C LDCONST R8 K6
+ 0x7C180400, // 000D CALL R6 2
+ 0x741A0003, // 000E JMPT R6 #0013
+ 0x8C180305, // 000F GETMET R6 R1 K5
+ 0x58200007, // 0010 LDCONST R8 K7
+ 0x7C180400, // 0011 CALL R6 2
+ 0x781A002A, // 0012 JMPF R6 #003E
+ 0xB81A1000, // 0013 GETNGBL R6 K8
+ 0x8C180D09, // 0014 GETMET R6 R6 K9
+ 0x8C20050A, // 0015 GETMET R8 R2 K10
+ 0x5828000B, // 0016 LDCONST R10 K11
+ 0x582C0006, // 0017 LDCONST R11 K6
+ 0x7C200600, // 0018 CALL R8 3
+ 0x5824000C, // 0019 LDCONST R9 K12
+ 0x7C180600, // 001A CALL R6 3
+ 0x8C180305, // 001B GETMET R6 R1 K5
+ 0x58200006, // 001C LDCONST R8 K6
+ 0x7C180400, // 001D CALL R6 2
+ 0x781A0006, // 001E JMPF R6 #0026
+ 0x8818010D, // 001F GETMBR R6 R0 K13
+ 0x601C0009, // 0020 GETGBL R7 G9
+ 0x8C20030F, // 0021 GETMET R8 R1 K15
+ 0x58280006, // 0022 LDCONST R10 K6
+ 0x7C200400, // 0023 CALL R8 2
+ 0x7C1C0200, // 0024 CALL R7 1
+ 0x901A1C07, // 0025 SETMBR R6 K14 R7
+ 0x8C180305, // 0026 GETMET R6 R1 K5
+ 0x58200007, // 0027 LDCONST R8 K7
+ 0x7C180400, // 0028 CALL R6 2
+ 0x781A0006, // 0029 JMPF R6 #0031
+ 0x8818010D, // 002A GETMBR R6 R0 K13
+ 0x601C0009, // 002B GETGBL R7 G9
+ 0x8C20030F, // 002C GETMET R8 R1 K15
+ 0x58280007, // 002D LDCONST R10 K7
+ 0x7C200400, // 002E CALL R8 2
+ 0x7C1C0200, // 002F CALL R7 1
+ 0x901A2007, // 0030 SETMBR R6 K16 R7
+ 0x8818010D, // 0031 GETMBR R6 R0 K13
+ 0x8C1C030F, // 0032 GETMET R7 R1 K15
+ 0x58240012, // 0033 LDCONST R9 K18
+ 0x7C1C0400, // 0034 CALL R7 2
+ 0x1C1C0F13, // 0035 EQ R7 R7 K19
+ 0x901A2207, // 0036 SETMBR R6 K17 R7
+ 0x8818010D, // 0037 GETMBR R6 R0 K13
+ 0x8C180D14, // 0038 GETMET R6 R6 K20
+ 0x7C180200, // 0039 CALL R6 1
+ 0x8C180315, // 003A GETMET R6 R1 K21
+ 0x58200016, // 003B LDCONST R8 K22
+ 0x7C180400, // 003C CALL R6 2
+ 0x700200F1, // 003D JMP #0130
+ 0x8C180305, // 003E GETMET R6 R1 K5
+ 0x58200017, // 003F LDCONST R8 K23
+ 0x7C180400, // 0040 CALL R6 2
+ 0x781A0014, // 0041 JMPF R6 #0057
+ 0xB81A1000, // 0042 GETNGBL R6 K8
+ 0x8C180D09, // 0043 GETMET R6 R6 K9
+ 0x8C20050A, // 0044 GETMET R8 R2 K10
+ 0x5828000B, // 0045 LDCONST R10 K11
+ 0x582C0017, // 0046 LDCONST R11 K23
+ 0x7C200600, // 0047 CALL R8 3
+ 0x5824000C, // 0048 LDCONST R9 K12
+ 0x7C180600, // 0049 CALL R6 3
+ 0xB81A1000, // 004A GETNGBL R6 K8
+ 0x8C180D18, // 004B GETMET R6 R6 K24
+ 0x60200008, // 004C GETGBL R8 G8
+ 0xB8263400, // 004D GETNGBL R9 K26
+ 0x8824131B, // 004E GETMBR R9 R9 K27
+ 0x7C200200, // 004F CALL R8 1
+ 0x00223208, // 0050 ADD R8 K25 R8
+ 0x0020111C, // 0051 ADD R8 R8 K28
+ 0x7C180400, // 0052 CALL R6 2
+ 0x8C180315, // 0053 GETMET R6 R1 K21
+ 0x58200016, // 0054 LDCONST R8 K22
+ 0x7C180400, // 0055 CALL R6 2
+ 0x700200D8, // 0056 JMP #0130
+ 0x8C180305, // 0057 GETMET R6 R1 K5
+ 0x5820001D, // 0058 LDCONST R8 K29
+ 0x7C180400, // 0059 CALL R6 2
+ 0x781A0014, // 005A JMPF R6 #0070
+ 0xB81A1000, // 005B GETNGBL R6 K8
+ 0x8C180D09, // 005C GETMET R6 R6 K9
+ 0x8C20050A, // 005D GETMET R8 R2 K10
+ 0x5828000B, // 005E LDCONST R10 K11
+ 0x582C001D, // 005F LDCONST R11 K29
+ 0x7C200600, // 0060 CALL R8 3
+ 0x5824000C, // 0061 LDCONST R9 K12
+ 0x7C180600, // 0062 CALL R6 3
+ 0xB81A1000, // 0063 GETNGBL R6 K8
+ 0x8C180D18, // 0064 GETMET R6 R6 K24
+ 0x60200008, // 0065 GETGBL R8 G8
+ 0xB8263400, // 0066 GETNGBL R9 K26
+ 0x8824131B, // 0067 GETMBR R9 R9 K27
+ 0x7C200200, // 0068 CALL R8 1
+ 0x00223208, // 0069 ADD R8 K25 R8
+ 0x0020111E, // 006A ADD R8 R8 K30
+ 0x7C180400, // 006B CALL R6 2
+ 0x8C180315, // 006C GETMET R6 R1 K21
+ 0x58200016, // 006D LDCONST R8 K22
+ 0x7C180400, // 006E CALL R6 2
+ 0x700200BF, // 006F JMP #0130
+ 0x8C180305, // 0070 GETMET R6 R1 K5
+ 0x5820001F, // 0071 LDCONST R8 K31
+ 0x7C180400, // 0072 CALL R6 2
+ 0x781A0026, // 0073 JMPF R6 #009B
+ 0xB81A1000, // 0074 GETNGBL R6 K8
+ 0x8C180D09, // 0075 GETMET R6 R6 K9
+ 0x8C20050A, // 0076 GETMET R8 R2 K10
+ 0x5828000B, // 0077 LDCONST R10 K11
+ 0x582C001F, // 0078 LDCONST R11 K31
+ 0x7C200600, // 0079 CALL R8 3
+ 0x5824000C, // 007A LDCONST R9 K12
+ 0x7C180600, // 007B CALL R6 3
+ 0x60180009, // 007C GETGBL R6 G9
+ 0x8C1C030F, // 007D GETMET R7 R1 K15
+ 0x5824001F, // 007E LDCONST R9 K31
+ 0x7C1C0400, // 007F CALL R7 2
+ 0x7C180200, // 0080 CALL R6 1
+ 0x581C0020, // 0081 LDCONST R7 K32
+ 0x8820010D, // 0082 GETMBR R8 R0 K13
+ 0x88201121, // 0083 GETMBR R8 R8 K33
+ 0x88201122, // 0084 GETMBR R8 R8 K34
+ 0x6024000C, // 0085 GETGBL R9 G12
+ 0x5C281000, // 0086 MOVE R10 R8
+ 0x7C240200, // 0087 CALL R9 1
+ 0x14240E09, // 0088 LT R9 R7 R9
+ 0x7826000C, // 0089 JMPF R9 #0097
+ 0x94241007, // 008A GETIDX R9 R8 R7
+ 0x8C241323, // 008B GETMET R9 R9 K35
+ 0x7C240200, // 008C CALL R9 1
+ 0x1C241206, // 008D EQ R9 R9 R6
+ 0x78260005, // 008E JMPF R9 #0095
+ 0x8824010D, // 008F GETMBR R9 R0 K13
+ 0x8C241324, // 0090 GETMET R9 R9 K36
+ 0x942C1007, // 0091 GETIDX R11 R8 R7
+ 0x7C240400, // 0092 CALL R9 2
+ 0x70020002, // 0093 JMP #0097
+ 0x70020000, // 0094 JMP #0096
+ 0x001C0F25, // 0095 ADD R7 R7 K37
+ 0x7001FFED, // 0096 JMP #0085
+ 0x8C240315, // 0097 GETMET R9 R1 K21
+ 0x582C0026, // 0098 LDCONST R11 K38
+ 0x7C240400, // 0099 CALL R9 2
+ 0x70020094, // 009A JMP #0130
+ 0x8C180305, // 009B GETMET R6 R1 K5
+ 0x58200027, // 009C LDCONST R8 K39
+ 0x7C180400, // 009D CALL R6 2
+ 0x781A0011, // 009E JMPF R6 #00B1
+ 0xB81A1000, // 009F GETNGBL R6 K8
+ 0x8C180D09, // 00A0 GETMET R6 R6 K9
+ 0x8C20050A, // 00A1 GETMET R8 R2 K10
+ 0x5828000B, // 00A2 LDCONST R10 K11
+ 0x582C0027, // 00A3 LDCONST R11 K39
+ 0x7C200600, // 00A4 CALL R8 3
+ 0x5824000C, // 00A5 LDCONST R9 K12
+ 0x7C180600, // 00A6 CALL R6 3
+ 0x8818010D, // 00A7 GETMBR R6 R0 K13
+ 0x501C0000, // 00A8 LDBOOL R7 0 0
+ 0x901A5007, // 00A9 SETMBR R6 K40 R7
+ 0x8818010D, // 00AA GETMBR R6 R0 K13
+ 0x8C180D14, // 00AB GETMET R6 R6 K20
+ 0x7C180200, // 00AC CALL R6 1
+ 0x8C180315, // 00AD GETMET R6 R1 K21
+ 0x58200016, // 00AE LDCONST R8 K22
+ 0x7C180400, // 00AF CALL R6 2
+ 0x7002007E, // 00B0 JMP #0130
+ 0x8C180305, // 00B1 GETMET R6 R1 K5
+ 0x58200029, // 00B2 LDCONST R8 K41
+ 0x7C180400, // 00B3 CALL R6 2
+ 0x781A007A, // 00B4 JMPF R6 #0130
+ 0x60180013, // 00B5 GETGBL R6 G19
+ 0x7C180000, // 00B6 CALL R6 0
+ 0xB81E1000, // 00B7 GETNGBL R7 K8
+ 0x8C1C0F09, // 00B8 GETMET R7 R7 K9
+ 0x8C24050A, // 00B9 GETMET R9 R2 K10
+ 0x582C000B, // 00BA LDCONST R11 K11
+ 0x58300029, // 00BB LDCONST R12 K41
+ 0x7C240600, // 00BC CALL R9 3
+ 0x5828000C, // 00BD LDCONST R10 K12
+ 0x7C1C0600, // 00BE CALL R7 3
+ 0x581C0020, // 00BF LDCONST R7 K32
+ 0x8C20050A, // 00C0 GETMET R8 R2 K10
+ 0x5828002A, // 00C1 LDCONST R10 K42
+ 0x5C2C0E00, // 00C2 MOVE R11 R7
+ 0x7C200600, // 00C3 CALL R8 3
+ 0x8C240305, // 00C4 GETMET R9 R1 K5
+ 0x002E5608, // 00C5 ADD R11 K43 R8
+ 0x7C240400, // 00C6 CALL R9 2
+ 0x78260043, // 00C7 JMPF R9 #010C
+ 0x8C24030F, // 00C8 GETMET R9 R1 K15
+ 0x002E5608, // 00C9 ADD R11 K43 R8
+ 0x7C240400, // 00CA CALL R9 2
+ 0x60280009, // 00CB GETGBL R10 G9
+ 0x5C2C1200, // 00CC MOVE R11 R9
+ 0x7C280200, // 00CD CALL R10 1
+ 0x8C2C030F, // 00CE GETMET R11 R1 K15
+ 0x00365808, // 00CF ADD R13 K44 R8
+ 0x7C2C0400, // 00D0 CALL R11 2
+ 0x8C30030F, // 00D1 GETMET R12 R1 K15
+ 0x003A1E08, // 00D2 ADD R14 K15 R8
+ 0x7C300400, // 00D3 CALL R12 2
+ 0xB8361000, // 00D4 GETNGBL R13 K8
+ 0x8C341B09, // 00D5 GETMET R13 R13 K9
+ 0x8C3C050A, // 00D6 GETMET R15 R2 K10
+ 0x5844002D, // 00D7 LDCONST R17 K45
+ 0x5C481200, // 00D8 MOVE R18 R9
+ 0x5C4C1600, // 00D9 MOVE R19 R11
+ 0x5C501800, // 00DA MOVE R20 R12
+ 0x7C3C0A00, // 00DB CALL R15 5
+ 0x5840000C, // 00DC LDCONST R16 K12
+ 0x7C340600, // 00DD CALL R13 3
+ 0x2034132E, // 00DE NE R13 R9 K46
+ 0x7836001F, // 00DF JMPF R13 #0100
+ 0x2034172E, // 00E0 NE R13 R11 K46
+ 0x7836001D, // 00E1 JMPF R13 #0100
+ 0x8834010D, // 00E2 GETMBR R13 R0 K13
+ 0x88341B2F, // 00E3 GETMBR R13 R13 K47
+ 0x8C341B30, // 00E4 GETMET R13 R13 K48
+ 0x5C3C1600, // 00E5 MOVE R15 R11
+ 0x7C340400, // 00E6 CALL R13 2
+ 0x4C380000, // 00E7 LDNIL R14
+ 0x20381A0E, // 00E8 NE R14 R13 R14
+ 0x783A000C, // 00E9 JMPF R14 #00F7
+ 0x60380013, // 00EA GETGBL R14 G19
+ 0x7C380000, // 00EB CALL R14 0
+ 0x983A620B, // 00EC SETIDX R14 K49 R11
+ 0x883C1B32, // 00ED GETMBR R15 R13 K50
+ 0x88401B33, // 00EE GETMBR R16 R13 K51
+ 0x78320004, // 00EF JMPF R12 #00F5
+ 0x783E0003, // 00F0 JMPF R15 #00F5
+ 0x5C442000, // 00F1 MOVE R17 R16
+ 0x5C481800, // 00F2 MOVE R18 R12
+ 0x7C440200, // 00F3 CALL R17 1
+ 0x98381E11, // 00F4 SETIDX R14 R15 R17
+ 0x9818120E, // 00F5 SETIDX R6 R9 R14
+ 0x70020007, // 00F6 JMP #00FF
+ 0xB83A1000, // 00F7 GETNGBL R14 K8
+ 0x8C381D09, // 00F8 GETMET R14 R14 K9
+ 0x8C40050A, // 00F9 GETMET R16 R2 K10
+ 0x58480034, // 00FA LDCONST R18 K52
+ 0x5C4C1600, // 00FB MOVE R19 R11
+ 0x7C400600, // 00FC CALL R16 3
+ 0x58440035, // 00FD LDCONST R17 K53
+ 0x7C380600, // 00FE CALL R14 3
+ 0x70020004, // 00FF JMP #0105
+ 0xB8361000, // 0100 GETNGBL R13 K8
+ 0x8C341B09, // 0101 GETMET R13 R13 K9
+ 0x583C0036, // 0102 LDCONST R15 K54
+ 0x58400035, // 0103 LDCONST R16 K53
+ 0x7C340600, // 0104 CALL R13 3
+ 0x001C0F25, // 0105 ADD R7 R7 K37
+ 0x8C34050A, // 0106 GETMET R13 R2 K10
+ 0x583C002A, // 0107 LDCONST R15 K42
+ 0x5C400E00, // 0108 MOVE R16 R7
+ 0x7C340600, // 0109 CALL R13 3
+ 0x5C201A00, // 010A MOVE R8 R13
+ 0x7001FFB7, // 010B JMP #00C4
+ 0xB8261000, // 010C GETNGBL R9 K8
+ 0x8C241309, // 010D GETMET R9 R9 K9
+ 0x8C2C050A, // 010E GETMET R11 R2 K10
+ 0x58340037, // 010F LDCONST R13 K55
+ 0x60380008, // 0110 GETGBL R14 G8
+ 0x5C3C0C00, // 0111 MOVE R15 R6
+ 0x7C380200, // 0112 CALL R14 1
+ 0x7C2C0600, // 0113 CALL R11 3
+ 0x5830000C, // 0114 LDCONST R12 K12
+ 0x7C240600, // 0115 CALL R9 3
+ 0x8C240D38, // 0116 GETMET R9 R6 K56
+ 0x582C0039, // 0117 LDCONST R11 K57
+ 0x7C240400, // 0118 CALL R9 2
+ 0x74260000, // 0119 JMPT R9 #011B
+ 0x5814003A, // 011A LDCONST R5 K58
+ 0x78160008, // 011B JMPF R5 #0125
+ 0xB8261000, // 011C GETNGBL R9 K8
+ 0x8C241309, // 011D GETMET R9 R9 K9
+ 0x8C2C050A, // 011E GETMET R11 R2 K10
+ 0x5834003B, // 011F LDCONST R13 K59
+ 0x5C380A00, // 0120 MOVE R14 R5
+ 0x7C2C0600, // 0121 CALL R11 3
+ 0x5830000C, // 0122 LDCONST R12 K12
+ 0x7C240600, // 0123 CALL R9 3
+ 0x7002000A, // 0124 JMP #0130
+ 0x8824010D, // 0125 GETMBR R9 R0 K13
+ 0x90267806, // 0126 SETMBR R9 K60 R6
+ 0x8824010D, // 0127 GETMBR R9 R0 K13
+ 0x50280200, // 0128 LDBOOL R10 1 0
+ 0x9026500A, // 0129 SETMBR R9 K40 R10
+ 0x8824010D, // 012A GETMBR R9 R0 K13
+ 0x8C241314, // 012B GETMET R9 R9 K20
+ 0x7C240200, // 012C CALL R9 1
+ 0x8C240315, // 012D GETMET R9 R1 K21
+ 0x582C0016, // 012E LDCONST R11 K22
+ 0x7C240400, // 012F CALL R9 2
+ 0x78160011, // 0130 JMPF R5 #0143
+ 0x8C18033D, // 0131 GETMET R6 R1 K61
+ 0x5820003E, // 0132 LDCONST R8 K62
+ 0x7C180400, // 0133 CALL R6 2
+ 0x8C18033F, // 0134 GETMET R6 R1 K63
+ 0x7C180200, // 0135 CALL R6 1
+ 0x8C180340, // 0136 GETMET R6 R1 K64
+ 0x8C20050A, // 0137 GETMET R8 R2 K10
+ 0x58280041, // 0138 LDCONST R10 K65
+ 0x8C2C0342, // 0139 GETMET R11 R1 K66
+ 0x5C340A00, // 013A MOVE R13 R5
+ 0x7C2C0400, // 013B CALL R11 2
+ 0x7C200600, // 013C CALL R8 3
+ 0x7C180400, // 013D CALL R6 2
+ 0x8C180343, // 013E GETMET R6 R1 K67
+ 0x88200344, // 013F GETMBR R8 R1 K68
+ 0x7C180400, // 0140 CALL R6 2
+ 0x8C180345, // 0141 GETMET R6 R1 K69
+ 0x7C180200, // 0142 CALL R6 1
+ 0xA8040001, // 0143 EXBLK 1 1
+ 0x7002001D, // 0144 JMP #0163
+ 0xAC180002, // 0145 CATCH R6 0 2
+ 0x7002001A, // 0146 JMP #0162
+ 0xB8221000, // 0147 GETNGBL R8 K8
+ 0x8C201109, // 0148 GETMET R8 R8 K9
+ 0x8C28050A, // 0149 GETMET R10 R2 K10
+ 0x58300046, // 014A LDCONST R12 K70
+ 0x5C340C00, // 014B MOVE R13 R6
+ 0x5C380E00, // 014C MOVE R14 R7
+ 0x7C280800, // 014D CALL R10 4
+ 0x582C0035, // 014E LDCONST R11 K53
+ 0x7C200600, // 014F CALL R8 3
+ 0x8C20033D, // 0150 GETMET R8 R1 K61
+ 0x5828003E, // 0151 LDCONST R10 K62
+ 0x7C200400, // 0152 CALL R8 2
+ 0x8C20033F, // 0153 GETMET R8 R1 K63
+ 0x7C200200, // 0154 CALL R8 1
+ 0x8C200340, // 0155 GETMET R8 R1 K64
+ 0x8C28050A, // 0156 GETMET R10 R2 K10
+ 0x58300047, // 0157 LDCONST R12 K71
+ 0x5C340C00, // 0158 MOVE R13 R6
+ 0x5C380E00, // 0159 MOVE R14 R7
+ 0x7C280800, // 015A CALL R10 4
+ 0x7C200400, // 015B CALL R8 2
+ 0x8C200343, // 015C GETMET R8 R1 K67
+ 0x88280344, // 015D GETMBR R10 R1 K68
+ 0x7C200400, // 015E CALL R8 2
+ 0x8C200345, // 015F GETMET R8 R1 K69
+ 0x7C200200, // 0160 CALL R8 1
+ 0x70020000, // 0161 JMP #0163
+ 0xB0080000, // 0162 RAISE 2 R0 R0
+ 0x80000000, // 0163 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_get_arg
+********************************************************************/
+be_local_closure(Matter_UI_web_get_arg, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(has_arg),
+ /* K2 */ be_nested_str_weak(mtc0),
+ /* K3 */ be_nested_str_weak(device),
+ /* K4 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K5 */ be_nested_str_weak(mtc1),
+ /* K6 */ be_nested_str_weak(start_root_basic_commissioning),
+ }),
+ be_str_weak(web_get_arg),
+ &be_const_str_solidified,
+ ( &(const binstruction[17]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0003, // 0004 JMPF R2 #0009
+ 0x88080103, // 0005 GETMBR R2 R0 K3
+ 0x8C080504, // 0006 GETMET R2 R2 K4
+ 0x7C080200, // 0007 CALL R2 1
+ 0x70020006, // 0008 JMP #0010
+ 0x8C080301, // 0009 GETMET R2 R1 K1
+ 0x58100005, // 000A LDCONST R4 K5
+ 0x7C080400, // 000B CALL R2 2
+ 0x780A0002, // 000C JMPF R2 #0010
+ 0x88080103, // 000D GETMBR R2 R0 K3
+ 0x8C080506, // 000E GETMET R2 R2 K6
+ 0x7C080200, // 000F CALL R2 1
+ 0x80000000, // 0010 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show_plugins_configuration
+********************************************************************/
+be_local_closure(Matter_UI_show_plugins_configuration, /* name */
+ be_nested_proto(
+ 19, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[31]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(content_send),
+ /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCurrent_X20Configuration_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27),
+ /* K5 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20RESET_X20the_X20configuration_X20to_X20the_X20default_X2E_X20You_X20will_X20need_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
+ /* K6 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27auto_X27_X20class_X3D_X27button_X20bred_X27_X3EReset_X20to_X20default_X3C_X2Fbutton_X3E_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Fform_X3E),
+ /* K7 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22Changing_X20the_X20configuration_X20requires_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
+ /* K8 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E),
+ /* K9 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X20width_X3D_X2735_X27_X3E_X3Cb_X3EEp_X2E_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EType_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EParam_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E),
+ /* K10 */ be_nested_str_weak(device),
+ /* K11 */ be_nested_str_weak(k2l_num),
+ /* K12 */ be_nested_str_weak(plugins_config),
+ /* K13 */ be_const_int(0),
+ /* K14 */ be_nested_str_weak(find),
+ /* K15 */ be_nested_str_weak(type),
+ /* K16 */ be_nested_str_weak(get_plugin_class_arg),
+ /* K17 */ be_nested_str_weak(),
+ /* K18 */ be_nested_str_weak(format),
+ /* K19 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E),
+ /* K20 */ be_nested_str_weak(_X3Ctd_X3E_X3Cselect_X20name_X3D_X27pi_X2503i_X27_X3E),
+ /* K21 */ be_nested_str_weak(plugin_option),
+ /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E),
+ /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K24 */ be_nested_str_weak(html_escape),
+ /* K25 */ be_const_int(1),
+ /* K26 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E),
+ /* K27 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K28 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K29 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E),
+ /* K30 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_plugins_configuration),
+ &be_const_str_solidified,
+ ( &(const binstruction[135]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x8C0C0302, // 0005 GETMET R3 R1 K2
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x8C0C0302, // 0008 GETMET R3 R1 K2
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x8C0C0302, // 000B GETMET R3 R1 K2
+ 0x58140006, // 000C LDCONST R5 K6
+ 0x7C0C0400, // 000D CALL R3 2
+ 0x8C0C0302, // 000E GETMET R3 R1 K2
+ 0x58140004, // 000F LDCONST R5 K4
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x8C0C0302, // 0011 GETMET R3 R1 K2
+ 0x58140007, // 0012 LDCONST R5 K7
+ 0x7C0C0400, // 0013 CALL R3 2
+ 0x8C0C0302, // 0014 GETMET R3 R1 K2
+ 0x58140008, // 0015 LDCONST R5 K8
+ 0x7C0C0400, // 0016 CALL R3 2
+ 0x8C0C0302, // 0017 GETMET R3 R1 K2
+ 0x58140009, // 0018 LDCONST R5 K9
+ 0x7C0C0400, // 0019 CALL R3 2
+ 0x880C010A, // 001A GETMBR R3 R0 K10
+ 0x8C0C070B, // 001B GETMET R3 R3 K11
+ 0x8814010A, // 001C GETMBR R5 R0 K10
+ 0x88140B0C, // 001D GETMBR R5 R5 K12
+ 0x7C0C0400, // 001E CALL R3 2
+ 0x5810000D, // 001F LDCONST R4 K13
+ 0x6014000C, // 0020 GETGBL R5 G12
+ 0x5C180600, // 0021 MOVE R6 R3
+ 0x7C140200, // 0022 CALL R5 1
+ 0x14140805, // 0023 LT R5 R4 R5
+ 0x7816003D, // 0024 JMPF R5 #0063
+ 0x94140604, // 0025 GETIDX R5 R3 R4
+ 0x8818010A, // 0026 GETMBR R6 R0 K10
+ 0x601C0008, // 0027 GETGBL R7 G8
+ 0x5C200A00, // 0028 MOVE R8 R5
+ 0x7C1C0200, // 0029 CALL R7 1
+ 0x88180D0C, // 002A GETMBR R6 R6 K12
+ 0x94180C07, // 002B GETIDX R6 R6 R7
+ 0x8C200D0E, // 002C GETMET R8 R6 K14
+ 0x5828000F, // 002D LDCONST R10 K15
+ 0x7C200400, // 002E CALL R8 2
+ 0x5C1C1000, // 002F MOVE R7 R8
+ 0x5C200E00, // 0030 MOVE R8 R7
+ 0x74220000, // 0031 JMPT R8 #0033
+ 0x7001FFEC, // 0032 JMP #0020
+ 0x8820010A, // 0033 GETMBR R8 R0 K10
+ 0x8C201110, // 0034 GETMET R8 R8 K16
+ 0x5C280E00, // 0035 MOVE R10 R7
+ 0x7C200400, // 0036 CALL R8 2
+ 0x78220006, // 0037 JMPF R8 #003F
+ 0x60240008, // 0038 GETGBL R9 G8
+ 0x8C280D0E, // 0039 GETMET R10 R6 K14
+ 0x5C301000, // 003A MOVE R12 R8
+ 0x58340011, // 003B LDCONST R13 K17
+ 0x7C280600, // 003C CALL R10 3
+ 0x7C240200, // 003D CALL R9 1
+ 0x70020000, // 003E JMP #0040
+ 0x58240011, // 003F LDCONST R9 K17
+ 0x8C280302, // 0040 GETMET R10 R1 K2
+ 0x8C300512, // 0041 GETMET R12 R2 K18
+ 0x58380013, // 0042 LDCONST R14 K19
+ 0x5C3C0800, // 0043 MOVE R15 R4
+ 0x5C400A00, // 0044 MOVE R16 R5
+ 0x7C300800, // 0045 CALL R12 4
+ 0x7C280400, // 0046 CALL R10 2
+ 0x8C280302, // 0047 GETMET R10 R1 K2
+ 0x8C300512, // 0048 GETMET R12 R2 K18
+ 0x58380014, // 0049 LDCONST R14 K20
+ 0x5C3C0800, // 004A MOVE R15 R4
+ 0x7C300600, // 004B CALL R12 3
+ 0x7C280400, // 004C CALL R10 2
+ 0x8C280115, // 004D GETMET R10 R0 K21
+ 0x8C300D0E, // 004E GETMET R12 R6 K14
+ 0x5838000F, // 004F LDCONST R14 K15
+ 0x583C0011, // 0050 LDCONST R15 K17
+ 0x7C300600, // 0051 CALL R12 3
+ 0x7C280400, // 0052 CALL R10 2
+ 0x8C280302, // 0053 GETMET R10 R1 K2
+ 0x8C300512, // 0054 GETMET R12 R2 K18
+ 0x58380016, // 0055 LDCONST R14 K22
+ 0x7C300400, // 0056 CALL R12 2
+ 0x7C280400, // 0057 CALL R10 2
+ 0x8C280302, // 0058 GETMET R10 R1 K2
+ 0x8C300512, // 0059 GETMET R12 R2 K18
+ 0x58380017, // 005A LDCONST R14 K23
+ 0x5C3C0800, // 005B MOVE R15 R4
+ 0x8C400318, // 005C GETMET R16 R1 K24
+ 0x5C481200, // 005D MOVE R18 R9
+ 0x7C400400, // 005E CALL R16 2
+ 0x7C300800, // 005F CALL R12 4
+ 0x7C280400, // 0060 CALL R10 2
+ 0x00100919, // 0061 ADD R4 R4 K25
+ 0x7001FFBC, // 0062 JMP #0020
+ 0x8C140302, // 0063 GETMET R5 R1 K2
+ 0x8C1C0512, // 0064 GETMET R7 R2 K18
+ 0x5824001A, // 0065 LDCONST R9 K26
+ 0x5C280800, // 0066 MOVE R10 R4
+ 0x7C1C0600, // 0067 CALL R7 3
+ 0x7C140400, // 0068 CALL R5 2
+ 0x8C140302, // 0069 GETMET R5 R1 K2
+ 0x8C1C0512, // 006A GETMET R7 R2 K18
+ 0x58240014, // 006B LDCONST R9 K20
+ 0x5C280800, // 006C MOVE R10 R4
+ 0x7C1C0600, // 006D CALL R7 3
+ 0x7C140400, // 006E CALL R5 2
+ 0x8C140115, // 006F GETMET R5 R0 K21
+ 0x581C0011, // 0070 LDCONST R7 K17
+ 0x7C140400, // 0071 CALL R5 2
+ 0x8C140302, // 0072 GETMET R5 R1 K2
+ 0x8C1C0512, // 0073 GETMET R7 R2 K18
+ 0x58240016, // 0074 LDCONST R9 K22
+ 0x7C1C0400, // 0075 CALL R7 2
+ 0x7C140400, // 0076 CALL R5 2
+ 0x8C140302, // 0077 GETMET R5 R1 K2
+ 0x8C1C0512, // 0078 GETMET R7 R2 K18
+ 0x5824001B, // 0079 LDCONST R9 K27
+ 0x5C280800, // 007A MOVE R10 R4
+ 0x7C1C0600, // 007B CALL R7 3
+ 0x7C140400, // 007C CALL R5 2
+ 0x8C140302, // 007D GETMET R5 R1 K2
+ 0x581C001C, // 007E LDCONST R7 K28
+ 0x7C140400, // 007F CALL R5 2
+ 0x8C140302, // 0080 GETMET R5 R1 K2
+ 0x581C001D, // 0081 LDCONST R7 K29
+ 0x7C140400, // 0082 CALL R5 2
+ 0x8C140302, // 0083 GETMET R5 R1 K2
+ 0x581C001E, // 0084 LDCONST R7 K30
+ 0x7C140400, // 0085 CALL R5 2
+ 0x80000000, // 0086 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: plugin_option
+********************************************************************/
+be_local_closure(Matter_UI_plugin_option, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(split),
+ /* K3 */ be_nested_str_weak(_CLASSES_TYPES),
+ /* K4 */ be_nested_str_weak(_X7C),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(content_send),
+ /* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E),
+ /* K8 */ be_nested_str_weak(device),
+ /* K9 */ be_nested_str_weak(get_plugin_class_displayname),
+ /* K10 */ be_nested_str_weak(format),
+ /* K11 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E),
+ /* K12 */ be_nested_str_weak(_X20selected),
+ /* K13 */ be_nested_str_weak(),
+ /* K14 */ be_const_int(1),
+ }),
+ be_str_weak(plugin_option),
+ &be_const_str_solidified,
+ ( &(const binstruction[35]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100502, // 0002 GETMET R4 R2 K2
- 0x58180003, // 0003 LDCONST R6 K3
- 0x7C100400, // 0004 CALL R4 2
- 0x8C100502, // 0005 GETMET R4 R2 K2
- 0x58180004, // 0006 LDCONST R6 K4
- 0x7C100400, // 0007 CALL R4 2
- 0x6010000C, // 0008 GETGBL R4 G12
- 0x88140105, // 0009 GETMBR R5 R0 K5
- 0x88140B06, // 000A GETMBR R5 R5 K6
- 0x88140B06, // 000B GETMBR R5 R5 K6
- 0x7C100200, // 000C CALL R4 1
- 0x1C100907, // 000D EQ R4 R4 K7
- 0x78120003, // 000E JMPF R4 #0013
- 0x8C100502, // 000F GETMET R4 R2 K2
- 0x58180008, // 0010 LDCONST R6 K8
- 0x7C100400, // 0011 CALL R4 2
- 0x7002004E, // 0012 JMP #0062
- 0x50100200, // 0013 LDBOOL R4 1 0
- 0x60140010, // 0014 GETGBL R5 G16
- 0x88180105, // 0015 GETMBR R6 R0 K5
- 0x88180D06, // 0016 GETMBR R6 R6 K6
- 0x88180D09, // 0017 GETMBR R6 R6 K9
- 0x8C180D0A, // 0018 GETMET R6 R6 K10
- 0x7C180200, // 0019 CALL R6 1
- 0x7C140200, // 001A CALL R5 1
- 0xA8020042, // 001B EXBLK 0 #005F
- 0x5C180A00, // 001C MOVE R6 R5
- 0x7C180000, // 001D CALL R6 0
- 0x5C1C0800, // 001E MOVE R7 R4
- 0x741E0002, // 001F JMPT R7 #0023
- 0x8C1C0502, // 0020 GETMET R7 R2 K2
- 0x5824000B, // 0021 LDCONST R9 K11
- 0x7C1C0400, // 0022 CALL R7 2
- 0x50100000, // 0023 LDBOOL R4 0 0
- 0x881C0D0C, // 0024 GETMBR R7 R6 K12
- 0x5C200E00, // 0025 MOVE R8 R7
- 0x74220000, // 0026 JMPT R8 #0028
- 0x581C000D, // 0027 LDCONST R7 K13
- 0x8C20050E, // 0028 GETMET R8 R2 K14
- 0x5C280E00, // 0029 MOVE R10 R7
- 0x7C200400, // 002A CALL R8 2
- 0x5C1C1000, // 002B MOVE R7 R8
- 0x8C200502, // 002C GETMET R8 R2 K2
- 0x8C28070F, // 002D GETMET R10 R3 K15
- 0x58300010, // 002E LDCONST R12 K16
- 0x8C340D11, // 002F GETMET R13 R6 K17
- 0x7C340200, // 0030 CALL R13 1
- 0x5C380E00, // 0031 MOVE R14 R7
- 0x7C280800, // 0032 CALL R10 4
- 0x7C200400, // 0033 CALL R8 2
- 0x8C200D12, // 0034 GETMET R8 R6 K18
- 0x7C200200, // 0035 CALL R8 1
- 0x8C201113, // 0036 GETMET R8 R8 K19
- 0x7C200200, // 0037 CALL R8 1
- 0x8C201114, // 0038 GETMET R8 R8 K20
- 0x7C200200, // 0039 CALL R8 1
- 0x8C240D15, // 003A GETMET R9 R6 K21
- 0x7C240200, // 003B CALL R9 1
- 0x8C241313, // 003C GETMET R9 R9 K19
- 0x7C240200, // 003D CALL R9 1
- 0x8C241314, // 003E GETMET R9 R9 K20
- 0x7C240200, // 003F CALL R9 1
- 0x8C280502, // 0040 GETMET R10 R2 K2
- 0x8C30070F, // 0041 GETMET R12 R3 K15
- 0x58380016, // 0042 LDCONST R14 K22
- 0x8C3C1117, // 0043 GETMET R15 R8 K23
- 0x7C3C0200, // 0044 CALL R15 1
- 0x7C300600, // 0045 CALL R12 3
- 0x7C280400, // 0046 CALL R10 2
- 0x8C280502, // 0047 GETMET R10 R2 K2
- 0x8C30070F, // 0048 GETMET R12 R3 K15
- 0x58380018, // 0049 LDCONST R14 K24
- 0x8C3C1317, // 004A GETMET R15 R9 K23
- 0x7C3C0200, // 004B CALL R15 1
- 0x7C300600, // 004C CALL R12 3
- 0x7C280400, // 004D CALL R10 2
- 0x8C280502, // 004E GETMET R10 R2 K2
- 0x58300019, // 004F LDCONST R12 K25
- 0x7C280400, // 0050 CALL R10 2
- 0x8C280502, // 0051 GETMET R10 R2 K2
- 0x8C30070F, // 0052 GETMET R12 R3 K15
- 0x5838001A, // 0053 LDCONST R14 K26
- 0x8C3C0D11, // 0054 GETMET R15 R6 K17
- 0x7C3C0200, // 0055 CALL R15 1
- 0x7C300600, // 0056 CALL R12 3
- 0x7C280400, // 0057 CALL R10 2
- 0x8C280502, // 0058 GETMET R10 R2 K2
- 0x5830001B, // 0059 LDCONST R12 K27
- 0x7C280400, // 005A CALL R10 2
- 0x8C280502, // 005B GETMET R10 R2 K2
- 0x5830001C, // 005C LDCONST R12 K28
- 0x7C280400, // 005D CALL R10 2
- 0x7001FFBC, // 005E JMP #001C
- 0x5814001D, // 005F LDCONST R5 K29
- 0xAC140200, // 0060 CATCH R5 1 0
- 0xB0080000, // 0061 RAISE 2 R0 R0
- 0x8C100502, // 0062 GETMET R4 R2 K2
- 0x5818001C, // 0063 LDCONST R6 K28
- 0x7C100400, // 0064 CALL R4 2
- 0x80000000, // 0065 RET 0
+ 0x8C100702, // 0002 GETMET R4 R3 K2
+ 0x88180103, // 0003 GETMBR R6 R0 K3
+ 0x581C0004, // 0004 LDCONST R7 K4
+ 0x7C100600, // 0005 CALL R4 3
+ 0x58140005, // 0006 LDCONST R5 K5
+ 0x8C180506, // 0007 GETMET R6 R2 K6
+ 0x58200007, // 0008 LDCONST R8 K7
+ 0x7C180400, // 0009 CALL R6 2
+ 0x6018000C, // 000A GETGBL R6 G12
+ 0x5C1C0800, // 000B MOVE R7 R4
+ 0x7C180200, // 000C CALL R6 1
+ 0x14180A06, // 000D LT R6 R5 R6
+ 0x781A0012, // 000E JMPF R6 #0022
+ 0x94180805, // 000F GETIDX R6 R4 R5
+ 0x881C0108, // 0010 GETMBR R7 R0 K8
+ 0x8C1C0F09, // 0011 GETMET R7 R7 K9
+ 0x5C240C00, // 0012 MOVE R9 R6
+ 0x7C1C0400, // 0013 CALL R7 2
+ 0x8C200506, // 0014 GETMET R8 R2 K6
+ 0x8C28070A, // 0015 GETMET R10 R3 K10
+ 0x5830000B, // 0016 LDCONST R12 K11
+ 0x5C340C00, // 0017 MOVE R13 R6
+ 0x1C380C01, // 0018 EQ R14 R6 R1
+ 0x783A0001, // 0019 JMPF R14 #001C
+ 0x5838000C, // 001A LDCONST R14 K12
+ 0x70020000, // 001B JMP #001D
+ 0x5838000D, // 001C LDCONST R14 K13
+ 0x5C3C0E00, // 001D MOVE R15 R7
+ 0x7C280A00, // 001E CALL R10 5
+ 0x7C200400, // 001F CALL R8 2
+ 0x00140B0E, // 0020 ADD R5 R5 K14
+ 0x7001FFE7, // 0021 JMP #000A
+ 0x80000000, // 0022 RET 0
})
)
);
@@ -283,279 +1473,6 @@ be_local_closure(Matter_UI_web_sensor, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: web_get_arg
-********************************************************************/
-be_local_closure(Matter_UI_web_get_arg, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(has_arg),
- /* K2 */ be_nested_str_weak(mtc0),
- /* K3 */ be_nested_str_weak(device),
- /* K4 */ be_nested_str_weak(stop_basic_commissioning),
- /* K5 */ be_nested_str_weak(mtc1),
- /* K6 */ be_nested_str_weak(start_root_basic_commissioning),
- }),
- be_str_weak(web_get_arg),
- &be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x7C080400, // 0003 CALL R2 2
- 0x780A0003, // 0004 JMPF R2 #0009
- 0x88080103, // 0005 GETMBR R2 R0 K3
- 0x8C080504, // 0006 GETMET R2 R2 K4
- 0x7C080200, // 0007 CALL R2 1
- 0x70020006, // 0008 JMP #0010
- 0x8C080301, // 0009 GETMET R2 R1 K1
- 0x58100005, // 000A LDCONST R4 K5
- 0x7C080400, // 000B CALL R2 2
- 0x780A0002, // 000C JMPF R2 #0010
- 0x88080103, // 000D GETMBR R2 R0 K3
- 0x8C080506, // 000E GETMET R2 R2 K6
- 0x7C080200, // 000F CALL R2 1
- 0x80000000, // 0010 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: page_part_mgr
-********************************************************************/
-be_local_closure(Matter_UI_page_part_mgr, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(check_privileged_access),
- /* K3 */ be_nested_str_weak(content_start),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(content_send_style),
- /* K6 */ be_nested_str_weak(show_enable),
- /* K7 */ be_nested_str_weak(show_passcode_form),
- /* K8 */ be_nested_str_weak(show_fabric_info),
- /* K9 */ be_nested_str_weak(content_button),
- /* K10 */ be_nested_str_weak(BUTTON_CONFIGURATION),
- /* K11 */ be_nested_str_weak(content_stop),
- }),
- be_str_weak(page_part_mgr),
- &be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x7C0C0200, // 0003 CALL R3 1
- 0x740E0001, // 0004 JMPT R3 #0007
- 0x4C0C0000, // 0005 LDNIL R3
- 0x80040600, // 0006 RET 1 R3
- 0x8C0C0303, // 0007 GETMET R3 R1 K3
- 0x58140004, // 0008 LDCONST R5 K4
- 0x7C0C0400, // 0009 CALL R3 2
- 0x8C0C0305, // 000A GETMET R3 R1 K5
- 0x7C0C0200, // 000B CALL R3 1
- 0x8C0C0106, // 000C GETMET R3 R0 K6
- 0x7C0C0200, // 000D CALL R3 1
- 0x780E0003, // 000E JMPF R3 #0013
- 0x8C0C0107, // 000F GETMET R3 R0 K7
- 0x7C0C0200, // 0010 CALL R3 1
- 0x8C0C0108, // 0011 GETMET R3 R0 K8
- 0x7C0C0200, // 0012 CALL R3 1
- 0x8C0C0309, // 0013 GETMET R3 R1 K9
- 0x8814030A, // 0014 GETMBR R5 R1 K10
- 0x7C0C0400, // 0015 CALL R3 2
- 0x8C0C030B, // 0016 GETMET R3 R1 K11
- 0x7C0C0200, // 0017 CALL R3 1
- 0x80000000, // 0018 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: web_add_config_button
-********************************************************************/
-be_local_closure(Matter_UI_web_add_config_button, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(content_send),
- /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E),
- /* K3 */ be_nested_str_weak(matter),
- /* K4 */ be_nested_str_weak(_LOGO),
- /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- }),
- be_str_weak(web_add_config_button),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x7C080400, // 0003 CALL R2 2
- 0x8C080301, // 0004 GETMET R2 R1 K1
- 0xB8120600, // 0005 GETNGBL R4 K3
- 0x88100904, // 0006 GETMBR R4 R4 K4
- 0x7C080400, // 0007 CALL R2 2
- 0x8C080301, // 0008 GETMET R2 R1 K1
- 0x58100005, // 0009 LDCONST R4 K5
- 0x7C080400, // 000A CALL R2 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_UI_init, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(device),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(add_driver),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0xB80A0200, // 0001 GETNGBL R2 K1
- 0x8C080502, // 0002 GETMET R2 R2 K2
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C080400, // 0004 CALL R2 2
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: web_add_handler
-********************************************************************/
-be_local_closure(Matter_UI_web_add_handler, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 2]) {
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(page_part_mgr),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80040000, // 0003 RET 1 R0
- })
- ),
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(page_part_ctl),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80040000, // 0003 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(on),
- /* K2 */ be_nested_str_weak(_X2Fmatterc),
- /* K3 */ be_nested_str_weak(HTTP_GET),
- /* K4 */ be_nested_str_weak(HTTP_POST),
- }),
- be_str_weak(web_add_handler),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x88180303, // 0004 GETMBR R6 R1 K3
- 0x7C080800, // 0005 CALL R2 4
- 0x8C080301, // 0006 GETMET R2 R1 K1
- 0x58100002, // 0007 LDCONST R4 K2
- 0x84140001, // 0008 CLOSURE R5 P1
- 0x88180304, // 0009 GETMBR R6 R1 K4
- 0x7C080800, // 000A CALL R2 4
- 0xA0000000, // 000B CLOSE R0
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: show_qrcode
********************************************************************/
@@ -723,514 +1640,88 @@ be_local_closure(Matter_UI_show_qrcode, /* name */
/********************************************************************
-** Solidified function: show_passcode_form
+** Solidified function: web_add_handler
********************************************************************/
-be_local_closure(Matter_UI_show_passcode_form, /* name */
+be_local_closure(Matter_UI_web_add_handler, /* name */
be_nested_proto(
- 9, /* nstack */
+ 7, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[19]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(content_send),
- /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20Passcode_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20_X3E),
- /* K5 */ be_nested_str_weak(_X3Cp_X3EPasscode_X3A_X3C_X2Fp_X3E),
- /* K6 */ be_nested_str_weak(format),
- /* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E),
- /* K8 */ be_nested_str_weak(device),
- /* K9 */ be_nested_str_weak(root_passcode),
- /* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E),
- /* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X274095_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E),
- /* K12 */ be_nested_str_weak(root_discriminator),
- /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E),
- /* K14 */ be_nested_str_weak(ipv4only),
- /* K15 */ be_nested_str_weak(_X20checked),
- /* K16 */ be_nested_str_weak(),
- /* K17 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27passcode_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- /* K18 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 2]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(page_part_mgr),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(page_part_ctl),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
}),
- be_str_weak(show_passcode_form),
- &be_const_str_solidified,
- ( &(const binstruction[46]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C0C0400, // 0004 CALL R3 2
- 0x8C0C0302, // 0005 GETMET R3 R1 K2
- 0x58140004, // 0006 LDCONST R5 K4
- 0x7C0C0400, // 0007 CALL R3 2
- 0x8C0C0302, // 0008 GETMET R3 R1 K2
- 0x58140005, // 0009 LDCONST R5 K5
- 0x7C0C0400, // 000A CALL R3 2
- 0x8C0C0302, // 000B GETMET R3 R1 K2
- 0x8C140506, // 000C GETMET R5 R2 K6
- 0x581C0007, // 000D LDCONST R7 K7
- 0x88200108, // 000E GETMBR R8 R0 K8
- 0x88201109, // 000F GETMBR R8 R8 K9
- 0x7C140600, // 0010 CALL R5 3
- 0x7C0C0400, // 0011 CALL R3 2
- 0x8C0C0302, // 0012 GETMET R3 R1 K2
- 0x5814000A, // 0013 LDCONST R5 K10
- 0x7C0C0400, // 0014 CALL R3 2
- 0x8C0C0302, // 0015 GETMET R3 R1 K2
- 0x8C140506, // 0016 GETMET R5 R2 K6
- 0x581C000B, // 0017 LDCONST R7 K11
- 0x88200108, // 0018 GETMBR R8 R0 K8
- 0x8820110C, // 0019 GETMBR R8 R8 K12
- 0x7C140600, // 001A CALL R5 3
- 0x7C0C0400, // 001B CALL R3 2
- 0x8C0C0302, // 001C GETMET R3 R1 K2
- 0x8C140506, // 001D GETMET R5 R2 K6
- 0x581C000D, // 001E LDCONST R7 K13
- 0x88200108, // 001F GETMBR R8 R0 K8
- 0x8820110E, // 0020 GETMBR R8 R8 K14
- 0x78220001, // 0021 JMPF R8 #0024
- 0x5820000F, // 0022 LDCONST R8 K15
- 0x70020000, // 0023 JMP #0025
- 0x58200010, // 0024 LDCONST R8 K16
- 0x7C140600, // 0025 CALL R5 3
- 0x7C0C0400, // 0026 CALL R3 2
- 0x8C0C0302, // 0027 GETMET R3 R1 K2
- 0x58140011, // 0028 LDCONST R5 K17
- 0x7C0C0400, // 0029 CALL R3 2
- 0x8C0C0302, // 002A GETMET R3 R1 K2
- 0x58140012, // 002B LDCONST R5 K18
- 0x7C0C0400, // 002C CALL R3 2
- 0x80000000, // 002D RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show_enable
-********************************************************************/
-be_local_closure(Matter_UI_show_enable, /* name */
- be_nested_proto(
- 11, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[20]) { /* constants */
+ ( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(content_send),
- /* K7 */ be_nested_str_weak(format),
- /* K8 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K9 */ be_nested_str_weak(Enabled),
- /* K10 */ be_nested_str_weak(Disabled),
- /* K11 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A320px_X3B_X27_X3EMatter_X20support_X20is_X20experimental_X2E_X3C_X2Fp_X3E),
- /* K12 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
- /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27_X25s_X27_X20class_X3D_X27button_X20bgrn_X27_X3E),
- /* K14 */ be_nested_str_weak(disable),
- /* K15 */ be_nested_str_weak(enable),
- /* K16 */ be_nested_str_weak(Disable),
- /* K17 */ be_nested_str_weak(Enable),
- /* K18 */ be_nested_str_weak(_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K1 */ be_nested_str_weak(on),
+ /* K2 */ be_nested_str_weak(_X2Fmatterc),
+ /* K3 */ be_nested_str_weak(HTTP_GET),
+ /* K4 */ be_nested_str_weak(HTTP_POST),
}),
- be_str_weak(show_enable),
+ be_str_weak(web_add_handler),
&be_const_str_solidified,
- ( &(const binstruction[44]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xB8120400, // 0002 GETNGBL R4 K2
- 0x8C100903, // 0003 GETMET R4 R4 K3
- 0xB81A0800, // 0004 GETNGBL R6 K4
- 0x88180D05, // 0005 GETMBR R6 R6 K5
- 0x7C100400, // 0006 CALL R4 2
- 0x8C140506, // 0007 GETMET R5 R2 K6
- 0x8C1C0707, // 0008 GETMET R7 R3 K7
- 0x58240008, // 0009 LDCONST R9 K8
- 0x78120001, // 000A JMPF R4 #000D
- 0x58280009, // 000B LDCONST R10 K9
- 0x70020000, // 000C JMP #000E
- 0x5828000A, // 000D LDCONST R10 K10
- 0x7C1C0600, // 000E CALL R7 3
- 0x7C140400, // 000F CALL R5 2
- 0x8C140506, // 0010 GETMET R5 R2 K6
- 0x581C000B, // 0011 LDCONST R7 K11
- 0x7C140400, // 0012 CALL R5 2
- 0x8C140506, // 0013 GETMET R5 R2 K6
- 0x581C000C, // 0014 LDCONST R7 K12
- 0x7C140400, // 0015 CALL R5 2
- 0x8C140506, // 0016 GETMET R5 R2 K6
- 0x8C1C0707, // 0017 GETMET R7 R3 K7
- 0x5824000D, // 0018 LDCONST R9 K13
- 0x78120001, // 0019 JMPF R4 #001C
- 0x5828000E, // 001A LDCONST R10 K14
- 0x70020000, // 001B JMP #001D
- 0x5828000F, // 001C LDCONST R10 K15
- 0x7C1C0600, // 001D CALL R7 3
- 0x7C140400, // 001E CALL R5 2
- 0x8C140506, // 001F GETMET R5 R2 K6
- 0x78120001, // 0020 JMPF R4 #0023
- 0x581C0010, // 0021 LDCONST R7 K16
- 0x70020000, // 0022 JMP #0024
- 0x581C0011, // 0023 LDCONST R7 K17
- 0x7C140400, // 0024 CALL R5 2
- 0x8C140506, // 0025 GETMET R5 R2 K6
- 0x581C0012, // 0026 LDCONST R7 K18
- 0x7C140400, // 0027 CALL R5 2
- 0x8C140506, // 0028 GETMET R5 R2 K6
- 0x581C0013, // 0029 LDCONST R7 K19
- 0x7C140400, // 002A CALL R5 2
- 0x80040800, // 002B RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show_commissioning_info
-********************************************************************/
-be_local_closure(Matter_UI_show_commissioning_info, /* name */
- be_nested_proto(
- 14, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[20]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(device),
- /* K3 */ be_nested_str_weak(commissioning_open),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(millis),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(content_send),
- /* K8 */ be_nested_str_weak(format),
- /* K9 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCommissioning_X20open_X20for_X20_X25i_X20min_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K10 */ be_nested_str_weak(compute_manual_pairing_code),
- /* K11 */ be_nested_str_weak(_X3Cp_X3EManual_X20pairing_X20code_X3A_X3Cbr_X3E_X3Cb_X3E_X25s_X2D_X25s_X2D_X25s_X3C_X2Fb_X3E_X3C_X2Fp_X3E_X3Chr_X3E),
- /* K12 */ be_const_int(3),
- /* K13 */ be_const_int(2147483647),
- /* K14 */ be_nested_str_weak(_X3Cdiv_X3E_X3Ccenter_X3E),
- /* K15 */ be_nested_str_weak(compute_qrcode_content),
- /* K16 */ be_nested_str_weak(show_qrcode),
- /* K17 */ be_nested_str_weak(_X3Cp_X3E_X20_X25s_X3C_X2Fp_X3E),
- /* K18 */ be_nested_str_weak(_X3C_X2Fdiv_X3E),
- /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- }),
- be_str_weak(show_commissioning_info),
- &be_const_str_solidified,
- ( &(const binstruction[66]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x880C0102, // 0002 GETMBR R3 R0 K2
- 0x880C0703, // 0003 GETMBR R3 R3 K3
- 0xB8120800, // 0004 GETNGBL R4 K4
- 0x8C100905, // 0005 GETMET R4 R4 K5
- 0x7C100200, // 0006 CALL R4 1
- 0x040C0604, // 0007 SUB R3 R3 R4
- 0x541203E7, // 0008 LDINT R4 1000
- 0x0C0C0604, // 0009 DIV R3 R3 R4
- 0x14100706, // 000A LT R4 R3 K6
- 0x78120000, // 000B JMPF R4 #000D
- 0x580C0006, // 000C LDCONST R3 K6
- 0x5412001D, // 000D LDINT R4 30
- 0x00100604, // 000E ADD R4 R3 R4
- 0x5416003B, // 000F LDINT R5 60
- 0x0C100805, // 0010 DIV R4 R4 R5
- 0x8C140307, // 0011 GETMET R5 R1 K7
- 0x8C1C0508, // 0012 GETMET R7 R2 K8
- 0x58240009, // 0013 LDCONST R9 K9
- 0x5C280800, // 0014 MOVE R10 R4
- 0x7C1C0600, // 0015 CALL R7 3
- 0x7C140400, // 0016 CALL R5 2
- 0x88140102, // 0017 GETMBR R5 R0 K2
- 0x8C140B0A, // 0018 GETMET R5 R5 K10
- 0x7C140200, // 0019 CALL R5 1
- 0x8C180307, // 001A GETMET R6 R1 K7
- 0x8C200508, // 001B GETMET R8 R2 K8
- 0x5828000B, // 001C LDCONST R10 K11
- 0x402E0D0C, // 001D CONNECT R11 K6 K12
- 0x942C0A0B, // 001E GETIDX R11 R5 R11
- 0x54320003, // 001F LDINT R12 4
- 0x54360005, // 0020 LDINT R13 6
- 0x4030180D, // 0021 CONNECT R12 R12 R13
- 0x94300A0C, // 0022 GETIDX R12 R5 R12
- 0x54360006, // 0023 LDINT R13 7
- 0x40341B0D, // 0024 CONNECT R13 R13 K13
- 0x94340A0D, // 0025 GETIDX R13 R5 R13
- 0x7C200A00, // 0026 CALL R8 5
- 0x7C180400, // 0027 CALL R6 2
- 0x8C180307, // 0028 GETMET R6 R1 K7
- 0x8C200508, // 0029 GETMET R8 R2 K8
- 0x5828000E, // 002A LDCONST R10 K14
- 0x7C200400, // 002B CALL R8 2
- 0x7C180400, // 002C CALL R6 2
- 0x88180102, // 002D GETMBR R6 R0 K2
- 0x8C180D0F, // 002E GETMET R6 R6 K15
- 0x7C180200, // 002F CALL R6 1
- 0x8C1C0110, // 0030 GETMET R7 R0 K16
- 0x5C240C00, // 0031 MOVE R9 R6
- 0x7C1C0400, // 0032 CALL R7 2
- 0x8C1C0307, // 0033 GETMET R7 R1 K7
- 0x8C240508, // 0034 GETMET R9 R2 K8
- 0x582C0011, // 0035 LDCONST R11 K17
- 0x5C300C00, // 0036 MOVE R12 R6
- 0x7C240600, // 0037 CALL R9 3
- 0x7C1C0400, // 0038 CALL R7 2
- 0x8C1C0307, // 0039 GETMET R7 R1 K7
- 0x8C240508, // 003A GETMET R9 R2 K8
- 0x582C0012, // 003B LDCONST R11 K18
- 0x7C240400, // 003C CALL R9 2
- 0x7C1C0400, // 003D CALL R7 2
- 0x8C1C0307, // 003E GETMET R7 R1 K7
- 0x58240013, // 003F LDCONST R9 K19
- 0x7C1C0400, // 0040 CALL R7 2
- 0x80000000, // 0041 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: page_part_ctl
-********************************************************************/
-be_local_closure(Matter_UI_page_part_ctl, /* name */
- be_nested_proto(
- 15, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[48]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(check_privileged_access),
- /* K2 */ be_nested_str_weak(string),
- /* K3 */ be_nested_str_weak(partition_core),
- /* K4 */ be_nested_str_weak(persist),
- /* K5 */ be_nested_str_weak(Partition),
- /* K6 */ be_nested_str_weak(has_arg),
- /* K7 */ be_nested_str_weak(passcode),
- /* K8 */ be_nested_str_weak(discriminator),
- /* K9 */ be_nested_str_weak(device),
- /* K10 */ be_nested_str_weak(root_passcode),
- /* K11 */ be_nested_str_weak(arg),
- /* K12 */ be_nested_str_weak(root_discriminator),
- /* K13 */ be_nested_str_weak(ipv4only),
- /* K14 */ be_nested_str_weak(ipv4),
- /* K15 */ be_nested_str_weak(on),
- /* K16 */ be_nested_str_weak(save_param),
- /* K17 */ be_nested_str_weak(redirect),
- /* K18 */ be_nested_str_weak(_X2F_X3Frst_X3D),
- /* K19 */ be_nested_str_weak(enable),
- /* K20 */ be_nested_str_weak(tasmota),
- /* K21 */ be_nested_str_weak(cmd),
- /* K22 */ be_nested_str_weak(SetOption),
- /* K23 */ be_nested_str_weak(matter),
- /* K24 */ be_nested_str_weak(MATTER_OPTION),
- /* K25 */ be_nested_str_weak(_X201),
- /* K26 */ be_nested_str_weak(disable),
- /* K27 */ be_nested_str_weak(_X200),
- /* K28 */ be_nested_str_weak(del_fabric),
- /* K29 */ be_const_int(0),
- /* K30 */ be_nested_str_weak(sessions),
- /* K31 */ be_nested_str_weak(fabrics),
- /* K32 */ be_nested_str_weak(get_fabric_index),
- /* K33 */ be_nested_str_weak(remove_fabric),
- /* K34 */ be_const_int(1),
- /* K35 */ be_nested_str_weak(_X2Fmatterc_X3F),
- /* K36 */ be_nested_str_weak(log),
- /* K37 */ be_nested_str_weak(format),
- /* K38 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
- /* K39 */ be_const_int(2),
- /* K40 */ be_nested_str_weak(content_start),
- /* K41 */ be_nested_str_weak(Parameter_X20error),
- /* K42 */ be_nested_str_weak(content_send_style),
- /* K43 */ be_nested_str_weak(content_send),
- /* K44 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
- /* K45 */ be_nested_str_weak(content_button),
- /* K46 */ be_nested_str_weak(BUTTON_MANAGEMENT),
- /* K47 */ be_nested_str_weak(content_stop),
- }),
- be_str_weak(page_part_ctl),
- &be_const_str_solidified,
- ( &(const binstruction[156]) { /* code */
+ ( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
- 0x7C080200, // 0002 CALL R2 1
- 0x740A0001, // 0003 JMPT R2 #0006
- 0x4C080000, // 0004 LDNIL R2
- 0x80040400, // 0005 RET 1 R2
- 0xA40A0400, // 0006 IMPORT R2 K2
- 0xA40E0600, // 0007 IMPORT R3 K3
- 0xA4120800, // 0008 IMPORT R4 K4
- 0x8C140705, // 0009 GETMET R5 R3 K5
- 0x7C140200, // 000A CALL R5 1
- 0xA8020070, // 000B EXBLK 0 #007D
- 0x8C180306, // 000C GETMET R6 R1 K6
- 0x58200007, // 000D LDCONST R8 K7
- 0x7C180400, // 000E CALL R6 2
- 0x741A0003, // 000F JMPT R6 #0014
- 0x8C180306, // 0010 GETMET R6 R1 K6
- 0x58200008, // 0011 LDCONST R8 K8
- 0x7C180400, // 0012 CALL R6 2
- 0x781A0022, // 0013 JMPF R6 #0037
- 0x8C180306, // 0014 GETMET R6 R1 K6
- 0x58200007, // 0015 LDCONST R8 K7
- 0x7C180400, // 0016 CALL R6 2
- 0x781A0006, // 0017 JMPF R6 #001F
- 0x88180109, // 0018 GETMBR R6 R0 K9
- 0x601C0009, // 0019 GETGBL R7 G9
- 0x8C20030B, // 001A GETMET R8 R1 K11
- 0x58280007, // 001B LDCONST R10 K7
- 0x7C200400, // 001C CALL R8 2
- 0x7C1C0200, // 001D CALL R7 1
- 0x901A1407, // 001E SETMBR R6 K10 R7
- 0x8C180306, // 001F GETMET R6 R1 K6
- 0x58200008, // 0020 LDCONST R8 K8
- 0x7C180400, // 0021 CALL R6 2
- 0x781A0006, // 0022 JMPF R6 #002A
- 0x88180109, // 0023 GETMBR R6 R0 K9
- 0x601C0009, // 0024 GETGBL R7 G9
- 0x8C20030B, // 0025 GETMET R8 R1 K11
- 0x58280008, // 0026 LDCONST R10 K8
- 0x7C200400, // 0027 CALL R8 2
- 0x7C1C0200, // 0028 CALL R7 1
- 0x901A1807, // 0029 SETMBR R6 K12 R7
- 0x88180109, // 002A GETMBR R6 R0 K9
- 0x8C1C030B, // 002B GETMET R7 R1 K11
- 0x5824000E, // 002C LDCONST R9 K14
- 0x7C1C0400, // 002D CALL R7 2
- 0x1C1C0F0F, // 002E EQ R7 R7 K15
- 0x901A1A07, // 002F SETMBR R6 K13 R7
- 0x88180109, // 0030 GETMBR R6 R0 K9
- 0x8C180D10, // 0031 GETMET R6 R6 K16
- 0x7C180200, // 0032 CALL R6 1
- 0x8C180311, // 0033 GETMET R6 R1 K17
- 0x58200012, // 0034 LDCONST R8 K18
- 0x7C180400, // 0035 CALL R6 2
- 0x70020043, // 0036 JMP #007B
- 0x8C180306, // 0037 GETMET R6 R1 K6
- 0x58200013, // 0038 LDCONST R8 K19
- 0x7C180400, // 0039 CALL R6 2
- 0x781A000C, // 003A JMPF R6 #0048
- 0xB81A2800, // 003B GETNGBL R6 K20
- 0x8C180D15, // 003C GETMET R6 R6 K21
- 0x60200008, // 003D GETGBL R8 G8
- 0xB8262E00, // 003E GETNGBL R9 K23
- 0x88241318, // 003F GETMBR R9 R9 K24
- 0x7C200200, // 0040 CALL R8 1
- 0x00222C08, // 0041 ADD R8 K22 R8
- 0x00201119, // 0042 ADD R8 R8 K25
- 0x7C180400, // 0043 CALL R6 2
- 0x8C180311, // 0044 GETMET R6 R1 K17
- 0x58200012, // 0045 LDCONST R8 K18
- 0x7C180400, // 0046 CALL R6 2
- 0x70020032, // 0047 JMP #007B
- 0x8C180306, // 0048 GETMET R6 R1 K6
- 0x5820001A, // 0049 LDCONST R8 K26
- 0x7C180400, // 004A CALL R6 2
- 0x781A000C, // 004B JMPF R6 #0059
- 0xB81A2800, // 004C GETNGBL R6 K20
- 0x8C180D15, // 004D GETMET R6 R6 K21
- 0x60200008, // 004E GETGBL R8 G8
- 0xB8262E00, // 004F GETNGBL R9 K23
- 0x88241318, // 0050 GETMBR R9 R9 K24
- 0x7C200200, // 0051 CALL R8 1
- 0x00222C08, // 0052 ADD R8 K22 R8
- 0x0020111B, // 0053 ADD R8 R8 K27
- 0x7C180400, // 0054 CALL R6 2
- 0x8C180311, // 0055 GETMET R6 R1 K17
- 0x58200012, // 0056 LDCONST R8 K18
- 0x7C180400, // 0057 CALL R6 2
- 0x70020021, // 0058 JMP #007B
- 0x8C180306, // 0059 GETMET R6 R1 K6
- 0x5820001C, // 005A LDCONST R8 K28
- 0x7C180400, // 005B CALL R6 2
- 0x781A001D, // 005C JMPF R6 #007B
- 0x60180009, // 005D GETGBL R6 G9
- 0x8C1C030B, // 005E GETMET R7 R1 K11
- 0x5824001C, // 005F LDCONST R9 K28
- 0x7C1C0400, // 0060 CALL R7 2
- 0x7C180200, // 0061 CALL R6 1
- 0x581C001D, // 0062 LDCONST R7 K29
- 0x88200109, // 0063 GETMBR R8 R0 K9
- 0x8820111E, // 0064 GETMBR R8 R8 K30
- 0x8820111F, // 0065 GETMBR R8 R8 K31
- 0x6024000C, // 0066 GETGBL R9 G12
- 0x5C281000, // 0067 MOVE R10 R8
- 0x7C240200, // 0068 CALL R9 1
- 0x14240E09, // 0069 LT R9 R7 R9
- 0x7826000C, // 006A JMPF R9 #0078
- 0x94241007, // 006B GETIDX R9 R8 R7
- 0x8C241320, // 006C GETMET R9 R9 K32
- 0x7C240200, // 006D CALL R9 1
- 0x1C241206, // 006E EQ R9 R9 R6
- 0x78260005, // 006F JMPF R9 #0076
- 0x88240109, // 0070 GETMBR R9 R0 K9
- 0x8C241321, // 0071 GETMET R9 R9 K33
- 0x942C1007, // 0072 GETIDX R11 R8 R7
- 0x7C240400, // 0073 CALL R9 2
- 0x70020002, // 0074 JMP #0078
- 0x70020000, // 0075 JMP #0077
- 0x001C0F22, // 0076 ADD R7 R7 K34
- 0x7001FFED, // 0077 JMP #0066
- 0x8C240311, // 0078 GETMET R9 R1 K17
- 0x582C0023, // 0079 LDCONST R11 K35
- 0x7C240400, // 007A CALL R9 2
- 0xA8040001, // 007B EXBLK 1 1
- 0x7002001D, // 007C JMP #009B
- 0xAC180002, // 007D CATCH R6 0 2
- 0x7002001A, // 007E JMP #009A
- 0xB8222800, // 007F GETNGBL R8 K20
- 0x8C201124, // 0080 GETMET R8 R8 K36
- 0x8C280525, // 0081 GETMET R10 R2 K37
- 0x58300026, // 0082 LDCONST R12 K38
- 0x5C340C00, // 0083 MOVE R13 R6
- 0x5C380E00, // 0084 MOVE R14 R7
- 0x7C280800, // 0085 CALL R10 4
- 0x582C0027, // 0086 LDCONST R11 K39
- 0x7C200600, // 0087 CALL R8 3
- 0x8C200328, // 0088 GETMET R8 R1 K40
- 0x58280029, // 0089 LDCONST R10 K41
- 0x7C200400, // 008A CALL R8 2
- 0x8C20032A, // 008B GETMET R8 R1 K42
- 0x7C200200, // 008C CALL R8 1
- 0x8C20032B, // 008D GETMET R8 R1 K43
- 0x8C280525, // 008E GETMET R10 R2 K37
- 0x5830002C, // 008F LDCONST R12 K44
- 0x5C340C00, // 0090 MOVE R13 R6
- 0x5C380E00, // 0091 MOVE R14 R7
- 0x7C280800, // 0092 CALL R10 4
- 0x7C200400, // 0093 CALL R8 2
- 0x8C20032D, // 0094 GETMET R8 R1 K45
- 0x8828032E, // 0095 GETMBR R10 R1 K46
- 0x7C200400, // 0096 CALL R8 2
- 0x8C20032F, // 0097 GETMET R8 R1 K47
- 0x7C200200, // 0098 CALL R8 1
- 0x70020000, // 0099 JMP #009B
- 0xB0080000, // 009A RAISE 2 R0 R0
- 0x80000000, // 009B RET 0
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x88180303, // 0004 GETMBR R6 R1 K3
+ 0x7C080800, // 0005 CALL R2 4
+ 0x8C080301, // 0006 GETMET R2 R1 K1
+ 0x58100002, // 0007 LDCONST R4 K2
+ 0x84140001, // 0008 CLOSURE R5 P1
+ 0x88180304, // 0009 GETMBR R6 R1 K4
+ 0x7C080800, // 000A CALL R2 4
+ 0xA0000000, // 000B CLOSE R0
+ 0x80000000, // 000C RET 0
})
)
);
@@ -1243,21 +1734,24 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
be_local_class(Matter_UI,
1,
NULL,
- be_nested_map(13,
+ be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) },
+ { be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(root_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
+ { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) },
+ { be_const_key_weak(show_enable, 6), be_const_closure(Matter_UI_show_enable_closure) },
+ { be_const_key_weak(init, 11), be_const_closure(Matter_UI_init_closure) },
+ { be_const_key_weak(show_passcode_form, -1), be_const_closure(Matter_UI_show_passcode_form_closure) },
+ { be_const_key_weak(web_add_config_button, 15), be_const_closure(Matter_UI_web_add_config_button_closure) },
+ { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) },
+ { be_const_key_weak(page_part_mgr, -1), be_const_closure(Matter_UI_page_part_mgr_closure) },
{ be_const_key_weak(page_part_ctl, -1), be_const_closure(Matter_UI_page_part_ctl_closure) },
{ be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) },
- { be_const_key_weak(page_part_mgr, 8), be_const_closure(Matter_UI_page_part_mgr_closure) },
- { be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) },
- { be_const_key_weak(web_sensor, 10), be_const_closure(Matter_UI_web_sensor_closure) },
- { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) },
- { be_const_key_weak(show_enable, 12), be_const_closure(Matter_UI_show_enable_closure) },
- { be_const_key_weak(show_passcode_form, 1), be_const_closure(Matter_UI_show_passcode_form_closure) },
- { be_const_key_weak(show_qrcode, 5), be_const_closure(Matter_UI_show_qrcode_closure) },
- { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) },
- { be_const_key_weak(device, -1), be_const_var(0) },
+ { be_const_key_weak(show_plugins_configuration, 14), be_const_closure(Matter_UI_show_plugins_configuration_closure) },
+ { be_const_key_weak(device, 13), be_const_var(0) },
+ { be_const_key_weak(web_sensor, -1), be_const_closure(Matter_UI_web_sensor_closure) },
+ { be_const_key_weak(show_qrcode, -1), be_const_closure(Matter_UI_show_qrcode_closure) },
+ { be_const_key_weak(plugin_option, -1), be_const_closure(Matter_UI_plugin_option_closure) },
+ { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) },
})),
be_str_weak(Matter_UI)
);
From 39abde258393321f35b9adc78b2c2fcde3dd43de Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Tue, 25 Apr 2023 13:46:19 +0200
Subject: [PATCH 035/289] Worked on ESP32 dimmer with Zero cross (#18481)
* Worked on ESP32 dimmer with Zero cross
Until now the ESP32 does not support zero-cross dimmer. I take a sneak how they did in in ESPhome and adapted the approach to TASMOTA. At the end it works that smooth that likely i will change ESP8266 either so we have a common code. Currently ESP8266 is not touched.
There is a minor issue with savedata == default. When changing the dimmer value the interrupts get stopped during write of the config data to flash.
* ESP8266 Dimmer added
Worked all so well and the code is much smaller. There is no need for reconfiguration on existing users. But there are settings not needed anymore. Will work on the documentation. Anyhow existing installations can upgrade without hickup
* Optimized endpoints at dimmer 0 and 100
* Removed debug stuff
* Fix Issue at dimmer = 0
* Small bugfix
* Final checked Version
* Update xsns_01_counter.ino
* Add missing func
* Update xsns_01_counter.ino
* Moved out of the house of counter and build my own one
* New ZeroCross Driver
* Update xdrv_91_zerocrossDimmer.ino
* evolving
* Delete xdrv_91_zerocrossDimmer.ino
* Add files via upload
* Changed drv number from 1 to 68
* Commit to merge
---
tasmota/include/tasmota_globals.h | 1 +
.../xdrv_04_light_utils.ino | 2 +-
.../xdrv_68_zerocrossDimmer.ino | 276 ++++++++++++++++++
.../tasmota_xsns_sensor/xsns_01_counter.ino | 135 +--------
4 files changed, 280 insertions(+), 134 deletions(-)
create mode 100644 tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
diff --git a/tasmota/include/tasmota_globals.h b/tasmota/include/tasmota_globals.h
index 187209279..3518899b0 100644
--- a/tasmota/include/tasmota_globals.h
+++ b/tasmota/include/tasmota_globals.h
@@ -45,6 +45,7 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack
extern "C" void resetPins();
extern "C" int startWaveformClockCycles(uint8_t pin, uint32_t highCcys, uint32_t lowCcys,
uint32_t runTimeCcys, int8_t alignPhase, uint32_t phaseOffsetCcys, bool autoPwm);
+extern "C" void setTimer1Callback(uint32_t (*fn)());
#ifdef USE_SERIAL_BRIDGE
void SerialBridgePrintf(PGM_P formatP, ...);
#endif
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino
index 9567fdd48..0e214b977 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light_utils.ino
@@ -40,7 +40,7 @@ const gamma_table_t ac_dimmer_table[] = { // don't put in PROGMEM for performa
{ 900, 704 },
{ 950, 748 },
{ 990, 850 },
- { 1024, 1024 },
+ { 1023, 1023 },
{ 0xFFFF, 0xFFFF } // fail-safe if out of range
};
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
new file mode 100644
index 000000000..307fabc00
--- /dev/null
+++ b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
@@ -0,0 +1,276 @@
+/*
+ xdrv_68_zerocrossdimmer.ino - Zero-Cross Dimmer support for Tasmota
+
+ Copyright (C) 2023 Stefan Bode
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef USE_AC_ZERO_CROSS_DIMMER
+/*********************************************************************************************\
+ * Zero-Cross AC Dimmer PMM 1..xx use
+\*********************************************************************************************/
+
+#define XDRV_68 68
+
+static const uint32_t GATE_ENABLE_TIME = 100;
+
+struct AC_ZERO_CROSS_DIMMER {
+ uint32_t cycle_time_us;
+ /// Time (in micros()) of last ZC signal
+ uint32_t crossed_zero_at;
+ /// Time since last ZC pulse to enable gate pin. 0 means not set.
+ bool timer_iterrupt_started = false;
+ bool dimmer_in_use = false;
+ // Check if 50µs timer is running.
+ uint32_t enable_time_us[MAX_PWMS];
+ /// Time since last ZC pulse to disable gate pin. 0 means no disable.
+ uint32_t disable_time_us[MAX_PWMS];
+ uint8_t current_state_in_phase[MAX_PWMS]; // 0=before fire HIGH, 1=HIGH, 2=after setting LOW, 3=before HIGH without setting LOW (POWER ON)
+ uint32_t lastlight[MAX_PWMS];
+ uint16_t detailpower[MAX_PWMS]; // replaces dimmer and light controll 0..10000. required savedata 0.
+ uint32_t intr_counter = 0;
+} ac_zero_cross_dimmer;
+
+
+#ifdef ESP32
+ static hw_timer_t *dimmer_timer = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
+#endif
+
+#define D_PRFX_ZCDIMMER "ZCDimmer"
+#define D_CMND_DIMMERSET "Set"
+
+const char kZCDimmerCommands[] PROGMEM = D_PRFX_ZCDIMMER "|" D_CMND_DIMMERSET;
+
+void (* const ZCDimmerCommand[])(void) PROGMEM = {
+ &CmndZCDimmerSet
+ };
+
+void IRAM_ATTR ACDimmerZeroCross(uint32_t time) {
+ ac_zero_cross_dimmer.dimmer_in_use = false;
+ ac_zero_cross_dimmer.cycle_time_us = time - ac_zero_cross_dimmer.crossed_zero_at;
+ ac_zero_cross_dimmer.crossed_zero_at = time;
+ for (uint8_t i=0; i < MAX_PWMS; i++) {
+ if (Pin(GPIO_PWM1, i) == -1) continue;
+ ac_zero_cross_dimmer.dimmer_in_use |= ac_zero_cross_dimmer.lastlight[i] > 0;
+ // Dimmer is physically off. Skip swich on
+ ac_zero_cross_dimmer.current_state_in_phase[i] = 0;
+ if (100 * ac_zero_cross_dimmer.enable_time_us[i] > 95 * ac_zero_cross_dimmer.cycle_time_us ) {
+ ac_zero_cross_dimmer.current_state_in_phase[i] = 1;
+ ac_zero_cross_dimmer.disable_time_us[i] = ac_zero_cross_dimmer.cycle_time_us / 2;
+ }
+ // If full cycle is required keep pin HIGH, skip LOW by skipping phase
+ if (100 * ac_zero_cross_dimmer.enable_time_us[i] < 15 * ac_zero_cross_dimmer.cycle_time_us) {
+ ac_zero_cross_dimmer.current_state_in_phase[i] = 3;
+ }
+ }
+}
+
+uint32_t IRAM_ATTR ACDimmerTimer_intr_ESP8266() {
+ //ACDimmerTimer_intr();
+ ACDimmerTimer_intr();
+ return 4000;
+}
+
+void ACDimmerInterruptDisable(bool disable)
+{
+ AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Zero-CrossDimmer enabled: %d"),!disable);
+ ac_zero_cross_dimmer.timer_iterrupt_started = !disable;
+ if (disable) {
+ //stop the interrupt
+#ifdef ESP32
+ if (dimmer_timer != nullptr) {
+ timerAlarmDisable(dimmer_timer);
+ }
+#endif
+#ifdef ESP8266
+ //setTimer1Callback(NULL);
+#endif
+ } else {
+ for (uint8_t i = 0 ; i < MAX_PWMS; i++) {
+ if (Pin(GPIO_PWM1, i) != -1) {
+ pinMode(Pin(GPIO_PWM1, i), OUTPUT);
+ AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Zero-CrossDimmer Pin %d set"),Pin(GPIO_PWM1, i));
+ }
+ }
+#ifdef ESP32
+ if (dimmer_timer == nullptr) {
+ // 80 Divider -> 1 count=1µs
+ dimmer_timer = timerBegin(0, 80, true);
+ timerAttachInterrupt(dimmer_timer, &ACDimmerTimer_intr, true);
+ // For ESP32, we can't use dynamic interval calculation because the timerX functions
+ // are not callable from ISR (placed in flash storage).
+ // Here we just use an interrupt firing every 75 µs.
+ if (Settings->save_data == 0) {
+ AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Save disabled. High frequency scan enabled. DO NOT USE SAVEDATA if channel is on"));
+ timerAlarmWrite(dimmer_timer, 30, true);
+ } else {
+ AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Save on. 75µs scan enabled"));
+ timerAlarmWrite(dimmer_timer, 75, true);
+ }
+ }
+ timerAlarmEnable(dimmer_timer);
+#endif
+
+#ifdef ESP8266
+ // Uses ESP8266 waveform (soft PWM) class
+ // PWM and AcDimmer can even run at the same time this way
+ //setTimer1Callback(&ACDimmerTimer_intr_ESP8266);
+#endif
+ }
+}
+
+void IRAM_ATTR ACDimmerTimer_intr() {
+ // If no ZC signal received yet.
+ uint32_t now = micros();
+ ac_zero_cross_dimmer.intr_counter++;
+ if (ac_zero_cross_dimmer.crossed_zero_at == 0)
+ return;
+
+ uint32_t time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+ if (time_since_zc > 10100) {
+ memset(&ac_zero_cross_dimmer.current_state_in_phase, 0x00, sizeof(ac_zero_cross_dimmer.current_state_in_phase));
+ ac_zero_cross_dimmer.crossed_zero_at += ac_zero_cross_dimmer.cycle_time_us;
+ time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+ }
+
+ for (uint8_t i = 0 ; i < MAX_PWMS; i++ ) {
+ if (Pin(GPIO_PWM1, i) == -1) continue;
+ switch (ac_zero_cross_dimmer.current_state_in_phase[i]) {
+ case 1:
+ if (time_since_zc >= ac_zero_cross_dimmer.disable_time_us[i]) {
+ digitalWrite(Pin(GPIO_PWM1, i), LOW);
+ ac_zero_cross_dimmer.current_state_in_phase[i]++;
+ }
+ break;
+ case 0:
+ case 3:
+ if (time_since_zc >= ac_zero_cross_dimmer.enable_time_us[i]) {
+ digitalWrite(Pin(GPIO_PWM1, i), HIGH);
+ ac_zero_cross_dimmer.current_state_in_phase[i]++;
+ }
+ break;
+ }
+ }
+}
+
+void ACDimmerControllTrigger(void) {
+
+ if (ac_zero_cross_dimmer.timer_iterrupt_started != ac_zero_cross_dimmer.dimmer_in_use) {
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: ZeroEnable %d --> %d ... change..."),ac_zero_cross_dimmer.timer_iterrupt_started, ac_zero_cross_dimmer.dimmer_in_use);
+ ACDimmerInterruptDisable(!ac_zero_cross_dimmer.dimmer_in_use);
+ }
+ for (uint8_t i = 0; i < MAX_PWMS; i++){
+ if (Pin(GPIO_PWM1, i) == -1) continue;
+ ac_zero_cross_dimmer.lastlight[i] = Light.fade_running ? Light.fade_cur_10[i] : Light.fade_start_10[i];
+ ac_zero_cross_dimmer.enable_time_us[i] = (ac_zero_cross_dimmer.cycle_time_us * (1023 - ac_zero_cross_power(ac_zero_cross_dimmer.lastlight[i]))) / 1023;
+
+#ifdef ESP32
+ if (ac_zero_cross_dimmer.detailpower[i]){
+ float state = (float)(1 - (ac_zero_cross_dimmer.detailpower[i]/10000.0));
+ //state = std::acos(1 - (2 * state)) / 3.14159 * ac_zero_cross_dimmer.cycle_time_us;
+ state = std::acos(1 - (2 * state)) / 3.14159 * 10000;
+ //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: Float2: %*_f"),0,&state);
+ ac_zero_cross_dimmer.enable_time_us[i] = (uint32_t)state;
+ ac_zero_cross_dimmer.lastlight[i] = 1;
+ }
+#endif
+
+ ac_zero_cross_dimmer.disable_time_us[i] = ac_zero_cross_dimmer.enable_time_us[i] + GATE_ENABLE_TIME;
+ }
+
+}
+
+void ACDimmerLogging(void)
+{
+ bool alarmEnabled = false;
+ uint32_t timercounter = ac_zero_cross_dimmer.intr_counter;
+
+#ifdef ESP32
+ if (dimmer_timer != nullptr) {
+ alarmEnabled = timerAlarmEnabled(dimmer_timer);
+ timercounter = (uint32_t)timerRead(dimmer_timer);
+ }
+#endif
+
+ AddLog(LOG_LEVEL_DEBUG, PSTR("ZCD: ZeroEnable %d -> %d, Alarm %d, intr: %ld, cycle time: %ld µs"),
+ ac_zero_cross_dimmer.dimmer_in_use, ac_zero_cross_dimmer.timer_iterrupt_started, alarmEnabled, timercounter, ac_zero_cross_dimmer.cycle_time_us
+ );
+ for (uint8_t i = 0; i < MAX_PWMS; i++){
+ if (Pin(GPIO_PWM1, i) == -1) continue;
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: PWM[%d] en: %ld µs, dis: %ld µs, state %d, fade: %d, cur: %d, end: %d, lastlight: %d"),
+ i+1, ac_zero_cross_dimmer.enable_time_us[i], ac_zero_cross_dimmer.disable_time_us[i],
+ ac_zero_cross_dimmer.current_state_in_phase[i], Light.fade_cur_10[i], Light.fade_start_10[i], Light.fade_end_10[i], ac_zero_cross_dimmer.lastlight[i]
+ );
+ }
+
+}
+
+
+/*********************************************************************************************\
+ * Commands
+\*********************************************************************************************/
+
+void CmndZCDimmerSet(void)
+{
+ if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_PWMS)) {
+ if (XdrvMailbox.data_len > 0) {
+ ac_zero_cross_dimmer.detailpower[XdrvMailbox.index-1] = (uint16_t)(100 * CharToFloat(XdrvMailbox.data));
+ }
+ ResponseCmndIdxFloat((float)(ac_zero_cross_dimmer.detailpower[XdrvMailbox.index-1]) / 100, 2);
+ }
+}
+
+/*********************************************************************************************\
+ * Interface
+\*********************************************************************************************/
+
+bool Xdrv68(uint32_t function)
+{
+ bool result = false;
+ if (Settings->flag4.zerocross_dimmer) {
+ switch (function) {
+ case FUNC_INIT:
+#ifdef ESP32
+ //ACDimmerInterruptDisable(false);
+#endif
+#ifdef ESP8266
+ setTimer1Callback(&ACDimmerTimer_intr_ESP8266);
+#endif
+ break;
+ case FUNC_EVERY_SECOND:
+ ACDimmerLogging();
+ break;
+ case FUNC_EVERY_100_MSECOND:
+ ACDimmerControllTrigger();
+ break;
+ case FUNC_INTERRUPT_STOP:
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: FUNC_INTERRUPT_STOP"));
+ ACDimmerInterruptDisable(true);
+ break;
+ case FUNC_INTERRUPT_START:
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: FUNC_INTERRUPT_START"));
+ ACDimmerInterruptDisable(false);
+ break;
+ case FUNC_COMMAND:
+ result = DecodeCommand(kZCDimmerCommands, ZCDimmerCommand);
+ //result = DecodeCommand(kShutterCommands, ShutterCommand);
+
+ break;
+ }
+ }
+ return result;
+}
+
+#endif // USE_AC_ZERO_CROSS_DIMMER
diff --git a/tasmota/tasmota_xsns_sensor/xsns_01_counter.ino b/tasmota/tasmota_xsns_sensor/xsns_01_counter.ino
index d427cc7db..b23870503 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_01_counter.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_01_counter.ino
@@ -2,7 +2,6 @@
xsns_01_counter.ino - Counter sensors (water meters, electricity meters etc.) sensor support for Tasmota
Copyright (C) 2021 Maarten Damen and Theo Arends
- Stefan Bode (Zero-Cross Dimmer)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,22 +47,6 @@ struct COUNTER {
} Counter;
-#ifdef USE_AC_ZERO_CROSS_DIMMER
-struct AC_ZERO_CROSS_DIMMER {
- bool startReSync = false; // set to TRUE if zero-cross event occurs
- bool startMeasurePhase[MAX_COUNTERS] ; // set to TRUE if channel is ON and zero-cross occurs to initiate phase measure on channel
- bool pwm_defined[MAX_COUNTERS]; // check if all GPIO are set and zerocross enabled. Then ADD dimmer.
- bool PWM_ON[MAX_COUNTERS] ; // internal ON/OFF of the channel
- uint32_t current_cycle_ClockCycles = 0; // amount of clock cycles between two zero-cross events.
- uint32_t currentPWMCycleCount[MAX_COUNTERS] ; // clock cycle time of PWM channel, required to measure actual phase. [3] is phase of zero-cross
- int16_t currentShiftClockCycle[MAX_COUNTERS]; // dynamic phase correction per channel in clock cycles
- uint32_t tobe_cycle_timeClockCycles = 0; // clock cycles between zero-cross events. Depend on main frequency and CPU speed
- uint32_t lastCycleCount = 0; // Last value of GetCycleCount during zero-cross sychronisation
- uint32_t currentSteps = 100; // dynamic value of zero-crosses between two sychronisation intervalls (default=20 == 200ms at 100Hz)
- uint32_t high; // cycle counts for PWM high vaule. needs long enough (4µs) to secure fire TRIAC
-} ac_zero_cross_dimmer;
-#endif //USE_AC_ZERO_CROSS_DIMMER
-
void IRAM_ATTR CounterIsrArg(void *arg) {
uint32_t index = *static_cast(arg);
@@ -93,27 +76,7 @@ void IRAM_ATTR CounterIsrArg(void *arg) {
// restart PWM each second (german 50Hz has to up to 0.01% deviation)
// restart initiated by setting Counter.startReSync = true;
#ifdef USE_AC_ZERO_CROSS_DIMMER
- // if zero-cross events occur ond channel is on. phase on PWM must be measured
- if ( ac_zero_cross_dimmer.startMeasurePhase[index] == true ) {
- ac_zero_cross_dimmer.currentPWMCycleCount[index] = ESP.getCycleCount();
- ac_zero_cross_dimmer.startMeasurePhase[index] = false;
- }
- // if zero-cross event occurs (200ms window, 5-times a second) and device is online for >10sec
- if (index == 3 && RtcSettings.pulse_counter[index]%(Settings->pwm_frequency / 5) == 0 && ac_zero_cross_dimmer.pwm_defined[index] && millis() > 10000) {
- ac_zero_cross_dimmer.currentPWMCycleCount[index] = ESP.getCycleCount();
-
- if (ac_zero_cross_dimmer.lastCycleCount > 0) {
- // start phase measure on PWM channels and initiate phase sync with zero-cross.
- ac_zero_cross_dimmer.startReSync = true;
- for (uint8_t k=0; k < MAX_COUNTERS-1; k++ ) {
- if (ac_zero_cross_dimmer.PWM_ON[k] == true) ac_zero_cross_dimmer.startMeasurePhase[k] = true;
- }
- ac_zero_cross_dimmer.currentSteps = (ac_zero_cross_dimmer.currentPWMCycleCount[index]-ac_zero_cross_dimmer.lastCycleCount+(ac_zero_cross_dimmer.tobe_cycle_timeClockCycles/2))/(ac_zero_cross_dimmer.tobe_cycle_timeClockCycles);
- ac_zero_cross_dimmer.current_cycle_ClockCycles = (ac_zero_cross_dimmer.currentPWMCycleCount[index]-ac_zero_cross_dimmer.lastCycleCount)/ac_zero_cross_dimmer.currentSteps;
- }
- ac_zero_cross_dimmer.lastCycleCount = ac_zero_cross_dimmer.currentPWMCycleCount[index];
- }
-
+ if (index == 3) ACDimmerZeroCross(time);
#endif //USE_AC_ZERO_CROSS_DIMMER
return;
}
@@ -162,26 +125,9 @@ bool CounterPinState(void)
void CounterInit(void)
{
+
for (uint32_t i = 0; i < MAX_COUNTERS; i++) {
if (PinUsed(GPIO_CNTR1, i)) {
-#ifdef USE_AC_ZERO_CROSS_DIMMER
- if (Settings->flag4.zerocross_dimmer) {
- ac_zero_cross_dimmer.current_cycle_ClockCycles = ac_zero_cross_dimmer.tobe_cycle_timeClockCycles = microsecondsToClockCycles(1000000 / Settings->pwm_frequency);
- // short fire on PWM to ensure not to hit next sinus curve but trigger the TRIAC. 0.78% of duty cycle (10ms) ~4µs
- ac_zero_cross_dimmer.high = ac_zero_cross_dimmer.current_cycle_ClockCycles / 256;
-
- // Support for dimmer 1-3. Counter4 reseverd for zero-cross signal
- if ((i < MAX_COUNTERS-1 && PinUsed(GPIO_PWM1, i)) || ( i == MAX_COUNTERS-1) ) {
- ac_zero_cross_dimmer.pwm_defined[i] = true;
- if (i == 3) {
- AddLog(LOG_LEVEL_INFO, PSTR("ZeroCross initialized"));
- } else {
- AddLog(LOG_LEVEL_INFO, PSTR("Dimmer: [%d] initialized. READY. Dimmer %d"), i+1, Light.fade_running ? Light.fade_cur_10[i] : Light.fade_start_10[i]);
- }
-
- }
- }
-#endif //USE_AC_ZERO_CROSS_DIMMER
Counter.any_counter = true;
pinMode(Pin(GPIO_CNTR1, i), bitRead(Counter.no_pullup, i) ? INPUT : INPUT_PULLUP);
if ((0 == Settings->pulse_counter_debounce_low) && (0 == Settings->pulse_counter_debounce_high) && !Settings->flag4.zerocross_dimmer) {
@@ -260,78 +206,6 @@ void CounterShow(bool json)
}
}
-#ifdef USE_AC_ZERO_CROSS_DIMMER
-void SyncACDimmer(void)
-{
- if (ac_zero_cross_dimmer.startReSync ) {
- // currently only support one AC Dimmer PWM. Plan to support up to 4 Dimmer on same Phase.
- for (uint32_t i = 0; i < MAX_COUNTERS-1; i++) {
- if (Light.fade_start_10[i] == 0 && Light.fade_cur_10[i] == 0 && ac_zero_cross_dimmer.PWM_ON[i]==false ) continue;
- if (ac_zero_cross_dimmer.pwm_defined[i] && (ac_zero_cross_dimmer.startMeasurePhase[i] == 0 || ac_zero_cross_dimmer.PWM_ON[i] == false ) )
- {
- uint32_t phaseStart_ActualClockCycles; // As-Is positon of PWM after Zero Cross
- uint32_t phaseStart_ToBeClockCycles; // To be position after zero-cross to fire PWM start
- int16_t phaseShift_ClockCycles; //
-
-
- // reset trigger for PWM sync
- ac_zero_cross_dimmer.startReSync = false;
- // calculate timeoffset to fire PWM based on Dimmer
- phaseStart_ToBeClockCycles = (ac_zero_cross_dimmer.tobe_cycle_timeClockCycles * (1024 - ac_zero_cross_power(Light.fade_running ? Light.fade_cur_10[i] : Light.fade_start_10[i]))) / 1024;
-
- // Limit range to avoid overshoot and undershoot
- phaseStart_ToBeClockCycles = tmin(tmax(phaseStart_ToBeClockCycles, 160000), 0.95* ac_zero_cross_dimmer.tobe_cycle_timeClockCycles);
-
- // Switch OFF dimmer
- if (Light.fade_start_10[i] == 0 && !Light.fade_running) {
- ac_zero_cross_dimmer.PWM_ON[i]=false;
- Light.fade_cur_10[i] = 0;
- digitalWrite(Pin(GPIO_PWM1, i), LOW);
- //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("CNT2: [%d], curr: %d, final: %d, fading: %d, phase-shift: %d, ON/OFF: %d"),i, Light.fade_cur_10[i], Light.fade_start_10[i], Light.fade_running, phaseStart_ToBeClockCycles,ac_zero_cross_dimmer.PWM_ON[i]);
- continue;
- }
- // Calculyte clockcycles between zero-cross [3] and start of the current PWM signal [i]
- phaseStart_ActualClockCycles = ac_zero_cross_dimmer.currentPWMCycleCount[i]-ac_zero_cross_dimmer.currentPWMCycleCount[3];
-
- // Calulate additional or less clockcycles to move current phase position to should be position
- phaseShift_ClockCycles = (int32_t)((int32_t)phaseStart_ToBeClockCycles-(int32_t)phaseStart_ActualClockCycles)/100;
-
- if ( ac_zero_cross_dimmer.PWM_ON[i] == 0 ) {
- // because in LOOP calculate the timelag to fire PWM correctly with zero-cross
- uint32_t timelag_ClockCycles = (ESP.getCycleCount() - ac_zero_cross_dimmer.currentPWMCycleCount[3])%ac_zero_cross_dimmer.tobe_cycle_timeClockCycles;
- timelag_ClockCycles = ((phaseStart_ToBeClockCycles + ac_zero_cross_dimmer.tobe_cycle_timeClockCycles) - timelag_ClockCycles)%ac_zero_cross_dimmer.tobe_cycle_timeClockCycles;
-
- delayMicroseconds(clockCyclesToMicroseconds(timelag_ClockCycles));
- ac_zero_cross_dimmer.PWM_ON[i]=true;
- pinMode(Pin(GPIO_PWM1, i), OUTPUT);
- } else {
- // currentShiftClockCycle is an I-Controller (not PID) to realign the phase. grace time are 5 clock cycles
- ac_zero_cross_dimmer.currentShiftClockCycle[i] += phaseShift_ClockCycles > 5 ? 1 : (phaseShift_ClockCycles < -5 ? -1 : 0);
- ac_zero_cross_dimmer.current_cycle_ClockCycles += ac_zero_cross_dimmer.currentShiftClockCycle[i]+phaseShift_ClockCycles;
- }
-#ifdef ESP8266
- // Find the first GPIO being generated by checking GCC's find-first-set (returns 1 + the bit of the first 1 in an int32_t
- startWaveformClockCycles(Pin(GPIO_PWM1, i), ac_zero_cross_dimmer.high, ac_zero_cross_dimmer.current_cycle_ClockCycles - ac_zero_cross_dimmer.high, 0, -1, 0, true);
-#endif // ESP8266
-#ifdef ESP32
- // Under investigation. Still not working
- double esp32freq = 1000000.0 / clockCyclesToMicroseconds(ac_zero_cross_dimmer.current_cycle_ClockCycles);
- ledcSetup(i, esp32freq, 10);
- ledcAttachPin(Pin(GPIO_PWM1, i), i);
- ledcWrite(i, 5);
-
-#endif // ESP32
-
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("CNT: [%d], shift: %d, dimm_time_CCs %d, phaseShift_CCs %d, currentPWMcylce: %lu, current_cycle_CC: %lu, lastcc %lu, currentSteps %lu, currDIM %lu, last delta:%lu"),
- i, ac_zero_cross_dimmer.currentShiftClockCycle[i], phaseStart_ToBeClockCycles,phaseShift_ClockCycles,ac_zero_cross_dimmer.currentPWMCycleCount[i],ac_zero_cross_dimmer.current_cycle_ClockCycles , ac_zero_cross_dimmer.lastCycleCount, ac_zero_cross_dimmer.currentSteps, Light.fade_cur_10[i],phaseStart_ActualClockCycles); // Light fading
- //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("CNT: [%d], curr: %d, final: %d, fading: %d, phase-shift: %d, ON/OFF: %d"),i, Light.fade_cur_10[i], Light.fade_start_10[i], Light.fade_running, phaseStart_ToBeClockCycles,ac_zero_cross_dimmer.PWM_ON[i]);
-
- } // do sync onchannel
- } // loop on counter
- } // zero cross detected
-} // end SyncACDimmer
-#endif //USE_AC_ZERO_CROSS_DIMMER
-
/*********************************************************************************************\
* Commands
\*********************************************************************************************/
@@ -406,11 +280,6 @@ bool Xsns01(uint32_t function)
case FUNC_JSON_APPEND:
CounterShow(1);
break;
-#ifdef USE_AC_ZERO_CROSS_DIMMER
- case FUNC_EVERY_50_MSECOND:
- SyncACDimmer();
- break;
-#endif //USE_AC_ZERO_CROSS_DIMMER
#ifdef USE_WEBSERVER
case FUNC_WEB_SENSOR:
CounterShow(0);
From 074831437f250e91421b76e13438d24c88b8c621 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Tue, 25 Apr 2023 15:43:41 +0200
Subject: [PATCH 036/289] Update changelogs
---
CHANGELOG.md | 3 +-
CODE_OWNERS.md | 421 ++++++++++++++++++++++++------------------------
RELEASENOTES.md | 2 +
3 files changed, 215 insertions(+), 211 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index acc56390f..b73586fcf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,12 +8,13 @@ All notable changes to this project will be documented in this file.
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
-- Matter add UI to change endpoints configuration
+- Matter add UI to change endpoints configuration (#18498)
### Breaking Changed
### Changed
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
+- Refactored Zero Cross Dimmer (#18481)
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
diff --git a/CODE_OWNERS.md b/CODE_OWNERS.md
index 2c8374b59..2e9bcfc20 100644
--- a/CODE_OWNERS.md
+++ b/CODE_OWNERS.md
@@ -7,215 +7,216 @@
In addition to @arendst the following code is mainly owned by:
-| Code | Owner
-|----------------------------|---------------------------
-| Tasmota Drivers |
-| |
-| xdrv_01_webserver | @arendst
-| xdrv_02_mqtt | @arendst
-| xdrv_03_energy | @arendst
-| xdrv_04_light | @s-hadinger
-| xdrv_05_irremote | @s-hadinger
-| xdrv_06_snfbridge | @arendst
-| xdrv_07_domoticz | @arendst
-| xdrv_08_serial_bridge | Dániel Zoltán Tolnai
-| xdrv_09_timers | @arendst
-| xdrv_10_rules | @arendst, @barbudor
-| xdrv_10_scripter | @gemu
-| xdrv_11_knx | @adrian
-| xdrv_12_discovery | @arendst, @effelle, @emontnemery
-| xdrv_13_display | @gemu, @s-hadinger
-| xdrv_14_mp3 | @gemu, @mike2nl
-| xdrv_15_pca9685 | Andre Thomas
-| xdrv_16_tuyamcu | @btsimonh
-| xdrv_17_rcswitch |
-| xdrv_18_armtronix_dimmers | @wvdv2002
-| xdrv_19_pz16dz_dimmer | Joel Stein
-| xdrv_20_hue | @s-hadinger
-| xdrv_21_wemo | @s-hadinger
-| xdrv_22_sonoff_ifan | @arendst
-| xdrv_23_zigbee | @s-hadinger
-| xdrv_24_buzzer | @arendst
-| xdrv_25_stepper | Tim Leuscher
-| xdrv_26_ariluxrf | @arendst
-| xdrv_27_shutter | @stefanbode
-| xdrv_28_pcf8574 | @stefanbode
-| xdrv_29_deepsleep | @stefanbode
-| xdrv_30_exs_dimmer | Andreas Schultz
-| xdrv_31_tasmota_client | Andre Thomas
-| xdrv_32_hotplug | @BASM
-| xdrv_33_nrf24l01 | @staars
-| xdrv_34_wemos_motor | Peter Franck
-| xdrv_35_pwm_dimmer | Paul C Diem
-| xdrv_36_keeloq | he-so
-| xdrv_37_sonoff_d1 | @arendst
-| xdrv_38_ping | @s-hadinger
-| xdrv_39_thermostat | Javier Argita
-| xdrv_40_telegram | @arendst
-| xdrv_41_tcp_bridge | @s-hadinger
-| xdrv_42_i2s_audio | @gemu
-| xdrv_43_mlx90640 | @staars
-| xdrv_44_miel_hvac | David GWynne
-| xdrv_45_shelly_dimmer | James Turton
-| xdrv_46_ccloader | @staars
-| xdrv_47_ftc532 | Peter Franck
-| xdrv_48_timeprop | Colin Law, Thomas Herrmann
-| xdrv_49_pid | Colin Law, Thomas Herrmann
-| xdrv_50_filesystem | @gemu, @barbudor
-| xdrv_51_bs814a2 | Peter Franck
-| xdrv_52_berry | @s-hadinger, @staars (ULP)
-| xdrv_53_projector_ctrl | Jan Bubík
-| xdrv_54_lvgl | @s-hadinger
-| xdrv_55_touch | @gemu, @s-hadinger
-| xdrv_56_rtc_chips | @arendst, @s-hadinger
-| xdrv_57_tasmesh | @staars
-| xdrv_58_range_extender | @sillyfrog
-| xdrv_59_influxdb | @arendst
-| xdrv_60_shift595 | Jacek Ziółkowski
-| xdrv_61_ds3502 | f-reiling
-| xdrv_62_improv | @arendst
-| xdrv_63_modbus_bridge | @jeroenst
-| xdrv_64_pca9632 | Pascal Heinrich
-| xdrv_65_tuyamcubr | David Gwynne
-| xdrv_66_tm1638 | @arendst
-| xdrv_67_mcp23xxx | @arendst
-| |
-| xdrv_79_esp32_ble | @staars, @btsimonh
-| xdrv_81_esp32_webcam | @gemu, @philrich
-| xdrv_82_esp32_ethernet | @arendst
-| xdrv_83_esp32_watch | @gemu
-| xdrv_85_esp32_ble_eq3_trv | @btsimonh
-| xdrv_86_esp32_sonoff_spm | @arendst
-| xdrv_87_esp32_sonoff_tm1621 | @arendst
-| xdrv_88_esp32_shelly_pro | @arendst
-| xdrv_89_esp32_dali | @eeak
+| Code | Owner
+|------------------------------|---------------------------
+| Tasmota Drivers |
+| |
+| xdrv_01_webserver | @arendst
+| xdrv_02_mqtt | @arendst
+| xdrv_03_energy | @arendst
+| xdrv_04_light | @s-hadinger
+| xdrv_05_irremote | @s-hadinger
+| xdrv_06_snfbridge | @arendst
+| xdrv_07_domoticz | @arendst
+| xdrv_08_serial_bridge | Dániel Zoltán Tolnai
+| xdrv_09_timers | @arendst
+| xdrv_10_rules | @arendst, @barbudor
+| xdrv_10_scripter | @gemu
+| xdrv_11_knx | @adrian
+| xdrv_12_discovery | @arendst, @effelle, @emontnemery
+| xdrv_13_display | @gemu, @s-hadinger
+| xdrv_14_mp3 | @gemu, @mike2nl
+| xdrv_15_pca9685 | Andre Thomas
+| xdrv_16_tuyamcu | @btsimonh
+| xdrv_17_rcswitch |
+| xdrv_18_armtronix_dimmers | @wvdv2002
+| xdrv_19_pz16dz_dimmer | Joel Stein
+| xdrv_20_hue | @s-hadinger
+| xdrv_21_wemo | @s-hadinger
+| xdrv_22_sonoff_ifan | @arendst
+| xdrv_23_zigbee | @s-hadinger
+| xdrv_24_buzzer | @arendst
+| xdrv_25_stepper | Tim Leuscher
+| xdrv_26_ariluxrf | @arendst
+| xdrv_27_shutter | @stefanbode
+| xdrv_28_pcf8574 | @stefanbode
+| xdrv_29_deepsleep | @stefanbode
+| xdrv_30_exs_dimmer | Andreas Schultz
+| xdrv_31_tasmota_client | Andre Thomas
+| xdrv_32_hotplug | @BASM
+| xdrv_33_nrf24l01 | @staars
+| xdrv_34_wemos_motor | Peter Franck
+| xdrv_35_pwm_dimmer | Paul C Diem
+| xdrv_36_keeloq | he-so
+| xdrv_37_sonoff_d1 | @arendst
+| xdrv_38_ping | @s-hadinger
+| xdrv_39_thermostat | Javier Argita
+| xdrv_40_telegram | @arendst
+| xdrv_41_tcp_bridge | @s-hadinger
+| xdrv_42_i2s_audio | @gemu
+| xdrv_43_mlx90640 | @staars
+| xdrv_44_miel_hvac | David GWynne
+| xdrv_45_shelly_dimmer | James Turton
+| xdrv_46_ccloader | @staars
+| xdrv_47_ftc532 | Peter Franck
+| xdrv_48_timeprop | Colin Law, Thomas Herrmann
+| xdrv_49_pid | Colin Law, Thomas Herrmann
+| xdrv_50_filesystem | @gemu, @barbudor
+| xdrv_51_bs814a2 | Peter Franck
+| xdrv_52_berry | @s-hadinger, @staars (ULP)
+| xdrv_53_projector_ctrl | Jan Bubík
+| xdrv_54_lvgl | @s-hadinger
+| xdrv_55_touch | @gemu, @s-hadinger
+| xdrv_56_rtc_chips | @arendst, @s-hadinger
+| xdrv_57_tasmesh | @staars
+| xdrv_58_range_extender | @sillyfrog
+| xdrv_59_influxdb | @arendst
+| xdrv_60_shift595 | Jacek Ziółkowski
+| xdrv_61_ds3502 | f-reiling
+| xdrv_62_improv | @arendst
+| xdrv_63_modbus_bridge | @jeroenst
+| xdrv_64_pca9632 | Pascal Heinrich
+| xdrv_65_tuyamcubr | David Gwynne
+| xdrv_66_tm1638 | @arendst
+| xdrv_67_mcp23xxx | @arendst
+| xdrv_68_zerocrossDimmer.ino | @stefanbode
+| |
+| xdrv_79_esp32_ble | @staars, @btsimonh
+| xdrv_81_esp32_webcam | @gemu, @philrich
+| xdrv_82_esp32_ethernet | @arendst
+| xdrv_83_esp32_watch | @gemu
+| xdrv_85_esp32_ble_eq3_trv | @btsimonh
+| xdrv_86_esp32_sonoff_spm | @arendst
+| xdrv_87_esp32_sonoff_tm1621 | @arendst
+| xdrv_88_esp32_shelly_pro | @arendst
+| xdrv_89_esp32_dali | @eeak
| xdrv_90_esp32_dingtian_relay | @barbudor
-| |
-| xdrv_122_file_settings_demo | @arendst
-| xdrv_127_debug | @arendst
-| |
-| Tasmota Sensors |
-| |
-| xsns_01_counter | @arendst, @stefanbode
-| xsns_02_analog | @arendst, @barbudor
-| xsns_03_energy | @arendst
-| xsns_04_snfsc | @arendst
-| xsns_05_ds18x20 | @arendst
-| xsns_06_dht | @arendst
-| xsns_07_sht1x | @arendst
-| xsns_08_htu | Heiko Krupp
-| xsns_09_bmp | @arendst
-| xsns_10_bh1750 | @arendst
-| xsns_11_veml6070 | @mike2nl
-| xsns_12_ads1115 | @syssi, @stefanbode
-| xsns_13_ina219 | @stefanbode
-| xsns_14_sht3x | Stefan Tibus
-| xsns_15_mhz19 | @arendst
-| xsns_16_tsl2561 | Joachim Banzhaf
-| xsns_17_senseair | @arendst
-| xsns_18_pms5003 | @arendst
-| xsns_19_mgs | @palich2000
-| xsns_20_novasds | Norbert Richter
-| xsns_21_sgp30 | Gerhard Mutz
-| xsns_22_sr04 | Nuno Ferreira, @arendst
-| xsns_23_me007 | Mathias Buder
-| xsns_24_si1145 |
-| xsns_25 |
-| xsns_26_lm75ad | Andre Thomas
-| xsns_27_apds9960 | Shawn Hymel
-| xsns_28 |
-| xsns_29_mcp230xx | Andre Thomas
-| xsns_30_mpr121 | Rene 'Renne' Bartsch
-| xsns_31_ccs811 | Gerhard Mutz
-| xsns_32_mpu6050 | Oliver Welter
-| xsns_33_qmc5883l | Helge Scheunemann
-| xsns_34_hx711 | @arendst
-| xsns_35_tx20 | Thomas Eckerstorfer, Norbert Richter
-| xsns_36_mgc3130 | Christian Baars
-| xsns_37_rfsensor | @arendst
-| xsns_38_az7798 | @adebeun
-| xsns_39_max31855 | Markus Past
-| xsns_40_pn532 | Andre Thomas, @md5sum-as
-| xsns_41_max44009 | @llagendijk
-| xsns_42_scd30 | @frogmore42
-| xsns_43_hre | Jon Little
-| xsns_44_sps30 | Gerhard Mutz
-| xsns_45_vl53l0x | Gerhard Mutz, Adrian Scillato
-| xsns_46_mlx90614 | Gerhard Mutz
-| xsns_47_max31865 | Alberto Lopez Siemens
-| xsns_48_chirp | Christian Baars
-| xsns_49 |
-| xsns_50_paj7620 | Christian Baars
-| xsns_51_rdm6300 | Gerhard Mutz
-| xsns_52_esp32_ibeacon | Gerhard Mutz, @btsimonh
-| xsns_52_ibeacon | Gerhard Mutz
-| xsns_53_sml | Gerhard Mutz
-| xsns_54_ina226 | Stephen Rodgers
-| xsns_55_hih_series |
-| xsns_56_hpma | David Hunt
-| xsns_57_tsl2591 | Markus Bösling
-| xsns_58_dht12 | Stefan Oskam
-| xsns_59_ds1624 | Leonid Myravje
-| xsns_60_gps | Christian Baars, Adrian Scillato
-| xsns_61_mi_nrf24 | Christian Baars
-| xsns_62_mi_hm10 | Christian Baars
-| xsns_62_esp32_mi | Christian Baars
-| xsns_63_aht1x | Martin Wagner
-| xsns_64_hrxl | Jon Little
-| xsns_65_hdc1080 | Luis Teixeira
-| xsns_66_iaq | Christian Baars
-| xsns_67_as3935 | Martin Wagner
-| xsns_68_windmeter | Matteo Albinola
-| xsns_69_opentherm | Yuriy Sannikov
-| xsns_70_veml6075 | Martin Wagner
-| xsns_71_veml7700 | Martin Wagner
-| xsns_72_mcp9808 | Martin Wagner
-| xsns_73_hp303b | @rjaakke
-| xsns_74_lmt01 | @justifiably
-| xsns_75_prometheus | @marius, @mhansen, @hansmi
-| xsns_76_dyp | Janusz Kostorz
-| xsns_77_vl53l1x | Rui Marinho, @Jason2866
-| xsns_78_ezo | Christopher Tremblay
-| xsns_79_as608 | @boaschti
-| xsns_80_mfrc522 | @arendst
-| xsns_81_seesaw_soil | Wayne Ross, Peter Franck
-| xsns_82_wiegand | Sigurd Leuther
-| xsns_83_neopool | Norbert Richter
-| xsns_84_tof10120 | Cyril Pawelko
-| xsns_85_mpu6886 | @s-hadinger
-| xsns_86_tfminiplus | Raphael Breiting
-| xsns_87_can_sniffer | @kwiatek6324, Marius Bezuidenhout
-| xsns_87_mcp2515 | Marius Bezuidenhout
-| xsns_88_am2320 | Lars Wessels
-| xsns_89_t67xx | Alexander Savchenko
-| xsns_90_hrg15 | Wouter Breukink
-| xsns_91_vindriktning | Marcel Ritter
-| xsns_92_scd40 | @frogmore42, @arnold-n
-| xsns_93_hm330x | @barbudor
-| xsns_94_hdc2010 | Luc Boudreau
-| xsns_95_cm1107 | @maksim
-| xsns_96_flowratemeter | Norbert Richter
-| xsns_97_hyt | Thomas Schnittcher, Adjan Kretz
-| xsns_98_sgp40 | Jean-Pierre Deschamps
-| xsns_99_luxv30b | Marius Bezuidenhout
-| xsns_100_ina3221 | @barbudor
-| xsns_101_hmc5883l | Andreas Achtzehn
-| xsns_102_ld2410 | @arendst
-| xsns_103_sen5x | @tyeth
-| xsns_104_pmsa003i | Jean-Pierre Deschamps
-| xsns_105_lox_o2 | @ACE1046
-| xsns_106_gdk101 | @Szewcson
-| |
-| Libraries |
-| |
-| berry | @s-hadinger
-| ext-printf | @s-hadinger
-| jsmn | @s-hadinger
-| unishox | @s-hadinger
-| matter | @s-hadinger
-| |
-| PlatformIO |
-| |
-| all | @Jason2866
-| |
+| |
+| xdrv_122_file_settings_demo | @arendst
+| xdrv_127_debug | @arendst
+| |
+| Tasmota Sensors |
+| |
+| xsns_01_counter | @arendst, @stefanbode
+| xsns_02_analog | @arendst, @barbudor
+| xsns_03_energy | @arendst
+| xsns_04_snfsc | @arendst
+| xsns_05_ds18x20 | @arendst
+| xsns_06_dht | @arendst
+| xsns_07_sht1x | @arendst
+| xsns_08_htu | Heiko Krupp
+| xsns_09_bmp | @arendst
+| xsns_10_bh1750 | @arendst
+| xsns_11_veml6070 | @mike2nl
+| xsns_12_ads1115 | @syssi, @stefanbode
+| xsns_13_ina219 | @stefanbode
+| xsns_14_sht3x | Stefan Tibus
+| xsns_15_mhz19 | @arendst
+| xsns_16_tsl2561 | Joachim Banzhaf
+| xsns_17_senseair | @arendst
+| xsns_18_pms5003 | @arendst
+| xsns_19_mgs | @palich2000
+| xsns_20_novasds | Norbert Richter
+| xsns_21_sgp30 | Gerhard Mutz
+| xsns_22_sr04 | Nuno Ferreira, @arendst
+| xsns_23_me007 | Mathias Buder
+| xsns_24_si1145 |
+| xsns_25 |
+| xsns_26_lm75ad | Andre Thomas
+| xsns_27_apds9960 | Shawn Hymel
+| xsns_28 |
+| xsns_29_mcp230xx | Andre Thomas
+| xsns_30_mpr121 | Rene 'Renne' Bartsch
+| xsns_31_ccs811 | Gerhard Mutz
+| xsns_32_mpu6050 | Oliver Welter
+| xsns_33_qmc5883l | Helge Scheunemann
+| xsns_34_hx711 | @arendst
+| xsns_35_tx20 | Thomas Eckerstorfer, Norbert Richter
+| xsns_36_mgc3130 | Christian Baars
+| xsns_37_rfsensor | @arendst
+| xsns_38_az7798 | @adebeun
+| xsns_39_max31855 | Markus Past
+| xsns_40_pn532 | Andre Thomas, @md5sum-as
+| xsns_41_max44009 | @llagendijk
+| xsns_42_scd30 | @frogmore42
+| xsns_43_hre | Jon Little
+| xsns_44_sps30 | Gerhard Mutz
+| xsns_45_vl53l0x | Gerhard Mutz, Adrian Scillato
+| xsns_46_mlx90614 | Gerhard Mutz
+| xsns_47_max31865 | Alberto Lopez Siemens
+| xsns_48_chirp | Christian Baars
+| xsns_49 |
+| xsns_50_paj7620 | Christian Baars
+| xsns_51_rdm6300 | Gerhard Mutz
+| xsns_52_esp32_ibeacon | Gerhard Mutz, @btsimonh
+| xsns_52_ibeacon | Gerhard Mutz
+| xsns_53_sml | Gerhard Mutz
+| xsns_54_ina226 | Stephen Rodgers
+| xsns_55_hih_series |
+| xsns_56_hpma | David Hunt
+| xsns_57_tsl2591 | Markus Bösling
+| xsns_58_dht12 | Stefan Oskam
+| xsns_59_ds1624 | Leonid Myravje
+| xsns_60_gps | Christian Baars, Adrian Scillato
+| xsns_61_mi_nrf24 | Christian Baars
+| xsns_62_mi_hm10 | Christian Baars
+| xsns_62_esp32_mi | Christian Baars
+| xsns_63_aht1x | Martin Wagner
+| xsns_64_hrxl | Jon Little
+| xsns_65_hdc1080 | Luis Teixeira
+| xsns_66_iaq | Christian Baars
+| xsns_67_as3935 | Martin Wagner
+| xsns_68_windmeter | Matteo Albinola
+| xsns_69_opentherm | Yuriy Sannikov
+| xsns_70_veml6075 | Martin Wagner
+| xsns_71_veml7700 | Martin Wagner
+| xsns_72_mcp9808 | Martin Wagner
+| xsns_73_hp303b | @rjaakke
+| xsns_74_lmt01 | @justifiably
+| xsns_75_prometheus | @marius, @mhansen, @hansmi
+| xsns_76_dyp | Janusz Kostorz
+| xsns_77_vl53l1x | Rui Marinho, @Jason2866
+| xsns_78_ezo | Christopher Tremblay
+| xsns_79_as608 | @boaschti
+| xsns_80_mfrc522 | @arendst
+| xsns_81_seesaw_soil | Wayne Ross, Peter Franck
+| xsns_82_wiegand | Sigurd Leuther
+| xsns_83_neopool | Norbert Richter
+| xsns_84_tof10120 | Cyril Pawelko
+| xsns_85_mpu6886 | @s-hadinger
+| xsns_86_tfminiplus | Raphael Breiting
+| xsns_87_can_sniffer | @kwiatek6324, Marius Bezuidenhout
+| xsns_87_mcp2515 | Marius Bezuidenhout
+| xsns_88_am2320 | Lars Wessels
+| xsns_89_t67xx | Alexander Savchenko
+| xsns_90_hrg15 | Wouter Breukink
+| xsns_91_vindriktning | Marcel Ritter
+| xsns_92_scd40 | @frogmore42, @arnold-n
+| xsns_93_hm330x | @barbudor
+| xsns_94_hdc2010 | Luc Boudreau
+| xsns_95_cm1107 | @maksim
+| xsns_96_flowratemeter | Norbert Richter
+| xsns_97_hyt | Thomas Schnittcher, Adjan Kretz
+| xsns_98_sgp40 | Jean-Pierre Deschamps
+| xsns_99_luxv30b | Marius Bezuidenhout
+| xsns_100_ina3221 | @barbudor
+| xsns_101_hmc5883l | Andreas Achtzehn
+| xsns_102_ld2410 | @arendst
+| xsns_103_sen5x | @tyeth
+| xsns_104_pmsa003i | Jean-Pierre Deschamps
+| xsns_105_lox_o2 | @ACE1046
+| xsns_106_gdk101 | @Szewcson
+| |
+| Libraries |
+| |
+| berry | @s-hadinger
+| ext-printf | @s-hadinger
+| jsmn | @s-hadinger
+| unishox | @s-hadinger
+| matter | @s-hadinger
+| |
+| PlatformIO |
+| |
+| all | @Jason2866
+| |
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index a34e698c9..88b95bc01 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -115,11 +115,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
- Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451)
+- Matter add UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498)
### Breaking Changed
### Changed
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
+- Refactored Zero Cross Dimmer [#18481](https://github.com/arendst/Tasmota/issues/18481)
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
From c8318248bb7d853104e3c288e6c8ba9cd33eb24b Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Tue, 25 Apr 2023 23:30:23 +0200
Subject: [PATCH 037/289] Matter add support for Shutters (without Tilt)
(#18509)
---
CHANGELOG.md | 1 +
.../berry_matter/src/be_matter_module.c | 2 +
.../src/embedded/Matter_Device.be | 71 +-
.../src/embedded/Matter_MessageHandler.be | 2 +-
.../src/embedded/Matter_Plugin.be | 17 +-
.../src/embedded/Matter_Plugin_Device.be | 14 +
.../src/embedded/Matter_Plugin_Light0.be | 75 +-
.../src/embedded/Matter_Plugin_Light1.be | 11 +-
.../src/embedded/Matter_Plugin_Light2.be | 4 +-
.../src/embedded/Matter_Plugin_Light3.be | 6 +-
.../src/embedded/Matter_Plugin_OnOff.be | 158 +-
.../src/embedded/Matter_Plugin_Root.be | 2 +-
.../src/embedded/Matter_Plugin_Sensor.be | 8 +-
.../embedded/Matter_Plugin_Sensor_Humidity.be | 6 +-
.../Matter_Plugin_Sensor_Illuminance.be | 6 +-
.../embedded/Matter_Plugin_Sensor_Pressure.be | 6 +-
.../src/embedded/Matter_Plugin_Sensor_Temp.be | 6 +-
.../src/embedded/Matter_Plugin_Shutter.be | 220 +
.../berry_matter/src/embedded/Matter_UI.be | 40 +-
.../src/solidify/solidified_Matter_Device.h | 7385 +++++++++--------
.../solidified_Matter_MessageHandler.h | 27 +-
.../src/solidify/solidified_Matter_Plugin.h | 627 +-
.../solidified_Matter_Plugin_Device.h | 95 +-
.../solidified_Matter_Plugin_Light0.h | 384 +-
.../solidified_Matter_Plugin_Light1.h | 441 +-
.../solidified_Matter_Plugin_Light2.h | 331 +-
.../solidified_Matter_Plugin_Light3.h | 572 +-
.../solidify/solidified_Matter_Plugin_OnOff.h | 770 +-
.../solidify/solidified_Matter_Plugin_Root.h | 180 +-
.../solidified_Matter_Plugin_Sensor.h | 10 +-
...solidified_Matter_Plugin_Sensor_Humidity.h | 29 +-
...idified_Matter_Plugin_Sensor_Illuminance.h | 29 +-
...solidified_Matter_Plugin_Sensor_Pressure.h | 29 +-
.../solidified_Matter_Plugin_Sensor_Temp.h | 29 +-
.../solidified_Matter_Plugin_Shutter.h | 710 ++
.../src/solidify/solidified_Matter_UI.h | 1748 ++--
36 files changed, 7376 insertions(+), 6675 deletions(-)
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b73586fcf..3add3bec2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
- Matter add UI to change endpoints configuration (#18498)
+- Matter add support for Shutters (without Tilt)
### Breaking Changed
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index c7f4c7d9c..9a82abce2 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -159,6 +159,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Light1.h"
#include "solidify/solidified_Matter_Plugin_Light2.h"
#include "solidify/solidified_Matter_Plugin_Light3.h"
+#include "solidify/solidified_Matter_Plugin_Shutter.h"
#include "solidify/solidified_Matter_Plugin_Sensor.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
@@ -337,6 +338,7 @@ module matter (scope: global, strings: weak) {
Plugin_Light1, class(be_class_Matter_Plugin_Light1) // Dimmable Light
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
+ Plugin_Shutter, class(be_class_Matter_Plugin_Shutter) // Shutter
Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index 3dc514d64..abd767d8a 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -35,6 +35,7 @@ class Matter_Device
var message_handler # `matter.MessageHandler()` object
var sessions # `matter.Session_Store()` objet
var ui
+ var tick # increment at each tick, avoids to repeat too frequently some actions
# Commissioning open
var commissioning_open # timestamp for timeout of commissioning (millis()) or `nil` if closed
var commissioning_iterations # current PBKDF number of iterations
@@ -74,6 +75,7 @@ class Matter_Device
end # abort if SetOption 151 is not set
self.started = false
+ self.tick = 0
self.plugins = []
self.plugins_persist = false # plugins need to saved only when the first fabric is associated
self.plugins_classes = {}
@@ -326,6 +328,12 @@ class Matter_Device
end
+ #############################################################
+ # ticks
+ def every_50ms()
+ self.tick += 1
+ end
+
#############################################################
# dispatch every 250ms click to sub-objects that need it
def every_250ms()
@@ -991,6 +999,7 @@ class Matter_Device
#
# Applies only if there are no plugins already configured
def autoconf_device_map()
+ import string
import json
var m = {}
@@ -1018,15 +1027,46 @@ class Matter_Device
end
end
+ # handle shutters before relays (as we steal relays for shutters)
+ var r_st13 = tasmota.cmd("Status 13", true) # issue `Status 13`
+ var relays_reserved = [] # list of relays that are used for non-relay (shutters)
+ tasmota.log("MTR: Status 13 = "+str(r_st13), 3)
+
+ if r_st13.contains('StatusSHT')
+ r_st13 = r_st13['StatusSHT'] # skip root
+ # Shutter is enabled, iterate
+ var idx = 0
+ while true
+ var k = 'SHT' + str(idx) # SHT is zero based
+ if !r_st13.contains(k) break end # no more SHTxxx
+ var d = r_st13[k]
+ tasmota.log(string.format("MTR: '%s' = %s", k, str(d)), 3)
+ var relay1 = d.find('Relay1', 0) - 1 # relay base 0 or -1 if none
+ var relay2 = d.find('Relay2', 0) - 1 # relay base 0 or -1 if none
+
+ if relay1 >= 0 relays_reserved.push(relay1) end # mark relay1/2 as non-relays
+ if relay2 >= 0 relays_reserved.push(relay2) end
+
+ tasmota.log(string.format("MTR: relay1 = %s, relay2 = %s", relay1, relay2), 3)
+ # add shutter to definition
+ m[str(endpoint)] = {'type':'shutter','shutter':idx}
+ endpoint += 1
+ idx += 1
+ end
+
+ end
+
# how many relays are present
var relay_count = size(tasmota.get_power())
var relay_index = 0 # start at index 0
if light_present relay_count -= 1 end # last power is taken for lights
while relay_index < relay_count
- m[str(endpoint)] = {'type':'relay','relay':relay_index}
+ if relays_reserved.find(relay_index) == nil # if relay is actual relay
+ m[str(endpoint)] = {'type':'relay','relay':relay_index}
+ endpoint += 1
+ end
relay_index += 1
- endpoint += 1
end
# auto-detect sensors
@@ -1101,8 +1141,12 @@ class Matter_Device
# register_plugin_class
#
# Adds a class by name
- def register_plugin_class(name, cl)
- self.plugins_classes[name] = cl
+ def register_plugin_class(cl)
+ import introspect
+ var typ = introspect.get(cl, 'TYPE') # make sure we don't crash if TYPE does not exist
+ if typ
+ self.plugins_classes[typ] = cl
+ end
end
#############################################################
@@ -1128,16 +1172,15 @@ class Matter_Device
#
# Adds a class by name
def register_native_classes(name, cl)
- self.register_plugin_class('root', matter.Plugin_Root)
- self.register_plugin_class('light0', matter.Plugin_Light0)
- self.register_plugin_class('light1', matter.Plugin_Light1)
- self.register_plugin_class('light2', matter.Plugin_Light2)
- self.register_plugin_class('light3', matter.Plugin_Light3)
- self.register_plugin_class('relay', matter.Plugin_OnOff)
- self.register_plugin_class('temperature', matter.Plugin_Sensor_Temp)
- self.register_plugin_class('humidity', matter.Plugin_Sensor_Humidity)
- self.register_plugin_class('illuminance', matter.Plugin_Sensor_Illuminance)
- self.register_plugin_class('pressure', matter.Plugin_Sensor_Pressure)
+ # try to register any class that starts with 'Plugin_'
+ import introspect
+ import string
+ for k: introspect.members(matter)
+ var v = introspect.get(matter, k)
+ if type(v) == 'class' && string.find(k, "Plugin_") == 0
+ self.register_plugin_class(v)
+ end
+ end
tasmota.log("MTR: registered classes "+str(self.k2l(self.plugins_classes)), 3)
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
index 651731c99..f68b0c48e 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_MessageHandler.be
@@ -203,7 +203,7 @@ class Matter_MessageHandler
return ret
except .. as e, m
tasmota.log("MTR: MessageHandler::msg_received exception: "+str(e)+";"+str(m))
- if self._debug_present
+ if tasmota._debug_present
import debug
debug.traceback()
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
index e36f99d88..142987bc3 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
@@ -23,7 +23,7 @@
#@ solidify:Matter_Plugin,weak
class Matter_Plugin
- static var TYPE = "generic" # name of the plug-in in json
+ static var TYPE = "" # name of the plug-in in json
static var NAME = "" # display name of the plug-in
static var ARG = "" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
@@ -33,6 +33,7 @@ class Matter_Plugin
var device # reference to the `device` global object
var endpoint # current endpoint
var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
+ var tick # tick value when it was last updated
#############################################################
# MVC Model
@@ -55,15 +56,23 @@ class Matter_Plugin
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
def update_shadow()
+ self.tick = self.device.tick
+ end
+
+ #############################################################
+ # Stub for updating shadow values (local copies of what we published to the Matter gateway)
+ def update_shadow_lazy()
+ if self.tick != self.device.tick
+ self.update_shadow()
+ end
end
#############################################################
# signal that an attribute has been changed
#
# If `endpoint` is `nil`, send to all endpoints
- def attribute_updated(endpoint, cluster, attribute, fabric_specific)
- if endpoint == nil endpoint = self.endpoint end
- self.device.attribute_updated(endpoint, cluster, attribute, fabric_specific)
+ def attribute_updated(cluster, attribute, fabric_specific)
+ self.device.attribute_updated(self.endpoint, cluster, attribute, fabric_specific)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
index d8e728558..648d008f0 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Device.be
@@ -27,6 +27,7 @@ class Matter_Plugin_Device : Matter_Plugin
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
+ 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
}
static var TYPES = { 0x0000: 0 } # fake type
@@ -67,6 +68,14 @@ class Matter_Plugin_Device : Matter_Plugin
return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
end
+ # ====================================================================================================
+ elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
+ if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
+ end
+
else
return super(self).read_attribute(session, ctx)
end
@@ -105,6 +114,11 @@ class Matter_Plugin_Device : Matter_Plugin
# TODO
return true
+ # ====================================================================================================
+ elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
+ # TODO
+ return true
+
else
return super(self).invoke_request(session, val, ctx)
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
index a5803101d..c4abc2758 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
@@ -20,18 +20,18 @@
# Matter plug-in for core behavior
# dummy declaration for solidification
-class Matter_Plugin end
+class Matter_Plugin_Device end
#@ solidify:Matter_Plugin_Light0,weak
-class Matter_Plugin_Light0 : Matter_Plugin
+class Matter_Plugin_Light0 : Matter_Plugin_Device
static var TYPE = "light0" # name of the plug-in in json
static var NAME = "Light 0 On" # display name of the plug-in
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
- 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
- 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
- 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
}
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
@@ -52,7 +52,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
import light
var light_status = light.get()
var pow = light_status.find('power', nil)
- if pow != self.shadow_onoff self.attribute_updated(nil, 0x0006, 0x0000) self.shadow_onoff = pow end
+ if pow != self.shadow_onoff self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow end
+ super(self).update_shadow()
end
#############################################################
@@ -65,37 +66,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
var attribute = ctx.attribute
# ====================================================================================================
- if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
- if attribute == 0x0000 # ---------- IdentifyTime / u2 ----------
- return TLV.create_TLV(TLV.U2, 0) # no identification in progress
- elif attribute == 0x0001 # ---------- IdentifyType / enum8 ----------
- return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None
- elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0) # no features
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation"
- end
-
- # ====================================================================================================
- elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
- if attribute == 0x0000 # ---------- ----------
- return nil # TODO
- elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0)#
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
- end
-
- # ====================================================================================================
- elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
- if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
- end
-
- # ====================================================================================================
- elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
if attribute == 0x0000 # ---------- OnOff / bool ----------
return TLV.create_TLV(TLV.BOOL, self.shadow_onoff)
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
@@ -121,33 +93,8 @@ class Matter_Plugin_Light0 : Matter_Plugin
var command = ctx.command
# ====================================================================================================
- if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
-
- if command == 0x0000 # ---------- Identify ----------
- # ignore
- return true
- elif command == 0x0001 # ---------- IdentifyQuery ----------
- # create IdentifyQueryResponse
- # ID=1
- # 0=Certificate (octstr)
- var iqr = TLV.Matter_TLV_struct()
- iqr.add_TLV(0, TLV.U2, 0) # Timeout
- ctx.command = 0x00 # IdentifyQueryResponse
- return iqr
- elif command == 0x0040 # ---------- TriggerEffect ----------
- # ignore
- return true
- end
- # ====================================================================================================
- elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
- # TODO
- return true
- # ====================================================================================================
- elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
- # TODO
- return true
- # ====================================================================================================
- elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
if command == 0x0000 # ---------- Off ----------
light.set({'power':false})
self.update_shadow()
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
index 656fbc666..531f3fd61 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light1.be
@@ -54,8 +54,13 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
import light
var light_status = light.get()
var bri = light_status.find('bri', nil)
- if bri != nil bri = tasmota.scale_uint(bri, 0, 255, 0, 254) else bri = self.shadow_bri end
- if bri != self.shadow_bri self.attribute_updated(nil, 0x0008, 0x0000) self.shadow_bri = bri end
+ if bri != nil
+ bri = tasmota.scale_uint(bri, 0, 255, 0, 254)
+ if bri != self.shadow_bri
+ self.attribute_updated(0x0008, 0x0000)
+ self.shadow_bri = bri
+ end
+ end
super(self).update_shadow() # superclass manages 'power'
end
@@ -70,6 +75,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
# ====================================================================================================
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
+ self.update_shadow_lazy()
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
return TLV.create_TLV(TLV.U1, self.shadow_bri)
elif attribute == 0x0002 # ---------- MinLevel / u1 ----------
@@ -104,6 +110,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
# ====================================================================================================
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
+ self.update_shadow_lazy()
if command == 0x0000 # ---------- MoveToLevel ----------
var bri_in = val.findsubval(0) # Hue 0..254
var bri = tasmota.scale_uint(bri_in, 0, 254, 0, 255)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
index 8c0cde617..9eee3be00 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light2.be
@@ -59,7 +59,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
var light_status = light.get()
var ct = light_status.find('ct', nil)
if ct == nil ct = self.shadow_ct end
- if ct != self.shadow_ct self.attribute_updated(nil, 0x0300, 0x0007) self.shadow_ct = ct end
+ if ct != self.shadow_ct self.attribute_updated(0x0300, 0x0007) self.shadow_ct = ct end
end
#############################################################
@@ -82,6 +82,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
+ self.update_shadow_lazy()
if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
return TLV.create_TLV(TLV.U1, self.shadow_ct)
elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
@@ -117,6 +118,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
+ self.update_shadow_lazy()
if command == 0x000A # ---------- MoveToColorTemperature ----------
var ct_in = val.findsubval(0) # CT
if ct_in < self.ct_min ct_in = self.ct_min end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
index 8e1f63d04..acdce0837 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light3.be
@@ -59,8 +59,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
var sat = light_status.find('sat', nil)
if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end
if sat != nil sat = tasmota.scale_uint(sat, 0, 255, 0, 254) else sat = self.shadow_sat end
- if hue != self.shadow_hue self.attribute_updated(nil, 0x0300, 0x0000) self.shadow_hue = hue end
- if sat != self.shadow_sat self.attribute_updated(nil, 0x0300, 0x0001) self.shadow_sat = sat end
+ if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end
+ if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end
end
#############################################################
@@ -74,6 +74,7 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
+ self.update_shadow_lazy()
if attribute == 0x0000 # ---------- CurrentHue / u1 ----------
return TLV.create_TLV(TLV.U1, self.shadow_hue)
elif attribute == 0x0001 # ---------- CurrentSaturation / u2 ----------
@@ -117,6 +118,7 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
+ self.update_shadow_lazy()
if command == 0x0000 # ---------- MoveToHue ----------
var hue_in = val.findsubval(0) # Hue 0..254
var hue = tasmota.scale_uint(hue_in, 0, 254, 0, 360)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
index f45a671f8..6d1c9bf90 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
@@ -20,22 +20,21 @@
# Matter plug-in for core behavior
# dummy declaration for solidification
-class Matter_Plugin end
+class Matter_Plugin_Device end
#@ solidify:Matter_Plugin_OnOff,weak
-class Matter_Plugin_OnOff : Matter_Plugin
+class Matter_Plugin_OnOff : Matter_Plugin_Device
static var TYPE = "relay" # name of the plug-in in json
static var NAME = "Relay" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
- 0x0003: [0,1,0xFFFC,0xFFFD], # Identify 1.2 p.16
- 0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
- 0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
- # 0x0008: [0,15,17,0xFFFC,0xFFFD] # Level Control 1.6 p.57
}
static var TYPES = { 0x010A: 2 } # On/Off Light
@@ -46,32 +45,31 @@ class Matter_Plugin_OnOff : Matter_Plugin
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
- self.get_onoff() # read actual value
+ self.shadow_onoff = false
self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#)
if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
end
+ #############################################################
+ # Update shadow
+ #
+ def update_shadow()
+ var state = tasmota.get_power(self.tasmota_relay_index)
+ if state != nil
+ if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
+ self.attribute_updated(0x0006, 0x0000)
+ end
+ self.shadow_onoff = state
+ end
+ super(self).update_shadow()
+ end
+
#############################################################
# Model
#
def set_onoff(v)
tasmota.set_power(self.tasmota_relay_index, bool(v))
- self.get_onoff()
- end
- #############################################################
- # get_onoff
- #
- # Update shadow and signal any change
- def get_onoff()
- var state = tasmota.get_power(self.tasmota_relay_index)
- if state != nil
- if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
- self.onoff_changed() # signal any change
- end
- self.shadow_onoff = state
- end
- if self.shadow_onoff == nil self.shadow_onoff = false end # avoid any `nil` value when initializing
- return self.shadow_onoff
+ self.update_shadow()
end
#############################################################
@@ -84,59 +82,16 @@ class Matter_Plugin_OnOff : Matter_Plugin
var attribute = ctx.attribute
# ====================================================================================================
- if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
- if attribute == 0x0000 # ---------- IdentifyTime / u2 ----------
- return TLV.create_TLV(TLV.U2, 0) # no identification in progress
- elif attribute == 0x0001 # ---------- IdentifyType / enum8 ----------
- return TLV.create_TLV(TLV.U1, 0) # IdentifyType = 0x00 None
- elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0) # no features
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4) # "new data model format and notation"
- end
-
- # ====================================================================================================
- elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
- if attribute == 0x0000 # ---------- ----------
- return nil # TODO
- elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0)#
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4)# "new data model format and notation"
- end
-
- # ====================================================================================================
- elif cluster == 0x0005 # ========== Scenes 1.4 p.30 - no writable ==========
- if attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
- end
-
- # ====================================================================================================
- elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
if attribute == 0x0000 # ---------- OnOff / bool ----------
- return TLV.create_TLV(TLV.BOOL, self.get_onoff())
+ return TLV.create_TLV(TLV.BOOL, self.shadow_onoff)
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
end
- # ====================================================================================================
- elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
- if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
- return TLV.create_TLV(TLV.U1, 0x88)
- elif attribute == 0x000F # ---------- Options / map8 ----------
- return TLV.create_TLV(TLV.U1, 0) # 0 = no Level Control for Lighting
- elif attribute == 0x0010 # ---------- OnLevel / u1 ----------
- return TLV.create_TLV(TLV.U1, 1) # 0 = no Level Control for Lighting
- elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
- elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
- return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
- end
-
else
return super(self).read_attribute(session, ctx)
end
@@ -153,75 +108,24 @@ class Matter_Plugin_OnOff : Matter_Plugin
var command = ctx.command
# ====================================================================================================
- if cluster == 0x0003 # ========== Identify 1.2 p.16 ==========
-
- if command == 0x0000 # ---------- Identify ----------
- # ignore
- return true
- elif command == 0x0001 # ---------- IdentifyQuery ----------
- # create IdentifyQueryResponse
- # ID=1
- # 0=Certificate (octstr)
- var iqr = TLV.Matter_TLV_struct()
- iqr.add_TLV(0, TLV.U2, 0) # Timeout
- ctx.command = 0x00 # IdentifyQueryResponse
- return iqr
- elif command == 0x0040 # ---------- TriggerEffect ----------
- # ignore
- return true
- end
- # ====================================================================================================
- elif cluster == 0x0004 # ========== Groups 1.3 p.21 ==========
- # TODO
- return true
- # ====================================================================================================
- elif cluster == 0x0005 # ========== Scenes 1.4 p.30 ==========
- # TODO
- return true
- # ====================================================================================================
- elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
if command == 0x0000 # ---------- Off ----------
self.set_onoff(false)
+ self.update_shadow()
return true
elif command == 0x0001 # ---------- On ----------
self.set_onoff(true)
+ self.update_shadow()
return true
elif command == 0x0002 # ---------- Toggle ----------
- self.set_onoff(!self.get_onoff())
- return true
- end
- # ====================================================================================================
- elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
- if command == 0x0000 # ---------- MoveToLevel ----------
- return true
- elif command == 0x0001 # ---------- Move ----------
- return true
- elif command == 0x0002 # ---------- Step ----------
- return true
- elif command == 0x0003 # ---------- Stop ----------
- return true
- elif command == 0x0004 # ---------- MoveToLevelWithOnOff ----------
- return true
- elif command == 0x0005 # ---------- MoveWithOnOff ----------
- return true
- elif command == 0x0006 # ---------- StepWithOnOff ----------
- return true
- elif command == 0x0007 # ---------- StopWithOnOff ----------
+ self.set_onoff(!self.shadow_onoff)
+ self.update_shadow()
return true
end
end
+
end
- #############################################################
- # Signal that onoff attribute changed
- def onoff_changed()
- self.attribute_updated(nil, 0x0006, 0x0000) # send to all endpoints
- end
-
- #############################################################
- # every_second
- def every_second()
- self.get_onoff() # force reading value and sending subscriptions
- end
end
matter.Plugin_OnOff = Matter_Plugin_OnOff
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
index 0427ed022..76f2440ff 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Root.be
@@ -616,7 +616,7 @@ class Matter_Plugin_Root : Matter_Plugin
if attribute == 0x0000 # ---------- Breadcrumb ----------
if type(write_data) == 'int' || isinstance(write_data, int64)
session._breadcrumb = write_data
- self.attribute_updated(ctx.endpoint, ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed?
+ self.attribute_updated(ctx.cluster, ctx.attribute) # TODO should we have a more generalized way each time a write_attribute is triggered, declare the attribute as changed?
return true
else
ctx.status = matter.CONSTRAINT_ERROR
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
index 45b2ee983..3f0d2dfd7 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
@@ -50,7 +50,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
var val = self.pre_value(real(self.tasmota_sensor_matcher.match(payload)))
if val != nil
if val != self.shadow_value
- self.valued_changed(val)
+ self.value_changed(val)
end
self.shadow_value = val
end
@@ -61,9 +61,9 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
# Called when the value changed compared to shadow value
#
# This must be overriden.
- # This is where you call `self.attribute_updated(nil, , )`
- def valued_changed(val)
- # self.attribute_updated(nil, 0x0402, 0x0000)
+ # This is where you call `self.attribute_updated(, )`
+ def value_changed(val)
+ # self.attribute_updated(0x0402, 0x0000)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
index b31e12965..55ccdf992 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
@@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
# Called when the value changed compared to shadow value
#
# This must be overriden.
- # This is where you call `self.attribute_updated(nil, , )`
- def valued_changed(val)
- self.attribute_updated(nil, 0x0405, 0x0000)
+ # This is where you call `self.attribute_updated(, )`
+ def value_changed(val)
+ self.attribute_updated(0x0405, 0x0000)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
index f7619bdfb..e676aac18 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
@@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
# Called when the value changed compared to shadow value
#
# This must be overriden.
- # This is where you call `self.attribute_updated(nil, , )`
- def valued_changed(val)
- self.attribute_updated(nil, 0x0400, 0x0000)
+ # This is where you call `self.attribute_updated(, )`
+ def value_changed(val)
+ self.attribute_updated(0x0400, 0x0000)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
index 47a2110cb..60414b0c9 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
@@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
# Called when the value changed compared to shadow value
#
# This must be overriden.
- # This is where you call `self.attribute_updated(nil, , )`
- def valued_changed(val)
- self.attribute_updated(nil, 0x0403, 0x0000)
+ # This is where you call `self.attribute_updated(, )`
+ def value_changed(val)
+ self.attribute_updated(0x0403, 0x0000)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
index 9944633be..ec411f537 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
@@ -45,9 +45,9 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
# Called when the value changed compared to shadow value
#
# This must be overriden.
- # This is where you call `self.attribute_updated(nil, , )`
- def valued_changed(val)
- self.attribute_updated(nil, 0x0402, 0x0000)
+ # This is where you call `self.attribute_updated(, )`
+ def value_changed(val)
+ self.attribute_updated(0x0402, 0x0000)
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
new file mode 100644
index 000000000..408e74ba7
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
@@ -0,0 +1,220 @@
+#
+# Matter_Plugin_Shutter.be - implements the behavior for shutters
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Device end
+
+#@ solidify:Matter_Plugin_Shutter,weak
+
+class Matter_Plugin_Shutter : Matter_Plugin_Device
+ static var TYPE = "shutter" # name of the plug-in in json
+ static var NAME = "Shutter" # display name of the plug-in
+ static var ARG = "shutter" # additional argument name (or empty if none)
+ static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
+ static var CLUSTERS = {
+ # 0x001D: inherited # Descriptor Cluster 9.5 p.453
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
+ 0x0102: [0,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,0x17,0xFFFC,0xFFFD], # Window Covering 5.3 p.289
+ }
+ static var TYPES = { 0x0202: 2 } # New data model format and notation
+
+ var tasmota_shutter_index # Shutter number in Tasmota (zero based)
+ var shadow_shutter_pos
+ var shadow_shutter_target
+ var shadow_shutter_tilt
+ var shadow_shutter_direction # 1=opening -1=closing 0=not moving TODO
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
+ self.tasmota_shutter_index = arguments.find(self.ARG #-'relay'-#)
+ if self.tasmota_shutter_index == nil self.tasmota_shutter_index = 0 end
+ end
+
+ #############################################################
+ # Update shadow
+ #
+ def update_shadow()
+ var sp = tasmota.cmd("ShutterPosition" + str(self.tasmota_shutter_index + 1), true)
+ if sp
+ self.parse_sensors(sp)
+ end
+ super(self).update_shadow()
+ end
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
+ self.update_shadow_lazy()
+ if attribute == 0x0000 # ---------- Type / enum8 ----------
+ return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
+ elif attribute == 0x0005 # ---------- NumberOfActuationsLift / u16 ----------
+ return TLV.create_TLV(TLV.U2, 0)
+ elif attribute == 0x0006 # ---------- NumberOfActuationsTilt / u16 ----------
+ return TLV.create_TLV(TLV.U2, 0)
+ elif attribute == 0x0007 # ---------- ConfigStatus / u8 ----------
+ return TLV.create_TLV(TLV.U1, 1 + 8 + 16) # Operational + Lift Position Aware + Tilt Position Aware
+ elif attribute == 0x000D # ---------- EndProductType / u8 ----------
+ return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
+
+ elif attribute == 0x0008 # ---------- CurrentPositionLiftPercentage / u8 ----------
+ return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_pos)
+ elif attribute == 0x000E # ---------- CurrentPositionLiftPercent100ths / u16 ----------
+ return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_pos) * 100)
+ elif attribute == 0x0009 # ---------- CurrentPositionTiltPercentage / u8 ----------
+ return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_tilt)
+ elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
+ return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_tilt) * 100)
+ elif attribute == 0x000A # ---------- OperationalStatus / u8 ----------
+ var op = self.shadow_shutter_direction == 0 ? 0 : (self.shadow_shutter_direction > 0 ? 1 : 2)
+ return TLV.create_TLV(TLV.U1, op) # TODO from sensors
+ elif attribute == 0x000B # ---------- TargetPositionLiftPercent100ths / u16 ----------
+ return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_target) * 100)
+ elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
+ return TLV.create_TLV(TLV.U1, 0) # TODO
+
+ elif attribute == 0x0017 # ---------- Mode / u8 ----------
+ return TLV.create_TLV(TLV.U1, 0) # normal mode
+
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 3 + 4 + 16) # Lift + Tilt + PA_LF + PA_TL
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 5) # New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+ #############################################################
+ # Invoke a command
+ #
+ # returns a TLV object if successful, contains the response
+ # or an `int` to indicate a status
+ def invoke_request(session, val, ctx)
+ import light
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var command = ctx.command
+
+ # ====================================================================================================
+ if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
+ self.update_shadow_lazy()
+ if command == 0x0000 # ---------- UpOrOpen ----------
+ tasmota.cmd("ShutterStopOpen"+str(self.tasmota_shutter_index+1), true)
+ self.update_shadow()
+ return true
+ elif command == 0x0001 # ---------- DownOrClose ----------
+ tasmota.cmd("ShutterStopClose"+str(self.tasmota_shutter_index+1), true)
+ self.update_shadow()
+ return true
+ elif command == 0x0002 # ---------- StopMotion ----------
+ tasmota.cmd("ShutterStop"+str(self.tasmota_shutter_index+1), true)
+ self.update_shadow()
+ return true
+ elif command == 0x0005 # ---------- GoToLiftPercentage ----------
+ tasmota.log("MTR: Tilt = "+str(val), 2)
+ var pos_100 = val.findsubval(0)
+ if pos_100 != nil
+ pos_100 = pos_100 / 100
+ tasmota.cmd("ShutterStopPosition"+str(self.tasmota_shutter_index+1) + " " + str(100 - pos_100), true)
+ ctx.log = "pos%:"+str(pos_100)
+ self.update_shadow()
+ end
+ return true
+ elif command == 0x0008 # ---------- GoToTiltPercentage ----------
+ var tilt = val.findsubval(0)
+ if tilt != nil
+ tilt = tilt / 10
+ ctx.log = "tilt%:"+str(tilt)
+ end
+ return true
+ end
+
+ else
+ return super(self).invoke_request(session, val, ctx)
+ end
+
+ end
+
+ #############################################################
+ # parse sensor
+ #
+ # The device calls regularly `tasmota.read_sensors()` and converts
+ # it to json.
+ def parse_sensors(payload)
+ import string
+ var k = "Shutter" + str(self.tasmota_shutter_index + 1)
+ if payload.contains(k)
+ var v = payload[k]
+ # tasmota.log(string.format("MTR: getting shutter values(%i): %s", self.endpoint, str(v)), 2)
+ # Position
+ var val_pos = v.find("Position")
+ if val_pos != nil
+ if val_pos != self.shadow_shutter_pos
+ # self.attribute_updated(0x0102, 0x0008) # CurrentPositionLiftPercentage
+ self.attribute_updated(0x0102, 0x000E) # CurrentPositionLiftPercent100ths
+ end
+ self.shadow_shutter_pos = val_pos
+ end
+ # Tilt
+ var val_tilt = v.find("Tilt")
+ if val_tilt != nil
+ if val_tilt != self.shadow_shutter_tilt
+ # self.attribute_updated(0x0102, 0x0009) # CurrentPositionTiltPercentage
+ self.attribute_updated(0x0102, 0x000F) # CurrentPositionTiltPercent100ths
+ end
+ self.shadow_shutter_tilt = val_tilt
+ end
+ # Direction
+ var val_dir = v.find("Direction")
+ if val_dir != nil
+ if val_dir != self.shadow_shutter_direction
+ self.attribute_updated(0x0102, 0x000A) # OperationalStatus
+ end
+ self.shadow_shutter_direction = val_dir
+ end
+ # Target
+ var val_target = v.find("Target")
+ if val_target != nil
+ if val_target != self.shadow_shutter_target
+ self.attribute_updated(0x0102, 0x000B) # TargetPositionLiftPercent100ths
+ end
+ self.shadow_shutter_target = val_target
+ end
+ #
+ end
+ end
+
+end
+matter.Plugin_Shutter = Matter_Plugin_Shutter
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index 5eb86378b..a2633b34c 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -32,7 +32,8 @@ import matter
# WebUI for the partition manager
#################################################################################
class Matter_UI
- static var _CLASSES_TYPES = "root|relay|light0|light1|light2|light3"
+ static var _ROOT_TYPES = "root"
+ static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter"
"|temperature|pressure|illuminance|humidity"
var device
@@ -179,7 +180,7 @@ class Matter_UI
import string
webserver.content_send(" Fabrics
")
- webserver.content_send("Existing fabrics:
")
+ webserver.content_send("Associated fabrics:
")
if size(self.device.sessions.sessions) == 0
webserver.content_send("None
")
@@ -233,11 +234,27 @@ class Matter_UI
# display one line per plug-in
var endpoints = self.device.k2l_num(self.device.plugins_config)
var i = 0
+
+ # special case for root node
+ if endpoints[0] == 0
+ var ep = endpoints[i]
+ var conf = self.device.plugins_config[str(ep)]
+ var typ = conf.find('type')
+
+ webserver.content_send(string.format(" ", i))
+ webserver.content_send(string.format("", i))
+ self.plugin_option(conf.find('type', ''), self._ROOT_TYPES)
+ webserver.content_send(string.format(" "))
+ webserver.content_send(" ")
+
+ i += 1
+ end
+
while i < size(endpoints)
var ep = endpoints[i]
var conf = self.device.plugins_config[str(ep)]
var typ = conf.find('type')
- if !typ continue end
+ if !typ i += 1 continue end
var arg_name = self.device.get_plugin_class_arg(typ)
var arg = arg_name ? str(conf.find(arg_name, '')) : ''
@@ -245,7 +262,7 @@ class Matter_UI
webserver.content_send(string.format(" ", i, ep))
webserver.content_send(string.format("", i))
- self.plugin_option(conf.find('type', ''))
+ self.plugin_option(conf.find('type', ''), self._CLASSES_TYPES)
webserver.content_send(string.format(" "))
webserver.content_send(string.format(" ",
i, webserver.html_escape(arg)))
@@ -256,7 +273,7 @@ class Matter_UI
# add an empty line for adding a configuration
webserver.content_send(string.format(" ", i))
webserver.content_send(string.format("", i))
- self.plugin_option('')
+ self.plugin_option('', self._CLASSES_TYPES)
webserver.content_send(string.format(" "))
webserver.content_send(string.format(" ", i))
@@ -270,17 +287,20 @@ class Matter_UI
#- ---------------------------------------------------------------------- -#
#- Show all possible classes for plugin
#- ---------------------------------------------------------------------- -#
- def plugin_option(cur)
+ def plugin_option(cur, class_list)
import webserver
import string
- var class_types = string.split(self._CLASSES_TYPES, '|')
+ var class_types = class_list ? string.split(class_list, '|') : []
var i = 0
- webserver.content_send(" ")
while i < size(class_types)
var typ = class_types[i]
- var nam = self.device.get_plugin_class_displayname(typ)
- webserver.content_send(string.format("%s ", typ, (typ == cur) ? " selected" : "", nam))
+ if typ == ''
+ webserver.content_send(" ")
+ else
+ var nam = self.device.get_plugin_class_displayname(typ)
+ webserver.content_send(string.format("%s ", typ, (typ == cur) ? " selected" : "", nam))
+ end
i += 1
end
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index d4d47b146..3c48befb9 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -6,6 +6,150 @@
extern const bclass be_class_Matter_Device;
+/********************************************************************
+** Solidified function: start
+********************************************************************/
+be_local_closure(Matter_Device_start, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(_trigger_read_sensors),
+ }),
+ be_str_weak(_anonymous_),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80000000, // 0003 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(started),
+ /* K1 */ be_nested_str_weak(autoconf_device),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(add_cron),
+ /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
+ /* K5 */ be_nested_str_weak(matter_sensors_30s),
+ /* K6 */ be_nested_str_weak(_start_udp),
+ /* K7 */ be_nested_str_weak(UDP_PORT),
+ /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames),
+ }),
+ be_str_weak(start),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x78060000, // 0001 JMPF R1 #0003
+ 0x80000200, // 0002 RET 0
+ 0x8C040101, // 0003 GETMET R1 R0 K1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xB8060400, // 0005 GETNGBL R1 K2
+ 0x8C040303, // 0006 GETMET R1 R1 K3
+ 0x580C0004, // 0007 LDCONST R3 K4
+ 0x84100000, // 0008 CLOSURE R4 P0
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C040800, // 000A CALL R1 4
+ 0x8C040106, // 000B GETMET R1 R0 K6
+ 0x880C0107, // 000C GETMBR R3 R0 K7
+ 0x7C040400, // 000D CALL R1 2
+ 0x8C040108, // 000E GETMET R1 R0 K8
+ 0x7C040200, // 000F CALL R1 1
+ 0x50040200, // 0010 LDBOOL R1 1 0
+ 0x90020001, // 0011 SETMBR R0 K0 R1
+ 0xA0000000, // 0012 CLOSE R0
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: generate_random_passcode
+********************************************************************/
+be_local_closure(Matter_Device_generate_random_passcode, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(random),
+ /* K2 */ be_nested_str_weak(get),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_const_int(134217727),
+ /* K5 */ be_const_int(99999998),
+ /* K6 */ be_nested_str_weak(PASSCODE_INVALID),
+ /* K7 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(generate_random_passcode),
+ &be_const_str_solidified,
+ ( &(const binstruction[35]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x500C0200, // 0002 LDBOOL R3 1 0
+ 0x780E001D, // 0003 JMPF R3 #0022
+ 0x8C0C0301, // 0004 GETMET R3 R1 K1
+ 0x54160003, // 0005 LDINT R5 4
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x8C0C0702, // 0007 GETMET R3 R3 K2
+ 0x58140003, // 0008 LDCONST R5 K3
+ 0x541A0003, // 0009 LDINT R6 4
+ 0x7C0C0600, // 000A CALL R3 3
+ 0x2C0C0704, // 000B AND R3 R3 K4
+ 0x5C080600, // 000C MOVE R2 R3
+ 0x240C0505, // 000D GT R3 R2 K5
+ 0x780E0000, // 000E JMPF R3 #0010
+ 0x7001FFF1, // 000F JMP #0002
+ 0x600C0010, // 0010 GETGBL R3 G16
+ 0x88100106, // 0011 GETMBR R4 R0 K6
+ 0x7C0C0200, // 0012 CALL R3 1
+ 0xA8020005, // 0013 EXBLK 0 #001A
+ 0x5C100600, // 0014 MOVE R4 R3
+ 0x7C100000, // 0015 CALL R4 0
+ 0x1C140404, // 0016 EQ R5 R2 R4
+ 0x78160000, // 0017 JMPF R5 #0019
+ 0x4C080000, // 0018 LDNIL R2
+ 0x7001FFF9, // 0019 JMP #0014
+ 0x580C0007, // 001A LDCONST R3 K7
+ 0xAC0C0200, // 001B CATCH R3 1 0
+ 0xB0080000, // 001C RAISE 2 R0 R0
+ 0x4C0C0000, // 001D LDNIL R3
+ 0x200C0403, // 001E NE R3 R2 R3
+ 0x780E0000, // 001F JMPF R3 #0021
+ 0x80040400, // 0020 RET 1 R2
+ 0x7001FFDF, // 0021 JMP #0002
+ 0x80000000, // 0022 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: save_param
********************************************************************/
@@ -121,6 +265,545 @@ be_local_closure(Matter_Device_save_param, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: remove_fabric
+********************************************************************/
+be_local_closure(Matter_Device_remove_fabric, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(find_children_fabrics),
+ /* K2 */ be_nested_str_weak(get_fabric_index),
+ /* K3 */ be_nested_str_weak(find_fabric_by_index),
+ /* K4 */ be_nested_str_weak(message_handler),
+ /* K5 */ be_nested_str_weak(im),
+ /* K6 */ be_nested_str_weak(subs_shop),
+ /* K7 */ be_nested_str_weak(remove_by_fabric),
+ /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K9 */ be_nested_str_weak(remove_fabric),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(save_fabrics),
+ }),
+ be_str_weak(remove_fabric),
+ &be_const_str_solidified,
+ ( &(const binstruction[43]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x8C100302, // 0002 GETMET R4 R1 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0x7C080400, // 0004 CALL R2 2
+ 0x4C0C0000, // 0005 LDNIL R3
+ 0x1C0C0403, // 0006 EQ R3 R2 R3
+ 0x780E0000, // 0007 JMPF R3 #0009
+ 0x80000600, // 0008 RET 0
+ 0x600C0010, // 0009 GETGBL R3 G16
+ 0x5C100400, // 000A MOVE R4 R2
+ 0x7C0C0200, // 000B CALL R3 1
+ 0xA8020016, // 000C EXBLK 0 #0024
+ 0x5C100600, // 000D MOVE R4 R3
+ 0x7C100000, // 000E CALL R4 0
+ 0x88140100, // 000F GETMBR R5 R0 K0
+ 0x8C140B03, // 0010 GETMET R5 R5 K3
+ 0x5C1C0800, // 0011 MOVE R7 R4
+ 0x7C140400, // 0012 CALL R5 2
+ 0x4C180000, // 0013 LDNIL R6
+ 0x20180A06, // 0014 NE R6 R5 R6
+ 0x781A000C, // 0015 JMPF R6 #0023
+ 0x88180104, // 0016 GETMBR R6 R0 K4
+ 0x88180D05, // 0017 GETMBR R6 R6 K5
+ 0x88180D06, // 0018 GETMBR R6 R6 K6
+ 0x8C180D07, // 0019 GETMET R6 R6 K7
+ 0x5C200A00, // 001A MOVE R8 R5
+ 0x7C180400, // 001B CALL R6 2
+ 0x8C180108, // 001C GETMET R6 R0 K8
+ 0x5C200A00, // 001D MOVE R8 R5
+ 0x7C180400, // 001E CALL R6 2
+ 0x88180100, // 001F GETMBR R6 R0 K0
+ 0x8C180D09, // 0020 GETMET R6 R6 K9
+ 0x5C200A00, // 0021 MOVE R8 R5
+ 0x7C180400, // 0022 CALL R6 2
+ 0x7001FFE8, // 0023 JMP #000D
+ 0x580C000A, // 0024 LDCONST R3 K10
+ 0xAC0C0200, // 0025 CATCH R3 1 0
+ 0xB0080000, // 0026 RAISE 2 R0 R0
+ 0x880C0100, // 0027 GETMBR R3 R0 K0
+ 0x8C0C070B, // 0028 GETMET R3 R3 K11
+ 0x7C0C0200, // 0029 CALL R3 1
+ 0x80000000, // 002A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _start_udp
+********************************************************************/
+be_local_closure(Matter_Device__start_udp, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* 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 */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(log),
+ /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
+ /* K4 */ be_const_int(2),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(UDPServer),
+ /* K7 */ be_nested_str_weak(),
+ /* K8 */ be_nested_str_weak(start),
+ }),
+ 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
+ 0xB80A0200, // 0007 GETNGBL R2 K1
+ 0x8C080502, // 0008 GETMET R2 R2 K2
+ 0x60100008, // 0009 GETGBL R4 G8
+ 0x5C140200, // 000A MOVE R5 R1
+ 0x7C100200, // 000B CALL R4 1
+ 0x00120604, // 000C ADD R4 K3 R4
+ 0x58140004, // 000D LDCONST R5 K4
+ 0x7C080600, // 000E CALL R2 3
+ 0xB80A0A00, // 000F GETNGBL R2 K5
+ 0x8C080506, // 0010 GETMET R2 R2 K6
+ 0x58100007, // 0011 LDCONST R4 K7
+ 0x5C140200, // 0012 MOVE R5 R1
+ 0x7C080600, // 0013 CALL R2 3
+ 0x90020002, // 0014 SETMBR R0 K0 R2
+ 0x88080100, // 0015 GETMBR R2 R0 K0
+ 0x8C080508, // 0016 GETMET R2 R2 K8
+ 0x84100000, // 0017 CLOSURE R4 P0
+ 0x7C080400, // 0018 CALL R2 2
+ 0xA0000000, // 0019 CLOSE R0
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_50ms
+********************************************************************/
+be_local_closure(Matter_Device_every_50ms, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(tick),
+ /* K1 */ be_const_int(1),
+ }),
+ be_str_weak(every_50ms),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x00040301, // 0001 ADD R1 R1 K1
+ 0x90020001, // 0002 SETMBR R0 K0 R1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: stop
+********************************************************************/
+be_local_closure(Matter_Device_stop, /* name */
+ be_nested_proto(
+ 4, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(remove_driver),
+ /* K2 */ be_nested_str_weak(udp_server),
+ /* K3 */ be_nested_str_weak(stop),
+ }),
+ be_str_weak(stop),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x5C0C0000, // 0002 MOVE R3 R0
+ 0x7C040400, // 0003 CALL R1 2
+ 0x88040102, // 0004 GETMBR R1 R0 K2
+ 0x78060002, // 0005 JMPF R1 #0009
+ 0x88040102, // 0006 GETMBR R1 R0 K2
+ 0x8C040303, // 0007 GETMET R1 R1 K3
+ 0x7C040200, // 0008 CALL R1 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_commissioning_complete
+********************************************************************/
+be_local_closure(Matter_Device_start_commissioning_complete, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(log),
+ /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
+ /* K3 */ be_const_int(2),
+ /* K4 */ be_nested_str_weak(stop_basic_commissioning),
+ }),
+ be_str_weak(start_commissioning_complete),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C080600, // 0004 CALL R2 3
+ 0x8C080104, // 0005 GETMET R2 R0 K4
+ 0x7C080200, // 0006 CALL R2 1
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_commands
+********************************************************************/
+be_local_closure(Matter_Device_register_commands, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* 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(MtrJoin),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x68100000, // 0000 GETUPV R4 U0
+ 0x8C100900, // 0001 GETMET R4 R4 K0
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80040800, // 0007 RET 1 R4
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(add_cmd),
+ /* K2 */ be_nested_str_weak(MtrJoin),
+ }),
+ be_str_weak(register_commands),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x84100000, // 0003 CLOSURE R4 P0
+ 0x7C040600, // 0004 CALL R1 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_operational_discovery_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_operational_discovery),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_operational_discovery_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_native_classes
+********************************************************************/
+be_local_closure(Matter_Device_register_native_classes, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[17]) { /* constants */
+ /* K0 */ be_nested_str_weak(introspect),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(members),
+ /* K3 */ be_nested_str_weak(matter),
+ /* K4 */ be_nested_str_weak(get),
+ /* K5 */ be_nested_str_weak(class),
+ /* K6 */ be_nested_str_weak(find),
+ /* K7 */ be_nested_str_weak(Plugin_),
+ /* K8 */ be_const_int(0),
+ /* K9 */ be_nested_str_weak(register_plugin_class),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20),
+ /* K14 */ be_nested_str_weak(k2l),
+ /* K15 */ be_nested_str_weak(plugins_classes),
+ /* K16 */ be_const_int(3),
+ }),
+ be_str_weak(register_native_classes),
+ &be_const_str_solidified,
+ ( &(const binstruction[43]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xA4120200, // 0001 IMPORT R4 K1
+ 0x60140010, // 0002 GETGBL R5 G16
+ 0x8C180702, // 0003 GETMET R6 R3 K2
+ 0xB8220600, // 0004 GETNGBL R8 K3
+ 0x7C180400, // 0005 CALL R6 2
+ 0x7C140200, // 0006 CALL R5 1
+ 0xA8020014, // 0007 EXBLK 0 #001D
+ 0x5C180A00, // 0008 MOVE R6 R5
+ 0x7C180000, // 0009 CALL R6 0
+ 0x8C1C0704, // 000A GETMET R7 R3 K4
+ 0xB8260600, // 000B GETNGBL R9 K3
+ 0x5C280C00, // 000C MOVE R10 R6
+ 0x7C1C0600, // 000D CALL R7 3
+ 0x60200004, // 000E GETGBL R8 G4
+ 0x5C240E00, // 000F MOVE R9 R7
+ 0x7C200200, // 0010 CALL R8 1
+ 0x1C201105, // 0011 EQ R8 R8 K5
+ 0x78220008, // 0012 JMPF R8 #001C
+ 0x8C200906, // 0013 GETMET R8 R4 K6
+ 0x5C280C00, // 0014 MOVE R10 R6
+ 0x582C0007, // 0015 LDCONST R11 K7
+ 0x7C200600, // 0016 CALL R8 3
+ 0x1C201108, // 0017 EQ R8 R8 K8
+ 0x78220002, // 0018 JMPF R8 #001C
+ 0x8C200109, // 0019 GETMET R8 R0 K9
+ 0x5C280E00, // 001A MOVE R10 R7
+ 0x7C200400, // 001B CALL R8 2
+ 0x7001FFEA, // 001C JMP #0008
+ 0x5814000A, // 001D LDCONST R5 K10
+ 0xAC140200, // 001E CATCH R5 1 0
+ 0xB0080000, // 001F RAISE 2 R0 R0
+ 0xB8161600, // 0020 GETNGBL R5 K11
+ 0x8C140B0C, // 0021 GETMET R5 R5 K12
+ 0x601C0008, // 0022 GETGBL R7 G8
+ 0x8C20010E, // 0023 GETMET R8 R0 K14
+ 0x8828010F, // 0024 GETMBR R10 R0 K15
+ 0x7C200400, // 0025 CALL R8 2
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x001E1A07, // 0027 ADD R7 K13 R7
+ 0x58200010, // 0028 LDCONST R8 K16
+ 0x7C140600, // 0029 CALL R5 3
+ 0x80000000, // 002A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: stop_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(publish_result),
+ /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(commissioning_open),
+ /* K6 */ be_nested_str_weak(mdns_remove_PASE),
+ /* K7 */ be_nested_str_weak(commissioning_iterations),
+ /* K8 */ be_nested_str_weak(commissioning_discriminator),
+ /* K9 */ be_nested_str_weak(commissioning_salt),
+ /* K10 */ be_nested_str_weak(commissioning_w0),
+ /* K11 */ be_nested_str_weak(commissioning_L),
+ /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
+ }),
+ be_str_weak(stop_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[25]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x78060004, // 0002 JMPF R1 #0008
+ 0xB8060200, // 0003 GETNGBL R1 K1
+ 0x8C040302, // 0004 GETMET R1 R1 K2
+ 0x580C0003, // 0005 LDCONST R3 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C040600, // 0007 CALL R1 3
+ 0x4C040000, // 0008 LDNIL R1
+ 0x90020A01, // 0009 SETMBR R0 K5 R1
+ 0x8C040106, // 000A GETMET R1 R0 K6
+ 0x7C040200, // 000B CALL R1 1
+ 0x4C040000, // 000C LDNIL R1
+ 0x90020E01, // 000D SETMBR R0 K7 R1
+ 0x4C040000, // 000E LDNIL R1
+ 0x90021001, // 000F SETMBR R0 K8 R1
+ 0x4C040000, // 0010 LDNIL R1
+ 0x90021201, // 0011 SETMBR R0 K9 R1
+ 0x4C040000, // 0012 LDNIL R1
+ 0x90021401, // 0013 SETMBR R0 K10 R1
+ 0x4C040000, // 0014 LDNIL R1
+ 0x90021601, // 0015 SETMBR R0 K11 R1
+ 0x4C040000, // 0016 LDNIL R1
+ 0x90021801, // 0017 SETMBR R0 K12 R1
+ 0x80000000, // 0018 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: _trigger_read_sensors
********************************************************************/
@@ -194,239 +877,9 @@ be_local_closure(Matter_Device__trigger_read_sensors, /* name */
/********************************************************************
-** Solidified function: register_plugin_class
+** Solidified function: _init_basic_commissioning
********************************************************************/
-be_local_closure(Matter_Device_register_plugin_class, /* name */
- be_nested_proto(
- 4, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins_classes),
- }),
- be_str_weak(register_plugin_class),
- &be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x880C0100, // 0000 GETMBR R3 R0 K0
- 0x980C0202, // 0001 SETIDX R3 R1 R2
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: autoconf_device
-********************************************************************/
-be_local_closure(Matter_Device_autoconf_device, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(json),
- /* K2 */ be_nested_str_weak(plugins),
- /* K3 */ be_const_int(0),
- /* K4 */ be_nested_str_weak(plugins_config),
- /* K5 */ be_nested_str_weak(autoconf_device_map),
- /* K6 */ be_nested_str_weak(tasmota),
- /* K7 */ be_nested_str_weak(log),
- /* K8 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
- /* K9 */ be_const_int(3),
- /* K10 */ be_nested_str_weak(_load_plugins_config),
- /* K11 */ be_nested_str_weak(plugins_persist),
- /* K12 */ be_nested_str_weak(sessions),
- /* K13 */ be_nested_str_weak(count_active_fabrics),
- /* K14 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(autoconf_device),
- &be_const_str_solidified,
- ( &(const binstruction[34]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x600C000C, // 0002 GETGBL R3 G12
- 0x88100102, // 0003 GETMBR R4 R0 K2
- 0x7C0C0200, // 0004 CALL R3 1
- 0x240C0703, // 0005 GT R3 R3 K3
- 0x780E0000, // 0006 JMPF R3 #0008
- 0x80000600, // 0007 RET 0
- 0x8C0C0105, // 0008 GETMET R3 R0 K5
- 0x7C0C0200, // 0009 CALL R3 1
- 0x90020803, // 000A SETMBR R0 K4 R3
- 0xB80E0C00, // 000B GETNGBL R3 K6
- 0x8C0C0707, // 000C GETMET R3 R3 K7
- 0x60140008, // 000D GETGBL R5 G8
- 0x88180104, // 000E GETMBR R6 R0 K4
- 0x7C140200, // 000F CALL R5 1
- 0x00161005, // 0010 ADD R5 K8 R5
- 0x58180009, // 0011 LDCONST R6 K9
- 0x7C0C0600, // 0012 CALL R3 3
- 0x8C0C010A, // 0013 GETMET R3 R0 K10
- 0x88140104, // 0014 GETMBR R5 R0 K4
- 0x7C0C0400, // 0015 CALL R3 2
- 0x880C010B, // 0016 GETMBR R3 R0 K11
- 0x740E0008, // 0017 JMPT R3 #0021
- 0x880C010C, // 0018 GETMBR R3 R0 K12
- 0x8C0C070D, // 0019 GETMET R3 R3 K13
- 0x7C0C0200, // 001A CALL R3 1
- 0x240C0703, // 001B GT R3 R3 K3
- 0x780E0003, // 001C JMPF R3 #0021
- 0x500C0200, // 001D LDBOOL R3 1 0
- 0x90021603, // 001E SETMBR R0 K11 R3
- 0x8C0C010E, // 001F GETMET R3 R0 K14
- 0x7C0C0200, // 0020 CALL R3 1
- 0x80000000, // 0021 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: generate_random_passcode
-********************************************************************/
-be_local_closure(Matter_Device_generate_random_passcode, /* name */
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(random),
- /* K2 */ be_nested_str_weak(get),
- /* K3 */ be_const_int(0),
- /* K4 */ be_const_int(134217727),
- /* K5 */ be_const_int(99999998),
- /* K6 */ be_nested_str_weak(PASSCODE_INVALID),
- /* K7 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(generate_random_passcode),
- &be_const_str_solidified,
- ( &(const binstruction[35]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x500C0200, // 0002 LDBOOL R3 1 0
- 0x780E001D, // 0003 JMPF R3 #0022
- 0x8C0C0301, // 0004 GETMET R3 R1 K1
- 0x54160003, // 0005 LDINT R5 4
- 0x7C0C0400, // 0006 CALL R3 2
- 0x8C0C0702, // 0007 GETMET R3 R3 K2
- 0x58140003, // 0008 LDCONST R5 K3
- 0x541A0003, // 0009 LDINT R6 4
- 0x7C0C0600, // 000A CALL R3 3
- 0x2C0C0704, // 000B AND R3 R3 K4
- 0x5C080600, // 000C MOVE R2 R3
- 0x240C0505, // 000D GT R3 R2 K5
- 0x780E0000, // 000E JMPF R3 #0010
- 0x7001FFF1, // 000F JMP #0002
- 0x600C0010, // 0010 GETGBL R3 G16
- 0x88100106, // 0011 GETMBR R4 R0 K6
- 0x7C0C0200, // 0012 CALL R3 1
- 0xA8020005, // 0013 EXBLK 0 #001A
- 0x5C100600, // 0014 MOVE R4 R3
- 0x7C100000, // 0015 CALL R4 0
- 0x1C140404, // 0016 EQ R5 R2 R4
- 0x78160000, // 0017 JMPF R5 #0019
- 0x4C080000, // 0018 LDNIL R2
- 0x7001FFF9, // 0019 JMP #0014
- 0x580C0007, // 001A LDCONST R3 K7
- 0xAC0C0200, // 001B CATCH R3 1 0
- 0xB0080000, // 001C RAISE 2 R0 R0
- 0x4C0C0000, // 001D LDNIL R3
- 0x200C0403, // 001E NE R3 R2 R3
- 0x780E0000, // 001F JMPF R3 #0021
- 0x80040400, // 0020 RET 1 R2
- 0x7001FFDF, // 0021 JMP #0002
- 0x80000000, // 0022 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: register_commands
-********************************************************************/
-be_local_closure(Matter_Device_register_commands, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 10, /* nstack */
- 4, /* 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(MtrJoin),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x68100000, // 0000 GETUPV R4 U0
- 0x8C100900, // 0001 GETMET R4 R4 K0
- 0x5C180000, // 0002 MOVE R6 R0
- 0x5C1C0200, // 0003 MOVE R7 R1
- 0x5C200400, // 0004 MOVE R8 R2
- 0x5C240600, // 0005 MOVE R9 R3
- 0x7C100A00, // 0006 CALL R4 5
- 0x80040800, // 0007 RET 1 R4
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(add_cmd),
- /* K2 */ be_nested_str_weak(MtrJoin),
- }),
- be_str_weak(register_commands),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x580C0002, // 0002 LDCONST R3 K2
- 0x84100000, // 0003 CLOSURE R4 P0
- 0x7C040600, // 0004 CALL R1 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: is_commissioning_open
-********************************************************************/
-be_local_closure(Matter_Device_is_commissioning_open, /* name */
+be_local_closure(Matter_Device__init_basic_commissioning, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -436,207 +889,23 @@ be_local_closure(Matter_Device_is_commissioning_open, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- }),
- be_str_weak(is_commissioning_open),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: k2l
-********************************************************************/
-be_local_closure(Matter_Device_k2l, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 4, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_const_int(1),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(k2l),
- &be_const_str_solidified,
- ( &(const binstruction[50]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 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
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 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
- 0x8C140502, // 000E GETMET R5 R2 K2
- 0x5C1C0800, // 000F MOVE R7 R4
- 0x7C140400, // 0010 CALL R5 2
- 0x7001FFF9, // 0011 JMP #000C
- 0x580C0003, // 0012 LDCONST R3 K3
- 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
- 0x04100904, // 0019 SUB R4 R4 K4
- 0x40120804, // 001A CONNECT R4 K4 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
- 0x241C0D05, // 0021 GT R7 R6 K5
- 0x781E0008, // 0022 JMPF R7 #002C
- 0x041C0D04, // 0023 SUB R7 R6 K4
- 0x941C0407, // 0024 GETIDX R7 R2 R7
- 0x241C0E05, // 0025 GT R7 R7 R5
- 0x781E0004, // 0026 JMPF R7 #002C
- 0x041C0D04, // 0027 SUB R7 R6 K4
- 0x941C0407, // 0028 GETIDX R7 R2 R7
- 0x98080C07, // 0029 SETIDX R2 R6 R7
- 0x04180D04, // 002A SUB R6 R6 K4
- 0x7001FFF4, // 002B JMP #0021
- 0x98080C05, // 002C SETIDX R2 R6 R5
- 0x7001FFEE, // 002D JMP #001D
- 0x580C0003, // 002E LDCONST R3 K3
- 0xAC0C0200, // 002F CATCH R3 1 0
- 0xB0080000, // 0030 RAISE 2 R0 R0
- 0x80040400, // 0031 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_operational_discovery_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_operational_discovery),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
/* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
}),
- be_str_weak(start_operational_discovery_deferred),
+ be_str_weak(_init_basic_commissioning),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: attribute_updated
-********************************************************************/
-be_local_closure(Matter_Device_attribute_updated, /* name */
- be_nested_proto(
- 10, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(Path),
- /* K2 */ be_nested_str_weak(endpoint),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(message_handler),
- /* K6 */ be_nested_str_weak(im),
- /* K7 */ be_nested_str_weak(subs_shop),
- /* K8 */ be_nested_str_weak(attribute_updated_ctx),
- }),
- 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
- 0xB8160000, // 0004 GETNGBL R5 K0
- 0x8C140B01, // 0005 GETMET R5 R5 K1
- 0x7C140200, // 0006 CALL R5 1
- 0x90160401, // 0007 SETMBR R5 K2 R1
- 0x90160602, // 0008 SETMBR R5 K3 R2
- 0x90160803, // 0009 SETMBR R5 K4 R3
- 0x88180105, // 000A GETMBR R6 R0 K5
- 0x88180D06, // 000B GETMBR R6 R6 K6
- 0x88180D07, // 000C GETMBR R6 R6 K7
- 0x8C180D08, // 000D GETMET R6 R6 K8
- 0x5C200A00, // 000E MOVE R8 R5
- 0x5C240800, // 000F MOVE R9 R4
- 0x7C180600, // 0010 CALL R6 3
- 0x80000000, // 0011 RET 0
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x1C040302, // 0003 EQ R1 R1 K2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x7C040200, // 0006 CALL R1 1
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -719,6 +988,212 @@ be_local_closure(Matter_Device_compute_qrcode_content, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: get_active_endpoints
+********************************************************************/
+be_local_closure(Matter_Device_get_active_endpoints, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins),
+ /* K1 */ be_nested_str_weak(get_endpoint),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(push),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ 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
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0xA8020011, // 0005 EXBLK 0 #0018
+ 0x5C100600, // 0006 MOVE R4 R3
+ 0x7C100000, // 0007 CALL R4 0
+ 0x8C140901, // 0008 GETMET R5 R4 K1
+ 0x7C140200, // 0009 CALL R5 1
+ 0x78060002, // 000A JMPF R1 #000E
+ 0x1C180B02, // 000B EQ R6 R5 K2
+ 0x781A0000, // 000C JMPF R6 #000E
+ 0x7001FFF7, // 000D JMP #0006
+ 0x8C180503, // 000E GETMET R6 R2 K3
+ 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
+ 0x8C180504, // 0014 GETMET R6 R2 K4
+ 0x5C200A00, // 0015 MOVE R8 R5
+ 0x7C180400, // 0016 CALL R6 2
+ 0x7001FFED, // 0017 JMP #0006
+ 0x580C0005, // 0018 LDCONST R3 K5
+ 0xAC0C0200, // 0019 CATCH R3 1 0
+ 0xB0080000, // 001A RAISE 2 R0 R0
+ 0x80040400, // 001B RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: attribute_updated
+********************************************************************/
+be_local_closure(Matter_Device_attribute_updated, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(Path),
+ /* K2 */ be_nested_str_weak(endpoint),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(message_handler),
+ /* K6 */ be_nested_str_weak(im),
+ /* K7 */ be_nested_str_weak(subs_shop),
+ /* K8 */ be_nested_str_weak(attribute_updated_ctx),
+ }),
+ 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
+ 0xB8160000, // 0004 GETNGBL R5 K0
+ 0x8C140B01, // 0005 GETMET R5 R5 K1
+ 0x7C140200, // 0006 CALL R5 1
+ 0x90160401, // 0007 SETMBR R5 K2 R1
+ 0x90160602, // 0008 SETMBR R5 K3 R2
+ 0x90160803, // 0009 SETMBR R5 K4 R3
+ 0x88180105, // 000A GETMBR R6 R0 K5
+ 0x88180D06, // 000B GETMBR R6 R6 K6
+ 0x88180D07, // 000C GETMBR R6 R6 K7
+ 0x8C180D08, // 000D GETMET R6 R6 K8
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x5C240800, // 000F MOVE R9 R4
+ 0x7C180600, // 0010 CALL R6 3
+ 0x80000000, // 0011 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Device_invoke_request, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_const_int(0),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_nested_str_weak(invoke_request),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(status),
+ /* K6 */ be_nested_str_weak(matter),
+ /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[24]) { /* code */
+ 0x58100000, // 0000 LDCONST R4 K0
+ 0x88140701, // 0001 GETMBR R5 R3 K1
+ 0x6018000C, // 0002 GETGBL R6 G12
+ 0x881C0102, // 0003 GETMBR R7 R0 K2
+ 0x7C180200, // 0004 CALL R6 1
+ 0x14180806, // 0005 LT R6 R4 R6
+ 0x781A000C, // 0006 JMPF R6 #0014
+ 0x88180102, // 0007 GETMBR R6 R0 K2
+ 0x94180C04, // 0008 GETIDX R6 R6 R4
+ 0x881C0D01, // 0009 GETMBR R7 R6 K1
+ 0x1C1C0E05, // 000A EQ R7 R7 R5
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0D03, // 000C GETMET R7 R6 K3
+ 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
+ 0x00100904, // 0012 ADD R4 R4 K4
+ 0x7001FFED, // 0013 JMP #0002
+ 0xB81A0C00, // 0014 GETNGBL R6 K6
+ 0x88180D07, // 0015 GETMBR R6 R6 K7
+ 0x900E0A06, // 0016 SETMBR R3 K5 R6
+ 0x80000000, // 0017 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: event_fabrics_saved
+********************************************************************/
+be_local_closure(Matter_Device_event_fabrics_saved, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(count_active_fabrics),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(plugins_persist),
+ /* K4 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(event_fabrics_saved),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x24040302, // 0003 GT R1 R1 K2
+ 0x78060005, // 0004 JMPF R1 #000B
+ 0x88040103, // 0005 GETMBR R1 R0 K3
+ 0x74060003, // 0006 JMPT R1 #000B
+ 0x50040200, // 0007 LDBOOL R1 1 0
+ 0x90020601, // 0008 SETMBR R0 K3 R1
+ 0x8C040104, // 0009 GETMET R1 R0 K4
+ 0x7C040200, // 000A CALL R1 1
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: sort_distinct
********************************************************************/
@@ -801,6 +1276,88 @@ be_local_closure(Matter_Device_sort_distinct, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: k2l_num
+********************************************************************/
+be_local_closure(Matter_Device_k2l_num, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(0),
+ }),
+ be_str_weak(k2l_num),
+ &be_const_str_solidified,
+ ( &(const binstruction[52]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 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
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 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
+ 0x8C140502, // 000E GETMET R5 R2 K2
+ 0x601C0009, // 000F GETGBL R7 G9
+ 0x5C200800, // 0010 MOVE R8 R4
+ 0x7C1C0200, // 0011 CALL R7 1
+ 0x7C140400, // 0012 CALL R5 2
+ 0x7001FFF7, // 0013 JMP #000C
+ 0x580C0003, // 0014 LDCONST R3 K3
+ 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
+ 0x04100904, // 001B SUB R4 R4 K4
+ 0x40120804, // 001C CONNECT R4 K4 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
+ 0x241C0D05, // 0023 GT R7 R6 K5
+ 0x781E0008, // 0024 JMPF R7 #002E
+ 0x041C0D04, // 0025 SUB R7 R6 K4
+ 0x941C0407, // 0026 GETIDX R7 R2 R7
+ 0x241C0E05, // 0027 GT R7 R7 R5
+ 0x781E0004, // 0028 JMPF R7 #002E
+ 0x041C0D04, // 0029 SUB R7 R6 K4
+ 0x941C0407, // 002A GETIDX R7 R2 R7
+ 0x98080C07, // 002B SETIDX R2 R6 R7
+ 0x04180D04, // 002C SUB R6 R6 K4
+ 0x7001FFF4, // 002D JMP #0023
+ 0x98080C05, // 002E SETIDX R2 R6 R5
+ 0x7001FFEE, // 002F JMP #001F
+ 0x580C0003, // 0030 LDCONST R3 K3
+ 0xAC0C0200, // 0031 CATCH R3 1 0
+ 0xB0080000, // 0032 RAISE 2 R0 R0
+ 0x80040400, // 0033 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: mdns_announce_op_discovery
********************************************************************/
@@ -977,1084 +1534,9 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery, /* name */
/********************************************************************
-** Solidified function: compute_manual_pairing_code
+** Solidified function: every_second
********************************************************************/
-be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
- be_nested_proto(
- 11, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(root_discriminator),
- /* K2 */ be_nested_str_weak(root_passcode),
- /* K3 */ be_nested_str_weak(format),
- /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(Verhoeff),
- /* K7 */ be_nested_str_weak(checksum),
- }),
- be_str_weak(compute_manual_pairing_code),
- &be_const_str_solidified,
- ( &(const binstruction[31]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x88080101, // 0001 GETMBR R2 R0 K1
- 0x540E0FFE, // 0002 LDINT R3 4095
- 0x2C080403, // 0003 AND R2 R2 R3
- 0x540E0009, // 0004 LDINT R3 10
- 0x3C080403, // 0005 SHR R2 R2 R3
- 0x880C0101, // 0006 GETMBR R3 R0 K1
- 0x541202FF, // 0007 LDINT R4 768
- 0x2C0C0604, // 0008 AND R3 R3 R4
- 0x54120005, // 0009 LDINT R4 6
- 0x380C0604, // 000A SHL R3 R3 R4
- 0x88100102, // 000B GETMBR R4 R0 K2
- 0x54163FFE, // 000C LDINT R5 16383
- 0x2C100805, // 000D AND R4 R4 R5
- 0x300C0604, // 000E OR R3 R3 R4
- 0x88100102, // 000F GETMBR R4 R0 K2
- 0x5416000D, // 0010 LDINT R5 14
- 0x3C100805, // 0011 SHR R4 R4 R5
- 0x8C140303, // 0012 GETMET R5 R1 K3
- 0x581C0004, // 0013 LDCONST R7 K4
- 0x5C200400, // 0014 MOVE R8 R2
- 0x5C240600, // 0015 MOVE R9 R3
- 0x5C280800, // 0016 MOVE R10 R4
- 0x7C140A00, // 0017 CALL R5 5
- 0xB81A0A00, // 0018 GETNGBL R6 K5
- 0x88180D06, // 0019 GETMBR R6 R6 K6
- 0x8C180D07, // 001A GETMET R6 R6 K7
- 0x5C200A00, // 001B MOVE R8 R5
- 0x7C180400, // 001C CALL R6 2
- 0x00140A06, // 001D ADD R5 R5 R6
- 0x80040A00, // 001E RET 1 R5
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_root_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
- be_nested_proto(
- 14, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[23]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
- /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
- /* K7 */ be_const_int(0),
- /* K8 */ be_const_int(3),
- /* K9 */ be_const_int(2147483647),
- /* K10 */ be_const_int(2),
- /* K11 */ be_nested_str_weak(compute_qrcode_content),
- /* K12 */ be_nested_str_weak(publish_result),
- /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
- /* K14 */ be_nested_str_weak(Matter),
- /* K15 */ be_nested_str_weak(_compute_pbkdf),
- /* K16 */ be_nested_str_weak(root_passcode),
- /* K17 */ be_nested_str_weak(root_iterations),
- /* K18 */ be_nested_str_weak(root_salt),
- /* K19 */ be_nested_str_weak(start_basic_commissioning),
- /* K20 */ be_nested_str_weak(root_discriminator),
- /* K21 */ be_nested_str_weak(root_w0),
- /* K22 */ be_nested_str_weak(root_L),
- }),
- be_str_weak(start_root_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[49]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x1C0C0203, // 0002 EQ R3 R1 R3
- 0x780E0000, // 0003 JMPF R3 #0005
- 0x88040101, // 0004 GETMBR R1 R0 K1
- 0x8C0C0102, // 0005 GETMET R3 R0 K2
- 0x7C0C0200, // 0006 CALL R3 1
- 0xB8120600, // 0007 GETNGBL R4 K3
- 0x8C100904, // 0008 GETMET R4 R4 K4
- 0x8C180505, // 0009 GETMET R6 R2 K5
- 0x58200006, // 000A LDCONST R8 K6
- 0x40260F08, // 000B CONNECT R9 K7 K8
- 0x94240609, // 000C GETIDX R9 R3 R9
- 0x542A0003, // 000D LDINT R10 4
- 0x542E0005, // 000E LDINT R11 6
- 0x4028140B, // 000F CONNECT R10 R10 R11
- 0x9428060A, // 0010 GETIDX R10 R3 R10
- 0x542E0006, // 0011 LDINT R11 7
- 0x402C1709, // 0012 CONNECT R11 R11 K9
- 0x942C060B, // 0013 GETIDX R11 R3 R11
- 0x7C180A00, // 0014 CALL R6 5
- 0x581C000A, // 0015 LDCONST R7 K10
- 0x7C100600, // 0016 CALL R4 3
- 0x8C10010B, // 0017 GETMET R4 R0 K11
- 0x7C100200, // 0018 CALL R4 1
- 0xB8160600, // 0019 GETNGBL R5 K3
- 0x8C140B0C, // 001A GETMET R5 R5 K12
- 0x8C1C0505, // 001B GETMET R7 R2 K5
- 0x5824000D, // 001C LDCONST R9 K13
- 0x5C280600, // 001D MOVE R10 R3
- 0x5C2C0800, // 001E MOVE R11 R4
- 0x7C1C0800, // 001F CALL R7 4
- 0x5820000E, // 0020 LDCONST R8 K14
- 0x7C140600, // 0021 CALL R5 3
- 0x8C14010F, // 0022 GETMET R5 R0 K15
- 0x881C0110, // 0023 GETMBR R7 R0 K16
- 0x88200111, // 0024 GETMBR R8 R0 K17
- 0x88240112, // 0025 GETMBR R9 R0 K18
- 0x7C140800, // 0026 CALL R5 4
- 0x8C140113, // 0027 GETMET R5 R0 K19
- 0x5C1C0200, // 0028 MOVE R7 R1
- 0x88200111, // 0029 GETMBR R8 R0 K17
- 0x88240114, // 002A GETMBR R9 R0 K20
- 0x88280112, // 002B GETMBR R10 R0 K18
- 0x882C0115, // 002C GETMBR R11 R0 K21
- 0x88300116, // 002D GETMBR R12 R0 K22
- 0x4C340000, // 002E LDNIL R13
- 0x7C141000, // 002F CALL R5 8
- 0x80000000, // 0030 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_commissioning_complete
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(log),
- /* K2 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20Commissioning_X20complete_X20_X2A_X2A_X2A),
- /* K3 */ be_const_int(2),
- /* K4 */ be_nested_str_weak(stop_basic_commissioning),
- }),
- be_str_weak(start_commissioning_complete),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C080600, // 0004 CALL R2 3
- 0x8C080104, // 0005 GETMET R2 R0 K4
- 0x7C080200, // 0006 CALL R2 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Device_init, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* 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 */
- ( &(const bvalue[39]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(UI),
- /* K7 */ be_nested_str_weak(started),
- /* K8 */ be_nested_str_weak(plugins),
- /* K9 */ be_nested_str_weak(plugins_persist),
- /* K10 */ be_nested_str_weak(plugins_classes),
- /* K11 */ be_nested_str_weak(register_native_classes),
- /* K12 */ be_nested_str_weak(vendorid),
- /* K13 */ be_nested_str_weak(VENDOR_ID),
- /* K14 */ be_nested_str_weak(productid),
- /* K15 */ be_nested_str_weak(PRODUCT_ID),
- /* K16 */ be_nested_str_weak(root_iterations),
- /* K17 */ be_nested_str_weak(PBKDF_ITERATIONS),
- /* K18 */ be_nested_str_weak(root_salt),
- /* K19 */ be_nested_str_weak(random),
- /* K20 */ be_nested_str_weak(ipv4only),
- /* K21 */ be_nested_str_weak(load_param),
- /* K22 */ be_nested_str_weak(sessions),
- /* K23 */ be_nested_str_weak(Session_Store),
- /* K24 */ be_nested_str_weak(load_fabrics),
- /* K25 */ be_nested_str_weak(message_handler),
- /* K26 */ be_nested_str_weak(MessageHandler),
- /* K27 */ be_nested_str_weak(ui),
- /* K28 */ be_nested_str_weak(wifi),
- /* K29 */ be_nested_str_weak(up),
- /* K30 */ be_nested_str_weak(eth),
- /* K31 */ be_nested_str_weak(start),
- /* K32 */ be_nested_str_weak(add_rule),
- /* K33 */ be_nested_str_weak(Wifi_X23Connected),
- /* K34 */ be_nested_str_weak(matter_start),
- /* K35 */ be_nested_str_weak(Eth_X23Connected),
- /* K36 */ be_nested_str_weak(_init_basic_commissioning),
- /* K37 */ be_nested_str_weak(add_driver),
- /* K38 */ be_nested_str_weak(register_commands),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[101]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xB80E0400, // 0002 GETNGBL R3 K2
- 0x8C0C0703, // 0003 GETMET R3 R3 K3
- 0xB8160800, // 0004 GETNGBL R5 K4
- 0x88140B05, // 0005 GETMBR R5 R5 K5
- 0x7C0C0400, // 0006 CALL R3 2
- 0x740E0004, // 0007 JMPT R3 #000D
- 0xB80E0800, // 0008 GETNGBL R3 K4
- 0x8C0C0706, // 0009 GETMET R3 R3 K6
- 0x5C140000, // 000A MOVE R5 R0
- 0x7C0C0400, // 000B CALL R3 2
- 0x80000600, // 000C RET 0
- 0x500C0000, // 000D LDBOOL R3 0 0
- 0x90020E03, // 000E SETMBR R0 K7 R3
- 0x600C0012, // 000F GETGBL R3 G18
- 0x7C0C0000, // 0010 CALL R3 0
- 0x90021003, // 0011 SETMBR R0 K8 R3
- 0x500C0000, // 0012 LDBOOL R3 0 0
- 0x90021203, // 0013 SETMBR R0 K9 R3
- 0x600C0013, // 0014 GETGBL R3 G19
- 0x7C0C0000, // 0015 CALL R3 0
- 0x90021403, // 0016 SETMBR R0 K10 R3
- 0x8C0C010B, // 0017 GETMET R3 R0 K11
- 0x7C0C0200, // 0018 CALL R3 1
- 0x880C010D, // 0019 GETMBR R3 R0 K13
- 0x90021803, // 001A SETMBR R0 K12 R3
- 0x880C010F, // 001B GETMBR R3 R0 K15
- 0x90021C03, // 001C SETMBR R0 K14 R3
- 0x880C0111, // 001D GETMBR R3 R0 K17
- 0x90022003, // 001E SETMBR R0 K16 R3
- 0x8C0C0313, // 001F GETMET R3 R1 K19
- 0x5416000F, // 0020 LDINT R5 16
- 0x7C0C0400, // 0021 CALL R3 2
- 0x90022403, // 0022 SETMBR R0 K18 R3
- 0x500C0000, // 0023 LDBOOL R3 0 0
- 0x90022803, // 0024 SETMBR R0 K20 R3
- 0x8C0C0115, // 0025 GETMET R3 R0 K21
- 0x7C0C0200, // 0026 CALL R3 1
- 0xB80E0800, // 0027 GETNGBL R3 K4
- 0x8C0C0717, // 0028 GETMET R3 R3 K23
- 0x5C140000, // 0029 MOVE R5 R0
- 0x7C0C0400, // 002A CALL R3 2
- 0x90022C03, // 002B SETMBR R0 K22 R3
- 0x880C0116, // 002C GETMBR R3 R0 K22
- 0x8C0C0718, // 002D GETMET R3 R3 K24
- 0x7C0C0200, // 002E CALL R3 1
- 0xB80E0800, // 002F GETNGBL R3 K4
- 0x8C0C071A, // 0030 GETMET R3 R3 K26
- 0x5C140000, // 0031 MOVE R5 R0
- 0x7C0C0400, // 0032 CALL R3 2
- 0x90023203, // 0033 SETMBR R0 K25 R3
- 0xB80E0800, // 0034 GETNGBL R3 K4
- 0x8C0C0706, // 0035 GETMET R3 R3 K6
- 0x5C140000, // 0036 MOVE R5 R0
- 0x7C0C0400, // 0037 CALL R3 2
- 0x90023603, // 0038 SETMBR R0 K27 R3
- 0xB80E0400, // 0039 GETNGBL R3 K2
- 0x8C0C071C, // 003A GETMET R3 R3 K28
- 0x7C0C0200, // 003B CALL R3 1
- 0x940C071D, // 003C GETIDX R3 R3 K29
- 0x740E0004, // 003D JMPT R3 #0043
- 0xB80E0400, // 003E GETNGBL R3 K2
- 0x8C0C071E, // 003F GETMET R3 R3 K30
- 0x7C0C0200, // 0040 CALL R3 1
- 0x940C071D, // 0041 GETIDX R3 R3 K29
- 0x780E0001, // 0042 JMPF R3 #0045
- 0x8C0C011F, // 0043 GETMET R3 R0 K31
- 0x7C0C0200, // 0044 CALL R3 1
- 0xB80E0400, // 0045 GETNGBL R3 K2
- 0x8C0C071C, // 0046 GETMET R3 R3 K28
- 0x7C0C0200, // 0047 CALL R3 1
- 0x940C071D, // 0048 GETIDX R3 R3 K29
- 0x740E0005, // 0049 JMPT R3 #0050
- 0xB80E0400, // 004A GETNGBL R3 K2
- 0x8C0C0720, // 004B GETMET R3 R3 K32
- 0x58140021, // 004C LDCONST R5 K33
- 0x84180000, // 004D CLOSURE R6 P0
- 0x581C0022, // 004E LDCONST R7 K34
- 0x7C0C0800, // 004F CALL R3 4
- 0xB80E0400, // 0050 GETNGBL R3 K2
- 0x8C0C071E, // 0051 GETMET R3 R3 K30
- 0x7C0C0200, // 0052 CALL R3 1
- 0x940C071D, // 0053 GETIDX R3 R3 K29
- 0x740E0005, // 0054 JMPT R3 #005B
- 0xB80E0400, // 0055 GETNGBL R3 K2
- 0x8C0C0720, // 0056 GETMET R3 R3 K32
- 0x58140023, // 0057 LDCONST R5 K35
- 0x84180001, // 0058 CLOSURE R6 P1
- 0x581C0022, // 0059 LDCONST R7 K34
- 0x7C0C0800, // 005A CALL R3 4
- 0x8C0C0124, // 005B GETMET R3 R0 K36
- 0x7C0C0200, // 005C CALL R3 1
- 0xB80E0400, // 005D GETNGBL R3 K2
- 0x8C0C0725, // 005E GETMET R3 R3 K37
- 0x5C140000, // 005F MOVE R5 R0
- 0x7C0C0400, // 0060 CALL R3 2
- 0x8C0C0126, // 0061 GETMET R3 R0 K38
- 0x7C0C0200, // 0062 CALL R3 1
- 0xA0000000, // 0063 CLOSE R0
- 0x80000000, // 0064 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start
-********************************************************************/
-be_local_closure(Matter_Device_start, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(_trigger_read_sensors),
- }),
- be_str_weak(_anonymous_),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80000000, // 0003 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(started),
- /* K1 */ be_nested_str_weak(autoconf_device),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(add_cron),
- /* K4 */ be_nested_str_weak(_X2A_X2F30_X20_X2A_X20_X2A_X20_X2A_X20_X2A_X20_X2A),
- /* K5 */ be_nested_str_weak(matter_sensors_30s),
- /* K6 */ be_nested_str_weak(_start_udp),
- /* K7 */ be_nested_str_weak(UDP_PORT),
- /* K8 */ be_nested_str_weak(start_mdns_announce_hostnames),
- }),
- be_str_weak(start),
- &be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x78060000, // 0001 JMPF R1 #0003
- 0x80000200, // 0002 RET 0
- 0x8C040101, // 0003 GETMET R1 R0 K1
- 0x7C040200, // 0004 CALL R1 1
- 0xB8060400, // 0005 GETNGBL R1 K2
- 0x8C040303, // 0006 GETMET R1 R1 K3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x84100000, // 0008 CLOSURE R4 P0
- 0x58140005, // 0009 LDCONST R5 K5
- 0x7C040800, // 000A CALL R1 4
- 0x8C040106, // 000B GETMET R1 R0 K6
- 0x880C0107, // 000C GETMBR R3 R0 K7
- 0x7C040400, // 000D CALL R1 2
- 0x8C040108, // 000E GETMET R1 R0 K8
- 0x7C040200, // 000F CALL R1 1
- 0x50040200, // 0010 LDBOOL R1 1 0
- 0x90020001, // 0011 SETMBR R0 K0 R1
- 0xA0000000, // 0012 CLOSE R0
- 0x80000000, // 0013 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: load_param
-********************************************************************/
-be_local_closure(Matter_Device_load_param, /* name */
- be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(crypto),
- /* K2 */ be_nested_str_weak(FILENAME),
- /* K3 */ be_nested_str_weak(read),
- /* K4 */ be_nested_str_weak(close),
- /* K5 */ be_nested_str_weak(json),
- /* K6 */ be_nested_str_weak(load),
- /* K7 */ be_nested_str_weak(root_discriminator),
- /* K8 */ be_nested_str_weak(find),
- /* K9 */ be_nested_str_weak(distinguish),
- /* K10 */ be_nested_str_weak(root_passcode),
- /* K11 */ be_nested_str_weak(passcode),
- /* K12 */ be_nested_str_weak(ipv4only),
- /* K13 */ be_nested_str_weak(plugins_config),
- /* K14 */ be_nested_str_weak(config),
- /* K15 */ be_nested_str_weak(_load_plugins_config),
- /* K16 */ be_nested_str_weak(plugins_persist),
- /* K17 */ be_nested_str_weak(io_error),
- /* K18 */ be_nested_str_weak(tasmota),
- /* K19 */ be_nested_str_weak(log),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
- /* K21 */ be_nested_str_weak(_X7C),
- /* K22 */ be_const_int(2),
- /* K23 */ be_nested_str_weak(random),
- /* K24 */ be_nested_str_weak(get),
- /* K25 */ be_const_int(0),
- /* K26 */ be_nested_str_weak(generate_random_passcode),
- /* K27 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(load_param),
- &be_const_str_solidified,
- ( &(const binstruction[91]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA8020028, // 0002 EXBLK 0 #002C
- 0x600C0011, // 0003 GETGBL R3 G17
- 0x88100102, // 0004 GETMBR R4 R0 K2
- 0x7C0C0200, // 0005 CALL R3 1
- 0x8C100703, // 0006 GETMET R4 R3 K3
- 0x7C100200, // 0007 CALL R4 1
- 0x8C140704, // 0008 GETMET R5 R3 K4
- 0x7C140200, // 0009 CALL R5 1
- 0xA4160A00, // 000A IMPORT R5 K5
- 0x8C180B06, // 000B GETMET R6 R5 K6
- 0x5C200800, // 000C MOVE R8 R4
- 0x7C180400, // 000D CALL R6 2
- 0x8C1C0D08, // 000E GETMET R7 R6 K8
- 0x58240009, // 000F LDCONST R9 K9
- 0x88280107, // 0010 GETMBR R10 R0 K7
- 0x7C1C0600, // 0011 CALL R7 3
- 0x90020E07, // 0012 SETMBR R0 K7 R7
- 0x8C1C0D08, // 0013 GETMET R7 R6 K8
- 0x5824000B, // 0014 LDCONST R9 K11
- 0x8828010A, // 0015 GETMBR R10 R0 K10
- 0x7C1C0600, // 0016 CALL R7 3
- 0x90021407, // 0017 SETMBR R0 K10 R7
- 0x601C0017, // 0018 GETGBL R7 G23
- 0x8C200D08, // 0019 GETMET R8 R6 K8
- 0x5828000C, // 001A LDCONST R10 K12
- 0x502C0000, // 001B LDBOOL R11 0 0
- 0x7C200600, // 001C CALL R8 3
- 0x7C1C0200, // 001D CALL R7 1
- 0x90021807, // 001E SETMBR R0 K12 R7
- 0x8C1C0D08, // 001F GETMET R7 R6 K8
- 0x5824000E, // 0020 LDCONST R9 K14
- 0x7C1C0400, // 0021 CALL R7 2
- 0x90021A07, // 0022 SETMBR R0 K13 R7
- 0x881C010D, // 0023 GETMBR R7 R0 K13
- 0x781E0004, // 0024 JMPF R7 #002A
- 0x8C1C010F, // 0025 GETMET R7 R0 K15
- 0x8824010D, // 0026 GETMBR R9 R0 K13
- 0x7C1C0400, // 0027 CALL R7 2
- 0x501C0200, // 0028 LDBOOL R7 1 0
- 0x90022007, // 0029 SETMBR R0 K16 R7
- 0xA8040001, // 002A EXBLK 1 1
- 0x70020012, // 002B JMP #003F
- 0xAC0C0002, // 002C CATCH R3 0 2
- 0x7002000F, // 002D JMP #003E
- 0x20140711, // 002E NE R5 R3 K17
- 0x7816000C, // 002F JMPF R5 #003D
- 0xB8162400, // 0030 GETNGBL R5 K18
- 0x8C140B13, // 0031 GETMET R5 R5 K19
- 0x601C0008, // 0032 GETGBL R7 G8
- 0x5C200600, // 0033 MOVE R8 R3
- 0x7C1C0200, // 0034 CALL R7 1
- 0x001E2807, // 0035 ADD R7 K20 R7
- 0x001C0F15, // 0036 ADD R7 R7 K21
- 0x60200008, // 0037 GETGBL R8 G8
- 0x5C240800, // 0038 MOVE R9 R4
- 0x7C200200, // 0039 CALL R8 1
- 0x001C0E08, // 003A ADD R7 R7 R8
- 0x58200016, // 003B LDCONST R8 K22
- 0x7C140600, // 003C CALL R5 3
- 0x70020000, // 003D JMP #003F
- 0xB0080000, // 003E RAISE 2 R0 R0
- 0x500C0000, // 003F LDBOOL R3 0 0
- 0x88100107, // 0040 GETMBR R4 R0 K7
- 0x4C140000, // 0041 LDNIL R5
- 0x1C100805, // 0042 EQ R4 R4 R5
- 0x7812000A, // 0043 JMPF R4 #004F
- 0x8C100517, // 0044 GETMET R4 R2 K23
- 0x58180016, // 0045 LDCONST R6 K22
- 0x7C100400, // 0046 CALL R4 2
- 0x8C100918, // 0047 GETMET R4 R4 K24
- 0x58180019, // 0048 LDCONST R6 K25
- 0x581C0016, // 0049 LDCONST R7 K22
- 0x7C100600, // 004A CALL R4 3
- 0x54160FFE, // 004B LDINT R5 4095
- 0x2C100805, // 004C AND R4 R4 R5
- 0x90020E04, // 004D SETMBR R0 K7 R4
- 0x500C0200, // 004E LDBOOL R3 1 0
- 0x8810010A, // 004F GETMBR R4 R0 K10
- 0x4C140000, // 0050 LDNIL R5
- 0x1C100805, // 0051 EQ R4 R4 R5
- 0x78120003, // 0052 JMPF R4 #0057
- 0x8C10011A, // 0053 GETMET R4 R0 K26
- 0x7C100200, // 0054 CALL R4 1
- 0x90021404, // 0055 SETMBR R0 K10 R4
- 0x500C0200, // 0056 LDBOOL R3 1 0
- 0x780E0001, // 0057 JMPF R3 #005A
- 0x8C10011B, // 0058 GETMET R4 R0 K27
- 0x7C100200, // 0059 CALL R4 1
- 0x80000000, // 005A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: register_native_classes
-********************************************************************/
-be_local_closure(Matter_Device_register_native_classes, /* name */
- be_nested_proto(
- 9, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(register_plugin_class),
- /* K1 */ be_nested_str_weak(root),
- /* K2 */ be_nested_str_weak(matter),
- /* K3 */ be_nested_str_weak(Plugin_Root),
- /* K4 */ be_nested_str_weak(light0),
- /* K5 */ be_nested_str_weak(Plugin_Light0),
- /* K6 */ be_nested_str_weak(light1),
- /* K7 */ be_nested_str_weak(Plugin_Light1),
- /* K8 */ be_nested_str_weak(light2),
- /* K9 */ be_nested_str_weak(Plugin_Light2),
- /* K10 */ be_nested_str_weak(light3),
- /* K11 */ be_nested_str_weak(Plugin_Light3),
- /* K12 */ be_nested_str_weak(relay),
- /* K13 */ be_nested_str_weak(Plugin_OnOff),
- /* K14 */ be_nested_str_weak(temperature),
- /* K15 */ be_nested_str_weak(Plugin_Sensor_Temp),
- /* K16 */ be_nested_str_weak(humidity),
- /* K17 */ be_nested_str_weak(Plugin_Sensor_Humidity),
- /* K18 */ be_nested_str_weak(illuminance),
- /* K19 */ be_nested_str_weak(Plugin_Sensor_Illuminance),
- /* K20 */ be_nested_str_weak(pressure),
- /* K21 */ be_nested_str_weak(Plugin_Sensor_Pressure),
- /* K22 */ be_nested_str_weak(tasmota),
- /* K23 */ be_nested_str_weak(log),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20registered_X20classes_X20),
- /* K25 */ be_nested_str_weak(k2l),
- /* K26 */ be_nested_str_weak(plugins_classes),
- /* K27 */ be_const_int(3),
- }),
- be_str_weak(register_native_classes),
- &be_const_str_solidified,
- ( &(const binstruction[61]) { /* code */
- 0x8C0C0100, // 0000 GETMET R3 R0 K0
- 0x58140001, // 0001 LDCONST R5 K1
- 0xB81A0400, // 0002 GETNGBL R6 K2
- 0x88180D03, // 0003 GETMBR R6 R6 K3
- 0x7C0C0600, // 0004 CALL R3 3
- 0x8C0C0100, // 0005 GETMET R3 R0 K0
- 0x58140004, // 0006 LDCONST R5 K4
- 0xB81A0400, // 0007 GETNGBL R6 K2
- 0x88180D05, // 0008 GETMBR R6 R6 K5
- 0x7C0C0600, // 0009 CALL R3 3
- 0x8C0C0100, // 000A GETMET R3 R0 K0
- 0x58140006, // 000B LDCONST R5 K6
- 0xB81A0400, // 000C GETNGBL R6 K2
- 0x88180D07, // 000D GETMBR R6 R6 K7
- 0x7C0C0600, // 000E CALL R3 3
- 0x8C0C0100, // 000F GETMET R3 R0 K0
- 0x58140008, // 0010 LDCONST R5 K8
- 0xB81A0400, // 0011 GETNGBL R6 K2
- 0x88180D09, // 0012 GETMBR R6 R6 K9
- 0x7C0C0600, // 0013 CALL R3 3
- 0x8C0C0100, // 0014 GETMET R3 R0 K0
- 0x5814000A, // 0015 LDCONST R5 K10
- 0xB81A0400, // 0016 GETNGBL R6 K2
- 0x88180D0B, // 0017 GETMBR R6 R6 K11
- 0x7C0C0600, // 0018 CALL R3 3
- 0x8C0C0100, // 0019 GETMET R3 R0 K0
- 0x5814000C, // 001A LDCONST R5 K12
- 0xB81A0400, // 001B GETNGBL R6 K2
- 0x88180D0D, // 001C GETMBR R6 R6 K13
- 0x7C0C0600, // 001D CALL R3 3
- 0x8C0C0100, // 001E GETMET R3 R0 K0
- 0x5814000E, // 001F LDCONST R5 K14
- 0xB81A0400, // 0020 GETNGBL R6 K2
- 0x88180D0F, // 0021 GETMBR R6 R6 K15
- 0x7C0C0600, // 0022 CALL R3 3
- 0x8C0C0100, // 0023 GETMET R3 R0 K0
- 0x58140010, // 0024 LDCONST R5 K16
- 0xB81A0400, // 0025 GETNGBL R6 K2
- 0x88180D11, // 0026 GETMBR R6 R6 K17
- 0x7C0C0600, // 0027 CALL R3 3
- 0x8C0C0100, // 0028 GETMET R3 R0 K0
- 0x58140012, // 0029 LDCONST R5 K18
- 0xB81A0400, // 002A GETNGBL R6 K2
- 0x88180D13, // 002B GETMBR R6 R6 K19
- 0x7C0C0600, // 002C CALL R3 3
- 0x8C0C0100, // 002D GETMET R3 R0 K0
- 0x58140014, // 002E LDCONST R5 K20
- 0xB81A0400, // 002F GETNGBL R6 K2
- 0x88180D15, // 0030 GETMBR R6 R6 K21
- 0x7C0C0600, // 0031 CALL R3 3
- 0xB80E2C00, // 0032 GETNGBL R3 K22
- 0x8C0C0717, // 0033 GETMET R3 R3 K23
- 0x60140008, // 0034 GETGBL R5 G8
- 0x8C180119, // 0035 GETMET R6 R0 K25
- 0x8820011A, // 0036 GETMBR R8 R0 K26
- 0x7C180400, // 0037 CALL R6 2
- 0x7C140200, // 0038 CALL R5 1
- 0x00163005, // 0039 ADD R5 K24 R5
- 0x5818001B, // 003A LDCONST R6 K27
- 0x7C0C0600, // 003B CALL R3 3
- 0x80000000, // 003C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _mdns_announce_hostname
-********************************************************************/
-be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
- be_nested_proto(
- 16, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(start),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(eth),
- /* K5 */ be_nested_str_weak(hostname_eth),
- /* K6 */ be_nested_str_weak(replace),
- /* K7 */ be_nested_str_weak(find),
- /* K8 */ be_nested_str_weak(mac),
- /* K9 */ be_nested_str_weak(_X3A),
- /* K10 */ be_nested_str_weak(),
- /* K11 */ be_nested_str_weak(ipv4only),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K15 */ be_nested_str_weak(ip6local),
- /* K16 */ be_nested_str_weak(ip),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(add_hostname),
- /* K19 */ be_nested_str_weak(ip6),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
- /* K21 */ be_nested_str_weak(wifi),
- /* K22 */ be_nested_str_weak(hostname_wifi),
- /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
- /* K24 */ be_const_int(2),
- /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K26 */ be_nested_str_weak(_X7C),
- /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
- }),
- be_str_weak(_mdns_announce_hostname),
- &be_const_str_solidified,
- ( &(const binstruction[172]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100502, // 0002 GETMET R4 R2 K2
- 0x7C100200, // 0003 CALL R4 1
- 0xA8020092, // 0004 EXBLK 0 #0098
- 0x78060040, // 0005 JMPF R1 #0047
- 0xB8120600, // 0006 GETNGBL R4 K3
- 0x8C100904, // 0007 GETMET R4 R4 K4
- 0x7C100200, // 0008 CALL R4 1
- 0x8C140706, // 0009 GETMET R5 R3 K6
- 0x8C1C0907, // 000A GETMET R7 R4 K7
- 0x58240008, // 000B LDCONST R9 K8
- 0x7C1C0400, // 000C CALL R7 2
- 0x58200009, // 000D LDCONST R8 K9
- 0x5824000A, // 000E LDCONST R9 K10
- 0x7C140800, // 000F CALL R5 4
- 0x90020A05, // 0010 SETMBR R0 K5 R5
- 0x8814010B, // 0011 GETMBR R5 R0 K11
- 0x7416001F, // 0012 JMPT R5 #0033
- 0xB8160600, // 0013 GETNGBL R5 K3
- 0x8C140B0C, // 0014 GETMET R5 R5 K12
- 0x8C1C070D, // 0015 GETMET R7 R3 K13
- 0x5824000E, // 0016 LDCONST R9 K14
- 0x88280105, // 0017 GETMBR R10 R0 K5
- 0x8C2C0907, // 0018 GETMET R11 R4 K7
- 0x5834000F, // 0019 LDCONST R13 K15
- 0x5838000A, // 001A LDCONST R14 K10
- 0x7C2C0600, // 001B CALL R11 3
- 0x8C300907, // 001C GETMET R12 R4 K7
- 0x58380010, // 001D LDCONST R14 K16
- 0x583C000A, // 001E LDCONST R15 K10
- 0x7C300600, // 001F CALL R12 3
- 0x7C1C0A00, // 0020 CALL R7 5
- 0x58200011, // 0021 LDCONST R8 K17
- 0x7C140600, // 0022 CALL R5 3
- 0x8C140512, // 0023 GETMET R5 R2 K18
- 0x881C0105, // 0024 GETMBR R7 R0 K5
- 0x8C200907, // 0025 GETMET R8 R4 K7
- 0x5828000F, // 0026 LDCONST R10 K15
- 0x582C000A, // 0027 LDCONST R11 K10
- 0x7C200600, // 0028 CALL R8 3
- 0x8C240907, // 0029 GETMET R9 R4 K7
- 0x582C0010, // 002A LDCONST R11 K16
- 0x5830000A, // 002B LDCONST R12 K10
- 0x7C240600, // 002C CALL R9 3
- 0x8C280907, // 002D GETMET R10 R4 K7
- 0x58300013, // 002E LDCONST R12 K19
- 0x5834000A, // 002F LDCONST R13 K10
- 0x7C280600, // 0030 CALL R10 3
- 0x7C140A00, // 0031 CALL R5 5
- 0x70020012, // 0032 JMP #0046
- 0xB8160600, // 0033 GETNGBL R5 K3
- 0x8C140B0C, // 0034 GETMET R5 R5 K12
- 0x8C1C070D, // 0035 GETMET R7 R3 K13
- 0x58240014, // 0036 LDCONST R9 K20
- 0x88280105, // 0037 GETMBR R10 R0 K5
- 0x8C2C0907, // 0038 GETMET R11 R4 K7
- 0x58340010, // 0039 LDCONST R13 K16
- 0x5838000A, // 003A LDCONST R14 K10
- 0x7C2C0600, // 003B CALL R11 3
- 0x7C1C0800, // 003C CALL R7 4
- 0x58200011, // 003D LDCONST R8 K17
- 0x7C140600, // 003E CALL R5 3
- 0x8C140512, // 003F GETMET R5 R2 K18
- 0x881C0105, // 0040 GETMBR R7 R0 K5
- 0x8C200907, // 0041 GETMET R8 R4 K7
- 0x58280010, // 0042 LDCONST R10 K16
- 0x582C000A, // 0043 LDCONST R11 K10
- 0x7C200600, // 0044 CALL R8 3
- 0x7C140600, // 0045 CALL R5 3
- 0x7002003F, // 0046 JMP #0087
- 0xB8120600, // 0047 GETNGBL R4 K3
- 0x8C100915, // 0048 GETMET R4 R4 K21
- 0x7C100200, // 0049 CALL R4 1
- 0x8C140706, // 004A GETMET R5 R3 K6
- 0x8C1C0907, // 004B GETMET R7 R4 K7
- 0x58240008, // 004C LDCONST R9 K8
- 0x7C1C0400, // 004D CALL R7 2
- 0x58200009, // 004E LDCONST R8 K9
- 0x5824000A, // 004F LDCONST R9 K10
- 0x7C140800, // 0050 CALL R5 4
- 0x90022C05, // 0051 SETMBR R0 K22 R5
- 0x8814010B, // 0052 GETMBR R5 R0 K11
- 0x7416001F, // 0053 JMPT R5 #0074
- 0xB8160600, // 0054 GETNGBL R5 K3
- 0x8C140B0C, // 0055 GETMET R5 R5 K12
- 0x8C1C070D, // 0056 GETMET R7 R3 K13
- 0x5824000E, // 0057 LDCONST R9 K14
- 0x88280116, // 0058 GETMBR R10 R0 K22
- 0x8C2C0907, // 0059 GETMET R11 R4 K7
- 0x5834000F, // 005A LDCONST R13 K15
- 0x5838000A, // 005B LDCONST R14 K10
- 0x7C2C0600, // 005C CALL R11 3
- 0x8C300907, // 005D GETMET R12 R4 K7
- 0x58380010, // 005E LDCONST R14 K16
- 0x583C000A, // 005F LDCONST R15 K10
- 0x7C300600, // 0060 CALL R12 3
- 0x7C1C0A00, // 0061 CALL R7 5
- 0x58200011, // 0062 LDCONST R8 K17
- 0x7C140600, // 0063 CALL R5 3
- 0x8C140512, // 0064 GETMET R5 R2 K18
- 0x881C0116, // 0065 GETMBR R7 R0 K22
- 0x8C200907, // 0066 GETMET R8 R4 K7
- 0x5828000F, // 0067 LDCONST R10 K15
- 0x582C000A, // 0068 LDCONST R11 K10
- 0x7C200600, // 0069 CALL R8 3
- 0x8C240907, // 006A GETMET R9 R4 K7
- 0x582C0010, // 006B LDCONST R11 K16
- 0x5830000A, // 006C LDCONST R12 K10
- 0x7C240600, // 006D CALL R9 3
- 0x8C280907, // 006E GETMET R10 R4 K7
- 0x58300013, // 006F LDCONST R12 K19
- 0x5834000A, // 0070 LDCONST R13 K10
- 0x7C280600, // 0071 CALL R10 3
- 0x7C140A00, // 0072 CALL R5 5
- 0x70020012, // 0073 JMP #0087
- 0xB8160600, // 0074 GETNGBL R5 K3
- 0x8C140B0C, // 0075 GETMET R5 R5 K12
- 0x8C1C070D, // 0076 GETMET R7 R3 K13
- 0x58240014, // 0077 LDCONST R9 K20
- 0x88280105, // 0078 GETMBR R10 R0 K5
- 0x8C2C0907, // 0079 GETMET R11 R4 K7
- 0x58340010, // 007A LDCONST R13 K16
- 0x5838000A, // 007B LDCONST R14 K10
- 0x7C2C0600, // 007C CALL R11 3
- 0x7C1C0800, // 007D CALL R7 4
- 0x58200011, // 007E LDCONST R8 K17
- 0x7C140600, // 007F CALL R5 3
- 0x8C140512, // 0080 GETMET R5 R2 K18
- 0x881C0116, // 0081 GETMBR R7 R0 K22
- 0x8C200907, // 0082 GETMET R8 R4 K7
- 0x58280010, // 0083 LDCONST R10 K16
- 0x582C000A, // 0084 LDCONST R11 K10
- 0x7C200600, // 0085 CALL R8 3
- 0x7C140600, // 0086 CALL R5 3
- 0xB8120600, // 0087 GETNGBL R4 K3
- 0x8C10090C, // 0088 GETMET R4 R4 K12
- 0x8C18070D, // 0089 GETMET R6 R3 K13
- 0x58200017, // 008A LDCONST R8 K23
- 0x78060001, // 008B JMPF R1 #008E
- 0x58240004, // 008C LDCONST R9 K4
- 0x70020000, // 008D JMP #008F
- 0x58240015, // 008E LDCONST R9 K21
- 0x78060001, // 008F JMPF R1 #0092
- 0x88280105, // 0090 GETMBR R10 R0 K5
- 0x70020000, // 0091 JMP #0093
- 0x88280116, // 0092 GETMBR R10 R0 K22
- 0x7C180800, // 0093 CALL R6 4
- 0x581C0018, // 0094 LDCONST R7 K24
- 0x7C100600, // 0095 CALL R4 3
- 0xA8040001, // 0096 EXBLK 1 1
- 0x70020010, // 0097 JMP #00A9
- 0xAC100002, // 0098 CATCH R4 0 2
- 0x7002000D, // 0099 JMP #00A8
- 0xB81A0600, // 009A GETNGBL R6 K3
- 0x8C180D0C, // 009B GETMET R6 R6 K12
- 0x60200008, // 009C GETGBL R8 G8
- 0x5C240800, // 009D MOVE R9 R4
- 0x7C200200, // 009E CALL R8 1
- 0x00223208, // 009F ADD R8 K25 R8
- 0x0020111A, // 00A0 ADD R8 R8 K26
- 0x60240008, // 00A1 GETGBL R9 G8
- 0x5C280A00, // 00A2 MOVE R10 R5
- 0x7C240200, // 00A3 CALL R9 1
- 0x00201009, // 00A4 ADD R8 R8 R9
- 0x58240018, // 00A5 LDCONST R9 K24
- 0x7C180600, // 00A6 CALL R6 3
- 0x70020000, // 00A7 JMP #00A9
- 0xB0080000, // 00A8 RAISE 2 R0 R0
- 0x8C10011B, // 00A9 GETMET R4 R0 K27
- 0x7C100200, // 00AA CALL R4 1
- 0x80000000, // 00AB RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(mdns_remove_op_discovery_all_fabrics),
- &be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: event_fabrics_saved
-********************************************************************/
-be_local_closure(Matter_Device_event_fabrics_saved, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(plugins_persist),
- /* K4 */ be_nested_str_weak(save_param),
- }),
- be_str_weak(event_fabrics_saved),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x24040302, // 0003 GT R1 R1 K2
- 0x78060005, // 0004 JMPF R1 #000B
- 0x88040103, // 0005 GETMBR R1 R0 K3
- 0x74060003, // 0006 JMPT R1 #000B
- 0x50040200, // 0007 LDBOOL R1 1 0
- 0x90020601, // 0008 SETMBR R0 K3 R1
- 0x8C040104, // 0009 GETMET R1 R0 K4
- 0x7C040200, // 000A CALL R1 1
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: stop
-********************************************************************/
-be_local_closure(Matter_Device_stop, /* name */
+be_local_closure(Matter_Device_every_second, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
@@ -2064,25 +1546,50 @@ be_local_closure(Matter_Device_stop, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(remove_driver),
- /* K2 */ be_nested_str_weak(udp_server),
- /* K3 */ be_nested_str_weak(stop),
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(every_second),
+ /* K2 */ be_nested_str_weak(message_handler),
+ /* K3 */ be_nested_str_weak(commissioning_open),
+ /* K4 */ be_nested_str_weak(tasmota),
+ /* K5 */ be_nested_str_weak(time_reached),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(plugins),
+ /* K8 */ be_const_int(1),
}),
- be_str_weak(stop),
+ be_str_weak(every_second),
&be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
+ ( &(const binstruction[30]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
- 0x5C0C0000, // 0002 MOVE R3 R0
- 0x7C040400, // 0003 CALL R1 2
- 0x88040102, // 0004 GETMBR R1 R0 K2
- 0x78060002, // 0005 JMPF R1 #0009
- 0x88040102, // 0006 GETMBR R1 R0 K2
- 0x8C040303, // 0007 GETMET R1 R1 K3
- 0x7C040200, // 0008 CALL R1 1
- 0x80000000, // 0009 RET 0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x88040102, // 0003 GETMBR R1 R0 K2
+ 0x8C040301, // 0004 GETMET R1 R1 K1
+ 0x7C040200, // 0005 CALL R1 1
+ 0x88040103, // 0006 GETMBR R1 R0 K3
+ 0x4C080000, // 0007 LDNIL R2
+ 0x20040202, // 0008 NE R1 R1 R2
+ 0x78060006, // 0009 JMPF R1 #0011
+ 0xB8060800, // 000A GETNGBL R1 K4
+ 0x8C040305, // 000B GETMET R1 R1 K5
+ 0x880C0103, // 000C GETMBR R3 R0 K3
+ 0x7C040400, // 000D CALL R1 2
+ 0x78060001, // 000E JMPF R1 #0011
+ 0x4C040000, // 000F LDNIL R1
+ 0x90020601, // 0010 SETMBR R0 K3 R1
+ 0x58040006, // 0011 LDCONST R1 K6
+ 0x6008000C, // 0012 GETGBL R2 G12
+ 0x880C0107, // 0013 GETMBR R3 R0 K7
+ 0x7C080200, // 0014 CALL R2 1
+ 0x14080202, // 0015 LT R2 R1 R2
+ 0x780A0005, // 0016 JMPF R2 #001D
+ 0x88080107, // 0017 GETMBR R2 R0 K7
+ 0x94080401, // 0018 GETIDX R2 R2 R1
+ 0x8C080501, // 0019 GETMET R2 R2 K1
+ 0x7C080200, // 001A CALL R2 1
+ 0x00040308, // 001B ADD R1 R1 K8
+ 0x7001FFF4, // 001C JMP #0012
+ 0x80000000, // 001D RET 0
})
)
);
@@ -2090,214 +1597,9 @@ be_local_closure(Matter_Device_stop, /* name */
/********************************************************************
-** Solidified function: stop_basic_commissioning
+** Solidified function: get_plugin_class_arg
********************************************************************/
-be_local_closure(Matter_Device_stop_basic_commissioning, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(is_root_commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(publish_result),
- /* K3 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A0_X7D_X7D),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(commissioning_open),
- /* K6 */ be_nested_str_weak(mdns_remove_PASE),
- /* K7 */ be_nested_str_weak(commissioning_iterations),
- /* K8 */ be_nested_str_weak(commissioning_discriminator),
- /* K9 */ be_nested_str_weak(commissioning_salt),
- /* K10 */ be_nested_str_weak(commissioning_w0),
- /* K11 */ be_nested_str_weak(commissioning_L),
- /* K12 */ be_nested_str_weak(commissioning_admin_fabric),
- }),
- be_str_weak(stop_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[25]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x78060004, // 0002 JMPF R1 #0008
- 0xB8060200, // 0003 GETNGBL R1 K1
- 0x8C040302, // 0004 GETMET R1 R1 K2
- 0x580C0003, // 0005 LDCONST R3 K3
- 0x58100004, // 0006 LDCONST R4 K4
- 0x7C040600, // 0007 CALL R1 3
- 0x4C040000, // 0008 LDNIL R1
- 0x90020A01, // 0009 SETMBR R0 K5 R1
- 0x8C040106, // 000A GETMET R1 R0 K6
- 0x7C040200, // 000B CALL R1 1
- 0x4C040000, // 000C LDNIL R1
- 0x90020E01, // 000D SETMBR R0 K7 R1
- 0x4C040000, // 000E LDNIL R1
- 0x90021001, // 000F SETMBR R0 K8 R1
- 0x4C040000, // 0010 LDNIL R1
- 0x90021201, // 0011 SETMBR R0 K9 R1
- 0x4C040000, // 0012 LDNIL R1
- 0x90021401, // 0013 SETMBR R0 K10 R1
- 0x4C040000, // 0014 LDNIL R1
- 0x90021601, // 0015 SETMBR R0 K11 R1
- 0x4C040000, // 0016 LDNIL R1
- 0x90021801, // 0017 SETMBR R0 K12 R1
- 0x80000000, // 0018 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: start_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device_start_basic_commissioning, /* name */
- be_nested_proto(
- 13, /* nstack */
- 8, /* argc */
- 2, /* 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Wifi_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 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[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns_announce_PASE),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(remove_rule),
- /* K3 */ be_nested_str_weak(Eth_X23Connected),
- }),
- 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
- 0x580C0000, // 0006 LDCONST R3 K0
- 0x7C000600, // 0007 CALL R0 3
- 0x80000000, // 0008 RET 0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[16]) { /* constants */
- /* K0 */ be_nested_str_weak(commissioning_open),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(millis),
- /* K3 */ be_nested_str_weak(commissioning_iterations),
- /* K4 */ be_nested_str_weak(commissioning_discriminator),
- /* K5 */ be_nested_str_weak(commissioning_salt),
- /* K6 */ be_nested_str_weak(commissioning_w0),
- /* K7 */ be_nested_str_weak(commissioning_L),
- /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
- /* K9 */ be_nested_str_weak(wifi),
- /* K10 */ be_nested_str_weak(up),
- /* K11 */ be_nested_str_weak(eth),
- /* K12 */ be_nested_str_weak(mdns_announce_PASE),
- /* K13 */ be_nested_str_weak(add_rule),
- /* K14 */ be_nested_str_weak(Wifi_X23Connected),
- /* K15 */ be_nested_str_weak(Eth_X23Connected),
- }),
- be_str_weak(start_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[40]) { /* code */
- 0xB8220200, // 0000 GETNGBL R8 K1
- 0x8C201102, // 0001 GETMET R8 R8 K2
- 0x7C200200, // 0002 CALL R8 1
- 0x542603E7, // 0003 LDINT R9 1000
- 0x08240209, // 0004 MUL R9 R1 R9
- 0x00201009, // 0005 ADD R8 R8 R9
- 0x90020008, // 0006 SETMBR R0 K0 R8
- 0x90020602, // 0007 SETMBR R0 K3 R2
- 0x90020803, // 0008 SETMBR R0 K4 R3
- 0x90020A04, // 0009 SETMBR R0 K5 R4
- 0x90020C05, // 000A SETMBR R0 K6 R5
- 0x90020E06, // 000B SETMBR R0 K7 R6
- 0x90021007, // 000C SETMBR R0 K8 R7
- 0xB8220200, // 000D GETNGBL R8 K1
- 0x8C201109, // 000E GETMET R8 R8 K9
- 0x7C200200, // 000F CALL R8 1
- 0x9420110A, // 0010 GETIDX R8 R8 K10
- 0x74220004, // 0011 JMPT R8 #0017
- 0xB8220200, // 0012 GETNGBL R8 K1
- 0x8C20110B, // 0013 GETMET R8 R8 K11
- 0x7C200200, // 0014 CALL R8 1
- 0x9420110A, // 0015 GETIDX R8 R8 K10
- 0x78220002, // 0016 JMPF R8 #001A
- 0x8C20010C, // 0017 GETMET R8 R0 K12
- 0x7C200200, // 0018 CALL R8 1
- 0x7002000B, // 0019 JMP #0026
- 0xB8220200, // 001A GETNGBL R8 K1
- 0x8C20110D, // 001B GETMET R8 R8 K13
- 0x5828000E, // 001C LDCONST R10 K14
- 0x842C0000, // 001D CLOSURE R11 P0
- 0x5830000C, // 001E LDCONST R12 K12
- 0x7C200800, // 001F CALL R8 4
- 0xB8220200, // 0020 GETNGBL R8 K1
- 0x8C20110D, // 0021 GETMET R8 R8 K13
- 0x5828000F, // 0022 LDCONST R10 K15
- 0x842C0001, // 0023 CLOSURE R11 P1
- 0x5830000C, // 0024 LDCONST R12 K12
- 0x7C200800, // 0025 CALL R8 4
- 0xA0000000, // 0026 CLOSE R0
- 0x80000000, // 0027 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: msg_send
-********************************************************************/
-be_local_closure(Matter_Device_msg_send, /* name */
+be_local_closure(Matter_Device_get_plugin_class_arg, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
@@ -2307,78 +1609,24 @@ be_local_closure(Matter_Device_msg_send, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(send_UDP),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins_classes),
+ /* K1 */ be_nested_str_weak(find),
+ /* K2 */ be_nested_str_weak(ARG),
+ /* K3 */ be_nested_str_weak(),
}),
- be_str_weak(msg_send),
+ be_str_weak(get_plugin_class_arg),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
+ ( &(const binstruction[ 9]) { /* 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: start_commissioning_complete_deferred
-********************************************************************/
-be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 3, /* nstack */
- 0, /* argc */
- 0, /* varg */
- 1, /* has upvals */
- ( &(const bupvaldesc[ 2]) { /* upvals */
- be_local_const_upval(1, 0),
- be_local_const_upval(1, 1),
- }),
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(start_commissioning_complete),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x68080001, // 0002 GETUPV R2 U1
- 0x7C000400, // 0003 CALL R0 2
- 0x80040000, // 0004 RET 1 R0
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_timer),
- /* K2 */ be_const_int(0),
- }),
- be_str_weak(start_commissioning_complete_deferred),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x7C080600, // 0004 CALL R2 3
- 0xA0000000, // 0005 CLOSE R0
- 0x80000000, // 0006 RET 0
+ 0x780A0001, // 0004 JMPF R2 #0007
+ 0x880C0502, // 0005 GETMBR R3 R2 K2
+ 0x70020000, // 0006 JMP #0008
+ 0x580C0003, // 0007 LDCONST R3 K3
+ 0x80040600, // 0008 RET 1 R3
})
)
);
@@ -2422,1379 +1670,6 @@ be_local_closure(Matter_Device_is_root_commissioning_open, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: _load_plugins_config
-********************************************************************/
-be_local_closure(Matter_Device__load_plugins_config, /* name */
- be_nested_proto(
- 19, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[27]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(k2l_num),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(log),
- /* K4 */ be_nested_str_weak(MTR_X3A_X20endpoints_X20to_X20be_X20configured_X20),
- /* K5 */ be_const_int(3),
- /* K6 */ be_nested_str_weak(format),
- /* K7 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25i_X20config_X20_X25s),
- /* K8 */ be_nested_str_weak(find),
- /* K9 */ be_nested_str_weak(type),
- /* K10 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping),
- /* K11 */ be_nested_str_weak(plugins_classes),
- /* K12 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27),
- /* K13 */ be_nested_str_weak(_X27_X20skipping),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(plugins),
- /* K16 */ be_nested_str_weak(push),
- /* K17 */ be_nested_str_weak(),
- /* K18 */ be_nested_str_weak(k2l),
- /* K19 */ be_nested_str_weak(_X20_X25s_X3A_X25s),
- /* K20 */ be_nested_str_weak(stop_iteration),
- /* K21 */ be_nested_str_weak(MTR_X3A_X20endpoint_X3A_X25i_X20type_X3A_X25s_X25s),
- /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K23 */ be_nested_str_weak(_X7C),
- /* K24 */ be_nested_str_weak(publish_result),
- /* K25 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D),
- /* K26 */ be_nested_str_weak(Matter),
- }),
- be_str_weak(_load_plugins_config),
- &be_const_str_solidified,
- ( &(const binstruction[133]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0x8C0C0101, // 0001 GETMET R3 R0 K1
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0xB8120400, // 0004 GETNGBL R4 K2
- 0x8C100903, // 0005 GETMET R4 R4 K3
- 0x60180008, // 0006 GETGBL R6 G8
- 0x5C1C0600, // 0007 MOVE R7 R3
- 0x7C180200, // 0008 CALL R6 1
- 0x001A0806, // 0009 ADD R6 K4 R6
- 0x581C0005, // 000A LDCONST R7 K5
- 0x7C100600, // 000B CALL R4 3
- 0x60100010, // 000C GETGBL R4 G16
- 0x5C140600, // 000D MOVE R5 R3
- 0x7C100200, // 000E CALL R4 1
- 0xA802006B, // 000F EXBLK 0 #007C
- 0x5C140800, // 0010 MOVE R5 R4
- 0x7C140000, // 0011 CALL R5 0
- 0xA8020056, // 0012 EXBLK 0 #006A
- 0x60180008, // 0013 GETGBL R6 G8
- 0x5C1C0A00, // 0014 MOVE R7 R5
- 0x7C180200, // 0015 CALL R6 1
- 0x94180206, // 0016 GETIDX R6 R1 R6
- 0xB81E0400, // 0017 GETNGBL R7 K2
- 0x8C1C0F03, // 0018 GETMET R7 R7 K3
- 0x8C240506, // 0019 GETMET R9 R2 K6
- 0x582C0007, // 001A LDCONST R11 K7
- 0x5C300A00, // 001B MOVE R12 R5
- 0x5C340C00, // 001C MOVE R13 R6
- 0x7C240800, // 001D CALL R9 4
- 0x58280005, // 001E LDCONST R10 K5
- 0x7C1C0600, // 001F CALL R7 3
- 0x8C1C0D08, // 0020 GETMET R7 R6 K8
- 0x58240009, // 0021 LDCONST R9 K9
- 0x7C1C0400, // 0022 CALL R7 2
- 0x4C200000, // 0023 LDNIL R8
- 0x1C200E08, // 0024 EQ R8 R7 R8
- 0x78220006, // 0025 JMPF R8 #002D
- 0xB8220400, // 0026 GETNGBL R8 K2
- 0x8C201103, // 0027 GETMET R8 R8 K3
- 0x5828000A, // 0028 LDCONST R10 K10
- 0x582C0005, // 0029 LDCONST R11 K5
- 0x7C200600, // 002A CALL R8 3
- 0xA8040001, // 002B EXBLK 1 1
- 0x7001FFE2, // 002C JMP #0010
- 0x8820010B, // 002D GETMBR R8 R0 K11
- 0x8C201108, // 002E GETMET R8 R8 K8
- 0x5C280E00, // 002F MOVE R10 R7
- 0x7C200400, // 0030 CALL R8 2
- 0x4C240000, // 0031 LDNIL R9
- 0x1C241009, // 0032 EQ R9 R8 R9
- 0x7826000A, // 0033 JMPF R9 #003F
- 0xB8260400, // 0034 GETNGBL R9 K2
- 0x8C241303, // 0035 GETMET R9 R9 K3
- 0x602C0008, // 0036 GETGBL R11 G8
- 0x5C300E00, // 0037 MOVE R12 R7
- 0x7C2C0200, // 0038 CALL R11 1
- 0x002E180B, // 0039 ADD R11 K12 R11
- 0x002C170D, // 003A ADD R11 R11 K13
- 0x5830000E, // 003B LDCONST R12 K14
- 0x7C240600, // 003C CALL R9 3
- 0xA8040001, // 003D EXBLK 1 1
- 0x7001FFD0, // 003E JMP #0010
- 0x5C241000, // 003F MOVE R9 R8
- 0x5C280000, // 0040 MOVE R10 R0
- 0x5C2C0A00, // 0041 MOVE R11 R5
- 0x5C300C00, // 0042 MOVE R12 R6
- 0x7C240600, // 0043 CALL R9 3
- 0x8828010F, // 0044 GETMBR R10 R0 K15
- 0x8C281510, // 0045 GETMET R10 R10 K16
- 0x5C301200, // 0046 MOVE R12 R9
- 0x7C280400, // 0047 CALL R10 2
- 0x58280011, // 0048 LDCONST R10 K17
- 0x602C0010, // 0049 GETGBL R11 G16
- 0x8C300112, // 004A GETMET R12 R0 K18
- 0x5C380C00, // 004B MOVE R14 R6
- 0x7C300400, // 004C CALL R12 2
- 0x7C2C0200, // 004D CALL R11 1
- 0xA802000B, // 004E EXBLK 0 #005B
- 0x5C301600, // 004F MOVE R12 R11
- 0x7C300000, // 0050 CALL R12 0
- 0x1C341909, // 0051 EQ R13 R12 K9
- 0x78360000, // 0052 JMPF R13 #0054
- 0x7001FFFA, // 0053 JMP #004F
- 0x8C340506, // 0054 GETMET R13 R2 K6
- 0x583C0013, // 0055 LDCONST R15 K19
- 0x5C401800, // 0056 MOVE R16 R12
- 0x94440C0C, // 0057 GETIDX R17 R6 R12
- 0x7C340800, // 0058 CALL R13 4
- 0x0028140D, // 0059 ADD R10 R10 R13
- 0x7001FFF3, // 005A JMP #004F
- 0x582C0014, // 005B LDCONST R11 K20
- 0xAC2C0200, // 005C CATCH R11 1 0
- 0xB0080000, // 005D RAISE 2 R0 R0
- 0xB82E0400, // 005E GETNGBL R11 K2
- 0x8C2C1703, // 005F GETMET R11 R11 K3
- 0x8C340506, // 0060 GETMET R13 R2 K6
- 0x583C0015, // 0061 LDCONST R15 K21
- 0x5C400A00, // 0062 MOVE R16 R5
- 0x5C440E00, // 0063 MOVE R17 R7
- 0x5C481400, // 0064 MOVE R18 R10
- 0x7C340A00, // 0065 CALL R13 5
- 0x5838000E, // 0066 LDCONST R14 K14
- 0x7C2C0600, // 0067 CALL R11 3
- 0xA8040001, // 0068 EXBLK 1 1
- 0x70020010, // 0069 JMP #007B
- 0xAC180002, // 006A CATCH R6 0 2
- 0x7002000D, // 006B JMP #007A
- 0xB8220400, // 006C GETNGBL R8 K2
- 0x8C201103, // 006D GETMET R8 R8 K3
- 0x60280008, // 006E GETGBL R10 G8
- 0x5C2C0C00, // 006F MOVE R11 R6
- 0x7C280200, // 0070 CALL R10 1
- 0x002A2C0A, // 0071 ADD R10 K22 R10
- 0x00281517, // 0072 ADD R10 R10 K23
- 0x602C0008, // 0073 GETGBL R11 G8
- 0x5C300E00, // 0074 MOVE R12 R7
- 0x7C2C0200, // 0075 CALL R11 1
- 0x0028140B, // 0076 ADD R10 R10 R11
- 0x582C000E, // 0077 LDCONST R11 K14
- 0x7C200600, // 0078 CALL R8 3
- 0x70020000, // 0079 JMP #007B
- 0xB0080000, // 007A RAISE 2 R0 R0
- 0x7001FF93, // 007B JMP #0010
- 0x58100014, // 007C LDCONST R4 K20
- 0xAC100200, // 007D CATCH R4 1 0
- 0xB0080000, // 007E RAISE 2 R0 R0
- 0xB8120400, // 007F GETNGBL R4 K2
- 0x8C100918, // 0080 GETMET R4 R4 K24
- 0x58180019, // 0081 LDCONST R6 K25
- 0x581C001A, // 0082 LDCONST R7 K26
- 0x7C100600, // 0083 CALL R4 3
- 0x80000000, // 0084 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: received_ack
-********************************************************************/
-be_local_closure(Matter_Device_received_ack, /* name */
- be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(received_ack),
- }),
- be_str_weak(received_ack),
- &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: MtrJoin
-********************************************************************/
-be_local_closure(Matter_Device_MtrJoin, /* name */
- be_nested_proto(
- 8, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
- /* K1 */ be_nested_str_weak(stop_basic_commissioning),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(resp_cmnd_done),
- }),
- be_str_weak(MtrJoin),
- &be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
- 0x60140009, // 0000 GETGBL R5 G9
- 0x5C180600, // 0001 MOVE R6 R3
- 0x7C140200, // 0002 CALL R5 1
- 0x78160002, // 0003 JMPF R5 #0007
- 0x8C180100, // 0004 GETMET R6 R0 K0
- 0x7C180200, // 0005 CALL R6 1
- 0x70020001, // 0006 JMP #0009
- 0x8C180101, // 0007 GETMET R6 R0 K1
- 0x7C180200, // 0008 CALL R6 1
- 0xB81A0400, // 0009 GETNGBL R6 K2
- 0x8C180D03, // 000A GETMET R6 R6 K3
- 0x7C180200, // 000B CALL R6 1
- 0x80000000, // 000C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: autoconf_device_map
-********************************************************************/
-be_local_closure(Matter_Device_autoconf_device_map, /* name */
- be_nested_proto(
- 16, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[36]) { /* constants */
- /* K0 */ be_nested_str_weak(json),
- /* K1 */ be_nested_str_weak(0),
- /* K2 */ be_nested_str_weak(type),
- /* K3 */ be_nested_str_weak(root),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(light),
- /* K6 */ be_nested_str_weak(get),
- /* K7 */ be_nested_str_weak(find),
- /* K8 */ be_nested_str_weak(channels),
- /* K9 */ be_nested_str_weak(),
- /* K10 */ be_const_int(0),
- /* K11 */ be_nested_str_weak(light1),
- /* K12 */ be_const_int(2),
- /* K13 */ be_nested_str_weak(light2),
- /* K14 */ be_nested_str_weak(light3),
- /* K15 */ be_nested_str_weak(tasmota),
- /* K16 */ be_nested_str_weak(get_power),
- /* K17 */ be_nested_str_weak(relay),
- /* K18 */ be_nested_str_weak(load),
- /* K19 */ be_nested_str_weak(read_sensors),
- /* K20 */ be_nested_str_weak(k2l),
- /* K21 */ be_nested_str_weak(contains),
- /* K22 */ be_nested_str_weak(Temperature),
- /* K23 */ be_nested_str_weak(_X23Temperature),
- /* K24 */ be_nested_str_weak(temperature),
- /* K25 */ be_nested_str_weak(filter),
- /* K26 */ be_nested_str_weak(stop_iteration),
- /* K27 */ be_nested_str_weak(Pressure),
- /* K28 */ be_nested_str_weak(_X23Pressure),
- /* K29 */ be_nested_str_weak(pressure),
- /* K30 */ be_nested_str_weak(Illuminance),
- /* K31 */ be_nested_str_weak(_X23Illuminance),
- /* K32 */ be_nested_str_weak(illuminance),
- /* K33 */ be_nested_str_weak(Humidity),
- /* K34 */ be_nested_str_weak(_X23Humidity),
- /* K35 */ be_nested_str_weak(humidity),
- }),
- be_str_weak(autoconf_device_map),
- &be_const_str_solidified,
- ( &(const binstruction[235]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x60080013, // 0001 GETGBL R2 G19
- 0x7C080000, // 0002 CALL R2 0
- 0x600C0013, // 0003 GETGBL R3 G19
- 0x7C0C0000, // 0004 CALL R3 0
- 0x980E0503, // 0005 SETIDX R3 K2 K3
- 0x980A0203, // 0006 SETIDX R2 K1 R3
- 0x580C0004, // 0007 LDCONST R3 K4
- 0x50100000, // 0008 LDBOOL R4 0 0
- 0xA4160A00, // 0009 IMPORT R5 K5
- 0x8C180B06, // 000A GETMET R6 R5 K6
- 0x7C180200, // 000B CALL R6 1
- 0x4C1C0000, // 000C LDNIL R7
- 0x201C0C07, // 000D NE R7 R6 R7
- 0x781E0024, // 000E JMPF R7 #0034
- 0x601C000C, // 000F GETGBL R7 G12
- 0x8C200D07, // 0010 GETMET R8 R6 K7
- 0x58280008, // 0011 LDCONST R10 K8
- 0x582C0009, // 0012 LDCONST R11 K9
- 0x7C200600, // 0013 CALL R8 3
- 0x7C1C0200, // 0014 CALL R7 1
- 0x24200F0A, // 0015 GT R8 R7 K10
- 0x7822001C, // 0016 JMPF R8 #0034
- 0x1C200F04, // 0017 EQ R8 R7 K4
- 0x78220007, // 0018 JMPF R8 #0021
- 0x60200008, // 0019 GETGBL R8 G8
- 0x5C240600, // 001A MOVE R9 R3
- 0x7C200200, // 001B CALL R8 1
- 0x60240013, // 001C GETGBL R9 G19
- 0x7C240000, // 001D CALL R9 0
- 0x9826050B, // 001E SETIDX R9 K2 K11
- 0x98081009, // 001F SETIDX R2 R8 R9
- 0x70020010, // 0020 JMP #0032
- 0x1C200F0C, // 0021 EQ R8 R7 K12
- 0x78220007, // 0022 JMPF R8 #002B
- 0x60200008, // 0023 GETGBL R8 G8
- 0x5C240600, // 0024 MOVE R9 R3
- 0x7C200200, // 0025 CALL R8 1
- 0x60240013, // 0026 GETGBL R9 G19
- 0x7C240000, // 0027 CALL R9 0
- 0x9826050D, // 0028 SETIDX R9 K2 K13
- 0x98081009, // 0029 SETIDX R2 R8 R9
- 0x70020006, // 002A JMP #0032
- 0x60200008, // 002B GETGBL R8 G8
- 0x5C240600, // 002C MOVE R9 R3
- 0x7C200200, // 002D CALL R8 1
- 0x60240013, // 002E GETGBL R9 G19
- 0x7C240000, // 002F CALL R9 0
- 0x9826050E, // 0030 SETIDX R9 K2 K14
- 0x98081009, // 0031 SETIDX R2 R8 R9
- 0x50100200, // 0032 LDBOOL R4 1 0
- 0x000C0704, // 0033 ADD R3 R3 K4
- 0x601C000C, // 0034 GETGBL R7 G12
- 0xB8221E00, // 0035 GETNGBL R8 K15
- 0x8C201110, // 0036 GETMET R8 R8 K16
- 0x7C200200, // 0037 CALL R8 1
- 0x7C1C0200, // 0038 CALL R7 1
- 0x5820000A, // 0039 LDCONST R8 K10
- 0x78120000, // 003A JMPF R4 #003C
- 0x041C0F04, // 003B SUB R7 R7 K4
- 0x14241007, // 003C LT R9 R8 R7
- 0x7826000A, // 003D JMPF R9 #0049
- 0x60240008, // 003E GETGBL R9 G8
- 0x5C280600, // 003F MOVE R10 R3
- 0x7C240200, // 0040 CALL R9 1
- 0x60280013, // 0041 GETGBL R10 G19
- 0x7C280000, // 0042 CALL R10 0
- 0x982A0511, // 0043 SETIDX R10 K2 K17
- 0x982A2208, // 0044 SETIDX R10 K17 R8
- 0x9808120A, // 0045 SETIDX R2 R9 R10
- 0x00201104, // 0046 ADD R8 R8 K4
- 0x000C0704, // 0047 ADD R3 R3 K4
- 0x7001FFF2, // 0048 JMP #003C
- 0x8C240312, // 0049 GETMET R9 R1 K18
- 0xB82E1E00, // 004A GETNGBL R11 K15
- 0x8C2C1713, // 004B GETMET R11 R11 K19
- 0x7C2C0200, // 004C CALL R11 1
- 0x7C240400, // 004D CALL R9 2
- 0x540E001F, // 004E LDINT R3 32
- 0x60280010, // 004F GETGBL R10 G16
- 0x8C2C0114, // 0050 GETMET R11 R0 K20
- 0x5C341200, // 0051 MOVE R13 R9
- 0x7C2C0400, // 0052 CALL R11 2
- 0x7C280200, // 0053 CALL R10 1
- 0xA802001C, // 0054 EXBLK 0 #0072
- 0x5C2C1400, // 0055 MOVE R11 R10
- 0x7C2C0000, // 0056 CALL R11 0
- 0x9430120B, // 0057 GETIDX R12 R9 R11
- 0x6034000F, // 0058 GETGBL R13 G15
- 0x5C381800, // 0059 MOVE R14 R12
- 0x603C0013, // 005A GETGBL R15 G19
- 0x7C340400, // 005B CALL R13 2
- 0x7836000D, // 005C JMPF R13 #006B
- 0x8C341915, // 005D GETMET R13 R12 K21
- 0x583C0016, // 005E LDCONST R15 K22
- 0x7C340400, // 005F CALL R13 2
- 0x78360009, // 0060 JMPF R13 #006B
- 0x00341717, // 0061 ADD R13 R11 K23
- 0x60380008, // 0062 GETGBL R14 G8
- 0x5C3C0600, // 0063 MOVE R15 R3
- 0x7C380200, // 0064 CALL R14 1
- 0x603C0013, // 0065 GETGBL R15 G19
- 0x7C3C0000, // 0066 CALL R15 0
- 0x983E0518, // 0067 SETIDX R15 K2 K24
- 0x983E320D, // 0068 SETIDX R15 K25 R13
- 0x98081C0F, // 0069 SETIDX R2 R14 R15
- 0x000C0704, // 006A ADD R3 R3 K4
- 0x54360027, // 006B LDINT R13 40
- 0x2434060D, // 006C GT R13 R3 R13
- 0x78360000, // 006D JMPF R13 #006F
- 0x70020000, // 006E JMP #0070
- 0x7001FFE4, // 006F JMP #0055
- 0xA8040001, // 0070 EXBLK 1 1
- 0x70020002, // 0071 JMP #0075
- 0x5828001A, // 0072 LDCONST R10 K26
- 0xAC280200, // 0073 CATCH R10 1 0
- 0xB0080000, // 0074 RAISE 2 R0 R0
- 0x540E0027, // 0075 LDINT R3 40
- 0x60280010, // 0076 GETGBL R10 G16
- 0x8C2C0114, // 0077 GETMET R11 R0 K20
- 0x5C341200, // 0078 MOVE R13 R9
- 0x7C2C0400, // 0079 CALL R11 2
- 0x7C280200, // 007A CALL R10 1
- 0xA802001C, // 007B EXBLK 0 #0099
- 0x5C2C1400, // 007C MOVE R11 R10
- 0x7C2C0000, // 007D CALL R11 0
- 0x9430120B, // 007E GETIDX R12 R9 R11
- 0x6034000F, // 007F GETGBL R13 G15
- 0x5C381800, // 0080 MOVE R14 R12
- 0x603C0013, // 0081 GETGBL R15 G19
- 0x7C340400, // 0082 CALL R13 2
- 0x7836000D, // 0083 JMPF R13 #0092
- 0x8C341915, // 0084 GETMET R13 R12 K21
- 0x583C001B, // 0085 LDCONST R15 K27
- 0x7C340400, // 0086 CALL R13 2
- 0x78360009, // 0087 JMPF R13 #0092
- 0x0034171C, // 0088 ADD R13 R11 K28
- 0x60380008, // 0089 GETGBL R14 G8
- 0x5C3C0600, // 008A MOVE R15 R3
- 0x7C380200, // 008B CALL R14 1
- 0x603C0013, // 008C GETGBL R15 G19
- 0x7C3C0000, // 008D CALL R15 0
- 0x983E051D, // 008E SETIDX R15 K2 K29
- 0x983E320D, // 008F SETIDX R15 K25 R13
- 0x98081C0F, // 0090 SETIDX R2 R14 R15
- 0x000C0704, // 0091 ADD R3 R3 K4
- 0x5436002E, // 0092 LDINT R13 47
- 0x2434060D, // 0093 GT R13 R3 R13
- 0x78360000, // 0094 JMPF R13 #0096
- 0x70020000, // 0095 JMP #0097
- 0x7001FFE4, // 0096 JMP #007C
- 0xA8040001, // 0097 EXBLK 1 1
- 0x70020002, // 0098 JMP #009C
- 0x5828001A, // 0099 LDCONST R10 K26
- 0xAC280200, // 009A CATCH R10 1 0
- 0xB0080000, // 009B RAISE 2 R0 R0
- 0x540E002F, // 009C LDINT R3 48
- 0x60280010, // 009D GETGBL R10 G16
- 0x8C2C0114, // 009E GETMET R11 R0 K20
- 0x5C341200, // 009F MOVE R13 R9
- 0x7C2C0400, // 00A0 CALL R11 2
- 0x7C280200, // 00A1 CALL R10 1
- 0xA802001C, // 00A2 EXBLK 0 #00C0
- 0x5C2C1400, // 00A3 MOVE R11 R10
- 0x7C2C0000, // 00A4 CALL R11 0
- 0x9430120B, // 00A5 GETIDX R12 R9 R11
- 0x6034000F, // 00A6 GETGBL R13 G15
- 0x5C381800, // 00A7 MOVE R14 R12
- 0x603C0013, // 00A8 GETGBL R15 G19
- 0x7C340400, // 00A9 CALL R13 2
- 0x7836000D, // 00AA JMPF R13 #00B9
- 0x8C341915, // 00AB GETMET R13 R12 K21
- 0x583C001E, // 00AC LDCONST R15 K30
- 0x7C340400, // 00AD CALL R13 2
- 0x78360009, // 00AE JMPF R13 #00B9
- 0x0034171F, // 00AF ADD R13 R11 K31
- 0x60380008, // 00B0 GETGBL R14 G8
- 0x5C3C0600, // 00B1 MOVE R15 R3
- 0x7C380200, // 00B2 CALL R14 1
- 0x603C0013, // 00B3 GETGBL R15 G19
- 0x7C3C0000, // 00B4 CALL R15 0
- 0x983E0520, // 00B5 SETIDX R15 K2 K32
- 0x983E320D, // 00B6 SETIDX R15 K25 R13
- 0x98081C0F, // 00B7 SETIDX R2 R14 R15
- 0x000C0704, // 00B8 ADD R3 R3 K4
- 0x54360037, // 00B9 LDINT R13 56
- 0x2434060D, // 00BA GT R13 R3 R13
- 0x78360000, // 00BB JMPF R13 #00BD
- 0x70020000, // 00BC JMP #00BE
- 0x7001FFE4, // 00BD JMP #00A3
- 0xA8040001, // 00BE EXBLK 1 1
- 0x70020002, // 00BF JMP #00C3
- 0x5828001A, // 00C0 LDCONST R10 K26
- 0xAC280200, // 00C1 CATCH R10 1 0
- 0xB0080000, // 00C2 RAISE 2 R0 R0
- 0x540E0037, // 00C3 LDINT R3 56
- 0x60280010, // 00C4 GETGBL R10 G16
- 0x8C2C0114, // 00C5 GETMET R11 R0 K20
- 0x5C341200, // 00C6 MOVE R13 R9
- 0x7C2C0400, // 00C7 CALL R11 2
- 0x7C280200, // 00C8 CALL R10 1
- 0xA802001C, // 00C9 EXBLK 0 #00E7
- 0x5C2C1400, // 00CA MOVE R11 R10
- 0x7C2C0000, // 00CB CALL R11 0
- 0x9430120B, // 00CC GETIDX R12 R9 R11
- 0x6034000F, // 00CD GETGBL R13 G15
- 0x5C381800, // 00CE MOVE R14 R12
- 0x603C0013, // 00CF GETGBL R15 G19
- 0x7C340400, // 00D0 CALL R13 2
- 0x7836000D, // 00D1 JMPF R13 #00E0
- 0x8C341915, // 00D2 GETMET R13 R12 K21
- 0x583C0021, // 00D3 LDCONST R15 K33
- 0x7C340400, // 00D4 CALL R13 2
- 0x78360009, // 00D5 JMPF R13 #00E0
- 0x00341722, // 00D6 ADD R13 R11 K34
- 0x60380008, // 00D7 GETGBL R14 G8
- 0x5C3C0600, // 00D8 MOVE R15 R3
- 0x7C380200, // 00D9 CALL R14 1
- 0x603C0013, // 00DA GETGBL R15 G19
- 0x7C3C0000, // 00DB CALL R15 0
- 0x983E0523, // 00DC SETIDX R15 K2 K35
- 0x983E320D, // 00DD SETIDX R15 K25 R13
- 0x98081C0F, // 00DE SETIDX R2 R14 R15
- 0x000C0704, // 00DF ADD R3 R3 K4
- 0x5436003F, // 00E0 LDINT R13 64
- 0x2434060D, // 00E1 GT R13 R3 R13
- 0x78360000, // 00E2 JMPF R13 #00E4
- 0x70020000, // 00E3 JMP #00E5
- 0x7001FFE4, // 00E4 JMP #00CA
- 0xA8040001, // 00E5 EXBLK 1 1
- 0x70020002, // 00E6 JMP #00EA
- 0x5828001A, // 00E7 LDCONST R10 K26
- 0xAC280200, // 00E8 CATCH R10 1 0
- 0xB0080000, // 00E9 RAISE 2 R0 R0
- 0x80040400, // 00EA RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: remove_fabric
-********************************************************************/
-be_local_closure(Matter_Device_remove_fabric, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(find_children_fabrics),
- /* K2 */ be_nested_str_weak(get_fabric_index),
- /* K3 */ be_nested_str_weak(find_fabric_by_index),
- /* K4 */ be_nested_str_weak(message_handler),
- /* K5 */ be_nested_str_weak(im),
- /* K6 */ be_nested_str_weak(subs_shop),
- /* K7 */ be_nested_str_weak(remove_by_fabric),
- /* K8 */ be_nested_str_weak(mdns_remove_op_discovery),
- /* K9 */ be_nested_str_weak(remove_fabric),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(save_fabrics),
- }),
- be_str_weak(remove_fabric),
- &be_const_str_solidified,
- ( &(const binstruction[43]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x8C100302, // 0002 GETMET R4 R1 K2
- 0x7C100200, // 0003 CALL R4 1
- 0x7C080400, // 0004 CALL R2 2
- 0x4C0C0000, // 0005 LDNIL R3
- 0x1C0C0403, // 0006 EQ R3 R2 R3
- 0x780E0000, // 0007 JMPF R3 #0009
- 0x80000600, // 0008 RET 0
- 0x600C0010, // 0009 GETGBL R3 G16
- 0x5C100400, // 000A MOVE R4 R2
- 0x7C0C0200, // 000B CALL R3 1
- 0xA8020016, // 000C EXBLK 0 #0024
- 0x5C100600, // 000D MOVE R4 R3
- 0x7C100000, // 000E CALL R4 0
- 0x88140100, // 000F GETMBR R5 R0 K0
- 0x8C140B03, // 0010 GETMET R5 R5 K3
- 0x5C1C0800, // 0011 MOVE R7 R4
- 0x7C140400, // 0012 CALL R5 2
- 0x4C180000, // 0013 LDNIL R6
- 0x20180A06, // 0014 NE R6 R5 R6
- 0x781A000C, // 0015 JMPF R6 #0023
- 0x88180104, // 0016 GETMBR R6 R0 K4
- 0x88180D05, // 0017 GETMBR R6 R6 K5
- 0x88180D06, // 0018 GETMBR R6 R6 K6
- 0x8C180D07, // 0019 GETMET R6 R6 K7
- 0x5C200A00, // 001A MOVE R8 R5
- 0x7C180400, // 001B CALL R6 2
- 0x8C180108, // 001C GETMET R6 R0 K8
- 0x5C200A00, // 001D MOVE R8 R5
- 0x7C180400, // 001E CALL R6 2
- 0x88180100, // 001F GETMBR R6 R0 K0
- 0x8C180D09, // 0020 GETMET R6 R6 K9
- 0x5C200A00, // 0021 MOVE R8 R5
- 0x7C180400, // 0022 CALL R6 2
- 0x7001FFE8, // 0023 JMP #000D
- 0x580C000A, // 0024 LDCONST R3 K10
- 0xAC0C0200, // 0025 CATCH R3 1 0
- 0xB0080000, // 0026 RAISE 2 R0 R0
- 0x880C0100, // 0027 GETMBR R3 R0 K0
- 0x8C0C070B, // 0028 GETMET R3 R3 K11
- 0x7C0C0200, // 0029 CALL R3 1
- 0x80000000, // 002A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _init_basic_commissioning
-********************************************************************/
-be_local_closure(Matter_Device__init_basic_commissioning, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(count_active_fabrics),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(start_root_basic_commissioning),
- }),
- be_str_weak(_init_basic_commissioning),
- &be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x1C040302, // 0003 EQ R1 R1 K2
- 0x78060001, // 0004 JMPF R1 #0007
- 0x8C040103, // 0005 GETMET R1 R0 K3
- 0x7C040200, // 0006 CALL R1 1
- 0x80000000, // 0007 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_250ms
-********************************************************************/
-be_local_closure(Matter_Device_every_250ms, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(every_250ms),
- }),
- be_str_weak(every_250ms),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: process_attribute_expansion
-********************************************************************/
-be_local_closure(Matter_Device_process_attribute_expansion, /* name */
- be_nested_proto(
- 29, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 1]) {
- be_nested_proto(
- 7, /* nstack */
- 1, /* argc */
- 0, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(keys),
- /* K1 */ be_nested_str_weak(push),
- /* K2 */ be_nested_str_weak(stop_iteration),
- /* K3 */ be_const_int(1),
- /* K4 */ be_const_int(0),
- }),
- be_str_weak(keys_sorted),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0x60040012, // 0000 GETGBL R1 G18
- 0x7C040000, // 0001 CALL R1 0
- 0x60080010, // 0002 GETGBL R2 G16
- 0x8C0C0100, // 0003 GETMET R3 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0x7C080200, // 0005 CALL R2 1
- 0xA8020005, // 0006 EXBLK 0 #000D
- 0x5C0C0400, // 0007 MOVE R3 R2
- 0x7C0C0000, // 0008 CALL R3 0
- 0x8C100301, // 0009 GETMET R4 R1 K1
- 0x5C180600, // 000A MOVE R6 R3
- 0x7C100400, // 000B CALL R4 2
- 0x7001FFF9, // 000C JMP #0007
- 0x58080002, // 000D LDCONST R2 K2
- 0xAC080200, // 000E CATCH R2 1 0
- 0xB0080000, // 000F RAISE 2 R0 R0
- 0x60080010, // 0010 GETGBL R2 G16
- 0x600C000C, // 0011 GETGBL R3 G12
- 0x5C100200, // 0012 MOVE R4 R1
- 0x7C0C0200, // 0013 CALL R3 1
- 0x040C0703, // 0014 SUB R3 R3 K3
- 0x400E0603, // 0015 CONNECT R3 K3 R3
- 0x7C080200, // 0016 CALL R2 1
- 0xA8020010, // 0017 EXBLK 0 #0029
- 0x5C0C0400, // 0018 MOVE R3 R2
- 0x7C0C0000, // 0019 CALL R3 0
- 0x94100203, // 001A GETIDX R4 R1 R3
- 0x5C140600, // 001B MOVE R5 R3
- 0x24180B04, // 001C GT R6 R5 K4
- 0x781A0008, // 001D JMPF R6 #0027
- 0x04180B03, // 001E SUB R6 R5 K3
- 0x94180206, // 001F GETIDX R6 R1 R6
- 0x24180C04, // 0020 GT R6 R6 R4
- 0x781A0004, // 0021 JMPF R6 #0027
- 0x04180B03, // 0022 SUB R6 R5 K3
- 0x94180206, // 0023 GETIDX R6 R1 R6
- 0x98040A06, // 0024 SETIDX R1 R5 R6
- 0x04140B03, // 0025 SUB R5 R5 K3
- 0x7001FFF4, // 0026 JMP #001C
- 0x98040A04, // 0027 SETIDX R1 R5 R4
- 0x7001FFEE, // 0028 JMP #0018
- 0x58080002, // 0029 LDCONST R2 K2
- 0xAC080200, // 002A CATCH R2 1 0
- 0xB0080000, // 002B RAISE 2 R0 R0
- 0x80040200, // 002C RET 1 R1
- })
- ),
- }),
- 1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(attribute),
- /* K4 */ be_nested_str_weak(plugins),
- /* K5 */ be_nested_str_weak(get_endpoint),
- /* K6 */ be_nested_str_weak(contains),
- /* K7 */ be_nested_str_weak(get_cluster_list),
- /* K8 */ be_nested_str_weak(get_attribute_list),
- /* K9 */ be_nested_str_weak(push),
- /* K10 */ be_nested_str_weak(stop_iteration),
- /* K11 */ be_nested_str_weak(tasmota),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
- /* K15 */ be_const_int(3),
- /* K16 */ be_nested_str_weak(status),
- /* K17 */ be_nested_str_weak(matter),
- /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
- /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
- /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
- }),
- be_str_weak(process_attribute_expansion),
- &be_const_str_solidified,
- ( &(const binstruction[216]) { /* code */
- 0x840C0000, // 0000 CLOSURE R3 P0
- 0xA4120000, // 0001 IMPORT R4 K0
- 0x88140301, // 0002 GETMBR R5 R1 K1
- 0x50180000, // 0003 LDBOOL R6 0 0
- 0x881C0302, // 0004 GETMBR R7 R1 K2
- 0x50200000, // 0005 LDBOOL R8 0 0
- 0x88240303, // 0006 GETMBR R9 R1 K3
- 0x50280000, // 0007 LDBOOL R10 0 0
- 0x882C0301, // 0008 GETMBR R11 R1 K1
- 0x4C300000, // 0009 LDNIL R12
- 0x202C160C, // 000A NE R11 R11 R12
- 0x782E0007, // 000B JMPF R11 #0014
- 0x882C0302, // 000C GETMBR R11 R1 K2
- 0x4C300000, // 000D LDNIL R12
- 0x202C160C, // 000E NE R11 R11 R12
- 0x782E0003, // 000F JMPF R11 #0014
- 0x882C0303, // 0010 GETMBR R11 R1 K3
- 0x4C300000, // 0011 LDNIL R12
- 0x202C160C, // 0012 NE R11 R11 R12
- 0x742E0000, // 0013 JMPT R11 #0015
- 0x502C0001, // 0014 LDBOOL R11 0 1
- 0x502C0200, // 0015 LDBOOL R11 1 0
- 0x60300013, // 0016 GETGBL R12 G19
- 0x7C300000, // 0017 CALL R12 0
- 0x60340010, // 0018 GETGBL R13 G16
- 0x88380104, // 0019 GETMBR R14 R0 K4
- 0x7C340200, // 001A CALL R13 1
- 0xA8020055, // 001B EXBLK 0 #0072
- 0x5C381A00, // 001C MOVE R14 R13
- 0x7C380000, // 001D CALL R14 0
- 0x8C3C1D05, // 001E GETMET R15 R14 K5
- 0x7C3C0200, // 001F CALL R15 1
- 0x4C400000, // 0020 LDNIL R16
- 0x20400A10, // 0021 NE R16 R5 R16
- 0x78420002, // 0022 JMPF R16 #0026
- 0x20401E05, // 0023 NE R16 R15 R5
- 0x78420000, // 0024 JMPF R16 #0026
- 0x7001FFF5, // 0025 JMP #001C
- 0x8C401906, // 0026 GETMET R16 R12 K6
- 0x5C481E00, // 0027 MOVE R18 R15
- 0x7C400400, // 0028 CALL R16 2
- 0x74420002, // 0029 JMPT R16 #002D
- 0x60400013, // 002A GETGBL R16 G19
- 0x7C400000, // 002B CALL R16 0
- 0x98301E10, // 002C SETIDX R12 R15 R16
- 0x50180200, // 002D LDBOOL R6 1 0
- 0x8C401D07, // 002E GETMET R16 R14 K7
- 0x5C481E00, // 002F MOVE R18 R15
- 0x7C400400, // 0030 CALL R16 2
- 0x60440010, // 0031 GETGBL R17 G16
- 0x5C482000, // 0032 MOVE R18 R16
- 0x7C440200, // 0033 CALL R17 1
- 0xA8020038, // 0034 EXBLK 0 #006E
- 0x5C482200, // 0035 MOVE R18 R17
- 0x7C480000, // 0036 CALL R18 0
- 0x4C4C0000, // 0037 LDNIL R19
- 0x204C0E13, // 0038 NE R19 R7 R19
- 0x784E0002, // 0039 JMPF R19 #003D
- 0x204C2407, // 003A NE R19 R18 R7
- 0x784E0000, // 003B JMPF R19 #003D
- 0x7001FFF7, // 003C JMP #0035
- 0x944C180F, // 003D GETIDX R19 R12 R15
- 0x8C4C2706, // 003E GETMET R19 R19 K6
- 0x5C542400, // 003F MOVE R21 R18
- 0x7C4C0400, // 0040 CALL R19 2
- 0x744E0003, // 0041 JMPT R19 #0046
- 0x944C180F, // 0042 GETIDX R19 R12 R15
- 0x60500013, // 0043 GETGBL R20 G19
- 0x7C500000, // 0044 CALL R20 0
- 0x984C2414, // 0045 SETIDX R19 R18 R20
- 0x50200200, // 0046 LDBOOL R8 1 0
- 0x8C4C1D08, // 0047 GETMET R19 R14 K8
- 0x5C541E00, // 0048 MOVE R21 R15
- 0x5C582400, // 0049 MOVE R22 R18
- 0x7C4C0600, // 004A CALL R19 3
- 0x60500010, // 004B GETGBL R20 G16
- 0x5C542600, // 004C MOVE R21 R19
- 0x7C500200, // 004D CALL R20 1
- 0xA802001A, // 004E EXBLK 0 #006A
- 0x5C542800, // 004F MOVE R21 R20
- 0x7C540000, // 0050 CALL R21 0
- 0x4C580000, // 0051 LDNIL R22
- 0x20581216, // 0052 NE R22 R9 R22
- 0x785A0002, // 0053 JMPF R22 #0057
- 0x20582A09, // 0054 NE R22 R21 R9
- 0x785A0000, // 0055 JMPF R22 #0057
- 0x7001FFF7, // 0056 JMP #004F
- 0x9458180F, // 0057 GETIDX R22 R12 R15
- 0x94582C12, // 0058 GETIDX R22 R22 R18
- 0x8C582D06, // 0059 GETMET R22 R22 K6
- 0x5C602A00, // 005A MOVE R24 R21
- 0x7C580400, // 005B CALL R22 2
- 0x745A0004, // 005C JMPT R22 #0062
- 0x9458180F, // 005D GETIDX R22 R12 R15
- 0x94582C12, // 005E GETIDX R22 R22 R18
- 0x605C0012, // 005F GETGBL R23 G18
- 0x7C5C0000, // 0060 CALL R23 0
- 0x98582A17, // 0061 SETIDX R22 R21 R23
- 0x50280200, // 0062 LDBOOL R10 1 0
- 0x9458180F, // 0063 GETIDX R22 R12 R15
- 0x94582C12, // 0064 GETIDX R22 R22 R18
- 0x94582C15, // 0065 GETIDX R22 R22 R21
- 0x8C582D09, // 0066 GETMET R22 R22 K9
- 0x5C601C00, // 0067 MOVE R24 R14
- 0x7C580400, // 0068 CALL R22 2
- 0x7001FFE4, // 0069 JMP #004F
- 0x5850000A, // 006A LDCONST R20 K10
- 0xAC500200, // 006B CATCH R20 1 0
- 0xB0080000, // 006C RAISE 2 R0 R0
- 0x7001FFC6, // 006D JMP #0035
- 0x5844000A, // 006E LDCONST R17 K10
- 0xAC440200, // 006F CATCH R17 1 0
- 0xB0080000, // 0070 RAISE 2 R0 R0
- 0x7001FFA9, // 0071 JMP #001C
- 0x5834000A, // 0072 LDCONST R13 K10
- 0xAC340200, // 0073 CATCH R13 1 0
- 0xB0080000, // 0074 RAISE 2 R0 R0
- 0x60340010, // 0075 GETGBL R13 G16
- 0x5C380600, // 0076 MOVE R14 R3
- 0x5C3C1800, // 0077 MOVE R15 R12
- 0x7C380200, // 0078 CALL R14 1
- 0x7C340200, // 0079 CALL R13 1
- 0xA802003D, // 007A EXBLK 0 #00B9
- 0x5C381A00, // 007B MOVE R14 R13
- 0x7C380000, // 007C CALL R14 0
- 0x603C0010, // 007D GETGBL R15 G16
- 0x5C400600, // 007E MOVE R16 R3
- 0x9444180E, // 007F GETIDX R17 R12 R14
- 0x7C400200, // 0080 CALL R16 1
- 0x7C3C0200, // 0081 CALL R15 1
- 0xA8020031, // 0082 EXBLK 0 #00B5
- 0x5C401E00, // 0083 MOVE R16 R15
- 0x7C400000, // 0084 CALL R16 0
- 0x60440010, // 0085 GETGBL R17 G16
- 0x5C480600, // 0086 MOVE R18 R3
- 0x944C180E, // 0087 GETIDX R19 R12 R14
- 0x944C2610, // 0088 GETIDX R19 R19 R16
- 0x7C480200, // 0089 CALL R18 1
- 0x7C440200, // 008A CALL R17 1
- 0xA8020024, // 008B EXBLK 0 #00B1
- 0x5C482200, // 008C MOVE R18 R17
- 0x7C480000, // 008D CALL R18 0
- 0x604C0010, // 008E GETGBL R19 G16
- 0x9450180E, // 008F GETIDX R20 R12 R14
- 0x94502810, // 0090 GETIDX R20 R20 R16
- 0x94502812, // 0091 GETIDX R20 R20 R18
- 0x7C4C0200, // 0092 CALL R19 1
- 0xA8020018, // 0093 EXBLK 0 #00AD
- 0x5C502600, // 0094 MOVE R20 R19
- 0x7C500000, // 0095 CALL R20 0
- 0xB8561600, // 0096 GETNGBL R21 K11
- 0x8C542B0C, // 0097 GETMET R21 R21 K12
- 0x8C5C090D, // 0098 GETMET R23 R4 K13
- 0x5864000E, // 0099 LDCONST R25 K14
- 0x5C681C00, // 009A MOVE R26 R14
- 0x5C6C2000, // 009B MOVE R27 R16
- 0x5C702400, // 009C MOVE R28 R18
- 0x7C5C0A00, // 009D CALL R23 5
- 0x5860000F, // 009E LDCONST R24 K15
- 0x7C540600, // 009F CALL R21 3
- 0x9006020E, // 00A0 SETMBR R1 K1 R14
- 0x90060410, // 00A1 SETMBR R1 K2 R16
- 0x90060612, // 00A2 SETMBR R1 K3 R18
- 0x5C540400, // 00A3 MOVE R21 R2
- 0x5C582800, // 00A4 MOVE R22 R20
- 0x5C5C0200, // 00A5 MOVE R23 R1
- 0x5C601600, // 00A6 MOVE R24 R11
- 0x7C540600, // 00A7 CALL R21 3
- 0x782E0002, // 00A8 JMPF R11 #00AC
- 0x78560001, // 00A9 JMPF R21 #00AC
- 0xA8040004, // 00AA EXBLK 1 4
- 0x80002C00, // 00AB RET 0
- 0x7001FFE6, // 00AC JMP #0094
- 0x584C000A, // 00AD LDCONST R19 K10
- 0xAC4C0200, // 00AE CATCH R19 1 0
- 0xB0080000, // 00AF RAISE 2 R0 R0
- 0x7001FFDA, // 00B0 JMP #008C
- 0x5844000A, // 00B1 LDCONST R17 K10
- 0xAC440200, // 00B2 CATCH R17 1 0
- 0xB0080000, // 00B3 RAISE 2 R0 R0
- 0x7001FFCD, // 00B4 JMP #0083
- 0x583C000A, // 00B5 LDCONST R15 K10
- 0xAC3C0200, // 00B6 CATCH R15 1 0
- 0xB0080000, // 00B7 RAISE 2 R0 R0
- 0x7001FFC1, // 00B8 JMP #007B
- 0x5834000A, // 00B9 LDCONST R13 K10
- 0xAC340200, // 00BA CATCH R13 1 0
- 0xB0080000, // 00BB RAISE 2 R0 R0
- 0x782E0019, // 00BC JMPF R11 #00D7
- 0x5C340C00, // 00BD MOVE R13 R6
- 0x74360003, // 00BE JMPT R13 #00C3
- 0xB8362200, // 00BF GETNGBL R13 K17
- 0x88341B12, // 00C0 GETMBR R13 R13 K18
- 0x9006200D, // 00C1 SETMBR R1 K16 R13
- 0x7002000E, // 00C2 JMP #00D2
- 0x5C341000, // 00C3 MOVE R13 R8
- 0x74360003, // 00C4 JMPT R13 #00C9
- 0xB8362200, // 00C5 GETNGBL R13 K17
- 0x88341B13, // 00C6 GETMBR R13 R13 K19
- 0x9006200D, // 00C7 SETMBR R1 K16 R13
- 0x70020008, // 00C8 JMP #00D2
- 0x5C341400, // 00C9 MOVE R13 R10
- 0x74360003, // 00CA JMPT R13 #00CF
- 0xB8362200, // 00CB GETNGBL R13 K17
- 0x88341B14, // 00CC GETMBR R13 R13 K20
- 0x9006200D, // 00CD SETMBR R1 K16 R13
- 0x70020002, // 00CE JMP #00D2
- 0xB8362200, // 00CF GETNGBL R13 K17
- 0x88341B15, // 00D0 GETMBR R13 R13 K21
- 0x9006200D, // 00D1 SETMBR R1 K16 R13
- 0x5C340400, // 00D2 MOVE R13 R2
- 0x4C380000, // 00D3 LDNIL R14
- 0x5C3C0200, // 00D4 MOVE R15 R1
- 0x50400200, // 00D5 LDBOOL R16 1 0
- 0x7C340600, // 00D6 CALL R13 3
- 0x80000000, // 00D7 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_remove_PASE
-********************************************************************/
-be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
- be_nested_proto(
- 12, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[22]) { /* constants */
- /* K0 */ be_nested_str_weak(mdns),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(mdns_pase_eth),
- /* K3 */ be_nested_str_weak(tasmota),
- /* K4 */ be_nested_str_weak(log),
- /* K5 */ be_nested_str_weak(format),
- /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
- /* K7 */ be_nested_str_weak(_matterc),
- /* K8 */ be_nested_str_weak(_udp),
- /* K9 */ be_nested_str_weak(commissioning_instance_eth),
- /* K10 */ be_nested_str_weak(hostname_eth),
- /* K11 */ be_const_int(3),
- /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
- /* K13 */ be_nested_str_weak(eth),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(remove_service),
- /* K16 */ be_nested_str_weak(mdns_pase_wifi),
- /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
- /* K18 */ be_nested_str_weak(hostname_wifi),
- /* K19 */ be_nested_str_weak(wifi),
- /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
- /* K21 */ be_nested_str_weak(_X7C),
- }),
- be_str_weak(mdns_remove_PASE),
- &be_const_str_solidified,
- ( &(const binstruction[83]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xA802003D, // 0002 EXBLK 0 #0041
- 0x880C0102, // 0003 GETMBR R3 R0 K2
- 0x780E001B, // 0004 JMPF R3 #0021
- 0xB80E0600, // 0005 GETNGBL R3 K3
- 0x8C0C0704, // 0006 GETMET R3 R3 K4
- 0x8C140505, // 0007 GETMET R5 R2 K5
- 0x581C0006, // 0008 LDCONST R7 K6
- 0x58200007, // 0009 LDCONST R8 K7
- 0x58240008, // 000A LDCONST R9 K8
- 0x88280109, // 000B GETMBR R10 R0 K9
- 0x882C010A, // 000C GETMBR R11 R0 K10
- 0x7C140C00, // 000D CALL R5 6
- 0x5818000B, // 000E LDCONST R6 K11
- 0x7C0C0600, // 000F CALL R3 3
- 0xB80E0600, // 0010 GETNGBL R3 K3
- 0x8C0C0704, // 0011 GETMET R3 R3 K4
- 0x8C140505, // 0012 GETMET R5 R2 K5
- 0x581C000C, // 0013 LDCONST R7 K12
- 0x5820000D, // 0014 LDCONST R8 K13
- 0x88240109, // 0015 GETMBR R9 R0 K9
- 0x7C140800, // 0016 CALL R5 4
- 0x5818000E, // 0017 LDCONST R6 K14
- 0x7C0C0600, // 0018 CALL R3 3
- 0x500C0000, // 0019 LDBOOL R3 0 0
- 0x90020403, // 001A SETMBR R0 K2 R3
- 0x8C0C030F, // 001B GETMET R3 R1 K15
- 0x58140007, // 001C LDCONST R5 K7
- 0x58180008, // 001D LDCONST R6 K8
- 0x881C0109, // 001E GETMBR R7 R0 K9
- 0x8820010A, // 001F GETMBR R8 R0 K10
- 0x7C0C0A00, // 0020 CALL R3 5
- 0x880C0110, // 0021 GETMBR R3 R0 K16
- 0x780E001B, // 0022 JMPF R3 #003F
- 0xB80E0600, // 0023 GETNGBL R3 K3
- 0x8C0C0704, // 0024 GETMET R3 R3 K4
- 0x8C140505, // 0025 GETMET R5 R2 K5
- 0x581C0006, // 0026 LDCONST R7 K6
- 0x58200007, // 0027 LDCONST R8 K7
- 0x58240008, // 0028 LDCONST R9 K8
- 0x88280111, // 0029 GETMBR R10 R0 K17
- 0x882C0112, // 002A GETMBR R11 R0 K18
- 0x7C140C00, // 002B CALL R5 6
- 0x5818000B, // 002C LDCONST R6 K11
- 0x7C0C0600, // 002D CALL R3 3
- 0xB80E0600, // 002E GETNGBL R3 K3
- 0x8C0C0704, // 002F GETMET R3 R3 K4
- 0x8C140505, // 0030 GETMET R5 R2 K5
- 0x581C000C, // 0031 LDCONST R7 K12
- 0x58200013, // 0032 LDCONST R8 K19
- 0x88240111, // 0033 GETMBR R9 R0 K17
- 0x7C140800, // 0034 CALL R5 4
- 0x5818000E, // 0035 LDCONST R6 K14
- 0x7C0C0600, // 0036 CALL R3 3
- 0x500C0000, // 0037 LDBOOL R3 0 0
- 0x90022003, // 0038 SETMBR R0 K16 R3
- 0x8C0C030F, // 0039 GETMET R3 R1 K15
- 0x58140007, // 003A LDCONST R5 K7
- 0x58180008, // 003B LDCONST R6 K8
- 0x881C0111, // 003C GETMBR R7 R0 K17
- 0x88200112, // 003D GETMBR R8 R0 K18
- 0x7C0C0A00, // 003E CALL R3 5
- 0xA8040001, // 003F EXBLK 1 1
- 0x70020010, // 0040 JMP #0052
- 0xAC0C0002, // 0041 CATCH R3 0 2
- 0x7002000D, // 0042 JMP #0051
- 0xB8160600, // 0043 GETNGBL R5 K3
- 0x8C140B04, // 0044 GETMET R5 R5 K4
- 0x601C0008, // 0045 GETGBL R7 G8
- 0x5C200600, // 0046 MOVE R8 R3
- 0x7C1C0200, // 0047 CALL R7 1
- 0x001E2807, // 0048 ADD R7 K20 R7
- 0x001C0F15, // 0049 ADD R7 R7 K21
- 0x60200008, // 004A GETGBL R8 G8
- 0x5C240800, // 004B MOVE R9 R4
- 0x7C200200, // 004C CALL R8 1
- 0x001C0E08, // 004D ADD R7 R7 R8
- 0x5820000E, // 004E LDCONST R8 K14
- 0x7C140600, // 004F CALL R5 3
- 0x70020000, // 0050 JMP #0052
- 0xB0080000, // 0051 RAISE 2 R0 R0
- 0x80000000, // 0052 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _compute_pbkdf
-********************************************************************/
-be_local_closure(Matter_Device__compute_pbkdf, /* name */
- be_nested_proto(
- 14, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(add),
- /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
- /* K4 */ be_nested_str_weak(derive),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(root_w0),
- /* K7 */ be_nested_str_weak(EC_P256),
- /* K8 */ be_nested_str_weak(mod),
- /* K9 */ be_nested_str_weak(root_L),
- /* K10 */ be_nested_str_weak(public_key),
- }),
- be_str_weak(_compute_pbkdf),
- &be_const_str_solidified,
- ( &(const binstruction[41]) { /* code */
- 0xA4120000, // 0000 IMPORT R4 K0
- 0xA4160200, // 0001 IMPORT R5 K1
- 0x60180015, // 0002 GETGBL R6 G21
- 0x7C180000, // 0003 CALL R6 0
- 0x8C180D02, // 0004 GETMET R6 R6 K2
- 0x5C200200, // 0005 MOVE R8 R1
- 0x54260003, // 0006 LDINT R9 4
- 0x7C180600, // 0007 CALL R6 3
- 0x8C1C0903, // 0008 GETMET R7 R4 K3
- 0x7C1C0200, // 0009 CALL R7 1
- 0x8C1C0F04, // 000A GETMET R7 R7 K4
- 0x5C240C00, // 000B MOVE R9 R6
- 0x5C280600, // 000C MOVE R10 R3
- 0x5C2C0400, // 000D MOVE R11 R2
- 0x5432004F, // 000E LDINT R12 80
- 0x7C1C0A00, // 000F CALL R7 5
- 0x54220026, // 0010 LDINT R8 39
- 0x40220A08, // 0011 CONNECT R8 K5 R8
- 0x94200E08, // 0012 GETIDX R8 R7 R8
- 0x54260027, // 0013 LDINT R9 40
- 0x542A004E, // 0014 LDINT R10 79
- 0x4024120A, // 0015 CONNECT R9 R9 R10
- 0x94240E09, // 0016 GETIDX R9 R7 R9
- 0x8C280907, // 0017 GETMET R10 R4 K7
- 0x7C280200, // 0018 CALL R10 1
- 0x8C281508, // 0019 GETMET R10 R10 K8
- 0x5C301000, // 001A MOVE R12 R8
- 0x7C280400, // 001B CALL R10 2
- 0x90020C0A, // 001C SETMBR R0 K6 R10
- 0x8C280907, // 001D GETMET R10 R4 K7
- 0x7C280200, // 001E CALL R10 1
- 0x8C281508, // 001F GETMET R10 R10 K8
- 0x5C301200, // 0020 MOVE R12 R9
- 0x7C280400, // 0021 CALL R10 2
- 0x8C2C0907, // 0022 GETMET R11 R4 K7
- 0x7C2C0200, // 0023 CALL R11 1
- 0x8C2C170A, // 0024 GETMET R11 R11 K10
- 0x5C341400, // 0025 MOVE R13 R10
- 0x7C2C0400, // 0026 CALL R11 2
- 0x9002120B, // 0027 SETMBR R0 K9 R11
- 0x80000000, // 0028 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Device_invoke_request, /* name */
- be_nested_proto(
- 12, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_const_int(0),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(plugins),
- /* K3 */ be_nested_str_weak(invoke_request),
- /* K4 */ be_const_int(1),
- /* K5 */ be_nested_str_weak(status),
- /* K6 */ be_nested_str_weak(matter),
- /* K7 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[24]) { /* code */
- 0x58100000, // 0000 LDCONST R4 K0
- 0x88140701, // 0001 GETMBR R5 R3 K1
- 0x6018000C, // 0002 GETGBL R6 G12
- 0x881C0102, // 0003 GETMBR R7 R0 K2
- 0x7C180200, // 0004 CALL R6 1
- 0x14180806, // 0005 LT R6 R4 R6
- 0x781A000C, // 0006 JMPF R6 #0014
- 0x88180102, // 0007 GETMBR R6 R0 K2
- 0x94180C04, // 0008 GETIDX R6 R6 R4
- 0x881C0D01, // 0009 GETMBR R7 R6 K1
- 0x1C1C0E05, // 000A EQ R7 R7 R5
- 0x781E0005, // 000B JMPF R7 #0012
- 0x8C1C0D03, // 000C GETMET R7 R6 K3
- 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
- 0x00100904, // 0012 ADD R4 R4 K4
- 0x7001FFED, // 0013 JMP #0002
- 0xB81A0C00, // 0014 GETNGBL R6 K6
- 0x88180D07, // 0015 GETMBR R6 R6 K7
- 0x900E0A06, // 0016 SETMBR R3 K5 R6
- 0x80000000, // 0017 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: _start_udp
-********************************************************************/
-be_local_closure(Matter_Device__start_udp, /* name */
- be_nested_proto(
- 6, /* nstack */
- 2, /* argc */
- 2, /* 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 */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(udp_server),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(log),
- /* K3 */ be_nested_str_weak(MTR_X3A_X20starting_X20UDP_X20server_X20on_X20port_X3A_X20),
- /* K4 */ be_const_int(2),
- /* K5 */ be_nested_str_weak(matter),
- /* K6 */ be_nested_str_weak(UDPServer),
- /* K7 */ be_nested_str_weak(),
- /* K8 */ be_nested_str_weak(start),
- }),
- 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
- 0xB80A0200, // 0007 GETNGBL R2 K1
- 0x8C080502, // 0008 GETMET R2 R2 K2
- 0x60100008, // 0009 GETGBL R4 G8
- 0x5C140200, // 000A MOVE R5 R1
- 0x7C100200, // 000B CALL R4 1
- 0x00120604, // 000C ADD R4 K3 R4
- 0x58140004, // 000D LDCONST R5 K4
- 0x7C080600, // 000E CALL R2 3
- 0xB80A0A00, // 000F GETNGBL R2 K5
- 0x8C080506, // 0010 GETMET R2 R2 K6
- 0x58100007, // 0011 LDCONST R4 K7
- 0x5C140200, // 0012 MOVE R5 R1
- 0x7C080600, // 0013 CALL R2 3
- 0x90020002, // 0014 SETMBR R0 K0 R2
- 0x88080100, // 0015 GETMBR R2 R0 K0
- 0x8C080508, // 0016 GETMET R2 R2 K8
- 0x84100000, // 0017 CLOSURE R4 P0
- 0x7C080400, // 0018 CALL R2 2
- 0xA0000000, // 0019 CLOSE R0
- 0x80000000, // 001A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: mdns_announce_PASE
********************************************************************/
@@ -4131,119 +2006,11 @@ be_local_closure(Matter_Device_mdns_announce_PASE, /* name */
/********************************************************************
-** Solidified function: start_operational_discovery
+** Solidified function: autoconf_device_map
********************************************************************/
-be_local_closure(Matter_Device_start_operational_discovery, /* name */
+be_local_closure(Matter_Device_autoconf_device_map, /* name */
be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(crypto),
- /* K1 */ be_nested_str_weak(mdns),
- /* K2 */ be_nested_str_weak(string),
- /* K3 */ be_nested_str_weak(stop_basic_commissioning),
- /* K4 */ be_nested_str_weak(root_w0),
- /* K5 */ be_nested_str_weak(root_L),
- /* K6 */ be_nested_str_weak(set_expire_in_seconds),
- /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K8 */ be_nested_str_weak(get_fabric),
- }),
- be_str_weak(start_operational_discovery),
- &be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xA4120400, // 0002 IMPORT R4 K2
- 0x8C140103, // 0003 GETMET R5 R0 K3
- 0x7C140200, // 0004 CALL R5 1
- 0x4C140000, // 0005 LDNIL R5
- 0x90020805, // 0006 SETMBR R0 K4 R5
- 0x4C140000, // 0007 LDNIL R5
- 0x90020A05, // 0008 SETMBR R0 K5 R5
- 0x8C140306, // 0009 GETMET R5 R1 K6
- 0x541E003B, // 000A LDINT R7 60
- 0x7C140400, // 000B CALL R5 2
- 0x8C140107, // 000C GETMET R5 R0 K7
- 0x8C1C0308, // 000D GETMET R7 R1 K8
- 0x7C1C0200, // 000E CALL R7 1
- 0x7C140400, // 000F CALL R5 2
- 0x80000000, // 0010 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_active_endpoints
-********************************************************************/
-be_local_closure(Matter_Device_get_active_endpoints, /* name */
- be_nested_proto(
- 9, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins),
- /* K1 */ be_nested_str_weak(get_endpoint),
- /* K2 */ be_const_int(0),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(push),
- /* K5 */ be_nested_str_weak(stop_iteration),
- }),
- 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
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x7C0C0200, // 0004 CALL R3 1
- 0xA8020011, // 0005 EXBLK 0 #0018
- 0x5C100600, // 0006 MOVE R4 R3
- 0x7C100000, // 0007 CALL R4 0
- 0x8C140901, // 0008 GETMET R5 R4 K1
- 0x7C140200, // 0009 CALL R5 1
- 0x78060002, // 000A JMPF R1 #000E
- 0x1C180B02, // 000B EQ R6 R5 K2
- 0x781A0000, // 000C JMPF R6 #000E
- 0x7001FFF7, // 000D JMP #0006
- 0x8C180503, // 000E GETMET R6 R2 K3
- 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
- 0x8C180504, // 0014 GETMET R6 R2 K4
- 0x5C200A00, // 0015 MOVE R8 R5
- 0x7C180400, // 0016 CALL R6 2
- 0x7001FFED, // 0017 JMP #0006
- 0x580C0005, // 0018 LDCONST R3 K5
- 0xAC0C0200, // 0019 CATCH R3 1 0
- 0xB0080000, // 001A RAISE 2 R0 R0
- 0x80040400, // 001B RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: mdns_announce_op_discovery_all_fabrics
-********************************************************************/
-be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
- be_nested_proto(
- 6, /* nstack */
+ 22, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -4251,39 +2018,388 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(active_fabrics),
- /* K2 */ be_nested_str_weak(get_device_id),
- /* K3 */ be_nested_str_weak(get_fabric_id),
- /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
- /* K5 */ be_nested_str_weak(stop_iteration),
+ ( &(const bvalue[51]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(0),
+ /* K3 */ be_nested_str_weak(type),
+ /* K4 */ be_nested_str_weak(root),
+ /* K5 */ be_const_int(1),
+ /* K6 */ be_nested_str_weak(light),
+ /* K7 */ be_nested_str_weak(get),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(channels),
+ /* K10 */ be_nested_str_weak(),
+ /* K11 */ be_const_int(0),
+ /* K12 */ be_nested_str_weak(light1),
+ /* K13 */ be_const_int(2),
+ /* K14 */ be_nested_str_weak(light2),
+ /* K15 */ be_nested_str_weak(light3),
+ /* K16 */ be_nested_str_weak(tasmota),
+ /* K17 */ be_nested_str_weak(cmd),
+ /* K18 */ be_nested_str_weak(Status_X2013),
+ /* K19 */ be_nested_str_weak(log),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Status_X2013_X20_X3D_X20),
+ /* K21 */ be_const_int(3),
+ /* K22 */ be_nested_str_weak(contains),
+ /* K23 */ be_nested_str_weak(StatusSHT),
+ /* K24 */ be_nested_str_weak(SHT),
+ /* K25 */ be_nested_str_weak(format),
+ /* K26 */ be_nested_str_weak(MTR_X3A_X20_X27_X25s_X27_X20_X3D_X20_X25s),
+ /* K27 */ be_nested_str_weak(Relay1),
+ /* K28 */ be_nested_str_weak(Relay2),
+ /* K29 */ be_nested_str_weak(push),
+ /* K30 */ be_nested_str_weak(MTR_X3A_X20relay1_X20_X3D_X20_X25s_X2C_X20relay2_X20_X3D_X20_X25s),
+ /* K31 */ be_nested_str_weak(shutter),
+ /* K32 */ be_nested_str_weak(get_power),
+ /* K33 */ be_nested_str_weak(relay),
+ /* K34 */ be_nested_str_weak(load),
+ /* K35 */ be_nested_str_weak(read_sensors),
+ /* K36 */ be_nested_str_weak(k2l),
+ /* K37 */ be_nested_str_weak(Temperature),
+ /* K38 */ be_nested_str_weak(_X23Temperature),
+ /* K39 */ be_nested_str_weak(temperature),
+ /* K40 */ be_nested_str_weak(filter),
+ /* K41 */ be_nested_str_weak(stop_iteration),
+ /* K42 */ be_nested_str_weak(Pressure),
+ /* K43 */ be_nested_str_weak(_X23Pressure),
+ /* K44 */ be_nested_str_weak(pressure),
+ /* K45 */ be_nested_str_weak(Illuminance),
+ /* K46 */ be_nested_str_weak(_X23Illuminance),
+ /* K47 */ be_nested_str_weak(illuminance),
+ /* K48 */ be_nested_str_weak(Humidity),
+ /* K49 */ be_nested_str_weak(_X23Humidity),
+ /* K50 */ be_nested_str_weak(humidity),
}),
- be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ be_str_weak(autoconf_device_map),
&be_const_str_solidified,
- ( &(const binstruction[22]) { /* code */
- 0x60040010, // 0000 GETGBL R1 G16
- 0x88080100, // 0001 GETMBR R2 R0 K0
- 0x8C080501, // 0002 GETMET R2 R2 K1
- 0x7C080200, // 0003 CALL R2 1
- 0x7C040200, // 0004 CALL R1 1
- 0xA802000B, // 0005 EXBLK 0 #0012
- 0x5C080200, // 0006 MOVE R2 R1
- 0x7C080000, // 0007 CALL R2 0
- 0x8C0C0502, // 0008 GETMET R3 R2 K2
- 0x7C0C0200, // 0009 CALL R3 1
- 0x780E0005, // 000A JMPF R3 #0011
- 0x8C0C0503, // 000B GETMET R3 R2 K3
- 0x7C0C0200, // 000C CALL R3 1
- 0x780E0002, // 000D JMPF R3 #0011
- 0x8C0C0104, // 000E GETMET R3 R0 K4
- 0x5C140400, // 000F MOVE R5 R2
- 0x7C0C0400, // 0010 CALL R3 2
- 0x7001FFF3, // 0011 JMP #0006
- 0x58040005, // 0012 LDCONST R1 K5
- 0xAC040200, // 0013 CATCH R1 1 0
- 0xB0080000, // 0014 RAISE 2 R0 R0
- 0x80000000, // 0015 RET 0
+ ( &(const binstruction[326]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x600C0013, // 0002 GETGBL R3 G19
+ 0x7C0C0000, // 0003 CALL R3 0
+ 0x60100013, // 0004 GETGBL R4 G19
+ 0x7C100000, // 0005 CALL R4 0
+ 0x98120704, // 0006 SETIDX R4 K3 K4
+ 0x980E0404, // 0007 SETIDX R3 K2 R4
+ 0x58100005, // 0008 LDCONST R4 K5
+ 0x50140000, // 0009 LDBOOL R5 0 0
+ 0xA41A0C00, // 000A IMPORT R6 K6
+ 0x8C1C0D07, // 000B GETMET R7 R6 K7
+ 0x7C1C0200, // 000C CALL R7 1
+ 0x4C200000, // 000D LDNIL R8
+ 0x20200E08, // 000E NE R8 R7 R8
+ 0x78220024, // 000F JMPF R8 #0035
+ 0x6020000C, // 0010 GETGBL R8 G12
+ 0x8C240F08, // 0011 GETMET R9 R7 K8
+ 0x582C0009, // 0012 LDCONST R11 K9
+ 0x5830000A, // 0013 LDCONST R12 K10
+ 0x7C240600, // 0014 CALL R9 3
+ 0x7C200200, // 0015 CALL R8 1
+ 0x2424110B, // 0016 GT R9 R8 K11
+ 0x7826001C, // 0017 JMPF R9 #0035
+ 0x1C241105, // 0018 EQ R9 R8 K5
+ 0x78260007, // 0019 JMPF R9 #0022
+ 0x60240008, // 001A GETGBL R9 G8
+ 0x5C280800, // 001B MOVE R10 R4
+ 0x7C240200, // 001C CALL R9 1
+ 0x60280013, // 001D GETGBL R10 G19
+ 0x7C280000, // 001E CALL R10 0
+ 0x982A070C, // 001F SETIDX R10 K3 K12
+ 0x980C120A, // 0020 SETIDX R3 R9 R10
+ 0x70020010, // 0021 JMP #0033
+ 0x1C24110D, // 0022 EQ R9 R8 K13
+ 0x78260007, // 0023 JMPF R9 #002C
+ 0x60240008, // 0024 GETGBL R9 G8
+ 0x5C280800, // 0025 MOVE R10 R4
+ 0x7C240200, // 0026 CALL R9 1
+ 0x60280013, // 0027 GETGBL R10 G19
+ 0x7C280000, // 0028 CALL R10 0
+ 0x982A070E, // 0029 SETIDX R10 K3 K14
+ 0x980C120A, // 002A SETIDX R3 R9 R10
+ 0x70020006, // 002B JMP #0033
+ 0x60240008, // 002C GETGBL R9 G8
+ 0x5C280800, // 002D MOVE R10 R4
+ 0x7C240200, // 002E CALL R9 1
+ 0x60280013, // 002F GETGBL R10 G19
+ 0x7C280000, // 0030 CALL R10 0
+ 0x982A070F, // 0031 SETIDX R10 K3 K15
+ 0x980C120A, // 0032 SETIDX R3 R9 R10
+ 0x50140200, // 0033 LDBOOL R5 1 0
+ 0x00100905, // 0034 ADD R4 R4 K5
+ 0xB8222000, // 0035 GETNGBL R8 K16
+ 0x8C201111, // 0036 GETMET R8 R8 K17
+ 0x58280012, // 0037 LDCONST R10 K18
+ 0x502C0200, // 0038 LDBOOL R11 1 0
+ 0x7C200600, // 0039 CALL R8 3
+ 0x60240012, // 003A GETGBL R9 G18
+ 0x7C240000, // 003B CALL R9 0
+ 0xB82A2000, // 003C GETNGBL R10 K16
+ 0x8C281513, // 003D GETMET R10 R10 K19
+ 0x60300008, // 003E GETGBL R12 G8
+ 0x5C341000, // 003F MOVE R13 R8
+ 0x7C300200, // 0040 CALL R12 1
+ 0x0032280C, // 0041 ADD R12 K20 R12
+ 0x58340015, // 0042 LDCONST R13 K21
+ 0x7C280600, // 0043 CALL R10 3
+ 0x8C281116, // 0044 GETMET R10 R8 K22
+ 0x58300017, // 0045 LDCONST R12 K23
+ 0x7C280400, // 0046 CALL R10 2
+ 0x782A0040, // 0047 JMPF R10 #0089
+ 0x94201117, // 0048 GETIDX R8 R8 K23
+ 0x5828000B, // 0049 LDCONST R10 K11
+ 0x502C0200, // 004A LDBOOL R11 1 0
+ 0x782E003C, // 004B JMPF R11 #0089
+ 0x602C0008, // 004C GETGBL R11 G8
+ 0x5C301400, // 004D MOVE R12 R10
+ 0x7C2C0200, // 004E CALL R11 1
+ 0x002E300B, // 004F ADD R11 K24 R11
+ 0x8C301116, // 0050 GETMET R12 R8 K22
+ 0x5C381600, // 0051 MOVE R14 R11
+ 0x7C300400, // 0052 CALL R12 2
+ 0x74320000, // 0053 JMPT R12 #0055
+ 0x70020033, // 0054 JMP #0089
+ 0x9430100B, // 0055 GETIDX R12 R8 R11
+ 0xB8362000, // 0056 GETNGBL R13 K16
+ 0x8C341B13, // 0057 GETMET R13 R13 K19
+ 0x8C3C0319, // 0058 GETMET R15 R1 K25
+ 0x5844001A, // 0059 LDCONST R17 K26
+ 0x5C481600, // 005A MOVE R18 R11
+ 0x604C0008, // 005B GETGBL R19 G8
+ 0x5C501800, // 005C MOVE R20 R12
+ 0x7C4C0200, // 005D CALL R19 1
+ 0x7C3C0800, // 005E CALL R15 4
+ 0x58400015, // 005F LDCONST R16 K21
+ 0x7C340600, // 0060 CALL R13 3
+ 0x8C341908, // 0061 GETMET R13 R12 K8
+ 0x583C001B, // 0062 LDCONST R15 K27
+ 0x5840000B, // 0063 LDCONST R16 K11
+ 0x7C340600, // 0064 CALL R13 3
+ 0x04341B05, // 0065 SUB R13 R13 K5
+ 0x8C381908, // 0066 GETMET R14 R12 K8
+ 0x5840001C, // 0067 LDCONST R16 K28
+ 0x5844000B, // 0068 LDCONST R17 K11
+ 0x7C380600, // 0069 CALL R14 3
+ 0x04381D05, // 006A SUB R14 R14 K5
+ 0x283C1B0B, // 006B GE R15 R13 K11
+ 0x783E0002, // 006C JMPF R15 #0070
+ 0x8C3C131D, // 006D GETMET R15 R9 K29
+ 0x5C441A00, // 006E MOVE R17 R13
+ 0x7C3C0400, // 006F CALL R15 2
+ 0x283C1D0B, // 0070 GE R15 R14 K11
+ 0x783E0002, // 0071 JMPF R15 #0075
+ 0x8C3C131D, // 0072 GETMET R15 R9 K29
+ 0x5C441C00, // 0073 MOVE R17 R14
+ 0x7C3C0400, // 0074 CALL R15 2
+ 0xB83E2000, // 0075 GETNGBL R15 K16
+ 0x8C3C1F13, // 0076 GETMET R15 R15 K19
+ 0x8C440319, // 0077 GETMET R17 R1 K25
+ 0x584C001E, // 0078 LDCONST R19 K30
+ 0x5C501A00, // 0079 MOVE R20 R13
+ 0x5C541C00, // 007A MOVE R21 R14
+ 0x7C440800, // 007B CALL R17 4
+ 0x58480015, // 007C LDCONST R18 K21
+ 0x7C3C0600, // 007D CALL R15 3
+ 0x603C0008, // 007E GETGBL R15 G8
+ 0x5C400800, // 007F MOVE R16 R4
+ 0x7C3C0200, // 0080 CALL R15 1
+ 0x60400013, // 0081 GETGBL R16 G19
+ 0x7C400000, // 0082 CALL R16 0
+ 0x9842071F, // 0083 SETIDX R16 K3 K31
+ 0x98423E0A, // 0084 SETIDX R16 K31 R10
+ 0x980C1E10, // 0085 SETIDX R3 R15 R16
+ 0x00100905, // 0086 ADD R4 R4 K5
+ 0x00281505, // 0087 ADD R10 R10 K5
+ 0x7001FFC0, // 0088 JMP #004A
+ 0x6028000C, // 0089 GETGBL R10 G12
+ 0xB82E2000, // 008A GETNGBL R11 K16
+ 0x8C2C1720, // 008B GETMET R11 R11 K32
+ 0x7C2C0200, // 008C CALL R11 1
+ 0x7C280200, // 008D CALL R10 1
+ 0x582C000B, // 008E LDCONST R11 K11
+ 0x78160000, // 008F JMPF R5 #0091
+ 0x04281505, // 0090 SUB R10 R10 K5
+ 0x1430160A, // 0091 LT R12 R11 R10
+ 0x78320010, // 0092 JMPF R12 #00A4
+ 0x8C301308, // 0093 GETMET R12 R9 K8
+ 0x5C381600, // 0094 MOVE R14 R11
+ 0x7C300400, // 0095 CALL R12 2
+ 0x4C340000, // 0096 LDNIL R13
+ 0x1C30180D, // 0097 EQ R12 R12 R13
+ 0x78320008, // 0098 JMPF R12 #00A2
+ 0x60300008, // 0099 GETGBL R12 G8
+ 0x5C340800, // 009A MOVE R13 R4
+ 0x7C300200, // 009B CALL R12 1
+ 0x60340013, // 009C GETGBL R13 G19
+ 0x7C340000, // 009D CALL R13 0
+ 0x98360721, // 009E SETIDX R13 K3 K33
+ 0x9836420B, // 009F SETIDX R13 K33 R11
+ 0x980C180D, // 00A0 SETIDX R3 R12 R13
+ 0x00100905, // 00A1 ADD R4 R4 K5
+ 0x002C1705, // 00A2 ADD R11 R11 K5
+ 0x7001FFEC, // 00A3 JMP #0091
+ 0x8C300522, // 00A4 GETMET R12 R2 K34
+ 0xB83A2000, // 00A5 GETNGBL R14 K16
+ 0x8C381D23, // 00A6 GETMET R14 R14 K35
+ 0x7C380200, // 00A7 CALL R14 1
+ 0x7C300400, // 00A8 CALL R12 2
+ 0x5412001F, // 00A9 LDINT R4 32
+ 0x60340010, // 00AA GETGBL R13 G16
+ 0x8C380124, // 00AB GETMET R14 R0 K36
+ 0x5C401800, // 00AC MOVE R16 R12
+ 0x7C380400, // 00AD CALL R14 2
+ 0x7C340200, // 00AE CALL R13 1
+ 0xA802001C, // 00AF EXBLK 0 #00CD
+ 0x5C381A00, // 00B0 MOVE R14 R13
+ 0x7C380000, // 00B1 CALL R14 0
+ 0x943C180E, // 00B2 GETIDX R15 R12 R14
+ 0x6040000F, // 00B3 GETGBL R16 G15
+ 0x5C441E00, // 00B4 MOVE R17 R15
+ 0x60480013, // 00B5 GETGBL R18 G19
+ 0x7C400400, // 00B6 CALL R16 2
+ 0x7842000D, // 00B7 JMPF R16 #00C6
+ 0x8C401F16, // 00B8 GETMET R16 R15 K22
+ 0x58480025, // 00B9 LDCONST R18 K37
+ 0x7C400400, // 00BA CALL R16 2
+ 0x78420009, // 00BB JMPF R16 #00C6
+ 0x00401D26, // 00BC ADD R16 R14 K38
+ 0x60440008, // 00BD GETGBL R17 G8
+ 0x5C480800, // 00BE MOVE R18 R4
+ 0x7C440200, // 00BF CALL R17 1
+ 0x60480013, // 00C0 GETGBL R18 G19
+ 0x7C480000, // 00C1 CALL R18 0
+ 0x984A0727, // 00C2 SETIDX R18 K3 K39
+ 0x984A5010, // 00C3 SETIDX R18 K40 R16
+ 0x980C2212, // 00C4 SETIDX R3 R17 R18
+ 0x00100905, // 00C5 ADD R4 R4 K5
+ 0x54420027, // 00C6 LDINT R16 40
+ 0x24400810, // 00C7 GT R16 R4 R16
+ 0x78420000, // 00C8 JMPF R16 #00CA
+ 0x70020000, // 00C9 JMP #00CB
+ 0x7001FFE4, // 00CA JMP #00B0
+ 0xA8040001, // 00CB EXBLK 1 1
+ 0x70020002, // 00CC JMP #00D0
+ 0x58340029, // 00CD LDCONST R13 K41
+ 0xAC340200, // 00CE CATCH R13 1 0
+ 0xB0080000, // 00CF RAISE 2 R0 R0
+ 0x54120027, // 00D0 LDINT R4 40
+ 0x60340010, // 00D1 GETGBL R13 G16
+ 0x8C380124, // 00D2 GETMET R14 R0 K36
+ 0x5C401800, // 00D3 MOVE R16 R12
+ 0x7C380400, // 00D4 CALL R14 2
+ 0x7C340200, // 00D5 CALL R13 1
+ 0xA802001C, // 00D6 EXBLK 0 #00F4
+ 0x5C381A00, // 00D7 MOVE R14 R13
+ 0x7C380000, // 00D8 CALL R14 0
+ 0x943C180E, // 00D9 GETIDX R15 R12 R14
+ 0x6040000F, // 00DA GETGBL R16 G15
+ 0x5C441E00, // 00DB MOVE R17 R15
+ 0x60480013, // 00DC GETGBL R18 G19
+ 0x7C400400, // 00DD CALL R16 2
+ 0x7842000D, // 00DE JMPF R16 #00ED
+ 0x8C401F16, // 00DF GETMET R16 R15 K22
+ 0x5848002A, // 00E0 LDCONST R18 K42
+ 0x7C400400, // 00E1 CALL R16 2
+ 0x78420009, // 00E2 JMPF R16 #00ED
+ 0x00401D2B, // 00E3 ADD R16 R14 K43
+ 0x60440008, // 00E4 GETGBL R17 G8
+ 0x5C480800, // 00E5 MOVE R18 R4
+ 0x7C440200, // 00E6 CALL R17 1
+ 0x60480013, // 00E7 GETGBL R18 G19
+ 0x7C480000, // 00E8 CALL R18 0
+ 0x984A072C, // 00E9 SETIDX R18 K3 K44
+ 0x984A5010, // 00EA SETIDX R18 K40 R16
+ 0x980C2212, // 00EB SETIDX R3 R17 R18
+ 0x00100905, // 00EC ADD R4 R4 K5
+ 0x5442002E, // 00ED LDINT R16 47
+ 0x24400810, // 00EE GT R16 R4 R16
+ 0x78420000, // 00EF JMPF R16 #00F1
+ 0x70020000, // 00F0 JMP #00F2
+ 0x7001FFE4, // 00F1 JMP #00D7
+ 0xA8040001, // 00F2 EXBLK 1 1
+ 0x70020002, // 00F3 JMP #00F7
+ 0x58340029, // 00F4 LDCONST R13 K41
+ 0xAC340200, // 00F5 CATCH R13 1 0
+ 0xB0080000, // 00F6 RAISE 2 R0 R0
+ 0x5412002F, // 00F7 LDINT R4 48
+ 0x60340010, // 00F8 GETGBL R13 G16
+ 0x8C380124, // 00F9 GETMET R14 R0 K36
+ 0x5C401800, // 00FA MOVE R16 R12
+ 0x7C380400, // 00FB CALL R14 2
+ 0x7C340200, // 00FC CALL R13 1
+ 0xA802001C, // 00FD EXBLK 0 #011B
+ 0x5C381A00, // 00FE MOVE R14 R13
+ 0x7C380000, // 00FF CALL R14 0
+ 0x943C180E, // 0100 GETIDX R15 R12 R14
+ 0x6040000F, // 0101 GETGBL R16 G15
+ 0x5C441E00, // 0102 MOVE R17 R15
+ 0x60480013, // 0103 GETGBL R18 G19
+ 0x7C400400, // 0104 CALL R16 2
+ 0x7842000D, // 0105 JMPF R16 #0114
+ 0x8C401F16, // 0106 GETMET R16 R15 K22
+ 0x5848002D, // 0107 LDCONST R18 K45
+ 0x7C400400, // 0108 CALL R16 2
+ 0x78420009, // 0109 JMPF R16 #0114
+ 0x00401D2E, // 010A ADD R16 R14 K46
+ 0x60440008, // 010B GETGBL R17 G8
+ 0x5C480800, // 010C MOVE R18 R4
+ 0x7C440200, // 010D CALL R17 1
+ 0x60480013, // 010E GETGBL R18 G19
+ 0x7C480000, // 010F CALL R18 0
+ 0x984A072F, // 0110 SETIDX R18 K3 K47
+ 0x984A5010, // 0111 SETIDX R18 K40 R16
+ 0x980C2212, // 0112 SETIDX R3 R17 R18
+ 0x00100905, // 0113 ADD R4 R4 K5
+ 0x54420037, // 0114 LDINT R16 56
+ 0x24400810, // 0115 GT R16 R4 R16
+ 0x78420000, // 0116 JMPF R16 #0118
+ 0x70020000, // 0117 JMP #0119
+ 0x7001FFE4, // 0118 JMP #00FE
+ 0xA8040001, // 0119 EXBLK 1 1
+ 0x70020002, // 011A JMP #011E
+ 0x58340029, // 011B LDCONST R13 K41
+ 0xAC340200, // 011C CATCH R13 1 0
+ 0xB0080000, // 011D RAISE 2 R0 R0
+ 0x54120037, // 011E LDINT R4 56
+ 0x60340010, // 011F GETGBL R13 G16
+ 0x8C380124, // 0120 GETMET R14 R0 K36
+ 0x5C401800, // 0121 MOVE R16 R12
+ 0x7C380400, // 0122 CALL R14 2
+ 0x7C340200, // 0123 CALL R13 1
+ 0xA802001C, // 0124 EXBLK 0 #0142
+ 0x5C381A00, // 0125 MOVE R14 R13
+ 0x7C380000, // 0126 CALL R14 0
+ 0x943C180E, // 0127 GETIDX R15 R12 R14
+ 0x6040000F, // 0128 GETGBL R16 G15
+ 0x5C441E00, // 0129 MOVE R17 R15
+ 0x60480013, // 012A GETGBL R18 G19
+ 0x7C400400, // 012B CALL R16 2
+ 0x7842000D, // 012C JMPF R16 #013B
+ 0x8C401F16, // 012D GETMET R16 R15 K22
+ 0x58480030, // 012E LDCONST R18 K48
+ 0x7C400400, // 012F CALL R16 2
+ 0x78420009, // 0130 JMPF R16 #013B
+ 0x00401D31, // 0131 ADD R16 R14 K49
+ 0x60440008, // 0132 GETGBL R17 G8
+ 0x5C480800, // 0133 MOVE R18 R4
+ 0x7C440200, // 0134 CALL R17 1
+ 0x60480013, // 0135 GETGBL R18 G19
+ 0x7C480000, // 0136 CALL R18 0
+ 0x984A0732, // 0137 SETIDX R18 K3 K50
+ 0x984A5010, // 0138 SETIDX R18 K40 R16
+ 0x980C2212, // 0139 SETIDX R3 R17 R18
+ 0x00100905, // 013A ADD R4 R4 K5
+ 0x5442003F, // 013B LDINT R16 64
+ 0x24400810, // 013C GT R16 R4 R16
+ 0x78420000, // 013D JMPF R16 #013F
+ 0x70020000, // 013E JMP #0140
+ 0x7001FFE4, // 013F JMP #0125
+ 0xA8040001, // 0140 EXBLK 1 1
+ 0x70020002, // 0141 JMP #0145
+ 0x58340029, // 0142 LDCONST R13 K41
+ 0xAC340200, // 0143 CATCH R13 1 0
+ 0xB0080000, // 0144 RAISE 2 R0 R0
+ 0x80040600, // 0145 RET 1 R3
})
)
);
@@ -4291,9 +2407,9 @@ be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name
/********************************************************************
-** Solidified function: save_before_restart
+** Solidified function: is_commissioning_open
********************************************************************/
-be_local_closure(Matter_Device_save_before_restart, /* name */
+be_local_closure(Matter_Device_is_commissioning_open, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@@ -4303,18 +2419,16 @@ be_local_closure(Matter_Device_save_before_restart, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(stop_basic_commissioning),
- /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
}),
- be_str_weak(save_before_restart),
+ be_str_weak(is_commissioning_open),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x8C040101, // 0002 GETMET R1 R0 K1
- 0x7C040200, // 0003 CALL R1 1
- 0x80000000, // 0004 RET 0
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x20040202, // 0002 NE R1 R1 R2
+ 0x80040200, // 0003 RET 1 R1
})
)
);
@@ -4322,151 +2436,231 @@ be_local_closure(Matter_Device_save_before_restart, /* name */
/********************************************************************
-** Solidified function: get_plugin_class_arg
+** Solidified function: init
********************************************************************/
-be_local_closure(Matter_Device_get_plugin_class_arg, /* name */
+be_local_closure(Matter_Device_init, /* name */
be_nested_proto(
- 5, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins_classes),
- /* K1 */ be_nested_str_weak(find),
- /* K2 */ be_nested_str_weak(ARG),
- /* K3 */ be_nested_str_weak(),
- }),
- be_str_weak(get_plugin_class_arg),
- &be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x5C100200, // 0002 MOVE R4 R1
- 0x7C080400, // 0003 CALL R2 2
- 0x780A0001, // 0004 JMPF R2 #0007
- 0x880C0502, // 0005 GETMBR R3 R2 K2
- 0x70020000, // 0006 JMP #0008
- 0x580C0003, // 0007 LDCONST R3 K3
- 0x80040600, // 0008 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: msg_received
-********************************************************************/
-be_local_closure(Matter_Device_msg_received, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(message_handler),
- /* K1 */ be_nested_str_weak(msg_received),
- }),
- be_str_weak(msg_received),
- &be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x88100100, // 0000 GETMBR R4 R0 K0
- 0x8C100901, // 0001 GETMET R4 R4 K1
- 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: k2l_num
-********************************************************************/
-be_local_closure(Matter_Device_k2l_num, /* name */
- be_nested_proto(
- 9, /* nstack */
+ 8, /* nstack */
1, /* argc */
- 4, /* varg */
+ 2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_const_class(be_class_Matter_Device),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
- /* K4 */ be_const_int(1),
- /* K5 */ be_const_int(0),
+ 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
+ })
+ ),
}),
- be_str_weak(k2l_num),
+ 1, /* has constants */
+ ( &(const bvalue[41]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(UI),
+ /* K7 */ be_nested_str_weak(started),
+ /* K8 */ be_nested_str_weak(tick),
+ /* K9 */ be_const_int(0),
+ /* K10 */ be_nested_str_weak(plugins),
+ /* K11 */ be_nested_str_weak(plugins_persist),
+ /* K12 */ be_nested_str_weak(plugins_classes),
+ /* K13 */ be_nested_str_weak(register_native_classes),
+ /* K14 */ be_nested_str_weak(vendorid),
+ /* K15 */ be_nested_str_weak(VENDOR_ID),
+ /* K16 */ be_nested_str_weak(productid),
+ /* K17 */ be_nested_str_weak(PRODUCT_ID),
+ /* K18 */ be_nested_str_weak(root_iterations),
+ /* K19 */ be_nested_str_weak(PBKDF_ITERATIONS),
+ /* K20 */ be_nested_str_weak(root_salt),
+ /* K21 */ be_nested_str_weak(random),
+ /* K22 */ be_nested_str_weak(ipv4only),
+ /* K23 */ be_nested_str_weak(load_param),
+ /* K24 */ be_nested_str_weak(sessions),
+ /* K25 */ be_nested_str_weak(Session_Store),
+ /* K26 */ be_nested_str_weak(load_fabrics),
+ /* K27 */ be_nested_str_weak(message_handler),
+ /* K28 */ be_nested_str_weak(MessageHandler),
+ /* K29 */ be_nested_str_weak(ui),
+ /* K30 */ be_nested_str_weak(wifi),
+ /* K31 */ be_nested_str_weak(up),
+ /* K32 */ be_nested_str_weak(eth),
+ /* K33 */ be_nested_str_weak(start),
+ /* K34 */ be_nested_str_weak(add_rule),
+ /* K35 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K36 */ be_nested_str_weak(matter_start),
+ /* K37 */ be_nested_str_weak(Eth_X23Connected),
+ /* K38 */ be_nested_str_weak(_init_basic_commissioning),
+ /* K39 */ be_nested_str_weak(add_driver),
+ /* K40 */ be_nested_str_weak(register_commands),
+ }),
+ be_str_weak(init),
&be_const_str_solidified,
- ( &(const binstruction[52]) { /* code */
- 0x58040000, // 0000 LDCONST R1 K0
- 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
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 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
- 0x8C140502, // 000E GETMET R5 R2 K2
- 0x601C0009, // 000F GETGBL R7 G9
- 0x5C200800, // 0010 MOVE R8 R4
- 0x7C1C0200, // 0011 CALL R7 1
- 0x7C140400, // 0012 CALL R5 2
- 0x7001FFF7, // 0013 JMP #000C
- 0x580C0003, // 0014 LDCONST R3 K3
- 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
- 0x04100904, // 001B SUB R4 R4 K4
- 0x40120804, // 001C CONNECT R4 K4 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
- 0x241C0D05, // 0023 GT R7 R6 K5
- 0x781E0008, // 0024 JMPF R7 #002E
- 0x041C0D04, // 0025 SUB R7 R6 K4
- 0x941C0407, // 0026 GETIDX R7 R2 R7
- 0x241C0E05, // 0027 GT R7 R7 R5
- 0x781E0004, // 0028 JMPF R7 #002E
- 0x041C0D04, // 0029 SUB R7 R6 K4
- 0x941C0407, // 002A GETIDX R7 R2 R7
- 0x98080C07, // 002B SETIDX R2 R6 R7
- 0x04180D04, // 002C SUB R6 R6 K4
- 0x7001FFF4, // 002D JMP #0023
- 0x98080C05, // 002E SETIDX R2 R6 R5
- 0x7001FFEE, // 002F JMP #001F
- 0x580C0003, // 0030 LDCONST R3 K3
- 0xAC0C0200, // 0031 CATCH R3 1 0
- 0xB0080000, // 0032 RAISE 2 R0 R0
- 0x80040400, // 0033 RET 1 R2
+ ( &(const binstruction[102]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xB80E0400, // 0002 GETNGBL R3 K2
+ 0x8C0C0703, // 0003 GETMET R3 R3 K3
+ 0xB8160800, // 0004 GETNGBL R5 K4
+ 0x88140B05, // 0005 GETMBR R5 R5 K5
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x740E0004, // 0007 JMPT R3 #000D
+ 0xB80E0800, // 0008 GETNGBL R3 K4
+ 0x8C0C0706, // 0009 GETMET R3 R3 K6
+ 0x5C140000, // 000A MOVE R5 R0
+ 0x7C0C0400, // 000B CALL R3 2
+ 0x80000600, // 000C RET 0
+ 0x500C0000, // 000D LDBOOL R3 0 0
+ 0x90020E03, // 000E SETMBR R0 K7 R3
+ 0x90021109, // 000F SETMBR R0 K8 K9
+ 0x600C0012, // 0010 GETGBL R3 G18
+ 0x7C0C0000, // 0011 CALL R3 0
+ 0x90021403, // 0012 SETMBR R0 K10 R3
+ 0x500C0000, // 0013 LDBOOL R3 0 0
+ 0x90021603, // 0014 SETMBR R0 K11 R3
+ 0x600C0013, // 0015 GETGBL R3 G19
+ 0x7C0C0000, // 0016 CALL R3 0
+ 0x90021803, // 0017 SETMBR R0 K12 R3
+ 0x8C0C010D, // 0018 GETMET R3 R0 K13
+ 0x7C0C0200, // 0019 CALL R3 1
+ 0x880C010F, // 001A GETMBR R3 R0 K15
+ 0x90021C03, // 001B SETMBR R0 K14 R3
+ 0x880C0111, // 001C GETMBR R3 R0 K17
+ 0x90022003, // 001D SETMBR R0 K16 R3
+ 0x880C0113, // 001E GETMBR R3 R0 K19
+ 0x90022403, // 001F SETMBR R0 K18 R3
+ 0x8C0C0315, // 0020 GETMET R3 R1 K21
+ 0x5416000F, // 0021 LDINT R5 16
+ 0x7C0C0400, // 0022 CALL R3 2
+ 0x90022803, // 0023 SETMBR R0 K20 R3
+ 0x500C0000, // 0024 LDBOOL R3 0 0
+ 0x90022C03, // 0025 SETMBR R0 K22 R3
+ 0x8C0C0117, // 0026 GETMET R3 R0 K23
+ 0x7C0C0200, // 0027 CALL R3 1
+ 0xB80E0800, // 0028 GETNGBL R3 K4
+ 0x8C0C0719, // 0029 GETMET R3 R3 K25
+ 0x5C140000, // 002A MOVE R5 R0
+ 0x7C0C0400, // 002B CALL R3 2
+ 0x90023003, // 002C SETMBR R0 K24 R3
+ 0x880C0118, // 002D GETMBR R3 R0 K24
+ 0x8C0C071A, // 002E GETMET R3 R3 K26
+ 0x7C0C0200, // 002F CALL R3 1
+ 0xB80E0800, // 0030 GETNGBL R3 K4
+ 0x8C0C071C, // 0031 GETMET R3 R3 K28
+ 0x5C140000, // 0032 MOVE R5 R0
+ 0x7C0C0400, // 0033 CALL R3 2
+ 0x90023603, // 0034 SETMBR R0 K27 R3
+ 0xB80E0800, // 0035 GETNGBL R3 K4
+ 0x8C0C0706, // 0036 GETMET R3 R3 K6
+ 0x5C140000, // 0037 MOVE R5 R0
+ 0x7C0C0400, // 0038 CALL R3 2
+ 0x90023A03, // 0039 SETMBR R0 K29 R3
+ 0xB80E0400, // 003A GETNGBL R3 K2
+ 0x8C0C071E, // 003B GETMET R3 R3 K30
+ 0x7C0C0200, // 003C CALL R3 1
+ 0x940C071F, // 003D GETIDX R3 R3 K31
+ 0x740E0004, // 003E JMPT R3 #0044
+ 0xB80E0400, // 003F GETNGBL R3 K2
+ 0x8C0C0720, // 0040 GETMET R3 R3 K32
+ 0x7C0C0200, // 0041 CALL R3 1
+ 0x940C071F, // 0042 GETIDX R3 R3 K31
+ 0x780E0001, // 0043 JMPF R3 #0046
+ 0x8C0C0121, // 0044 GETMET R3 R0 K33
+ 0x7C0C0200, // 0045 CALL R3 1
+ 0xB80E0400, // 0046 GETNGBL R3 K2
+ 0x8C0C071E, // 0047 GETMET R3 R3 K30
+ 0x7C0C0200, // 0048 CALL R3 1
+ 0x940C071F, // 0049 GETIDX R3 R3 K31
+ 0x740E0005, // 004A JMPT R3 #0051
+ 0xB80E0400, // 004B GETNGBL R3 K2
+ 0x8C0C0722, // 004C GETMET R3 R3 K34
+ 0x58140023, // 004D LDCONST R5 K35
+ 0x84180000, // 004E CLOSURE R6 P0
+ 0x581C0024, // 004F LDCONST R7 K36
+ 0x7C0C0800, // 0050 CALL R3 4
+ 0xB80E0400, // 0051 GETNGBL R3 K2
+ 0x8C0C0720, // 0052 GETMET R3 R3 K32
+ 0x7C0C0200, // 0053 CALL R3 1
+ 0x940C071F, // 0054 GETIDX R3 R3 K31
+ 0x740E0005, // 0055 JMPT R3 #005C
+ 0xB80E0400, // 0056 GETNGBL R3 K2
+ 0x8C0C0722, // 0057 GETMET R3 R3 K34
+ 0x58140025, // 0058 LDCONST R5 K37
+ 0x84180001, // 0059 CLOSURE R6 P1
+ 0x581C0024, // 005A LDCONST R7 K36
+ 0x7C0C0800, // 005B CALL R3 4
+ 0x8C0C0126, // 005C GETMET R3 R0 K38
+ 0x7C0C0200, // 005D CALL R3 1
+ 0xB80E0400, // 005E GETNGBL R3 K2
+ 0x8C0C0727, // 005F GETMET R3 R3 K39
+ 0x5C140000, // 0060 MOVE R5 R0
+ 0x7C0C0400, // 0061 CALL R3 2
+ 0x8C0C0128, // 0062 GETMET R3 R0 K40
+ 0x7C0C0200, // 0063 CALL R3 1
+ 0xA0000000, // 0064 CLOSE R0
+ 0x80000000, // 0065 RET 0
})
)
);
@@ -4603,11 +2797,11 @@ be_local_closure(Matter_Device_mdns_remove_op_discovery, /* name */
/********************************************************************
-** Solidified function: get_plugin_class_displayname
+** Solidified function: _mdns_announce_hostname
********************************************************************/
-be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */
+be_local_closure(Matter_Device__mdns_announce_hostname, /* name */
be_nested_proto(
- 5, /* nstack */
+ 16, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -4615,87 +2809,211 @@ be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(plugins_classes),
- /* K1 */ be_nested_str_weak(find),
- /* K2 */ be_nested_str_weak(NAME),
- /* K3 */ be_nested_str_weak(),
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(start),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(eth),
+ /* K5 */ be_nested_str_weak(hostname_eth),
+ /* K6 */ be_nested_str_weak(replace),
+ /* K7 */ be_nested_str_weak(find),
+ /* K8 */ be_nested_str_weak(mac),
+ /* K9 */ be_nested_str_weak(_X3A),
+ /* K10 */ be_nested_str_weak(),
+ /* K11 */ be_nested_str_weak(ipv4only),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K15 */ be_nested_str_weak(ip6local),
+ /* K16 */ be_nested_str_weak(ip),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(add_hostname),
+ /* K19 */ be_nested_str_weak(ip6),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eadd_hostname_X28_X25s_X2C_X20_X25s_X29),
+ /* K21 */ be_nested_str_weak(wifi),
+ /* K22 */ be_nested_str_weak(hostname_wifi),
+ /* K23 */ be_nested_str_weak(MTR_X3A_X20start_X20mDNS_X20on_X20_X25s_X20host_X20_X27_X25s_X2Elocal_X27),
+ /* K24 */ be_const_int(2),
+ /* K25 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K26 */ be_nested_str_weak(_X7C),
+ /* K27 */ be_nested_str_weak(mdns_announce_op_discovery_all_fabrics),
}),
- be_str_weak(get_plugin_class_displayname),
+ be_str_weak(_mdns_announce_hostname),
&be_const_str_solidified,
- ( &(const binstruction[ 9]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x5C100200, // 0002 MOVE R4 R1
- 0x7C080400, // 0003 CALL R2 2
- 0x780A0001, // 0004 JMPF R2 #0007
- 0x880C0502, // 0005 GETMBR R3 R2 K2
- 0x70020000, // 0006 JMP #0008
- 0x580C0003, // 0007 LDCONST R3 K3
- 0x80040600, // 0008 RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Device_every_second, /* name */
- be_nested_proto(
- 4, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(sessions),
- /* K1 */ be_nested_str_weak(every_second),
- /* K2 */ be_nested_str_weak(message_handler),
- /* K3 */ be_nested_str_weak(commissioning_open),
- /* K4 */ be_nested_str_weak(tasmota),
- /* K5 */ be_nested_str_weak(time_reached),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(plugins),
- /* K8 */ be_const_int(1),
- }),
- be_str_weak(every_second),
- &be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x7C040200, // 0002 CALL R1 1
- 0x88040102, // 0003 GETMBR R1 R0 K2
- 0x8C040301, // 0004 GETMET R1 R1 K1
- 0x7C040200, // 0005 CALL R1 1
- 0x88040103, // 0006 GETMBR R1 R0 K3
- 0x4C080000, // 0007 LDNIL R2
- 0x20040202, // 0008 NE R1 R1 R2
- 0x78060006, // 0009 JMPF R1 #0011
- 0xB8060800, // 000A GETNGBL R1 K4
- 0x8C040305, // 000B GETMET R1 R1 K5
- 0x880C0103, // 000C GETMBR R3 R0 K3
- 0x7C040400, // 000D CALL R1 2
- 0x78060001, // 000E JMPF R1 #0011
- 0x4C040000, // 000F LDNIL R1
- 0x90020601, // 0010 SETMBR R0 K3 R1
- 0x58040006, // 0011 LDCONST R1 K6
- 0x6008000C, // 0012 GETGBL R2 G12
- 0x880C0107, // 0013 GETMBR R3 R0 K7
- 0x7C080200, // 0014 CALL R2 1
- 0x14080202, // 0015 LT R2 R1 R2
- 0x780A0005, // 0016 JMPF R2 #001D
- 0x88080107, // 0017 GETMBR R2 R0 K7
- 0x94080401, // 0018 GETIDX R2 R2 R1
- 0x8C080501, // 0019 GETMET R2 R2 K1
- 0x7C080200, // 001A CALL R2 1
- 0x00040308, // 001B ADD R1 R1 K8
- 0x7001FFF4, // 001C JMP #0012
- 0x80000000, // 001D RET 0
+ ( &(const binstruction[172]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0x8C100502, // 0002 GETMET R4 R2 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0xA8020092, // 0004 EXBLK 0 #0098
+ 0x78060040, // 0005 JMPF R1 #0047
+ 0xB8120600, // 0006 GETNGBL R4 K3
+ 0x8C100904, // 0007 GETMET R4 R4 K4
+ 0x7C100200, // 0008 CALL R4 1
+ 0x8C140706, // 0009 GETMET R5 R3 K6
+ 0x8C1C0907, // 000A GETMET R7 R4 K7
+ 0x58240008, // 000B LDCONST R9 K8
+ 0x7C1C0400, // 000C CALL R7 2
+ 0x58200009, // 000D LDCONST R8 K9
+ 0x5824000A, // 000E LDCONST R9 K10
+ 0x7C140800, // 000F CALL R5 4
+ 0x90020A05, // 0010 SETMBR R0 K5 R5
+ 0x8814010B, // 0011 GETMBR R5 R0 K11
+ 0x7416001F, // 0012 JMPT R5 #0033
+ 0xB8160600, // 0013 GETNGBL R5 K3
+ 0x8C140B0C, // 0014 GETMET R5 R5 K12
+ 0x8C1C070D, // 0015 GETMET R7 R3 K13
+ 0x5824000E, // 0016 LDCONST R9 K14
+ 0x88280105, // 0017 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0018 GETMET R11 R4 K7
+ 0x5834000F, // 0019 LDCONST R13 K15
+ 0x5838000A, // 001A LDCONST R14 K10
+ 0x7C2C0600, // 001B CALL R11 3
+ 0x8C300907, // 001C GETMET R12 R4 K7
+ 0x58380010, // 001D LDCONST R14 K16
+ 0x583C000A, // 001E LDCONST R15 K10
+ 0x7C300600, // 001F CALL R12 3
+ 0x7C1C0A00, // 0020 CALL R7 5
+ 0x58200011, // 0021 LDCONST R8 K17
+ 0x7C140600, // 0022 CALL R5 3
+ 0x8C140512, // 0023 GETMET R5 R2 K18
+ 0x881C0105, // 0024 GETMBR R7 R0 K5
+ 0x8C200907, // 0025 GETMET R8 R4 K7
+ 0x5828000F, // 0026 LDCONST R10 K15
+ 0x582C000A, // 0027 LDCONST R11 K10
+ 0x7C200600, // 0028 CALL R8 3
+ 0x8C240907, // 0029 GETMET R9 R4 K7
+ 0x582C0010, // 002A LDCONST R11 K16
+ 0x5830000A, // 002B LDCONST R12 K10
+ 0x7C240600, // 002C CALL R9 3
+ 0x8C280907, // 002D GETMET R10 R4 K7
+ 0x58300013, // 002E LDCONST R12 K19
+ 0x5834000A, // 002F LDCONST R13 K10
+ 0x7C280600, // 0030 CALL R10 3
+ 0x7C140A00, // 0031 CALL R5 5
+ 0x70020012, // 0032 JMP #0046
+ 0xB8160600, // 0033 GETNGBL R5 K3
+ 0x8C140B0C, // 0034 GETMET R5 R5 K12
+ 0x8C1C070D, // 0035 GETMET R7 R3 K13
+ 0x58240014, // 0036 LDCONST R9 K20
+ 0x88280105, // 0037 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0038 GETMET R11 R4 K7
+ 0x58340010, // 0039 LDCONST R13 K16
+ 0x5838000A, // 003A LDCONST R14 K10
+ 0x7C2C0600, // 003B CALL R11 3
+ 0x7C1C0800, // 003C CALL R7 4
+ 0x58200011, // 003D LDCONST R8 K17
+ 0x7C140600, // 003E CALL R5 3
+ 0x8C140512, // 003F GETMET R5 R2 K18
+ 0x881C0105, // 0040 GETMBR R7 R0 K5
+ 0x8C200907, // 0041 GETMET R8 R4 K7
+ 0x58280010, // 0042 LDCONST R10 K16
+ 0x582C000A, // 0043 LDCONST R11 K10
+ 0x7C200600, // 0044 CALL R8 3
+ 0x7C140600, // 0045 CALL R5 3
+ 0x7002003F, // 0046 JMP #0087
+ 0xB8120600, // 0047 GETNGBL R4 K3
+ 0x8C100915, // 0048 GETMET R4 R4 K21
+ 0x7C100200, // 0049 CALL R4 1
+ 0x8C140706, // 004A GETMET R5 R3 K6
+ 0x8C1C0907, // 004B GETMET R7 R4 K7
+ 0x58240008, // 004C LDCONST R9 K8
+ 0x7C1C0400, // 004D CALL R7 2
+ 0x58200009, // 004E LDCONST R8 K9
+ 0x5824000A, // 004F LDCONST R9 K10
+ 0x7C140800, // 0050 CALL R5 4
+ 0x90022C05, // 0051 SETMBR R0 K22 R5
+ 0x8814010B, // 0052 GETMBR R5 R0 K11
+ 0x7416001F, // 0053 JMPT R5 #0074
+ 0xB8160600, // 0054 GETNGBL R5 K3
+ 0x8C140B0C, // 0055 GETMET R5 R5 K12
+ 0x8C1C070D, // 0056 GETMET R7 R3 K13
+ 0x5824000E, // 0057 LDCONST R9 K14
+ 0x88280116, // 0058 GETMBR R10 R0 K22
+ 0x8C2C0907, // 0059 GETMET R11 R4 K7
+ 0x5834000F, // 005A LDCONST R13 K15
+ 0x5838000A, // 005B LDCONST R14 K10
+ 0x7C2C0600, // 005C CALL R11 3
+ 0x8C300907, // 005D GETMET R12 R4 K7
+ 0x58380010, // 005E LDCONST R14 K16
+ 0x583C000A, // 005F LDCONST R15 K10
+ 0x7C300600, // 0060 CALL R12 3
+ 0x7C1C0A00, // 0061 CALL R7 5
+ 0x58200011, // 0062 LDCONST R8 K17
+ 0x7C140600, // 0063 CALL R5 3
+ 0x8C140512, // 0064 GETMET R5 R2 K18
+ 0x881C0116, // 0065 GETMBR R7 R0 K22
+ 0x8C200907, // 0066 GETMET R8 R4 K7
+ 0x5828000F, // 0067 LDCONST R10 K15
+ 0x582C000A, // 0068 LDCONST R11 K10
+ 0x7C200600, // 0069 CALL R8 3
+ 0x8C240907, // 006A GETMET R9 R4 K7
+ 0x582C0010, // 006B LDCONST R11 K16
+ 0x5830000A, // 006C LDCONST R12 K10
+ 0x7C240600, // 006D CALL R9 3
+ 0x8C280907, // 006E GETMET R10 R4 K7
+ 0x58300013, // 006F LDCONST R12 K19
+ 0x5834000A, // 0070 LDCONST R13 K10
+ 0x7C280600, // 0071 CALL R10 3
+ 0x7C140A00, // 0072 CALL R5 5
+ 0x70020012, // 0073 JMP #0087
+ 0xB8160600, // 0074 GETNGBL R5 K3
+ 0x8C140B0C, // 0075 GETMET R5 R5 K12
+ 0x8C1C070D, // 0076 GETMET R7 R3 K13
+ 0x58240014, // 0077 LDCONST R9 K20
+ 0x88280105, // 0078 GETMBR R10 R0 K5
+ 0x8C2C0907, // 0079 GETMET R11 R4 K7
+ 0x58340010, // 007A LDCONST R13 K16
+ 0x5838000A, // 007B LDCONST R14 K10
+ 0x7C2C0600, // 007C CALL R11 3
+ 0x7C1C0800, // 007D CALL R7 4
+ 0x58200011, // 007E LDCONST R8 K17
+ 0x7C140600, // 007F CALL R5 3
+ 0x8C140512, // 0080 GETMET R5 R2 K18
+ 0x881C0116, // 0081 GETMBR R7 R0 K22
+ 0x8C200907, // 0082 GETMET R8 R4 K7
+ 0x58280010, // 0083 LDCONST R10 K16
+ 0x582C000A, // 0084 LDCONST R11 K10
+ 0x7C200600, // 0085 CALL R8 3
+ 0x7C140600, // 0086 CALL R5 3
+ 0xB8120600, // 0087 GETNGBL R4 K3
+ 0x8C10090C, // 0088 GETMET R4 R4 K12
+ 0x8C18070D, // 0089 GETMET R6 R3 K13
+ 0x58200017, // 008A LDCONST R8 K23
+ 0x78060001, // 008B JMPF R1 #008E
+ 0x58240004, // 008C LDCONST R9 K4
+ 0x70020000, // 008D JMP #008F
+ 0x58240015, // 008E LDCONST R9 K21
+ 0x78060001, // 008F JMPF R1 #0092
+ 0x88280105, // 0090 GETMBR R10 R0 K5
+ 0x70020000, // 0091 JMP #0093
+ 0x88280116, // 0092 GETMBR R10 R0 K22
+ 0x7C180800, // 0093 CALL R6 4
+ 0x581C0018, // 0094 LDCONST R7 K24
+ 0x7C100600, // 0095 CALL R4 3
+ 0xA8040001, // 0096 EXBLK 1 1
+ 0x70020010, // 0097 JMP #00A9
+ 0xAC100002, // 0098 CATCH R4 0 2
+ 0x7002000D, // 0099 JMP #00A8
+ 0xB81A0600, // 009A GETNGBL R6 K3
+ 0x8C180D0C, // 009B GETMET R6 R6 K12
+ 0x60200008, // 009C GETGBL R8 G8
+ 0x5C240800, // 009D MOVE R9 R4
+ 0x7C200200, // 009E CALL R8 1
+ 0x00223208, // 009F ADD R8 K25 R8
+ 0x0020111A, // 00A0 ADD R8 R8 K26
+ 0x60240008, // 00A1 GETGBL R9 G8
+ 0x5C280A00, // 00A2 MOVE R10 R5
+ 0x7C240200, // 00A3 CALL R9 1
+ 0x00201009, // 00A4 ADD R8 R8 R9
+ 0x58240018, // 00A5 LDCONST R9 K24
+ 0x7C180600, // 00A6 CALL R6 3
+ 0x70020000, // 00A7 JMP #00A9
+ 0xB0080000, // 00A8 RAISE 2 R0 R0
+ 0x8C10011B, // 00A9 GETMET R4 R0 K27
+ 0x7C100200, // 00AA CALL R4 1
+ 0x80000000, // 00AB RET 0
})
)
);
@@ -4834,25 +3152,1888 @@ be_local_closure(Matter_Device_start_mdns_announce_hostnames, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: MtrJoin
+********************************************************************/
+be_local_closure(Matter_Device_MtrJoin, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K1 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(resp_cmnd_done),
+ }),
+ be_str_weak(MtrJoin),
+ &be_const_str_solidified,
+ ( &(const binstruction[13]) { /* code */
+ 0x60140009, // 0000 GETGBL R5 G9
+ 0x5C180600, // 0001 MOVE R6 R3
+ 0x7C140200, // 0002 CALL R5 1
+ 0x78160002, // 0003 JMPF R5 #0007
+ 0x8C180100, // 0004 GETMET R6 R0 K0
+ 0x7C180200, // 0005 CALL R6 1
+ 0x70020001, // 0006 JMP #0009
+ 0x8C180101, // 0007 GETMET R6 R0 K1
+ 0x7C180200, // 0008 CALL R6 1
+ 0xB81A0400, // 0009 GETNGBL R6 K2
+ 0x8C180D03, // 000A GETMET R6 R6 K3
+ 0x7C180200, // 000B CALL R6 1
+ 0x80000000, // 000C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: _load_plugins_config
+********************************************************************/
+be_local_closure(Matter_Device__load_plugins_config, /* name */
+ be_nested_proto(
+ 19, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[27]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(k2l_num),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(log),
+ /* K4 */ be_nested_str_weak(MTR_X3A_X20endpoints_X20to_X20be_X20configured_X20),
+ /* K5 */ be_const_int(3),
+ /* K6 */ be_nested_str_weak(format),
+ /* K7 */ be_nested_str_weak(MTR_X3A_X20endpoint_X20_X25i_X20config_X20_X25s),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(type),
+ /* K10 */ be_nested_str_weak(MTR_X3A_X20no_X20class_X20name_X2C_X20skipping),
+ /* K11 */ be_nested_str_weak(plugins_classes),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20unknown_X20class_X20name_X20_X27),
+ /* K13 */ be_nested_str_weak(_X27_X20skipping),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(plugins),
+ /* K16 */ be_nested_str_weak(push),
+ /* K17 */ be_nested_str_weak(),
+ /* K18 */ be_nested_str_weak(k2l),
+ /* K19 */ be_nested_str_weak(_X20_X25s_X3A_X25s),
+ /* K20 */ be_nested_str_weak(stop_iteration),
+ /* K21 */ be_nested_str_weak(MTR_X3A_X20endpoint_X3A_X25i_X20type_X3A_X25s_X25s),
+ /* K22 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K23 */ be_nested_str_weak(_X7C),
+ /* K24 */ be_nested_str_weak(publish_result),
+ /* K25 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Initialized_X22_X3A1_X7D_X7D),
+ /* K26 */ be_nested_str_weak(Matter),
+ }),
+ be_str_weak(_load_plugins_config),
+ &be_const_str_solidified,
+ ( &(const binstruction[133]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0101, // 0001 GETMET R3 R0 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0xB8120400, // 0004 GETNGBL R4 K2
+ 0x8C100903, // 0005 GETMET R4 R4 K3
+ 0x60180008, // 0006 GETGBL R6 G8
+ 0x5C1C0600, // 0007 MOVE R7 R3
+ 0x7C180200, // 0008 CALL R6 1
+ 0x001A0806, // 0009 ADD R6 K4 R6
+ 0x581C0005, // 000A LDCONST R7 K5
+ 0x7C100600, // 000B CALL R4 3
+ 0x60100010, // 000C GETGBL R4 G16
+ 0x5C140600, // 000D MOVE R5 R3
+ 0x7C100200, // 000E CALL R4 1
+ 0xA802006B, // 000F EXBLK 0 #007C
+ 0x5C140800, // 0010 MOVE R5 R4
+ 0x7C140000, // 0011 CALL R5 0
+ 0xA8020056, // 0012 EXBLK 0 #006A
+ 0x60180008, // 0013 GETGBL R6 G8
+ 0x5C1C0A00, // 0014 MOVE R7 R5
+ 0x7C180200, // 0015 CALL R6 1
+ 0x94180206, // 0016 GETIDX R6 R1 R6
+ 0xB81E0400, // 0017 GETNGBL R7 K2
+ 0x8C1C0F03, // 0018 GETMET R7 R7 K3
+ 0x8C240506, // 0019 GETMET R9 R2 K6
+ 0x582C0007, // 001A LDCONST R11 K7
+ 0x5C300A00, // 001B MOVE R12 R5
+ 0x5C340C00, // 001C MOVE R13 R6
+ 0x7C240800, // 001D CALL R9 4
+ 0x58280005, // 001E LDCONST R10 K5
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x8C1C0D08, // 0020 GETMET R7 R6 K8
+ 0x58240009, // 0021 LDCONST R9 K9
+ 0x7C1C0400, // 0022 CALL R7 2
+ 0x4C200000, // 0023 LDNIL R8
+ 0x1C200E08, // 0024 EQ R8 R7 R8
+ 0x78220006, // 0025 JMPF R8 #002D
+ 0xB8220400, // 0026 GETNGBL R8 K2
+ 0x8C201103, // 0027 GETMET R8 R8 K3
+ 0x5828000A, // 0028 LDCONST R10 K10
+ 0x582C0005, // 0029 LDCONST R11 K5
+ 0x7C200600, // 002A CALL R8 3
+ 0xA8040001, // 002B EXBLK 1 1
+ 0x7001FFE2, // 002C JMP #0010
+ 0x8820010B, // 002D GETMBR R8 R0 K11
+ 0x8C201108, // 002E GETMET R8 R8 K8
+ 0x5C280E00, // 002F MOVE R10 R7
+ 0x7C200400, // 0030 CALL R8 2
+ 0x4C240000, // 0031 LDNIL R9
+ 0x1C241009, // 0032 EQ R9 R8 R9
+ 0x7826000A, // 0033 JMPF R9 #003F
+ 0xB8260400, // 0034 GETNGBL R9 K2
+ 0x8C241303, // 0035 GETMET R9 R9 K3
+ 0x602C0008, // 0036 GETGBL R11 G8
+ 0x5C300E00, // 0037 MOVE R12 R7
+ 0x7C2C0200, // 0038 CALL R11 1
+ 0x002E180B, // 0039 ADD R11 K12 R11
+ 0x002C170D, // 003A ADD R11 R11 K13
+ 0x5830000E, // 003B LDCONST R12 K14
+ 0x7C240600, // 003C CALL R9 3
+ 0xA8040001, // 003D EXBLK 1 1
+ 0x7001FFD0, // 003E JMP #0010
+ 0x5C241000, // 003F MOVE R9 R8
+ 0x5C280000, // 0040 MOVE R10 R0
+ 0x5C2C0A00, // 0041 MOVE R11 R5
+ 0x5C300C00, // 0042 MOVE R12 R6
+ 0x7C240600, // 0043 CALL R9 3
+ 0x8828010F, // 0044 GETMBR R10 R0 K15
+ 0x8C281510, // 0045 GETMET R10 R10 K16
+ 0x5C301200, // 0046 MOVE R12 R9
+ 0x7C280400, // 0047 CALL R10 2
+ 0x58280011, // 0048 LDCONST R10 K17
+ 0x602C0010, // 0049 GETGBL R11 G16
+ 0x8C300112, // 004A GETMET R12 R0 K18
+ 0x5C380C00, // 004B MOVE R14 R6
+ 0x7C300400, // 004C CALL R12 2
+ 0x7C2C0200, // 004D CALL R11 1
+ 0xA802000B, // 004E EXBLK 0 #005B
+ 0x5C301600, // 004F MOVE R12 R11
+ 0x7C300000, // 0050 CALL R12 0
+ 0x1C341909, // 0051 EQ R13 R12 K9
+ 0x78360000, // 0052 JMPF R13 #0054
+ 0x7001FFFA, // 0053 JMP #004F
+ 0x8C340506, // 0054 GETMET R13 R2 K6
+ 0x583C0013, // 0055 LDCONST R15 K19
+ 0x5C401800, // 0056 MOVE R16 R12
+ 0x94440C0C, // 0057 GETIDX R17 R6 R12
+ 0x7C340800, // 0058 CALL R13 4
+ 0x0028140D, // 0059 ADD R10 R10 R13
+ 0x7001FFF3, // 005A JMP #004F
+ 0x582C0014, // 005B LDCONST R11 K20
+ 0xAC2C0200, // 005C CATCH R11 1 0
+ 0xB0080000, // 005D RAISE 2 R0 R0
+ 0xB82E0400, // 005E GETNGBL R11 K2
+ 0x8C2C1703, // 005F GETMET R11 R11 K3
+ 0x8C340506, // 0060 GETMET R13 R2 K6
+ 0x583C0015, // 0061 LDCONST R15 K21
+ 0x5C400A00, // 0062 MOVE R16 R5
+ 0x5C440E00, // 0063 MOVE R17 R7
+ 0x5C481400, // 0064 MOVE R18 R10
+ 0x7C340A00, // 0065 CALL R13 5
+ 0x5838000E, // 0066 LDCONST R14 K14
+ 0x7C2C0600, // 0067 CALL R11 3
+ 0xA8040001, // 0068 EXBLK 1 1
+ 0x70020010, // 0069 JMP #007B
+ 0xAC180002, // 006A CATCH R6 0 2
+ 0x7002000D, // 006B JMP #007A
+ 0xB8220400, // 006C GETNGBL R8 K2
+ 0x8C201103, // 006D GETMET R8 R8 K3
+ 0x60280008, // 006E GETGBL R10 G8
+ 0x5C2C0C00, // 006F MOVE R11 R6
+ 0x7C280200, // 0070 CALL R10 1
+ 0x002A2C0A, // 0071 ADD R10 K22 R10
+ 0x00281517, // 0072 ADD R10 R10 K23
+ 0x602C0008, // 0073 GETGBL R11 G8
+ 0x5C300E00, // 0074 MOVE R12 R7
+ 0x7C2C0200, // 0075 CALL R11 1
+ 0x0028140B, // 0076 ADD R10 R10 R11
+ 0x582C000E, // 0077 LDCONST R11 K14
+ 0x7C200600, // 0078 CALL R8 3
+ 0x70020000, // 0079 JMP #007B
+ 0xB0080000, // 007A RAISE 2 R0 R0
+ 0x7001FF93, // 007B JMP #0010
+ 0x58100014, // 007C LDCONST R4 K20
+ 0xAC100200, // 007D CATCH R4 1 0
+ 0xB0080000, // 007E RAISE 2 R0 R0
+ 0xB8120400, // 007F GETNGBL R4 K2
+ 0x8C100918, // 0080 GETMET R4 R4 K24
+ 0x58180019, // 0081 LDCONST R6 K25
+ 0x581C001A, // 0082 LDCONST R7 K26
+ 0x7C100600, // 0083 CALL R4 3
+ 0x80000000, // 0084 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: save_before_restart
+********************************************************************/
+be_local_closure(Matter_Device_save_before_restart, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K1 */ be_nested_str_weak(mdns_remove_op_discovery_all_fabrics),
+ }),
+ be_str_weak(save_before_restart),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x8C040101, // 0002 GETMET R1 R0 K1
+ 0x7C040200, // 0003 CALL R1 1
+ 0x80000000, // 0004 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_root_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_root_basic_commissioning, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[23]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(PASE_TIMEOUT),
+ /* K2 */ be_nested_str_weak(compute_manual_pairing_code),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20Manual_X20pairing_X20code_X3A_X20_X25s_X2D_X25s_X2D_X25s),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_const_int(3),
+ /* K9 */ be_const_int(2147483647),
+ /* K10 */ be_const_int(2),
+ /* K11 */ be_nested_str_weak(compute_qrcode_content),
+ /* K12 */ be_nested_str_weak(publish_result),
+ /* K13 */ be_nested_str_weak(_X7B_X22Matter_X22_X3A_X7B_X22Commissioning_X22_X3A1_X2C_X22PairingCode_X22_X3A_X22_X25s_X22_X2C_X22QRCode_X22_X3A_X22_X25s_X22_X7D_X7D),
+ /* K14 */ be_nested_str_weak(Matter),
+ /* K15 */ be_nested_str_weak(_compute_pbkdf),
+ /* K16 */ be_nested_str_weak(root_passcode),
+ /* K17 */ be_nested_str_weak(root_iterations),
+ /* K18 */ be_nested_str_weak(root_salt),
+ /* K19 */ be_nested_str_weak(start_basic_commissioning),
+ /* K20 */ be_nested_str_weak(root_discriminator),
+ /* K21 */ be_nested_str_weak(root_w0),
+ /* K22 */ be_nested_str_weak(root_L),
+ }),
+ be_str_weak(start_root_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[49]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x4C0C0000, // 0001 LDNIL R3
+ 0x1C0C0203, // 0002 EQ R3 R1 R3
+ 0x780E0000, // 0003 JMPF R3 #0005
+ 0x88040101, // 0004 GETMBR R1 R0 K1
+ 0x8C0C0102, // 0005 GETMET R3 R0 K2
+ 0x7C0C0200, // 0006 CALL R3 1
+ 0xB8120600, // 0007 GETNGBL R4 K3
+ 0x8C100904, // 0008 GETMET R4 R4 K4
+ 0x8C180505, // 0009 GETMET R6 R2 K5
+ 0x58200006, // 000A LDCONST R8 K6
+ 0x40260F08, // 000B CONNECT R9 K7 K8
+ 0x94240609, // 000C GETIDX R9 R3 R9
+ 0x542A0003, // 000D LDINT R10 4
+ 0x542E0005, // 000E LDINT R11 6
+ 0x4028140B, // 000F CONNECT R10 R10 R11
+ 0x9428060A, // 0010 GETIDX R10 R3 R10
+ 0x542E0006, // 0011 LDINT R11 7
+ 0x402C1709, // 0012 CONNECT R11 R11 K9
+ 0x942C060B, // 0013 GETIDX R11 R3 R11
+ 0x7C180A00, // 0014 CALL R6 5
+ 0x581C000A, // 0015 LDCONST R7 K10
+ 0x7C100600, // 0016 CALL R4 3
+ 0x8C10010B, // 0017 GETMET R4 R0 K11
+ 0x7C100200, // 0018 CALL R4 1
+ 0xB8160600, // 0019 GETNGBL R5 K3
+ 0x8C140B0C, // 001A GETMET R5 R5 K12
+ 0x8C1C0505, // 001B GETMET R7 R2 K5
+ 0x5824000D, // 001C LDCONST R9 K13
+ 0x5C280600, // 001D MOVE R10 R3
+ 0x5C2C0800, // 001E MOVE R11 R4
+ 0x7C1C0800, // 001F CALL R7 4
+ 0x5820000E, // 0020 LDCONST R8 K14
+ 0x7C140600, // 0021 CALL R5 3
+ 0x8C14010F, // 0022 GETMET R5 R0 K15
+ 0x881C0110, // 0023 GETMBR R7 R0 K16
+ 0x88200111, // 0024 GETMBR R8 R0 K17
+ 0x88240112, // 0025 GETMBR R9 R0 K18
+ 0x7C140800, // 0026 CALL R5 4
+ 0x8C140113, // 0027 GETMET R5 R0 K19
+ 0x5C1C0200, // 0028 MOVE R7 R1
+ 0x88200111, // 0029 GETMBR R8 R0 K17
+ 0x88240114, // 002A GETMBR R9 R0 K20
+ 0x88280112, // 002B GETMBR R10 R0 K18
+ 0x882C0115, // 002C GETMBR R11 R0 K21
+ 0x88300116, // 002D GETMBR R12 R0 K22
+ 0x4C340000, // 002E LDNIL R13
+ 0x7C141000, // 002F CALL R5 8
+ 0x80000000, // 0030 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: received_ack
+********************************************************************/
+be_local_closure(Matter_Device_received_ack, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(received_ack),
+ }),
+ be_str_weak(received_ack),
+ &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: _compute_pbkdf
+********************************************************************/
+be_local_closure(Matter_Device__compute_pbkdf, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(add),
+ /* K3 */ be_nested_str_weak(PBKDF2_HMAC_SHA256),
+ /* K4 */ be_nested_str_weak(derive),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(root_w0),
+ /* K7 */ be_nested_str_weak(EC_P256),
+ /* K8 */ be_nested_str_weak(mod),
+ /* K9 */ be_nested_str_weak(root_L),
+ /* K10 */ be_nested_str_weak(public_key),
+ }),
+ be_str_weak(_compute_pbkdf),
+ &be_const_str_solidified,
+ ( &(const binstruction[41]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xA4160200, // 0001 IMPORT R5 K1
+ 0x60180015, // 0002 GETGBL R6 G21
+ 0x7C180000, // 0003 CALL R6 0
+ 0x8C180D02, // 0004 GETMET R6 R6 K2
+ 0x5C200200, // 0005 MOVE R8 R1
+ 0x54260003, // 0006 LDINT R9 4
+ 0x7C180600, // 0007 CALL R6 3
+ 0x8C1C0903, // 0008 GETMET R7 R4 K3
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x8C1C0F04, // 000A GETMET R7 R7 K4
+ 0x5C240C00, // 000B MOVE R9 R6
+ 0x5C280600, // 000C MOVE R10 R3
+ 0x5C2C0400, // 000D MOVE R11 R2
+ 0x5432004F, // 000E LDINT R12 80
+ 0x7C1C0A00, // 000F CALL R7 5
+ 0x54220026, // 0010 LDINT R8 39
+ 0x40220A08, // 0011 CONNECT R8 K5 R8
+ 0x94200E08, // 0012 GETIDX R8 R7 R8
+ 0x54260027, // 0013 LDINT R9 40
+ 0x542A004E, // 0014 LDINT R10 79
+ 0x4024120A, // 0015 CONNECT R9 R9 R10
+ 0x94240E09, // 0016 GETIDX R9 R7 R9
+ 0x8C280907, // 0017 GETMET R10 R4 K7
+ 0x7C280200, // 0018 CALL R10 1
+ 0x8C281508, // 0019 GETMET R10 R10 K8
+ 0x5C301000, // 001A MOVE R12 R8
+ 0x7C280400, // 001B CALL R10 2
+ 0x90020C0A, // 001C SETMBR R0 K6 R10
+ 0x8C280907, // 001D GETMET R10 R4 K7
+ 0x7C280200, // 001E CALL R10 1
+ 0x8C281508, // 001F GETMET R10 R10 K8
+ 0x5C301200, // 0020 MOVE R12 R9
+ 0x7C280400, // 0021 CALL R10 2
+ 0x8C2C0907, // 0022 GETMET R11 R4 K7
+ 0x7C2C0200, // 0023 CALL R11 1
+ 0x8C2C170A, // 0024 GETMET R11 R11 K10
+ 0x5C341400, // 0025 MOVE R13 R10
+ 0x7C2C0400, // 0026 CALL R11 2
+ 0x9002120B, // 0027 SETMBR R0 K9 R11
+ 0x80000000, // 0028 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_commissioning_complete_deferred
+********************************************************************/
+be_local_closure(Matter_Device_start_commissioning_complete_deferred, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 3, /* nstack */
+ 0, /* argc */
+ 0, /* varg */
+ 1, /* has upvals */
+ ( &(const bupvaldesc[ 2]) { /* upvals */
+ be_local_const_upval(1, 0),
+ be_local_const_upval(1, 1),
+ }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(start_commissioning_complete),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 5]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x68080001, // 0002 GETUPV R2 U1
+ 0x7C000400, // 0003 CALL R0 2
+ 0x80040000, // 0004 RET 1 R0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_timer),
+ /* K2 */ be_const_int(0),
+ }),
+ be_str_weak(start_commissioning_complete_deferred),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x7C080600, // 0004 CALL R2 3
+ 0xA0000000, // 0005 CLOSE R0
+ 0x80000000, // 0006 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: start_basic_commissioning
+********************************************************************/
+be_local_closure(Matter_Device_start_basic_commissioning, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 8, /* argc */
+ 2, /* 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Wifi_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(remove_rule),
+ /* K3 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ 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
+ 0x580C0000, // 0006 LDCONST R3 K0
+ 0x7C000600, // 0007 CALL R0 3
+ 0x80000000, // 0008 RET 0
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[16]) { /* constants */
+ /* K0 */ be_nested_str_weak(commissioning_open),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(millis),
+ /* K3 */ be_nested_str_weak(commissioning_iterations),
+ /* K4 */ be_nested_str_weak(commissioning_discriminator),
+ /* K5 */ be_nested_str_weak(commissioning_salt),
+ /* K6 */ be_nested_str_weak(commissioning_w0),
+ /* K7 */ be_nested_str_weak(commissioning_L),
+ /* K8 */ be_nested_str_weak(commissioning_admin_fabric),
+ /* K9 */ be_nested_str_weak(wifi),
+ /* K10 */ be_nested_str_weak(up),
+ /* K11 */ be_nested_str_weak(eth),
+ /* K12 */ be_nested_str_weak(mdns_announce_PASE),
+ /* K13 */ be_nested_str_weak(add_rule),
+ /* K14 */ be_nested_str_weak(Wifi_X23Connected),
+ /* K15 */ be_nested_str_weak(Eth_X23Connected),
+ }),
+ be_str_weak(start_basic_commissioning),
+ &be_const_str_solidified,
+ ( &(const binstruction[40]) { /* code */
+ 0xB8220200, // 0000 GETNGBL R8 K1
+ 0x8C201102, // 0001 GETMET R8 R8 K2
+ 0x7C200200, // 0002 CALL R8 1
+ 0x542603E7, // 0003 LDINT R9 1000
+ 0x08240209, // 0004 MUL R9 R1 R9
+ 0x00201009, // 0005 ADD R8 R8 R9
+ 0x90020008, // 0006 SETMBR R0 K0 R8
+ 0x90020602, // 0007 SETMBR R0 K3 R2
+ 0x90020803, // 0008 SETMBR R0 K4 R3
+ 0x90020A04, // 0009 SETMBR R0 K5 R4
+ 0x90020C05, // 000A SETMBR R0 K6 R5
+ 0x90020E06, // 000B SETMBR R0 K7 R6
+ 0x90021007, // 000C SETMBR R0 K8 R7
+ 0xB8220200, // 000D GETNGBL R8 K1
+ 0x8C201109, // 000E GETMET R8 R8 K9
+ 0x7C200200, // 000F CALL R8 1
+ 0x9420110A, // 0010 GETIDX R8 R8 K10
+ 0x74220004, // 0011 JMPT R8 #0017
+ 0xB8220200, // 0012 GETNGBL R8 K1
+ 0x8C20110B, // 0013 GETMET R8 R8 K11
+ 0x7C200200, // 0014 CALL R8 1
+ 0x9420110A, // 0015 GETIDX R8 R8 K10
+ 0x78220002, // 0016 JMPF R8 #001A
+ 0x8C20010C, // 0017 GETMET R8 R0 K12
+ 0x7C200200, // 0018 CALL R8 1
+ 0x7002000B, // 0019 JMP #0026
+ 0xB8220200, // 001A GETNGBL R8 K1
+ 0x8C20110D, // 001B GETMET R8 R8 K13
+ 0x5828000E, // 001C LDCONST R10 K14
+ 0x842C0000, // 001D CLOSURE R11 P0
+ 0x5830000C, // 001E LDCONST R12 K12
+ 0x7C200800, // 001F CALL R8 4
+ 0xB8220200, // 0020 GETNGBL R8 K1
+ 0x8C20110D, // 0021 GETMET R8 R8 K13
+ 0x5828000F, // 0022 LDCONST R10 K15
+ 0x842C0001, // 0023 CLOSURE R11 P1
+ 0x5830000C, // 0024 LDCONST R12 K12
+ 0x7C200800, // 0025 CALL R8 4
+ 0xA0000000, // 0026 CLOSE R0
+ 0x80000000, // 0027 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_announce_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_announce_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: load_param
+********************************************************************/
+be_local_closure(Matter_Device_load_param, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[28]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(crypto),
+ /* K2 */ be_nested_str_weak(FILENAME),
+ /* K3 */ be_nested_str_weak(read),
+ /* K4 */ be_nested_str_weak(close),
+ /* K5 */ be_nested_str_weak(json),
+ /* K6 */ be_nested_str_weak(load),
+ /* K7 */ be_nested_str_weak(root_discriminator),
+ /* K8 */ be_nested_str_weak(find),
+ /* K9 */ be_nested_str_weak(distinguish),
+ /* K10 */ be_nested_str_weak(root_passcode),
+ /* K11 */ be_nested_str_weak(passcode),
+ /* K12 */ be_nested_str_weak(ipv4only),
+ /* K13 */ be_nested_str_weak(plugins_config),
+ /* K14 */ be_nested_str_weak(config),
+ /* K15 */ be_nested_str_weak(_load_plugins_config),
+ /* K16 */ be_nested_str_weak(plugins_persist),
+ /* K17 */ be_nested_str_weak(io_error),
+ /* K18 */ be_nested_str_weak(tasmota),
+ /* K19 */ be_nested_str_weak(log),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Session_Store_X3A_X3Aload_X20Exception_X3A),
+ /* K21 */ be_nested_str_weak(_X7C),
+ /* K22 */ be_const_int(2),
+ /* K23 */ be_nested_str_weak(random),
+ /* K24 */ be_nested_str_weak(get),
+ /* K25 */ be_const_int(0),
+ /* K26 */ be_nested_str_weak(generate_random_passcode),
+ /* K27 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(load_param),
+ &be_const_str_solidified,
+ ( &(const binstruction[91]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA8020028, // 0002 EXBLK 0 #002C
+ 0x600C0011, // 0003 GETGBL R3 G17
+ 0x88100102, // 0004 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x8C100703, // 0006 GETMET R4 R3 K3
+ 0x7C100200, // 0007 CALL R4 1
+ 0x8C140704, // 0008 GETMET R5 R3 K4
+ 0x7C140200, // 0009 CALL R5 1
+ 0xA4160A00, // 000A IMPORT R5 K5
+ 0x8C180B06, // 000B GETMET R6 R5 K6
+ 0x5C200800, // 000C MOVE R8 R4
+ 0x7C180400, // 000D CALL R6 2
+ 0x8C1C0D08, // 000E GETMET R7 R6 K8
+ 0x58240009, // 000F LDCONST R9 K9
+ 0x88280107, // 0010 GETMBR R10 R0 K7
+ 0x7C1C0600, // 0011 CALL R7 3
+ 0x90020E07, // 0012 SETMBR R0 K7 R7
+ 0x8C1C0D08, // 0013 GETMET R7 R6 K8
+ 0x5824000B, // 0014 LDCONST R9 K11
+ 0x8828010A, // 0015 GETMBR R10 R0 K10
+ 0x7C1C0600, // 0016 CALL R7 3
+ 0x90021407, // 0017 SETMBR R0 K10 R7
+ 0x601C0017, // 0018 GETGBL R7 G23
+ 0x8C200D08, // 0019 GETMET R8 R6 K8
+ 0x5828000C, // 001A LDCONST R10 K12
+ 0x502C0000, // 001B LDBOOL R11 0 0
+ 0x7C200600, // 001C CALL R8 3
+ 0x7C1C0200, // 001D CALL R7 1
+ 0x90021807, // 001E SETMBR R0 K12 R7
+ 0x8C1C0D08, // 001F GETMET R7 R6 K8
+ 0x5824000E, // 0020 LDCONST R9 K14
+ 0x7C1C0400, // 0021 CALL R7 2
+ 0x90021A07, // 0022 SETMBR R0 K13 R7
+ 0x881C010D, // 0023 GETMBR R7 R0 K13
+ 0x781E0004, // 0024 JMPF R7 #002A
+ 0x8C1C010F, // 0025 GETMET R7 R0 K15
+ 0x8824010D, // 0026 GETMBR R9 R0 K13
+ 0x7C1C0400, // 0027 CALL R7 2
+ 0x501C0200, // 0028 LDBOOL R7 1 0
+ 0x90022007, // 0029 SETMBR R0 K16 R7
+ 0xA8040001, // 002A EXBLK 1 1
+ 0x70020012, // 002B JMP #003F
+ 0xAC0C0002, // 002C CATCH R3 0 2
+ 0x7002000F, // 002D JMP #003E
+ 0x20140711, // 002E NE R5 R3 K17
+ 0x7816000C, // 002F JMPF R5 #003D
+ 0xB8162400, // 0030 GETNGBL R5 K18
+ 0x8C140B13, // 0031 GETMET R5 R5 K19
+ 0x601C0008, // 0032 GETGBL R7 G8
+ 0x5C200600, // 0033 MOVE R8 R3
+ 0x7C1C0200, // 0034 CALL R7 1
+ 0x001E2807, // 0035 ADD R7 K20 R7
+ 0x001C0F15, // 0036 ADD R7 R7 K21
+ 0x60200008, // 0037 GETGBL R8 G8
+ 0x5C240800, // 0038 MOVE R9 R4
+ 0x7C200200, // 0039 CALL R8 1
+ 0x001C0E08, // 003A ADD R7 R7 R8
+ 0x58200016, // 003B LDCONST R8 K22
+ 0x7C140600, // 003C CALL R5 3
+ 0x70020000, // 003D JMP #003F
+ 0xB0080000, // 003E RAISE 2 R0 R0
+ 0x500C0000, // 003F LDBOOL R3 0 0
+ 0x88100107, // 0040 GETMBR R4 R0 K7
+ 0x4C140000, // 0041 LDNIL R5
+ 0x1C100805, // 0042 EQ R4 R4 R5
+ 0x7812000A, // 0043 JMPF R4 #004F
+ 0x8C100517, // 0044 GETMET R4 R2 K23
+ 0x58180016, // 0045 LDCONST R6 K22
+ 0x7C100400, // 0046 CALL R4 2
+ 0x8C100918, // 0047 GETMET R4 R4 K24
+ 0x58180019, // 0048 LDCONST R6 K25
+ 0x581C0016, // 0049 LDCONST R7 K22
+ 0x7C100600, // 004A CALL R4 3
+ 0x54160FFE, // 004B LDINT R5 4095
+ 0x2C100805, // 004C AND R4 R4 R5
+ 0x90020E04, // 004D SETMBR R0 K7 R4
+ 0x500C0200, // 004E LDBOOL R3 1 0
+ 0x8810010A, // 004F GETMBR R4 R0 K10
+ 0x4C140000, // 0050 LDNIL R5
+ 0x1C100805, // 0051 EQ R4 R4 R5
+ 0x78120003, // 0052 JMPF R4 #0057
+ 0x8C10011A, // 0053 GETMET R4 R0 K26
+ 0x7C100200, // 0054 CALL R4 1
+ 0x90021404, // 0055 SETMBR R0 K10 R4
+ 0x500C0200, // 0056 LDBOOL R3 1 0
+ 0x780E0001, // 0057 JMPF R3 #005A
+ 0x8C10011B, // 0058 GETMET R4 R0 K27
+ 0x7C100200, // 0059 CALL R4 1
+ 0x80000000, // 005A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: k2l
+********************************************************************/
+be_local_closure(Matter_Device_k2l, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Device),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_const_int(0),
+ }),
+ be_str_weak(k2l),
+ &be_const_str_solidified,
+ ( &(const binstruction[50]) { /* code */
+ 0x58040000, // 0000 LDCONST R1 K0
+ 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
+ 0x8C100101, // 0008 GETMET R4 R0 K1
+ 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
+ 0x8C140502, // 000E GETMET R5 R2 K2
+ 0x5C1C0800, // 000F MOVE R7 R4
+ 0x7C140400, // 0010 CALL R5 2
+ 0x7001FFF9, // 0011 JMP #000C
+ 0x580C0003, // 0012 LDCONST R3 K3
+ 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
+ 0x04100904, // 0019 SUB R4 R4 K4
+ 0x40120804, // 001A CONNECT R4 K4 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
+ 0x241C0D05, // 0021 GT R7 R6 K5
+ 0x781E0008, // 0022 JMPF R7 #002C
+ 0x041C0D04, // 0023 SUB R7 R6 K4
+ 0x941C0407, // 0024 GETIDX R7 R2 R7
+ 0x241C0E05, // 0025 GT R7 R7 R5
+ 0x781E0004, // 0026 JMPF R7 #002C
+ 0x041C0D04, // 0027 SUB R7 R6 K4
+ 0x941C0407, // 0028 GETIDX R7 R2 R7
+ 0x98080C07, // 0029 SETIDX R2 R6 R7
+ 0x04180D04, // 002A SUB R6 R6 K4
+ 0x7001FFF4, // 002B JMP #0021
+ 0x98080C05, // 002C SETIDX R2 R6 R5
+ 0x7001FFEE, // 002D JMP #001D
+ 0x580C0003, // 002E LDCONST R3 K3
+ 0xAC0C0200, // 002F CATCH R3 1 0
+ 0xB0080000, // 0030 RAISE 2 R0 R0
+ 0x80040400, // 0031 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: autoconf_device
+********************************************************************/
+be_local_closure(Matter_Device_autoconf_device, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(plugins),
+ /* K3 */ be_const_int(0),
+ /* K4 */ be_nested_str_weak(plugins_config),
+ /* K5 */ be_nested_str_weak(autoconf_device_map),
+ /* K6 */ be_nested_str_weak(tasmota),
+ /* K7 */ be_nested_str_weak(log),
+ /* K8 */ be_nested_str_weak(MTR_X3A_X20autoconfig_X20_X3D_X20),
+ /* K9 */ be_const_int(3),
+ /* K10 */ be_nested_str_weak(_load_plugins_config),
+ /* K11 */ be_nested_str_weak(plugins_persist),
+ /* K12 */ be_nested_str_weak(sessions),
+ /* K13 */ be_nested_str_weak(count_active_fabrics),
+ /* K14 */ be_nested_str_weak(save_param),
+ }),
+ be_str_weak(autoconf_device),
+ &be_const_str_solidified,
+ ( &(const binstruction[34]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x600C000C, // 0002 GETGBL R3 G12
+ 0x88100102, // 0003 GETMBR R4 R0 K2
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x240C0703, // 0005 GT R3 R3 K3
+ 0x780E0000, // 0006 JMPF R3 #0008
+ 0x80000600, // 0007 RET 0
+ 0x8C0C0105, // 0008 GETMET R3 R0 K5
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x90020803, // 000A SETMBR R0 K4 R3
+ 0xB80E0C00, // 000B GETNGBL R3 K6
+ 0x8C0C0707, // 000C GETMET R3 R3 K7
+ 0x60140008, // 000D GETGBL R5 G8
+ 0x88180104, // 000E GETMBR R6 R0 K4
+ 0x7C140200, // 000F CALL R5 1
+ 0x00161005, // 0010 ADD R5 K8 R5
+ 0x58180009, // 0011 LDCONST R6 K9
+ 0x7C0C0600, // 0012 CALL R3 3
+ 0x8C0C010A, // 0013 GETMET R3 R0 K10
+ 0x88140104, // 0014 GETMBR R5 R0 K4
+ 0x7C0C0400, // 0015 CALL R3 2
+ 0x880C010B, // 0016 GETMBR R3 R0 K11
+ 0x740E0008, // 0017 JMPT R3 #0021
+ 0x880C010C, // 0018 GETMBR R3 R0 K12
+ 0x8C0C070D, // 0019 GETMET R3 R3 K13
+ 0x7C0C0200, // 001A CALL R3 1
+ 0x240C0703, // 001B GT R3 R3 K3
+ 0x780E0003, // 001C JMPF R3 #0021
+ 0x500C0200, // 001D LDBOOL R3 1 0
+ 0x90021603, // 001E SETMBR R0 K11 R3
+ 0x8C0C010E, // 001F GETMET R3 R0 K14
+ 0x7C0C0200, // 0020 CALL R3 1
+ 0x80000000, // 0021 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: process_attribute_expansion
+********************************************************************/
+be_local_closure(Matter_Device_process_attribute_expansion, /* name */
+ be_nested_proto(
+ 29, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 1]) {
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(keys),
+ /* K1 */ be_nested_str_weak(push),
+ /* K2 */ be_nested_str_weak(stop_iteration),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_const_int(0),
+ }),
+ be_str_weak(keys_sorted),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0x60040012, // 0000 GETGBL R1 G18
+ 0x7C040000, // 0001 CALL R1 0
+ 0x60080010, // 0002 GETGBL R2 G16
+ 0x8C0C0100, // 0003 GETMET R3 R0 K0
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x7C080200, // 0005 CALL R2 1
+ 0xA8020005, // 0006 EXBLK 0 #000D
+ 0x5C0C0400, // 0007 MOVE R3 R2
+ 0x7C0C0000, // 0008 CALL R3 0
+ 0x8C100301, // 0009 GETMET R4 R1 K1
+ 0x5C180600, // 000A MOVE R6 R3
+ 0x7C100400, // 000B CALL R4 2
+ 0x7001FFF9, // 000C JMP #0007
+ 0x58080002, // 000D LDCONST R2 K2
+ 0xAC080200, // 000E CATCH R2 1 0
+ 0xB0080000, // 000F RAISE 2 R0 R0
+ 0x60080010, // 0010 GETGBL R2 G16
+ 0x600C000C, // 0011 GETGBL R3 G12
+ 0x5C100200, // 0012 MOVE R4 R1
+ 0x7C0C0200, // 0013 CALL R3 1
+ 0x040C0703, // 0014 SUB R3 R3 K3
+ 0x400E0603, // 0015 CONNECT R3 K3 R3
+ 0x7C080200, // 0016 CALL R2 1
+ 0xA8020010, // 0017 EXBLK 0 #0029
+ 0x5C0C0400, // 0018 MOVE R3 R2
+ 0x7C0C0000, // 0019 CALL R3 0
+ 0x94100203, // 001A GETIDX R4 R1 R3
+ 0x5C140600, // 001B MOVE R5 R3
+ 0x24180B04, // 001C GT R6 R5 K4
+ 0x781A0008, // 001D JMPF R6 #0027
+ 0x04180B03, // 001E SUB R6 R5 K3
+ 0x94180206, // 001F GETIDX R6 R1 R6
+ 0x24180C04, // 0020 GT R6 R6 R4
+ 0x781A0004, // 0021 JMPF R6 #0027
+ 0x04180B03, // 0022 SUB R6 R5 K3
+ 0x94180206, // 0023 GETIDX R6 R1 R6
+ 0x98040A06, // 0024 SETIDX R1 R5 R6
+ 0x04140B03, // 0025 SUB R5 R5 K3
+ 0x7001FFF4, // 0026 JMP #001C
+ 0x98040A04, // 0027 SETIDX R1 R5 R4
+ 0x7001FFEE, // 0028 JMP #0018
+ 0x58080002, // 0029 LDCONST R2 K2
+ 0xAC080200, // 002A CATCH R2 1 0
+ 0xB0080000, // 002B RAISE 2 R0 R0
+ 0x80040200, // 002C RET 1 R1
+ })
+ ),
+ }),
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(attribute),
+ /* K4 */ be_nested_str_weak(plugins),
+ /* K5 */ be_nested_str_weak(get_endpoint),
+ /* K6 */ be_nested_str_weak(contains),
+ /* K7 */ be_nested_str_weak(get_cluster_list),
+ /* K8 */ be_nested_str_weak(get_attribute_list),
+ /* K9 */ be_nested_str_weak(push),
+ /* K10 */ be_nested_str_weak(stop_iteration),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(MTR_X3A_X20expansion_X20_X5B_X2502X_X5D_X2504X_X2F_X2504X),
+ /* K15 */ be_const_int(3),
+ /* K16 */ be_nested_str_weak(status),
+ /* K17 */ be_nested_str_weak(matter),
+ /* K18 */ be_nested_str_weak(UNSUPPORTED_ENDPOINT),
+ /* K19 */ be_nested_str_weak(UNSUPPORTED_CLUSTER),
+ /* K20 */ be_nested_str_weak(UNSUPPORTED_ATTRIBUTE),
+ /* K21 */ be_nested_str_weak(UNREPORTABLE_ATTRIBUTE),
+ }),
+ be_str_weak(process_attribute_expansion),
+ &be_const_str_solidified,
+ ( &(const binstruction[216]) { /* code */
+ 0x840C0000, // 0000 CLOSURE R3 P0
+ 0xA4120000, // 0001 IMPORT R4 K0
+ 0x88140301, // 0002 GETMBR R5 R1 K1
+ 0x50180000, // 0003 LDBOOL R6 0 0
+ 0x881C0302, // 0004 GETMBR R7 R1 K2
+ 0x50200000, // 0005 LDBOOL R8 0 0
+ 0x88240303, // 0006 GETMBR R9 R1 K3
+ 0x50280000, // 0007 LDBOOL R10 0 0
+ 0x882C0301, // 0008 GETMBR R11 R1 K1
+ 0x4C300000, // 0009 LDNIL R12
+ 0x202C160C, // 000A NE R11 R11 R12
+ 0x782E0007, // 000B JMPF R11 #0014
+ 0x882C0302, // 000C GETMBR R11 R1 K2
+ 0x4C300000, // 000D LDNIL R12
+ 0x202C160C, // 000E NE R11 R11 R12
+ 0x782E0003, // 000F JMPF R11 #0014
+ 0x882C0303, // 0010 GETMBR R11 R1 K3
+ 0x4C300000, // 0011 LDNIL R12
+ 0x202C160C, // 0012 NE R11 R11 R12
+ 0x742E0000, // 0013 JMPT R11 #0015
+ 0x502C0001, // 0014 LDBOOL R11 0 1
+ 0x502C0200, // 0015 LDBOOL R11 1 0
+ 0x60300013, // 0016 GETGBL R12 G19
+ 0x7C300000, // 0017 CALL R12 0
+ 0x60340010, // 0018 GETGBL R13 G16
+ 0x88380104, // 0019 GETMBR R14 R0 K4
+ 0x7C340200, // 001A CALL R13 1
+ 0xA8020055, // 001B EXBLK 0 #0072
+ 0x5C381A00, // 001C MOVE R14 R13
+ 0x7C380000, // 001D CALL R14 0
+ 0x8C3C1D05, // 001E GETMET R15 R14 K5
+ 0x7C3C0200, // 001F CALL R15 1
+ 0x4C400000, // 0020 LDNIL R16
+ 0x20400A10, // 0021 NE R16 R5 R16
+ 0x78420002, // 0022 JMPF R16 #0026
+ 0x20401E05, // 0023 NE R16 R15 R5
+ 0x78420000, // 0024 JMPF R16 #0026
+ 0x7001FFF5, // 0025 JMP #001C
+ 0x8C401906, // 0026 GETMET R16 R12 K6
+ 0x5C481E00, // 0027 MOVE R18 R15
+ 0x7C400400, // 0028 CALL R16 2
+ 0x74420002, // 0029 JMPT R16 #002D
+ 0x60400013, // 002A GETGBL R16 G19
+ 0x7C400000, // 002B CALL R16 0
+ 0x98301E10, // 002C SETIDX R12 R15 R16
+ 0x50180200, // 002D LDBOOL R6 1 0
+ 0x8C401D07, // 002E GETMET R16 R14 K7
+ 0x5C481E00, // 002F MOVE R18 R15
+ 0x7C400400, // 0030 CALL R16 2
+ 0x60440010, // 0031 GETGBL R17 G16
+ 0x5C482000, // 0032 MOVE R18 R16
+ 0x7C440200, // 0033 CALL R17 1
+ 0xA8020038, // 0034 EXBLK 0 #006E
+ 0x5C482200, // 0035 MOVE R18 R17
+ 0x7C480000, // 0036 CALL R18 0
+ 0x4C4C0000, // 0037 LDNIL R19
+ 0x204C0E13, // 0038 NE R19 R7 R19
+ 0x784E0002, // 0039 JMPF R19 #003D
+ 0x204C2407, // 003A NE R19 R18 R7
+ 0x784E0000, // 003B JMPF R19 #003D
+ 0x7001FFF7, // 003C JMP #0035
+ 0x944C180F, // 003D GETIDX R19 R12 R15
+ 0x8C4C2706, // 003E GETMET R19 R19 K6
+ 0x5C542400, // 003F MOVE R21 R18
+ 0x7C4C0400, // 0040 CALL R19 2
+ 0x744E0003, // 0041 JMPT R19 #0046
+ 0x944C180F, // 0042 GETIDX R19 R12 R15
+ 0x60500013, // 0043 GETGBL R20 G19
+ 0x7C500000, // 0044 CALL R20 0
+ 0x984C2414, // 0045 SETIDX R19 R18 R20
+ 0x50200200, // 0046 LDBOOL R8 1 0
+ 0x8C4C1D08, // 0047 GETMET R19 R14 K8
+ 0x5C541E00, // 0048 MOVE R21 R15
+ 0x5C582400, // 0049 MOVE R22 R18
+ 0x7C4C0600, // 004A CALL R19 3
+ 0x60500010, // 004B GETGBL R20 G16
+ 0x5C542600, // 004C MOVE R21 R19
+ 0x7C500200, // 004D CALL R20 1
+ 0xA802001A, // 004E EXBLK 0 #006A
+ 0x5C542800, // 004F MOVE R21 R20
+ 0x7C540000, // 0050 CALL R21 0
+ 0x4C580000, // 0051 LDNIL R22
+ 0x20581216, // 0052 NE R22 R9 R22
+ 0x785A0002, // 0053 JMPF R22 #0057
+ 0x20582A09, // 0054 NE R22 R21 R9
+ 0x785A0000, // 0055 JMPF R22 #0057
+ 0x7001FFF7, // 0056 JMP #004F
+ 0x9458180F, // 0057 GETIDX R22 R12 R15
+ 0x94582C12, // 0058 GETIDX R22 R22 R18
+ 0x8C582D06, // 0059 GETMET R22 R22 K6
+ 0x5C602A00, // 005A MOVE R24 R21
+ 0x7C580400, // 005B CALL R22 2
+ 0x745A0004, // 005C JMPT R22 #0062
+ 0x9458180F, // 005D GETIDX R22 R12 R15
+ 0x94582C12, // 005E GETIDX R22 R22 R18
+ 0x605C0012, // 005F GETGBL R23 G18
+ 0x7C5C0000, // 0060 CALL R23 0
+ 0x98582A17, // 0061 SETIDX R22 R21 R23
+ 0x50280200, // 0062 LDBOOL R10 1 0
+ 0x9458180F, // 0063 GETIDX R22 R12 R15
+ 0x94582C12, // 0064 GETIDX R22 R22 R18
+ 0x94582C15, // 0065 GETIDX R22 R22 R21
+ 0x8C582D09, // 0066 GETMET R22 R22 K9
+ 0x5C601C00, // 0067 MOVE R24 R14
+ 0x7C580400, // 0068 CALL R22 2
+ 0x7001FFE4, // 0069 JMP #004F
+ 0x5850000A, // 006A LDCONST R20 K10
+ 0xAC500200, // 006B CATCH R20 1 0
+ 0xB0080000, // 006C RAISE 2 R0 R0
+ 0x7001FFC6, // 006D JMP #0035
+ 0x5844000A, // 006E LDCONST R17 K10
+ 0xAC440200, // 006F CATCH R17 1 0
+ 0xB0080000, // 0070 RAISE 2 R0 R0
+ 0x7001FFA9, // 0071 JMP #001C
+ 0x5834000A, // 0072 LDCONST R13 K10
+ 0xAC340200, // 0073 CATCH R13 1 0
+ 0xB0080000, // 0074 RAISE 2 R0 R0
+ 0x60340010, // 0075 GETGBL R13 G16
+ 0x5C380600, // 0076 MOVE R14 R3
+ 0x5C3C1800, // 0077 MOVE R15 R12
+ 0x7C380200, // 0078 CALL R14 1
+ 0x7C340200, // 0079 CALL R13 1
+ 0xA802003D, // 007A EXBLK 0 #00B9
+ 0x5C381A00, // 007B MOVE R14 R13
+ 0x7C380000, // 007C CALL R14 0
+ 0x603C0010, // 007D GETGBL R15 G16
+ 0x5C400600, // 007E MOVE R16 R3
+ 0x9444180E, // 007F GETIDX R17 R12 R14
+ 0x7C400200, // 0080 CALL R16 1
+ 0x7C3C0200, // 0081 CALL R15 1
+ 0xA8020031, // 0082 EXBLK 0 #00B5
+ 0x5C401E00, // 0083 MOVE R16 R15
+ 0x7C400000, // 0084 CALL R16 0
+ 0x60440010, // 0085 GETGBL R17 G16
+ 0x5C480600, // 0086 MOVE R18 R3
+ 0x944C180E, // 0087 GETIDX R19 R12 R14
+ 0x944C2610, // 0088 GETIDX R19 R19 R16
+ 0x7C480200, // 0089 CALL R18 1
+ 0x7C440200, // 008A CALL R17 1
+ 0xA8020024, // 008B EXBLK 0 #00B1
+ 0x5C482200, // 008C MOVE R18 R17
+ 0x7C480000, // 008D CALL R18 0
+ 0x604C0010, // 008E GETGBL R19 G16
+ 0x9450180E, // 008F GETIDX R20 R12 R14
+ 0x94502810, // 0090 GETIDX R20 R20 R16
+ 0x94502812, // 0091 GETIDX R20 R20 R18
+ 0x7C4C0200, // 0092 CALL R19 1
+ 0xA8020018, // 0093 EXBLK 0 #00AD
+ 0x5C502600, // 0094 MOVE R20 R19
+ 0x7C500000, // 0095 CALL R20 0
+ 0xB8561600, // 0096 GETNGBL R21 K11
+ 0x8C542B0C, // 0097 GETMET R21 R21 K12
+ 0x8C5C090D, // 0098 GETMET R23 R4 K13
+ 0x5864000E, // 0099 LDCONST R25 K14
+ 0x5C681C00, // 009A MOVE R26 R14
+ 0x5C6C2000, // 009B MOVE R27 R16
+ 0x5C702400, // 009C MOVE R28 R18
+ 0x7C5C0A00, // 009D CALL R23 5
+ 0x5860000F, // 009E LDCONST R24 K15
+ 0x7C540600, // 009F CALL R21 3
+ 0x9006020E, // 00A0 SETMBR R1 K1 R14
+ 0x90060410, // 00A1 SETMBR R1 K2 R16
+ 0x90060612, // 00A2 SETMBR R1 K3 R18
+ 0x5C540400, // 00A3 MOVE R21 R2
+ 0x5C582800, // 00A4 MOVE R22 R20
+ 0x5C5C0200, // 00A5 MOVE R23 R1
+ 0x5C601600, // 00A6 MOVE R24 R11
+ 0x7C540600, // 00A7 CALL R21 3
+ 0x782E0002, // 00A8 JMPF R11 #00AC
+ 0x78560001, // 00A9 JMPF R21 #00AC
+ 0xA8040004, // 00AA EXBLK 1 4
+ 0x80002C00, // 00AB RET 0
+ 0x7001FFE6, // 00AC JMP #0094
+ 0x584C000A, // 00AD LDCONST R19 K10
+ 0xAC4C0200, // 00AE CATCH R19 1 0
+ 0xB0080000, // 00AF RAISE 2 R0 R0
+ 0x7001FFDA, // 00B0 JMP #008C
+ 0x5844000A, // 00B1 LDCONST R17 K10
+ 0xAC440200, // 00B2 CATCH R17 1 0
+ 0xB0080000, // 00B3 RAISE 2 R0 R0
+ 0x7001FFCD, // 00B4 JMP #0083
+ 0x583C000A, // 00B5 LDCONST R15 K10
+ 0xAC3C0200, // 00B6 CATCH R15 1 0
+ 0xB0080000, // 00B7 RAISE 2 R0 R0
+ 0x7001FFC1, // 00B8 JMP #007B
+ 0x5834000A, // 00B9 LDCONST R13 K10
+ 0xAC340200, // 00BA CATCH R13 1 0
+ 0xB0080000, // 00BB RAISE 2 R0 R0
+ 0x782E0019, // 00BC JMPF R11 #00D7
+ 0x5C340C00, // 00BD MOVE R13 R6
+ 0x74360003, // 00BE JMPT R13 #00C3
+ 0xB8362200, // 00BF GETNGBL R13 K17
+ 0x88341B12, // 00C0 GETMBR R13 R13 K18
+ 0x9006200D, // 00C1 SETMBR R1 K16 R13
+ 0x7002000E, // 00C2 JMP #00D2
+ 0x5C341000, // 00C3 MOVE R13 R8
+ 0x74360003, // 00C4 JMPT R13 #00C9
+ 0xB8362200, // 00C5 GETNGBL R13 K17
+ 0x88341B13, // 00C6 GETMBR R13 R13 K19
+ 0x9006200D, // 00C7 SETMBR R1 K16 R13
+ 0x70020008, // 00C8 JMP #00D2
+ 0x5C341400, // 00C9 MOVE R13 R10
+ 0x74360003, // 00CA JMPT R13 #00CF
+ 0xB8362200, // 00CB GETNGBL R13 K17
+ 0x88341B14, // 00CC GETMBR R13 R13 K20
+ 0x9006200D, // 00CD SETMBR R1 K16 R13
+ 0x70020002, // 00CE JMP #00D2
+ 0xB8362200, // 00CF GETNGBL R13 K17
+ 0x88341B15, // 00D0 GETMBR R13 R13 K21
+ 0x9006200D, // 00D1 SETMBR R1 K16 R13
+ 0x5C340400, // 00D2 MOVE R13 R2
+ 0x4C380000, // 00D3 LDNIL R14
+ 0x5C3C0200, // 00D4 MOVE R15 R1
+ 0x50400200, // 00D5 LDBOOL R16 1 0
+ 0x7C340600, // 00D6 CALL R13 3
+ 0x80000000, // 00D7 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_send
+********************************************************************/
+be_local_closure(Matter_Device_msg_send, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(udp_server),
+ /* K1 */ be_nested_str_weak(send_UDP),
+ }),
+ be_str_weak(msg_send),
+ &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: get_plugin_class_displayname
+********************************************************************/
+be_local_closure(Matter_Device_get_plugin_class_displayname, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(plugins_classes),
+ /* K1 */ be_nested_str_weak(find),
+ /* K2 */ be_nested_str_weak(NAME),
+ /* K3 */ be_nested_str_weak(),
+ }),
+ be_str_weak(get_plugin_class_displayname),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 9]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x5C100200, // 0002 MOVE R4 R1
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0001, // 0004 JMPF R2 #0007
+ 0x880C0502, // 0005 GETMBR R3 R2 K2
+ 0x70020000, // 0006 JMP #0008
+ 0x580C0003, // 0007 LDCONST R3 K3
+ 0x80040600, // 0008 RET 1 R3
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_op_discovery_all_fabrics
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(sessions),
+ /* K1 */ be_nested_str_weak(active_fabrics),
+ /* K2 */ be_nested_str_weak(get_device_id),
+ /* K3 */ be_nested_str_weak(get_fabric_id),
+ /* K4 */ be_nested_str_weak(mdns_remove_op_discovery),
+ /* K5 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(mdns_remove_op_discovery_all_fabrics),
+ &be_const_str_solidified,
+ ( &(const binstruction[22]) { /* code */
+ 0x60040010, // 0000 GETGBL R1 G16
+ 0x88080100, // 0001 GETMBR R2 R0 K0
+ 0x8C080501, // 0002 GETMET R2 R2 K1
+ 0x7C080200, // 0003 CALL R2 1
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA802000B, // 0005 EXBLK 0 #0012
+ 0x5C080200, // 0006 MOVE R2 R1
+ 0x7C080000, // 0007 CALL R2 0
+ 0x8C0C0502, // 0008 GETMET R3 R2 K2
+ 0x7C0C0200, // 0009 CALL R3 1
+ 0x780E0005, // 000A JMPF R3 #0011
+ 0x8C0C0503, // 000B GETMET R3 R2 K3
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x780E0002, // 000D JMPF R3 #0011
+ 0x8C0C0104, // 000E GETMET R3 R0 K4
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x7001FFF3, // 0011 JMP #0006
+ 0x58040005, // 0012 LDCONST R1 K5
+ 0xAC040200, // 0013 CATCH R1 1 0
+ 0xB0080000, // 0014 RAISE 2 R0 R0
+ 0x80000000, // 0015 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: msg_received
+********************************************************************/
+be_local_closure(Matter_Device_msg_received, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(msg_received),
+ }),
+ be_str_weak(msg_received),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 7]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 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: start_operational_discovery
+********************************************************************/
+be_local_closure(Matter_Device_start_operational_discovery, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(crypto),
+ /* K1 */ be_nested_str_weak(mdns),
+ /* K2 */ be_nested_str_weak(string),
+ /* K3 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K4 */ be_nested_str_weak(root_w0),
+ /* K5 */ be_nested_str_weak(root_L),
+ /* K6 */ be_nested_str_weak(set_expire_in_seconds),
+ /* K7 */ be_nested_str_weak(mdns_announce_op_discovery),
+ /* K8 */ be_nested_str_weak(get_fabric),
+ }),
+ be_str_weak(start_operational_discovery),
+ &be_const_str_solidified,
+ ( &(const binstruction[17]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xA4120400, // 0002 IMPORT R4 K2
+ 0x8C140103, // 0003 GETMET R5 R0 K3
+ 0x7C140200, // 0004 CALL R5 1
+ 0x4C140000, // 0005 LDNIL R5
+ 0x90020805, // 0006 SETMBR R0 K4 R5
+ 0x4C140000, // 0007 LDNIL R5
+ 0x90020A05, // 0008 SETMBR R0 K5 R5
+ 0x8C140306, // 0009 GETMET R5 R1 K6
+ 0x541E003B, // 000A LDINT R7 60
+ 0x7C140400, // 000B CALL R5 2
+ 0x8C140107, // 000C GETMET R5 R0 K7
+ 0x8C1C0308, // 000D GETMET R7 R1 K8
+ 0x7C1C0200, // 000E CALL R7 1
+ 0x7C140400, // 000F CALL R5 2
+ 0x80000000, // 0010 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_250ms
+********************************************************************/
+be_local_closure(Matter_Device_every_250ms, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(message_handler),
+ /* K1 */ be_nested_str_weak(every_250ms),
+ }),
+ be_str_weak(every_250ms),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80000000, // 0003 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: register_plugin_class
+********************************************************************/
+be_local_closure(Matter_Device_register_plugin_class, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(introspect),
+ /* K1 */ be_nested_str_weak(get),
+ /* K2 */ be_nested_str_weak(TYPE),
+ /* K3 */ be_nested_str_weak(plugins_classes),
+ }),
+ be_str_weak(register_plugin_class),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 9]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x8C0C0501, // 0001 GETMET R3 R2 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x58180002, // 0003 LDCONST R6 K2
+ 0x7C0C0600, // 0004 CALL R3 3
+ 0x780E0001, // 0005 JMPF R3 #0008
+ 0x88100103, // 0006 GETMBR R4 R0 K3
+ 0x98100601, // 0007 SETIDX R4 R3 R1
+ 0x80000000, // 0008 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: mdns_remove_PASE
+********************************************************************/
+be_local_closure(Matter_Device_mdns_remove_PASE, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[22]) { /* constants */
+ /* K0 */ be_nested_str_weak(mdns),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(mdns_pase_eth),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(log),
+ /* K5 */ be_nested_str_weak(format),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20calling_X20mdns_X2Eremove_service_X28_X25s_X2C_X20_X25s_X2C_X20_X25s_X2C_X20_X25s_X29),
+ /* K7 */ be_nested_str_weak(_matterc),
+ /* K8 */ be_nested_str_weak(_udp),
+ /* K9 */ be_nested_str_weak(commissioning_instance_eth),
+ /* K10 */ be_nested_str_weak(hostname_eth),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20remove_X20mDNS_X20on_X20_X25s_X20_X27_X25s_X27),
+ /* K13 */ be_nested_str_weak(eth),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(remove_service),
+ /* K16 */ be_nested_str_weak(mdns_pase_wifi),
+ /* K17 */ be_nested_str_weak(commissioning_instance_wifi),
+ /* K18 */ be_nested_str_weak(hostname_wifi),
+ /* K19 */ be_nested_str_weak(wifi),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20Exception),
+ /* K21 */ be_nested_str_weak(_X7C),
+ }),
+ be_str_weak(mdns_remove_PASE),
+ &be_const_str_solidified,
+ ( &(const binstruction[83]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xA802003D, // 0002 EXBLK 0 #0041
+ 0x880C0102, // 0003 GETMBR R3 R0 K2
+ 0x780E001B, // 0004 JMPF R3 #0021
+ 0xB80E0600, // 0005 GETNGBL R3 K3
+ 0x8C0C0704, // 0006 GETMET R3 R3 K4
+ 0x8C140505, // 0007 GETMET R5 R2 K5
+ 0x581C0006, // 0008 LDCONST R7 K6
+ 0x58200007, // 0009 LDCONST R8 K7
+ 0x58240008, // 000A LDCONST R9 K8
+ 0x88280109, // 000B GETMBR R10 R0 K9
+ 0x882C010A, // 000C GETMBR R11 R0 K10
+ 0x7C140C00, // 000D CALL R5 6
+ 0x5818000B, // 000E LDCONST R6 K11
+ 0x7C0C0600, // 000F CALL R3 3
+ 0xB80E0600, // 0010 GETNGBL R3 K3
+ 0x8C0C0704, // 0011 GETMET R3 R3 K4
+ 0x8C140505, // 0012 GETMET R5 R2 K5
+ 0x581C000C, // 0013 LDCONST R7 K12
+ 0x5820000D, // 0014 LDCONST R8 K13
+ 0x88240109, // 0015 GETMBR R9 R0 K9
+ 0x7C140800, // 0016 CALL R5 4
+ 0x5818000E, // 0017 LDCONST R6 K14
+ 0x7C0C0600, // 0018 CALL R3 3
+ 0x500C0000, // 0019 LDBOOL R3 0 0
+ 0x90020403, // 001A SETMBR R0 K2 R3
+ 0x8C0C030F, // 001B GETMET R3 R1 K15
+ 0x58140007, // 001C LDCONST R5 K7
+ 0x58180008, // 001D LDCONST R6 K8
+ 0x881C0109, // 001E GETMBR R7 R0 K9
+ 0x8820010A, // 001F GETMBR R8 R0 K10
+ 0x7C0C0A00, // 0020 CALL R3 5
+ 0x880C0110, // 0021 GETMBR R3 R0 K16
+ 0x780E001B, // 0022 JMPF R3 #003F
+ 0xB80E0600, // 0023 GETNGBL R3 K3
+ 0x8C0C0704, // 0024 GETMET R3 R3 K4
+ 0x8C140505, // 0025 GETMET R5 R2 K5
+ 0x581C0006, // 0026 LDCONST R7 K6
+ 0x58200007, // 0027 LDCONST R8 K7
+ 0x58240008, // 0028 LDCONST R9 K8
+ 0x88280111, // 0029 GETMBR R10 R0 K17
+ 0x882C0112, // 002A GETMBR R11 R0 K18
+ 0x7C140C00, // 002B CALL R5 6
+ 0x5818000B, // 002C LDCONST R6 K11
+ 0x7C0C0600, // 002D CALL R3 3
+ 0xB80E0600, // 002E GETNGBL R3 K3
+ 0x8C0C0704, // 002F GETMET R3 R3 K4
+ 0x8C140505, // 0030 GETMET R5 R2 K5
+ 0x581C000C, // 0031 LDCONST R7 K12
+ 0x58200013, // 0032 LDCONST R8 K19
+ 0x88240111, // 0033 GETMBR R9 R0 K17
+ 0x7C140800, // 0034 CALL R5 4
+ 0x5818000E, // 0035 LDCONST R6 K14
+ 0x7C0C0600, // 0036 CALL R3 3
+ 0x500C0000, // 0037 LDBOOL R3 0 0
+ 0x90022003, // 0038 SETMBR R0 K16 R3
+ 0x8C0C030F, // 0039 GETMET R3 R1 K15
+ 0x58140007, // 003A LDCONST R5 K7
+ 0x58180008, // 003B LDCONST R6 K8
+ 0x881C0111, // 003C GETMBR R7 R0 K17
+ 0x88200112, // 003D GETMBR R8 R0 K18
+ 0x7C0C0A00, // 003E CALL R3 5
+ 0xA8040001, // 003F EXBLK 1 1
+ 0x70020010, // 0040 JMP #0052
+ 0xAC0C0002, // 0041 CATCH R3 0 2
+ 0x7002000D, // 0042 JMP #0051
+ 0xB8160600, // 0043 GETNGBL R5 K3
+ 0x8C140B04, // 0044 GETMET R5 R5 K4
+ 0x601C0008, // 0045 GETGBL R7 G8
+ 0x5C200600, // 0046 MOVE R8 R3
+ 0x7C1C0200, // 0047 CALL R7 1
+ 0x001E2807, // 0048 ADD R7 K20 R7
+ 0x001C0F15, // 0049 ADD R7 R7 K21
+ 0x60200008, // 004A GETGBL R8 G8
+ 0x5C240800, // 004B MOVE R9 R4
+ 0x7C200200, // 004C CALL R8 1
+ 0x001C0E08, // 004D ADD R7 R7 R8
+ 0x5820000E, // 004E LDCONST R8 K14
+ 0x7C140600, // 004F CALL R5 3
+ 0x70020000, // 0050 JMP #0052
+ 0xB0080000, // 0051 RAISE 2 R0 R0
+ 0x80000000, // 0052 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: compute_manual_pairing_code
+********************************************************************/
+be_local_closure(Matter_Device_compute_manual_pairing_code, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(root_discriminator),
+ /* K2 */ be_nested_str_weak(root_passcode),
+ /* K3 */ be_nested_str_weak(format),
+ /* K4 */ be_nested_str_weak(_X251i_X2505i_X2504i),
+ /* K5 */ be_nested_str_weak(matter),
+ /* K6 */ be_nested_str_weak(Verhoeff),
+ /* K7 */ be_nested_str_weak(checksum),
+ }),
+ be_str_weak(compute_manual_pairing_code),
+ &be_const_str_solidified,
+ ( &(const binstruction[31]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x88080101, // 0001 GETMBR R2 R0 K1
+ 0x540E0FFE, // 0002 LDINT R3 4095
+ 0x2C080403, // 0003 AND R2 R2 R3
+ 0x540E0009, // 0004 LDINT R3 10
+ 0x3C080403, // 0005 SHR R2 R2 R3
+ 0x880C0101, // 0006 GETMBR R3 R0 K1
+ 0x541202FF, // 0007 LDINT R4 768
+ 0x2C0C0604, // 0008 AND R3 R3 R4
+ 0x54120005, // 0009 LDINT R4 6
+ 0x380C0604, // 000A SHL R3 R3 R4
+ 0x88100102, // 000B GETMBR R4 R0 K2
+ 0x54163FFE, // 000C LDINT R5 16383
+ 0x2C100805, // 000D AND R4 R4 R5
+ 0x300C0604, // 000E OR R3 R3 R4
+ 0x88100102, // 000F GETMBR R4 R0 K2
+ 0x5416000D, // 0010 LDINT R5 14
+ 0x3C100805, // 0011 SHR R4 R4 R5
+ 0x8C140303, // 0012 GETMET R5 R1 K3
+ 0x581C0004, // 0013 LDCONST R7 K4
+ 0x5C200400, // 0014 MOVE R8 R2
+ 0x5C240600, // 0015 MOVE R9 R3
+ 0x5C280800, // 0016 MOVE R10 R4
+ 0x7C140A00, // 0017 CALL R5 5
+ 0xB81A0A00, // 0018 GETNGBL R6 K5
+ 0x88180D06, // 0019 GETMBR R6 R6 K6
+ 0x8C180D07, // 001A GETMET R6 R6 K7
+ 0x5C200A00, // 001B MOVE R8 R5
+ 0x7C180400, // 001C CALL R6 2
+ 0x00140A06, // 001D ADD R5 R5 R6
+ 0x80040A00, // 001E RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Device
********************************************************************/
be_local_class(Matter_Device,
- 31,
+ 32,
NULL,
- be_nested_map(91,
+ be_nested_map(93,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(save_param, 26), be_const_closure(Matter_Device_save_param_closure) },
- { be_const_key_weak(_trigger_read_sensors, -1), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
- { be_const_key_weak(root_L, 10), be_const_var(30) },
- { be_const_key_weak(plugins, -1), be_const_var(1) },
+ { be_const_key_weak(message_handler, -1), be_const_var(6) },
+ { be_const_key_weak(generate_random_passcode, -1), be_const_closure(Matter_Device_generate_random_passcode_closure) },
+ { be_const_key_weak(save_param, -1), be_const_closure(Matter_Device_save_param_closure) },
+ { be_const_key_weak(mdns_pase_wifi, -1), be_const_var(24) },
+ { be_const_key_weak(remove_fabric, 28), be_const_closure(Matter_Device_remove_fabric_closure) },
+ { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
+ { be_const_key_weak(root_iterations, -1), be_const_var(28) },
+ { be_const_key_weak(commissioning_discriminator, -1), be_const_var(12) },
+ { be_const_key_weak(commissioning_w0, -1), be_const_var(14) },
+ { be_const_key_weak(compute_manual_pairing_code, 66), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
+ { be_const_key_weak(root_discriminator, -1), be_const_var(25) },
+ { be_const_key_weak(stop, -1), be_const_closure(Matter_Device_stop_closure) },
+ { be_const_key_weak(mdns_remove_PASE, 22), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
+ { be_const_key_weak(plugins_config, -1), be_const_var(4) },
+ { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
+ { be_const_key_weak(_trigger_read_sensors, 62), be_const_closure(Matter_Device__trigger_read_sensors_closure) },
{ be_const_key_weak(register_plugin_class, -1), be_const_closure(Matter_Device_register_plugin_class_closure) },
- { be_const_key_weak(commissioning_open, 56), be_const_var(9) },
+ { be_const_key_weak(root_passcode, 12), be_const_var(26) },
+ { be_const_key_weak(every_250ms, 19), be_const_closure(Matter_Device_every_250ms_closure) },
+ { be_const_key_weak(commissioning_instance_eth, -1), be_const_var(18) },
+ { be_const_key_weak(vendorid, -1), be_const_var(21) },
+ { be_const_key_weak(register_native_classes, 89), be_const_closure(Matter_Device_register_native_classes_closure) },
+ { be_const_key_weak(start_operational_discovery, 15), be_const_closure(Matter_Device_start_operational_discovery_closure) },
+ { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
+ { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
+ { be_const_key_weak(is_root_commissioning_open, -1), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
+ { be_const_key_weak(commissioning_open, -1), be_const_var(10) },
+ { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(17) },
+ { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) },
+ { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
+ { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) },
+ { be_const_key_weak(productid, 73), be_const_var(22) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) },
+ { be_const_key_weak(get_plugin_class_displayname, 59), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) },
+ { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) },
+ { be_const_key_weak(start, 86), be_const_closure(Matter_Device_start_closure) },
+ { be_const_key_weak(k2l_num, -1), be_const_static_closure(Matter_Device_k2l_num_closure) },
+ { be_const_key_weak(mdns_announce_op_discovery, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
+ { be_const_key_weak(root_salt, -1), be_const_var(29) },
+ { be_const_key_weak(every_second, 78), be_const_closure(Matter_Device_every_second_closure) },
+ { be_const_key_weak(commissioning_L, -1), be_const_var(15) },
+ { be_const_key_weak(hostname_wifi, 18), be_const_var(19) },
+ { be_const_key_weak(get_plugin_class_arg, 61), be_const_closure(Matter_Device_get_plugin_class_arg_closure) },
+ { be_const_key_weak(started, 84), be_const_var(0) },
+ { be_const_key_weak(root_w0, 25), be_const_var(30) },
+ { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
+ { be_const_key_weak(autoconf_device_map, 82), be_const_closure(Matter_Device_autoconf_device_map_closure) },
+ { be_const_key_weak(every_50ms, -1), be_const_closure(Matter_Device_every_50ms_closure) },
+ { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(16) },
+ { be_const_key_weak(msg_send, 30), be_const_closure(Matter_Device_msg_send_closure) },
+ { be_const_key_weak(commissioning_salt, -1), be_const_var(13) },
+ { be_const_key_weak(plugins, -1), be_const_var(1) },
+ { be_const_key_weak(PBKDF_ITERATIONS, -1), be_const_int(1000) },
+ { be_const_key_weak(_mdns_announce_hostname, 50), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
{ be_const_key_weak(start_mdns_announce_hostnames, -1), be_const_closure(Matter_Device_start_mdns_announce_hostnames_closure) },
- { be_const_key_weak(PASE_TIMEOUT, -1), be_const_int(600) },
- { be_const_key_weak(plugins_classes, -1), be_const_var(3) },
- { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
- { be_const_key_weak(PASSCODE_INVALID, 16), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ { be_const_key_weak(attribute_updated, 49), be_const_closure(Matter_Device_attribute_updated_closure) },
+ { be_const_key_weak(PRODUCT_ID, -1), be_const_int(32768) },
+ { be_const_key_weak(root_L, -1), be_const_var(31) },
+ { be_const_key_weak(register_commands, 77), be_const_closure(Matter_Device_register_commands_closure) },
+ { be_const_key_weak(plugins_persist, -1), be_const_var(2) },
+ { be_const_key_weak(init, 57), be_const_closure(Matter_Device_init_closure) },
+ { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
+ { be_const_key_weak(hostname_eth, -1), be_const_var(20) },
+ { be_const_key_weak(received_ack, -1), be_const_closure(Matter_Device_received_ack_closure) },
+ { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
+ { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
+ { be_const_key_weak(load_param, -1), be_const_closure(Matter_Device_load_param_closure) },
+ { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(tick, 70), be_const_var(9) },
+ { be_const_key_weak(udp_server, 67), be_const_var(5) },
+ { be_const_key_weak(start_basic_commissioning, -1), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
+ { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
+ { be_const_key_weak(PASSCODE_INVALID, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
@@ -4868,86 +5049,26 @@ be_local_class(Matter_Device,
be_const_int(12345678),
be_const_int(87654321),
})) ) } )) },
- { be_const_key_weak(sort_distinct, -1), be_const_static_closure(Matter_Device_sort_distinct_closure) },
- { be_const_key_weak(root_passcode, -1), be_const_var(25) },
- { be_const_key_weak(generate_random_passcode, 14), be_const_closure(Matter_Device_generate_random_passcode_closure) },
- { be_const_key_weak(hostname_eth, -1), be_const_var(19) },
- { be_const_key_weak(register_commands, 85), be_const_closure(Matter_Device_register_commands_closure) },
- { be_const_key_weak(get_plugin_class_displayname, -1), be_const_closure(Matter_Device_get_plugin_class_displayname_closure) },
+ { be_const_key_weak(start_root_basic_commissioning, -1), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
+ { be_const_key_weak(autoconf_device, -1), be_const_closure(Matter_Device_autoconf_device_closure) },
+ { be_const_key_weak(save_before_restart, 56), be_const_closure(Matter_Device_save_before_restart_closure) },
+ { be_const_key_weak(process_attribute_expansion, -1), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
+ { be_const_key_weak(_load_plugins_config, -1), be_const_closure(Matter_Device__load_plugins_config_closure) },
+ { be_const_key_weak(mdns_pase_eth, -1), be_const_var(23) },
+ { be_const_key_weak(PASE_TIMEOUT, 33), be_const_int(600) },
+ { be_const_key_weak(is_commissioning_open, 31), be_const_closure(Matter_Device_is_commissioning_open_closure) },
+ { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
{ be_const_key_weak(mdns_remove_op_discovery, -1), be_const_closure(Matter_Device_mdns_remove_op_discovery_closure) },
- { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Device_attribute_updated_closure) },
- { be_const_key_weak(productid, 84), be_const_var(21) },
- { be_const_key_weak(ipv4only, 17), be_const_var(26) },
- { be_const_key_weak(UDP_PORT, 68), be_const_int(5540) },
- { be_const_key_weak(register_native_classes, -1), be_const_closure(Matter_Device_register_native_classes_closure) },
- { be_const_key_weak(k2l_num, 65), be_const_static_closure(Matter_Device_k2l_num_closure) },
- { be_const_key_weak(msg_received, -1), be_const_closure(Matter_Device_msg_received_closure) },
- { be_const_key_weak(mdns_announce_op_discovery, 27), be_const_closure(Matter_Device_mdns_announce_op_discovery_closure) },
- { be_const_key_weak(commissioning_L, -1), be_const_var(14) },
- { be_const_key_weak(start_basic_commissioning, 80), be_const_closure(Matter_Device_start_basic_commissioning_closure) },
- { be_const_key_weak(compute_manual_pairing_code, 6), be_const_closure(Matter_Device_compute_manual_pairing_code_closure) },
- { be_const_key_weak(save_before_restart, -1), be_const_closure(Matter_Device_save_before_restart_closure) },
- { be_const_key_weak(message_handler, 89), be_const_var(6) },
- { be_const_key_weak(start_commissioning_complete, -1), be_const_closure(Matter_Device_start_commissioning_complete_closure) },
- { be_const_key_weak(PRODUCT_ID, 24), be_const_int(32768) },
- { be_const_key_weak(msg_send, 11), be_const_closure(Matter_Device_msg_send_closure) },
- { be_const_key_weak(start, -1), be_const_closure(Matter_Device_start_closure) },
- { be_const_key_weak(load_param, 38), be_const_closure(Matter_Device_load_param_closure) },
- { be_const_key_weak(commissioning_salt, 22), be_const_var(12) },
- { be_const_key_weak(root_iterations, -1), be_const_var(27) },
- { be_const_key_weak(vendorid, -1), be_const_var(20) },
- { be_const_key_weak(udp_server, 81), be_const_var(5) },
- { be_const_key_weak(mdns_remove_op_discovery_all_fabrics, 63), be_const_closure(Matter_Device_mdns_remove_op_discovery_all_fabrics_closure) },
- { be_const_key_weak(get_active_endpoints, -1), be_const_closure(Matter_Device_get_active_endpoints_closure) },
- { be_const_key_weak(start_operational_discovery, 51), be_const_closure(Matter_Device_start_operational_discovery_closure) },
- { be_const_key_weak(event_fabrics_saved, -1), be_const_closure(Matter_Device_event_fabrics_saved_closure) },
- { be_const_key_weak(mdns_announce_PASE, -1), be_const_closure(Matter_Device_mdns_announce_PASE_closure) },
- { be_const_key_weak(stop, 2), be_const_closure(Matter_Device_stop_closure) },
- { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
- { be_const_key_weak(plugins_config, 30), be_const_var(4) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Device_invoke_request_closure) },
- { be_const_key_weak(is_root_commissioning_open, 82), be_const_closure(Matter_Device_is_root_commissioning_open_closure) },
- { be_const_key_weak(commissioning_instance_eth, 33), be_const_var(17) },
- { be_const_key_weak(mdns_remove_PASE, -1), be_const_closure(Matter_Device_mdns_remove_PASE_closure) },
- { be_const_key_weak(hostname_wifi, 47), be_const_var(18) },
- { be_const_key_weak(FILENAME, -1), be_nested_str_weak(_matter_device_X2Ejson) },
- { be_const_key_weak(process_attribute_expansion, 57), be_const_closure(Matter_Device_process_attribute_expansion_closure) },
- { be_const_key_weak(start_commissioning_complete_deferred, -1), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
- { be_const_key_weak(commissioning_w0, -1), be_const_var(13) },
- { be_const_key_weak(plugins_persist, 49), be_const_var(2) },
- { be_const_key_weak(start_operational_discovery_deferred, 66), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
- { be_const_key_weak(commissioning_discriminator, 23), be_const_var(11) },
- { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(15) },
- { be_const_key_weak(autoconf_device_map, -1), be_const_closure(Matter_Device_autoconf_device_map_closure) },
- { be_const_key_weak(remove_fabric, -1), be_const_closure(Matter_Device_remove_fabric_closure) },
- { be_const_key_weak(_init_basic_commissioning, -1), be_const_closure(Matter_Device__init_basic_commissioning_closure) },
- { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Device_every_250ms_closure) },
- { be_const_key_weak(MtrJoin, -1), be_const_closure(Matter_Device_MtrJoin_closure) },
- { be_const_key_weak(received_ack, 88), be_const_closure(Matter_Device_received_ack_closure) },
- { be_const_key_weak(start_root_basic_commissioning, 54), be_const_closure(Matter_Device_start_root_basic_commissioning_closure) },
- { be_const_key_weak(commissioning_instance_wifi, -1), be_const_var(16) },
- { be_const_key_weak(_compute_pbkdf, -1), be_const_closure(Matter_Device__compute_pbkdf_closure) },
- { be_const_key_weak(PBKDF_ITERATIONS, 48), be_const_int(1000) },
- { be_const_key_weak(_start_udp, -1), be_const_closure(Matter_Device__start_udp_closure) },
- { be_const_key_weak(started, 44), be_const_var(0) },
- { be_const_key_weak(ui, 42), be_const_var(8) },
- { be_const_key_weak(mdns_pase_wifi, 41), be_const_var(23) },
- { be_const_key_weak(root_salt, -1), be_const_var(28) },
- { be_const_key_weak(mdns_announce_op_discovery_all_fabrics, -1), be_const_closure(Matter_Device_mdns_announce_op_discovery_all_fabrics_closure) },
+ { be_const_key_weak(ui, -1), be_const_var(8) },
{ be_const_key_weak(sessions, -1), be_const_var(7) },
- { be_const_key_weak(_load_plugins_config, 29), be_const_closure(Matter_Device__load_plugins_config_closure) },
- { be_const_key_weak(get_plugin_class_arg, -1), be_const_closure(Matter_Device_get_plugin_class_arg_closure) },
- { be_const_key_weak(commissioning_iterations, -1), be_const_var(10) },
- { be_const_key_weak(_mdns_announce_hostname, -1), be_const_closure(Matter_Device__mdns_announce_hostname_closure) },
- { be_const_key_weak(VENDOR_ID, -1), be_const_int(65521) },
- { be_const_key_weak(root_discriminator, -1), be_const_var(24) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Device_init_closure) },
- { be_const_key_weak(root_w0, 90), be_const_var(29) },
- { be_const_key_weak(mdns_pase_eth, -1), be_const_var(22) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Device_every_second_closure) },
- { be_const_key_weak(compute_qrcode_content, -1), be_const_closure(Matter_Device_compute_qrcode_content_closure) },
- { be_const_key_weak(k2l, -1), be_const_static_closure(Matter_Device_k2l_closure) },
- { be_const_key_weak(is_commissioning_open, -1), be_const_closure(Matter_Device_is_commissioning_open_closure) },
+ { be_const_key_weak(plugins_classes, -1), be_const_var(3) },
+ { be_const_key_weak(sort_distinct, 47), be_const_static_closure(Matter_Device_sort_distinct_closure) },
+ { be_const_key_weak(commissioning_iterations, 16), be_const_var(11) },
+ { be_const_key_weak(UDP_PORT, -1), be_const_int(5540) },
+ { be_const_key_weak(stop_basic_commissioning, -1), be_const_closure(Matter_Device_stop_basic_commissioning_closure) },
+ { be_const_key_weak(start_commissioning_complete_deferred, 9), be_const_closure(Matter_Device_start_commissioning_complete_deferred_closure) },
+ { be_const_key_weak(ipv4only, 3), be_const_var(27) },
+ { be_const_key_weak(start_operational_discovery_deferred, 0), be_const_closure(Matter_Device_start_operational_discovery_deferred_closure) },
})),
be_str_weak(Matter_Device)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
index 4e0419fb8..a94a7c160 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_MessageHandler.h
@@ -300,7 +300,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
}),
be_str_weak(msg_received),
&be_const_str_solidified,
- ( &(const binstruction[390]) { /* code */
+ ( &(const binstruction[391]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0x50140000, // 0001 LDBOOL R5 0 0
0xA802016A, // 0002 EXBLK 0 #016E
@@ -666,9 +666,9 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0xA8040001, // 016A EXBLK 1 1
0x80040A00, // 016B RET 1 R5
0xA8040001, // 016C EXBLK 1 1
- 0x70020016, // 016D JMP #0185
+ 0x70020017, // 016D JMP #0186
0xAC180002, // 016E CATCH R6 0 2
- 0x70020013, // 016F JMP #0184
+ 0x70020014, // 016F JMP #0185
0xB8220A00, // 0170 GETNGBL R8 K5
0x8C201106, // 0171 GETMET R8 R8 K6
0x60280008, // 0172 GETGBL R10 G8
@@ -681,16 +681,17 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x7C2C0200, // 0179 CALL R11 1
0x0028140B, // 017A ADD R10 R10 R11
0x7C200400, // 017B CALL R8 2
- 0x88200148, // 017C GETMBR R8 R0 K72
- 0x78220002, // 017D JMPF R8 #0181
- 0xA4229200, // 017E IMPORT R8 K73
- 0x8C24114A, // 017F GETMET R9 R8 K74
- 0x7C240200, // 0180 CALL R9 1
- 0x50200000, // 0181 LDBOOL R8 0 0
- 0x80041000, // 0182 RET 1 R8
- 0x70020000, // 0183 JMP #0185
- 0xB0080000, // 0184 RAISE 2 R0 R0
- 0x80000000, // 0185 RET 0
+ 0xB8220A00, // 017C GETNGBL R8 K5
+ 0x88201148, // 017D GETMBR R8 R8 K72
+ 0x78220002, // 017E JMPF R8 #0182
+ 0xA4229200, // 017F IMPORT R8 K73
+ 0x8C24114A, // 0180 GETMET R9 R8 K74
+ 0x7C240200, // 0181 CALL R9 1
+ 0x50200000, // 0182 LDBOOL R8 0 0
+ 0x80041000, // 0183 RET 1 R8
+ 0x70020000, // 0184 JMP #0186
+ 0xB0080000, // 0185 RAISE 2 R0 R0
+ 0x80000000, // 0186 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
index 00fe4a9f5..1455906aa 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
@@ -7,100 +7,9 @@
extern const bclass be_class_Matter_Plugin;
/********************************************************************
-** Solidified function: attribute_updated
+** Solidified function: read_event
********************************************************************/
-be_local_closure(Matter_Plugin_attribute_updated, /* name */
- be_nested_proto(
- 11, /* nstack */
- 5, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
- /* K1 */ be_nested_str_weak(device),
- /* K2 */ be_nested_str_weak(attribute_updated),
- }),
- be_str_weak(attribute_updated),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x1C140205, // 0001 EQ R5 R1 R5
- 0x78160000, // 0002 JMPF R5 #0004
- 0x88040100, // 0003 GETMBR R1 R0 K0
- 0x88140101, // 0004 GETMBR R5 R0 K1
- 0x8C140B02, // 0005 GETMET R5 R5 K2
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x5C200400, // 0007 MOVE R8 R2
- 0x5C240600, // 0008 MOVE R9 R3
- 0x5C280800, // 0009 MOVE R10 R4
- 0x7C140A00, // 000A CALL R5 5
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: timed_request
-********************************************************************/
-be_local_closure(Matter_Plugin_timed_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(timed_request),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: get_endpoint
-********************************************************************/
-be_local_closure(Matter_Plugin_get_endpoint, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
- }),
- be_str_weak(get_endpoint),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: subscribe_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
+be_local_closure(Matter_Plugin_read_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
@@ -111,7 +20,7 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(subscribe_attribute),
+ be_str_weak(read_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
@@ -122,40 +31,6 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_init, /* name */
- be_nested_proto(
- 6, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(device),
- /* K1 */ be_nested_str_weak(endpoint),
- /* K2 */ be_nested_str_weak(clusters),
- /* K3 */ be_nested_str_weak(consolidate_clusters),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0x90020202, // 0001 SETMBR R0 K1 R2
- 0x8C100103, // 0002 GETMET R4 R0 K3
- 0x7C100200, // 0003 CALL R4 1
- 0x90020404, // 0004 SETMBR R0 K2 R4
- 0x80000000, // 0005 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: write_attribute
********************************************************************/
@@ -182,12 +57,47 @@ be_local_closure(Matter_Plugin_write_attribute, /* name */
/********************************************************************
-** Solidified function: has
+** Solidified function: attribute_updated
********************************************************************/
-be_local_closure(Matter_Plugin_has, /* name */
+be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_nested_proto(
- 6, /* nstack */
- 3, /* argc */
+ 10, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(attribute_updated),
+ /* K2 */ be_nested_str_weak(endpoint),
+ }),
+ be_str_weak(attribute_updated),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 0x88180102, // 0002 GETMBR R6 R0 K2
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_cluster_list
+********************************************************************/
+be_local_closure(Matter_Plugin_get_cluster_list, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -196,53 +106,31 @@ be_local_closure(Matter_Plugin_has, /* name */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(contains),
- /* K2 */ be_nested_str_weak(endpoints),
- /* K3 */ be_nested_str_weak(find),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
}),
- be_str_weak(has),
+ be_str_weak(get_cluster_list),
&be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x880C0100, // 0000 GETMBR R3 R0 K0
- 0x8C0C0701, // 0001 GETMET R3 R3 K1
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0x780E0006, // 0004 JMPF R3 #000C
- 0x880C0102, // 0005 GETMBR R3 R0 K2
- 0x8C0C0703, // 0006 GETMET R3 R3 K3
- 0x5C140400, // 0007 MOVE R5 R2
- 0x7C0C0400, // 0008 CALL R3 2
- 0x4C100000, // 0009 LDNIL R4
- 0x200C0604, // 000A NE R3 R3 R4
- 0x740E0000, // 000B JMPT R3 #000D
- 0x500C0001, // 000C LDBOOL R3 0 1
- 0x500C0200, // 000D LDBOOL R3 1 0
- 0x80040600, // 000E RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_invoke_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
+ ( &(const binstruction[18]) { /* code */
+ 0x60080012, // 0000 GETGBL R2 G18
+ 0x7C080000, // 0001 CALL R2 0
+ 0x600C0010, // 0002 GETGBL R3 G16
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x8C100901, // 0004 GETMET R4 R4 K1
+ 0x7C100200, // 0005 CALL R4 1
+ 0x7C0C0200, // 0006 CALL R3 1
+ 0xA8020005, // 0007 EXBLK 0 #000E
+ 0x5C100600, // 0008 MOVE R4 R3
+ 0x7C100000, // 0009 CALL R4 0
+ 0x8C140502, // 000A GETMET R5 R2 K2
+ 0x5C1C0800, // 000B MOVE R7 R4
+ 0x7C140400, // 000C CALL R5 2
+ 0x7001FFF9, // 000D JMP #0008
+ 0x580C0003, // 000E LDCONST R3 K3
+ 0xAC0C0200, // 000F CATCH R3 1 0
+ 0xB0080000, // 0010 RAISE 2 R0 R0
+ 0x80040400, // 0011 RET 1 R2
})
)
);
@@ -254,31 +142,7 @@ be_local_closure(Matter_Plugin_invoke_request, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_update_shadow, /* name */
be_nested_proto(
- 1, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: every_second
-********************************************************************/
-be_local_closure(Matter_Plugin_every_second, /* name */
- be_nested_proto(
- 3, /* nstack */
+ 2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -286,15 +150,17 @@ be_local_closure(Matter_Plugin_every_second, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(update_shadow),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(tick),
+ /* K1 */ be_nested_str_weak(device),
}),
- be_str_weak(every_second),
+ be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040101, // 0000 GETMBR R1 R0 K1
+ 0x88040300, // 0001 GETMBR R1 R1 K0
+ 0x90020001, // 0002 SETMBR R0 K0 R1
+ 0x80000000, // 0003 RET 0
})
)
);
@@ -539,33 +405,6 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function:
-********************************************************************/
-be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
- be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 0, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60040008, // 0000 GETGBL R1 G8
- 0x5C080000, // 0001 MOVE R2 R0
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: get_attribute_list
********************************************************************/
@@ -600,12 +439,12 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* name */
/********************************************************************
-** Solidified function: read_event
+** Solidified function: timed_request
********************************************************************/
-be_local_closure(Matter_Plugin_read_event, /* name */
+be_local_closure(Matter_Plugin_timed_request, /* name */
be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
+ 5, /* nstack */
+ 4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -613,11 +452,11 @@ be_local_closure(Matter_Plugin_read_event, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(read_event),
+ be_str_weak(timed_request),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
})
)
);
@@ -649,12 +488,213 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */
/********************************************************************
-** Solidified function: get_cluster_list
+** Solidified function: update_shadow_lazy
********************************************************************/
-be_local_closure(Matter_Plugin_get_cluster_list, /* name */
+be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */
be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(tick),
+ /* K1 */ be_nested_str_weak(device),
+ /* K2 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(update_shadow_lazy),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x88080101, // 0001 GETMBR R2 R0 K1
+ 0x88080500, // 0002 GETMBR R2 R2 K0
+ 0x20040202, // 0003 NE R1 R1 R2
+ 0x78060001, // 0004 JMPF R1 #0007
+ 0x8C040102, // 0005 GETMET R1 R0 K2
+ 0x7C040200, // 0006 CALL R1 1
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040008, // 0000 GETGBL R1 G8
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_endpoint
+********************************************************************/
+be_local_closure(Matter_Plugin_get_endpoint, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(endpoint),
+ }),
+ be_str_weak(get_endpoint),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: subscribe_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 5, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(subscribe_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_second
+********************************************************************/
+be_local_closure(Matter_Plugin_every_second, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(every_second),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 3]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x80000000, // 0002 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_invoke_request, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_init, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(endpoint),
+ /* K2 */ be_nested_str_weak(clusters),
+ /* K3 */ be_nested_str_weak(consolidate_clusters),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x90020001, // 0000 SETMBR R0 K0 R1
+ 0x90020202, // 0001 SETMBR R0 K1 R2
+ 0x8C100103, // 0002 GETMET R4 R0 K3
+ 0x7C100200, // 0003 CALL R4 1
+ 0x90020404, // 0004 SETMBR R0 K2 R4
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: has
+********************************************************************/
+be_local_closure(Matter_Plugin_has, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -663,31 +703,28 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K1 */ be_nested_str_weak(contains),
+ /* K2 */ be_nested_str_weak(endpoints),
+ /* K3 */ be_nested_str_weak(find),
}),
- be_str_weak(get_cluster_list),
+ be_str_weak(has),
&be_const_str_solidified,
- ( &(const binstruction[18]) { /* code */
- 0x60080012, // 0000 GETGBL R2 G18
- 0x7C080000, // 0001 CALL R2 0
- 0x600C0010, // 0002 GETGBL R3 G16
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x8C100901, // 0004 GETMET R4 R4 K1
- 0x7C100200, // 0005 CALL R4 1
- 0x7C0C0200, // 0006 CALL R3 1
- 0xA8020005, // 0007 EXBLK 0 #000E
- 0x5C100600, // 0008 MOVE R4 R3
- 0x7C100000, // 0009 CALL R4 0
- 0x8C140502, // 000A GETMET R5 R2 K2
- 0x5C1C0800, // 000B MOVE R7 R4
- 0x7C140400, // 000C CALL R5 2
- 0x7001FFF9, // 000D JMP #0008
- 0x580C0003, // 000E LDCONST R3 K3
- 0xAC0C0200, // 000F CATCH R3 1 0
- 0xB0080000, // 0010 RAISE 2 R0 R0
- 0x80040400, // 0011 RET 1 R2
+ ( &(const binstruction[15]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0001 GETMET R3 R3 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x780E0006, // 0004 JMPF R3 #000C
+ 0x880C0102, // 0005 GETMBR R3 R0 K2
+ 0x8C0C0703, // 0006 GETMET R3 R3 K3
+ 0x5C140400, // 0007 MOVE R5 R2
+ 0x7C0C0400, // 0008 CALL R3 2
+ 0x4C100000, // 0009 LDNIL R4
+ 0x200C0604, // 000A NE R3 R3 R4
+ 0x740E0000, // 000B JMPT R3 #000D
+ 0x500C0001, // 000C LDBOOL R3 0 1
+ 0x500C0200, // 000D LDBOOL R3 1 0
+ 0x80040600, // 000E RET 1 R3
})
)
);
@@ -723,13 +760,18 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */
** Solidified class: Matter_Plugin
********************************************************************/
be_local_class(Matter_Plugin,
- 3,
+ 4,
NULL,
- be_nested_map(25,
+ be_nested_map(27,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
- { be_const_key_weak(timed_request, 7), be_const_closure(Matter_Plugin_timed_request_closure) },
- { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
+ { be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) },
+ { be_const_key_weak(TYPE, 18), be_nested_str_weak() },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
+ { be_const_key_weak(tick, -1), be_const_var(3) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak() },
+ { be_const_key_weak(get_cluster_list, 2), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -744,27 +786,24 @@ be_local_class(Matter_Plugin,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
- { be_const_key_weak(subscribe_event, 18), be_const_closure(Matter_Plugin_subscribe_event_closure) },
- { be_const_key_weak(clusters, -1), be_const_var(2) },
- { be_const_key_weak(endpoint, -1), be_const_var(1) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
- { be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) },
- { be_const_key_weak(device, -1), be_const_var(0) },
- { be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_invoke_request_closure) },
- { be_const_key_weak(read_event, -1), be_const_closure(Matter_Plugin_read_event_closure) },
- { be_const_key_weak(TYPE, 9), be_nested_str_weak(generic) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
- { be_const_key_weak(get_attribute_list, 17), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
- { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
- { be_const_key_weak(ARG, 16), be_nested_str_weak() },
- { be_const_key_weak(consolidate_clusters, 13), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
- { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
- { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
+ { be_const_key_weak(clusters, -1), be_const_var(2) },
+ { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
{ be_const_key_weak(NAME, 3), be_nested_str_weak() },
+ { be_const_key_weak(subscribe_attribute, 20), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
+ { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
+ { be_const_key_weak(read_attribute, 9), be_const_closure(Matter_Plugin_read_attribute_closure) },
+ { be_const_key_weak(write_attribute, 13), be_const_closure(Matter_Plugin_write_attribute_closure) },
+ { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
+ { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
+ { be_const_key_weak(endpoint, -1), be_const_var(1) },
+ { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
+ { be_const_key_weak(attribute_updated, 8), be_const_closure(Matter_Plugin_attribute_updated_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
+ { be_const_key_weak(device, 4), be_const_var(0) },
+ { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
+ { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
})),
be_str_weak(Matter_Plugin)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
index 192e2f3e3..054d6a0db 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Device.h
@@ -36,7 +36,7 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[76]) { /* code */
+ ( &(const binstruction[97]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -77,7 +77,7 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
0x542A0003, // 0025 LDINT R10 4
0x7C1C0600, // 0026 CALL R7 3
0x80040E00, // 0027 RET 1 R7
- 0x70020021, // 0028 JMP #004B
+ 0x70020036, // 0028 JMP #0060
0x541E0003, // 0029 LDINT R7 4
0x1C1C0A07, // 002A EQ R7 R5 R7
0x781E0016, // 002B JMPF R7 #0043
@@ -103,16 +103,37 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
0x542A0003, // 003F LDINT R10 4
0x7C1C0600, // 0040 CALL R7 3
0x80040E00, // 0041 RET 1 R7
- 0x70020007, // 0042 JMP #004B
- 0x601C0003, // 0043 GETGBL R7 G3
- 0x5C200000, // 0044 MOVE R8 R0
- 0x7C1C0200, // 0045 CALL R7 1
- 0x8C1C0F0C, // 0046 GETMET R7 R7 K12
- 0x5C240200, // 0047 MOVE R9 R1
- 0x5C280400, // 0048 MOVE R10 R2
- 0x7C1C0600, // 0049 CALL R7 3
- 0x80040E00, // 004A RET 1 R7
- 0x80000000, // 004B RET 0
+ 0x7002001C, // 0042 JMP #0060
+ 0x541E0004, // 0043 LDINT R7 5
+ 0x1C1C0A07, // 0044 EQ R7 R5 R7
+ 0x781E0011, // 0045 JMPF R7 #0058
+ 0x541EFFFB, // 0046 LDINT R7 65532
+ 0x1C1C0C07, // 0047 EQ R7 R6 R7
+ 0x781E0005, // 0048 JMPF R7 #004F
+ 0x8C1C0907, // 0049 GETMET R7 R4 K7
+ 0x8824090B, // 004A GETMBR R9 R4 K11
+ 0x58280006, // 004B LDCONST R10 K6
+ 0x7C1C0600, // 004C CALL R7 3
+ 0x80040E00, // 004D RET 1 R7
+ 0x70020007, // 004E JMP #0057
+ 0x541EFFFC, // 004F LDINT R7 65533
+ 0x1C1C0C07, // 0050 EQ R7 R6 R7
+ 0x781E0004, // 0051 JMPF R7 #0057
+ 0x8C1C0907, // 0052 GETMET R7 R4 K7
+ 0x8824090B, // 0053 GETMBR R9 R4 K11
+ 0x542A0003, // 0054 LDINT R10 4
+ 0x7C1C0600, // 0055 CALL R7 3
+ 0x80040E00, // 0056 RET 1 R7
+ 0x70020007, // 0057 JMP #0060
+ 0x601C0003, // 0058 GETGBL R7 G3
+ 0x5C200000, // 0059 MOVE R8 R0
+ 0x7C1C0200, // 005A CALL R7 1
+ 0x8C1C0F0C, // 005B GETMET R7 R7 K12
+ 0x5C240200, // 005C MOVE R9 R1
+ 0x5C280400, // 005D MOVE R10 R2
+ 0x7C1C0600, // 005E CALL R7 3
+ 0x80040E00, // 005F RET 1 R7
+ 0x80000000, // 0060 RET 0
})
)
);
@@ -147,7 +168,7 @@ be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
+ ( &(const binstruction[51]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
@@ -176,23 +197,29 @@ be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
0x781E0001, // 0019 JMPF R7 #001C
0x501C0200, // 001A LDBOOL R7 1 0
0x80040E00, // 001B RET 1 R7
- 0x7002000E, // 001C JMP #002C
+ 0x70020014, // 001C JMP #0032
0x541E0003, // 001D LDINT R7 4
0x1C1C0A07, // 001E EQ R7 R5 R7
0x781E0002, // 001F JMPF R7 #0023
0x501C0200, // 0020 LDBOOL R7 1 0
0x80040E00, // 0021 RET 1 R7
- 0x70020008, // 0022 JMP #002C
- 0x601C0003, // 0023 GETGBL R7 G3
- 0x5C200000, // 0024 MOVE R8 R0
- 0x7C1C0200, // 0025 CALL R7 1
- 0x8C1C0F0A, // 0026 GETMET R7 R7 K10
- 0x5C240200, // 0027 MOVE R9 R1
- 0x5C280400, // 0028 MOVE R10 R2
- 0x5C2C0600, // 0029 MOVE R11 R3
- 0x7C1C0800, // 002A CALL R7 4
- 0x80040E00, // 002B RET 1 R7
- 0x80000000, // 002C RET 0
+ 0x7002000E, // 0022 JMP #0032
+ 0x541E0004, // 0023 LDINT R7 5
+ 0x1C1C0A07, // 0024 EQ R7 R5 R7
+ 0x781E0002, // 0025 JMPF R7 #0029
+ 0x501C0200, // 0026 LDBOOL R7 1 0
+ 0x80040E00, // 0027 RET 1 R7
+ 0x70020008, // 0028 JMP #0032
+ 0x601C0003, // 0029 GETGBL R7 G3
+ 0x5C200000, // 002A MOVE R8 R0
+ 0x7C1C0200, // 002B CALL R7 1
+ 0x8C1C0F0A, // 002C GETMET R7 R7 K10
+ 0x5C240200, // 002D MOVE R9 R1
+ 0x5C280400, // 002E MOVE R10 R2
+ 0x5C2C0600, // 002F MOVE R11 R3
+ 0x7C1C0800, // 0030 CALL R7 4
+ 0x80040E00, // 0031 RET 1 R7
+ 0x80000000, // 0032 RET 0
})
)
);
@@ -209,8 +236,16 @@ be_local_class(Matter_Plugin_Device,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(2,
+ be_const_map( * be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(4,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(1),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
@@ -218,11 +253,15 @@ be_local_class(Matter_Plugin_Device,
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
- { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(4,
+ { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
+ be_const_int(2),
+ be_const_int(3),
+ be_const_int(4),
+ be_const_int(5),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
index 287a29d30..7de68c853 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
@@ -11,7 +11,7 @@ extern const bclass be_class_Matter_Plugin_Light0;
********************************************************************/
be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
be_nested_proto(
- 14, /* nstack */
+ 12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@@ -19,114 +19,76 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[16]) { /* constants */
+ ( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
- /* K5 */ be_const_int(3),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_const_int(0),
- /* K7 */ be_const_int(1),
- /* K8 */ be_nested_str_weak(Matter_TLV_struct),
- /* K9 */ be_nested_str_weak(add_TLV),
- /* K10 */ be_nested_str_weak(U2),
- /* K11 */ be_nested_str_weak(set),
- /* K12 */ be_nested_str_weak(power),
- /* K13 */ be_nested_str_weak(update_shadow),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(shadow_onoff),
+ /* K7 */ be_nested_str_weak(set),
+ /* K8 */ be_nested_str_weak(power),
+ /* K9 */ be_nested_str_weak(update_shadow),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(2),
+ /* K12 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[87]) { /* code */
+ ( &(const binstruction[52]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
- 0x1C200D05, // 0005 EQ R8 R6 K5
- 0x78220016, // 0006 JMPF R8 #001E
- 0x1C200F06, // 0007 EQ R8 R7 K6
- 0x78220002, // 0008 JMPF R8 #000C
- 0x50200200, // 0009 LDBOOL R8 1 0
- 0x80041000, // 000A RET 1 R8
- 0x70020010, // 000B JMP #001D
- 0x1C200F07, // 000C EQ R8 R7 K7
- 0x78220009, // 000D JMPF R8 #0018
- 0x8C200B08, // 000E GETMET R8 R5 K8
- 0x7C200200, // 000F CALL R8 1
- 0x8C241109, // 0010 GETMET R9 R8 K9
- 0x582C0006, // 0011 LDCONST R11 K6
- 0x88300B0A, // 0012 GETMBR R12 R5 K10
- 0x58340006, // 0013 LDCONST R13 K6
- 0x7C240800, // 0014 CALL R9 4
- 0x900E0906, // 0015 SETMBR R3 K4 K6
- 0x80041000, // 0016 RET 1 R8
- 0x70020004, // 0017 JMP #001D
- 0x5422003F, // 0018 LDINT R8 64
- 0x1C200E08, // 0019 EQ R8 R7 R8
- 0x78220001, // 001A JMPF R8 #001D
- 0x50200200, // 001B LDBOOL R8 1 0
- 0x80041000, // 001C RET 1 R8
- 0x70020037, // 001D JMP #0056
- 0x54220003, // 001E LDINT R8 4
- 0x1C200C08, // 001F EQ R8 R6 R8
- 0x78220002, // 0020 JMPF R8 #0024
+ 0x54220005, // 0005 LDINT R8 6
+ 0x1C200C08, // 0006 EQ R8 R6 R8
+ 0x7822002A, // 0007 JMPF R8 #0033
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x1C200F06, // 000A EQ R8 R7 K6
+ 0x7822000A, // 000B JMPF R8 #0017
+ 0x8C200907, // 000C GETMET R8 R4 K7
+ 0x60280013, // 000D GETGBL R10 G19
+ 0x7C280000, // 000E CALL R10 0
+ 0x502C0000, // 000F LDBOOL R11 0 0
+ 0x982A100B, // 0010 SETIDX R10 K8 R11
+ 0x7C200400, // 0011 CALL R8 2
+ 0x8C200109, // 0012 GETMET R8 R0 K9
+ 0x7C200200, // 0013 CALL R8 1
+ 0x50200200, // 0014 LDBOOL R8 1 0
+ 0x80041000, // 0015 RET 1 R8
+ 0x7002001B, // 0016 JMP #0033
+ 0x1C200F0A, // 0017 EQ R8 R7 K10
+ 0x7822000A, // 0018 JMPF R8 #0024
+ 0x8C200907, // 0019 GETMET R8 R4 K7
+ 0x60280013, // 001A GETGBL R10 G19
+ 0x7C280000, // 001B CALL R10 0
+ 0x502C0200, // 001C LDBOOL R11 1 0
+ 0x982A100B, // 001D SETIDX R10 K8 R11
+ 0x7C200400, // 001E CALL R8 2
+ 0x8C200109, // 001F GETMET R8 R0 K9
+ 0x7C200200, // 0020 CALL R8 1
0x50200200, // 0021 LDBOOL R8 1 0
0x80041000, // 0022 RET 1 R8
- 0x70020031, // 0023 JMP #0056
- 0x54220004, // 0024 LDINT R8 5
- 0x1C200C08, // 0025 EQ R8 R6 R8
- 0x78220002, // 0026 JMPF R8 #002A
- 0x50200200, // 0027 LDBOOL R8 1 0
- 0x80041000, // 0028 RET 1 R8
- 0x7002002B, // 0029 JMP #0056
- 0x54220005, // 002A LDINT R8 6
- 0x1C200C08, // 002B EQ R8 R6 R8
- 0x78220028, // 002C JMPF R8 #0056
- 0x1C200F06, // 002D EQ R8 R7 K6
- 0x7822000A, // 002E JMPF R8 #003A
- 0x8C20090B, // 002F GETMET R8 R4 K11
- 0x60280013, // 0030 GETGBL R10 G19
- 0x7C280000, // 0031 CALL R10 0
- 0x502C0000, // 0032 LDBOOL R11 0 0
- 0x982A180B, // 0033 SETIDX R10 K12 R11
- 0x7C200400, // 0034 CALL R8 2
- 0x8C20010D, // 0035 GETMET R8 R0 K13
- 0x7C200200, // 0036 CALL R8 1
- 0x50200200, // 0037 LDBOOL R8 1 0
- 0x80041000, // 0038 RET 1 R8
- 0x7002001B, // 0039 JMP #0056
- 0x1C200F07, // 003A EQ R8 R7 K7
- 0x7822000A, // 003B JMPF R8 #0047
- 0x8C20090B, // 003C GETMET R8 R4 K11
- 0x60280013, // 003D GETGBL R10 G19
- 0x7C280000, // 003E CALL R10 0
- 0x502C0200, // 003F LDBOOL R11 1 0
- 0x982A180B, // 0040 SETIDX R10 K12 R11
- 0x7C200400, // 0041 CALL R8 2
- 0x8C20010D, // 0042 GETMET R8 R0 K13
- 0x7C200200, // 0043 CALL R8 1
- 0x50200200, // 0044 LDBOOL R8 1 0
- 0x80041000, // 0045 RET 1 R8
- 0x7002000E, // 0046 JMP #0056
- 0x1C200F0E, // 0047 EQ R8 R7 K14
- 0x7822000C, // 0048 JMPF R8 #0056
- 0x8C20090B, // 0049 GETMET R8 R4 K11
- 0x60280013, // 004A GETGBL R10 G19
- 0x7C280000, // 004B CALL R10 0
- 0x882C010F, // 004C GETMBR R11 R0 K15
- 0x782E0000, // 004D JMPF R11 #004F
- 0x502C0001, // 004E LDBOOL R11 0 1
- 0x502C0200, // 004F LDBOOL R11 1 0
- 0x982A180B, // 0050 SETIDX R10 K12 R11
- 0x7C200400, // 0051 CALL R8 2
- 0x8C20010D, // 0052 GETMET R8 R0 K13
- 0x7C200200, // 0053 CALL R8 1
- 0x50200200, // 0054 LDBOOL R8 1 0
- 0x80041000, // 0055 RET 1 R8
- 0x80000000, // 0056 RET 0
+ 0x7002000E, // 0023 JMP #0033
+ 0x1C200F0B, // 0024 EQ R8 R7 K11
+ 0x7822000C, // 0025 JMPF R8 #0033
+ 0x8C200907, // 0026 GETMET R8 R4 K7
+ 0x60280013, // 0027 GETGBL R10 G19
+ 0x7C280000, // 0028 CALL R10 0
+ 0x882C010C, // 0029 GETMBR R11 R0 K12
+ 0x782E0000, // 002A JMPF R11 #002C
+ 0x502C0001, // 002B LDBOOL R11 0 1
+ 0x502C0200, // 002C LDBOOL R11 1 0
+ 0x982A100B, // 002D SETIDX R10 K8 R11
+ 0x7C200400, // 002E CALL R8 2
+ 0x8C200109, // 002F GETMET R8 R0 K9
+ 0x7C200200, // 0030 CALL R8 1
+ 0x50200200, // 0031 LDBOOL R8 1 0
+ 0x80041000, // 0032 RET 1 R8
+ 0x80000000, // 0033 RET 0
})
)
);
@@ -146,152 +108,68 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[12]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(3),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(create_TLV),
- /* K8 */ be_nested_str_weak(U2),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(U1),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_nested_str_weak(BOOL),
- /* K13 */ be_nested_str_weak(shadow_onoff),
- /* K14 */ be_nested_str_weak(read_attribute),
+ /* K8 */ be_nested_str_weak(BOOL),
+ /* K9 */ be_nested_str_weak(shadow_onoff),
+ /* K10 */ be_nested_str_weak(U4),
+ /* K11 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[126]) { /* code */
+ ( &(const binstruction[45]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
0x88140503, // 0003 GETMBR R5 R2 K3
0x88180504, // 0004 GETMBR R6 R2 K4
- 0x1C1C0B05, // 0005 EQ R7 R5 K5
- 0x781E0021, // 0006 JMPF R7 #0029
- 0x1C1C0D06, // 0007 EQ R7 R6 K6
- 0x781E0005, // 0008 JMPF R7 #000F
- 0x8C1C0907, // 0009 GETMET R7 R4 K7
- 0x88240908, // 000A GETMBR R9 R4 K8
- 0x58280006, // 000B LDCONST R10 K6
- 0x7C1C0600, // 000C CALL R7 3
- 0x80040E00, // 000D RET 1 R7
- 0x70020018, // 000E JMP #0028
- 0x1C1C0D09, // 000F EQ R7 R6 K9
- 0x781E0005, // 0010 JMPF R7 #0017
- 0x8C1C0907, // 0011 GETMET R7 R4 K7
- 0x8824090A, // 0012 GETMBR R9 R4 K10
- 0x58280006, // 0013 LDCONST R10 K6
- 0x7C1C0600, // 0014 CALL R7 3
- 0x80040E00, // 0015 RET 1 R7
- 0x70020010, // 0016 JMP #0028
- 0x541EFFFB, // 0017 LDINT R7 65532
- 0x1C1C0C07, // 0018 EQ R7 R6 R7
- 0x781E0005, // 0019 JMPF R7 #0020
- 0x8C1C0907, // 001A GETMET R7 R4 K7
- 0x8824090B, // 001B GETMBR R9 R4 K11
- 0x58280006, // 001C LDCONST R10 K6
- 0x7C1C0600, // 001D CALL R7 3
- 0x80040E00, // 001E RET 1 R7
- 0x70020007, // 001F JMP #0028
- 0x541EFFFC, // 0020 LDINT R7 65533
- 0x1C1C0C07, // 0021 EQ R7 R6 R7
- 0x781E0004, // 0022 JMPF R7 #0028
- 0x8C1C0907, // 0023 GETMET R7 R4 K7
- 0x8824090B, // 0024 GETMBR R9 R4 K11
- 0x542A0003, // 0025 LDINT R10 4
- 0x7C1C0600, // 0026 CALL R7 3
- 0x80040E00, // 0027 RET 1 R7
- 0x70020053, // 0028 JMP #007D
- 0x541E0003, // 0029 LDINT R7 4
- 0x1C1C0A07, // 002A EQ R7 R5 R7
- 0x781E0016, // 002B JMPF R7 #0043
- 0x1C1C0D06, // 002C EQ R7 R6 K6
- 0x781E0002, // 002D JMPF R7 #0031
- 0x4C1C0000, // 002E LDNIL R7
- 0x80040E00, // 002F RET 1 R7
- 0x70020010, // 0030 JMP #0042
- 0x541EFFFB, // 0031 LDINT R7 65532
- 0x1C1C0C07, // 0032 EQ R7 R6 R7
- 0x781E0005, // 0033 JMPF R7 #003A
- 0x8C1C0907, // 0034 GETMET R7 R4 K7
- 0x8824090B, // 0035 GETMBR R9 R4 K11
- 0x58280006, // 0036 LDCONST R10 K6
- 0x7C1C0600, // 0037 CALL R7 3
- 0x80040E00, // 0038 RET 1 R7
- 0x70020007, // 0039 JMP #0042
- 0x541EFFFC, // 003A LDINT R7 65533
- 0x1C1C0C07, // 003B EQ R7 R6 R7
- 0x781E0004, // 003C JMPF R7 #0042
- 0x8C1C0907, // 003D GETMET R7 R4 K7
- 0x8824090B, // 003E GETMBR R9 R4 K11
- 0x542A0003, // 003F LDINT R10 4
- 0x7C1C0600, // 0040 CALL R7 3
- 0x80040E00, // 0041 RET 1 R7
- 0x70020039, // 0042 JMP #007D
- 0x541E0004, // 0043 LDINT R7 5
- 0x1C1C0A07, // 0044 EQ R7 R5 R7
- 0x781E0011, // 0045 JMPF R7 #0058
- 0x541EFFFB, // 0046 LDINT R7 65532
- 0x1C1C0C07, // 0047 EQ R7 R6 R7
- 0x781E0005, // 0048 JMPF R7 #004F
- 0x8C1C0907, // 0049 GETMET R7 R4 K7
- 0x8824090B, // 004A GETMBR R9 R4 K11
- 0x58280006, // 004B LDCONST R10 K6
- 0x7C1C0600, // 004C CALL R7 3
- 0x80040E00, // 004D RET 1 R7
- 0x70020007, // 004E JMP #0057
- 0x541EFFFC, // 004F LDINT R7 65533
- 0x1C1C0C07, // 0050 EQ R7 R6 R7
- 0x781E0004, // 0051 JMPF R7 #0057
- 0x8C1C0907, // 0052 GETMET R7 R4 K7
- 0x8824090B, // 0053 GETMBR R9 R4 K11
- 0x542A0003, // 0054 LDINT R10 4
- 0x7C1C0600, // 0055 CALL R7 3
- 0x80040E00, // 0056 RET 1 R7
- 0x70020024, // 0057 JMP #007D
- 0x541E0005, // 0058 LDINT R7 6
- 0x1C1C0A07, // 0059 EQ R7 R5 R7
- 0x781E0019, // 005A JMPF R7 #0075
- 0x1C1C0D06, // 005B EQ R7 R6 K6
- 0x781E0005, // 005C JMPF R7 #0063
- 0x8C1C0907, // 005D GETMET R7 R4 K7
- 0x8824090C, // 005E GETMBR R9 R4 K12
- 0x8828010D, // 005F GETMBR R10 R0 K13
- 0x7C1C0600, // 0060 CALL R7 3
- 0x80040E00, // 0061 RET 1 R7
- 0x70020010, // 0062 JMP #0074
- 0x541EFFFB, // 0063 LDINT R7 65532
- 0x1C1C0C07, // 0064 EQ R7 R6 R7
- 0x781E0005, // 0065 JMPF R7 #006C
- 0x8C1C0907, // 0066 GETMET R7 R4 K7
- 0x8824090B, // 0067 GETMBR R9 R4 K11
- 0x58280006, // 0068 LDCONST R10 K6
- 0x7C1C0600, // 0069 CALL R7 3
- 0x80040E00, // 006A RET 1 R7
- 0x70020007, // 006B JMP #0074
- 0x541EFFFC, // 006C LDINT R7 65533
- 0x1C1C0C07, // 006D EQ R7 R6 R7
- 0x781E0004, // 006E JMPF R7 #0074
- 0x8C1C0907, // 006F GETMET R7 R4 K7
- 0x8824090B, // 0070 GETMBR R9 R4 K11
- 0x542A0003, // 0071 LDINT R10 4
- 0x7C1C0600, // 0072 CALL R7 3
- 0x80040E00, // 0073 RET 1 R7
- 0x70020007, // 0074 JMP #007D
- 0x601C0003, // 0075 GETGBL R7 G3
- 0x5C200000, // 0076 MOVE R8 R0
- 0x7C1C0200, // 0077 CALL R7 1
- 0x8C1C0F0E, // 0078 GETMET R7 R7 K14
- 0x5C240200, // 0079 MOVE R9 R1
- 0x5C280400, // 007A MOVE R10 R2
- 0x7C1C0600, // 007B CALL R7 3
- 0x80040E00, // 007C RET 1 R7
- 0x80000000, // 007D RET 0
+ 0x541E0005, // 0005 LDINT R7 6
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E001B, // 0007 JMPF R7 #0024
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x70020010, // 0011 JMP #0023
+ 0x541EFFFB, // 0012 LDINT R7 65532
+ 0x1C1C0C07, // 0013 EQ R7 R6 R7
+ 0x781E0005, // 0014 JMPF R7 #001B
+ 0x8C1C0907, // 0015 GETMET R7 R4 K7
+ 0x8824090A, // 0016 GETMBR R9 R4 K10
+ 0x58280006, // 0017 LDCONST R10 K6
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x80040E00, // 0019 RET 1 R7
+ 0x70020007, // 001A JMP #0023
+ 0x541EFFFC, // 001B LDINT R7 65533
+ 0x1C1C0C07, // 001C EQ R7 R6 R7
+ 0x781E0004, // 001D JMPF R7 #0023
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x8824090A, // 001F GETMBR R9 R4 K10
+ 0x542A0003, // 0020 LDINT R10 4
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020007, // 0023 JMP #002C
+ 0x601C0003, // 0024 GETGBL R7 G3
+ 0x5C200000, // 0025 MOVE R8 R0
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x8C1C0F0B, // 0027 GETMET R7 R7 K11
+ 0x5C240200, // 0028 MOVE R9 R1
+ 0x5C280400, // 0029 MOVE R10 R2
+ 0x7C1C0600, // 002A CALL R7 3
+ 0x80040E00, // 002B RET 1 R7
+ 0x80000000, // 002C RET 0
})
)
);
@@ -303,7 +181,7 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
be_nested_proto(
- 9, /* nstack */
+ 8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -311,7 +189,7 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
+ ( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(get),
/* K2 */ be_nested_str_weak(find),
@@ -319,10 +197,11 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
/* K4 */ be_nested_str_weak(shadow_onoff),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
+ ( &(const binstruction[21]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x7C080200, // 0002 CALL R2 1
@@ -332,14 +211,18 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
0x7C0C0600, // 0006 CALL R3 3
0x88100104, // 0007 GETMBR R4 R0 K4
0x20100604, // 0008 NE R4 R3 R4
- 0x78120005, // 0009 JMPF R4 #0010
+ 0x78120004, // 0009 JMPF R4 #000F
0x8C100105, // 000A GETMET R4 R0 K5
- 0x4C180000, // 000B LDNIL R6
- 0x541E0005, // 000C LDINT R7 6
- 0x58200006, // 000D LDCONST R8 K6
- 0x7C100800, // 000E CALL R4 4
- 0x90020803, // 000F SETMBR R0 K4 R3
- 0x80000000, // 0010 RET 0
+ 0x541A0005, // 000B LDINT R6 6
+ 0x581C0006, // 000C LDCONST R7 K6
+ 0x7C100600, // 000D CALL R4 3
+ 0x90020803, // 000E SETMBR R0 K4 R3
+ 0x60100003, // 000F GETGBL R4 G3
+ 0x5C140000, // 0010 MOVE R5 R0
+ 0x7C100200, // 0011 CALL R4 1
+ 0x8C100907, // 0012 GETMET R4 R4 K7
+ 0x7C100200, // 0013 CALL R4 1
+ 0x80000000, // 0014 RET 0
})
)
);
@@ -386,10 +269,10 @@ be_local_closure(Matter_Plugin_Light0_init, /* name */
/********************************************************************
** Solidified class: Matter_Plugin_Light0
********************************************************************/
-extern const bclass be_class_Matter_Plugin;
+extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Light0,
1,
- &be_class_Matter_Plugin,
+ &be_class_Matter_Plugin_Device,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
@@ -401,41 +284,14 @@ be_local_class(Matter_Plugin_Light0,
})) ) } )) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(4,
+ be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(3,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(65532),
- be_const_int(65533),
- })) ) } )) },
- { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(8,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(1),
- be_const_int(2),
- be_const_int(3),
- be_const_int(4),
- be_const_int(5),
- be_const_int(65532),
- be_const_int(65533),
- })) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65532),
be_const_int(65533),
- })) ) } )) },
- { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(4,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(1),
- be_const_int(65532),
- be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
index b0f2d5523..4fad7a876 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light1.h
@@ -33,7 +33,7 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[36]) { /* code */
+ ( &(const binstruction[33]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x7C080200, // 0002 CALL R2 1
@@ -43,7 +43,7 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
0x7C0C0600, // 0006 CALL R3 3
0x4C100000, // 0007 LDNIL R4
0x20100604, // 0008 NE R4 R3 R4
- 0x78120009, // 0009 JMPF R4 #0014
+ 0x78120010, // 0009 JMPF R4 #001B
0xB8120800, // 000A GETNGBL R4 K4
0x8C100905, // 000B GETMET R4 R4 K5
0x5C180600, // 000C MOVE R6 R3
@@ -53,23 +53,20 @@ be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
0x542A00FD, // 0010 LDINT R10 254
0x7C100C00, // 0011 CALL R4 6
0x5C0C0800, // 0012 MOVE R3 R4
- 0x70020000, // 0013 JMP #0015
- 0x880C0107, // 0014 GETMBR R3 R0 K7
- 0x88100107, // 0015 GETMBR R4 R0 K7
- 0x20100604, // 0016 NE R4 R3 R4
- 0x78120005, // 0017 JMPF R4 #001E
- 0x8C100108, // 0018 GETMET R4 R0 K8
- 0x4C180000, // 0019 LDNIL R6
- 0x541E0007, // 001A LDINT R7 8
- 0x58200006, // 001B LDCONST R8 K6
- 0x7C100800, // 001C CALL R4 4
- 0x90020E03, // 001D SETMBR R0 K7 R3
- 0x60100003, // 001E GETGBL R4 G3
- 0x5C140000, // 001F MOVE R5 R0
- 0x7C100200, // 0020 CALL R4 1
- 0x8C100909, // 0021 GETMET R4 R4 K9
- 0x7C100200, // 0022 CALL R4 1
- 0x80000000, // 0023 RET 0
+ 0x88100107, // 0013 GETMBR R4 R0 K7
+ 0x20100604, // 0014 NE R4 R3 R4
+ 0x78120004, // 0015 JMPF R4 #001B
+ 0x8C100108, // 0016 GETMET R4 R0 K8
+ 0x541A0007, // 0017 LDINT R6 8
+ 0x581C0006, // 0018 LDCONST R7 K6
+ 0x7C100600, // 0019 CALL R4 3
+ 0x90020E03, // 001A SETMBR R0 K7 R3
+ 0x60100003, // 001B GETGBL R4 G3
+ 0x5C140000, // 001C MOVE R5 R0
+ 0x7C100200, // 001D CALL R4 1
+ 0x8C100909, // 001E GETMET R4 R4 K9
+ 0x7C100200, // 001F CALL R4 1
+ 0x80000000, // 0020 RET 0
})
)
);
@@ -89,30 +86,31 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[19]) { /* constants */
+ ( &(const bvalue[20]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(findsubval),
- /* K7 */ be_nested_str_weak(tasmota),
- /* K8 */ be_nested_str_weak(scale_uint),
- /* K9 */ be_nested_str_weak(set),
- /* K10 */ be_nested_str_weak(bri),
- /* K11 */ be_nested_str_weak(update_shadow),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(bri_X3A),
- /* K14 */ be_const_int(1),
- /* K15 */ be_const_int(2),
- /* K16 */ be_const_int(3),
- /* K17 */ be_nested_str_weak(power),
- /* K18 */ be_nested_str_weak(invoke_request),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(findsubval),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(scale_uint),
+ /* K10 */ be_nested_str_weak(set),
+ /* K11 */ be_nested_str_weak(bri),
+ /* K12 */ be_nested_str_weak(update_shadow),
+ /* K13 */ be_nested_str_weak(log),
+ /* K14 */ be_nested_str_weak(bri_X3A),
+ /* K15 */ be_const_int(1),
+ /* K16 */ be_const_int(2),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(power),
+ /* K19 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[110]) { /* code */
+ ( &(const binstruction[112]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -120,109 +118,111 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220007, // 0005 LDINT R8 8
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x7822005B, // 0007 JMPF R8 #0064
- 0x1C200F05, // 0008 EQ R8 R7 K5
- 0x78220019, // 0009 JMPF R8 #0024
- 0x8C200506, // 000A GETMET R8 R2 K6
- 0x58280005, // 000B LDCONST R10 K5
- 0x7C200400, // 000C CALL R8 2
- 0xB8260E00, // 000D GETNGBL R9 K7
- 0x8C241308, // 000E GETMET R9 R9 K8
- 0x5C2C1000, // 000F MOVE R11 R8
- 0x58300005, // 0010 LDCONST R12 K5
- 0x543600FD, // 0011 LDINT R13 254
- 0x58380005, // 0012 LDCONST R14 K5
- 0x543E00FE, // 0013 LDINT R15 255
- 0x7C240C00, // 0014 CALL R9 6
- 0x8C280909, // 0015 GETMET R10 R4 K9
- 0x60300013, // 0016 GETGBL R12 G19
- 0x7C300000, // 0017 CALL R12 0
- 0x98321409, // 0018 SETIDX R12 K10 R9
- 0x7C280400, // 0019 CALL R10 2
- 0x8C28010B, // 001A GETMET R10 R0 K11
- 0x7C280200, // 001B CALL R10 1
- 0x60280008, // 001C GETGBL R10 G8
- 0x5C2C1000, // 001D MOVE R11 R8
- 0x7C280200, // 001E CALL R10 1
- 0x002A1A0A, // 001F ADD R10 K13 R10
- 0x900E180A, // 0020 SETMBR R3 K12 R10
- 0x50280200, // 0021 LDBOOL R10 1 0
- 0x80041400, // 0022 RET 1 R10
- 0x7002003E, // 0023 JMP #0063
- 0x1C200F0E, // 0024 EQ R8 R7 K14
- 0x78220002, // 0025 JMPF R8 #0029
- 0x50200200, // 0026 LDBOOL R8 1 0
- 0x80041000, // 0027 RET 1 R8
- 0x70020039, // 0028 JMP #0063
- 0x1C200F0F, // 0029 EQ R8 R7 K15
- 0x78220002, // 002A JMPF R8 #002E
- 0x50200200, // 002B LDBOOL R8 1 0
- 0x80041000, // 002C RET 1 R8
- 0x70020034, // 002D JMP #0063
- 0x1C200F10, // 002E EQ R8 R7 K16
- 0x78220002, // 002F JMPF R8 #0033
- 0x50200200, // 0030 LDBOOL R8 1 0
- 0x80041000, // 0031 RET 1 R8
- 0x7002002F, // 0032 JMP #0063
- 0x54220003, // 0033 LDINT R8 4
- 0x1C200E08, // 0034 EQ R8 R7 R8
- 0x7822001B, // 0035 JMPF R8 #0052
- 0x8C200506, // 0036 GETMET R8 R2 K6
- 0x58280005, // 0037 LDCONST R10 K5
- 0x7C200400, // 0038 CALL R8 2
- 0xB8260E00, // 0039 GETNGBL R9 K7
- 0x8C241308, // 003A GETMET R9 R9 K8
- 0x5C2C1000, // 003B MOVE R11 R8
- 0x58300005, // 003C LDCONST R12 K5
- 0x543600FD, // 003D LDINT R13 254
- 0x58380005, // 003E LDCONST R14 K5
- 0x543E00FE, // 003F LDINT R15 255
- 0x7C240C00, // 0040 CALL R9 6
- 0x24281305, // 0041 GT R10 R9 K5
- 0x8C2C0909, // 0042 GETMET R11 R4 K9
- 0x60340013, // 0043 GETGBL R13 G19
- 0x7C340000, // 0044 CALL R13 0
- 0x98361409, // 0045 SETIDX R13 K10 R9
- 0x9836220A, // 0046 SETIDX R13 K17 R10
- 0x7C2C0400, // 0047 CALL R11 2
- 0x8C2C010B, // 0048 GETMET R11 R0 K11
- 0x7C2C0200, // 0049 CALL R11 1
- 0x602C0008, // 004A GETGBL R11 G8
- 0x5C301000, // 004B MOVE R12 R8
- 0x7C2C0200, // 004C CALL R11 1
- 0x002E1A0B, // 004D ADD R11 K13 R11
- 0x900E180B, // 004E SETMBR R3 K12 R11
- 0x502C0200, // 004F LDBOOL R11 1 0
- 0x80041600, // 0050 RET 1 R11
- 0x70020010, // 0051 JMP #0063
- 0x54220004, // 0052 LDINT R8 5
- 0x1C200E08, // 0053 EQ R8 R7 R8
- 0x78220002, // 0054 JMPF R8 #0058
- 0x50200200, // 0055 LDBOOL R8 1 0
- 0x80041000, // 0056 RET 1 R8
- 0x7002000A, // 0057 JMP #0063
- 0x54220005, // 0058 LDINT R8 6
- 0x1C200E08, // 0059 EQ R8 R7 R8
- 0x78220002, // 005A JMPF R8 #005E
- 0x50200200, // 005B LDBOOL R8 1 0
- 0x80041000, // 005C RET 1 R8
- 0x70020004, // 005D JMP #0063
- 0x54220006, // 005E LDINT R8 7
- 0x1C200E08, // 005F EQ R8 R7 R8
- 0x78220001, // 0060 JMPF R8 #0063
- 0x50200200, // 0061 LDBOOL R8 1 0
- 0x80041000, // 0062 RET 1 R8
- 0x70020008, // 0063 JMP #006D
- 0x60200003, // 0064 GETGBL R8 G3
- 0x5C240000, // 0065 MOVE R9 R0
- 0x7C200200, // 0066 CALL R8 1
- 0x8C201112, // 0067 GETMET R8 R8 K18
- 0x5C280200, // 0068 MOVE R10 R1
- 0x5C2C0400, // 0069 MOVE R11 R2
- 0x5C300600, // 006A MOVE R12 R3
- 0x7C200800, // 006B CALL R8 4
- 0x80041000, // 006C RET 1 R8
- 0x80000000, // 006D RET 0
+ 0x7822005D, // 0007 JMPF R8 #0066
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x1C200F06, // 000A EQ R8 R7 K6
+ 0x78220019, // 000B JMPF R8 #0026
+ 0x8C200507, // 000C GETMET R8 R2 K7
+ 0x58280006, // 000D LDCONST R10 K6
+ 0x7C200400, // 000E CALL R8 2
+ 0xB8261000, // 000F GETNGBL R9 K8
+ 0x8C241309, // 0010 GETMET R9 R9 K9
+ 0x5C2C1000, // 0011 MOVE R11 R8
+ 0x58300006, // 0012 LDCONST R12 K6
+ 0x543600FD, // 0013 LDINT R13 254
+ 0x58380006, // 0014 LDCONST R14 K6
+ 0x543E00FE, // 0015 LDINT R15 255
+ 0x7C240C00, // 0016 CALL R9 6
+ 0x8C28090A, // 0017 GETMET R10 R4 K10
+ 0x60300013, // 0018 GETGBL R12 G19
+ 0x7C300000, // 0019 CALL R12 0
+ 0x98321609, // 001A SETIDX R12 K11 R9
+ 0x7C280400, // 001B CALL R10 2
+ 0x8C28010C, // 001C GETMET R10 R0 K12
+ 0x7C280200, // 001D CALL R10 1
+ 0x60280008, // 001E GETGBL R10 G8
+ 0x5C2C1000, // 001F MOVE R11 R8
+ 0x7C280200, // 0020 CALL R10 1
+ 0x002A1C0A, // 0021 ADD R10 K14 R10
+ 0x900E1A0A, // 0022 SETMBR R3 K13 R10
+ 0x50280200, // 0023 LDBOOL R10 1 0
+ 0x80041400, // 0024 RET 1 R10
+ 0x7002003E, // 0025 JMP #0065
+ 0x1C200F0F, // 0026 EQ R8 R7 K15
+ 0x78220002, // 0027 JMPF R8 #002B
+ 0x50200200, // 0028 LDBOOL R8 1 0
+ 0x80041000, // 0029 RET 1 R8
+ 0x70020039, // 002A JMP #0065
+ 0x1C200F10, // 002B EQ R8 R7 K16
+ 0x78220002, // 002C JMPF R8 #0030
+ 0x50200200, // 002D LDBOOL R8 1 0
+ 0x80041000, // 002E RET 1 R8
+ 0x70020034, // 002F JMP #0065
+ 0x1C200F11, // 0030 EQ R8 R7 K17
+ 0x78220002, // 0031 JMPF R8 #0035
+ 0x50200200, // 0032 LDBOOL R8 1 0
+ 0x80041000, // 0033 RET 1 R8
+ 0x7002002F, // 0034 JMP #0065
+ 0x54220003, // 0035 LDINT R8 4
+ 0x1C200E08, // 0036 EQ R8 R7 R8
+ 0x7822001B, // 0037 JMPF R8 #0054
+ 0x8C200507, // 0038 GETMET R8 R2 K7
+ 0x58280006, // 0039 LDCONST R10 K6
+ 0x7C200400, // 003A CALL R8 2
+ 0xB8261000, // 003B GETNGBL R9 K8
+ 0x8C241309, // 003C GETMET R9 R9 K9
+ 0x5C2C1000, // 003D MOVE R11 R8
+ 0x58300006, // 003E LDCONST R12 K6
+ 0x543600FD, // 003F LDINT R13 254
+ 0x58380006, // 0040 LDCONST R14 K6
+ 0x543E00FE, // 0041 LDINT R15 255
+ 0x7C240C00, // 0042 CALL R9 6
+ 0x24281306, // 0043 GT R10 R9 K6
+ 0x8C2C090A, // 0044 GETMET R11 R4 K10
+ 0x60340013, // 0045 GETGBL R13 G19
+ 0x7C340000, // 0046 CALL R13 0
+ 0x98361609, // 0047 SETIDX R13 K11 R9
+ 0x9836240A, // 0048 SETIDX R13 K18 R10
+ 0x7C2C0400, // 0049 CALL R11 2
+ 0x8C2C010C, // 004A GETMET R11 R0 K12
+ 0x7C2C0200, // 004B CALL R11 1
+ 0x602C0008, // 004C GETGBL R11 G8
+ 0x5C301000, // 004D MOVE R12 R8
+ 0x7C2C0200, // 004E CALL R11 1
+ 0x002E1C0B, // 004F ADD R11 K14 R11
+ 0x900E1A0B, // 0050 SETMBR R3 K13 R11
+ 0x502C0200, // 0051 LDBOOL R11 1 0
+ 0x80041600, // 0052 RET 1 R11
+ 0x70020010, // 0053 JMP #0065
+ 0x54220004, // 0054 LDINT R8 5
+ 0x1C200E08, // 0055 EQ R8 R7 R8
+ 0x78220002, // 0056 JMPF R8 #005A
+ 0x50200200, // 0057 LDBOOL R8 1 0
+ 0x80041000, // 0058 RET 1 R8
+ 0x7002000A, // 0059 JMP #0065
+ 0x54220005, // 005A LDINT R8 6
+ 0x1C200E08, // 005B EQ R8 R7 R8
+ 0x78220002, // 005C JMPF R8 #0060
+ 0x50200200, // 005D LDBOOL R8 1 0
+ 0x80041000, // 005E RET 1 R8
+ 0x70020004, // 005F JMP #0065
+ 0x54220006, // 0060 LDINT R8 7
+ 0x1C200E08, // 0061 EQ R8 R7 R8
+ 0x78220001, // 0062 JMPF R8 #0065
+ 0x50200200, // 0063 LDBOOL R8 1 0
+ 0x80041000, // 0064 RET 1 R8
+ 0x70020008, // 0065 JMP #006F
+ 0x60200003, // 0066 GETGBL R8 G3
+ 0x5C240000, // 0067 MOVE R9 R0
+ 0x7C200200, // 0068 CALL R8 1
+ 0x8C201113, // 0069 GETMET R8 R8 K19
+ 0x5C280200, // 006A MOVE R10 R1
+ 0x5C2C0400, // 006B MOVE R11 R2
+ 0x5C300600, // 006C MOVE R12 R3
+ 0x7C200800, // 006D CALL R8 4
+ 0x80041000, // 006E RET 1 R8
+ 0x80000000, // 006F RET 0
})
)
);
@@ -242,25 +242,26 @@ be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
+ ( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_bri),
- /* K9 */ be_const_int(2),
- /* K10 */ be_const_int(3),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_const_int(1),
- /* K13 */ be_nested_str_weak(read_attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U1),
+ /* K9 */ be_nested_str_weak(shadow_bri),
+ /* K10 */ be_const_int(2),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_const_int(1),
+ /* K14 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[77]) { /* code */
+ ( &(const binstruction[79]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -268,76 +269,78 @@ be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E0007, // 0005 LDINT R7 8
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E003B, // 0007 JMPF R7 #0044
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x70020032, // 000F JMP #0043
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x58280005, // 0014 LDCONST R10 K5
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x7002002A, // 0017 JMP #0043
- 0x1C1C0D0A, // 0018 EQ R7 R6 K10
- 0x781E0005, // 0019 JMPF R7 #0020
- 0x8C1C0906, // 001A GETMET R7 R4 K6
- 0x88240907, // 001B GETMBR R9 R4 K7
- 0x542A00FD, // 001C LDINT R10 254
- 0x7C1C0600, // 001D CALL R7 3
- 0x80040E00, // 001E RET 1 R7
- 0x70020022, // 001F JMP #0043
- 0x541E000E, // 0020 LDINT R7 15
- 0x1C1C0C07, // 0021 EQ R7 R6 R7
- 0x781E0005, // 0022 JMPF R7 #0029
- 0x8C1C0906, // 0023 GETMET R7 R4 K6
- 0x88240907, // 0024 GETMBR R9 R4 K7
- 0x58280005, // 0025 LDCONST R10 K5
- 0x7C1C0600, // 0026 CALL R7 3
- 0x80040E00, // 0027 RET 1 R7
- 0x70020019, // 0028 JMP #0043
- 0x541E0010, // 0029 LDINT R7 17
- 0x1C1C0C07, // 002A EQ R7 R6 R7
- 0x781E0005, // 002B JMPF R7 #0032
- 0x8C1C0906, // 002C GETMET R7 R4 K6
- 0x88240907, // 002D GETMBR R9 R4 K7
- 0x88280108, // 002E GETMBR R10 R0 K8
- 0x7C1C0600, // 002F CALL R7 3
- 0x80040E00, // 0030 RET 1 R7
- 0x70020010, // 0031 JMP #0043
- 0x541EFFFB, // 0032 LDINT R7 65532
- 0x1C1C0C07, // 0033 EQ R7 R6 R7
- 0x781E0005, // 0034 JMPF R7 #003B
- 0x8C1C0906, // 0035 GETMET R7 R4 K6
- 0x8824090B, // 0036 GETMBR R9 R4 K11
- 0x5828000C, // 0037 LDCONST R10 K12
- 0x7C1C0600, // 0038 CALL R7 3
- 0x80040E00, // 0039 RET 1 R7
- 0x70020007, // 003A JMP #0043
- 0x541EFFFC, // 003B LDINT R7 65533
- 0x1C1C0C07, // 003C EQ R7 R6 R7
- 0x781E0004, // 003D JMPF R7 #0043
- 0x8C1C0906, // 003E GETMET R7 R4 K6
- 0x8824090B, // 003F GETMBR R9 R4 K11
- 0x542A0004, // 0040 LDINT R10 5
- 0x7C1C0600, // 0041 CALL R7 3
- 0x80040E00, // 0042 RET 1 R7
- 0x70020007, // 0043 JMP #004C
- 0x601C0003, // 0044 GETGBL R7 G3
- 0x5C200000, // 0045 MOVE R8 R0
- 0x7C1C0200, // 0046 CALL R7 1
- 0x8C1C0F0D, // 0047 GETMET R7 R7 K13
- 0x5C240200, // 0048 MOVE R9 R1
- 0x5C280400, // 0049 MOVE R10 R2
- 0x7C1C0600, // 004A CALL R7 3
- 0x80040E00, // 004B RET 1 R7
- 0x80000000, // 004C RET 0
+ 0x781E003D, // 0007 JMPF R7 #0046
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x70020032, // 0011 JMP #0045
+ 0x1C1C0D0A, // 0012 EQ R7 R6 K10
+ 0x781E0005, // 0013 JMPF R7 #001A
+ 0x8C1C0907, // 0014 GETMET R7 R4 K7
+ 0x88240908, // 0015 GETMBR R9 R4 K8
+ 0x58280006, // 0016 LDCONST R10 K6
+ 0x7C1C0600, // 0017 CALL R7 3
+ 0x80040E00, // 0018 RET 1 R7
+ 0x7002002A, // 0019 JMP #0045
+ 0x1C1C0D0B, // 001A EQ R7 R6 K11
+ 0x781E0005, // 001B JMPF R7 #0022
+ 0x8C1C0907, // 001C GETMET R7 R4 K7
+ 0x88240908, // 001D GETMBR R9 R4 K8
+ 0x542A00FD, // 001E LDINT R10 254
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x80040E00, // 0020 RET 1 R7
+ 0x70020022, // 0021 JMP #0045
+ 0x541E000E, // 0022 LDINT R7 15
+ 0x1C1C0C07, // 0023 EQ R7 R6 R7
+ 0x781E0005, // 0024 JMPF R7 #002B
+ 0x8C1C0907, // 0025 GETMET R7 R4 K7
+ 0x88240908, // 0026 GETMBR R9 R4 K8
+ 0x58280006, // 0027 LDCONST R10 K6
+ 0x7C1C0600, // 0028 CALL R7 3
+ 0x80040E00, // 0029 RET 1 R7
+ 0x70020019, // 002A JMP #0045
+ 0x541E0010, // 002B LDINT R7 17
+ 0x1C1C0C07, // 002C EQ R7 R6 R7
+ 0x781E0005, // 002D JMPF R7 #0034
+ 0x8C1C0907, // 002E GETMET R7 R4 K7
+ 0x88240908, // 002F GETMBR R9 R4 K8
+ 0x88280109, // 0030 GETMBR R10 R0 K9
+ 0x7C1C0600, // 0031 CALL R7 3
+ 0x80040E00, // 0032 RET 1 R7
+ 0x70020010, // 0033 JMP #0045
+ 0x541EFFFB, // 0034 LDINT R7 65532
+ 0x1C1C0C07, // 0035 EQ R7 R6 R7
+ 0x781E0005, // 0036 JMPF R7 #003D
+ 0x8C1C0907, // 0037 GETMET R7 R4 K7
+ 0x8824090C, // 0038 GETMBR R9 R4 K12
+ 0x5828000D, // 0039 LDCONST R10 K13
+ 0x7C1C0600, // 003A CALL R7 3
+ 0x80040E00, // 003B RET 1 R7
+ 0x70020007, // 003C JMP #0045
+ 0x541EFFFC, // 003D LDINT R7 65533
+ 0x1C1C0C07, // 003E EQ R7 R6 R7
+ 0x781E0004, // 003F JMPF R7 #0045
+ 0x8C1C0907, // 0040 GETMET R7 R4 K7
+ 0x8824090C, // 0041 GETMBR R9 R4 K12
+ 0x542A0004, // 0042 LDINT R10 5
+ 0x7C1C0600, // 0043 CALL R7 3
+ 0x80040E00, // 0044 RET 1 R7
+ 0x70020007, // 0045 JMP #004E
+ 0x601C0003, // 0046 GETGBL R7 G3
+ 0x5C200000, // 0047 MOVE R8 R0
+ 0x7C1C0200, // 0048 CALL R7 1
+ 0x8C1C0F0E, // 0049 GETMET R7 R7 K14
+ 0x5C240200, // 004A MOVE R9 R1
+ 0x5C280400, // 004B MOVE R10 R2
+ 0x7C1C0600, // 004C CALL R7 3
+ 0x80040E00, // 004D RET 1 R7
+ 0x80000000, // 004E RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
index 0cce12e73..50328f5df 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light2.h
@@ -19,25 +19,26 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
+ ( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(create_TLV),
- /* K6 */ be_nested_str_weak(U1),
- /* K7 */ be_nested_str_weak(shadow_ct),
- /* K8 */ be_const_int(2),
- /* K9 */ be_const_int(0),
- /* K10 */ be_nested_str_weak(ct_min),
- /* K11 */ be_nested_str_weak(ct_max),
- /* K12 */ be_nested_str_weak(U4),
- /* K13 */ be_nested_str_weak(read_attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_nested_str_weak(shadow_ct),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_const_int(0),
+ /* K11 */ be_nested_str_weak(ct_min),
+ /* K12 */ be_nested_str_weak(ct_max),
+ /* K13 */ be_nested_str_weak(U4),
+ /* K14 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[80]) { /* code */
+ ( &(const binstruction[82]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -45,79 +46,81 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E02FF, // 0005 LDINT R7 768
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E003E, // 0007 JMPF R7 #0047
- 0x541E0006, // 0008 LDINT R7 7
- 0x1C1C0C07, // 0009 EQ R7 R6 R7
- 0x781E0005, // 000A JMPF R7 #0011
- 0x8C1C0905, // 000B GETMET R7 R4 K5
- 0x88240906, // 000C GETMBR R9 R4 K6
- 0x88280107, // 000D GETMBR R10 R0 K7
- 0x7C1C0600, // 000E CALL R7 3
- 0x80040E00, // 000F RET 1 R7
- 0x70020034, // 0010 JMP #0046
- 0x541E0007, // 0011 LDINT R7 8
- 0x1C1C0C07, // 0012 EQ R7 R6 R7
- 0x781E0005, // 0013 JMPF R7 #001A
- 0x8C1C0905, // 0014 GETMET R7 R4 K5
- 0x88240906, // 0015 GETMBR R9 R4 K6
- 0x58280008, // 0016 LDCONST R10 K8
- 0x7C1C0600, // 0017 CALL R7 3
- 0x80040E00, // 0018 RET 1 R7
- 0x7002002B, // 0019 JMP #0046
- 0x541E000E, // 001A LDINT R7 15
- 0x1C1C0C07, // 001B EQ R7 R6 R7
- 0x781E0005, // 001C JMPF R7 #0023
- 0x8C1C0905, // 001D GETMET R7 R4 K5
- 0x88240906, // 001E GETMBR R9 R4 K6
- 0x58280009, // 001F LDCONST R10 K9
- 0x7C1C0600, // 0020 CALL R7 3
- 0x80040E00, // 0021 RET 1 R7
- 0x70020022, // 0022 JMP #0046
- 0x541E400A, // 0023 LDINT R7 16395
- 0x1C1C0C07, // 0024 EQ R7 R6 R7
- 0x781E0005, // 0025 JMPF R7 #002C
- 0x8C1C0905, // 0026 GETMET R7 R4 K5
- 0x88240906, // 0027 GETMBR R9 R4 K6
- 0x8828010A, // 0028 GETMBR R10 R0 K10
- 0x7C1C0600, // 0029 CALL R7 3
- 0x80040E00, // 002A RET 1 R7
- 0x70020019, // 002B JMP #0046
- 0x541E400B, // 002C LDINT R7 16396
- 0x1C1C0C07, // 002D EQ R7 R6 R7
- 0x781E0005, // 002E JMPF R7 #0035
- 0x8C1C0905, // 002F GETMET R7 R4 K5
- 0x88240906, // 0030 GETMBR R9 R4 K6
- 0x8828010B, // 0031 GETMBR R10 R0 K11
- 0x7C1C0600, // 0032 CALL R7 3
- 0x80040E00, // 0033 RET 1 R7
- 0x70020010, // 0034 JMP #0046
- 0x541EFFFB, // 0035 LDINT R7 65532
- 0x1C1C0C07, // 0036 EQ R7 R6 R7
- 0x781E0005, // 0037 JMPF R7 #003E
- 0x8C1C0905, // 0038 GETMET R7 R4 K5
- 0x8824090C, // 0039 GETMBR R9 R4 K12
- 0x542A000F, // 003A LDINT R10 16
- 0x7C1C0600, // 003B CALL R7 3
- 0x80040E00, // 003C RET 1 R7
- 0x70020007, // 003D JMP #0046
- 0x541EFFFC, // 003E LDINT R7 65533
- 0x1C1C0C07, // 003F EQ R7 R6 R7
- 0x781E0004, // 0040 JMPF R7 #0046
- 0x8C1C0905, // 0041 GETMET R7 R4 K5
- 0x8824090C, // 0042 GETMBR R9 R4 K12
- 0x542A0004, // 0043 LDINT R10 5
- 0x7C1C0600, // 0044 CALL R7 3
- 0x80040E00, // 0045 RET 1 R7
- 0x70020007, // 0046 JMP #004F
- 0x601C0003, // 0047 GETGBL R7 G3
- 0x5C200000, // 0048 MOVE R8 R0
- 0x7C1C0200, // 0049 CALL R7 1
- 0x8C1C0F0D, // 004A GETMET R7 R7 K13
- 0x5C240200, // 004B MOVE R9 R1
- 0x5C280400, // 004C MOVE R10 R2
- 0x7C1C0600, // 004D CALL R7 3
- 0x80040E00, // 004E RET 1 R7
- 0x80000000, // 004F RET 0
+ 0x781E0040, // 0007 JMPF R7 #0049
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x541E0006, // 000A LDINT R7 7
+ 0x1C1C0C07, // 000B EQ R7 R6 R7
+ 0x781E0005, // 000C JMPF R7 #0013
+ 0x8C1C0906, // 000D GETMET R7 R4 K6
+ 0x88240907, // 000E GETMBR R9 R4 K7
+ 0x88280108, // 000F GETMBR R10 R0 K8
+ 0x7C1C0600, // 0010 CALL R7 3
+ 0x80040E00, // 0011 RET 1 R7
+ 0x70020034, // 0012 JMP #0048
+ 0x541E0007, // 0013 LDINT R7 8
+ 0x1C1C0C07, // 0014 EQ R7 R6 R7
+ 0x781E0005, // 0015 JMPF R7 #001C
+ 0x8C1C0906, // 0016 GETMET R7 R4 K6
+ 0x88240907, // 0017 GETMBR R9 R4 K7
+ 0x58280009, // 0018 LDCONST R10 K9
+ 0x7C1C0600, // 0019 CALL R7 3
+ 0x80040E00, // 001A RET 1 R7
+ 0x7002002B, // 001B JMP #0048
+ 0x541E000E, // 001C LDINT R7 15
+ 0x1C1C0C07, // 001D EQ R7 R6 R7
+ 0x781E0005, // 001E JMPF R7 #0025
+ 0x8C1C0906, // 001F GETMET R7 R4 K6
+ 0x88240907, // 0020 GETMBR R9 R4 K7
+ 0x5828000A, // 0021 LDCONST R10 K10
+ 0x7C1C0600, // 0022 CALL R7 3
+ 0x80040E00, // 0023 RET 1 R7
+ 0x70020022, // 0024 JMP #0048
+ 0x541E400A, // 0025 LDINT R7 16395
+ 0x1C1C0C07, // 0026 EQ R7 R6 R7
+ 0x781E0005, // 0027 JMPF R7 #002E
+ 0x8C1C0906, // 0028 GETMET R7 R4 K6
+ 0x88240907, // 0029 GETMBR R9 R4 K7
+ 0x8828010B, // 002A GETMBR R10 R0 K11
+ 0x7C1C0600, // 002B CALL R7 3
+ 0x80040E00, // 002C RET 1 R7
+ 0x70020019, // 002D JMP #0048
+ 0x541E400B, // 002E LDINT R7 16396
+ 0x1C1C0C07, // 002F EQ R7 R6 R7
+ 0x781E0005, // 0030 JMPF R7 #0037
+ 0x8C1C0906, // 0031 GETMET R7 R4 K6
+ 0x88240907, // 0032 GETMBR R9 R4 K7
+ 0x8828010C, // 0033 GETMBR R10 R0 K12
+ 0x7C1C0600, // 0034 CALL R7 3
+ 0x80040E00, // 0035 RET 1 R7
+ 0x70020010, // 0036 JMP #0048
+ 0x541EFFFB, // 0037 LDINT R7 65532
+ 0x1C1C0C07, // 0038 EQ R7 R6 R7
+ 0x781E0005, // 0039 JMPF R7 #0040
+ 0x8C1C0906, // 003A GETMET R7 R4 K6
+ 0x8824090D, // 003B GETMBR R9 R4 K13
+ 0x542A000F, // 003C LDINT R10 16
+ 0x7C1C0600, // 003D CALL R7 3
+ 0x80040E00, // 003E RET 1 R7
+ 0x70020007, // 003F JMP #0048
+ 0x541EFFFC, // 0040 LDINT R7 65533
+ 0x1C1C0C07, // 0041 EQ R7 R6 R7
+ 0x781E0004, // 0042 JMPF R7 #0048
+ 0x8C1C0906, // 0043 GETMET R7 R4 K6
+ 0x8824090D, // 0044 GETMBR R9 R4 K13
+ 0x542A0004, // 0045 LDINT R10 5
+ 0x7C1C0600, // 0046 CALL R7 3
+ 0x80040E00, // 0047 RET 1 R7
+ 0x70020007, // 0048 JMP #0051
+ 0x601C0003, // 0049 GETGBL R7 G3
+ 0x5C200000, // 004A MOVE R8 R0
+ 0x7C1C0200, // 004B CALL R7 1
+ 0x8C1C0F0E, // 004C GETMET R7 R7 K14
+ 0x5C240200, // 004D MOVE R9 R1
+ 0x5C280400, // 004E MOVE R10 R2
+ 0x7C1C0600, // 004F CALL R7 3
+ 0x80040E00, // 0050 RET 1 R7
+ 0x80000000, // 0051 RET 0
})
)
);
@@ -129,7 +132,7 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
be_nested_proto(
- 9, /* nstack */
+ 8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -149,7 +152,7 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
+ ( &(const binstruction[27]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
@@ -170,14 +173,13 @@ be_local_closure(Matter_Plugin_Light2_update_shadow, /* name */
0x880C0106, // 0011 GETMBR R3 R0 K6
0x88100106, // 0012 GETMBR R4 R0 K6
0x20100604, // 0013 NE R4 R3 R4
- 0x78120005, // 0014 JMPF R4 #001B
+ 0x78120004, // 0014 JMPF R4 #001A
0x8C100107, // 0015 GETMET R4 R0 K7
- 0x4C180000, // 0016 LDNIL R6
- 0x541E02FF, // 0017 LDINT R7 768
- 0x54220006, // 0018 LDINT R8 7
- 0x7C100800, // 0019 CALL R4 4
- 0x90020C03, // 001A SETMBR R0 K6 R3
- 0x80000000, // 001B RET 0
+ 0x541A02FF, // 0016 LDINT R6 768
+ 0x541E0006, // 0017 LDINT R7 7
+ 0x7C100600, // 0018 CALL R4 3
+ 0x90020C03, // 0019 SETMBR R0 K6 R3
+ 0x80000000, // 001A RET 0
})
)
);
@@ -280,26 +282,27 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[16]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
- /* K5 */ be_nested_str_weak(findsubval),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(ct_min),
- /* K8 */ be_nested_str_weak(ct_max),
- /* K9 */ be_nested_str_weak(set),
- /* K10 */ be_nested_str_weak(ct),
- /* K11 */ be_nested_str_weak(update_shadow),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(ct_X3A),
- /* K14 */ be_nested_str_weak(invoke_request),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_nested_str_weak(findsubval),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(ct_min),
+ /* K9 */ be_nested_str_weak(ct_max),
+ /* K10 */ be_nested_str_weak(set),
+ /* K11 */ be_nested_str_weak(ct),
+ /* K12 */ be_nested_str_weak(update_shadow),
+ /* K13 */ be_nested_str_weak(log),
+ /* K14 */ be_nested_str_weak(ct_X3A),
+ /* K15 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[65]) { /* code */
+ ( &(const binstruction[67]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -307,64 +310,66 @@ be_local_closure(Matter_Plugin_Light2_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x7822002E, // 0007 JMPF R8 #0037
- 0x54220009, // 0008 LDINT R8 10
- 0x1C200E08, // 0009 EQ R8 R7 R8
- 0x78220019, // 000A JMPF R8 #0025
- 0x8C200505, // 000B GETMET R8 R2 K5
- 0x58280006, // 000C LDCONST R10 K6
- 0x7C200400, // 000D CALL R8 2
- 0x88240107, // 000E GETMBR R9 R0 K7
- 0x14241009, // 000F LT R9 R8 R9
- 0x78260000, // 0010 JMPF R9 #0012
- 0x88200107, // 0011 GETMBR R8 R0 K7
- 0x88240108, // 0012 GETMBR R9 R0 K8
- 0x24241009, // 0013 GT R9 R8 R9
- 0x78260000, // 0014 JMPF R9 #0016
- 0x88200108, // 0015 GETMBR R8 R0 K8
- 0x8C240909, // 0016 GETMET R9 R4 K9
- 0x602C0013, // 0017 GETGBL R11 G19
- 0x7C2C0000, // 0018 CALL R11 0
- 0x982E1408, // 0019 SETIDX R11 K10 R8
- 0x7C240400, // 001A CALL R9 2
- 0x8C24010B, // 001B GETMET R9 R0 K11
- 0x7C240200, // 001C CALL R9 1
- 0x60240008, // 001D GETGBL R9 G8
- 0x5C281000, // 001E MOVE R10 R8
- 0x7C240200, // 001F CALL R9 1
- 0x00261A09, // 0020 ADD R9 K13 R9
- 0x900E1809, // 0021 SETMBR R3 K12 R9
- 0x50240200, // 0022 LDBOOL R9 1 0
- 0x80041200, // 0023 RET 1 R9
- 0x70020010, // 0024 JMP #0036
- 0x54220046, // 0025 LDINT R8 71
- 0x1C200E08, // 0026 EQ R8 R7 R8
- 0x78220002, // 0027 JMPF R8 #002B
- 0x50200200, // 0028 LDBOOL R8 1 0
- 0x80041000, // 0029 RET 1 R8
- 0x7002000A, // 002A JMP #0036
- 0x5422004A, // 002B LDINT R8 75
- 0x1C200E08, // 002C EQ R8 R7 R8
- 0x78220002, // 002D JMPF R8 #0031
- 0x50200200, // 002E LDBOOL R8 1 0
- 0x80041000, // 002F RET 1 R8
- 0x70020004, // 0030 JMP #0036
- 0x5422004B, // 0031 LDINT R8 76
- 0x1C200E08, // 0032 EQ R8 R7 R8
- 0x78220001, // 0033 JMPF R8 #0036
- 0x50200200, // 0034 LDBOOL R8 1 0
- 0x80041000, // 0035 RET 1 R8
- 0x70020008, // 0036 JMP #0040
- 0x60200003, // 0037 GETGBL R8 G3
- 0x5C240000, // 0038 MOVE R9 R0
- 0x7C200200, // 0039 CALL R8 1
- 0x8C20110E, // 003A GETMET R8 R8 K14
- 0x5C280200, // 003B MOVE R10 R1
- 0x5C2C0400, // 003C MOVE R11 R2
- 0x5C300600, // 003D MOVE R12 R3
- 0x7C200800, // 003E CALL R8 4
- 0x80041000, // 003F RET 1 R8
- 0x80000000, // 0040 RET 0
+ 0x78220030, // 0007 JMPF R8 #0039
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x54220009, // 000A LDINT R8 10
+ 0x1C200E08, // 000B EQ R8 R7 R8
+ 0x78220019, // 000C JMPF R8 #0027
+ 0x8C200506, // 000D GETMET R8 R2 K6
+ 0x58280007, // 000E LDCONST R10 K7
+ 0x7C200400, // 000F CALL R8 2
+ 0x88240108, // 0010 GETMBR R9 R0 K8
+ 0x14241009, // 0011 LT R9 R8 R9
+ 0x78260000, // 0012 JMPF R9 #0014
+ 0x88200108, // 0013 GETMBR R8 R0 K8
+ 0x88240109, // 0014 GETMBR R9 R0 K9
+ 0x24241009, // 0015 GT R9 R8 R9
+ 0x78260000, // 0016 JMPF R9 #0018
+ 0x88200109, // 0017 GETMBR R8 R0 K9
+ 0x8C24090A, // 0018 GETMET R9 R4 K10
+ 0x602C0013, // 0019 GETGBL R11 G19
+ 0x7C2C0000, // 001A CALL R11 0
+ 0x982E1608, // 001B SETIDX R11 K11 R8
+ 0x7C240400, // 001C CALL R9 2
+ 0x8C24010C, // 001D GETMET R9 R0 K12
+ 0x7C240200, // 001E CALL R9 1
+ 0x60240008, // 001F GETGBL R9 G8
+ 0x5C281000, // 0020 MOVE R10 R8
+ 0x7C240200, // 0021 CALL R9 1
+ 0x00261C09, // 0022 ADD R9 K14 R9
+ 0x900E1A09, // 0023 SETMBR R3 K13 R9
+ 0x50240200, // 0024 LDBOOL R9 1 0
+ 0x80041200, // 0025 RET 1 R9
+ 0x70020010, // 0026 JMP #0038
+ 0x54220046, // 0027 LDINT R8 71
+ 0x1C200E08, // 0028 EQ R8 R7 R8
+ 0x78220002, // 0029 JMPF R8 #002D
+ 0x50200200, // 002A LDBOOL R8 1 0
+ 0x80041000, // 002B RET 1 R8
+ 0x7002000A, // 002C JMP #0038
+ 0x5422004A, // 002D LDINT R8 75
+ 0x1C200E08, // 002E EQ R8 R7 R8
+ 0x78220002, // 002F JMPF R8 #0033
+ 0x50200200, // 0030 LDBOOL R8 1 0
+ 0x80041000, // 0031 RET 1 R8
+ 0x70020004, // 0032 JMP #0038
+ 0x5422004B, // 0033 LDINT R8 76
+ 0x1C200E08, // 0034 EQ R8 R7 R8
+ 0x78220001, // 0035 JMPF R8 #0038
+ 0x50200200, // 0036 LDBOOL R8 1 0
+ 0x80041000, // 0037 RET 1 R8
+ 0x70020008, // 0038 JMP #0042
+ 0x60200003, // 0039 GETGBL R8 G3
+ 0x5C240000, // 003A MOVE R9 R0
+ 0x7C200200, // 003B CALL R8 1
+ 0x8C20110F, // 003C GETMET R8 R8 K15
+ 0x5C280200, // 003D MOVE R10 R1
+ 0x5C2C0400, // 003E MOVE R11 R2
+ 0x5C300600, // 003F MOVE R12 R3
+ 0x7C200800, // 0040 CALL R8 4
+ 0x80041000, // 0041 RET 1 R8
+ 0x80000000, // 0042 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
index b4ebe2fd7..abfb7e030 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light3.h
@@ -36,7 +36,7 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[63]) { /* code */
+ ( &(const binstruction[61]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x60080003, // 0001 GETGBL R2 G3
0x5C0C0000, // 0002 MOVE R3 R0
@@ -83,23 +83,21 @@ be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
0x8810010A, // 002B GETMBR R4 R0 K10
0x88140109, // 002C GETMBR R5 R0 K9
0x20140605, // 002D NE R5 R3 R5
- 0x78160005, // 002E JMPF R5 #0035
+ 0x78160004, // 002E JMPF R5 #0034
0x8C14010B, // 002F GETMET R5 R0 K11
- 0x4C1C0000, // 0030 LDNIL R7
- 0x542202FF, // 0031 LDINT R8 768
- 0x58240008, // 0032 LDCONST R9 K8
- 0x7C140800, // 0033 CALL R5 4
- 0x90021203, // 0034 SETMBR R0 K9 R3
- 0x8814010A, // 0035 GETMBR R5 R0 K10
- 0x20140805, // 0036 NE R5 R4 R5
- 0x78160005, // 0037 JMPF R5 #003E
- 0x8C14010B, // 0038 GETMET R5 R0 K11
- 0x4C1C0000, // 0039 LDNIL R7
- 0x542202FF, // 003A LDINT R8 768
- 0x5824000C, // 003B LDCONST R9 K12
- 0x7C140800, // 003C CALL R5 4
- 0x90021404, // 003D SETMBR R0 K10 R4
- 0x80000000, // 003E RET 0
+ 0x541E02FF, // 0030 LDINT R7 768
+ 0x58200008, // 0031 LDCONST R8 K8
+ 0x7C140600, // 0032 CALL R5 3
+ 0x90021203, // 0033 SETMBR R0 K9 R3
+ 0x8814010A, // 0034 GETMBR R5 R0 K10
+ 0x20140805, // 0035 NE R5 R4 R5
+ 0x78160004, // 0036 JMPF R5 #003C
+ 0x8C14010B, // 0037 GETMET R5 R0 K11
+ 0x541E02FF, // 0038 LDINT R7 768
+ 0x5820000C, // 0039 LDCONST R8 K12
+ 0x7C140600, // 003A CALL R5 3
+ 0x90021404, // 003B SETMBR R0 K10 R4
+ 0x80000000, // 003C RET 0
})
)
);
@@ -119,24 +117,25 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
+ ( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(create_TLV),
- /* K7 */ be_nested_str_weak(U1),
- /* K8 */ be_nested_str_weak(shadow_hue),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(shadow_sat),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_nested_str_weak(read_attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U1),
+ /* K9 */ be_nested_str_weak(shadow_hue),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_nested_str_weak(shadow_sat),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[105]) { /* code */
+ ( &(const binstruction[107]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -144,104 +143,106 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E02FF, // 0005 LDINT R7 768
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E0057, // 0007 JMPF R7 #0060
- 0x1C1C0D05, // 0008 EQ R7 R6 K5
- 0x781E0005, // 0009 JMPF R7 #0010
- 0x8C1C0906, // 000A GETMET R7 R4 K6
- 0x88240907, // 000B GETMBR R9 R4 K7
- 0x88280108, // 000C GETMBR R10 R0 K8
- 0x7C1C0600, // 000D CALL R7 3
- 0x80040E00, // 000E RET 1 R7
- 0x7002004E, // 000F JMP #005F
- 0x1C1C0D09, // 0010 EQ R7 R6 K9
- 0x781E0005, // 0011 JMPF R7 #0018
- 0x8C1C0906, // 0012 GETMET R7 R4 K6
- 0x88240907, // 0013 GETMBR R9 R4 K7
- 0x8828010A, // 0014 GETMBR R10 R0 K10
- 0x7C1C0600, // 0015 CALL R7 3
- 0x80040E00, // 0016 RET 1 R7
- 0x70020046, // 0017 JMP #005F
- 0x541E0006, // 0018 LDINT R7 7
- 0x1C1C0C07, // 0019 EQ R7 R6 R7
- 0x781E0005, // 001A JMPF R7 #0021
- 0x8C1C0906, // 001B GETMET R7 R4 K6
- 0x88240907, // 001C GETMBR R9 R4 K7
- 0x58280005, // 001D LDCONST R10 K5
- 0x7C1C0600, // 001E CALL R7 3
- 0x80040E00, // 001F RET 1 R7
- 0x7002003D, // 0020 JMP #005F
- 0x541E0007, // 0021 LDINT R7 8
- 0x1C1C0C07, // 0022 EQ R7 R6 R7
- 0x781E0005, // 0023 JMPF R7 #002A
- 0x8C1C0906, // 0024 GETMET R7 R4 K6
- 0x88240907, // 0025 GETMBR R9 R4 K7
- 0x58280005, // 0026 LDCONST R10 K5
- 0x7C1C0600, // 0027 CALL R7 3
- 0x80040E00, // 0028 RET 1 R7
- 0x70020034, // 0029 JMP #005F
- 0x541E000E, // 002A LDINT R7 15
- 0x1C1C0C07, // 002B EQ R7 R6 R7
- 0x781E0005, // 002C JMPF R7 #0033
- 0x8C1C0906, // 002D GETMET R7 R4 K6
- 0x88240907, // 002E GETMBR R9 R4 K7
- 0x58280005, // 002F LDCONST R10 K5
- 0x7C1C0600, // 0030 CALL R7 3
- 0x80040E00, // 0031 RET 1 R7
- 0x7002002B, // 0032 JMP #005F
- 0x541E4000, // 0033 LDINT R7 16385
- 0x1C1C0C07, // 0034 EQ R7 R6 R7
- 0x781E0005, // 0035 JMPF R7 #003C
- 0x8C1C0906, // 0036 GETMET R7 R4 K6
- 0x88240907, // 0037 GETMBR R9 R4 K7
- 0x58280005, // 0038 LDCONST R10 K5
- 0x7C1C0600, // 0039 CALL R7 3
- 0x80040E00, // 003A RET 1 R7
- 0x70020022, // 003B JMP #005F
- 0x541E4009, // 003C LDINT R7 16394
- 0x1C1C0C07, // 003D EQ R7 R6 R7
- 0x781E0005, // 003E JMPF R7 #0045
- 0x8C1C0906, // 003F GETMET R7 R4 K6
- 0x88240907, // 0040 GETMBR R9 R4 K7
- 0x58280005, // 0041 LDCONST R10 K5
- 0x7C1C0600, // 0042 CALL R7 3
- 0x80040E00, // 0043 RET 1 R7
- 0x70020019, // 0044 JMP #005F
- 0x541E000F, // 0045 LDINT R7 16
- 0x1C1C0C07, // 0046 EQ R7 R6 R7
- 0x781E0005, // 0047 JMPF R7 #004E
- 0x8C1C0906, // 0048 GETMET R7 R4 K6
- 0x88240907, // 0049 GETMBR R9 R4 K7
- 0x58280005, // 004A LDCONST R10 K5
- 0x7C1C0600, // 004B CALL R7 3
- 0x80040E00, // 004C RET 1 R7
- 0x70020010, // 004D JMP #005F
- 0x541EFFFB, // 004E LDINT R7 65532
- 0x1C1C0C07, // 004F EQ R7 R6 R7
- 0x781E0005, // 0050 JMPF R7 #0057
- 0x8C1C0906, // 0051 GETMET R7 R4 K6
- 0x8824090B, // 0052 GETMBR R9 R4 K11
- 0x58280009, // 0053 LDCONST R10 K9
- 0x7C1C0600, // 0054 CALL R7 3
- 0x80040E00, // 0055 RET 1 R7
- 0x70020007, // 0056 JMP #005F
- 0x541EFFFC, // 0057 LDINT R7 65533
- 0x1C1C0C07, // 0058 EQ R7 R6 R7
- 0x781E0004, // 0059 JMPF R7 #005F
- 0x8C1C0906, // 005A GETMET R7 R4 K6
- 0x8824090B, // 005B GETMBR R9 R4 K11
- 0x542A0004, // 005C LDINT R10 5
- 0x7C1C0600, // 005D CALL R7 3
- 0x80040E00, // 005E RET 1 R7
- 0x70020007, // 005F JMP #0068
- 0x601C0003, // 0060 GETGBL R7 G3
- 0x5C200000, // 0061 MOVE R8 R0
- 0x7C1C0200, // 0062 CALL R7 1
- 0x8C1C0F0C, // 0063 GETMET R7 R7 K12
- 0x5C240200, // 0064 MOVE R9 R1
- 0x5C280400, // 0065 MOVE R10 R2
- 0x7C1C0600, // 0066 CALL R7 3
- 0x80040E00, // 0067 RET 1 R7
- 0x80000000, // 0068 RET 0
+ 0x781E0059, // 0007 JMPF R7 #0062
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x7002004E, // 0011 JMP #0061
+ 0x1C1C0D0A, // 0012 EQ R7 R6 K10
+ 0x781E0005, // 0013 JMPF R7 #001A
+ 0x8C1C0907, // 0014 GETMET R7 R4 K7
+ 0x88240908, // 0015 GETMBR R9 R4 K8
+ 0x8828010B, // 0016 GETMBR R10 R0 K11
+ 0x7C1C0600, // 0017 CALL R7 3
+ 0x80040E00, // 0018 RET 1 R7
+ 0x70020046, // 0019 JMP #0061
+ 0x541E0006, // 001A LDINT R7 7
+ 0x1C1C0C07, // 001B EQ R7 R6 R7
+ 0x781E0005, // 001C JMPF R7 #0023
+ 0x8C1C0907, // 001D GETMET R7 R4 K7
+ 0x88240908, // 001E GETMBR R9 R4 K8
+ 0x58280006, // 001F LDCONST R10 K6
+ 0x7C1C0600, // 0020 CALL R7 3
+ 0x80040E00, // 0021 RET 1 R7
+ 0x7002003D, // 0022 JMP #0061
+ 0x541E0007, // 0023 LDINT R7 8
+ 0x1C1C0C07, // 0024 EQ R7 R6 R7
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0907, // 0026 GETMET R7 R4 K7
+ 0x88240908, // 0027 GETMBR R9 R4 K8
+ 0x58280006, // 0028 LDCONST R10 K6
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x70020034, // 002B JMP #0061
+ 0x541E000E, // 002C LDINT R7 15
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0005, // 002E JMPF R7 #0035
+ 0x8C1C0907, // 002F GETMET R7 R4 K7
+ 0x88240908, // 0030 GETMBR R9 R4 K8
+ 0x58280006, // 0031 LDCONST R10 K6
+ 0x7C1C0600, // 0032 CALL R7 3
+ 0x80040E00, // 0033 RET 1 R7
+ 0x7002002B, // 0034 JMP #0061
+ 0x541E4000, // 0035 LDINT R7 16385
+ 0x1C1C0C07, // 0036 EQ R7 R6 R7
+ 0x781E0005, // 0037 JMPF R7 #003E
+ 0x8C1C0907, // 0038 GETMET R7 R4 K7
+ 0x88240908, // 0039 GETMBR R9 R4 K8
+ 0x58280006, // 003A LDCONST R10 K6
+ 0x7C1C0600, // 003B CALL R7 3
+ 0x80040E00, // 003C RET 1 R7
+ 0x70020022, // 003D JMP #0061
+ 0x541E4009, // 003E LDINT R7 16394
+ 0x1C1C0C07, // 003F EQ R7 R6 R7
+ 0x781E0005, // 0040 JMPF R7 #0047
+ 0x8C1C0907, // 0041 GETMET R7 R4 K7
+ 0x88240908, // 0042 GETMBR R9 R4 K8
+ 0x58280006, // 0043 LDCONST R10 K6
+ 0x7C1C0600, // 0044 CALL R7 3
+ 0x80040E00, // 0045 RET 1 R7
+ 0x70020019, // 0046 JMP #0061
+ 0x541E000F, // 0047 LDINT R7 16
+ 0x1C1C0C07, // 0048 EQ R7 R6 R7
+ 0x781E0005, // 0049 JMPF R7 #0050
+ 0x8C1C0907, // 004A GETMET R7 R4 K7
+ 0x88240908, // 004B GETMBR R9 R4 K8
+ 0x58280006, // 004C LDCONST R10 K6
+ 0x7C1C0600, // 004D CALL R7 3
+ 0x80040E00, // 004E RET 1 R7
+ 0x70020010, // 004F JMP #0061
+ 0x541EFFFB, // 0050 LDINT R7 65532
+ 0x1C1C0C07, // 0051 EQ R7 R6 R7
+ 0x781E0005, // 0052 JMPF R7 #0059
+ 0x8C1C0907, // 0053 GETMET R7 R4 K7
+ 0x8824090C, // 0054 GETMBR R9 R4 K12
+ 0x5828000A, // 0055 LDCONST R10 K10
+ 0x7C1C0600, // 0056 CALL R7 3
+ 0x80040E00, // 0057 RET 1 R7
+ 0x70020007, // 0058 JMP #0061
+ 0x541EFFFC, // 0059 LDINT R7 65533
+ 0x1C1C0C07, // 005A EQ R7 R6 R7
+ 0x781E0004, // 005B JMPF R7 #0061
+ 0x8C1C0907, // 005C GETMET R7 R4 K7
+ 0x8824090C, // 005D GETMBR R9 R4 K12
+ 0x542A0004, // 005E LDINT R10 5
+ 0x7C1C0600, // 005F CALL R7 3
+ 0x80040E00, // 0060 RET 1 R7
+ 0x70020007, // 0061 JMP #006A
+ 0x601C0003, // 0062 GETGBL R7 G3
+ 0x5C200000, // 0063 MOVE R8 R0
+ 0x7C1C0200, // 0064 CALL R7 1
+ 0x8C1C0F0D, // 0065 GETMET R7 R7 K13
+ 0x5C240200, // 0066 MOVE R9 R1
+ 0x5C280400, // 0067 MOVE R10 R2
+ 0x7C1C0600, // 0068 CALL R7 3
+ 0x80040E00, // 0069 RET 1 R7
+ 0x80000000, // 006A RET 0
})
)
);
@@ -300,32 +301,33 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[21]) { /* constants */
+ ( &(const bvalue[22]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(findsubval),
- /* K7 */ be_nested_str_weak(tasmota),
- /* K8 */ be_nested_str_weak(scale_uint),
- /* K9 */ be_nested_str_weak(set),
- /* K10 */ be_nested_str_weak(hue),
- /* K11 */ be_nested_str_weak(update_shadow),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(hue_X3A),
- /* K14 */ be_const_int(1),
- /* K15 */ be_const_int(2),
- /* K16 */ be_const_int(3),
- /* K17 */ be_nested_str_weak(sat),
- /* K18 */ be_nested_str_weak(sat_X3A),
- /* K19 */ be_nested_str_weak(_X20sat_X3A),
- /* K20 */ be_nested_str_weak(invoke_request),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(findsubval),
+ /* K8 */ be_nested_str_weak(tasmota),
+ /* K9 */ be_nested_str_weak(scale_uint),
+ /* K10 */ be_nested_str_weak(set),
+ /* K11 */ be_nested_str_weak(hue),
+ /* K12 */ be_nested_str_weak(update_shadow),
+ /* K13 */ be_nested_str_weak(log),
+ /* K14 */ be_nested_str_weak(hue_X3A),
+ /* K15 */ be_const_int(1),
+ /* K16 */ be_const_int(2),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(sat),
+ /* K19 */ be_nested_str_weak(sat_X3A),
+ /* K20 */ be_nested_str_weak(_X20sat_X3A),
+ /* K21 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[148]) { /* code */
+ ( &(const binstruction[150]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -333,147 +335,149 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x78220081, // 0007 JMPF R8 #008A
- 0x1C200F05, // 0008 EQ R8 R7 K5
- 0x78220019, // 0009 JMPF R8 #0024
- 0x8C200506, // 000A GETMET R8 R2 K6
- 0x58280005, // 000B LDCONST R10 K5
- 0x7C200400, // 000C CALL R8 2
- 0xB8260E00, // 000D GETNGBL R9 K7
- 0x8C241308, // 000E GETMET R9 R9 K8
- 0x5C2C1000, // 000F MOVE R11 R8
- 0x58300005, // 0010 LDCONST R12 K5
- 0x543600FD, // 0011 LDINT R13 254
- 0x58380005, // 0012 LDCONST R14 K5
- 0x543E0167, // 0013 LDINT R15 360
- 0x7C240C00, // 0014 CALL R9 6
- 0x8C280909, // 0015 GETMET R10 R4 K9
- 0x60300013, // 0016 GETGBL R12 G19
- 0x7C300000, // 0017 CALL R12 0
- 0x98321409, // 0018 SETIDX R12 K10 R9
- 0x7C280400, // 0019 CALL R10 2
- 0x8C28010B, // 001A GETMET R10 R0 K11
- 0x7C280200, // 001B CALL R10 1
- 0x60280008, // 001C GETGBL R10 G8
- 0x5C2C1000, // 001D MOVE R11 R8
- 0x7C280200, // 001E CALL R10 1
- 0x002A1A0A, // 001F ADD R10 K13 R10
- 0x900E180A, // 0020 SETMBR R3 K12 R10
- 0x50280200, // 0021 LDBOOL R10 1 0
- 0x80041400, // 0022 RET 1 R10
- 0x70020064, // 0023 JMP #0089
- 0x1C200F0E, // 0024 EQ R8 R7 K14
- 0x78220002, // 0025 JMPF R8 #0029
- 0x50200200, // 0026 LDBOOL R8 1 0
- 0x80041000, // 0027 RET 1 R8
- 0x7002005F, // 0028 JMP #0089
- 0x1C200F0F, // 0029 EQ R8 R7 K15
- 0x78220002, // 002A JMPF R8 #002E
- 0x50200200, // 002B LDBOOL R8 1 0
- 0x80041000, // 002C RET 1 R8
- 0x7002005A, // 002D JMP #0089
- 0x1C200F10, // 002E EQ R8 R7 K16
- 0x78220019, // 002F JMPF R8 #004A
- 0x8C200506, // 0030 GETMET R8 R2 K6
- 0x58280005, // 0031 LDCONST R10 K5
- 0x7C200400, // 0032 CALL R8 2
- 0xB8260E00, // 0033 GETNGBL R9 K7
- 0x8C241308, // 0034 GETMET R9 R9 K8
- 0x5C2C1000, // 0035 MOVE R11 R8
- 0x58300005, // 0036 LDCONST R12 K5
- 0x543600FD, // 0037 LDINT R13 254
- 0x58380005, // 0038 LDCONST R14 K5
- 0x543E00FE, // 0039 LDINT R15 255
- 0x7C240C00, // 003A CALL R9 6
- 0x8C280909, // 003B GETMET R10 R4 K9
- 0x60300013, // 003C GETGBL R12 G19
- 0x7C300000, // 003D CALL R12 0
- 0x98322209, // 003E SETIDX R12 K17 R9
- 0x7C280400, // 003F CALL R10 2
- 0x8C28010B, // 0040 GETMET R10 R0 K11
- 0x7C280200, // 0041 CALL R10 1
- 0x60280008, // 0042 GETGBL R10 G8
- 0x5C2C1000, // 0043 MOVE R11 R8
- 0x7C280200, // 0044 CALL R10 1
- 0x002A240A, // 0045 ADD R10 K18 R10
- 0x900E180A, // 0046 SETMBR R3 K12 R10
- 0x50280200, // 0047 LDBOOL R10 1 0
- 0x80041400, // 0048 RET 1 R10
- 0x7002003E, // 0049 JMP #0089
- 0x54220003, // 004A LDINT R8 4
- 0x1C200E08, // 004B EQ R8 R7 R8
- 0x78220002, // 004C JMPF R8 #0050
- 0x50200200, // 004D LDBOOL R8 1 0
- 0x80041000, // 004E RET 1 R8
- 0x70020038, // 004F JMP #0089
- 0x54220004, // 0050 LDINT R8 5
- 0x1C200E08, // 0051 EQ R8 R7 R8
- 0x78220002, // 0052 JMPF R8 #0056
- 0x50200200, // 0053 LDBOOL R8 1 0
- 0x80041000, // 0054 RET 1 R8
- 0x70020032, // 0055 JMP #0089
- 0x54220005, // 0056 LDINT R8 6
- 0x1C200E08, // 0057 EQ R8 R7 R8
- 0x7822002A, // 0058 JMPF R8 #0084
- 0x8C200506, // 0059 GETMET R8 R2 K6
- 0x58280005, // 005A LDCONST R10 K5
- 0x7C200400, // 005B CALL R8 2
- 0xB8260E00, // 005C GETNGBL R9 K7
- 0x8C241308, // 005D GETMET R9 R9 K8
- 0x5C2C1000, // 005E MOVE R11 R8
- 0x58300005, // 005F LDCONST R12 K5
- 0x543600FD, // 0060 LDINT R13 254
- 0x58380005, // 0061 LDCONST R14 K5
- 0x543E0167, // 0062 LDINT R15 360
- 0x7C240C00, // 0063 CALL R9 6
- 0x8C280506, // 0064 GETMET R10 R2 K6
- 0x5830000E, // 0065 LDCONST R12 K14
- 0x7C280400, // 0066 CALL R10 2
- 0xB82E0E00, // 0067 GETNGBL R11 K7
- 0x8C2C1708, // 0068 GETMET R11 R11 K8
- 0x5C341400, // 0069 MOVE R13 R10
- 0x58380005, // 006A LDCONST R14 K5
- 0x543E00FD, // 006B LDINT R15 254
- 0x58400005, // 006C LDCONST R16 K5
- 0x544600FE, // 006D LDINT R17 255
- 0x7C2C0C00, // 006E CALL R11 6
- 0x8C300909, // 006F GETMET R12 R4 K9
- 0x60380013, // 0070 GETGBL R14 G19
- 0x7C380000, // 0071 CALL R14 0
- 0x983A1409, // 0072 SETIDX R14 K10 R9
- 0x983A220B, // 0073 SETIDX R14 K17 R11
- 0x7C300400, // 0074 CALL R12 2
- 0x8C30010B, // 0075 GETMET R12 R0 K11
- 0x7C300200, // 0076 CALL R12 1
- 0x60300008, // 0077 GETGBL R12 G8
- 0x5C341000, // 0078 MOVE R13 R8
- 0x7C300200, // 0079 CALL R12 1
- 0x00321A0C, // 007A ADD R12 K13 R12
- 0x00301913, // 007B ADD R12 R12 K19
- 0x60340008, // 007C GETGBL R13 G8
- 0x5C381400, // 007D MOVE R14 R10
- 0x7C340200, // 007E CALL R13 1
- 0x0030180D, // 007F ADD R12 R12 R13
- 0x900E180C, // 0080 SETMBR R3 K12 R12
- 0x50300200, // 0081 LDBOOL R12 1 0
- 0x80041800, // 0082 RET 1 R12
- 0x70020004, // 0083 JMP #0089
- 0x54220046, // 0084 LDINT R8 71
- 0x1C200E08, // 0085 EQ R8 R7 R8
- 0x78220001, // 0086 JMPF R8 #0089
- 0x50200200, // 0087 LDBOOL R8 1 0
- 0x80041000, // 0088 RET 1 R8
- 0x70020008, // 0089 JMP #0093
- 0x60200003, // 008A GETGBL R8 G3
- 0x5C240000, // 008B MOVE R9 R0
- 0x7C200200, // 008C CALL R8 1
- 0x8C201114, // 008D GETMET R8 R8 K20
- 0x5C280200, // 008E MOVE R10 R1
- 0x5C2C0400, // 008F MOVE R11 R2
- 0x5C300600, // 0090 MOVE R12 R3
- 0x7C200800, // 0091 CALL R8 4
- 0x80041000, // 0092 RET 1 R8
- 0x80000000, // 0093 RET 0
+ 0x78220083, // 0007 JMPF R8 #008C
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x1C200F06, // 000A EQ R8 R7 K6
+ 0x78220019, // 000B JMPF R8 #0026
+ 0x8C200507, // 000C GETMET R8 R2 K7
+ 0x58280006, // 000D LDCONST R10 K6
+ 0x7C200400, // 000E CALL R8 2
+ 0xB8261000, // 000F GETNGBL R9 K8
+ 0x8C241309, // 0010 GETMET R9 R9 K9
+ 0x5C2C1000, // 0011 MOVE R11 R8
+ 0x58300006, // 0012 LDCONST R12 K6
+ 0x543600FD, // 0013 LDINT R13 254
+ 0x58380006, // 0014 LDCONST R14 K6
+ 0x543E0167, // 0015 LDINT R15 360
+ 0x7C240C00, // 0016 CALL R9 6
+ 0x8C28090A, // 0017 GETMET R10 R4 K10
+ 0x60300013, // 0018 GETGBL R12 G19
+ 0x7C300000, // 0019 CALL R12 0
+ 0x98321609, // 001A SETIDX R12 K11 R9
+ 0x7C280400, // 001B CALL R10 2
+ 0x8C28010C, // 001C GETMET R10 R0 K12
+ 0x7C280200, // 001D CALL R10 1
+ 0x60280008, // 001E GETGBL R10 G8
+ 0x5C2C1000, // 001F MOVE R11 R8
+ 0x7C280200, // 0020 CALL R10 1
+ 0x002A1C0A, // 0021 ADD R10 K14 R10
+ 0x900E1A0A, // 0022 SETMBR R3 K13 R10
+ 0x50280200, // 0023 LDBOOL R10 1 0
+ 0x80041400, // 0024 RET 1 R10
+ 0x70020064, // 0025 JMP #008B
+ 0x1C200F0F, // 0026 EQ R8 R7 K15
+ 0x78220002, // 0027 JMPF R8 #002B
+ 0x50200200, // 0028 LDBOOL R8 1 0
+ 0x80041000, // 0029 RET 1 R8
+ 0x7002005F, // 002A JMP #008B
+ 0x1C200F10, // 002B EQ R8 R7 K16
+ 0x78220002, // 002C JMPF R8 #0030
+ 0x50200200, // 002D LDBOOL R8 1 0
+ 0x80041000, // 002E RET 1 R8
+ 0x7002005A, // 002F JMP #008B
+ 0x1C200F11, // 0030 EQ R8 R7 K17
+ 0x78220019, // 0031 JMPF R8 #004C
+ 0x8C200507, // 0032 GETMET R8 R2 K7
+ 0x58280006, // 0033 LDCONST R10 K6
+ 0x7C200400, // 0034 CALL R8 2
+ 0xB8261000, // 0035 GETNGBL R9 K8
+ 0x8C241309, // 0036 GETMET R9 R9 K9
+ 0x5C2C1000, // 0037 MOVE R11 R8
+ 0x58300006, // 0038 LDCONST R12 K6
+ 0x543600FD, // 0039 LDINT R13 254
+ 0x58380006, // 003A LDCONST R14 K6
+ 0x543E00FE, // 003B LDINT R15 255
+ 0x7C240C00, // 003C CALL R9 6
+ 0x8C28090A, // 003D GETMET R10 R4 K10
+ 0x60300013, // 003E GETGBL R12 G19
+ 0x7C300000, // 003F CALL R12 0
+ 0x98322409, // 0040 SETIDX R12 K18 R9
+ 0x7C280400, // 0041 CALL R10 2
+ 0x8C28010C, // 0042 GETMET R10 R0 K12
+ 0x7C280200, // 0043 CALL R10 1
+ 0x60280008, // 0044 GETGBL R10 G8
+ 0x5C2C1000, // 0045 MOVE R11 R8
+ 0x7C280200, // 0046 CALL R10 1
+ 0x002A260A, // 0047 ADD R10 K19 R10
+ 0x900E1A0A, // 0048 SETMBR R3 K13 R10
+ 0x50280200, // 0049 LDBOOL R10 1 0
+ 0x80041400, // 004A RET 1 R10
+ 0x7002003E, // 004B JMP #008B
+ 0x54220003, // 004C LDINT R8 4
+ 0x1C200E08, // 004D EQ R8 R7 R8
+ 0x78220002, // 004E JMPF R8 #0052
+ 0x50200200, // 004F LDBOOL R8 1 0
+ 0x80041000, // 0050 RET 1 R8
+ 0x70020038, // 0051 JMP #008B
+ 0x54220004, // 0052 LDINT R8 5
+ 0x1C200E08, // 0053 EQ R8 R7 R8
+ 0x78220002, // 0054 JMPF R8 #0058
+ 0x50200200, // 0055 LDBOOL R8 1 0
+ 0x80041000, // 0056 RET 1 R8
+ 0x70020032, // 0057 JMP #008B
+ 0x54220005, // 0058 LDINT R8 6
+ 0x1C200E08, // 0059 EQ R8 R7 R8
+ 0x7822002A, // 005A JMPF R8 #0086
+ 0x8C200507, // 005B GETMET R8 R2 K7
+ 0x58280006, // 005C LDCONST R10 K6
+ 0x7C200400, // 005D CALL R8 2
+ 0xB8261000, // 005E GETNGBL R9 K8
+ 0x8C241309, // 005F GETMET R9 R9 K9
+ 0x5C2C1000, // 0060 MOVE R11 R8
+ 0x58300006, // 0061 LDCONST R12 K6
+ 0x543600FD, // 0062 LDINT R13 254
+ 0x58380006, // 0063 LDCONST R14 K6
+ 0x543E0167, // 0064 LDINT R15 360
+ 0x7C240C00, // 0065 CALL R9 6
+ 0x8C280507, // 0066 GETMET R10 R2 K7
+ 0x5830000F, // 0067 LDCONST R12 K15
+ 0x7C280400, // 0068 CALL R10 2
+ 0xB82E1000, // 0069 GETNGBL R11 K8
+ 0x8C2C1709, // 006A GETMET R11 R11 K9
+ 0x5C341400, // 006B MOVE R13 R10
+ 0x58380006, // 006C LDCONST R14 K6
+ 0x543E00FD, // 006D LDINT R15 254
+ 0x58400006, // 006E LDCONST R16 K6
+ 0x544600FE, // 006F LDINT R17 255
+ 0x7C2C0C00, // 0070 CALL R11 6
+ 0x8C30090A, // 0071 GETMET R12 R4 K10
+ 0x60380013, // 0072 GETGBL R14 G19
+ 0x7C380000, // 0073 CALL R14 0
+ 0x983A1609, // 0074 SETIDX R14 K11 R9
+ 0x983A240B, // 0075 SETIDX R14 K18 R11
+ 0x7C300400, // 0076 CALL R12 2
+ 0x8C30010C, // 0077 GETMET R12 R0 K12
+ 0x7C300200, // 0078 CALL R12 1
+ 0x60300008, // 0079 GETGBL R12 G8
+ 0x5C341000, // 007A MOVE R13 R8
+ 0x7C300200, // 007B CALL R12 1
+ 0x00321C0C, // 007C ADD R12 K14 R12
+ 0x00301914, // 007D ADD R12 R12 K20
+ 0x60340008, // 007E GETGBL R13 G8
+ 0x5C381400, // 007F MOVE R14 R10
+ 0x7C340200, // 0080 CALL R13 1
+ 0x0030180D, // 0081 ADD R12 R12 R13
+ 0x900E1A0C, // 0082 SETMBR R3 K13 R12
+ 0x50300200, // 0083 LDBOOL R12 1 0
+ 0x80041800, // 0084 RET 1 R12
+ 0x70020004, // 0085 JMP #008B
+ 0x54220046, // 0086 LDINT R8 71
+ 0x1C200E08, // 0087 EQ R8 R7 R8
+ 0x78220001, // 0088 JMPF R8 #008B
+ 0x50200200, // 0089 LDBOOL R8 1 0
+ 0x80041000, // 008A RET 1 R8
+ 0x70020008, // 008B JMP #0095
+ 0x60200003, // 008C GETGBL R8 G3
+ 0x5C240000, // 008D MOVE R9 R0
+ 0x7C200200, // 008E CALL R8 1
+ 0x8C201115, // 008F GETMET R8 R8 K21
+ 0x5C280200, // 0090 MOVE R10 R1
+ 0x5C2C0400, // 0091 MOVE R11 R2
+ 0x5C300600, // 0092 MOVE R12 R3
+ 0x7C200800, // 0093 CALL R8 4
+ 0x80041000, // 0094 RET 1 R8
+ 0x80000000, // 0095 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
index 509ff2714..07ce40c5a 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
@@ -6,250 +6,6 @@
extern const bclass be_class_Matter_Plugin_OnOff;
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(get_onoff),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(ARG),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x8C100101, // 0008 GETMET R4 R0 K1
- 0x7C100200, // 0009 CALL R4 1
- 0x8C100703, // 000A GETMET R4 R3 K3
- 0x88180104, // 000B GETMBR R6 R0 K4
- 0x7C100400, // 000C CALL R4 2
- 0x90020404, // 000D SETMBR R0 K2 R4
- 0x88100102, // 000E GETMBR R4 R0 K2
- 0x4C140000, // 000F LDNIL R5
- 0x1C100805, // 0010 EQ R4 R4 R5
- 0x78120000, // 0011 JMPF R4 #0013
- 0x90020505, // 0012 SETMBR R0 K2 K5
- 0x80000000, // 0013 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
- be_nested_proto(
- 13, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(TLV),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(command),
- /* K4 */ be_const_int(3),
- /* K5 */ be_const_int(0),
- /* K6 */ be_const_int(1),
- /* K7 */ be_nested_str_weak(Matter_TLV_struct),
- /* K8 */ be_nested_str_weak(add_TLV),
- /* K9 */ be_nested_str_weak(U2),
- /* K10 */ be_nested_str_weak(set_onoff),
- /* K11 */ be_const_int(2),
- /* K12 */ be_nested_str_weak(get_onoff),
- }),
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[119]) { /* code */
- 0xB8120000, // 0000 GETNGBL R4 K0
- 0x88100901, // 0001 GETMBR R4 R4 K1
- 0x88140702, // 0002 GETMBR R5 R3 K2
- 0x88180703, // 0003 GETMBR R6 R3 K3
- 0x1C1C0B04, // 0004 EQ R7 R5 K4
- 0x781E0016, // 0005 JMPF R7 #001D
- 0x1C1C0D05, // 0006 EQ R7 R6 K5
- 0x781E0002, // 0007 JMPF R7 #000B
- 0x501C0200, // 0008 LDBOOL R7 1 0
- 0x80040E00, // 0009 RET 1 R7
- 0x70020010, // 000A JMP #001C
- 0x1C1C0D06, // 000B EQ R7 R6 K6
- 0x781E0009, // 000C JMPF R7 #0017
- 0x8C1C0907, // 000D GETMET R7 R4 K7
- 0x7C1C0200, // 000E CALL R7 1
- 0x8C200F08, // 000F GETMET R8 R7 K8
- 0x58280005, // 0010 LDCONST R10 K5
- 0x882C0909, // 0011 GETMBR R11 R4 K9
- 0x58300005, // 0012 LDCONST R12 K5
- 0x7C200800, // 0013 CALL R8 4
- 0x900E0705, // 0014 SETMBR R3 K3 K5
- 0x80040E00, // 0015 RET 1 R7
- 0x70020004, // 0016 JMP #001C
- 0x541E003F, // 0017 LDINT R7 64
- 0x1C1C0C07, // 0018 EQ R7 R6 R7
- 0x781E0001, // 0019 JMPF R7 #001C
- 0x501C0200, // 001A LDBOOL R7 1 0
- 0x80040E00, // 001B RET 1 R7
- 0x70020058, // 001C JMP #0076
- 0x541E0003, // 001D LDINT R7 4
- 0x1C1C0A07, // 001E EQ R7 R5 R7
- 0x781E0002, // 001F JMPF R7 #0023
- 0x501C0200, // 0020 LDBOOL R7 1 0
- 0x80040E00, // 0021 RET 1 R7
- 0x70020052, // 0022 JMP #0076
- 0x541E0004, // 0023 LDINT R7 5
- 0x1C1C0A07, // 0024 EQ R7 R5 R7
- 0x781E0002, // 0025 JMPF R7 #0029
- 0x501C0200, // 0026 LDBOOL R7 1 0
- 0x80040E00, // 0027 RET 1 R7
- 0x7002004C, // 0028 JMP #0076
- 0x541E0005, // 0029 LDINT R7 6
- 0x1C1C0A07, // 002A EQ R7 R5 R7
- 0x781E001B, // 002B JMPF R7 #0048
- 0x1C1C0D05, // 002C EQ R7 R6 K5
- 0x781E0005, // 002D JMPF R7 #0034
- 0x8C1C010A, // 002E GETMET R7 R0 K10
- 0x50240000, // 002F LDBOOL R9 0 0
- 0x7C1C0400, // 0030 CALL R7 2
- 0x501C0200, // 0031 LDBOOL R7 1 0
- 0x80040E00, // 0032 RET 1 R7
- 0x70020012, // 0033 JMP #0047
- 0x1C1C0D06, // 0034 EQ R7 R6 K6
- 0x781E0005, // 0035 JMPF R7 #003C
- 0x8C1C010A, // 0036 GETMET R7 R0 K10
- 0x50240200, // 0037 LDBOOL R9 1 0
- 0x7C1C0400, // 0038 CALL R7 2
- 0x501C0200, // 0039 LDBOOL R7 1 0
- 0x80040E00, // 003A RET 1 R7
- 0x7002000A, // 003B JMP #0047
- 0x1C1C0D0B, // 003C EQ R7 R6 K11
- 0x781E0008, // 003D JMPF R7 #0047
- 0x8C1C010A, // 003E GETMET R7 R0 K10
- 0x8C24010C, // 003F GETMET R9 R0 K12
- 0x7C240200, // 0040 CALL R9 1
- 0x78260000, // 0041 JMPF R9 #0043
- 0x50240001, // 0042 LDBOOL R9 0 1
- 0x50240200, // 0043 LDBOOL R9 1 0
- 0x7C1C0400, // 0044 CALL R7 2
- 0x501C0200, // 0045 LDBOOL R7 1 0
- 0x80040E00, // 0046 RET 1 R7
- 0x7002002D, // 0047 JMP #0076
- 0x541E0007, // 0048 LDINT R7 8
- 0x1C1C0A07, // 0049 EQ R7 R5 R7
- 0x781E002A, // 004A JMPF R7 #0076
- 0x1C1C0D05, // 004B EQ R7 R6 K5
- 0x781E0002, // 004C JMPF R7 #0050
- 0x501C0200, // 004D LDBOOL R7 1 0
- 0x80040E00, // 004E RET 1 R7
- 0x70020025, // 004F JMP #0076
- 0x1C1C0D06, // 0050 EQ R7 R6 K6
- 0x781E0002, // 0051 JMPF R7 #0055
- 0x501C0200, // 0052 LDBOOL R7 1 0
- 0x80040E00, // 0053 RET 1 R7
- 0x70020020, // 0054 JMP #0076
- 0x1C1C0D0B, // 0055 EQ R7 R6 K11
- 0x781E0002, // 0056 JMPF R7 #005A
- 0x501C0200, // 0057 LDBOOL R7 1 0
- 0x80040E00, // 0058 RET 1 R7
- 0x7002001B, // 0059 JMP #0076
- 0x1C1C0D04, // 005A EQ R7 R6 K4
- 0x781E0002, // 005B JMPF R7 #005F
- 0x501C0200, // 005C LDBOOL R7 1 0
- 0x80040E00, // 005D RET 1 R7
- 0x70020016, // 005E JMP #0076
- 0x541E0003, // 005F LDINT R7 4
- 0x1C1C0C07, // 0060 EQ R7 R6 R7
- 0x781E0002, // 0061 JMPF R7 #0065
- 0x501C0200, // 0062 LDBOOL R7 1 0
- 0x80040E00, // 0063 RET 1 R7
- 0x70020010, // 0064 JMP #0076
- 0x541E0004, // 0065 LDINT R7 5
- 0x1C1C0C07, // 0066 EQ R7 R6 R7
- 0x781E0002, // 0067 JMPF R7 #006B
- 0x501C0200, // 0068 LDBOOL R7 1 0
- 0x80040E00, // 0069 RET 1 R7
- 0x7002000A, // 006A JMP #0076
- 0x541E0005, // 006B LDINT R7 6
- 0x1C1C0C07, // 006C EQ R7 R6 R7
- 0x781E0002, // 006D JMPF R7 #0071
- 0x501C0200, // 006E LDBOOL R7 1 0
- 0x80040E00, // 006F RET 1 R7
- 0x70020004, // 0070 JMP #0076
- 0x541E0006, // 0071 LDINT R7 7
- 0x1C1C0C07, // 0072 EQ R7 R6 R7
- 0x781E0001, // 0073 JMPF R7 #0076
- 0x501C0200, // 0074 LDBOOL R7 1 0
- 0x80040E00, // 0075 RET 1 R7
- 0x80000000, // 0076 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_onoff
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(get_onoff),
- }),
- be_str_weak(set_onoff),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x88100102, // 0002 GETMBR R4 R0 K2
- 0x60140017, // 0003 GETGBL R5 G23
- 0x5C180200, // 0004 MOVE R6 R1
- 0x7C140200, // 0005 CALL R5 1
- 0x7C080600, // 0006 CALL R2 3
- 0x8C080103, // 0007 GETMET R2 R0 K3
- 0x7C080200, // 0008 CALL R2 1
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function:
********************************************************************/
@@ -278,11 +34,138 @@ be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
/********************************************************************
-** Solidified function: get_onoff
+** Solidified function: invoke_request
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
+be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
be_nested_proto(
- 5, /* nstack */
+ 10, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(TLV),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(command),
+ /* K4 */ be_nested_str_weak(update_shadow_lazy),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(set_onoff),
+ /* K7 */ be_nested_str_weak(update_shadow),
+ /* K8 */ be_const_int(1),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_nested_str_weak(shadow_onoff),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[42]) { /* code */
+ 0xB8120000, // 0000 GETNGBL R4 K0
+ 0x88100901, // 0001 GETMBR R4 R4 K1
+ 0x88140702, // 0002 GETMBR R5 R3 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x541E0005, // 0004 LDINT R7 6
+ 0x1C1C0A07, // 0005 EQ R7 R5 R7
+ 0x781E0021, // 0006 JMPF R7 #0029
+ 0x8C1C0104, // 0007 GETMET R7 R0 K4
+ 0x7C1C0200, // 0008 CALL R7 1
+ 0x1C1C0D05, // 0009 EQ R7 R6 K5
+ 0x781E0007, // 000A JMPF R7 #0013
+ 0x8C1C0106, // 000B GETMET R7 R0 K6
+ 0x50240000, // 000C LDBOOL R9 0 0
+ 0x7C1C0400, // 000D CALL R7 2
+ 0x8C1C0107, // 000E GETMET R7 R0 K7
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x501C0200, // 0010 LDBOOL R7 1 0
+ 0x80040E00, // 0011 RET 1 R7
+ 0x70020015, // 0012 JMP #0029
+ 0x1C1C0D08, // 0013 EQ R7 R6 K8
+ 0x781E0007, // 0014 JMPF R7 #001D
+ 0x8C1C0106, // 0015 GETMET R7 R0 K6
+ 0x50240200, // 0016 LDBOOL R9 1 0
+ 0x7C1C0400, // 0017 CALL R7 2
+ 0x8C1C0107, // 0018 GETMET R7 R0 K7
+ 0x7C1C0200, // 0019 CALL R7 1
+ 0x501C0200, // 001A LDBOOL R7 1 0
+ 0x80040E00, // 001B RET 1 R7
+ 0x7002000B, // 001C JMP #0029
+ 0x1C1C0D09, // 001D EQ R7 R6 K9
+ 0x781E0009, // 001E JMPF R7 #0029
+ 0x8C1C0106, // 001F GETMET R7 R0 K6
+ 0x8824010A, // 0020 GETMBR R9 R0 K10
+ 0x78260000, // 0021 JMPF R9 #0023
+ 0x50240001, // 0022 LDBOOL R9 0 1
+ 0x50240200, // 0023 LDBOOL R9 1 0
+ 0x7C1C0400, // 0024 CALL R7 2
+ 0x8C1C0107, // 0025 GETMET R7 R0 K7
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x501C0200, // 0027 LDBOOL R7 1 0
+ 0x80040E00, // 0028 RET 1 R7
+ 0x80000000, // 0029 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_onoff),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(ARG),
+ /* K5 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x50100000, // 0008 LDBOOL R4 0 0
+ 0x90020204, // 0009 SETMBR R0 K1 R4
+ 0x8C100703, // 000A GETMET R4 R3 K3
+ 0x88180104, // 000B GETMBR R6 R0 K4
+ 0x7C100400, // 000C CALL R4 2
+ 0x90020404, // 000D SETMBR R0 K2 R4
+ 0x88100102, // 000E GETMBR R4 R0 K2
+ 0x4C140000, // 000F LDNIL R5
+ 0x1C100805, // 0010 EQ R4 R4 R5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020505, // 0012 SETMBR R0 K2 K5
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */
+ be_nested_proto(
+ 6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -290,14 +173,16 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
+ ( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(shadow_onoff),
- /* K4 */ be_nested_str_weak(onoff_changed),
+ /* K4 */ be_nested_str_weak(attribute_updated),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(update_shadow),
}),
- be_str_weak(get_onoff),
+ be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
@@ -306,28 +191,28 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
0x7C040400, // 0003 CALL R1 2
0x4C080000, // 0004 LDNIL R2
0x20080202, // 0005 NE R2 R1 R2
- 0x780A000C, // 0006 JMPF R2 #0014
+ 0x780A000E, // 0006 JMPF R2 #0016
0x88080103, // 0007 GETMBR R2 R0 K3
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
- 0x780A0007, // 000A JMPF R2 #0013
+ 0x780A0009, // 000A JMPF R2 #0015
0x88080103, // 000B GETMBR R2 R0 K3
0x600C0017, // 000C GETGBL R3 G23
0x5C100200, // 000D MOVE R4 R1
0x7C0C0200, // 000E CALL R3 1
0x20080403, // 000F NE R2 R2 R3
- 0x780A0001, // 0010 JMPF R2 #0013
+ 0x780A0003, // 0010 JMPF R2 #0015
0x8C080104, // 0011 GETMET R2 R0 K4
- 0x7C080200, // 0012 CALL R2 1
- 0x90020601, // 0013 SETMBR R0 K3 R1
- 0x88080103, // 0014 GETMBR R2 R0 K3
- 0x4C0C0000, // 0015 LDNIL R3
- 0x1C080403, // 0016 EQ R2 R2 R3
- 0x780A0001, // 0017 JMPF R2 #001A
- 0x50080000, // 0018 LDBOOL R2 0 0
- 0x90020602, // 0019 SETMBR R0 K3 R2
- 0x88080103, // 001A GETMBR R2 R0 K3
- 0x80040400, // 001B RET 1 R2
+ 0x54120005, // 0012 LDINT R4 6
+ 0x58140005, // 0013 LDCONST R5 K5
+ 0x7C080600, // 0014 CALL R2 3
+ 0x90020601, // 0015 SETMBR R0 K3 R1
+ 0x60080003, // 0016 GETGBL R2 G3
+ 0x5C0C0000, // 0017 MOVE R3 R0
+ 0x7C080200, // 0018 CALL R2 1
+ 0x8C080506, // 0019 GETMET R2 R2 K6
+ 0x7C080200, // 001A CALL R2 1
+ 0x80000000, // 001B RET 0
})
)
);
@@ -335,27 +220,37 @@ be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
/********************************************************************
-** Solidified function: every_second
+** Solidified function: set_onoff
********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
+be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
+ 7, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(get_onoff),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(update_shadow),
}),
- be_str_weak(every_second),
+ be_str_weak(set_onoff),
&be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
+ ( &(const binstruction[10]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x60140017, // 0003 GETGBL R5 G23
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x7C140200, // 0005 CALL R5 1
+ 0x7C080600, // 0006 CALL R2 3
+ 0x8C080103, // 0007 GETMET R2 R0 K3
+ 0x7C080200, // 0008 CALL R2 1
+ 0x80000000, // 0009 RET 0
})
)
);
@@ -367,7 +262,7 @@ be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
be_nested_proto(
- 12, /* nstack */
+ 11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
@@ -375,232 +270,68 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[12]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_const_int(3),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(create_TLV),
- /* K8 */ be_nested_str_weak(U2),
- /* K9 */ be_const_int(1),
- /* K10 */ be_nested_str_weak(U1),
- /* K11 */ be_nested_str_weak(U4),
- /* K12 */ be_nested_str_weak(BOOL),
- /* K13 */ be_nested_str_weak(get_onoff),
- /* K14 */ be_nested_str_weak(read_attribute),
+ /* K8 */ be_nested_str_weak(BOOL),
+ /* K9 */ be_nested_str_weak(shadow_onoff),
+ /* K10 */ be_nested_str_weak(U4),
+ /* K11 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[174]) { /* code */
+ ( &(const binstruction[45]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
0x88140503, // 0003 GETMBR R5 R2 K3
0x88180504, // 0004 GETMBR R6 R2 K4
- 0x1C1C0B05, // 0005 EQ R7 R5 K5
- 0x781E0021, // 0006 JMPF R7 #0029
- 0x1C1C0D06, // 0007 EQ R7 R6 K6
- 0x781E0005, // 0008 JMPF R7 #000F
- 0x8C1C0907, // 0009 GETMET R7 R4 K7
- 0x88240908, // 000A GETMBR R9 R4 K8
- 0x58280006, // 000B LDCONST R10 K6
- 0x7C1C0600, // 000C CALL R7 3
- 0x80040E00, // 000D RET 1 R7
- 0x70020018, // 000E JMP #0028
- 0x1C1C0D09, // 000F EQ R7 R6 K9
- 0x781E0005, // 0010 JMPF R7 #0017
- 0x8C1C0907, // 0011 GETMET R7 R4 K7
- 0x8824090A, // 0012 GETMBR R9 R4 K10
- 0x58280006, // 0013 LDCONST R10 K6
- 0x7C1C0600, // 0014 CALL R7 3
- 0x80040E00, // 0015 RET 1 R7
- 0x70020010, // 0016 JMP #0028
- 0x541EFFFB, // 0017 LDINT R7 65532
- 0x1C1C0C07, // 0018 EQ R7 R6 R7
- 0x781E0005, // 0019 JMPF R7 #0020
- 0x8C1C0907, // 001A GETMET R7 R4 K7
- 0x8824090B, // 001B GETMBR R9 R4 K11
- 0x58280006, // 001C LDCONST R10 K6
- 0x7C1C0600, // 001D CALL R7 3
- 0x80040E00, // 001E RET 1 R7
- 0x70020007, // 001F JMP #0028
- 0x541EFFFC, // 0020 LDINT R7 65533
- 0x1C1C0C07, // 0021 EQ R7 R6 R7
- 0x781E0004, // 0022 JMPF R7 #0028
- 0x8C1C0907, // 0023 GETMET R7 R4 K7
- 0x8824090B, // 0024 GETMBR R9 R4 K11
- 0x542A0003, // 0025 LDINT R10 4
- 0x7C1C0600, // 0026 CALL R7 3
- 0x80040E00, // 0027 RET 1 R7
- 0x70020083, // 0028 JMP #00AD
- 0x541E0003, // 0029 LDINT R7 4
- 0x1C1C0A07, // 002A EQ R7 R5 R7
- 0x781E0016, // 002B JMPF R7 #0043
- 0x1C1C0D06, // 002C EQ R7 R6 K6
- 0x781E0002, // 002D JMPF R7 #0031
- 0x4C1C0000, // 002E LDNIL R7
- 0x80040E00, // 002F RET 1 R7
- 0x70020010, // 0030 JMP #0042
- 0x541EFFFB, // 0031 LDINT R7 65532
- 0x1C1C0C07, // 0032 EQ R7 R6 R7
- 0x781E0005, // 0033 JMPF R7 #003A
- 0x8C1C0907, // 0034 GETMET R7 R4 K7
- 0x8824090B, // 0035 GETMBR R9 R4 K11
- 0x58280006, // 0036 LDCONST R10 K6
- 0x7C1C0600, // 0037 CALL R7 3
- 0x80040E00, // 0038 RET 1 R7
- 0x70020007, // 0039 JMP #0042
- 0x541EFFFC, // 003A LDINT R7 65533
- 0x1C1C0C07, // 003B EQ R7 R6 R7
- 0x781E0004, // 003C JMPF R7 #0042
- 0x8C1C0907, // 003D GETMET R7 R4 K7
- 0x8824090B, // 003E GETMBR R9 R4 K11
- 0x542A0003, // 003F LDINT R10 4
- 0x7C1C0600, // 0040 CALL R7 3
- 0x80040E00, // 0041 RET 1 R7
- 0x70020069, // 0042 JMP #00AD
- 0x541E0004, // 0043 LDINT R7 5
- 0x1C1C0A07, // 0044 EQ R7 R5 R7
- 0x781E0011, // 0045 JMPF R7 #0058
- 0x541EFFFB, // 0046 LDINT R7 65532
- 0x1C1C0C07, // 0047 EQ R7 R6 R7
- 0x781E0005, // 0048 JMPF R7 #004F
- 0x8C1C0907, // 0049 GETMET R7 R4 K7
- 0x8824090B, // 004A GETMBR R9 R4 K11
- 0x58280006, // 004B LDCONST R10 K6
- 0x7C1C0600, // 004C CALL R7 3
- 0x80040E00, // 004D RET 1 R7
- 0x70020007, // 004E JMP #0057
- 0x541EFFFC, // 004F LDINT R7 65533
- 0x1C1C0C07, // 0050 EQ R7 R6 R7
- 0x781E0004, // 0051 JMPF R7 #0057
- 0x8C1C0907, // 0052 GETMET R7 R4 K7
- 0x8824090B, // 0053 GETMBR R9 R4 K11
- 0x542A0003, // 0054 LDINT R10 4
- 0x7C1C0600, // 0055 CALL R7 3
- 0x80040E00, // 0056 RET 1 R7
- 0x70020054, // 0057 JMP #00AD
- 0x541E0005, // 0058 LDINT R7 6
- 0x1C1C0A07, // 0059 EQ R7 R5 R7
- 0x781E001A, // 005A JMPF R7 #0076
- 0x1C1C0D06, // 005B EQ R7 R6 K6
- 0x781E0006, // 005C JMPF R7 #0064
- 0x8C1C0907, // 005D GETMET R7 R4 K7
- 0x8824090C, // 005E GETMBR R9 R4 K12
- 0x8C28010D, // 005F GETMET R10 R0 K13
- 0x7C280200, // 0060 CALL R10 1
- 0x7C1C0600, // 0061 CALL R7 3
- 0x80040E00, // 0062 RET 1 R7
- 0x70020010, // 0063 JMP #0075
- 0x541EFFFB, // 0064 LDINT R7 65532
- 0x1C1C0C07, // 0065 EQ R7 R6 R7
- 0x781E0005, // 0066 JMPF R7 #006D
- 0x8C1C0907, // 0067 GETMET R7 R4 K7
- 0x8824090B, // 0068 GETMBR R9 R4 K11
- 0x58280006, // 0069 LDCONST R10 K6
- 0x7C1C0600, // 006A CALL R7 3
- 0x80040E00, // 006B RET 1 R7
- 0x70020007, // 006C JMP #0075
- 0x541EFFFC, // 006D LDINT R7 65533
- 0x1C1C0C07, // 006E EQ R7 R6 R7
- 0x781E0004, // 006F JMPF R7 #0075
- 0x8C1C0907, // 0070 GETMET R7 R4 K7
- 0x8824090B, // 0071 GETMBR R9 R4 K11
- 0x542A0003, // 0072 LDINT R10 4
- 0x7C1C0600, // 0073 CALL R7 3
- 0x80040E00, // 0074 RET 1 R7
- 0x70020036, // 0075 JMP #00AD
- 0x541E0007, // 0076 LDINT R7 8
- 0x1C1C0A07, // 0077 EQ R7 R5 R7
- 0x781E002B, // 0078 JMPF R7 #00A5
- 0x1C1C0D06, // 0079 EQ R7 R6 K6
- 0x781E0005, // 007A JMPF R7 #0081
- 0x8C1C0907, // 007B GETMET R7 R4 K7
- 0x8824090A, // 007C GETMBR R9 R4 K10
- 0x542A0087, // 007D LDINT R10 136
- 0x7C1C0600, // 007E CALL R7 3
- 0x80040E00, // 007F RET 1 R7
- 0x70020022, // 0080 JMP #00A4
- 0x541E000E, // 0081 LDINT R7 15
- 0x1C1C0C07, // 0082 EQ R7 R6 R7
- 0x781E0005, // 0083 JMPF R7 #008A
- 0x8C1C0907, // 0084 GETMET R7 R4 K7
- 0x8824090A, // 0085 GETMBR R9 R4 K10
- 0x58280006, // 0086 LDCONST R10 K6
- 0x7C1C0600, // 0087 CALL R7 3
- 0x80040E00, // 0088 RET 1 R7
- 0x70020019, // 0089 JMP #00A4
- 0x541E000F, // 008A LDINT R7 16
- 0x1C1C0C07, // 008B EQ R7 R6 R7
- 0x781E0005, // 008C JMPF R7 #0093
- 0x8C1C0907, // 008D GETMET R7 R4 K7
- 0x8824090A, // 008E GETMBR R9 R4 K10
- 0x58280009, // 008F LDCONST R10 K9
- 0x7C1C0600, // 0090 CALL R7 3
- 0x80040E00, // 0091 RET 1 R7
- 0x70020010, // 0092 JMP #00A4
- 0x541EFFFB, // 0093 LDINT R7 65532
- 0x1C1C0C07, // 0094 EQ R7 R6 R7
- 0x781E0005, // 0095 JMPF R7 #009C
- 0x8C1C0907, // 0096 GETMET R7 R4 K7
- 0x8824090B, // 0097 GETMBR R9 R4 K11
- 0x58280006, // 0098 LDCONST R10 K6
- 0x7C1C0600, // 0099 CALL R7 3
- 0x80040E00, // 009A RET 1 R7
- 0x70020007, // 009B JMP #00A4
- 0x541EFFFC, // 009C LDINT R7 65533
- 0x1C1C0C07, // 009D EQ R7 R6 R7
- 0x781E0004, // 009E JMPF R7 #00A4
- 0x8C1C0907, // 009F GETMET R7 R4 K7
- 0x8824090B, // 00A0 GETMBR R9 R4 K11
- 0x542A0003, // 00A1 LDINT R10 4
- 0x7C1C0600, // 00A2 CALL R7 3
- 0x80040E00, // 00A3 RET 1 R7
- 0x70020007, // 00A4 JMP #00AD
- 0x601C0003, // 00A5 GETGBL R7 G3
- 0x5C200000, // 00A6 MOVE R8 R0
- 0x7C1C0200, // 00A7 CALL R7 1
- 0x8C1C0F0E, // 00A8 GETMET R7 R7 K14
- 0x5C240200, // 00A9 MOVE R9 R1
- 0x5C280400, // 00AA MOVE R10 R2
- 0x7C1C0600, // 00AB CALL R7 3
- 0x80040E00, // 00AC RET 1 R7
- 0x80000000, // 00AD RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: onoff_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(attribute_updated),
- /* K1 */ be_const_int(0),
- }),
- be_str_weak(onoff_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x4C0C0000, // 0001 LDNIL R3
- 0x54120005, // 0002 LDINT R4 6
- 0x58140001, // 0003 LDCONST R5 K1
- 0x7C040800, // 0004 CALL R1 4
- 0x80000000, // 0005 RET 0
+ 0x541E0005, // 0005 LDINT R7 6
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E001B, // 0007 JMPF R7 #0024
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x70020010, // 0011 JMP #0023
+ 0x541EFFFB, // 0012 LDINT R7 65532
+ 0x1C1C0C07, // 0013 EQ R7 R6 R7
+ 0x781E0005, // 0014 JMPF R7 #001B
+ 0x8C1C0907, // 0015 GETMET R7 R4 K7
+ 0x8824090A, // 0016 GETMBR R9 R4 K10
+ 0x58280006, // 0017 LDCONST R10 K6
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x80040E00, // 0019 RET 1 R7
+ 0x70020007, // 001A JMP #0023
+ 0x541EFFFC, // 001B LDINT R7 65533
+ 0x1C1C0C07, // 001C EQ R7 R6 R7
+ 0x781E0004, // 001D JMPF R7 #0023
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x8824090A, // 001F GETMBR R9 R4 K10
+ 0x542A0003, // 0020 LDINT R10 4
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020007, // 0023 JMP #002C
+ 0x601C0003, // 0024 GETGBL R7 G3
+ 0x5C200000, // 0025 MOVE R8 R0
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x8C1C0F0B, // 0027 GETMET R7 R7 K11
+ 0x5C240200, // 0028 MOVE R9 R1
+ 0x5C280400, // 0029 MOVE R10 R2
+ 0x7C1C0600, // 002A CALL R7 3
+ 0x80040E00, // 002B RET 1 R7
+ 0x80000000, // 002C RET 0
})
)
);
@@ -610,45 +341,25 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
-extern const bclass be_class_Matter_Plugin;
+extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_OnOff,
2,
- &be_class_Matter_Plugin,
- be_nested_map(15,
+ &be_class_Matter_Plugin_Device,
+ be_nested_map(13,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(init, 8), be_const_closure(Matter_Plugin_OnOff_init_closure) },
- { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(ARG, 4), be_nested_str_weak(relay) },
+ { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(266, -1), be_const_int(2) },
- })) ) } )) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
- { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
- { be_const_key_weak(ARG_TYPE, 7), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
- { be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
- { be_const_key_weak(CLUSTERS, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
- be_const_map( * be_nested_map(4,
- ( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(3,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(65532),
- be_const_int(65533),
- })) ) } )) },
- { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(8,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(1),
- be_const_int(2),
- be_const_int(3),
- be_const_int(4),
- be_const_int(5),
- be_const_int(65532),
- be_const_int(65533),
- })) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
@@ -656,22 +367,13 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
- { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(4,
- ( (struct bvalue*) &(const bvalue[]) {
- be_const_int(0),
- be_const_int(1),
- be_const_int(65532),
- be_const_int(65533),
})) ) } )) },
+ { be_const_key_weak(set_onoff, 8), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
- { be_const_key_weak(ARG, 11), be_nested_str_weak(relay) },
- { be_const_key_weak(get_onoff, -1), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
- { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
- { be_const_key_weak(onoff_changed, -1), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
index 05e8ec97d..2e52225b9 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Root.h
@@ -45,7 +45,7 @@ be_local_closure(Matter_Plugin_Root_init, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
be_nested_proto(
- 13, /* nstack */
+ 12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@@ -53,7 +53,7 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -64,15 +64,14 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
/* K7 */ be_nested_str_weak(int64),
/* K8 */ be_nested_str_weak(_breadcrumb),
/* K9 */ be_nested_str_weak(attribute_updated),
- /* K10 */ be_nested_str_weak(endpoint),
- /* K11 */ be_nested_str_weak(status),
- /* K12 */ be_nested_str_weak(CONSTRAINT_ERROR),
- /* K13 */ be_const_int(1),
- /* K14 */ be_nested_str_weak(INVALID_ACTION),
+ /* K10 */ be_nested_str_weak(status),
+ /* K11 */ be_nested_str_weak(CONSTRAINT_ERROR),
+ /* K12 */ be_const_int(1),
+ /* K13 */ be_nested_str_weak(INVALID_ACTION),
}),
be_str_weak(write_attribute),
&be_const_str_solidified,
- ( &(const binstruction[102]) { /* code */
+ ( &(const binstruction[101]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -80,9 +79,9 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
0x881C0504, // 0004 GETMBR R7 R2 K4
0x5422002F, // 0005 LDINT R8 48
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x7822001A, // 0007 JMPF R8 #0023
+ 0x78220019, // 0007 JMPF R8 #0022
0x1C200F05, // 0008 EQ R8 R7 K5
- 0x78220017, // 0009 JMPF R8 #0022
+ 0x78220016, // 0009 JMPF R8 #0021
0x60200004, // 000A GETGBL R8 G4
0x5C240600, // 000B MOVE R9 R3
0x7C200200, // 000C CALL R8 1
@@ -92,89 +91,88 @@ be_local_closure(Matter_Plugin_Root_write_attribute, /* name */
0x5C240600, // 0010 MOVE R9 R3
0xB82A0E00, // 0011 GETNGBL R10 K7
0x7C200400, // 0012 CALL R8 2
- 0x78220008, // 0013 JMPF R8 #001D
+ 0x78220007, // 0013 JMPF R8 #001C
0x90061003, // 0014 SETMBR R1 K8 R3
0x8C200109, // 0015 GETMET R8 R0 K9
- 0x8828050A, // 0016 GETMBR R10 R2 K10
- 0x882C0503, // 0017 GETMBR R11 R2 K3
- 0x88300504, // 0018 GETMBR R12 R2 K4
- 0x7C200800, // 0019 CALL R8 4
- 0x50200200, // 001A LDBOOL R8 1 0
- 0x80041000, // 001B RET 1 R8
- 0x70020004, // 001C JMP #0022
- 0xB8220200, // 001D GETNGBL R8 K1
- 0x8820110C, // 001E GETMBR R8 R8 K12
- 0x900A1608, // 001F SETMBR R2 K11 R8
- 0x50200000, // 0020 LDBOOL R8 0 0
- 0x80041000, // 0021 RET 1 R8
- 0x70020041, // 0022 JMP #0065
- 0x5422001E, // 0023 LDINT R8 31
- 0x1C200C08, // 0024 EQ R8 R6 R8
- 0x78220004, // 0025 JMPF R8 #002B
- 0x1C200F05, // 0026 EQ R8 R7 K5
- 0x78220001, // 0027 JMPF R8 #002A
- 0x50200200, // 0028 LDBOOL R8 1 0
- 0x80041000, // 0029 RET 1 R8
- 0x70020039, // 002A JMP #0065
- 0x54220027, // 002B LDINT R8 40
- 0x1C200C08, // 002C EQ R8 R6 R8
- 0x7822000B, // 002D JMPF R8 #003A
- 0x54220004, // 002E LDINT R8 5
- 0x1C200E08, // 002F EQ R8 R7 R8
- 0x78220002, // 0030 JMPF R8 #0034
- 0x50200200, // 0031 LDBOOL R8 1 0
- 0x80041000, // 0032 RET 1 R8
- 0x70020004, // 0033 JMP #0039
- 0x54220005, // 0034 LDINT R8 6
- 0x1C200E08, // 0035 EQ R8 R7 R8
- 0x78220001, // 0036 JMPF R8 #0039
- 0x50200200, // 0037 LDBOOL R8 1 0
- 0x80041000, // 0038 RET 1 R8
- 0x7002002A, // 0039 JMP #0065
- 0x54220029, // 003A LDINT R8 42
- 0x1C200C08, // 003B EQ R8 R6 R8
- 0x78220004, // 003C JMPF R8 #0042
- 0x1C200F05, // 003D EQ R8 R7 K5
- 0x78220001, // 003E JMPF R8 #0041
- 0x50200200, // 003F LDBOOL R8 1 0
- 0x80041000, // 0040 RET 1 R8
- 0x70020022, // 0041 JMP #0065
- 0x5422002A, // 0042 LDINT R8 43
- 0x1C200C08, // 0043 EQ R8 R6 R8
- 0x78220007, // 0044 JMPF R8 #004D
- 0x1C200F05, // 0045 EQ R8 R7 K5
- 0x78220004, // 0046 JMPF R8 #004C
- 0xB8220200, // 0047 GETNGBL R8 K1
- 0x8820110C, // 0048 GETMBR R8 R8 K12
- 0x900A1608, // 0049 SETMBR R2 K11 R8
- 0x50200000, // 004A LDBOOL R8 0 0
- 0x80041000, // 004B RET 1 R8
- 0x70020017, // 004C JMP #0065
- 0x5422002B, // 004D LDINT R8 44
- 0x1C200C08, // 004E EQ R8 R6 R8
- 0x78220009, // 004F JMPF R8 #005A
- 0x1C200F05, // 0050 EQ R8 R7 K5
- 0x78220002, // 0051 JMPF R8 #0055
- 0x50200200, // 0052 LDBOOL R8 1 0
- 0x80041000, // 0053 RET 1 R8
- 0x70020003, // 0054 JMP #0059
- 0x1C200F0D, // 0055 EQ R8 R7 K13
- 0x78220001, // 0056 JMPF R8 #0059
- 0x50200200, // 0057 LDBOOL R8 1 0
- 0x80041000, // 0058 RET 1 R8
- 0x7002000A, // 0059 JMP #0065
- 0x54220030, // 005A LDINT R8 49
- 0x1C200C08, // 005B EQ R8 R6 R8
- 0x78220007, // 005C JMPF R8 #0065
- 0x54220003, // 005D LDINT R8 4
- 0x1C200E08, // 005E EQ R8 R7 R8
- 0x78220004, // 005F JMPF R8 #0065
- 0xB8220200, // 0060 GETNGBL R8 K1
- 0x8820110E, // 0061 GETMBR R8 R8 K14
- 0x900A1608, // 0062 SETMBR R2 K11 R8
- 0x50200000, // 0063 LDBOOL R8 0 0
- 0x80041000, // 0064 RET 1 R8
- 0x80000000, // 0065 RET 0
+ 0x88280503, // 0016 GETMBR R10 R2 K3
+ 0x882C0504, // 0017 GETMBR R11 R2 K4
+ 0x7C200600, // 0018 CALL R8 3
+ 0x50200200, // 0019 LDBOOL R8 1 0
+ 0x80041000, // 001A RET 1 R8
+ 0x70020004, // 001B JMP #0021
+ 0xB8220200, // 001C GETNGBL R8 K1
+ 0x8820110B, // 001D GETMBR R8 R8 K11
+ 0x900A1408, // 001E SETMBR R2 K10 R8
+ 0x50200000, // 001F LDBOOL R8 0 0
+ 0x80041000, // 0020 RET 1 R8
+ 0x70020041, // 0021 JMP #0064
+ 0x5422001E, // 0022 LDINT R8 31
+ 0x1C200C08, // 0023 EQ R8 R6 R8
+ 0x78220004, // 0024 JMPF R8 #002A
+ 0x1C200F05, // 0025 EQ R8 R7 K5
+ 0x78220001, // 0026 JMPF R8 #0029
+ 0x50200200, // 0027 LDBOOL R8 1 0
+ 0x80041000, // 0028 RET 1 R8
+ 0x70020039, // 0029 JMP #0064
+ 0x54220027, // 002A LDINT R8 40
+ 0x1C200C08, // 002B EQ R8 R6 R8
+ 0x7822000B, // 002C JMPF R8 #0039
+ 0x54220004, // 002D LDINT R8 5
+ 0x1C200E08, // 002E EQ R8 R7 R8
+ 0x78220002, // 002F JMPF R8 #0033
+ 0x50200200, // 0030 LDBOOL R8 1 0
+ 0x80041000, // 0031 RET 1 R8
+ 0x70020004, // 0032 JMP #0038
+ 0x54220005, // 0033 LDINT R8 6
+ 0x1C200E08, // 0034 EQ R8 R7 R8
+ 0x78220001, // 0035 JMPF R8 #0038
+ 0x50200200, // 0036 LDBOOL R8 1 0
+ 0x80041000, // 0037 RET 1 R8
+ 0x7002002A, // 0038 JMP #0064
+ 0x54220029, // 0039 LDINT R8 42
+ 0x1C200C08, // 003A EQ R8 R6 R8
+ 0x78220004, // 003B JMPF R8 #0041
+ 0x1C200F05, // 003C EQ R8 R7 K5
+ 0x78220001, // 003D JMPF R8 #0040
+ 0x50200200, // 003E LDBOOL R8 1 0
+ 0x80041000, // 003F RET 1 R8
+ 0x70020022, // 0040 JMP #0064
+ 0x5422002A, // 0041 LDINT R8 43
+ 0x1C200C08, // 0042 EQ R8 R6 R8
+ 0x78220007, // 0043 JMPF R8 #004C
+ 0x1C200F05, // 0044 EQ R8 R7 K5
+ 0x78220004, // 0045 JMPF R8 #004B
+ 0xB8220200, // 0046 GETNGBL R8 K1
+ 0x8820110B, // 0047 GETMBR R8 R8 K11
+ 0x900A1408, // 0048 SETMBR R2 K10 R8
+ 0x50200000, // 0049 LDBOOL R8 0 0
+ 0x80041000, // 004A RET 1 R8
+ 0x70020017, // 004B JMP #0064
+ 0x5422002B, // 004C LDINT R8 44
+ 0x1C200C08, // 004D EQ R8 R6 R8
+ 0x78220009, // 004E JMPF R8 #0059
+ 0x1C200F05, // 004F EQ R8 R7 K5
+ 0x78220002, // 0050 JMPF R8 #0054
+ 0x50200200, // 0051 LDBOOL R8 1 0
+ 0x80041000, // 0052 RET 1 R8
+ 0x70020003, // 0053 JMP #0058
+ 0x1C200F0C, // 0054 EQ R8 R7 K12
+ 0x78220001, // 0055 JMPF R8 #0058
+ 0x50200200, // 0056 LDBOOL R8 1 0
+ 0x80041000, // 0057 RET 1 R8
+ 0x7002000A, // 0058 JMP #0064
+ 0x54220030, // 0059 LDINT R8 49
+ 0x1C200C08, // 005A EQ R8 R6 R8
+ 0x78220007, // 005B JMPF R8 #0064
+ 0x54220003, // 005C LDINT R8 4
+ 0x1C200E08, // 005D EQ R8 R7 R8
+ 0x78220004, // 005E JMPF R8 #0064
+ 0xB8220200, // 005F GETNGBL R8 K1
+ 0x8820110D, // 0060 GETMBR R8 R8 K13
+ 0x900A1408, // 0061 SETMBR R2 K10 R8
+ 0x50200000, // 0062 LDBOOL R8 0 0
+ 0x80041000, // 0063 RET 1 R8
+ 0x80000000, // 0064 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
index f91cef2c8..53e80ddfa 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
@@ -101,7 +101,7 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
/* K1 */ be_nested_str_weak(pre_value),
/* K2 */ be_nested_str_weak(match),
/* K3 */ be_nested_str_weak(shadow_value),
- /* K4 */ be_nested_str_weak(valued_changed),
+ /* K4 */ be_nested_str_weak(value_changed),
}),
be_str_weak(parse_sensors),
&be_const_str_solidified,
@@ -134,9 +134,9 @@ be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
/********************************************************************
-** Solidified function: valued_changed
+** Solidified function: value_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
@@ -147,7 +147,7 @@ be_local_closure(Matter_Plugin_Sensor_valued_changed, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(valued_changed),
+ be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
@@ -171,7 +171,7 @@ be_local_class(Matter_Plugin_Sensor,
{ be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) },
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_valued_changed_closure) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) },
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
})),
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
index 57146e067..995146e41 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
@@ -145,11 +145,11 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
/********************************************************************
-** Solidified function: valued_changed
+** Solidified function: value_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */
be_nested_proto(
- 7, /* nstack */
+ 6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -161,15 +161,14 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_valued_changed, /* name */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
- be_str_weak(valued_changed),
+ be_str_weak(value_changed),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160404, // 0002 LDINT R5 1029
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
+ 0x54120404, // 0001 LDINT R4 1029
+ 0x58140001, // 0002 LDCONST R5 K1
+ 0x7C080600, // 0003 CALL R2 3
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -186,7 +185,7 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
- { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
+ { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -200,14 +199,14 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPE, 6), be_nested_str_weak(humidity) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
index 1ac6a351d..13650c269 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
@@ -144,11 +144,11 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
/********************************************************************
-** Solidified function: valued_changed
+** Solidified function: value_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */
be_nested_proto(
- 7, /* nstack */
+ 6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -160,15 +160,14 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_valued_changed, /* name */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
- be_str_weak(valued_changed),
+ be_str_weak(value_changed),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x541603FF, // 0002 LDINT R5 1024
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
+ 0x541203FF, // 0001 LDINT R4 1024
+ 0x58140001, // 0002 LDCONST R5 K1
+ 0x7C080600, // 0003 CALL R2 3
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -185,7 +184,7 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
- { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
+ { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -199,14 +198,14 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPE, 6), be_nested_str_weak(illuminance) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Illuminance)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
index d0e8aa69d..c36f76084 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
@@ -144,11 +144,11 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
/********************************************************************
-** Solidified function: valued_changed
+** Solidified function: value_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */
be_nested_proto(
- 7, /* nstack */
+ 6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -160,15 +160,14 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_valued_changed, /* name */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
- be_str_weak(valued_changed),
+ be_str_weak(value_changed),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160402, // 0002 LDINT R5 1027
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
+ 0x54120402, // 0001 LDINT R4 1027
+ 0x58140001, // 0002 LDCONST R5 K1
+ 0x7C080600, // 0003 CALL R2 3
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -185,7 +184,7 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
- { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
+ { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -199,14 +198,14 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPE, 6), be_nested_str_weak(pressure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
index 48e76493a..4fdf3b743 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
@@ -142,11 +142,11 @@ be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
/********************************************************************
-** Solidified function: valued_changed
+** Solidified function: value_changed
********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
+be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */
be_nested_proto(
- 7, /* nstack */
+ 6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -158,15 +158,14 @@ be_local_closure(Matter_Plugin_Sensor_Temp_valued_changed, /* name */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
- be_str_weak(valued_changed),
+ be_str_weak(value_changed),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
+ ( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
- 0x4C100000, // 0001 LDNIL R4
- 0x54160401, // 0002 LDINT R5 1026
- 0x58180001, // 0003 LDCONST R6 K1
- 0x7C080800, // 0004 CALL R2 4
- 0x80000000, // 0005 RET 0
+ 0x54120401, // 0001 LDINT R4 1026
+ 0x58140001, // 0002 LDCONST R5 K1
+ 0x7C080600, // 0003 CALL R2 3
+ 0x80000000, // 0004 RET 0
})
)
);
@@ -183,7 +182,7 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
- { be_const_key_weak(pre_value, 5), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
+ { be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -197,14 +196,14 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(TYPES, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(TYPE, 6), be_nested_str_weak(temperature) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_closure) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
- { be_const_key_weak(valued_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_valued_changed_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
new file mode 100644
index 000000000..bdf05f9db
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
@@ -0,0 +1,710 @@
+/* Solidification of Matter_Plugin_Shutter.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Shutter;
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040009, // 0000 GETGBL R1 G9
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[19]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U1),
+ /* K9 */ be_nested_str_weak(U2),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_nested_str_weak(shadow_shutter_pos),
+ /* K12 */ be_nested_str_weak(shadow_shutter_tilt),
+ /* K13 */ be_nested_str_weak(shadow_shutter_direction),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(shadow_shutter_target),
+ /* K16 */ be_nested_str_weak(U4),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[186]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0101, // 0005 LDINT R7 258
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E00A8, // 0007 JMPF R7 #00B1
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x542A00FE, // 000E LDINT R10 255
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x7002009D, // 0011 JMP #00B0
+ 0x541E0004, // 0012 LDINT R7 5
+ 0x1C1C0C07, // 0013 EQ R7 R6 R7
+ 0x781E0005, // 0014 JMPF R7 #001B
+ 0x8C1C0907, // 0015 GETMET R7 R4 K7
+ 0x88240909, // 0016 GETMBR R9 R4 K9
+ 0x58280006, // 0017 LDCONST R10 K6
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x80040E00, // 0019 RET 1 R7
+ 0x70020094, // 001A JMP #00B0
+ 0x541E0005, // 001B LDINT R7 6
+ 0x1C1C0C07, // 001C EQ R7 R6 R7
+ 0x781E0005, // 001D JMPF R7 #0024
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x88240909, // 001F GETMBR R9 R4 K9
+ 0x58280006, // 0020 LDCONST R10 K6
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x7002008B, // 0023 JMP #00B0
+ 0x541E0006, // 0024 LDINT R7 7
+ 0x1C1C0C07, // 0025 EQ R7 R6 R7
+ 0x781E0008, // 0026 JMPF R7 #0030
+ 0x8C1C0907, // 0027 GETMET R7 R4 K7
+ 0x88240908, // 0028 GETMBR R9 R4 K8
+ 0x542A0007, // 0029 LDINT R10 8
+ 0x002A140A, // 002A ADD R10 K10 R10
+ 0x542E000F, // 002B LDINT R11 16
+ 0x0028140B, // 002C ADD R10 R10 R11
+ 0x7C1C0600, // 002D CALL R7 3
+ 0x80040E00, // 002E RET 1 R7
+ 0x7002007F, // 002F JMP #00B0
+ 0x541E000C, // 0030 LDINT R7 13
+ 0x1C1C0C07, // 0031 EQ R7 R6 R7
+ 0x781E0005, // 0032 JMPF R7 #0039
+ 0x8C1C0907, // 0033 GETMET R7 R4 K7
+ 0x88240908, // 0034 GETMBR R9 R4 K8
+ 0x542A00FE, // 0035 LDINT R10 255
+ 0x7C1C0600, // 0036 CALL R7 3
+ 0x80040E00, // 0037 RET 1 R7
+ 0x70020076, // 0038 JMP #00B0
+ 0x541E0007, // 0039 LDINT R7 8
+ 0x1C1C0C07, // 003A EQ R7 R6 R7
+ 0x781E0007, // 003B JMPF R7 #0044
+ 0x8C1C0907, // 003C GETMET R7 R4 K7
+ 0x88240909, // 003D GETMBR R9 R4 K9
+ 0x542A0063, // 003E LDINT R10 100
+ 0x882C010B, // 003F GETMBR R11 R0 K11
+ 0x0428140B, // 0040 SUB R10 R10 R11
+ 0x7C1C0600, // 0041 CALL R7 3
+ 0x80040E00, // 0042 RET 1 R7
+ 0x7002006B, // 0043 JMP #00B0
+ 0x541E000D, // 0044 LDINT R7 14
+ 0x1C1C0C07, // 0045 EQ R7 R6 R7
+ 0x781E0009, // 0046 JMPF R7 #0051
+ 0x8C1C0907, // 0047 GETMET R7 R4 K7
+ 0x88240909, // 0048 GETMBR R9 R4 K9
+ 0x542A0063, // 0049 LDINT R10 100
+ 0x882C010B, // 004A GETMBR R11 R0 K11
+ 0x0428140B, // 004B SUB R10 R10 R11
+ 0x542E0063, // 004C LDINT R11 100
+ 0x0828140B, // 004D MUL R10 R10 R11
+ 0x7C1C0600, // 004E CALL R7 3
+ 0x80040E00, // 004F RET 1 R7
+ 0x7002005E, // 0050 JMP #00B0
+ 0x541E0008, // 0051 LDINT R7 9
+ 0x1C1C0C07, // 0052 EQ R7 R6 R7
+ 0x781E0007, // 0053 JMPF R7 #005C
+ 0x8C1C0907, // 0054 GETMET R7 R4 K7
+ 0x88240909, // 0055 GETMBR R9 R4 K9
+ 0x542A0063, // 0056 LDINT R10 100
+ 0x882C010C, // 0057 GETMBR R11 R0 K12
+ 0x0428140B, // 0058 SUB R10 R10 R11
+ 0x7C1C0600, // 0059 CALL R7 3
+ 0x80040E00, // 005A RET 1 R7
+ 0x70020053, // 005B JMP #00B0
+ 0x541E000E, // 005C LDINT R7 15
+ 0x1C1C0C07, // 005D EQ R7 R6 R7
+ 0x781E0009, // 005E JMPF R7 #0069
+ 0x8C1C0907, // 005F GETMET R7 R4 K7
+ 0x88240909, // 0060 GETMBR R9 R4 K9
+ 0x542A0063, // 0061 LDINT R10 100
+ 0x882C010C, // 0062 GETMBR R11 R0 K12
+ 0x0428140B, // 0063 SUB R10 R10 R11
+ 0x542E0063, // 0064 LDINT R11 100
+ 0x0828140B, // 0065 MUL R10 R10 R11
+ 0x7C1C0600, // 0066 CALL R7 3
+ 0x80040E00, // 0067 RET 1 R7
+ 0x70020046, // 0068 JMP #00B0
+ 0x541E0009, // 0069 LDINT R7 10
+ 0x1C1C0C07, // 006A EQ R7 R6 R7
+ 0x781E0010, // 006B JMPF R7 #007D
+ 0x881C010D, // 006C GETMBR R7 R0 K13
+ 0x1C1C0F06, // 006D EQ R7 R7 K6
+ 0x781E0001, // 006E JMPF R7 #0071
+ 0x581C0006, // 006F LDCONST R7 K6
+ 0x70020005, // 0070 JMP #0077
+ 0x881C010D, // 0071 GETMBR R7 R0 K13
+ 0x241C0F06, // 0072 GT R7 R7 K6
+ 0x781E0001, // 0073 JMPF R7 #0076
+ 0x581C000A, // 0074 LDCONST R7 K10
+ 0x70020000, // 0075 JMP #0077
+ 0x581C000E, // 0076 LDCONST R7 K14
+ 0x8C200907, // 0077 GETMET R8 R4 K7
+ 0x88280908, // 0078 GETMBR R10 R4 K8
+ 0x5C2C0E00, // 0079 MOVE R11 R7
+ 0x7C200600, // 007A CALL R8 3
+ 0x80041000, // 007B RET 1 R8
+ 0x70020032, // 007C JMP #00B0
+ 0x541E000A, // 007D LDINT R7 11
+ 0x1C1C0C07, // 007E EQ R7 R6 R7
+ 0x781E0009, // 007F JMPF R7 #008A
+ 0x8C1C0907, // 0080 GETMET R7 R4 K7
+ 0x88240909, // 0081 GETMBR R9 R4 K9
+ 0x542A0063, // 0082 LDINT R10 100
+ 0x882C010F, // 0083 GETMBR R11 R0 K15
+ 0x0428140B, // 0084 SUB R10 R10 R11
+ 0x542E0063, // 0085 LDINT R11 100
+ 0x0828140B, // 0086 MUL R10 R10 R11
+ 0x7C1C0600, // 0087 CALL R7 3
+ 0x80040E00, // 0088 RET 1 R7
+ 0x70020025, // 0089 JMP #00B0
+ 0x541E000B, // 008A LDINT R7 12
+ 0x1C1C0C07, // 008B EQ R7 R6 R7
+ 0x781E0005, // 008C JMPF R7 #0093
+ 0x8C1C0907, // 008D GETMET R7 R4 K7
+ 0x88240908, // 008E GETMBR R9 R4 K8
+ 0x58280006, // 008F LDCONST R10 K6
+ 0x7C1C0600, // 0090 CALL R7 3
+ 0x80040E00, // 0091 RET 1 R7
+ 0x7002001C, // 0092 JMP #00B0
+ 0x541E0016, // 0093 LDINT R7 23
+ 0x1C1C0C07, // 0094 EQ R7 R6 R7
+ 0x781E0005, // 0095 JMPF R7 #009C
+ 0x8C1C0907, // 0096 GETMET R7 R4 K7
+ 0x88240908, // 0097 GETMBR R9 R4 K8
+ 0x58280006, // 0098 LDCONST R10 K6
+ 0x7C1C0600, // 0099 CALL R7 3
+ 0x80040E00, // 009A RET 1 R7
+ 0x70020013, // 009B JMP #00B0
+ 0x541EFFFB, // 009C LDINT R7 65532
+ 0x1C1C0C07, // 009D EQ R7 R6 R7
+ 0x781E0008, // 009E JMPF R7 #00A8
+ 0x8C1C0907, // 009F GETMET R7 R4 K7
+ 0x88240910, // 00A0 GETMBR R9 R4 K16
+ 0x542A0003, // 00A1 LDINT R10 4
+ 0x002A220A, // 00A2 ADD R10 K17 R10
+ 0x542E000F, // 00A3 LDINT R11 16
+ 0x0028140B, // 00A4 ADD R10 R10 R11
+ 0x7C1C0600, // 00A5 CALL R7 3
+ 0x80040E00, // 00A6 RET 1 R7
+ 0x70020007, // 00A7 JMP #00B0
+ 0x541EFFFC, // 00A8 LDINT R7 65533
+ 0x1C1C0C07, // 00A9 EQ R7 R6 R7
+ 0x781E0004, // 00AA JMPF R7 #00B0
+ 0x8C1C0907, // 00AB GETMET R7 R4 K7
+ 0x88240910, // 00AC GETMBR R9 R4 K16
+ 0x542A0004, // 00AD LDINT R10 5
+ 0x7C1C0600, // 00AE CALL R7 3
+ 0x80040E00, // 00AF RET 1 R7
+ 0x70020007, // 00B0 JMP #00B9
+ 0x601C0003, // 00B1 GETGBL R7 G3
+ 0x5C200000, // 00B2 MOVE R8 R0
+ 0x7C1C0200, // 00B3 CALL R7 1
+ 0x8C1C0F12, // 00B4 GETMET R7 R7 K18
+ 0x5C240200, // 00B5 MOVE R9 R1
+ 0x5C280400, // 00B6 MOVE R10 R2
+ 0x7C1C0600, // 00B7 CALL R7 3
+ 0x80040E00, // 00B8 RET 1 R7
+ 0x80000000, // 00B9 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(ARG),
+ /* K4 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[18]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x8C100702, // 0008 GETMET R4 R3 K2
+ 0x88180103, // 0009 GETMBR R6 R0 K3
+ 0x7C100400, // 000A CALL R4 2
+ 0x90020204, // 000B SETMBR R0 K1 R4
+ 0x88100101, // 000C GETMBR R4 R0 K1
+ 0x4C140000, // 000D LDNIL R5
+ 0x1C100805, // 000E EQ R4 R4 R5
+ 0x78120000, // 000F JMPF R4 #0011
+ 0x90020304, // 0010 SETMBR R0 K1 K4
+ 0x80000000, // 0011 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(cmd),
+ /* K2 */ be_nested_str_weak(ShutterPosition),
+ /* K3 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K4 */ be_const_int(1),
+ /* K5 */ be_nested_str_weak(parse_sensors),
+ /* K6 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[19]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x600C0008, // 0002 GETGBL R3 G8
+ 0x88100103, // 0003 GETMBR R4 R0 K3
+ 0x00100904, // 0004 ADD R4 R4 K4
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x000E0403, // 0006 ADD R3 K2 R3
+ 0x50100200, // 0007 LDBOOL R4 1 0
+ 0x7C040600, // 0008 CALL R1 3
+ 0x78060002, // 0009 JMPF R1 #000D
+ 0x8C080105, // 000A GETMET R2 R0 K5
+ 0x5C100200, // 000B MOVE R4 R1
+ 0x7C080400, // 000C CALL R2 2
+ 0x60080003, // 000D GETGBL R2 G3
+ 0x5C0C0000, // 000E MOVE R3 R0
+ 0x7C080200, // 000F CALL R2 1
+ 0x8C080506, // 0010 GETMET R2 R2 K6
+ 0x7C080200, // 0011 CALL R2 1
+ 0x80000000, // 0012 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[24]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(command),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(tasmota),
+ /* K8 */ be_nested_str_weak(cmd),
+ /* K9 */ be_nested_str_weak(ShutterStopOpen),
+ /* K10 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K11 */ be_const_int(1),
+ /* K12 */ be_nested_str_weak(update_shadow),
+ /* K13 */ be_nested_str_weak(ShutterStopClose),
+ /* K14 */ be_const_int(2),
+ /* K15 */ be_nested_str_weak(ShutterStop),
+ /* K16 */ be_nested_str_weak(log),
+ /* K17 */ be_nested_str_weak(MTR_X3A_X20Tilt_X20_X3D_X20),
+ /* K18 */ be_nested_str_weak(findsubval),
+ /* K19 */ be_nested_str_weak(ShutterStopPosition),
+ /* K20 */ be_nested_str_weak(_X20),
+ /* K21 */ be_nested_str_weak(pos_X25_X3A),
+ /* K22 */ be_nested_str_weak(tilt_X25_X3A),
+ /* K23 */ be_nested_str_weak(invoke_request),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[131]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xB8160200, // 0001 GETNGBL R5 K1
+ 0x88140B02, // 0002 GETMBR R5 R5 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x881C0704, // 0004 GETMBR R7 R3 K4
+ 0x54220101, // 0005 LDINT R8 258
+ 0x1C200C08, // 0006 EQ R8 R6 R8
+ 0x78220070, // 0007 JMPF R8 #0079
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x1C200F06, // 000A EQ R8 R7 K6
+ 0x7822000D, // 000B JMPF R8 #001A
+ 0xB8220E00, // 000C GETNGBL R8 K7
+ 0x8C201108, // 000D GETMET R8 R8 K8
+ 0x60280008, // 000E GETGBL R10 G8
+ 0x882C010A, // 000F GETMBR R11 R0 K10
+ 0x002C170B, // 0010 ADD R11 R11 K11
+ 0x7C280200, // 0011 CALL R10 1
+ 0x002A120A, // 0012 ADD R10 K9 R10
+ 0x502C0200, // 0013 LDBOOL R11 1 0
+ 0x7C200600, // 0014 CALL R8 3
+ 0x8C20010C, // 0015 GETMET R8 R0 K12
+ 0x7C200200, // 0016 CALL R8 1
+ 0x50200200, // 0017 LDBOOL R8 1 0
+ 0x80041000, // 0018 RET 1 R8
+ 0x7002005D, // 0019 JMP #0078
+ 0x1C200F0B, // 001A EQ R8 R7 K11
+ 0x7822000D, // 001B JMPF R8 #002A
+ 0xB8220E00, // 001C GETNGBL R8 K7
+ 0x8C201108, // 001D GETMET R8 R8 K8
+ 0x60280008, // 001E GETGBL R10 G8
+ 0x882C010A, // 001F GETMBR R11 R0 K10
+ 0x002C170B, // 0020 ADD R11 R11 K11
+ 0x7C280200, // 0021 CALL R10 1
+ 0x002A1A0A, // 0022 ADD R10 K13 R10
+ 0x502C0200, // 0023 LDBOOL R11 1 0
+ 0x7C200600, // 0024 CALL R8 3
+ 0x8C20010C, // 0025 GETMET R8 R0 K12
+ 0x7C200200, // 0026 CALL R8 1
+ 0x50200200, // 0027 LDBOOL R8 1 0
+ 0x80041000, // 0028 RET 1 R8
+ 0x7002004D, // 0029 JMP #0078
+ 0x1C200F0E, // 002A EQ R8 R7 K14
+ 0x7822000D, // 002B JMPF R8 #003A
+ 0xB8220E00, // 002C GETNGBL R8 K7
+ 0x8C201108, // 002D GETMET R8 R8 K8
+ 0x60280008, // 002E GETGBL R10 G8
+ 0x882C010A, // 002F GETMBR R11 R0 K10
+ 0x002C170B, // 0030 ADD R11 R11 K11
+ 0x7C280200, // 0031 CALL R10 1
+ 0x002A1E0A, // 0032 ADD R10 K15 R10
+ 0x502C0200, // 0033 LDBOOL R11 1 0
+ 0x7C200600, // 0034 CALL R8 3
+ 0x8C20010C, // 0035 GETMET R8 R0 K12
+ 0x7C200200, // 0036 CALL R8 1
+ 0x50200200, // 0037 LDBOOL R8 1 0
+ 0x80041000, // 0038 RET 1 R8
+ 0x7002003D, // 0039 JMP #0078
+ 0x54220004, // 003A LDINT R8 5
+ 0x1C200E08, // 003B EQ R8 R7 R8
+ 0x78220028, // 003C JMPF R8 #0066
+ 0xB8220E00, // 003D GETNGBL R8 K7
+ 0x8C201110, // 003E GETMET R8 R8 K16
+ 0x60280008, // 003F GETGBL R10 G8
+ 0x5C2C0400, // 0040 MOVE R11 R2
+ 0x7C280200, // 0041 CALL R10 1
+ 0x002A220A, // 0042 ADD R10 K17 R10
+ 0x582C000E, // 0043 LDCONST R11 K14
+ 0x7C200600, // 0044 CALL R8 3
+ 0x8C200512, // 0045 GETMET R8 R2 K18
+ 0x58280006, // 0046 LDCONST R10 K6
+ 0x7C200400, // 0047 CALL R8 2
+ 0x4C240000, // 0048 LDNIL R9
+ 0x20241009, // 0049 NE R9 R8 R9
+ 0x78260017, // 004A JMPF R9 #0063
+ 0x54260063, // 004B LDINT R9 100
+ 0x0C201009, // 004C DIV R8 R8 R9
+ 0xB8260E00, // 004D GETNGBL R9 K7
+ 0x8C241308, // 004E GETMET R9 R9 K8
+ 0x602C0008, // 004F GETGBL R11 G8
+ 0x8830010A, // 0050 GETMBR R12 R0 K10
+ 0x0030190B, // 0051 ADD R12 R12 K11
+ 0x7C2C0200, // 0052 CALL R11 1
+ 0x002E260B, // 0053 ADD R11 K19 R11
+ 0x002C1714, // 0054 ADD R11 R11 K20
+ 0x60300008, // 0055 GETGBL R12 G8
+ 0x54360063, // 0056 LDINT R13 100
+ 0x04341A08, // 0057 SUB R13 R13 R8
+ 0x7C300200, // 0058 CALL R12 1
+ 0x002C160C, // 0059 ADD R11 R11 R12
+ 0x50300200, // 005A LDBOOL R12 1 0
+ 0x7C240600, // 005B CALL R9 3
+ 0x60240008, // 005C GETGBL R9 G8
+ 0x5C281000, // 005D MOVE R10 R8
+ 0x7C240200, // 005E CALL R9 1
+ 0x00262A09, // 005F ADD R9 K21 R9
+ 0x900E2009, // 0060 SETMBR R3 K16 R9
+ 0x8C24010C, // 0061 GETMET R9 R0 K12
+ 0x7C240200, // 0062 CALL R9 1
+ 0x50240200, // 0063 LDBOOL R9 1 0
+ 0x80041200, // 0064 RET 1 R9
+ 0x70020011, // 0065 JMP #0078
+ 0x54220007, // 0066 LDINT R8 8
+ 0x1C200E08, // 0067 EQ R8 R7 R8
+ 0x7822000E, // 0068 JMPF R8 #0078
+ 0x8C200512, // 0069 GETMET R8 R2 K18
+ 0x58280006, // 006A LDCONST R10 K6
+ 0x7C200400, // 006B CALL R8 2
+ 0x4C240000, // 006C LDNIL R9
+ 0x20241009, // 006D NE R9 R8 R9
+ 0x78260006, // 006E JMPF R9 #0076
+ 0x54260009, // 006F LDINT R9 10
+ 0x0C201009, // 0070 DIV R8 R8 R9
+ 0x60240008, // 0071 GETGBL R9 G8
+ 0x5C281000, // 0072 MOVE R10 R8
+ 0x7C240200, // 0073 CALL R9 1
+ 0x00262C09, // 0074 ADD R9 K22 R9
+ 0x900E2009, // 0075 SETMBR R3 K16 R9
+ 0x50240200, // 0076 LDBOOL R9 1 0
+ 0x80041200, // 0077 RET 1 R9
+ 0x70020008, // 0078 JMP #0082
+ 0x60200003, // 0079 GETGBL R8 G3
+ 0x5C240000, // 007A MOVE R9 R0
+ 0x7C200200, // 007B CALL R8 1
+ 0x8C201117, // 007C GETMET R8 R8 K23
+ 0x5C280200, // 007D MOVE R10 R1
+ 0x5C2C0400, // 007E MOVE R11 R2
+ 0x5C300600, // 007F MOVE R12 R3
+ 0x7C200800, // 0080 CALL R8 4
+ 0x80041000, // 0081 RET 1 R8
+ 0x80000000, // 0082 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(Shutter),
+ /* K2 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_nested_str_weak(contains),
+ /* K5 */ be_nested_str_weak(find),
+ /* K6 */ be_nested_str_weak(Position),
+ /* K7 */ be_nested_str_weak(shadow_shutter_pos),
+ /* K8 */ be_nested_str_weak(attribute_updated),
+ /* K9 */ be_nested_str_weak(Tilt),
+ /* K10 */ be_nested_str_weak(shadow_shutter_tilt),
+ /* K11 */ be_nested_str_weak(Direction),
+ /* K12 */ be_nested_str_weak(shadow_shutter_direction),
+ /* K13 */ be_nested_str_weak(Target),
+ /* K14 */ be_nested_str_weak(shadow_shutter_target),
+ }),
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[68]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x600C0008, // 0001 GETGBL R3 G8
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x00100903, // 0003 ADD R4 R4 K3
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x000E0203, // 0005 ADD R3 K1 R3
+ 0x8C100304, // 0006 GETMET R4 R1 K4
+ 0x5C180600, // 0007 MOVE R6 R3
+ 0x7C100400, // 0008 CALL R4 2
+ 0x78120038, // 0009 JMPF R4 #0043
+ 0x94100203, // 000A GETIDX R4 R1 R3
+ 0x8C140905, // 000B GETMET R5 R4 K5
+ 0x581C0006, // 000C LDCONST R7 K6
+ 0x7C140400, // 000D CALL R5 2
+ 0x4C180000, // 000E LDNIL R6
+ 0x20180A06, // 000F NE R6 R5 R6
+ 0x781A0007, // 0010 JMPF R6 #0019
+ 0x88180107, // 0011 GETMBR R6 R0 K7
+ 0x20180A06, // 0012 NE R6 R5 R6
+ 0x781A0003, // 0013 JMPF R6 #0018
+ 0x8C180108, // 0014 GETMET R6 R0 K8
+ 0x54220101, // 0015 LDINT R8 258
+ 0x5426000D, // 0016 LDINT R9 14
+ 0x7C180600, // 0017 CALL R6 3
+ 0x90020E05, // 0018 SETMBR R0 K7 R5
+ 0x8C180905, // 0019 GETMET R6 R4 K5
+ 0x58200009, // 001A LDCONST R8 K9
+ 0x7C180400, // 001B CALL R6 2
+ 0x4C1C0000, // 001C LDNIL R7
+ 0x201C0C07, // 001D NE R7 R6 R7
+ 0x781E0007, // 001E JMPF R7 #0027
+ 0x881C010A, // 001F GETMBR R7 R0 K10
+ 0x201C0C07, // 0020 NE R7 R6 R7
+ 0x781E0003, // 0021 JMPF R7 #0026
+ 0x8C1C0108, // 0022 GETMET R7 R0 K8
+ 0x54260101, // 0023 LDINT R9 258
+ 0x542A000E, // 0024 LDINT R10 15
+ 0x7C1C0600, // 0025 CALL R7 3
+ 0x90021406, // 0026 SETMBR R0 K10 R6
+ 0x8C1C0905, // 0027 GETMET R7 R4 K5
+ 0x5824000B, // 0028 LDCONST R9 K11
+ 0x7C1C0400, // 0029 CALL R7 2
+ 0x4C200000, // 002A LDNIL R8
+ 0x20200E08, // 002B NE R8 R7 R8
+ 0x78220007, // 002C JMPF R8 #0035
+ 0x8820010C, // 002D GETMBR R8 R0 K12
+ 0x20200E08, // 002E NE R8 R7 R8
+ 0x78220003, // 002F JMPF R8 #0034
+ 0x8C200108, // 0030 GETMET R8 R0 K8
+ 0x542A0101, // 0031 LDINT R10 258
+ 0x542E0009, // 0032 LDINT R11 10
+ 0x7C200600, // 0033 CALL R8 3
+ 0x90021807, // 0034 SETMBR R0 K12 R7
+ 0x8C200905, // 0035 GETMET R8 R4 K5
+ 0x5828000D, // 0036 LDCONST R10 K13
+ 0x7C200400, // 0037 CALL R8 2
+ 0x4C240000, // 0038 LDNIL R9
+ 0x20241009, // 0039 NE R9 R8 R9
+ 0x78260007, // 003A JMPF R9 #0043
+ 0x8824010E, // 003B GETMBR R9 R0 K14
+ 0x20241009, // 003C NE R9 R8 R9
+ 0x78260003, // 003D JMPF R9 #0042
+ 0x8C240108, // 003E GETMET R9 R0 K8
+ 0x542E0101, // 003F LDINT R11 258
+ 0x5432000A, // 0040 LDINT R12 11
+ 0x7C240600, // 0041 CALL R9 3
+ 0x90021C08, // 0042 SETMBR R0 K14 R8
+ 0x80000000, // 0043 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Shutter
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Device;
+be_local_class(Matter_Plugin_Shutter,
+ 5,
+ &be_class_Matter_Plugin_Device,
+ be_nested_map(16,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_closure) },
+ { be_const_key_weak(shadow_shutter_pos, -1), be_const_var(1) },
+ { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(15,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(5),
+ be_const_int(6),
+ be_const_int(7),
+ be_const_int(8),
+ be_const_int(9),
+ be_const_int(10),
+ be_const_int(11),
+ be_const_int(12),
+ be_const_int(13),
+ be_const_int(14),
+ be_const_int(15),
+ be_const_int(23),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
+ })) ) } )) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Shutter_init_closure) },
+ { be_const_key_weak(shadow_shutter_direction, -1), be_const_var(4) },
+ { be_const_key_weak(shadow_shutter_target, 15), be_const_var(2) },
+ { be_const_key_weak(NAME, 1), be_nested_str_weak(Shutter) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak(shutter) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) },
+ { be_const_key_weak(tasmota_shutter_index, -1), be_const_var(0) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) },
+ { be_const_key_weak(shadow_shutter_tilt, 8), be_const_var(3) },
+ { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Shutter_parse_sensors_closure) },
+ { be_const_key_weak(TYPE, 4), be_nested_str_weak(shutter) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(514, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) },
+ })),
+ be_str_weak(Matter_Plugin_Shutter)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Shutter_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Shutter);
+ be_setglobal(vm, "Matter_Plugin_Shutter");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
index 5805865d8..424cf1b1d 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -6,6 +6,309 @@
extern const bclass be_class_Matter_UI;
+/********************************************************************
+** Solidified function: show_plugins_configuration
+********************************************************************/
+be_local_closure(Matter_UI_show_plugins_configuration, /* name */
+ be_nested_proto(
+ 19, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[35]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(content_send),
+ /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCurrent_X20Configuration_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27),
+ /* K5 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20RESET_X20the_X20configuration_X20to_X20the_X20default_X2E_X20You_X20will_X20need_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
+ /* K6 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27auto_X27_X20class_X3D_X27button_X20bred_X27_X3EReset_X20to_X20default_X3C_X2Fbutton_X3E_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Fform_X3E),
+ /* K7 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22Changing_X20the_X20configuration_X20requires_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
+ /* K8 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E),
+ /* K9 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X20width_X3D_X2735_X27_X3E_X3Cb_X3EEp_X2E_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EType_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EParam_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E),
+ /* K10 */ be_nested_str_weak(device),
+ /* K11 */ be_nested_str_weak(k2l_num),
+ /* K12 */ be_nested_str_weak(plugins_config),
+ /* K13 */ be_const_int(0),
+ /* K14 */ be_nested_str_weak(find),
+ /* K15 */ be_nested_str_weak(type),
+ /* K16 */ be_nested_str_weak(format),
+ /* K17 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20value_X3D_X270_X27_X20readonly_X3E_X3C_X2Ftd_X3E),
+ /* K18 */ be_nested_str_weak(_X3Ctd_X3E_X3Cselect_X20name_X3D_X27pi_X2503i_X27_X3E),
+ /* K19 */ be_nested_str_weak(plugin_option),
+ /* K20 */ be_nested_str_weak(),
+ /* K21 */ be_nested_str_weak(_ROOT_TYPES),
+ /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E),
+ /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X26nbsp_X3B_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K24 */ be_const_int(1),
+ /* K25 */ be_nested_str_weak(get_plugin_class_arg),
+ /* K26 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E),
+ /* K27 */ be_nested_str_weak(_CLASSES_TYPES),
+ /* K28 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K29 */ be_nested_str_weak(html_escape),
+ /* K30 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E),
+ /* K31 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K32 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K33 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E),
+ /* K34 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_plugins_configuration),
+ &be_const_str_solidified,
+ ( &(const binstruction[180]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x8C0C0302, // 0005 GETMET R3 R1 K2
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x8C0C0302, // 0008 GETMET R3 R1 K2
+ 0x58140005, // 0009 LDCONST R5 K5
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x8C0C0302, // 000B GETMET R3 R1 K2
+ 0x58140006, // 000C LDCONST R5 K6
+ 0x7C0C0400, // 000D CALL R3 2
+ 0x8C0C0302, // 000E GETMET R3 R1 K2
+ 0x58140004, // 000F LDCONST R5 K4
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x8C0C0302, // 0011 GETMET R3 R1 K2
+ 0x58140007, // 0012 LDCONST R5 K7
+ 0x7C0C0400, // 0013 CALL R3 2
+ 0x8C0C0302, // 0014 GETMET R3 R1 K2
+ 0x58140008, // 0015 LDCONST R5 K8
+ 0x7C0C0400, // 0016 CALL R3 2
+ 0x8C0C0302, // 0017 GETMET R3 R1 K2
+ 0x58140009, // 0018 LDCONST R5 K9
+ 0x7C0C0400, // 0019 CALL R3 2
+ 0x880C010A, // 001A GETMBR R3 R0 K10
+ 0x8C0C070B, // 001B GETMET R3 R3 K11
+ 0x8814010A, // 001C GETMBR R5 R0 K10
+ 0x88140B0C, // 001D GETMBR R5 R5 K12
+ 0x7C0C0400, // 001E CALL R3 2
+ 0x5810000D, // 001F LDCONST R4 K13
+ 0x9414070D, // 0020 GETIDX R5 R3 K13
+ 0x1C140B0D, // 0021 EQ R5 R5 K13
+ 0x78160026, // 0022 JMPF R5 #004A
+ 0x94140604, // 0023 GETIDX R5 R3 R4
+ 0x8818010A, // 0024 GETMBR R6 R0 K10
+ 0x601C0008, // 0025 GETGBL R7 G8
+ 0x5C200A00, // 0026 MOVE R8 R5
+ 0x7C1C0200, // 0027 CALL R7 1
+ 0x88180D0C, // 0028 GETMBR R6 R6 K12
+ 0x94180C07, // 0029 GETIDX R6 R6 R7
+ 0x8C200D0E, // 002A GETMET R8 R6 K14
+ 0x5828000F, // 002B LDCONST R10 K15
+ 0x7C200400, // 002C CALL R8 2
+ 0x5C1C1000, // 002D MOVE R7 R8
+ 0x8C200302, // 002E GETMET R8 R1 K2
+ 0x8C280510, // 002F GETMET R10 R2 K16
+ 0x58300011, // 0030 LDCONST R12 K17
+ 0x5C340800, // 0031 MOVE R13 R4
+ 0x7C280600, // 0032 CALL R10 3
+ 0x7C200400, // 0033 CALL R8 2
+ 0x8C200302, // 0034 GETMET R8 R1 K2
+ 0x8C280510, // 0035 GETMET R10 R2 K16
+ 0x58300012, // 0036 LDCONST R12 K18
+ 0x5C340800, // 0037 MOVE R13 R4
+ 0x7C280600, // 0038 CALL R10 3
+ 0x7C200400, // 0039 CALL R8 2
+ 0x8C200113, // 003A GETMET R8 R0 K19
+ 0x8C280D0E, // 003B GETMET R10 R6 K14
+ 0x5830000F, // 003C LDCONST R12 K15
+ 0x58340014, // 003D LDCONST R13 K20
+ 0x7C280600, // 003E CALL R10 3
+ 0x882C0115, // 003F GETMBR R11 R0 K21
+ 0x7C200600, // 0040 CALL R8 3
+ 0x8C200302, // 0041 GETMET R8 R1 K2
+ 0x8C280510, // 0042 GETMET R10 R2 K16
+ 0x58300016, // 0043 LDCONST R12 K22
+ 0x7C280400, // 0044 CALL R10 2
+ 0x7C200400, // 0045 CALL R8 2
+ 0x8C200302, // 0046 GETMET R8 R1 K2
+ 0x58280017, // 0047 LDCONST R10 K23
+ 0x7C200400, // 0048 CALL R8 2
+ 0x00100918, // 0049 ADD R4 R4 K24
+ 0x6014000C, // 004A GETGBL R5 G12
+ 0x5C180600, // 004B MOVE R6 R3
+ 0x7C140200, // 004C CALL R5 1
+ 0x14140805, // 004D LT R5 R4 R5
+ 0x7816003F, // 004E JMPF R5 #008F
+ 0x94140604, // 004F GETIDX R5 R3 R4
+ 0x8818010A, // 0050 GETMBR R6 R0 K10
+ 0x601C0008, // 0051 GETGBL R7 G8
+ 0x5C200A00, // 0052 MOVE R8 R5
+ 0x7C1C0200, // 0053 CALL R7 1
+ 0x88180D0C, // 0054 GETMBR R6 R6 K12
+ 0x94180C07, // 0055 GETIDX R6 R6 R7
+ 0x8C200D0E, // 0056 GETMET R8 R6 K14
+ 0x5828000F, // 0057 LDCONST R10 K15
+ 0x7C200400, // 0058 CALL R8 2
+ 0x5C1C1000, // 0059 MOVE R7 R8
+ 0x5C200E00, // 005A MOVE R8 R7
+ 0x74220001, // 005B JMPT R8 #005E
+ 0x00100918, // 005C ADD R4 R4 K24
+ 0x7001FFEB, // 005D JMP #004A
+ 0x8820010A, // 005E GETMBR R8 R0 K10
+ 0x8C201119, // 005F GETMET R8 R8 K25
+ 0x5C280E00, // 0060 MOVE R10 R7
+ 0x7C200400, // 0061 CALL R8 2
+ 0x78220006, // 0062 JMPF R8 #006A
+ 0x60240008, // 0063 GETGBL R9 G8
+ 0x8C280D0E, // 0064 GETMET R10 R6 K14
+ 0x5C301000, // 0065 MOVE R12 R8
+ 0x58340014, // 0066 LDCONST R13 K20
+ 0x7C280600, // 0067 CALL R10 3
+ 0x7C240200, // 0068 CALL R9 1
+ 0x70020000, // 0069 JMP #006B
+ 0x58240014, // 006A LDCONST R9 K20
+ 0x8C280302, // 006B GETMET R10 R1 K2
+ 0x8C300510, // 006C GETMET R12 R2 K16
+ 0x5838001A, // 006D LDCONST R14 K26
+ 0x5C3C0800, // 006E MOVE R15 R4
+ 0x5C400A00, // 006F MOVE R16 R5
+ 0x7C300800, // 0070 CALL R12 4
+ 0x7C280400, // 0071 CALL R10 2
+ 0x8C280302, // 0072 GETMET R10 R1 K2
+ 0x8C300510, // 0073 GETMET R12 R2 K16
+ 0x58380012, // 0074 LDCONST R14 K18
+ 0x5C3C0800, // 0075 MOVE R15 R4
+ 0x7C300600, // 0076 CALL R12 3
+ 0x7C280400, // 0077 CALL R10 2
+ 0x8C280113, // 0078 GETMET R10 R0 K19
+ 0x8C300D0E, // 0079 GETMET R12 R6 K14
+ 0x5838000F, // 007A LDCONST R14 K15
+ 0x583C0014, // 007B LDCONST R15 K20
+ 0x7C300600, // 007C CALL R12 3
+ 0x8834011B, // 007D GETMBR R13 R0 K27
+ 0x7C280600, // 007E CALL R10 3
+ 0x8C280302, // 007F GETMET R10 R1 K2
+ 0x8C300510, // 0080 GETMET R12 R2 K16
+ 0x58380016, // 0081 LDCONST R14 K22
+ 0x7C300400, // 0082 CALL R12 2
+ 0x7C280400, // 0083 CALL R10 2
+ 0x8C280302, // 0084 GETMET R10 R1 K2
+ 0x8C300510, // 0085 GETMET R12 R2 K16
+ 0x5838001C, // 0086 LDCONST R14 K28
+ 0x5C3C0800, // 0087 MOVE R15 R4
+ 0x8C40031D, // 0088 GETMET R16 R1 K29
+ 0x5C481200, // 0089 MOVE R18 R9
+ 0x7C400400, // 008A CALL R16 2
+ 0x7C300800, // 008B CALL R12 4
+ 0x7C280400, // 008C CALL R10 2
+ 0x00100918, // 008D ADD R4 R4 K24
+ 0x7001FFBA, // 008E JMP #004A
+ 0x8C140302, // 008F GETMET R5 R1 K2
+ 0x8C1C0510, // 0090 GETMET R7 R2 K16
+ 0x5824001E, // 0091 LDCONST R9 K30
+ 0x5C280800, // 0092 MOVE R10 R4
+ 0x7C1C0600, // 0093 CALL R7 3
+ 0x7C140400, // 0094 CALL R5 2
+ 0x8C140302, // 0095 GETMET R5 R1 K2
+ 0x8C1C0510, // 0096 GETMET R7 R2 K16
+ 0x58240012, // 0097 LDCONST R9 K18
+ 0x5C280800, // 0098 MOVE R10 R4
+ 0x7C1C0600, // 0099 CALL R7 3
+ 0x7C140400, // 009A CALL R5 2
+ 0x8C140113, // 009B GETMET R5 R0 K19
+ 0x581C0014, // 009C LDCONST R7 K20
+ 0x8820011B, // 009D GETMBR R8 R0 K27
+ 0x7C140600, // 009E CALL R5 3
+ 0x8C140302, // 009F GETMET R5 R1 K2
+ 0x8C1C0510, // 00A0 GETMET R7 R2 K16
+ 0x58240016, // 00A1 LDCONST R9 K22
+ 0x7C1C0400, // 00A2 CALL R7 2
+ 0x7C140400, // 00A3 CALL R5 2
+ 0x8C140302, // 00A4 GETMET R5 R1 K2
+ 0x8C1C0510, // 00A5 GETMET R7 R2 K16
+ 0x5824001F, // 00A6 LDCONST R9 K31
+ 0x5C280800, // 00A7 MOVE R10 R4
+ 0x7C1C0600, // 00A8 CALL R7 3
+ 0x7C140400, // 00A9 CALL R5 2
+ 0x8C140302, // 00AA GETMET R5 R1 K2
+ 0x581C0020, // 00AB LDCONST R7 K32
+ 0x7C140400, // 00AC CALL R5 2
+ 0x8C140302, // 00AD GETMET R5 R1 K2
+ 0x581C0021, // 00AE LDCONST R7 K33
+ 0x7C140400, // 00AF CALL R5 2
+ 0x8C140302, // 00B0 GETMET R5 R1 K2
+ 0x581C0022, // 00B1 LDCONST R7 K34
+ 0x7C140400, // 00B2 CALL R5 2
+ 0x80000000, // 00B3 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: page_part_mgr
+********************************************************************/
+be_local_closure(Matter_UI_page_part_mgr, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(check_privileged_access),
+ /* K3 */ be_nested_str_weak(content_start),
+ /* K4 */ be_nested_str_weak(Matter),
+ /* K5 */ be_nested_str_weak(content_send_style),
+ /* K6 */ be_nested_str_weak(show_enable),
+ /* K7 */ be_nested_str_weak(show_passcode_form),
+ /* K8 */ be_nested_str_weak(show_plugins_configuration),
+ /* K9 */ be_nested_str_weak(show_fabric_info),
+ /* K10 */ be_nested_str_weak(content_button),
+ /* K11 */ be_nested_str_weak(BUTTON_CONFIGURATION),
+ /* K12 */ be_nested_str_weak(content_stop),
+ }),
+ be_str_weak(page_part_mgr),
+ &be_const_str_solidified,
+ ( &(const binstruction[27]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x7C0C0200, // 0003 CALL R3 1
+ 0x740E0001, // 0004 JMPT R3 #0007
+ 0x4C0C0000, // 0005 LDNIL R3
+ 0x80040600, // 0006 RET 1 R3
+ 0x8C0C0303, // 0007 GETMET R3 R1 K3
+ 0x58140004, // 0008 LDCONST R5 K4
+ 0x7C0C0400, // 0009 CALL R3 2
+ 0x8C0C0305, // 000A GETMET R3 R1 K5
+ 0x7C0C0200, // 000B CALL R3 1
+ 0x8C0C0106, // 000C GETMET R3 R0 K6
+ 0x7C0C0200, // 000D CALL R3 1
+ 0x780E0005, // 000E JMPF R3 #0015
+ 0x8C0C0107, // 000F GETMET R3 R0 K7
+ 0x7C0C0200, // 0010 CALL R3 1
+ 0x8C0C0108, // 0011 GETMET R3 R0 K8
+ 0x7C0C0200, // 0012 CALL R3 1
+ 0x8C0C0109, // 0013 GETMET R3 R0 K9
+ 0x7C0C0200, // 0014 CALL R3 1
+ 0x8C0C030A, // 0015 GETMET R3 R1 K10
+ 0x8814030B, // 0016 GETMBR R5 R1 K11
+ 0x7C0C0400, // 0017 CALL R3 2
+ 0x8C0C030C, // 0018 GETMET R3 R1 K12
+ 0x7C0C0200, // 0019 CALL R3 1
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: show_commissioning_info
********************************************************************/
@@ -117,87 +420,88 @@ be_local_closure(Matter_UI_show_commissioning_info, /* name */
/********************************************************************
-** Solidified function: show_enable
+** Solidified function: web_add_handler
********************************************************************/
-be_local_closure(Matter_UI_show_enable, /* name */
+be_local_closure(Matter_UI_web_add_handler, /* name */
be_nested_proto(
- 11, /* nstack */
- 2, /* argc */
+ 7, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[20]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(content_send),
- /* K7 */ be_nested_str_weak(format),
- /* K8 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K9 */ be_nested_str_weak(Enabled),
- /* K10 */ be_nested_str_weak(Disabled),
- /* K11 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A320px_X3B_X27_X3ECheck_X20the_X20_X3Ca_X20href_X3D_X27https_X3A_X2F_X2Ftasmota_X2Egithub_X2Eio_X2Fdocs_X2FMatter_X2F_X27_X20target_X3D_X27_blank_X27_X3EMatter_X20documentation_X3C_X2Fa_X3E_X2E_X3C_X2Fp_X3E),
- /* K12 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
- /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27_X25s_X27_X20class_X3D_X27button_X20bgrn_X27_X3E),
- /* K14 */ be_nested_str_weak(disable),
- /* K15 */ be_nested_str_weak(enable),
- /* K16 */ be_nested_str_weak(Disable),
- /* K17 */ be_nested_str_weak(Enable),
- /* K18 */ be_nested_str_weak(_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ 1, /* has sup protos */
+ ( &(const struct bproto*[ 2]) {
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(page_part_mgr),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
+ be_nested_proto(
+ 2, /* 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[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(page_part_ctl),
+ }),
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x68000000, // 0000 GETUPV R0 U0
+ 0x8C000100, // 0001 GETMET R0 R0 K0
+ 0x7C000200, // 0002 CALL R0 1
+ 0x80040000, // 0003 RET 1 R0
+ })
+ ),
}),
- be_str_weak(show_enable),
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(on),
+ /* K2 */ be_nested_str_weak(_X2Fmatterc),
+ /* K3 */ be_nested_str_weak(HTTP_GET),
+ /* K4 */ be_nested_str_weak(HTTP_POST),
+ }),
+ be_str_weak(web_add_handler),
&be_const_str_solidified,
- ( &(const binstruction[44]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0xB8120400, // 0002 GETNGBL R4 K2
- 0x8C100903, // 0003 GETMET R4 R4 K3
- 0xB81A0800, // 0004 GETNGBL R6 K4
- 0x88180D05, // 0005 GETMBR R6 R6 K5
- 0x7C100400, // 0006 CALL R4 2
- 0x8C140506, // 0007 GETMET R5 R2 K6
- 0x8C1C0707, // 0008 GETMET R7 R3 K7
- 0x58240008, // 0009 LDCONST R9 K8
- 0x78120001, // 000A JMPF R4 #000D
- 0x58280009, // 000B LDCONST R10 K9
- 0x70020000, // 000C JMP #000E
- 0x5828000A, // 000D LDCONST R10 K10
- 0x7C1C0600, // 000E CALL R7 3
- 0x7C140400, // 000F CALL R5 2
- 0x8C140506, // 0010 GETMET R5 R2 K6
- 0x581C000B, // 0011 LDCONST R7 K11
- 0x7C140400, // 0012 CALL R5 2
- 0x8C140506, // 0013 GETMET R5 R2 K6
- 0x581C000C, // 0014 LDCONST R7 K12
- 0x7C140400, // 0015 CALL R5 2
- 0x8C140506, // 0016 GETMET R5 R2 K6
- 0x8C1C0707, // 0017 GETMET R7 R3 K7
- 0x5824000D, // 0018 LDCONST R9 K13
- 0x78120001, // 0019 JMPF R4 #001C
- 0x5828000E, // 001A LDCONST R10 K14
- 0x70020000, // 001B JMP #001D
- 0x5828000F, // 001C LDCONST R10 K15
- 0x7C1C0600, // 001D CALL R7 3
- 0x7C140400, // 001E CALL R5 2
- 0x8C140506, // 001F GETMET R5 R2 K6
- 0x78120001, // 0020 JMPF R4 #0023
- 0x581C0010, // 0021 LDCONST R7 K16
- 0x70020000, // 0022 JMP #0024
- 0x581C0011, // 0023 LDCONST R7 K17
- 0x7C140400, // 0024 CALL R5 2
- 0x8C140506, // 0025 GETMET R5 R2 K6
- 0x581C0012, // 0026 LDCONST R7 K18
- 0x7C140400, // 0027 CALL R5 2
- 0x8C140506, // 0028 GETMET R5 R2 K6
- 0x581C0013, // 0029 LDCONST R7 K19
- 0x7C140400, // 002A CALL R5 2
- 0x80040800, // 002B RET 1 R4
+ ( &(const binstruction[13]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x84140000, // 0003 CLOSURE R5 P0
+ 0x88180303, // 0004 GETMBR R6 R1 K3
+ 0x7C080800, // 0005 CALL R2 4
+ 0x8C080301, // 0006 GETMET R2 R1 K1
+ 0x58100002, // 0007 LDCONST R4 K2
+ 0x84140001, // 0008 CLOSURE R5 P1
+ 0x88180304, // 0009 GETMBR R6 R1 K4
+ 0x7C080800, // 000A CALL R2 4
+ 0xA0000000, // 000B CLOSE R0
+ 0x80000000, // 000C RET 0
})
)
);
@@ -205,32 +509,47 @@ be_local_closure(Matter_UI_show_enable, /* name */
/********************************************************************
-** Solidified function: init
+** Solidified function: web_get_arg
********************************************************************/
-be_local_closure(Matter_UI_init, /* name */
+be_local_closure(Matter_UI_web_get_arg, /* name */
be_nested_proto(
5, /* nstack */
- 2, /* argc */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(device),
- /* K1 */ be_nested_str_weak(tasmota),
- /* K2 */ be_nested_str_weak(add_driver),
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(has_arg),
+ /* K2 */ be_nested_str_weak(mtc0),
+ /* K3 */ be_nested_str_weak(device),
+ /* K4 */ be_nested_str_weak(stop_basic_commissioning),
+ /* K5 */ be_nested_str_weak(mtc1),
+ /* K6 */ be_nested_str_weak(start_root_basic_commissioning),
}),
- be_str_weak(init),
+ be_str_weak(web_get_arg),
&be_const_str_solidified,
- ( &(const binstruction[ 6]) { /* code */
- 0x90020001, // 0000 SETMBR R0 K0 R1
- 0xB80A0200, // 0001 GETNGBL R2 K1
- 0x8C080502, // 0002 GETMET R2 R2 K2
- 0x5C100000, // 0003 MOVE R4 R0
- 0x7C080400, // 0004 CALL R2 2
- 0x80000000, // 0005 RET 0
+ ( &(const binstruction[17]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x58100002, // 0002 LDCONST R4 K2
+ 0x7C080400, // 0003 CALL R2 2
+ 0x780A0003, // 0004 JMPF R2 #0009
+ 0x88080103, // 0005 GETMBR R2 R0 K3
+ 0x8C080504, // 0006 GETMET R2 R2 K4
+ 0x7C080200, // 0007 CALL R2 1
+ 0x70020006, // 0008 JMP #0010
+ 0x8C080301, // 0009 GETMET R2 R1 K1
+ 0x58100005, // 000A LDCONST R4 K5
+ 0x7C080400, // 000B CALL R2 2
+ 0x780A0002, // 000C JMPF R2 #0010
+ 0x88080103, // 000D GETMBR R2 R0 K3
+ 0x8C080506, // 000E GETMET R2 R2 K6
+ 0x7C080200, // 000F CALL R2 1
+ 0x80000000, // 0010 RET 0
})
)
);
@@ -326,268 +645,6 @@ be_local_closure(Matter_UI_show_passcode_form, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: web_add_config_button
-********************************************************************/
-be_local_closure(Matter_UI_web_add_config_button, /* name */
- be_nested_proto(
- 5, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(content_send),
- /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E),
- /* K3 */ be_nested_str_weak(matter),
- /* K4 */ be_nested_str_weak(_LOGO),
- /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- }),
- be_str_weak(web_add_config_button),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x7C080400, // 0003 CALL R2 2
- 0x8C080301, // 0004 GETMET R2 R1 K1
- 0xB8120600, // 0005 GETNGBL R4 K3
- 0x88100904, // 0006 GETMBR R4 R4 K4
- 0x7C080400, // 0007 CALL R2 2
- 0x8C080301, // 0008 GETMET R2 R1 K1
- 0x58100005, // 0009 LDCONST R4 K5
- 0x7C080400, // 000A CALL R2 2
- 0x80000000, // 000B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show_fabric_info
-********************************************************************/
-be_local_closure(Matter_UI_show_fabric_info, /* name */
- be_nested_proto(
- 16, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[30]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(content_send),
- /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BFabrics_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K4 */ be_nested_str_weak(_X3Cp_X3EExisting_X20fabrics_X3A_X3C_X2Fp_X3E),
- /* K5 */ be_nested_str_weak(device),
- /* K6 */ be_nested_str_weak(sessions),
- /* K7 */ be_const_int(0),
- /* K8 */ be_nested_str_weak(_X3Cp_X3E_X3Cb_X3ENone_X3C_X2Fb_X3E_X3C_X2Fp_X3E),
- /* K9 */ be_nested_str_weak(fabrics),
- /* K10 */ be_nested_str_weak(persistables),
- /* K11 */ be_nested_str_weak(_X3Chr_X3E),
- /* K12 */ be_nested_str_weak(fabric_label),
- /* K13 */ be_nested_str_weak(_X3CNo_X20label_X3E),
- /* K14 */ be_nested_str_weak(html_escape),
- /* K15 */ be_nested_str_weak(format),
- /* K16 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X23_X25i_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K17 */ be_nested_str_weak(get_fabric_index),
- /* K18 */ be_nested_str_weak(get_fabric_id),
- /* K19 */ be_nested_str_weak(copy),
- /* K20 */ be_nested_str_weak(reverse),
- /* K21 */ be_nested_str_weak(get_device_id),
- /* K22 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E),
- /* K23 */ be_nested_str_weak(tohex),
- /* K24 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B),
- /* K25 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22Are_X20you_X20sure_X3F_X22_X29_X3B_X27_X3E),
- /* K26 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25i_X27_X3E),
- /* K27 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
- /* K28 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K29 */ be_nested_str_weak(stop_iteration),
- }),
- be_str_weak(show_fabric_info),
- &be_const_str_solidified,
- ( &(const binstruction[102]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C0C0400, // 0004 CALL R3 2
- 0x8C0C0302, // 0005 GETMET R3 R1 K2
- 0x58140004, // 0006 LDCONST R5 K4
- 0x7C0C0400, // 0007 CALL R3 2
- 0x600C000C, // 0008 GETGBL R3 G12
- 0x88100105, // 0009 GETMBR R4 R0 K5
- 0x88100906, // 000A GETMBR R4 R4 K6
- 0x88100906, // 000B GETMBR R4 R4 K6
- 0x7C0C0200, // 000C CALL R3 1
- 0x1C0C0707, // 000D EQ R3 R3 K7
- 0x780E0003, // 000E JMPF R3 #0013
- 0x8C0C0302, // 000F GETMET R3 R1 K2
- 0x58140008, // 0010 LDCONST R5 K8
- 0x7C0C0400, // 0011 CALL R3 2
- 0x7002004E, // 0012 JMP #0062
- 0x500C0200, // 0013 LDBOOL R3 1 0
- 0x60100010, // 0014 GETGBL R4 G16
- 0x88140105, // 0015 GETMBR R5 R0 K5
- 0x88140B06, // 0016 GETMBR R5 R5 K6
- 0x88140B09, // 0017 GETMBR R5 R5 K9
- 0x8C140B0A, // 0018 GETMET R5 R5 K10
- 0x7C140200, // 0019 CALL R5 1
- 0x7C100200, // 001A CALL R4 1
- 0xA8020042, // 001B EXBLK 0 #005F
- 0x5C140800, // 001C MOVE R5 R4
- 0x7C140000, // 001D CALL R5 0
- 0x5C180600, // 001E MOVE R6 R3
- 0x741A0002, // 001F JMPT R6 #0023
- 0x8C180302, // 0020 GETMET R6 R1 K2
- 0x5820000B, // 0021 LDCONST R8 K11
- 0x7C180400, // 0022 CALL R6 2
- 0x500C0000, // 0023 LDBOOL R3 0 0
- 0x88180B0C, // 0024 GETMBR R6 R5 K12
- 0x5C1C0C00, // 0025 MOVE R7 R6
- 0x741E0000, // 0026 JMPT R7 #0028
- 0x5818000D, // 0027 LDCONST R6 K13
- 0x8C1C030E, // 0028 GETMET R7 R1 K14
- 0x5C240C00, // 0029 MOVE R9 R6
- 0x7C1C0400, // 002A CALL R7 2
- 0x5C180E00, // 002B MOVE R6 R7
- 0x8C1C0302, // 002C GETMET R7 R1 K2
- 0x8C24050F, // 002D GETMET R9 R2 K15
- 0x582C0010, // 002E LDCONST R11 K16
- 0x8C300B11, // 002F GETMET R12 R5 K17
- 0x7C300200, // 0030 CALL R12 1
- 0x5C340C00, // 0031 MOVE R13 R6
- 0x7C240800, // 0032 CALL R9 4
- 0x7C1C0400, // 0033 CALL R7 2
- 0x8C1C0B12, // 0034 GETMET R7 R5 K18
- 0x7C1C0200, // 0035 CALL R7 1
- 0x8C1C0F13, // 0036 GETMET R7 R7 K19
- 0x7C1C0200, // 0037 CALL R7 1
- 0x8C1C0F14, // 0038 GETMET R7 R7 K20
- 0x7C1C0200, // 0039 CALL R7 1
- 0x8C200B15, // 003A GETMET R8 R5 K21
- 0x7C200200, // 003B CALL R8 1
- 0x8C201113, // 003C GETMET R8 R8 K19
- 0x7C200200, // 003D CALL R8 1
- 0x8C201114, // 003E GETMET R8 R8 K20
- 0x7C200200, // 003F CALL R8 1
- 0x8C240302, // 0040 GETMET R9 R1 K2
- 0x8C2C050F, // 0041 GETMET R11 R2 K15
- 0x58340016, // 0042 LDCONST R13 K22
- 0x8C380F17, // 0043 GETMET R14 R7 K23
- 0x7C380200, // 0044 CALL R14 1
- 0x7C2C0600, // 0045 CALL R11 3
- 0x7C240400, // 0046 CALL R9 2
- 0x8C240302, // 0047 GETMET R9 R1 K2
- 0x8C2C050F, // 0048 GETMET R11 R2 K15
- 0x58340018, // 0049 LDCONST R13 K24
- 0x8C381117, // 004A GETMET R14 R8 K23
- 0x7C380200, // 004B CALL R14 1
- 0x7C2C0600, // 004C CALL R11 3
- 0x7C240400, // 004D CALL R9 2
- 0x8C240302, // 004E GETMET R9 R1 K2
- 0x582C0019, // 004F LDCONST R11 K25
- 0x7C240400, // 0050 CALL R9 2
- 0x8C240302, // 0051 GETMET R9 R1 K2
- 0x8C2C050F, // 0052 GETMET R11 R2 K15
- 0x5834001A, // 0053 LDCONST R13 K26
- 0x8C380B11, // 0054 GETMET R14 R5 K17
- 0x7C380200, // 0055 CALL R14 1
- 0x7C2C0600, // 0056 CALL R11 3
- 0x7C240400, // 0057 CALL R9 2
- 0x8C240302, // 0058 GETMET R9 R1 K2
- 0x582C001B, // 0059 LDCONST R11 K27
- 0x7C240400, // 005A CALL R9 2
- 0x8C240302, // 005B GETMET R9 R1 K2
- 0x582C001C, // 005C LDCONST R11 K28
- 0x7C240400, // 005D CALL R9 2
- 0x7001FFBC, // 005E JMP #001C
- 0x5810001D, // 005F LDCONST R4 K29
- 0xAC100200, // 0060 CATCH R4 1 0
- 0xB0080000, // 0061 RAISE 2 R0 R0
- 0x8C0C0302, // 0062 GETMET R3 R1 K2
- 0x5814001C, // 0063 LDCONST R5 K28
- 0x7C0C0400, // 0064 CALL R3 2
- 0x80000000, // 0065 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: page_part_mgr
-********************************************************************/
-be_local_closure(Matter_UI_page_part_mgr, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[13]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(check_privileged_access),
- /* K3 */ be_nested_str_weak(content_start),
- /* K4 */ be_nested_str_weak(Matter),
- /* K5 */ be_nested_str_weak(content_send_style),
- /* K6 */ be_nested_str_weak(show_enable),
- /* K7 */ be_nested_str_weak(show_passcode_form),
- /* K8 */ be_nested_str_weak(show_plugins_configuration),
- /* K9 */ be_nested_str_weak(show_fabric_info),
- /* K10 */ be_nested_str_weak(content_button),
- /* K11 */ be_nested_str_weak(BUTTON_CONFIGURATION),
- /* K12 */ be_nested_str_weak(content_stop),
- }),
- be_str_weak(page_part_mgr),
- &be_const_str_solidified,
- ( &(const binstruction[27]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x7C0C0200, // 0003 CALL R3 1
- 0x740E0001, // 0004 JMPT R3 #0007
- 0x4C0C0000, // 0005 LDNIL R3
- 0x80040600, // 0006 RET 1 R3
- 0x8C0C0303, // 0007 GETMET R3 R1 K3
- 0x58140004, // 0008 LDCONST R5 K4
- 0x7C0C0400, // 0009 CALL R3 2
- 0x8C0C0305, // 000A GETMET R3 R1 K5
- 0x7C0C0200, // 000B CALL R3 1
- 0x8C0C0106, // 000C GETMET R3 R0 K6
- 0x7C0C0200, // 000D CALL R3 1
- 0x780E0005, // 000E JMPF R3 #0015
- 0x8C0C0107, // 000F GETMET R3 R0 K7
- 0x7C0C0200, // 0010 CALL R3 1
- 0x8C0C0108, // 0011 GETMET R3 R0 K8
- 0x7C0C0200, // 0012 CALL R3 1
- 0x8C0C0109, // 0013 GETMET R3 R0 K9
- 0x7C0C0200, // 0014 CALL R3 1
- 0x8C0C030A, // 0015 GETMET R3 R1 K10
- 0x8814030B, // 0016 GETMBR R5 R1 K11
- 0x7C0C0400, // 0017 CALL R3 2
- 0x8C0C030C, // 0018 GETMET R3 R1 K12
- 0x7C0C0200, // 0019 CALL R3 1
- 0x80000000, // 001A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: page_part_ctl
********************************************************************/
@@ -1041,9 +1098,9 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
/********************************************************************
-** Solidified function: web_get_arg
+** Solidified function: web_add_config_button
********************************************************************/
-be_local_closure(Matter_UI_web_get_arg, /* name */
+be_local_closure(Matter_UI_web_add_config_button, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
@@ -1053,420 +1110,29 @@ be_local_closure(Matter_UI_web_get_arg, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
+ ( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(has_arg),
- /* K2 */ be_nested_str_weak(mtc0),
- /* K3 */ be_nested_str_weak(device),
- /* K4 */ be_nested_str_weak(stop_basic_commissioning),
- /* K5 */ be_nested_str_weak(mtc1),
- /* K6 */ be_nested_str_weak(start_root_basic_commissioning),
+ /* K1 */ be_nested_str_weak(content_send),
+ /* K2 */ be_nested_str_weak(_X3Cp_X3E_X3Cform_X20id_X3Dac_X20action_X3D_X27matterc_X27_X20style_X3D_X27display_X3A_X20block_X3B_X27_X20method_X3D_X27get_X27_X3E_X3Cbutton_X3E),
+ /* K3 */ be_nested_str_weak(matter),
+ /* K4 */ be_nested_str_weak(_LOGO),
+ /* K5 */ be_nested_str_weak(_X20Configure_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
}),
- be_str_weak(web_get_arg),
+ be_str_weak(web_add_config_button),
&be_const_str_solidified,
- ( &(const binstruction[17]) { /* code */
+ ( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x58100002, // 0002 LDCONST R4 K2
0x7C080400, // 0003 CALL R2 2
- 0x780A0003, // 0004 JMPF R2 #0009
- 0x88080103, // 0005 GETMBR R2 R0 K3
- 0x8C080504, // 0006 GETMET R2 R2 K4
- 0x7C080200, // 0007 CALL R2 1
- 0x70020006, // 0008 JMP #0010
- 0x8C080301, // 0009 GETMET R2 R1 K1
- 0x58100005, // 000A LDCONST R4 K5
- 0x7C080400, // 000B CALL R2 2
- 0x780A0002, // 000C JMPF R2 #0010
- 0x88080103, // 000D GETMBR R2 R0 K3
- 0x8C080506, // 000E GETMET R2 R2 K6
- 0x7C080200, // 000F CALL R2 1
- 0x80000000, // 0010 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: show_plugins_configuration
-********************************************************************/
-be_local_closure(Matter_UI_show_plugins_configuration, /* name */
- be_nested_proto(
- 19, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[31]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(content_send),
- /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BCurrent_X20Configuration_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K4 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27),
- /* K5 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20RESET_X20the_X20configuration_X20to_X20the_X20default_X2E_X20You_X20will_X20need_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
- /* K6 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27auto_X27_X20class_X3D_X27button_X20bred_X27_X3EReset_X20to_X20default_X3C_X2Fbutton_X3E_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Fform_X3E),
- /* K7 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22Changing_X20the_X20configuration_X20requires_X20to_X20associate_X20again_X2E_X22_X29_X3B_X27_X3E),
- /* K8 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E),
- /* K9 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X20width_X3D_X2735_X27_X3E_X3Cb_X3EEp_X2E_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EType_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3Ctd_X3E_X3Cb_X3EParam_X3C_X2Fb_X3E_X3C_X2Ftd_X3E_X3C_X2Ftr_X3E),
- /* K10 */ be_nested_str_weak(device),
- /* K11 */ be_nested_str_weak(k2l_num),
- /* K12 */ be_nested_str_weak(plugins_config),
- /* K13 */ be_const_int(0),
- /* K14 */ be_nested_str_weak(find),
- /* K15 */ be_nested_str_weak(type),
- /* K16 */ be_nested_str_weak(get_plugin_class_arg),
- /* K17 */ be_nested_str_weak(),
- /* K18 */ be_nested_str_weak(format),
- /* K19 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E),
- /* K20 */ be_nested_str_weak(_X3Ctd_X3E_X3Cselect_X20name_X3D_X27pi_X2503i_X27_X3E),
- /* K21 */ be_nested_str_weak(plugin_option),
- /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E),
- /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
- /* K24 */ be_nested_str_weak(html_escape),
- /* K25 */ be_const_int(1),
- /* K26 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E),
- /* K27 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
- /* K28 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K29 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E),
- /* K30 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- }),
- be_str_weak(show_plugins_configuration),
- &be_const_str_solidified,
- ( &(const binstruction[135]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x58140003, // 0003 LDCONST R5 K3
- 0x7C0C0400, // 0004 CALL R3 2
- 0x8C0C0302, // 0005 GETMET R3 R1 K2
- 0x58140004, // 0006 LDCONST R5 K4
- 0x7C0C0400, // 0007 CALL R3 2
- 0x8C0C0302, // 0008 GETMET R3 R1 K2
- 0x58140005, // 0009 LDCONST R5 K5
- 0x7C0C0400, // 000A CALL R3 2
- 0x8C0C0302, // 000B GETMET R3 R1 K2
- 0x58140006, // 000C LDCONST R5 K6
- 0x7C0C0400, // 000D CALL R3 2
- 0x8C0C0302, // 000E GETMET R3 R1 K2
- 0x58140004, // 000F LDCONST R5 K4
- 0x7C0C0400, // 0010 CALL R3 2
- 0x8C0C0302, // 0011 GETMET R3 R1 K2
- 0x58140007, // 0012 LDCONST R5 K7
- 0x7C0C0400, // 0013 CALL R3 2
- 0x8C0C0302, // 0014 GETMET R3 R1 K2
- 0x58140008, // 0015 LDCONST R5 K8
- 0x7C0C0400, // 0016 CALL R3 2
- 0x8C0C0302, // 0017 GETMET R3 R1 K2
- 0x58140009, // 0018 LDCONST R5 K9
- 0x7C0C0400, // 0019 CALL R3 2
- 0x880C010A, // 001A GETMBR R3 R0 K10
- 0x8C0C070B, // 001B GETMET R3 R3 K11
- 0x8814010A, // 001C GETMBR R5 R0 K10
- 0x88140B0C, // 001D GETMBR R5 R5 K12
- 0x7C0C0400, // 001E CALL R3 2
- 0x5810000D, // 001F LDCONST R4 K13
- 0x6014000C, // 0020 GETGBL R5 G12
- 0x5C180600, // 0021 MOVE R6 R3
- 0x7C140200, // 0022 CALL R5 1
- 0x14140805, // 0023 LT R5 R4 R5
- 0x7816003D, // 0024 JMPF R5 #0063
- 0x94140604, // 0025 GETIDX R5 R3 R4
- 0x8818010A, // 0026 GETMBR R6 R0 K10
- 0x601C0008, // 0027 GETGBL R7 G8
- 0x5C200A00, // 0028 MOVE R8 R5
- 0x7C1C0200, // 0029 CALL R7 1
- 0x88180D0C, // 002A GETMBR R6 R6 K12
- 0x94180C07, // 002B GETIDX R6 R6 R7
- 0x8C200D0E, // 002C GETMET R8 R6 K14
- 0x5828000F, // 002D LDCONST R10 K15
- 0x7C200400, // 002E CALL R8 2
- 0x5C1C1000, // 002F MOVE R7 R8
- 0x5C200E00, // 0030 MOVE R8 R7
- 0x74220000, // 0031 JMPT R8 #0033
- 0x7001FFEC, // 0032 JMP #0020
- 0x8820010A, // 0033 GETMBR R8 R0 K10
- 0x8C201110, // 0034 GETMET R8 R8 K16
- 0x5C280E00, // 0035 MOVE R10 R7
- 0x7C200400, // 0036 CALL R8 2
- 0x78220006, // 0037 JMPF R8 #003F
- 0x60240008, // 0038 GETGBL R9 G8
- 0x8C280D0E, // 0039 GETMET R10 R6 K14
- 0x5C301000, // 003A MOVE R12 R8
- 0x58340011, // 003B LDCONST R13 K17
- 0x7C280600, // 003C CALL R10 3
- 0x7C240200, // 003D CALL R9 1
- 0x70020000, // 003E JMP #0040
- 0x58240011, // 003F LDCONST R9 K17
- 0x8C280302, // 0040 GETMET R10 R1 K2
- 0x8C300512, // 0041 GETMET R12 R2 K18
- 0x58380013, // 0042 LDCONST R14 K19
- 0x5C3C0800, // 0043 MOVE R15 R4
- 0x5C400A00, // 0044 MOVE R16 R5
- 0x7C300800, // 0045 CALL R12 4
- 0x7C280400, // 0046 CALL R10 2
- 0x8C280302, // 0047 GETMET R10 R1 K2
- 0x8C300512, // 0048 GETMET R12 R2 K18
- 0x58380014, // 0049 LDCONST R14 K20
- 0x5C3C0800, // 004A MOVE R15 R4
- 0x7C300600, // 004B CALL R12 3
- 0x7C280400, // 004C CALL R10 2
- 0x8C280115, // 004D GETMET R10 R0 K21
- 0x8C300D0E, // 004E GETMET R12 R6 K14
- 0x5838000F, // 004F LDCONST R14 K15
- 0x583C0011, // 0050 LDCONST R15 K17
- 0x7C300600, // 0051 CALL R12 3
- 0x7C280400, // 0052 CALL R10 2
- 0x8C280302, // 0053 GETMET R10 R1 K2
- 0x8C300512, // 0054 GETMET R12 R2 K18
- 0x58380016, // 0055 LDCONST R14 K22
- 0x7C300400, // 0056 CALL R12 2
- 0x7C280400, // 0057 CALL R10 2
- 0x8C280302, // 0058 GETMET R10 R1 K2
- 0x8C300512, // 0059 GETMET R12 R2 K18
- 0x58380017, // 005A LDCONST R14 K23
- 0x5C3C0800, // 005B MOVE R15 R4
- 0x8C400318, // 005C GETMET R16 R1 K24
- 0x5C481200, // 005D MOVE R18 R9
- 0x7C400400, // 005E CALL R16 2
- 0x7C300800, // 005F CALL R12 4
- 0x7C280400, // 0060 CALL R10 2
- 0x00100919, // 0061 ADD R4 R4 K25
- 0x7001FFBC, // 0062 JMP #0020
- 0x8C140302, // 0063 GETMET R5 R1 K2
- 0x8C1C0512, // 0064 GETMET R7 R2 K18
- 0x5824001A, // 0065 LDCONST R9 K26
- 0x5C280800, // 0066 MOVE R10 R4
- 0x7C1C0600, // 0067 CALL R7 3
- 0x7C140400, // 0068 CALL R5 2
- 0x8C140302, // 0069 GETMET R5 R1 K2
- 0x8C1C0512, // 006A GETMET R7 R2 K18
- 0x58240014, // 006B LDCONST R9 K20
- 0x5C280800, // 006C MOVE R10 R4
- 0x7C1C0600, // 006D CALL R7 3
- 0x7C140400, // 006E CALL R5 2
- 0x8C140115, // 006F GETMET R5 R0 K21
- 0x581C0011, // 0070 LDCONST R7 K17
- 0x7C140400, // 0071 CALL R5 2
- 0x8C140302, // 0072 GETMET R5 R1 K2
- 0x8C1C0512, // 0073 GETMET R7 R2 K18
- 0x58240016, // 0074 LDCONST R9 K22
- 0x7C1C0400, // 0075 CALL R7 2
- 0x7C140400, // 0076 CALL R5 2
- 0x8C140302, // 0077 GETMET R5 R1 K2
- 0x8C1C0512, // 0078 GETMET R7 R2 K18
- 0x5824001B, // 0079 LDCONST R9 K27
- 0x5C280800, // 007A MOVE R10 R4
- 0x7C1C0600, // 007B CALL R7 3
- 0x7C140400, // 007C CALL R5 2
- 0x8C140302, // 007D GETMET R5 R1 K2
- 0x581C001C, // 007E LDCONST R7 K28
- 0x7C140400, // 007F CALL R5 2
- 0x8C140302, // 0080 GETMET R5 R1 K2
- 0x581C001D, // 0081 LDCONST R7 K29
- 0x7C140400, // 0082 CALL R5 2
- 0x8C140302, // 0083 GETMET R5 R1 K2
- 0x581C001E, // 0084 LDCONST R7 K30
- 0x7C140400, // 0085 CALL R5 2
- 0x80000000, // 0086 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: plugin_option
-********************************************************************/
-be_local_closure(Matter_UI_plugin_option, /* name */
- be_nested_proto(
- 16, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(split),
- /* K3 */ be_nested_str_weak(_CLASSES_TYPES),
- /* K4 */ be_nested_str_weak(_X7C),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(content_send),
- /* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E),
- /* K8 */ be_nested_str_weak(device),
- /* K9 */ be_nested_str_weak(get_plugin_class_displayname),
- /* K10 */ be_nested_str_weak(format),
- /* K11 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E),
- /* K12 */ be_nested_str_weak(_X20selected),
- /* K13 */ be_nested_str_weak(),
- /* K14 */ be_const_int(1),
- }),
- be_str_weak(plugin_option),
- &be_const_str_solidified,
- ( &(const binstruction[35]) { /* code */
- 0xA40A0000, // 0000 IMPORT R2 K0
- 0xA40E0200, // 0001 IMPORT R3 K1
- 0x8C100702, // 0002 GETMET R4 R3 K2
- 0x88180103, // 0003 GETMBR R6 R0 K3
- 0x581C0004, // 0004 LDCONST R7 K4
- 0x7C100600, // 0005 CALL R4 3
- 0x58140005, // 0006 LDCONST R5 K5
- 0x8C180506, // 0007 GETMET R6 R2 K6
- 0x58200007, // 0008 LDCONST R8 K7
- 0x7C180400, // 0009 CALL R6 2
- 0x6018000C, // 000A GETGBL R6 G12
- 0x5C1C0800, // 000B MOVE R7 R4
- 0x7C180200, // 000C CALL R6 1
- 0x14180A06, // 000D LT R6 R5 R6
- 0x781A0012, // 000E JMPF R6 #0022
- 0x94180805, // 000F GETIDX R6 R4 R5
- 0x881C0108, // 0010 GETMBR R7 R0 K8
- 0x8C1C0F09, // 0011 GETMET R7 R7 K9
- 0x5C240C00, // 0012 MOVE R9 R6
- 0x7C1C0400, // 0013 CALL R7 2
- 0x8C200506, // 0014 GETMET R8 R2 K6
- 0x8C28070A, // 0015 GETMET R10 R3 K10
- 0x5830000B, // 0016 LDCONST R12 K11
- 0x5C340C00, // 0017 MOVE R13 R6
- 0x1C380C01, // 0018 EQ R14 R6 R1
- 0x783A0001, // 0019 JMPF R14 #001C
- 0x5838000C, // 001A LDCONST R14 K12
- 0x70020000, // 001B JMP #001D
- 0x5838000D, // 001C LDCONST R14 K13
- 0x5C3C0E00, // 001D MOVE R15 R7
- 0x7C280A00, // 001E CALL R10 5
- 0x7C200400, // 001F CALL R8 2
- 0x00140B0E, // 0020 ADD R5 R5 K14
- 0x7001FFE7, // 0021 JMP #000A
- 0x80000000, // 0022 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: web_sensor
-********************************************************************/
-be_local_closure(Matter_UI_web_sensor, /* name */
- be_nested_proto(
- 13, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[25]) { /* constants */
- /* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(string),
- /* K2 */ be_nested_str_weak(tasmota),
- /* K3 */ be_nested_str_weak(get_option),
- /* K4 */ be_nested_str_weak(matter),
- /* K5 */ be_nested_str_weak(MATTER_OPTION),
- /* K6 */ be_nested_str_weak(device),
- /* K7 */ be_nested_str_weak(is_root_commissioning_open),
- /* K8 */ be_nested_str_weak(show_commissioning_info),
- /* K9 */ be_nested_str_weak(sessions),
- /* K10 */ be_nested_str_weak(count_active_fabrics),
- /* K11 */ be_const_int(0),
- /* K12 */ be_nested_str_weak(content_send),
- /* K13 */ be_nested_str_weak(format),
- /* K14 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27text_X2Dalign_X3Aright_X3Bfont_X2Dsize_X3A11px_X3Bcolor_X3A_X23aaa_X3B_X27_X3E_X25s_X3C_X2Fdiv_X3E),
- /* K15 */ be_nested_str_weak(No_X20active_X20association),
- /* K16 */ be_const_int(1),
- /* K17 */ be_nested_str_weak(_X20active_X20association),
- /* K18 */ be_nested_str_weak(s),
- /* K19 */ be_nested_str_weak(),
- /* K20 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E),
- /* K21 */ be_nested_str_weak(commissioning_open),
- /* K22 */ be_nested_str_weak(_LOGO),
- /* K23 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E),
- /* K24 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E),
- }),
- be_str_weak(web_sensor),
- &be_const_str_solidified,
- ( &(const binstruction[72]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0xB80E0400, // 0002 GETNGBL R3 K2
- 0x8C0C0703, // 0003 GETMET R3 R3 K3
- 0xB8160800, // 0004 GETNGBL R5 K4
- 0x88140B05, // 0005 GETMBR R5 R5 K5
- 0x7C0C0400, // 0006 CALL R3 2
- 0x780E003E, // 0007 JMPF R3 #0047
- 0x88100106, // 0008 GETMBR R4 R0 K6
- 0x8C100907, // 0009 GETMET R4 R4 K7
- 0x7C100200, // 000A CALL R4 1
- 0x78120001, // 000B JMPF R4 #000E
- 0x8C100108, // 000C GETMET R4 R0 K8
- 0x7C100200, // 000D CALL R4 1
- 0x88100106, // 000E GETMBR R4 R0 K6
- 0x88100909, // 000F GETMBR R4 R4 K9
- 0x8C10090A, // 0010 GETMET R4 R4 K10
- 0x7C100200, // 0011 CALL R4 1
- 0x1C14090B, // 0012 EQ R5 R4 K11
- 0x78160006, // 0013 JMPF R5 #001B
- 0x8C14030C, // 0014 GETMET R5 R1 K12
- 0x8C1C050D, // 0015 GETMET R7 R2 K13
- 0x5824000E, // 0016 LDCONST R9 K14
- 0x5828000F, // 0017 LDCONST R10 K15
- 0x7C1C0600, // 0018 CALL R7 3
- 0x7C140400, // 0019 CALL R5 2
- 0x7002000E, // 001A JMP #002A
- 0x24140910, // 001B GT R5 R4 K16
- 0x8C18030C, // 001C GETMET R6 R1 K12
- 0x8C20050D, // 001D GETMET R8 R2 K13
- 0x5828000E, // 001E LDCONST R10 K14
- 0x602C0008, // 001F GETGBL R11 G8
- 0x5C300800, // 0020 MOVE R12 R4
- 0x7C2C0200, // 0021 CALL R11 1
- 0x002C1711, // 0022 ADD R11 R11 K17
- 0x78160001, // 0023 JMPF R5 #0026
- 0x58300012, // 0024 LDCONST R12 K18
- 0x70020000, // 0025 JMP #0027
- 0x58300013, // 0026 LDCONST R12 K19
- 0x002C160C, // 0027 ADD R11 R11 R12
- 0x7C200600, // 0028 CALL R8 3
- 0x7C180400, // 0029 CALL R6 2
- 0x8C14030C, // 002A GETMET R5 R1 K12
- 0x8C1C050D, // 002B GETMET R7 R2 K13
- 0x58240014, // 002C LDCONST R9 K20
- 0x88280106, // 002D GETMBR R10 R0 K6
- 0x88281515, // 002E GETMBR R10 R10 K21
- 0x4C2C0000, // 002F LDNIL R11
- 0x1C28140B, // 0030 EQ R10 R10 R11
- 0x782A0001, // 0031 JMPF R10 #0034
- 0x58280010, // 0032 LDCONST R10 K16
- 0x70020000, // 0033 JMP #0035
- 0x5828000B, // 0034 LDCONST R10 K11
- 0x7C1C0600, // 0035 CALL R7 3
- 0x7C140400, // 0036 CALL R5 2
- 0x8C14030C, // 0037 GETMET R5 R1 K12
- 0xB81E0800, // 0038 GETNGBL R7 K4
- 0x881C0F16, // 0039 GETMBR R7 R7 K22
- 0x7C140400, // 003A CALL R5 2
- 0x88140106, // 003B GETMBR R5 R0 K6
- 0x88140B15, // 003C GETMBR R5 R5 K21
- 0x4C180000, // 003D LDNIL R6
- 0x1C140A06, // 003E EQ R5 R5 R6
- 0x78160003, // 003F JMPF R5 #0044
- 0x8C14030C, // 0040 GETMET R5 R1 K12
- 0x581C0017, // 0041 LDCONST R7 K23
- 0x7C140400, // 0042 CALL R5 2
- 0x70020002, // 0043 JMP #0047
- 0x8C14030C, // 0044 GETMET R5 R1 K12
- 0x581C0018, // 0045 LDCONST R7 K24
- 0x7C140400, // 0046 CALL R5 2
- 0x80000000, // 0047 RET 0
+ 0x8C080301, // 0004 GETMET R2 R1 K1
+ 0xB8120600, // 0005 GETNGBL R4 K3
+ 0x88100904, // 0006 GETMBR R4 R4 K4
+ 0x7C080400, // 0007 CALL R2 2
+ 0x8C080301, // 0008 GETMET R2 R1 K1
+ 0x58100005, // 0009 LDCONST R4 K5
+ 0x7C080400, // 000A CALL R2 2
+ 0x80000000, // 000B RET 0
})
)
);
@@ -1640,88 +1306,477 @@ be_local_closure(Matter_UI_show_qrcode, /* name */
/********************************************************************
-** Solidified function: web_add_handler
+** Solidified function: plugin_option
********************************************************************/
-be_local_closure(Matter_UI_web_add_handler, /* name */
+be_local_closure(Matter_UI_plugin_option, /* name */
be_nested_proto(
- 7, /* nstack */
+ 17, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[14]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(split),
+ /* K3 */ be_nested_str_weak(_X7C),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(),
+ /* K6 */ be_nested_str_weak(content_send),
+ /* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E),
+ /* K8 */ be_nested_str_weak(device),
+ /* K9 */ be_nested_str_weak(get_plugin_class_displayname),
+ /* K10 */ be_nested_str_weak(format),
+ /* K11 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E),
+ /* K12 */ be_nested_str_weak(_X20selected),
+ /* K13 */ be_const_int(1),
+ }),
+ be_str_weak(plugin_option),
+ &be_const_str_solidified,
+ ( &(const binstruction[42]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xA4120200, // 0001 IMPORT R4 K1
+ 0x780A0004, // 0002 JMPF R2 #0008
+ 0x8C140902, // 0003 GETMET R5 R4 K2
+ 0x5C1C0400, // 0004 MOVE R7 R2
+ 0x58200003, // 0005 LDCONST R8 K3
+ 0x7C140600, // 0006 CALL R5 3
+ 0x70020001, // 0007 JMP #000A
+ 0x60140012, // 0008 GETGBL R5 G18
+ 0x7C140000, // 0009 CALL R5 0
+ 0x58180004, // 000A LDCONST R6 K4
+ 0x601C000C, // 000B GETGBL R7 G12
+ 0x5C200A00, // 000C MOVE R8 R5
+ 0x7C1C0200, // 000D CALL R7 1
+ 0x141C0C07, // 000E LT R7 R6 R7
+ 0x781E0018, // 000F JMPF R7 #0029
+ 0x941C0A06, // 0010 GETIDX R7 R5 R6
+ 0x1C200F05, // 0011 EQ R8 R7 K5
+ 0x78220003, // 0012 JMPF R8 #0017
+ 0x8C200706, // 0013 GETMET R8 R3 K6
+ 0x58280007, // 0014 LDCONST R10 K7
+ 0x7C200400, // 0015 CALL R8 2
+ 0x7002000F, // 0016 JMP #0027
+ 0x88200108, // 0017 GETMBR R8 R0 K8
+ 0x8C201109, // 0018 GETMET R8 R8 K9
+ 0x5C280E00, // 0019 MOVE R10 R7
+ 0x7C200400, // 001A CALL R8 2
+ 0x8C240706, // 001B GETMET R9 R3 K6
+ 0x8C2C090A, // 001C GETMET R11 R4 K10
+ 0x5834000B, // 001D LDCONST R13 K11
+ 0x5C380E00, // 001E MOVE R14 R7
+ 0x1C3C0E01, // 001F EQ R15 R7 R1
+ 0x783E0001, // 0020 JMPF R15 #0023
+ 0x583C000C, // 0021 LDCONST R15 K12
+ 0x70020000, // 0022 JMP #0024
+ 0x583C0005, // 0023 LDCONST R15 K5
+ 0x5C401000, // 0024 MOVE R16 R8
+ 0x7C2C0A00, // 0025 CALL R11 5
+ 0x7C240400, // 0026 CALL R9 2
+ 0x00180D0D, // 0027 ADD R6 R6 K13
+ 0x7001FFE1, // 0028 JMP #000B
+ 0x80000000, // 0029 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show_enable
+********************************************************************/
+be_local_closure(Matter_UI_show_enable, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[20]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(content_send),
+ /* K7 */ be_nested_str_weak(format),
+ /* K8 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BMatter_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K9 */ be_nested_str_weak(Enabled),
+ /* K10 */ be_nested_str_weak(Disabled),
+ /* K11 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A320px_X3B_X27_X3ECheck_X20the_X20_X3Ca_X20href_X3D_X27https_X3A_X2F_X2Ftasmota_X2Egithub_X2Eio_X2Fdocs_X2FMatter_X2F_X27_X20target_X3D_X27_blank_X27_X3EMatter_X20documentation_X3C_X2Fa_X3E_X2E_X3C_X2Fp_X3E),
+ /* K12 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
+ /* K13 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3Cbutton_X20name_X3D_X27_X25s_X27_X20class_X3D_X27button_X20bgrn_X27_X3E),
+ /* K14 */ be_nested_str_weak(disable),
+ /* K15 */ be_nested_str_weak(enable),
+ /* K16 */ be_nested_str_weak(Disable),
+ /* K17 */ be_nested_str_weak(Enable),
+ /* K18 */ be_nested_str_weak(_X20Matter_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ /* K19 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ }),
+ be_str_weak(show_enable),
+ &be_const_str_solidified,
+ ( &(const binstruction[44]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0xA40E0200, // 0001 IMPORT R3 K1
+ 0xB8120400, // 0002 GETNGBL R4 K2
+ 0x8C100903, // 0003 GETMET R4 R4 K3
+ 0xB81A0800, // 0004 GETNGBL R6 K4
+ 0x88180D05, // 0005 GETMBR R6 R6 K5
+ 0x7C100400, // 0006 CALL R4 2
+ 0x8C140506, // 0007 GETMET R5 R2 K6
+ 0x8C1C0707, // 0008 GETMET R7 R3 K7
+ 0x58240008, // 0009 LDCONST R9 K8
+ 0x78120001, // 000A JMPF R4 #000D
+ 0x58280009, // 000B LDCONST R10 K9
+ 0x70020000, // 000C JMP #000E
+ 0x5828000A, // 000D LDCONST R10 K10
+ 0x7C1C0600, // 000E CALL R7 3
+ 0x7C140400, // 000F CALL R5 2
+ 0x8C140506, // 0010 GETMET R5 R2 K6
+ 0x581C000B, // 0011 LDCONST R7 K11
+ 0x7C140400, // 0012 CALL R5 2
+ 0x8C140506, // 0013 GETMET R5 R2 K6
+ 0x581C000C, // 0014 LDCONST R7 K12
+ 0x7C140400, // 0015 CALL R5 2
+ 0x8C140506, // 0016 GETMET R5 R2 K6
+ 0x8C1C0707, // 0017 GETMET R7 R3 K7
+ 0x5824000D, // 0018 LDCONST R9 K13
+ 0x78120001, // 0019 JMPF R4 #001C
+ 0x5828000E, // 001A LDCONST R10 K14
+ 0x70020000, // 001B JMP #001D
+ 0x5828000F, // 001C LDCONST R10 K15
+ 0x7C1C0600, // 001D CALL R7 3
+ 0x7C140400, // 001E CALL R5 2
+ 0x8C140506, // 001F GETMET R5 R2 K6
+ 0x78120001, // 0020 JMPF R4 #0023
+ 0x581C0010, // 0021 LDCONST R7 K16
+ 0x70020000, // 0022 JMP #0024
+ 0x581C0011, // 0023 LDCONST R7 K17
+ 0x7C140400, // 0024 CALL R5 2
+ 0x8C140506, // 0025 GETMET R5 R2 K6
+ 0x581C0012, // 0026 LDCONST R7 K18
+ 0x7C140400, // 0027 CALL R5 2
+ 0x8C140506, // 0028 GETMET R5 R2 K6
+ 0x581C0013, // 0029 LDCONST R7 K19
+ 0x7C140400, // 002A CALL R5 2
+ 0x80040800, // 002B RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_sensor
+********************************************************************/
+be_local_closure(Matter_UI_web_sensor, /* name */
+ be_nested_proto(
+ 13, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
- 1, /* has sup protos */
- ( &(const struct bproto*[ 2]) {
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(page_part_mgr),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80040000, // 0003 RET 1 R0
- })
- ),
- be_nested_proto(
- 2, /* 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[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(page_part_ctl),
- }),
- be_str_weak(_X3Clambda_X3E),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x68000000, // 0000 GETUPV R0 U0
- 0x8C000100, // 0001 GETMET R0 R0 K0
- 0x7C000200, // 0002 CALL R0 1
- 0x80040000, // 0003 RET 1 R0
- })
- ),
- }),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
+ ( &(const bvalue[25]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
- /* K1 */ be_nested_str_weak(on),
- /* K2 */ be_nested_str_weak(_X2Fmatterc),
- /* K3 */ be_nested_str_weak(HTTP_GET),
- /* K4 */ be_nested_str_weak(HTTP_POST),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(get_option),
+ /* K4 */ be_nested_str_weak(matter),
+ /* K5 */ be_nested_str_weak(MATTER_OPTION),
+ /* K6 */ be_nested_str_weak(device),
+ /* K7 */ be_nested_str_weak(is_root_commissioning_open),
+ /* K8 */ be_nested_str_weak(show_commissioning_info),
+ /* K9 */ be_nested_str_weak(sessions),
+ /* K10 */ be_nested_str_weak(count_active_fabrics),
+ /* K11 */ be_const_int(0),
+ /* K12 */ be_nested_str_weak(content_send),
+ /* K13 */ be_nested_str_weak(format),
+ /* K14 */ be_nested_str_weak(_X3Cdiv_X20style_X3D_X27text_X2Dalign_X3Aright_X3Bfont_X2Dsize_X3A11px_X3Bcolor_X3A_X23aaa_X3B_X27_X3E_X25s_X3C_X2Fdiv_X3E),
+ /* K15 */ be_nested_str_weak(No_X20active_X20association),
+ /* K16 */ be_const_int(1),
+ /* K17 */ be_nested_str_weak(_X20active_X20association),
+ /* K18 */ be_nested_str_weak(s),
+ /* K19 */ be_nested_str_weak(),
+ /* K20 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E),
+ /* K21 */ be_nested_str_weak(commissioning_open),
+ /* K22 */ be_nested_str_weak(_LOGO),
+ /* K23 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E),
+ /* K24 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E),
}),
- be_str_weak(web_add_handler),
+ be_str_weak(web_sensor),
&be_const_str_solidified,
- ( &(const binstruction[13]) { /* code */
+ ( &(const binstruction[72]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x58100002, // 0002 LDCONST R4 K2
- 0x84140000, // 0003 CLOSURE R5 P0
- 0x88180303, // 0004 GETMBR R6 R1 K3
- 0x7C080800, // 0005 CALL R2 4
- 0x8C080301, // 0006 GETMET R2 R1 K1
- 0x58100002, // 0007 LDCONST R4 K2
- 0x84140001, // 0008 CLOSURE R5 P1
- 0x88180304, // 0009 GETMBR R6 R1 K4
- 0x7C080800, // 000A CALL R2 4
- 0xA0000000, // 000B CLOSE R0
- 0x80000000, // 000C RET 0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0xB80E0400, // 0002 GETNGBL R3 K2
+ 0x8C0C0703, // 0003 GETMET R3 R3 K3
+ 0xB8160800, // 0004 GETNGBL R5 K4
+ 0x88140B05, // 0005 GETMBR R5 R5 K5
+ 0x7C0C0400, // 0006 CALL R3 2
+ 0x780E003E, // 0007 JMPF R3 #0047
+ 0x88100106, // 0008 GETMBR R4 R0 K6
+ 0x8C100907, // 0009 GETMET R4 R4 K7
+ 0x7C100200, // 000A CALL R4 1
+ 0x78120001, // 000B JMPF R4 #000E
+ 0x8C100108, // 000C GETMET R4 R0 K8
+ 0x7C100200, // 000D CALL R4 1
+ 0x88100106, // 000E GETMBR R4 R0 K6
+ 0x88100909, // 000F GETMBR R4 R4 K9
+ 0x8C10090A, // 0010 GETMET R4 R4 K10
+ 0x7C100200, // 0011 CALL R4 1
+ 0x1C14090B, // 0012 EQ R5 R4 K11
+ 0x78160006, // 0013 JMPF R5 #001B
+ 0x8C14030C, // 0014 GETMET R5 R1 K12
+ 0x8C1C050D, // 0015 GETMET R7 R2 K13
+ 0x5824000E, // 0016 LDCONST R9 K14
+ 0x5828000F, // 0017 LDCONST R10 K15
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x7C140400, // 0019 CALL R5 2
+ 0x7002000E, // 001A JMP #002A
+ 0x24140910, // 001B GT R5 R4 K16
+ 0x8C18030C, // 001C GETMET R6 R1 K12
+ 0x8C20050D, // 001D GETMET R8 R2 K13
+ 0x5828000E, // 001E LDCONST R10 K14
+ 0x602C0008, // 001F GETGBL R11 G8
+ 0x5C300800, // 0020 MOVE R12 R4
+ 0x7C2C0200, // 0021 CALL R11 1
+ 0x002C1711, // 0022 ADD R11 R11 K17
+ 0x78160001, // 0023 JMPF R5 #0026
+ 0x58300012, // 0024 LDCONST R12 K18
+ 0x70020000, // 0025 JMP #0027
+ 0x58300013, // 0026 LDCONST R12 K19
+ 0x002C160C, // 0027 ADD R11 R11 R12
+ 0x7C200600, // 0028 CALL R8 3
+ 0x7C180400, // 0029 CALL R6 2
+ 0x8C14030C, // 002A GETMET R5 R1 K12
+ 0x8C1C050D, // 002B GETMET R7 R2 K13
+ 0x58240014, // 002C LDCONST R9 K20
+ 0x88280106, // 002D GETMBR R10 R0 K6
+ 0x88281515, // 002E GETMBR R10 R10 K21
+ 0x4C2C0000, // 002F LDNIL R11
+ 0x1C28140B, // 0030 EQ R10 R10 R11
+ 0x782A0001, // 0031 JMPF R10 #0034
+ 0x58280010, // 0032 LDCONST R10 K16
+ 0x70020000, // 0033 JMP #0035
+ 0x5828000B, // 0034 LDCONST R10 K11
+ 0x7C1C0600, // 0035 CALL R7 3
+ 0x7C140400, // 0036 CALL R5 2
+ 0x8C14030C, // 0037 GETMET R5 R1 K12
+ 0xB81E0800, // 0038 GETNGBL R7 K4
+ 0x881C0F16, // 0039 GETMBR R7 R7 K22
+ 0x7C140400, // 003A CALL R5 2
+ 0x88140106, // 003B GETMBR R5 R0 K6
+ 0x88140B15, // 003C GETMBR R5 R5 K21
+ 0x4C180000, // 003D LDNIL R6
+ 0x1C140A06, // 003E EQ R5 R5 R6
+ 0x78160003, // 003F JMPF R5 #0044
+ 0x8C14030C, // 0040 GETMET R5 R1 K12
+ 0x581C0017, // 0041 LDCONST R7 K23
+ 0x7C140400, // 0042 CALL R5 2
+ 0x70020002, // 0043 JMP #0047
+ 0x8C14030C, // 0044 GETMET R5 R1 K12
+ 0x581C0018, // 0045 LDCONST R7 K24
+ 0x7C140400, // 0046 CALL R5 2
+ 0x80000000, // 0047 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_UI_init, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(tasmota),
+ /* K2 */ be_nested_str_weak(add_driver),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 6]) { /* code */
+ 0x90020001, // 0000 SETMBR R0 K0 R1
+ 0xB80A0200, // 0001 GETNGBL R2 K1
+ 0x8C080502, // 0002 GETMET R2 R2 K2
+ 0x5C100000, // 0003 MOVE R4 R0
+ 0x7C080400, // 0004 CALL R2 2
+ 0x80000000, // 0005 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: show_fabric_info
+********************************************************************/
+be_local_closure(Matter_UI_show_fabric_info, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[30]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(content_send),
+ /* K3 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3BFabrics_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K4 */ be_nested_str_weak(_X3Cp_X3EAssociated_X20fabrics_X3A_X3C_X2Fp_X3E),
+ /* K5 */ be_nested_str_weak(device),
+ /* K6 */ be_nested_str_weak(sessions),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(_X3Cp_X3E_X3Cb_X3ENone_X3C_X2Fb_X3E_X3C_X2Fp_X3E),
+ /* K9 */ be_nested_str_weak(fabrics),
+ /* K10 */ be_nested_str_weak(persistables),
+ /* K11 */ be_nested_str_weak(_X3Chr_X3E),
+ /* K12 */ be_nested_str_weak(fabric_label),
+ /* K13 */ be_nested_str_weak(_X3CNo_X20label_X3E),
+ /* K14 */ be_nested_str_weak(html_escape),
+ /* K15 */ be_nested_str_weak(format),
+ /* K16 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X23_X25i_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K17 */ be_nested_str_weak(get_fabric_index),
+ /* K18 */ be_nested_str_weak(get_fabric_id),
+ /* K19 */ be_nested_str_weak(copy),
+ /* K20 */ be_nested_str_weak(reverse),
+ /* K21 */ be_nested_str_weak(get_device_id),
+ /* K22 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E),
+ /* K23 */ be_nested_str_weak(tohex),
+ /* K24 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B),
+ /* K25 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20onsubmit_X3D_X27return_X20confirm_X28_X22Are_X20you_X20sure_X3F_X22_X29_X3B_X27_X3E),
+ /* K26 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25i_X27_X3E),
+ /* K27 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
+ /* K28 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K29 */ be_nested_str_weak(stop_iteration),
+ }),
+ be_str_weak(show_fabric_info),
+ &be_const_str_solidified,
+ ( &(const binstruction[102]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x58140003, // 0003 LDCONST R5 K3
+ 0x7C0C0400, // 0004 CALL R3 2
+ 0x8C0C0302, // 0005 GETMET R3 R1 K2
+ 0x58140004, // 0006 LDCONST R5 K4
+ 0x7C0C0400, // 0007 CALL R3 2
+ 0x600C000C, // 0008 GETGBL R3 G12
+ 0x88100105, // 0009 GETMBR R4 R0 K5
+ 0x88100906, // 000A GETMBR R4 R4 K6
+ 0x88100906, // 000B GETMBR R4 R4 K6
+ 0x7C0C0200, // 000C CALL R3 1
+ 0x1C0C0707, // 000D EQ R3 R3 K7
+ 0x780E0003, // 000E JMPF R3 #0013
+ 0x8C0C0302, // 000F GETMET R3 R1 K2
+ 0x58140008, // 0010 LDCONST R5 K8
+ 0x7C0C0400, // 0011 CALL R3 2
+ 0x7002004E, // 0012 JMP #0062
+ 0x500C0200, // 0013 LDBOOL R3 1 0
+ 0x60100010, // 0014 GETGBL R4 G16
+ 0x88140105, // 0015 GETMBR R5 R0 K5
+ 0x88140B06, // 0016 GETMBR R5 R5 K6
+ 0x88140B09, // 0017 GETMBR R5 R5 K9
+ 0x8C140B0A, // 0018 GETMET R5 R5 K10
+ 0x7C140200, // 0019 CALL R5 1
+ 0x7C100200, // 001A CALL R4 1
+ 0xA8020042, // 001B EXBLK 0 #005F
+ 0x5C140800, // 001C MOVE R5 R4
+ 0x7C140000, // 001D CALL R5 0
+ 0x5C180600, // 001E MOVE R6 R3
+ 0x741A0002, // 001F JMPT R6 #0023
+ 0x8C180302, // 0020 GETMET R6 R1 K2
+ 0x5820000B, // 0021 LDCONST R8 K11
+ 0x7C180400, // 0022 CALL R6 2
+ 0x500C0000, // 0023 LDBOOL R3 0 0
+ 0x88180B0C, // 0024 GETMBR R6 R5 K12
+ 0x5C1C0C00, // 0025 MOVE R7 R6
+ 0x741E0000, // 0026 JMPT R7 #0028
+ 0x5818000D, // 0027 LDCONST R6 K13
+ 0x8C1C030E, // 0028 GETMET R7 R1 K14
+ 0x5C240C00, // 0029 MOVE R9 R6
+ 0x7C1C0400, // 002A CALL R7 2
+ 0x5C180E00, // 002B MOVE R6 R7
+ 0x8C1C0302, // 002C GETMET R7 R1 K2
+ 0x8C24050F, // 002D GETMET R9 R2 K15
+ 0x582C0010, // 002E LDCONST R11 K16
+ 0x8C300B11, // 002F GETMET R12 R5 K17
+ 0x7C300200, // 0030 CALL R12 1
+ 0x5C340C00, // 0031 MOVE R13 R6
+ 0x7C240800, // 0032 CALL R9 4
+ 0x7C1C0400, // 0033 CALL R7 2
+ 0x8C1C0B12, // 0034 GETMET R7 R5 K18
+ 0x7C1C0200, // 0035 CALL R7 1
+ 0x8C1C0F13, // 0036 GETMET R7 R7 K19
+ 0x7C1C0200, // 0037 CALL R7 1
+ 0x8C1C0F14, // 0038 GETMET R7 R7 K20
+ 0x7C1C0200, // 0039 CALL R7 1
+ 0x8C200B15, // 003A GETMET R8 R5 K21
+ 0x7C200200, // 003B CALL R8 1
+ 0x8C201113, // 003C GETMET R8 R8 K19
+ 0x7C200200, // 003D CALL R8 1
+ 0x8C201114, // 003E GETMET R8 R8 K20
+ 0x7C200200, // 003F CALL R8 1
+ 0x8C240302, // 0040 GETMET R9 R1 K2
+ 0x8C2C050F, // 0041 GETMET R11 R2 K15
+ 0x58340016, // 0042 LDCONST R13 K22
+ 0x8C380F17, // 0043 GETMET R14 R7 K23
+ 0x7C380200, // 0044 CALL R14 1
+ 0x7C2C0600, // 0045 CALL R11 3
+ 0x7C240400, // 0046 CALL R9 2
+ 0x8C240302, // 0047 GETMET R9 R1 K2
+ 0x8C2C050F, // 0048 GETMET R11 R2 K15
+ 0x58340018, // 0049 LDCONST R13 K24
+ 0x8C381117, // 004A GETMET R14 R8 K23
+ 0x7C380200, // 004B CALL R14 1
+ 0x7C2C0600, // 004C CALL R11 3
+ 0x7C240400, // 004D CALL R9 2
+ 0x8C240302, // 004E GETMET R9 R1 K2
+ 0x582C0019, // 004F LDCONST R11 K25
+ 0x7C240400, // 0050 CALL R9 2
+ 0x8C240302, // 0051 GETMET R9 R1 K2
+ 0x8C2C050F, // 0052 GETMET R11 R2 K15
+ 0x5834001A, // 0053 LDCONST R13 K26
+ 0x8C380B11, // 0054 GETMET R14 R5 K17
+ 0x7C380200, // 0055 CALL R14 1
+ 0x7C2C0600, // 0056 CALL R11 3
+ 0x7C240400, // 0057 CALL R9 2
+ 0x8C240302, // 0058 GETMET R9 R1 K2
+ 0x582C001B, // 0059 LDCONST R11 K27
+ 0x7C240400, // 005A CALL R9 2
+ 0x8C240302, // 005B GETMET R9 R1 K2
+ 0x582C001C, // 005C LDCONST R11 K28
+ 0x7C240400, // 005D CALL R9 2
+ 0x7001FFBC, // 005E JMP #001C
+ 0x5810001D, // 005F LDCONST R4 K29
+ 0xAC100200, // 0060 CATCH R4 1 0
+ 0xB0080000, // 0061 RAISE 2 R0 R0
+ 0x8C0C0302, // 0062 GETMET R3 R1 K2
+ 0x5814001C, // 0063 LDCONST R5 K28
+ 0x7C0C0400, // 0064 CALL R3 2
+ 0x80000000, // 0065 RET 0
})
)
);
@@ -1734,24 +1789,25 @@ be_local_closure(Matter_UI_web_add_handler, /* name */
be_local_class(Matter_UI,
1,
NULL,
- be_nested_map(16,
+ be_nested_map(17,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(root_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
- { be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) },
- { be_const_key_weak(show_enable, 6), be_const_closure(Matter_UI_show_enable_closure) },
- { be_const_key_weak(init, 11), be_const_closure(Matter_UI_init_closure) },
- { be_const_key_weak(show_passcode_form, -1), be_const_closure(Matter_UI_show_passcode_form_closure) },
- { be_const_key_weak(web_add_config_button, 15), be_const_closure(Matter_UI_web_add_config_button_closure) },
+ { be_const_key_weak(show_plugins_configuration, -1), be_const_closure(Matter_UI_show_plugins_configuration_closure) },
+ { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
+ { be_const_key_weak(show_fabric_info, 7), be_const_closure(Matter_UI_show_fabric_info_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) },
{ be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) },
- { be_const_key_weak(page_part_mgr, -1), be_const_closure(Matter_UI_page_part_mgr_closure) },
- { be_const_key_weak(page_part_ctl, -1), be_const_closure(Matter_UI_page_part_ctl_closure) },
- { be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) },
- { be_const_key_weak(show_plugins_configuration, 14), be_const_closure(Matter_UI_show_plugins_configuration_closure) },
- { be_const_key_weak(device, 13), be_const_var(0) },
- { be_const_key_weak(web_sensor, -1), be_const_closure(Matter_UI_web_sensor_closure) },
- { be_const_key_weak(show_qrcode, -1), be_const_closure(Matter_UI_show_qrcode_closure) },
+ { be_const_key_weak(_ROOT_TYPES, 11), be_nested_str_weak(root) },
+ { be_const_key_weak(show_commissioning_info, 16), be_const_closure(Matter_UI_show_commissioning_info_closure) },
+ { be_const_key_weak(device, -1), be_const_var(0) },
+ { be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) },
+ { be_const_key_weak(page_part_ctl, 5), be_const_closure(Matter_UI_page_part_ctl_closure) },
+ { be_const_key_weak(web_get_arg, 13), be_const_closure(Matter_UI_web_get_arg_closure) },
+ { be_const_key_weak(web_sensor, 12), be_const_closure(Matter_UI_web_sensor_closure) },
+ { be_const_key_weak(show_enable, 14), be_const_closure(Matter_UI_show_enable_closure) },
{ be_const_key_weak(plugin_option, -1), be_const_closure(Matter_UI_plugin_option_closure) },
- { be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) },
+ { be_const_key_weak(show_qrcode, -1), be_const_closure(Matter_UI_show_qrcode_closure) },
+ { be_const_key_weak(page_part_mgr, 3), be_const_closure(Matter_UI_page_part_mgr_closure) },
+ { be_const_key_weak(show_passcode_form, -1), be_const_closure(Matter_UI_show_passcode_form_closure) },
})),
be_str_weak(Matter_UI)
);
From f6763eb37b7638da82c21b3062cbda7cbee39909 Mon Sep 17 00:00:00 2001
From: Christian Baars
Date: Wed, 26 Apr 2023 08:39:29 +0200
Subject: [PATCH 038/289] Berry: add BLE server/advertiser (#18494)
---
lib/libesp32/berry_tasmota/src/be_MI32_lib.c | 7 +
tasmota/include/xsns_62_esp32_mi.h | 59 +++-
.../xdrv_52_3_berry_MI32.ino | 39 ++-
.../tasmota_xsns_sensor/xsns_62_esp32_mi.ino | 312 +++++++++++++++++-
4 files changed, 396 insertions(+), 21 deletions(-)
diff --git a/lib/libesp32/berry_tasmota/src/be_MI32_lib.c b/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
index 89f2757fa..22c0a0bc6 100644
--- a/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
+++ b/lib/libesp32/berry_tasmota/src/be_MI32_lib.c
@@ -44,12 +44,17 @@ module MI32 (scope: global) {
* To use: `import BLE`
*******************************************************************/
+extern int be_BLE_init(bvm *vm);
+
extern void be_BLE_reg_conn_cb(void* function, uint8_t *buffer);
BE_FUNC_CTYPE_DECLARE(be_BLE_reg_conn_cb, "", "cc");
extern void be_BLE_reg_adv_cb(void* function, uint8_t *buffer);
BE_FUNC_CTYPE_DECLARE(be_BLE_reg_adv_cb, "", "c[c]");
+extern void be_BLE_reg_server_cb(void* function, uint8_t *buffer);
+BE_FUNC_CTYPE_DECLARE(be_BLE_reg_server_cb, "", "c[c]");
+
extern void be_BLE_set_MAC(struct bvm *vm, uint8_t *buf, size_t size, uint8_t type);
BE_FUNC_CTYPE_DECLARE(be_BLE_set_MAC, "", "@(bytes)~[i]");
@@ -73,6 +78,7 @@ BE_FUNC_CTYPE_DECLARE(be_BLE_adv_block, "", "@(bytes)~[i]");
/* @const_object_info_begin
module BLE (scope: global) {
+ init, func(be_BLE_init)
conn_cb, ctype_func(be_BLE_reg_conn_cb)
set_svc, ctype_func(be_BLE_set_service)
run, ctype_func(be_BLE_run)
@@ -81,6 +87,7 @@ module BLE (scope: global) {
set_MAC, ctype_func(be_BLE_set_MAC)
adv_watch, ctype_func(be_BLE_adv_watch)
adv_block, ctype_func(be_BLE_adv_block)
+ serv_cb, ctype_func(be_BLE_reg_server_cb)
}
@const_object_info_end */
diff --git a/tasmota/include/xsns_62_esp32_mi.h b/tasmota/include/xsns_62_esp32_mi.h
index 8418554df..52e221d1f 100644
--- a/tasmota/include/xsns_62_esp32_mi.h
+++ b/tasmota/include/xsns_62_esp32_mi.h
@@ -148,6 +148,7 @@ struct MI32connectionContextBerry_t{
NimBLEUUID serviceUUID;
NimBLEUUID charUUID;
uint16_t returnCharUUID;
+ uint16_t handle;
uint8_t MAC[6];
uint8_t * buffer;
uint8_t operation;
@@ -162,17 +163,29 @@ struct MI32notificationBuffer_t{
uint16_t returnCharUUID;
};
+struct BLEqueueBuffer_t{
+ union{
+ uint8_t *buffer;
+ int32_t value;
+ };
+ size_t length;
+ uint16_t returnCharUUID;
+ uint16_t handle;
+ uint16_t type;
+};
+
struct {
// uint32_t period; // set manually in addition to TELE-period, is set to TELE-period after start
TaskHandle_t ScanTask = nullptr;
TaskHandle_t ConnTask = nullptr;
+ TaskHandle_t ServerTask = nullptr;
MI32connectionContextBerry_t *conCtx = nullptr;
union {
struct {
uint32_t init:1;
uint32_t connected:1;
uint32_t autoScan:1;
- uint32_t canScan:1;
+ // uint32_t canScan:1;
uint32_t runningScan:1;
uint32_t updateScan:1;
uint32_t deleteScanTask:1;
@@ -191,6 +204,11 @@ struct {
uint32_t triggerNextConnJob:1;
uint32_t readyForNextConnJob:1;
uint32_t discoverAttributes:1;
+
+ uint32_t triggerNextServerJob:1;
+ uint32_t readyForNextServerJob:1;
+ uint32_t triggerBerryServerCB:1;
+ uint32_t deleteServerTask:1;
};
uint32_t all = 0;
} mode;
@@ -218,8 +236,9 @@ struct {
uint8_t HKinfoMsg = 0;
char hk_setup_code[11];
#endif //USE_MI_HOMEKIT
- void *beConnCB;
+ void *beConnCB;
void *beAdvCB;
+ void *beServerCB;
uint8_t *beAdvBuf;
uint8_t infoMsg = 0;
} MI32;
@@ -379,7 +398,7 @@ const char kMI32DeviceType[] PROGMEM = {"Flora|MJ_HT_V1|LYWSD02|LYWSD03|CGG1|CGD
const char kMI32_ConnErrorMsg[] PROGMEM = "no Error|could not connect|did disconnect|got no service|got no characteristic|can not read|can not notify|can not write|did not write|notify time out";
-const char kMI32_BLEInfoMsg[] PROGMEM = "Scan ended|Got Notification|Did connect|Did disconnect|Still connected|Start passive scanning|Start active scanning";
+const char kMI32_BLEInfoMsg[] PROGMEM = "Scan ended|Got Notification|Did connect|Did disconnect|Still connected|Start passive scanning|Start active scanning|Server characteristic set|Server advertisement set|Server scan response set|Server client did connect|Server client did disconnect";
const char kMI32_HKInfoMsg[] PROGMEM = "HAP core started|HAP core did not start!!|HAP controller disconnected|HAP controller connected|HAP outlet added";
@@ -397,6 +416,33 @@ enum MI32_Commands { // commands useable in console or rules
enum MI32_TASK {
MI32_TASK_SCAN = 0,
MI32_TASK_CONN = 1,
+ MI32_TASK_SERV = 2,
+};
+
+enum BLE_CLIENT_OP {
+BLE_OP_READ = 1,
+BLE_OP_WRITE,
+BLE_OP_SUBSCRIBE,
+BLE_OP_UNSUBSCRIBE, //maybe used later
+BLE_OP_DISCONNECT,
+BLE_OP_GET_NOTIFICATION = 103,
+};
+
+enum BLE_SERVER_OP {
+//commands
+BLE_OP_SET_ADV = 201,
+BLE_OP_SET_SCAN_RESP,
+BLE_OP_SET_CHARACTERISTIC = 211,
+//response
+BLE_OP_ON_READ = 221,
+BLE_OP_ON_WRITE,
+BLE_OP_ON_UNSUBSCRIBE,
+BLE_OP_ON_SUBSCRIBE_TO_NOTIFICATIONS,
+BLE_OP_ON_SUBSCRIBE_TO_INDICATIONS,
+BLE_OP_ON_SUBSCRIBE_TO_NOTIFICATIONS_AND_INDICATIONS,
+BLE_OP_ON_CONNECT,
+BLE_OP_ON_DISCONNECT,
+BLE_OP_ON_STATUS,
};
enum MI32_ConnErrorMsg {
@@ -419,7 +465,12 @@ enum MI32_BLEInfoMsg {
MI32_DID_DISCONNECT,
MI32_STILL_CONNECTED,
MI32_START_SCANNING_PASSIVE,
- MI32_START_SCANNING_ACTIVE
+ MI32_START_SCANNING_ACTIVE,
+ MI32_SERV_CHARACTERISTIC_ADDED,
+ MI32_SERV_ADVERTISEMENT_ADDED,
+ MI32_SERV_SCANRESPONSE_ADDED,
+ MI32_SERV_CLIENT_CONNECTED,
+ MI32_SERV_CLIENT_DISCONNECTED
};
enum MI32_HKInfoMsg {
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_MI32.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_MI32.ino
index 52f9c02e0..eb5e9ed33 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_MI32.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_MI32.ino
@@ -74,9 +74,11 @@ extern "C" {
/********************************************************************
** BLE - generic BLE functions
-********************************************************************/
+********************************************************************/
+ extern bool MI32checkBLEinitialization();
extern void MI32setBerryAdvCB(void* function, uint8_t *buffer);
extern void MI32setBerryConnCB(void* function, uint8_t *buffer);
+ extern void MI32setBerryServerCB(void* function, uint8_t *buffer);
extern bool MI32runBerryConnection(uint8_t operation, bbool response);
extern bool MI32setBerryCtxSvc(const char *Svc, bbool discoverAttributes);
extern bool MI32setBerryCtxChr(const char *Chr);
@@ -84,12 +86,25 @@ extern "C" {
extern bool MI32addMACtoBlockList(uint8_t *MAC, uint8_t type);
extern bool MI32addMACtoWatchList(uint8_t *MAC, uint8_t type);
+ int be_BLE_init(bvm *vm);
+ int be_BLE_init(bvm *vm) {
+ if (MI32checkBLEinitialization() == true){
+ be_return(vm);
+ }
+ be_raise(vm, "ble_error", "BLE: device not initialized");
+ be_return_nil(vm);
+ }
void be_BLE_reg_conn_cb(void* function, uint8_t *buffer);
void be_BLE_reg_conn_cb(void* function, uint8_t *buffer){
MI32setBerryConnCB(function,buffer);
}
+ void be_BLE_reg_server_cb(void* function, uint8_t *buffer);
+ void be_BLE_reg_server_cb(void* function, uint8_t *buffer){
+ MI32setBerryServerCB(function,buffer);
+ }
+
void be_BLE_reg_adv_cb(void* function, uint8_t *buffer);
void be_BLE_reg_adv_cb(void* function, uint8_t *buffer){
if(function == 0){
@@ -193,7 +208,9 @@ BLE.set_chr
BLE.set_MAC
BLE.run(op, optional: bool response)
+
be_BLE_op:
+# client
1 read
2 write
3 subscribe
@@ -205,8 +222,28 @@ be_BLE_op:
13 subscribe once, then disconnect
14 unsubscribe once, then disconnect - maybe later
+#server
+__commands
+201 add/set advertisement
+202 add/set scan response
+
+211 add/set characteristic
+
+__response
+221 onRead
+222 onWrite
+223 unsubscribed
+224 subscribed to notifications
+225 subscribed to indications
+226 subscribed to notifications and indications
+227 onConnect
+228 onDisconnect
+229 onStatus
+
+
BLE.conn_cb(cb,buffer)
BLE.adv_cb(cb,buffer)
+BLE.serv_cb(cb,buffer)
BLE.adv_watch(MAC)
BLE.adv_block(MAC)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino
index b57503b2c..4e188e0b9 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_62_esp32_mi.ino
@@ -163,9 +163,77 @@ class MI32AdvCallbacks: public NimBLEAdvertisedDeviceCallbacks {
};
};
+static std::queue BLEmessageQueue;
+
+class MI32ServerCallbacks: public NimBLEServerCallbacks {
+ void onConnect(NimBLEServer* pServer, ble_gap_conn_desc* desc) {
+ BLEqueueBuffer_t q;
+ q.length = 6;
+ q.type = BLE_OP_ON_CONNECT;
+ q.buffer = new uint8_t[q.length];
+ memcpy(q.buffer,desc->peer_ota_addr.val,6);
+ BLEmessageQueue.push(q);
+ MI32.infoMsg = MI32_SERV_CLIENT_CONNECTED;
+ };
+ void onDisconnect(NimBLEServer* pServer) {
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ q.type = BLE_OP_ON_DISCONNECT;
+ memset(MI32.conCtx->MAC,0,6);
+ BLEmessageQueue.push(q);
+ MI32.infoMsg = MI32_SERV_CLIENT_DISCONNECTED;
+ NimBLEDevice::startAdvertising();
+ };
+};
+
+class MI32CharacteristicCallbacks: public NimBLECharacteristicCallbacks {
+ void onRead(NimBLECharacteristic* pCharacteristic){
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ q.type = BLE_OP_ON_READ;
+ q.returnCharUUID = pCharacteristic->getUUID().getNative()->u16.value;
+ q.handle = pCharacteristic->getHandle();
+ BLEmessageQueue.push(q);
+ };
+
+ void onWrite(NimBLECharacteristic* pCharacteristic) {
+ BLEqueueBuffer_t q;
+ q.type = BLE_OP_ON_WRITE;
+ q.returnCharUUID = pCharacteristic->getUUID().getNative()->u16.value;
+ q.handle = pCharacteristic->getHandle();
+ q.length = pCharacteristic->getDataLength();
+ q.buffer = new uint8_t[q.length];
+ memcpy(q.buffer,pCharacteristic->getValue(),pCharacteristic->getDataLength());
+ BLEmessageQueue.push(q);
+ };
+
+ /** The status returned in status is defined in NimBLECharacteristic.h.
+ * The value returned in code is the NimBLE host return code.
+ */
+ void onStatus(NimBLECharacteristic* pCharacteristic, Status status, int code) {
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ q.type = BLE_OP_ON_STATUS;
+ q.returnCharUUID = pCharacteristic->getUUID().getNative()->u16.value;
+ q.handle = pCharacteristic->getHandle();
+ q.value = code;
+ BLEmessageQueue.push(q);
+ };
+
+ void onSubscribe(NimBLECharacteristic* pCharacteristic, ble_gap_conn_desc* desc, uint16_t subValue) {
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ q.type = BLE_OP_ON_UNSUBSCRIBE + subValue;
+ q.returnCharUUID = pCharacteristic->getUUID().getNative()->u16.value;
+ q.handle = pCharacteristic->getHandle();
+ BLEmessageQueue.push(q);
+ };
+};
+
static MI32AdvCallbacks MI32ScanCallbacks;
static MI32SensorCallback MI32SensorCB;
+static MI32CharacteristicCallbacks MI32ChrCallback;
static NimBLEClient* MI32Client;
static std::queue MI32NotificationQueue;
@@ -653,8 +721,9 @@ void MI32Init(void) {
if (!MI32.mode.init) {
NimBLEDevice::setScanFilterMode(CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE);
NimBLEDevice::setScanDuplicateCacheSize(40); // will not be perfect for every situation (few vs many BLE devices nearby)
- NimBLEDevice::init("");
- AddLog(LOG_LEVEL_INFO,PSTR("M32: Init BLE device"));
+ const std::string name(TasmotaGlobal.hostname);
+ NimBLEDevice::init(name);
+ AddLog(LOG_LEVEL_INFO,PSTR("M32: Init BLE device: %s"),TasmotaGlobal.hostname);
MI32.mode.init = 1;
MI32.mode.readyForNextConnJob = 1;
MI32StartTask(MI32_TASK_SCAN); // Let's get started !!
@@ -672,21 +741,41 @@ void MI32Init(void) {
\*********************************************************************************************/
extern "C" {
+ bool MI32checkBLEinitialization(){
+ return (MI32.mode.init && Settings->flag5.mi32_enable);
+ }
+
+ bool MI32runBerryServer(uint16_t operation, bool response){
+ MI32.conCtx->operation = operation;
+ MI32.conCtx->response = response;
+ AddLog(LOG_LEVEL_DEBUG,PSTR("BLE: Berry server op: %d, response: %u"),MI32.conCtx->operation, MI32.conCtx->response);
+ if(MI32.mode.readyForNextServerJob == 0){
+ MI32.mode.triggerNextServerJob = 0;
+ AddLog(LOG_LEVEL_DEBUG,PSTR("M32: old server job not finished yet!!"));
+ return false;
+ }
+ MI32.mode.triggerNextServerJob = 1;
+ return true;
+ }
+
bool MI32runBerryConnection(uint8_t operation, bool response){
if(MI32.conCtx != nullptr){
+ if(operation > 200){
+ return MI32runBerryServer(operation,response);
+ }
MI32.conCtx->oneOp = (operation > 9);
MI32.conCtx->operation = operation%10;
MI32.conCtx->response = response;
- AddLog(LOG_LEVEL_DEBUG,PSTR("M32: Berry connection op: %d, addrType: %d, oneOp: %u, response: %u"),MI32.conCtx->operation, MI32.conCtx->addrType, MI32.conCtx->oneOp, MI32.conCtx->response);
+ AddLog(LOG_LEVEL_DEBUG,PSTR("BLE: Berry connection op: %d, addrType: %d, oneOp: %u, response: %u"),MI32.conCtx->operation, MI32.conCtx->addrType, MI32.conCtx->oneOp, MI32.conCtx->response);
if(MI32.conCtx->oneOp){
MI32StartConnectionTask();
}
else{
if(MI32.mode.connected){
- AddLog(LOG_LEVEL_DEBUG,PSTR("M32: continue connection job"));
+ AddLog(LOG_LEVEL_DEBUG,PSTR("BLE: continue connection job"));
MI32.mode.triggerNextConnJob = 1;
if(!MI32.mode.readyForNextConnJob){
- AddLog(LOG_LEVEL_DEBUG,PSTR("M32: old connection job not finished yet!!"));
+ AddLog(LOG_LEVEL_DEBUG,PSTR("BLE: old connection job not finished yet!!"));
}
}
else{
@@ -704,7 +793,24 @@ extern "C" {
}
MI32.conCtx->buffer = buffer;
MI32.beConnCB = function;
- AddLog(LOG_LEVEL_INFO,PSTR("M32: Connection Ctx created"));
+ AddLog(LOG_LEVEL_INFO,PSTR("BLE: Connection Ctx created"));
+ }
+
+ void MI32setBerryServerCB(void* function, uint8_t *buffer){
+ if(function == nullptr || buffer == nullptr)
+ {
+ MI32.mode.deleteServerTask = 1;
+ MI32.beServerCB = nullptr;
+ AddLog(LOG_LEVEL_INFO,PSTR("BLE: Server session stopping"));
+ return;
+ }
+ if(MI32.conCtx == nullptr){
+ MI32.conCtx = new MI32connectionContextBerry_t;
+ }
+ MI32.conCtx->buffer = buffer;
+ MI32.beServerCB = function;
+ MI32StartTask(MI32_TASK_SERV);
+ AddLog(LOG_LEVEL_INFO,PSTR("BLE: Server Ctx created"));
}
bool MI32setBerryCtxSvc(const char *Svc, bool discoverAttributes){
@@ -723,7 +829,7 @@ extern "C" {
AddLog(LOG_LEVEL_DEBUG,PSTR("M32: CHR: %s"),MI32.conCtx->charUUID.toString().c_str());
uint16_t _uuid = MI32.conCtx->charUUID.getNative()->u16.value; //if not "notify op" -> present requested characteristic as return UUID
MI32.conCtx->returnCharUUID = _uuid;
- AddLog(LOG_LEVEL_DEBUG,PSTR("M32: return UUID: %04x"),MI32.conCtx->returnCharUUID);
+ AddLog(LOG_LEVEL_DEBUG,PSTR("M32: return 16-bit UUID: %04x"),MI32.conCtx->returnCharUUID);
return true;
}
return false;
@@ -846,7 +952,7 @@ extern "C" {
case 5: //HAP_EVENT_PAIRING_STARTED
MI32suspendScanTask();
default:
- vTaskResume(MI32.ScanTask);
+ MI32resumeScanTask();
}
if(event==4){
MI32.HKinfoMsg = MI32_HAP_CONTROLLER_DISCONNECTED;
@@ -1042,7 +1148,11 @@ void MI32saveConfig(){
\*********************************************************************************************/
void MI32suspendScanTask(void){
- if (MI32.ScanTask != nullptr) vTaskSuspend(MI32.ScanTask);
+ if (MI32.ScanTask != nullptr && MI32.mode.runningScan == 1) vTaskSuspend(MI32.ScanTask);
+}
+
+void MI32resumeScanTask(void){
+ if (MI32.ScanTask != nullptr && MI32.mode.runningScan == 1) vTaskResume(MI32.ScanTask);
}
void MI32StartTask(uint32_t task){
@@ -1057,15 +1167,22 @@ void MI32StartTask(uint32_t task){
MI32.mode.deleteScanTask = 1;
MI32StartConnectionTask();
break;
+ case MI32_TASK_SERV:
+ MI32.mode.deleteScanTask = 1;
+ MI32StartServerTask();
+ break;
default:
break;
}
}
+// Scan task section
+
void MI32StartScanTask(){
- if (MI32.mode.connected) return;
+ if (MI32.mode.connected == 1) return;
if(MI32.ScanTask!=nullptr) vTaskDelete(MI32.ScanTask);
MI32.mode.runningScan = 1;
+ MI32.mode.deleteScanTask = 0;
xTaskCreatePinnedToCore(
MI32ScanTask, /* Function to implement the task */
"MI32ScanTask", /* Name of the task */
@@ -1098,13 +1215,14 @@ void MI32ScanTask(void *pvParameters){
uint32_t timer = 0;
for(;;){
- vTaskDelay(1000/ portTICK_PERIOD_MS);
- if(MI32.mode.deleteScanTask){
+ vTaskDelay(100/ portTICK_PERIOD_MS);
+ if(MI32.mode.deleteScanTask == 1){
MI32Scan->stop();
MI32.mode.runningScan = 0;
+ MI32.ScanTask = nullptr;
break;
}
- if(MI32.mode.updateScan){
+ if(MI32.mode.updateScan == 1){
MI32Scan->stop();
MI32Scan->setActiveScan(MI32.option.activeScan == 1);
MI32Scan->start(0,true);
@@ -1115,6 +1233,8 @@ void MI32ScanTask(void *pvParameters){
vTaskDelete( NULL );
}
+// connection task section
+
bool MI32ConnectActiveSensor(){ // only use inside a task !!
if(MI32.conCtx->operation == 5) {
return false;
@@ -1307,6 +1427,144 @@ void MI32ConnectionTask(void *pvParameters){
vTaskDelete( NULL );
}
+// server task section
+
+bool MI32StartServerTask(){
+ AddLog(LOG_LEVEL_DEBUG,PSTR("BLE: Server task ... start"));
+ MI32NotificationQueue = {};
+ xTaskCreatePinnedToCore(
+ MI32ServerTask, /* Function to implement the task */
+ "MI32ServerTask", /* Name of the task */
+ 8192, /* Stack size in words */
+ NULL, /* Task input parameter */
+ 2, /* Priority of the task */
+ &MI32.ServerTask, /* Task handle. */
+ 0); /* Core where the task should run */
+ return true;
+}
+
+void MI32ServerSetAdv(NimBLEServer *pServer, std::vector& servicesToStart, bool &shallStartServices);
+void MI32ServerSetAdv(NimBLEServer *pServer, std::vector& servicesToStart, bool &shallStartServices){
+ NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ if(shallStartServices && MI32.conCtx->operation == BLE_OP_SET_ADV){
+ q.buffer = new uint8_t[256];
+ for (auto & pService : servicesToStart) {
+ pService->start();
+ }
+ shallStartServices = false; // only do this at the first run
+ if(servicesToStart.size() != 0){
+ pServer->start(); // only start server when svc and chr do exist
+ uint32_t idx = 0;
+ for (auto & pService : servicesToStart) {
+ std::vector characteristics = pService->getCharacteristics();
+ for (auto & pCharacteristic : characteristics) {
+ uint16_t handle = pCharacteristic->getHandle(); // now we have handles, so pass them to Berry
+ q.buffer[idx] = (uint8_t)handle>>8;
+ q.buffer[idx+1] = (uint8_t)handle&0xff;
+ if (idx > 254) break; // limit to 127 characteristics
+ idx += 2;
+ }
+ }
+ q.length = idx;
+ }
+ servicesToStart.clear(); // release vector
+ }
+ NimBLEAdvertisementData adv;
+ adv.addData((char *)&MI32.conCtx->buffer[1], MI32.conCtx->buffer[0]);
+ if(MI32.conCtx->operation == BLE_OP_SET_ADV){
+ pAdvertising->setAdvertisementData(adv); // replace whole advertisement with our custom data from the Berry side
+ pAdvertising->start();
+ } else
+ {
+ pAdvertising->setScanResponseData(adv);
+ pAdvertising->setScanResponse(true);
+ }
+
+ MI32.infoMsg = MI32_SERV_SCANRESPONSE_ADDED + (MI32.conCtx->operation - BLE_OP_SET_SCAN_RESP); // .. ADV or SCAN RESPONSE
+ q.type = MI32.conCtx->operation;
+ q.returnCharUUID = 0; // does not matter
+ q.handle = 0; //dito
+ BLEmessageQueue.push(q);
+}
+
+void MI32ServerSetCharacteristic(NimBLEServer *pServer, std::vector& servicesToStart, bool &shallStartServices);
+void MI32ServerSetCharacteristic(NimBLEServer *pServer, std::vector& servicesToStart, bool &shallStartServices){
+ MI32.conCtx->error = MI32_CONN_NO_ERROR;
+ NimBLEService *pService = pServer->getServiceByUUID(MI32.conCtx->serviceUUID); // retrieve ...
+ if(pService == nullptr){
+ pService = pServer->createService(MI32.conCtx->serviceUUID); //... or create service.
+ if(pService == nullptr){
+ MI32.conCtx->error = MI32_CONN_NO_SERVICE;
+ return;
+ }
+
+ if(shallStartServices){
+ servicesToStart.push_back(pService);
+ }
+ }
+ NimBLECharacteristic *pCharacteristic = pService->getCharacteristic(MI32.conCtx->charUUID); // again retrieve ...
+ if(pCharacteristic == nullptr){
+ uint32_t _writeRSP = MI32.conCtx->response ? NIMBLE_PROPERTY::WRITE : NIMBLE_PROPERTY::WRITE_NR;
+ pCharacteristic = pService->createCharacteristic(MI32.conCtx->charUUID,
+ NIMBLE_PROPERTY::READ |
+ _writeRSP |
+ NIMBLE_PROPERTY::NOTIFY |
+ NIMBLE_PROPERTY::INDICATE); //... or create characteristic.
+ if(pCharacteristic == nullptr){
+ MI32.conCtx->error = MI32_CONN_NO_CHARACTERISTIC;
+ return;
+ }
+ pCharacteristic->setCallbacks(&MI32ChrCallback);
+ MI32.infoMsg = MI32_SERV_CHARACTERISTIC_ADDED;
+ }
+ pCharacteristic->setValue(MI32.conCtx->buffer + 1, MI32.conCtx->buffer[0]); // set value
+ pCharacteristic->notify(true); // always notify .. for now
+ BLEqueueBuffer_t q;
+ q.length = 0;
+ q.type = BLE_OP_SET_CHARACTERISTIC;
+ q.returnCharUUID = pCharacteristic->getUUID().getNative()->u16.value;
+ q.handle = pCharacteristic->getHandle(); // this returns "-1", no valid handle yet :(
+ BLEmessageQueue.push(q);
+}
+
+void MI32ServerTask(void *pvParameters){
+ MI32.conCtx->error = MI32_CONN_NO_ERROR;
+ NimBLEServer *pServer = NimBLEDevice::createServer();
+ pServer->setCallbacks(new MI32ServerCallbacks());
+ MI32.mode.readyForNextServerJob = 1;
+ MI32.mode.deleteServerTask = 0;
+ std::vector servicesToStart;
+ bool shallStartServices = true; //will start service at the first call MI32ServerSetAdv()
+
+ for(;;){
+ while(MI32.mode.triggerNextServerJob == 0){
+ if(MI32.mode.deleteServerTask == 1){
+ delete MI32.conCtx;
+ MI32.conCtx = nullptr;
+ pServer->stopAdvertising();
+ MI32StartTask(MI32_TASK_SCAN);
+ vTaskDelete( NULL );
+ }
+ vTaskDelay(50/ portTICK_PERIOD_MS);
+ }
+ MI32.mode.readyForNextServerJob = 0;
+ switch(MI32.conCtx->operation){
+ case BLE_OP_SET_ADV: case BLE_OP_SET_SCAN_RESP:
+ MI32ServerSetAdv(pServer, servicesToStart, shallStartServices);
+ break;
+ case BLE_OP_SET_CHARACTERISTIC:
+ MI32ServerSetCharacteristic(pServer, servicesToStart, shallStartServices);
+ break;
+ }
+
+ MI32.mode.triggerNextServerJob = 0;
+ MI32.mode.readyForNextServerJob = 1;
+ MI32.mode.triggerBerryServerCB = 1;
+ }
+}
+
/*********************************************************************************************\
* parse the response from advertisements
\*********************************************************************************************/
@@ -1720,6 +1978,28 @@ void MI32Every50mSecond(){
}
MI32.mode.triggerBerryConnCB = 0;
}
+
+ if(!BLEmessageQueue.empty()){
+ BLEqueueBuffer_t q = BLEmessageQueue.front();
+ BLEmessageQueue.pop();
+ MI32.conCtx->returnCharUUID = q.returnCharUUID;
+ MI32.conCtx->handle = q.handle;
+ MI32.conCtx->operation = q.type;
+ MI32.conCtx->error = 0;
+ if(q.length != 0){
+ MI32.conCtx->buffer[0] = q.length;
+ memcpy(MI32.conCtx->buffer + 1,q.buffer,q.length);
+ delete q.buffer;
+ }
+ if(MI32.beServerCB != nullptr){
+ void (*func_ptr)(int, int, int, int) = (void (*)(int, int, int, int))MI32.beServerCB;
+ char _message[32];
+ GetTextIndexed(_message, sizeof(_message), MI32.conCtx->error, kMI32_ConnErrorMsg);
+ AddLog(LOG_LEVEL_DEBUG,PSTR("M32: BryCbMsg: %s"),_message);
+ func_ptr(MI32.conCtx->error, MI32.conCtx->operation , MI32.conCtx->returnCharUUID, MI32.conCtx->handle);
+ }
+ }
+
if(MI32.infoMsg > 0){
char _message[32];
GetTextIndexed(_message, sizeof(_message), MI32.infoMsg-1, kMI32_BLEInfoMsg);
@@ -2057,7 +2337,7 @@ void MI32InitGUI(void){
WSContentSend_P(PSTR(""));
WSContentSpaceButton(BUTTON_MAIN);
WSContentStop();
- vTaskResume(MI32.ScanTask);
+ MI32resumeScanTask();
}
void MI32HandleWebGUI(void){
@@ -2246,7 +2526,7 @@ void MI32Show(bool json)
MI32addHistory(MI32.energy_history,Energy->active_power[0],100); //TODO: which value??
#endif //USE_MI_ESP32_ENERGY
#endif //USE_MI_EXT_GUI
- vTaskResume(MI32.ScanTask);
+ MI32resumeScanTask();
#ifdef USE_WEBSERVER
} else {
MI32suspendScanTask();
@@ -2309,7 +2589,7 @@ void MI32Show(bool json)
#endif //USE_MI_EXT_GUI
#endif // USE_WEBSERVER
}
- vTaskResume(MI32.ScanTask);
+ MI32resumeScanTask();
}
int ExtStopBLE(){
From bec24baa7544fd0e02947634575a3acbabc28e7d Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Wed, 26 Apr 2023 08:39:49 +0200
Subject: [PATCH 039/289] Changes JSON message to actual position and not
outdated (#18502)
* Report actual position in JSON
* Update xdrv_27_shutter.ino
* Update xdrv_27_esp32_shutter.ino
* copy&paste error
---
.../xdrv_27_esp32_shutter.ino | 19 +++++--------------
.../tasmota_xdrv_driver/xdrv_27_shutter.ino | 7 +++++++
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
index 6b3499f4d..6f1c9b853 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
@@ -1595,11 +1595,6 @@ void CmndShutterCloseTime(void)
ShutterSettings.shutter_closetime[XdrvMailbox.index -1] = (uint16_t)(10 * CharToFloat(XdrvMailbox.data));
ShutterInit();
}
-/*
- char time_chr[10];
- dtostrfd((float)(ShutterSettings.shutter_closetime[XdrvMailbox.index -1]) / 10, 1, time_chr);
- ResponseCmndIdxChar(time_chr);
-*/
ResponseCmndIdxFloat((float)(ShutterSettings.shutter_closetime[XdrvMailbox.index -1]) / 10, 1);
}
}
@@ -1612,11 +1607,6 @@ void CmndShutterMotorDelay(void)
ShutterInit();
//AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Shtr Init1. realdelay %d"),Shutter[XdrvMailbox.index -1].motordelay);
}
-/*
- char time_chr[10];
- dtostrfd((float)(Shutter[XdrvMailbox.index -1].motordelay) / STEPS_PER_SECOND, 2, time_chr);
- ResponseCmndIdxChar(time_chr);
-*/
ResponseCmndIdxFloat((float)(Shutter[XdrvMailbox.index -1].motordelay) / STEPS_PER_SECOND, 2);
}
}
@@ -2192,11 +2182,12 @@ bool Xdrv27(uint32_t function)
break;
case FUNC_JSON_APPEND:
for (uint8_t i = 0; i < TasmotaGlobal.shutters_present; i++) {
- uint8_t position = (ShutterSettings.shutter_options[i] & 1) ? 100 - ShutterSettings.shutter_position[i] : ShutterSettings.shutter_position[i];
- uint8_t target = (ShutterSettings.shutter_options[i] & 1) ? 100 - ShutterRealToPercentPosition(Shutter[i].target_position, i) : ShutterRealToPercentPosition(Shutter[i].target_position, i);
+ uint8_t position = ShutterRealToPercentPosition(Shutter[i].real_position, i);
+ uint8_t target = ShutterRealToPercentPosition(Shutter[i].target_position, i);
ResponseAppend_P(",");
- ResponseAppend_P(JSON_SHUTTER_POS, i+1, position, Shutter[i].direction,target, Shutter[i].tilt_real_pos);
+ ResponseAppend_P(JSON_SHUTTER_POS, i+1, ((ShutterSettings.shutter_options[i] & 1) ? 100 - position : position), Shutter[i].direction,
+ ((ShutterSettings.shutter_options[i] & 1) ? 100 - target : target), Shutter[i].tilt_real_pos);
#ifdef USE_DOMOTICZ
if ((0 == TasmotaGlobal.tele_period) && (0 == i)) {
DomoticzSensor(DZ_SHUTTER, position);
@@ -2308,6 +2299,6 @@ void CmndShutterUnitTest(void) {
}
#else
void CmndShutterUnitTest(void) {}
-#endif
+#endif // SHUTTER_UNITTEST
#endif // ESP32
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
index 18940e681..566778289 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
@@ -1922,6 +1922,13 @@ bool Xdrv27(uint32_t function)
result = DecodeCommand(kShutterCommands, ShutterCommand);
}
break;
+ for (uint8_t i = counter; i <= counterend; i++) {
+ XdrvMailbox.index = i;
+ XdrvMailbox.payload = rescue_payload;
+ XdrvMailbox.data_len = rescue_data_len;
+ result = DecodeCommand(kShutterCommands, ShutterCommand);
+ }
+ break;
case FUNC_JSON_APPEND:
for (uint8_t i = 0; i < TasmotaGlobal.shutters_present; i++) {
uint8_t position = (Settings->shutter_options[i] & 1) ? 100 - Settings->shutter_position[i] : Settings->shutter_position[i];
From afbdb3d54f29b5878a452d3f976e2031c1698173 Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Wed, 26 Apr 2023 11:39:59 +0200
Subject: [PATCH 040/289] Added TILTCONFIG to status13 message for MATTER
support (#18512)
---
tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino | 7 +++++--
1 file changed, 5 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 6f1c9b853..bb7aec959 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
@@ -327,11 +327,14 @@ bool ShutterStatus(void) {
ResponseAppend_P(PSTR("\"" D_STATUS13_SHUTTER "%d\":{\"Relay1\":%d,\"Relay2\":%d,\"Open\":%d,\"Close\":%d,"
"\"50perc\":%d,\"Delay\":%d,\"Opt\":\"%s\","
"\"Calib\":[%d,%d,%d,%d,%d],"
- "\"Mode\":\"%d\"}"),
+ "\"Mode\":\"%d\","
+ "\"TiltConfig\":[%d,%d,%d,%d,%d]}"),
i, ShutterSettings.shutter_startrelay[i], ShutterSettings.shutter_startrelay[i] +1, ShutterSettings.shutter_opentime[i], ShutterSettings.shutter_closetime[i],
ShutterSettings.shutter_set50percent[i], ShutterSettings.shutter_motordelay[i], GetBinary8(Settings->shutter_options[i], 4).c_str(),
ShutterSettings.shuttercoeff[0][i], ShutterSettings.shuttercoeff[1][i], ShutterSettings.shuttercoeff[2][i], ShutterSettings.shuttercoeff[3][i], ShutterSettings.shuttercoeff[4][i],
- ShutterSettings.shutter_mode);
+ ShutterSettings.shutter_mode,
+ ShutterSettings.shutter_tilt_config[0][i], ShutterSettings.shutter_tilt_config[1][i], ShutterSettings.shutter_tilt_config[2][i], ShutterSettings.shutter_tilt_config[3][i], ShutterSettings.shutter_tilt_config[4][i]
+ );
}
ResponseJsonEndEnd();
return true;
From 4c685967e6a2319bc88042f6ec74986987e67de9 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Wed, 26 Apr 2023 14:10:11 +0200
Subject: [PATCH 041/289] Update changelogs
---
CHANGELOG.md | 4 ++--
RELEASENOTES.md | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3add3bec2..cc77eec5a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,8 +8,8 @@ All notable changes to this project will be documented in this file.
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
-- Matter add UI to change endpoints configuration (#18498)
-- Matter add support for Shutters (without Tilt)
+- Matter UI to change endpoints configuration (#18498)
+- Matter support for Shutters (without Tilt) (#18509)
### Breaking Changed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 88b95bc01..c30e4cfa6 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -115,7 +115,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
- Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451)
-- Matter add UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498)
+- Matter UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498)
+- Matter support for Shutters (without Tilt) [#18509](https://github.com/arendst/Tasmota/issues/18509)
### Breaking Changed
From ee9d086abacbec1d9d0d4d5850212661ad0656e3 Mon Sep 17 00:00:00 2001
From: Jeroen
Date: Wed, 26 Apr 2023 22:27:53 +0200
Subject: [PATCH 042/289] Solved: ModbusBridge reading int16 returns uint16
(#18524)
https://github.com/arendst/Tasmota/issues/18522
Co-authored-by: JeroenSt
---
tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
index f75217fd1..570cf7049 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
@@ -485,7 +485,7 @@ void ModbusBridgeHandle(void)
((uint8_t *)&value)[0] = modbusBridge.buffer[dataOffset + 3 + (count * 4)];
}
if (modbusBridge.type == ModbusBridgeType::mb_int32)
- snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", value);
+ snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", (int32_t)value);
else
snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%u", value);
}
@@ -506,7 +506,7 @@ void ModbusBridgeHandle(void)
((uint8_t *)&value)[0] = modbusBridge.buffer[dataOffset + 1 + (count * 2)];
}
if (modbusBridge.type == ModbusBridgeType::mb_int16)
- snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", value);
+ snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", (int16_t)value);
else
snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%u", value);
}
@@ -515,7 +515,7 @@ void ModbusBridgeHandle(void)
{
uint8_t value = modbusBridge.buffer[dataOffset + (count * 1)];
if (modbusBridge.type == ModbusBridgeType::mb_int8)
- snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", value);
+ snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%d", (int8_t)value);
else
snprintf(svalue, MBR_MAX_VALUE_LENGTH, "%u", value);
}
From 670232178457bd0418bec3a0e429b0c7b7fa7868 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Wed, 26 Apr 2023 22:53:26 +0200
Subject: [PATCH 043/289] Matter shutter with tilt (#18525)
---
.../berry_matter/src/be_matter_module.c | 2 +
.../src/embedded/Matter_Device.be | 5 +-
.../src/embedded/Matter_Plugin_Shutter.be | 29 +-
.../src/embedded/Matter_Plugin_ShutterTilt.be | 114 +++++
.../berry_matter/src/embedded/Matter_UI.be | 2 +-
.../src/solidify/solidified_Matter_Device.h | 465 +++++++++---------
.../solidified_Matter_Plugin_Shutter.h | 336 +++++--------
.../solidified_Matter_Plugin_ShutterTilt.h | 219 +++++++++
.../src/solidify/solidified_Matter_UI.h | 2 +-
.../xdrv_52_3_berry_zigbee.ino | 5 +-
10 files changed, 715 insertions(+), 464 deletions(-)
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 9a82abce2..459518fee 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -160,6 +160,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Light2.h"
#include "solidify/solidified_Matter_Plugin_Light3.h"
#include "solidify/solidified_Matter_Plugin_Shutter.h"
+#include "solidify/solidified_Matter_Plugin_ShutterTilt.h"
#include "solidify/solidified_Matter_Plugin_Sensor.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Pressure.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
@@ -339,6 +340,7 @@ module matter (scope: global, strings: weak) {
Plugin_Light2, class(be_class_Matter_Plugin_Light2) // Color Temperature Light
Plugin_Light3, class(be_class_Matter_Plugin_Light3) // Extended Color Light
Plugin_Shutter, class(be_class_Matter_Plugin_Shutter) // Shutter
+ Plugin_ShutterTilt, class(be_class_Matter_Plugin_ShutterTilt) // Shutter + Tilt
Plugin_Sensor, class(be_class_Matter_Plugin_Sensor) // Generic Sensor
Plugin_Sensor_Pressure, class(be_class_Matter_Plugin_Sensor_Pressure) // Pressure Sensor
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index abd767d8a..e96321fb8 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -1048,8 +1048,11 @@ class Matter_Device
if relay2 >= 0 relays_reserved.push(relay2) end
tasmota.log(string.format("MTR: relay1 = %s, relay2 = %s", relay1, relay2), 3)
+ # is there tilt support
+ var tilt_array = d.find('TiltConfig')
+ var tilt_config = tilt_array && (tilt_array[2] > 0)
# add shutter to definition
- m[str(endpoint)] = {'type':'shutter','shutter':idx}
+ m[str(endpoint)] = {'type': tilt_config ? 'shutter+tilt' : 'shutter', 'shutter':idx}
endpoint += 1
idx += 1
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
index 408e74ba7..c3e0f38df 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
@@ -34,7 +34,7 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
- 0x0102: [0,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,0x17,0xFFFC,0xFFFD], # Window Covering 5.3 p.289
+ 0x0102: [0,5,7,0xA,0xB,0xD,0xE,0x17,0xFFFC,0xFFFD], # Window Covering 5.3 p.289
}
static var TYPES = { 0x0202: 2 } # New data model format and notation
@@ -79,34 +79,24 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
elif attribute == 0x0005 # ---------- NumberOfActuationsLift / u16 ----------
return TLV.create_TLV(TLV.U2, 0)
- elif attribute == 0x0006 # ---------- NumberOfActuationsTilt / u16 ----------
- return TLV.create_TLV(TLV.U2, 0)
elif attribute == 0x0007 # ---------- ConfigStatus / u8 ----------
- return TLV.create_TLV(TLV.U1, 1 + 8 + 16) # Operational + Lift Position Aware + Tilt Position Aware
+ return TLV.create_TLV(TLV.U1, 1 + 8) # Operational + Lift Position Aware
elif attribute == 0x000D # ---------- EndProductType / u8 ----------
return TLV.create_TLV(TLV.U1, 0xFF) # 0xFF = unknown type of shutter
- elif attribute == 0x0008 # ---------- CurrentPositionLiftPercentage / u8 ----------
- return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_pos)
elif attribute == 0x000E # ---------- CurrentPositionLiftPercent100ths / u16 ----------
return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_pos) * 100)
- elif attribute == 0x0009 # ---------- CurrentPositionTiltPercentage / u8 ----------
- return TLV.create_TLV(TLV.U2, 100 - self.shadow_shutter_tilt)
- elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
- return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_tilt) * 100)
elif attribute == 0x000A # ---------- OperationalStatus / u8 ----------
var op = self.shadow_shutter_direction == 0 ? 0 : (self.shadow_shutter_direction > 0 ? 1 : 2)
- return TLV.create_TLV(TLV.U1, op) # TODO from sensors
+ return TLV.create_TLV(TLV.U1, op)
elif attribute == 0x000B # ---------- TargetPositionLiftPercent100ths / u16 ----------
return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_target) * 100)
- elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
- return TLV.create_TLV(TLV.U1, 0) # TODO
elif attribute == 0x0017 # ---------- Mode / u8 ----------
return TLV.create_TLV(TLV.U1, 0) # normal mode
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
- return TLV.create_TLV(TLV.U4, 3 + 4 + 16) # Lift + Tilt + PA_LF + PA_TL
+ return TLV.create_TLV(TLV.U4, 1 + 4) # Lift + PA_LF
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
return TLV.create_TLV(TLV.U4, 5) # New data model format and notation
end
@@ -152,13 +142,6 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
self.update_shadow()
end
return true
- elif command == 0x0008 # ---------- GoToTiltPercentage ----------
- var tilt = val.findsubval(0)
- if tilt != nil
- tilt = tilt / 10
- ctx.log = "tilt%:"+str(tilt)
- end
- return true
end
else
@@ -182,16 +165,14 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
var val_pos = v.find("Position")
if val_pos != nil
if val_pos != self.shadow_shutter_pos
- # self.attribute_updated(0x0102, 0x0008) # CurrentPositionLiftPercentage
self.attribute_updated(0x0102, 0x000E) # CurrentPositionLiftPercent100ths
end
self.shadow_shutter_pos = val_pos
end
- # Tilt
+ # Tilt - we can keep it here knowing that it won't change if not implemented
var val_tilt = v.find("Tilt")
if val_tilt != nil
if val_tilt != self.shadow_shutter_tilt
- # self.attribute_updated(0x0102, 0x0009) # CurrentPositionTiltPercentage
self.attribute_updated(0x0102, 0x000F) # CurrentPositionTiltPercent100ths
end
self.shadow_shutter_tilt = val_tilt
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
new file mode 100644
index 000000000..7d8adb7b4
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
@@ -0,0 +1,114 @@
+#
+# Matter_Plugin_ShutterTilt.be - implements the behavior for shutters with tilt control
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Shutter end
+
+#@ solidify:Matter_Plugin_ShutterTilt,weak
+
+class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
+ static var TYPE = "shutter+tilt" # name of the plug-in in json
+ static var NAME = "Shutter + Tilt" # display name of the plug-in
+ # inherited static var ARG = "shutter" # additional argument name (or empty if none)
+ # inherited static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
+ static var CLUSTERS = {
+ # 0x001D: inherited # Descriptor Cluster 9.5 p.453
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
+ 0x0102: [7,0xC,0xF,0xFFFC], # Window Covering 5.3 p.289
+ }
+ # inherited static var TYPES = { 0x0202: 2 } # New data model format and notation
+
+ # below is inherited
+ # var tasmota_shutter_index # Shutter number in Tasmota (zero based)
+ # var shadow_shutter_pos
+ # var shadow_shutter_target
+ # var shadow_shutter_tilt
+ # var shadow_shutter_direction # 1=opening -1=closing 0=not moving TODO
+
+ #############################################################
+ # Constructor inherited
+
+ #############################################################
+ # Update shadow inherited
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
+ self.update_shadow_lazy()
+ if attribute == 0x0007 # ---------- ConfigStatus / u8 ----------
+ return TLV.create_TLV(TLV.U1, 1 + 8 + 16) # Operational + Lift Position Aware + Tilt Position Aware
+
+ elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
+ return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_tilt) * 100)
+ elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
+ return TLV.create_TLV(TLV.U1, 0) # TODO
+
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 3 + 4 + 16) # Lift + Tilt + PA_LF + PA_TL
+ end
+ end
+ # else
+ return super(self).read_attribute(session, ctx)
+ end
+
+ #############################################################
+ # Invoke a command
+ #
+ # returns a TLV object if successful, contains the response
+ # or an `int` to indicate a status
+ def invoke_request(session, val, ctx)
+ import light
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var command = ctx.command
+
+ # ====================================================================================================
+ if cluster == 0x0102 # ========== Window Covering 5.3 p.289 ==========
+ self.update_shadow_lazy()
+ if command == 0x0008 # ---------- GoToTiltPercentage ----------
+ var tilt = val.findsubval(0)
+ if tilt != nil
+ tilt = tilt / 10
+ ctx.log = "tilt%:"+str(tilt)
+ end
+ return true
+ end
+ end
+ # else
+ return super(self).invoke_request(session, val, ctx)
+
+ end
+
+ #############################################################
+ # parse sensor inherited
+
+end
+matter.Plugin_ShutterTilt = Matter_Plugin_ShutterTilt
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index a2633b34c..cfc9e4cfc 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -33,7 +33,7 @@ import matter
#################################################################################
class Matter_UI
static var _ROOT_TYPES = "root"
- static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter"
+ static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
"|temperature|pressure|illuminance|humidity"
var device
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index 3c48befb9..57409987c 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -2018,7 +2018,7 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[51]) { /* constants */
+ ( &(const bvalue[53]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(json),
/* K2 */ be_nested_str_weak(0),
@@ -2050,30 +2050,32 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */
/* K28 */ be_nested_str_weak(Relay2),
/* K29 */ be_nested_str_weak(push),
/* K30 */ be_nested_str_weak(MTR_X3A_X20relay1_X20_X3D_X20_X25s_X2C_X20relay2_X20_X3D_X20_X25s),
- /* K31 */ be_nested_str_weak(shutter),
- /* K32 */ be_nested_str_weak(get_power),
- /* K33 */ be_nested_str_weak(relay),
- /* K34 */ be_nested_str_weak(load),
- /* K35 */ be_nested_str_weak(read_sensors),
- /* K36 */ be_nested_str_weak(k2l),
- /* K37 */ be_nested_str_weak(Temperature),
- /* K38 */ be_nested_str_weak(_X23Temperature),
- /* K39 */ be_nested_str_weak(temperature),
- /* K40 */ be_nested_str_weak(filter),
- /* K41 */ be_nested_str_weak(stop_iteration),
- /* K42 */ be_nested_str_weak(Pressure),
- /* K43 */ be_nested_str_weak(_X23Pressure),
- /* K44 */ be_nested_str_weak(pressure),
- /* K45 */ be_nested_str_weak(Illuminance),
- /* K46 */ be_nested_str_weak(_X23Illuminance),
- /* K47 */ be_nested_str_weak(illuminance),
- /* K48 */ be_nested_str_weak(Humidity),
- /* K49 */ be_nested_str_weak(_X23Humidity),
- /* K50 */ be_nested_str_weak(humidity),
+ /* K31 */ be_nested_str_weak(TiltConfig),
+ /* K32 */ be_nested_str_weak(shutter_X2Btilt),
+ /* K33 */ be_nested_str_weak(shutter),
+ /* K34 */ be_nested_str_weak(get_power),
+ /* K35 */ be_nested_str_weak(relay),
+ /* K36 */ be_nested_str_weak(load),
+ /* K37 */ be_nested_str_weak(read_sensors),
+ /* K38 */ be_nested_str_weak(k2l),
+ /* K39 */ be_nested_str_weak(Temperature),
+ /* K40 */ be_nested_str_weak(_X23Temperature),
+ /* K41 */ be_nested_str_weak(temperature),
+ /* K42 */ be_nested_str_weak(filter),
+ /* K43 */ be_nested_str_weak(stop_iteration),
+ /* K44 */ be_nested_str_weak(Pressure),
+ /* K45 */ be_nested_str_weak(_X23Pressure),
+ /* K46 */ be_nested_str_weak(pressure),
+ /* K47 */ be_nested_str_weak(Illuminance),
+ /* K48 */ be_nested_str_weak(_X23Illuminance),
+ /* K49 */ be_nested_str_weak(illuminance),
+ /* K50 */ be_nested_str_weak(Humidity),
+ /* K51 */ be_nested_str_weak(_X23Humidity),
+ /* K52 */ be_nested_str_weak(humidity),
}),
be_str_weak(autoconf_device_map),
&be_const_str_solidified,
- ( &(const binstruction[326]) { /* code */
+ ( &(const binstruction[339]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x600C0013, // 0002 GETGBL R3 G19
@@ -2145,11 +2147,11 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */
0x8C281116, // 0044 GETMET R10 R8 K22
0x58300017, // 0045 LDCONST R12 K23
0x7C280400, // 0046 CALL R10 2
- 0x782A0040, // 0047 JMPF R10 #0089
+ 0x782A004D, // 0047 JMPF R10 #0096
0x94201117, // 0048 GETIDX R8 R8 K23
0x5828000B, // 0049 LDCONST R10 K11
0x502C0200, // 004A LDBOOL R11 1 0
- 0x782E003C, // 004B JMPF R11 #0089
+ 0x782E0049, // 004B JMPF R11 #0096
0x602C0008, // 004C GETGBL R11 G8
0x5C301400, // 004D MOVE R12 R10
0x7C2C0200, // 004E CALL R11 1
@@ -2158,7 +2160,7 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */
0x5C381600, // 0051 MOVE R14 R11
0x7C300400, // 0052 CALL R12 2
0x74320000, // 0053 JMPT R12 #0055
- 0x70020033, // 0054 JMP #0089
+ 0x70020040, // 0054 JMP #0096
0x9430100B, // 0055 GETIDX R12 R8 R11
0xB8362000, // 0056 GETNGBL R13 K16
0x8C341B13, // 0057 GETMET R13 R13 K19
@@ -2200,206 +2202,219 @@ be_local_closure(Matter_Device_autoconf_device_map, /* name */
0x7C440800, // 007B CALL R17 4
0x58480015, // 007C LDCONST R18 K21
0x7C3C0600, // 007D CALL R15 3
- 0x603C0008, // 007E GETGBL R15 G8
- 0x5C400800, // 007F MOVE R16 R4
- 0x7C3C0200, // 0080 CALL R15 1
- 0x60400013, // 0081 GETGBL R16 G19
- 0x7C400000, // 0082 CALL R16 0
- 0x9842071F, // 0083 SETIDX R16 K3 K31
- 0x98423E0A, // 0084 SETIDX R16 K31 R10
- 0x980C1E10, // 0085 SETIDX R3 R15 R16
- 0x00100905, // 0086 ADD R4 R4 K5
- 0x00281505, // 0087 ADD R10 R10 K5
- 0x7001FFC0, // 0088 JMP #004A
- 0x6028000C, // 0089 GETGBL R10 G12
- 0xB82E2000, // 008A GETNGBL R11 K16
- 0x8C2C1720, // 008B GETMET R11 R11 K32
- 0x7C2C0200, // 008C CALL R11 1
- 0x7C280200, // 008D CALL R10 1
- 0x582C000B, // 008E LDCONST R11 K11
- 0x78160000, // 008F JMPF R5 #0091
- 0x04281505, // 0090 SUB R10 R10 K5
- 0x1430160A, // 0091 LT R12 R11 R10
- 0x78320010, // 0092 JMPF R12 #00A4
- 0x8C301308, // 0093 GETMET R12 R9 K8
- 0x5C381600, // 0094 MOVE R14 R11
- 0x7C300400, // 0095 CALL R12 2
- 0x4C340000, // 0096 LDNIL R13
- 0x1C30180D, // 0097 EQ R12 R12 R13
- 0x78320008, // 0098 JMPF R12 #00A2
- 0x60300008, // 0099 GETGBL R12 G8
- 0x5C340800, // 009A MOVE R13 R4
- 0x7C300200, // 009B CALL R12 1
- 0x60340013, // 009C GETGBL R13 G19
- 0x7C340000, // 009D CALL R13 0
- 0x98360721, // 009E SETIDX R13 K3 K33
- 0x9836420B, // 009F SETIDX R13 K33 R11
- 0x980C180D, // 00A0 SETIDX R3 R12 R13
- 0x00100905, // 00A1 ADD R4 R4 K5
- 0x002C1705, // 00A2 ADD R11 R11 K5
- 0x7001FFEC, // 00A3 JMP #0091
- 0x8C300522, // 00A4 GETMET R12 R2 K34
- 0xB83A2000, // 00A5 GETNGBL R14 K16
- 0x8C381D23, // 00A6 GETMET R14 R14 K35
- 0x7C380200, // 00A7 CALL R14 1
- 0x7C300400, // 00A8 CALL R12 2
- 0x5412001F, // 00A9 LDINT R4 32
- 0x60340010, // 00AA GETGBL R13 G16
- 0x8C380124, // 00AB GETMET R14 R0 K36
- 0x5C401800, // 00AC MOVE R16 R12
- 0x7C380400, // 00AD CALL R14 2
- 0x7C340200, // 00AE CALL R13 1
- 0xA802001C, // 00AF EXBLK 0 #00CD
- 0x5C381A00, // 00B0 MOVE R14 R13
- 0x7C380000, // 00B1 CALL R14 0
- 0x943C180E, // 00B2 GETIDX R15 R12 R14
- 0x6040000F, // 00B3 GETGBL R16 G15
- 0x5C441E00, // 00B4 MOVE R17 R15
- 0x60480013, // 00B5 GETGBL R18 G19
- 0x7C400400, // 00B6 CALL R16 2
- 0x7842000D, // 00B7 JMPF R16 #00C6
- 0x8C401F16, // 00B8 GETMET R16 R15 K22
- 0x58480025, // 00B9 LDCONST R18 K37
- 0x7C400400, // 00BA CALL R16 2
- 0x78420009, // 00BB JMPF R16 #00C6
- 0x00401D26, // 00BC ADD R16 R14 K38
- 0x60440008, // 00BD GETGBL R17 G8
- 0x5C480800, // 00BE MOVE R18 R4
- 0x7C440200, // 00BF CALL R17 1
- 0x60480013, // 00C0 GETGBL R18 G19
- 0x7C480000, // 00C1 CALL R18 0
- 0x984A0727, // 00C2 SETIDX R18 K3 K39
- 0x984A5010, // 00C3 SETIDX R18 K40 R16
- 0x980C2212, // 00C4 SETIDX R3 R17 R18
- 0x00100905, // 00C5 ADD R4 R4 K5
- 0x54420027, // 00C6 LDINT R16 40
- 0x24400810, // 00C7 GT R16 R4 R16
- 0x78420000, // 00C8 JMPF R16 #00CA
- 0x70020000, // 00C9 JMP #00CB
- 0x7001FFE4, // 00CA JMP #00B0
- 0xA8040001, // 00CB EXBLK 1 1
- 0x70020002, // 00CC JMP #00D0
- 0x58340029, // 00CD LDCONST R13 K41
- 0xAC340200, // 00CE CATCH R13 1 0
- 0xB0080000, // 00CF RAISE 2 R0 R0
- 0x54120027, // 00D0 LDINT R4 40
- 0x60340010, // 00D1 GETGBL R13 G16
- 0x8C380124, // 00D2 GETMET R14 R0 K36
- 0x5C401800, // 00D3 MOVE R16 R12
- 0x7C380400, // 00D4 CALL R14 2
- 0x7C340200, // 00D5 CALL R13 1
- 0xA802001C, // 00D6 EXBLK 0 #00F4
- 0x5C381A00, // 00D7 MOVE R14 R13
- 0x7C380000, // 00D8 CALL R14 0
- 0x943C180E, // 00D9 GETIDX R15 R12 R14
- 0x6040000F, // 00DA GETGBL R16 G15
- 0x5C441E00, // 00DB MOVE R17 R15
- 0x60480013, // 00DC GETGBL R18 G19
- 0x7C400400, // 00DD CALL R16 2
- 0x7842000D, // 00DE JMPF R16 #00ED
- 0x8C401F16, // 00DF GETMET R16 R15 K22
- 0x5848002A, // 00E0 LDCONST R18 K42
- 0x7C400400, // 00E1 CALL R16 2
- 0x78420009, // 00E2 JMPF R16 #00ED
- 0x00401D2B, // 00E3 ADD R16 R14 K43
- 0x60440008, // 00E4 GETGBL R17 G8
- 0x5C480800, // 00E5 MOVE R18 R4
- 0x7C440200, // 00E6 CALL R17 1
- 0x60480013, // 00E7 GETGBL R18 G19
- 0x7C480000, // 00E8 CALL R18 0
- 0x984A072C, // 00E9 SETIDX R18 K3 K44
- 0x984A5010, // 00EA SETIDX R18 K40 R16
- 0x980C2212, // 00EB SETIDX R3 R17 R18
- 0x00100905, // 00EC ADD R4 R4 K5
- 0x5442002E, // 00ED LDINT R16 47
- 0x24400810, // 00EE GT R16 R4 R16
- 0x78420000, // 00EF JMPF R16 #00F1
- 0x70020000, // 00F0 JMP #00F2
- 0x7001FFE4, // 00F1 JMP #00D7
- 0xA8040001, // 00F2 EXBLK 1 1
- 0x70020002, // 00F3 JMP #00F7
- 0x58340029, // 00F4 LDCONST R13 K41
- 0xAC340200, // 00F5 CATCH R13 1 0
- 0xB0080000, // 00F6 RAISE 2 R0 R0
- 0x5412002F, // 00F7 LDINT R4 48
- 0x60340010, // 00F8 GETGBL R13 G16
- 0x8C380124, // 00F9 GETMET R14 R0 K36
- 0x5C401800, // 00FA MOVE R16 R12
- 0x7C380400, // 00FB CALL R14 2
- 0x7C340200, // 00FC CALL R13 1
- 0xA802001C, // 00FD EXBLK 0 #011B
- 0x5C381A00, // 00FE MOVE R14 R13
- 0x7C380000, // 00FF CALL R14 0
- 0x943C180E, // 0100 GETIDX R15 R12 R14
- 0x6040000F, // 0101 GETGBL R16 G15
- 0x5C441E00, // 0102 MOVE R17 R15
- 0x60480013, // 0103 GETGBL R18 G19
- 0x7C400400, // 0104 CALL R16 2
- 0x7842000D, // 0105 JMPF R16 #0114
- 0x8C401F16, // 0106 GETMET R16 R15 K22
- 0x5848002D, // 0107 LDCONST R18 K45
- 0x7C400400, // 0108 CALL R16 2
- 0x78420009, // 0109 JMPF R16 #0114
- 0x00401D2E, // 010A ADD R16 R14 K46
- 0x60440008, // 010B GETGBL R17 G8
- 0x5C480800, // 010C MOVE R18 R4
- 0x7C440200, // 010D CALL R17 1
- 0x60480013, // 010E GETGBL R18 G19
- 0x7C480000, // 010F CALL R18 0
- 0x984A072F, // 0110 SETIDX R18 K3 K47
- 0x984A5010, // 0111 SETIDX R18 K40 R16
- 0x980C2212, // 0112 SETIDX R3 R17 R18
- 0x00100905, // 0113 ADD R4 R4 K5
- 0x54420037, // 0114 LDINT R16 56
- 0x24400810, // 0115 GT R16 R4 R16
- 0x78420000, // 0116 JMPF R16 #0118
- 0x70020000, // 0117 JMP #0119
- 0x7001FFE4, // 0118 JMP #00FE
- 0xA8040001, // 0119 EXBLK 1 1
- 0x70020002, // 011A JMP #011E
- 0x58340029, // 011B LDCONST R13 K41
- 0xAC340200, // 011C CATCH R13 1 0
- 0xB0080000, // 011D RAISE 2 R0 R0
- 0x54120037, // 011E LDINT R4 56
- 0x60340010, // 011F GETGBL R13 G16
- 0x8C380124, // 0120 GETMET R14 R0 K36
- 0x5C401800, // 0121 MOVE R16 R12
- 0x7C380400, // 0122 CALL R14 2
- 0x7C340200, // 0123 CALL R13 1
- 0xA802001C, // 0124 EXBLK 0 #0142
- 0x5C381A00, // 0125 MOVE R14 R13
- 0x7C380000, // 0126 CALL R14 0
- 0x943C180E, // 0127 GETIDX R15 R12 R14
- 0x6040000F, // 0128 GETGBL R16 G15
- 0x5C441E00, // 0129 MOVE R17 R15
- 0x60480013, // 012A GETGBL R18 G19
- 0x7C400400, // 012B CALL R16 2
- 0x7842000D, // 012C JMPF R16 #013B
- 0x8C401F16, // 012D GETMET R16 R15 K22
- 0x58480030, // 012E LDCONST R18 K48
- 0x7C400400, // 012F CALL R16 2
- 0x78420009, // 0130 JMPF R16 #013B
- 0x00401D31, // 0131 ADD R16 R14 K49
- 0x60440008, // 0132 GETGBL R17 G8
- 0x5C480800, // 0133 MOVE R18 R4
- 0x7C440200, // 0134 CALL R17 1
- 0x60480013, // 0135 GETGBL R18 G19
- 0x7C480000, // 0136 CALL R18 0
- 0x984A0732, // 0137 SETIDX R18 K3 K50
- 0x984A5010, // 0138 SETIDX R18 K40 R16
- 0x980C2212, // 0139 SETIDX R3 R17 R18
- 0x00100905, // 013A ADD R4 R4 K5
- 0x5442003F, // 013B LDINT R16 64
- 0x24400810, // 013C GT R16 R4 R16
- 0x78420000, // 013D JMPF R16 #013F
- 0x70020000, // 013E JMP #0140
- 0x7001FFE4, // 013F JMP #0125
- 0xA8040001, // 0140 EXBLK 1 1
- 0x70020002, // 0141 JMP #0145
- 0x58340029, // 0142 LDCONST R13 K41
- 0xAC340200, // 0143 CATCH R13 1 0
- 0xB0080000, // 0144 RAISE 2 R0 R0
- 0x80040600, // 0145 RET 1 R3
+ 0x8C3C1908, // 007E GETMET R15 R12 K8
+ 0x5844001F, // 007F LDCONST R17 K31
+ 0x7C3C0400, // 0080 CALL R15 2
+ 0x783E0002, // 0081 JMPF R15 #0085
+ 0x94401F0D, // 0082 GETIDX R16 R15 K13
+ 0x2440210B, // 0083 GT R16 R16 K11
+ 0x74420000, // 0084 JMPT R16 #0086
+ 0x50400001, // 0085 LDBOOL R16 0 1
+ 0x50400200, // 0086 LDBOOL R16 1 0
+ 0x60440008, // 0087 GETGBL R17 G8
+ 0x5C480800, // 0088 MOVE R18 R4
+ 0x7C440200, // 0089 CALL R17 1
+ 0x60480013, // 008A GETGBL R18 G19
+ 0x7C480000, // 008B CALL R18 0
+ 0x78420001, // 008C JMPF R16 #008F
+ 0x584C0020, // 008D LDCONST R19 K32
+ 0x70020000, // 008E JMP #0090
+ 0x584C0021, // 008F LDCONST R19 K33
+ 0x984A0613, // 0090 SETIDX R18 K3 R19
+ 0x984A420A, // 0091 SETIDX R18 K33 R10
+ 0x980C2212, // 0092 SETIDX R3 R17 R18
+ 0x00100905, // 0093 ADD R4 R4 K5
+ 0x00281505, // 0094 ADD R10 R10 K5
+ 0x7001FFB3, // 0095 JMP #004A
+ 0x6028000C, // 0096 GETGBL R10 G12
+ 0xB82E2000, // 0097 GETNGBL R11 K16
+ 0x8C2C1722, // 0098 GETMET R11 R11 K34
+ 0x7C2C0200, // 0099 CALL R11 1
+ 0x7C280200, // 009A CALL R10 1
+ 0x582C000B, // 009B LDCONST R11 K11
+ 0x78160000, // 009C JMPF R5 #009E
+ 0x04281505, // 009D SUB R10 R10 K5
+ 0x1430160A, // 009E LT R12 R11 R10
+ 0x78320010, // 009F JMPF R12 #00B1
+ 0x8C301308, // 00A0 GETMET R12 R9 K8
+ 0x5C381600, // 00A1 MOVE R14 R11
+ 0x7C300400, // 00A2 CALL R12 2
+ 0x4C340000, // 00A3 LDNIL R13
+ 0x1C30180D, // 00A4 EQ R12 R12 R13
+ 0x78320008, // 00A5 JMPF R12 #00AF
+ 0x60300008, // 00A6 GETGBL R12 G8
+ 0x5C340800, // 00A7 MOVE R13 R4
+ 0x7C300200, // 00A8 CALL R12 1
+ 0x60340013, // 00A9 GETGBL R13 G19
+ 0x7C340000, // 00AA CALL R13 0
+ 0x98360723, // 00AB SETIDX R13 K3 K35
+ 0x9836460B, // 00AC SETIDX R13 K35 R11
+ 0x980C180D, // 00AD SETIDX R3 R12 R13
+ 0x00100905, // 00AE ADD R4 R4 K5
+ 0x002C1705, // 00AF ADD R11 R11 K5
+ 0x7001FFEC, // 00B0 JMP #009E
+ 0x8C300524, // 00B1 GETMET R12 R2 K36
+ 0xB83A2000, // 00B2 GETNGBL R14 K16
+ 0x8C381D25, // 00B3 GETMET R14 R14 K37
+ 0x7C380200, // 00B4 CALL R14 1
+ 0x7C300400, // 00B5 CALL R12 2
+ 0x5412001F, // 00B6 LDINT R4 32
+ 0x60340010, // 00B7 GETGBL R13 G16
+ 0x8C380126, // 00B8 GETMET R14 R0 K38
+ 0x5C401800, // 00B9 MOVE R16 R12
+ 0x7C380400, // 00BA CALL R14 2
+ 0x7C340200, // 00BB CALL R13 1
+ 0xA802001C, // 00BC EXBLK 0 #00DA
+ 0x5C381A00, // 00BD MOVE R14 R13
+ 0x7C380000, // 00BE CALL R14 0
+ 0x943C180E, // 00BF GETIDX R15 R12 R14
+ 0x6040000F, // 00C0 GETGBL R16 G15
+ 0x5C441E00, // 00C1 MOVE R17 R15
+ 0x60480013, // 00C2 GETGBL R18 G19
+ 0x7C400400, // 00C3 CALL R16 2
+ 0x7842000D, // 00C4 JMPF R16 #00D3
+ 0x8C401F16, // 00C5 GETMET R16 R15 K22
+ 0x58480027, // 00C6 LDCONST R18 K39
+ 0x7C400400, // 00C7 CALL R16 2
+ 0x78420009, // 00C8 JMPF R16 #00D3
+ 0x00401D28, // 00C9 ADD R16 R14 K40
+ 0x60440008, // 00CA GETGBL R17 G8
+ 0x5C480800, // 00CB MOVE R18 R4
+ 0x7C440200, // 00CC CALL R17 1
+ 0x60480013, // 00CD GETGBL R18 G19
+ 0x7C480000, // 00CE CALL R18 0
+ 0x984A0729, // 00CF SETIDX R18 K3 K41
+ 0x984A5410, // 00D0 SETIDX R18 K42 R16
+ 0x980C2212, // 00D1 SETIDX R3 R17 R18
+ 0x00100905, // 00D2 ADD R4 R4 K5
+ 0x54420027, // 00D3 LDINT R16 40
+ 0x24400810, // 00D4 GT R16 R4 R16
+ 0x78420000, // 00D5 JMPF R16 #00D7
+ 0x70020000, // 00D6 JMP #00D8
+ 0x7001FFE4, // 00D7 JMP #00BD
+ 0xA8040001, // 00D8 EXBLK 1 1
+ 0x70020002, // 00D9 JMP #00DD
+ 0x5834002B, // 00DA LDCONST R13 K43
+ 0xAC340200, // 00DB CATCH R13 1 0
+ 0xB0080000, // 00DC RAISE 2 R0 R0
+ 0x54120027, // 00DD LDINT R4 40
+ 0x60340010, // 00DE GETGBL R13 G16
+ 0x8C380126, // 00DF GETMET R14 R0 K38
+ 0x5C401800, // 00E0 MOVE R16 R12
+ 0x7C380400, // 00E1 CALL R14 2
+ 0x7C340200, // 00E2 CALL R13 1
+ 0xA802001C, // 00E3 EXBLK 0 #0101
+ 0x5C381A00, // 00E4 MOVE R14 R13
+ 0x7C380000, // 00E5 CALL R14 0
+ 0x943C180E, // 00E6 GETIDX R15 R12 R14
+ 0x6040000F, // 00E7 GETGBL R16 G15
+ 0x5C441E00, // 00E8 MOVE R17 R15
+ 0x60480013, // 00E9 GETGBL R18 G19
+ 0x7C400400, // 00EA CALL R16 2
+ 0x7842000D, // 00EB JMPF R16 #00FA
+ 0x8C401F16, // 00EC GETMET R16 R15 K22
+ 0x5848002C, // 00ED LDCONST R18 K44
+ 0x7C400400, // 00EE CALL R16 2
+ 0x78420009, // 00EF JMPF R16 #00FA
+ 0x00401D2D, // 00F0 ADD R16 R14 K45
+ 0x60440008, // 00F1 GETGBL R17 G8
+ 0x5C480800, // 00F2 MOVE R18 R4
+ 0x7C440200, // 00F3 CALL R17 1
+ 0x60480013, // 00F4 GETGBL R18 G19
+ 0x7C480000, // 00F5 CALL R18 0
+ 0x984A072E, // 00F6 SETIDX R18 K3 K46
+ 0x984A5410, // 00F7 SETIDX R18 K42 R16
+ 0x980C2212, // 00F8 SETIDX R3 R17 R18
+ 0x00100905, // 00F9 ADD R4 R4 K5
+ 0x5442002E, // 00FA LDINT R16 47
+ 0x24400810, // 00FB GT R16 R4 R16
+ 0x78420000, // 00FC JMPF R16 #00FE
+ 0x70020000, // 00FD JMP #00FF
+ 0x7001FFE4, // 00FE JMP #00E4
+ 0xA8040001, // 00FF EXBLK 1 1
+ 0x70020002, // 0100 JMP #0104
+ 0x5834002B, // 0101 LDCONST R13 K43
+ 0xAC340200, // 0102 CATCH R13 1 0
+ 0xB0080000, // 0103 RAISE 2 R0 R0
+ 0x5412002F, // 0104 LDINT R4 48
+ 0x60340010, // 0105 GETGBL R13 G16
+ 0x8C380126, // 0106 GETMET R14 R0 K38
+ 0x5C401800, // 0107 MOVE R16 R12
+ 0x7C380400, // 0108 CALL R14 2
+ 0x7C340200, // 0109 CALL R13 1
+ 0xA802001C, // 010A EXBLK 0 #0128
+ 0x5C381A00, // 010B MOVE R14 R13
+ 0x7C380000, // 010C CALL R14 0
+ 0x943C180E, // 010D GETIDX R15 R12 R14
+ 0x6040000F, // 010E GETGBL R16 G15
+ 0x5C441E00, // 010F MOVE R17 R15
+ 0x60480013, // 0110 GETGBL R18 G19
+ 0x7C400400, // 0111 CALL R16 2
+ 0x7842000D, // 0112 JMPF R16 #0121
+ 0x8C401F16, // 0113 GETMET R16 R15 K22
+ 0x5848002F, // 0114 LDCONST R18 K47
+ 0x7C400400, // 0115 CALL R16 2
+ 0x78420009, // 0116 JMPF R16 #0121
+ 0x00401D30, // 0117 ADD R16 R14 K48
+ 0x60440008, // 0118 GETGBL R17 G8
+ 0x5C480800, // 0119 MOVE R18 R4
+ 0x7C440200, // 011A CALL R17 1
+ 0x60480013, // 011B GETGBL R18 G19
+ 0x7C480000, // 011C CALL R18 0
+ 0x984A0731, // 011D SETIDX R18 K3 K49
+ 0x984A5410, // 011E SETIDX R18 K42 R16
+ 0x980C2212, // 011F SETIDX R3 R17 R18
+ 0x00100905, // 0120 ADD R4 R4 K5
+ 0x54420037, // 0121 LDINT R16 56
+ 0x24400810, // 0122 GT R16 R4 R16
+ 0x78420000, // 0123 JMPF R16 #0125
+ 0x70020000, // 0124 JMP #0126
+ 0x7001FFE4, // 0125 JMP #010B
+ 0xA8040001, // 0126 EXBLK 1 1
+ 0x70020002, // 0127 JMP #012B
+ 0x5834002B, // 0128 LDCONST R13 K43
+ 0xAC340200, // 0129 CATCH R13 1 0
+ 0xB0080000, // 012A RAISE 2 R0 R0
+ 0x54120037, // 012B LDINT R4 56
+ 0x60340010, // 012C GETGBL R13 G16
+ 0x8C380126, // 012D GETMET R14 R0 K38
+ 0x5C401800, // 012E MOVE R16 R12
+ 0x7C380400, // 012F CALL R14 2
+ 0x7C340200, // 0130 CALL R13 1
+ 0xA802001C, // 0131 EXBLK 0 #014F
+ 0x5C381A00, // 0132 MOVE R14 R13
+ 0x7C380000, // 0133 CALL R14 0
+ 0x943C180E, // 0134 GETIDX R15 R12 R14
+ 0x6040000F, // 0135 GETGBL R16 G15
+ 0x5C441E00, // 0136 MOVE R17 R15
+ 0x60480013, // 0137 GETGBL R18 G19
+ 0x7C400400, // 0138 CALL R16 2
+ 0x7842000D, // 0139 JMPF R16 #0148
+ 0x8C401F16, // 013A GETMET R16 R15 K22
+ 0x58480032, // 013B LDCONST R18 K50
+ 0x7C400400, // 013C CALL R16 2
+ 0x78420009, // 013D JMPF R16 #0148
+ 0x00401D33, // 013E ADD R16 R14 K51
+ 0x60440008, // 013F GETGBL R17 G8
+ 0x5C480800, // 0140 MOVE R18 R4
+ 0x7C440200, // 0141 CALL R17 1
+ 0x60480013, // 0142 GETGBL R18 G19
+ 0x7C480000, // 0143 CALL R18 0
+ 0x984A0734, // 0144 SETIDX R18 K3 K52
+ 0x984A5410, // 0145 SETIDX R18 K42 R16
+ 0x980C2212, // 0146 SETIDX R3 R17 R18
+ 0x00100905, // 0147 ADD R4 R4 K5
+ 0x5442003F, // 0148 LDINT R16 64
+ 0x24400810, // 0149 GT R16 R4 R16
+ 0x78420000, // 014A JMPF R16 #014C
+ 0x70020000, // 014B JMP #014D
+ 0x7001FFE4, // 014C JMP #0132
+ 0xA8040001, // 014D EXBLK 1 1
+ 0x70020002, // 014E JMP #0152
+ 0x5834002B, // 014F LDCONST R13 K43
+ 0xAC340200, // 0150 CATCH R13 1 0
+ 0xB0080000, // 0151 RAISE 2 R0 R0
+ 0x80040600, // 0152 RET 1 R3
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
index bdf05f9db..54edf5622 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
@@ -46,7 +46,7 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[19]) { /* constants */
+ ( &(const bvalue[17]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -59,17 +59,15 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
/* K9 */ be_nested_str_weak(U2),
/* K10 */ be_const_int(1),
/* K11 */ be_nested_str_weak(shadow_shutter_pos),
- /* K12 */ be_nested_str_weak(shadow_shutter_tilt),
- /* K13 */ be_nested_str_weak(shadow_shutter_direction),
- /* K14 */ be_const_int(2),
- /* K15 */ be_nested_str_weak(shadow_shutter_target),
- /* K16 */ be_nested_str_weak(U4),
- /* K17 */ be_const_int(3),
- /* K18 */ be_nested_str_weak(read_attribute),
+ /* K12 */ be_nested_str_weak(shadow_shutter_direction),
+ /* K13 */ be_const_int(2),
+ /* K14 */ be_nested_str_weak(shadow_shutter_target),
+ /* K15 */ be_nested_str_weak(U4),
+ /* K16 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[186]) { /* code */
+ ( &(const binstruction[129]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -77,7 +75,7 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E0101, // 0005 LDINT R7 258
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E00A8, // 0007 JMPF R7 #00B1
+ 0x781E006F, // 0007 JMPF R7 #0078
0x8C1C0105, // 0008 GETMET R7 R0 K5
0x7C1C0200, // 0009 CALL R7 1
0x1C1C0D06, // 000A EQ R7 R6 K6
@@ -87,7 +85,7 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
0x542A00FE, // 000E LDINT R10 255
0x7C1C0600, // 000F CALL R7 3
0x80040E00, // 0010 RET 1 R7
- 0x7002009D, // 0011 JMP #00B0
+ 0x70020064, // 0011 JMP #0077
0x541E0004, // 0012 LDINT R7 5
0x1C1C0C07, // 0013 EQ R7 R6 R7
0x781E0005, // 0014 JMPF R7 #001B
@@ -96,166 +94,109 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
0x58280006, // 0017 LDCONST R10 K6
0x7C1C0600, // 0018 CALL R7 3
0x80040E00, // 0019 RET 1 R7
- 0x70020094, // 001A JMP #00B0
- 0x541E0005, // 001B LDINT R7 6
+ 0x7002005B, // 001A JMP #0077
+ 0x541E0006, // 001B LDINT R7 7
0x1C1C0C07, // 001C EQ R7 R6 R7
- 0x781E0005, // 001D JMPF R7 #0024
+ 0x781E0006, // 001D JMPF R7 #0025
0x8C1C0907, // 001E GETMET R7 R4 K7
- 0x88240909, // 001F GETMBR R9 R4 K9
- 0x58280006, // 0020 LDCONST R10 K6
- 0x7C1C0600, // 0021 CALL R7 3
- 0x80040E00, // 0022 RET 1 R7
- 0x7002008B, // 0023 JMP #00B0
- 0x541E0006, // 0024 LDINT R7 7
- 0x1C1C0C07, // 0025 EQ R7 R6 R7
- 0x781E0008, // 0026 JMPF R7 #0030
- 0x8C1C0907, // 0027 GETMET R7 R4 K7
- 0x88240908, // 0028 GETMBR R9 R4 K8
- 0x542A0007, // 0029 LDINT R10 8
- 0x002A140A, // 002A ADD R10 K10 R10
- 0x542E000F, // 002B LDINT R11 16
- 0x0028140B, // 002C ADD R10 R10 R11
- 0x7C1C0600, // 002D CALL R7 3
- 0x80040E00, // 002E RET 1 R7
- 0x7002007F, // 002F JMP #00B0
- 0x541E000C, // 0030 LDINT R7 13
- 0x1C1C0C07, // 0031 EQ R7 R6 R7
- 0x781E0005, // 0032 JMPF R7 #0039
- 0x8C1C0907, // 0033 GETMET R7 R4 K7
- 0x88240908, // 0034 GETMBR R9 R4 K8
- 0x542A00FE, // 0035 LDINT R10 255
- 0x7C1C0600, // 0036 CALL R7 3
- 0x80040E00, // 0037 RET 1 R7
- 0x70020076, // 0038 JMP #00B0
- 0x541E0007, // 0039 LDINT R7 8
- 0x1C1C0C07, // 003A EQ R7 R6 R7
- 0x781E0007, // 003B JMPF R7 #0044
- 0x8C1C0907, // 003C GETMET R7 R4 K7
- 0x88240909, // 003D GETMBR R9 R4 K9
- 0x542A0063, // 003E LDINT R10 100
- 0x882C010B, // 003F GETMBR R11 R0 K11
- 0x0428140B, // 0040 SUB R10 R10 R11
- 0x7C1C0600, // 0041 CALL R7 3
- 0x80040E00, // 0042 RET 1 R7
- 0x7002006B, // 0043 JMP #00B0
- 0x541E000D, // 0044 LDINT R7 14
- 0x1C1C0C07, // 0045 EQ R7 R6 R7
- 0x781E0009, // 0046 JMPF R7 #0051
- 0x8C1C0907, // 0047 GETMET R7 R4 K7
- 0x88240909, // 0048 GETMBR R9 R4 K9
- 0x542A0063, // 0049 LDINT R10 100
- 0x882C010B, // 004A GETMBR R11 R0 K11
- 0x0428140B, // 004B SUB R10 R10 R11
- 0x542E0063, // 004C LDINT R11 100
- 0x0828140B, // 004D MUL R10 R10 R11
- 0x7C1C0600, // 004E CALL R7 3
- 0x80040E00, // 004F RET 1 R7
- 0x7002005E, // 0050 JMP #00B0
- 0x541E0008, // 0051 LDINT R7 9
- 0x1C1C0C07, // 0052 EQ R7 R6 R7
- 0x781E0007, // 0053 JMPF R7 #005C
- 0x8C1C0907, // 0054 GETMET R7 R4 K7
- 0x88240909, // 0055 GETMBR R9 R4 K9
- 0x542A0063, // 0056 LDINT R10 100
- 0x882C010C, // 0057 GETMBR R11 R0 K12
- 0x0428140B, // 0058 SUB R10 R10 R11
+ 0x88240908, // 001F GETMBR R9 R4 K8
+ 0x542A0007, // 0020 LDINT R10 8
+ 0x002A140A, // 0021 ADD R10 K10 R10
+ 0x7C1C0600, // 0022 CALL R7 3
+ 0x80040E00, // 0023 RET 1 R7
+ 0x70020051, // 0024 JMP #0077
+ 0x541E000C, // 0025 LDINT R7 13
+ 0x1C1C0C07, // 0026 EQ R7 R6 R7
+ 0x781E0005, // 0027 JMPF R7 #002E
+ 0x8C1C0907, // 0028 GETMET R7 R4 K7
+ 0x88240908, // 0029 GETMBR R9 R4 K8
+ 0x542A00FE, // 002A LDINT R10 255
+ 0x7C1C0600, // 002B CALL R7 3
+ 0x80040E00, // 002C RET 1 R7
+ 0x70020048, // 002D JMP #0077
+ 0x541E000D, // 002E LDINT R7 14
+ 0x1C1C0C07, // 002F EQ R7 R6 R7
+ 0x781E0009, // 0030 JMPF R7 #003B
+ 0x8C1C0907, // 0031 GETMET R7 R4 K7
+ 0x88240909, // 0032 GETMBR R9 R4 K9
+ 0x542A0063, // 0033 LDINT R10 100
+ 0x882C010B, // 0034 GETMBR R11 R0 K11
+ 0x0428140B, // 0035 SUB R10 R10 R11
+ 0x542E0063, // 0036 LDINT R11 100
+ 0x0828140B, // 0037 MUL R10 R10 R11
+ 0x7C1C0600, // 0038 CALL R7 3
+ 0x80040E00, // 0039 RET 1 R7
+ 0x7002003B, // 003A JMP #0077
+ 0x541E0009, // 003B LDINT R7 10
+ 0x1C1C0C07, // 003C EQ R7 R6 R7
+ 0x781E0010, // 003D JMPF R7 #004F
+ 0x881C010C, // 003E GETMBR R7 R0 K12
+ 0x1C1C0F06, // 003F EQ R7 R7 K6
+ 0x781E0001, // 0040 JMPF R7 #0043
+ 0x581C0006, // 0041 LDCONST R7 K6
+ 0x70020005, // 0042 JMP #0049
+ 0x881C010C, // 0043 GETMBR R7 R0 K12
+ 0x241C0F06, // 0044 GT R7 R7 K6
+ 0x781E0001, // 0045 JMPF R7 #0048
+ 0x581C000A, // 0046 LDCONST R7 K10
+ 0x70020000, // 0047 JMP #0049
+ 0x581C000D, // 0048 LDCONST R7 K13
+ 0x8C200907, // 0049 GETMET R8 R4 K7
+ 0x88280908, // 004A GETMBR R10 R4 K8
+ 0x5C2C0E00, // 004B MOVE R11 R7
+ 0x7C200600, // 004C CALL R8 3
+ 0x80041000, // 004D RET 1 R8
+ 0x70020027, // 004E JMP #0077
+ 0x541E000A, // 004F LDINT R7 11
+ 0x1C1C0C07, // 0050 EQ R7 R6 R7
+ 0x781E0009, // 0051 JMPF R7 #005C
+ 0x8C1C0907, // 0052 GETMET R7 R4 K7
+ 0x88240909, // 0053 GETMBR R9 R4 K9
+ 0x542A0063, // 0054 LDINT R10 100
+ 0x882C010E, // 0055 GETMBR R11 R0 K14
+ 0x0428140B, // 0056 SUB R10 R10 R11
+ 0x542E0063, // 0057 LDINT R11 100
+ 0x0828140B, // 0058 MUL R10 R10 R11
0x7C1C0600, // 0059 CALL R7 3
0x80040E00, // 005A RET 1 R7
- 0x70020053, // 005B JMP #00B0
- 0x541E000E, // 005C LDINT R7 15
+ 0x7002001A, // 005B JMP #0077
+ 0x541E0016, // 005C LDINT R7 23
0x1C1C0C07, // 005D EQ R7 R6 R7
- 0x781E0009, // 005E JMPF R7 #0069
+ 0x781E0005, // 005E JMPF R7 #0065
0x8C1C0907, // 005F GETMET R7 R4 K7
- 0x88240909, // 0060 GETMBR R9 R4 K9
- 0x542A0063, // 0061 LDINT R10 100
- 0x882C010C, // 0062 GETMBR R11 R0 K12
- 0x0428140B, // 0063 SUB R10 R10 R11
- 0x542E0063, // 0064 LDINT R11 100
- 0x0828140B, // 0065 MUL R10 R10 R11
- 0x7C1C0600, // 0066 CALL R7 3
- 0x80040E00, // 0067 RET 1 R7
- 0x70020046, // 0068 JMP #00B0
- 0x541E0009, // 0069 LDINT R7 10
- 0x1C1C0C07, // 006A EQ R7 R6 R7
- 0x781E0010, // 006B JMPF R7 #007D
- 0x881C010D, // 006C GETMBR R7 R0 K13
- 0x1C1C0F06, // 006D EQ R7 R7 K6
- 0x781E0001, // 006E JMPF R7 #0071
- 0x581C0006, // 006F LDCONST R7 K6
- 0x70020005, // 0070 JMP #0077
- 0x881C010D, // 0071 GETMBR R7 R0 K13
- 0x241C0F06, // 0072 GT R7 R7 K6
- 0x781E0001, // 0073 JMPF R7 #0076
- 0x581C000A, // 0074 LDCONST R7 K10
- 0x70020000, // 0075 JMP #0077
- 0x581C000E, // 0076 LDCONST R7 K14
- 0x8C200907, // 0077 GETMET R8 R4 K7
- 0x88280908, // 0078 GETMBR R10 R4 K8
- 0x5C2C0E00, // 0079 MOVE R11 R7
- 0x7C200600, // 007A CALL R8 3
- 0x80041000, // 007B RET 1 R8
- 0x70020032, // 007C JMP #00B0
- 0x541E000A, // 007D LDINT R7 11
- 0x1C1C0C07, // 007E EQ R7 R6 R7
- 0x781E0009, // 007F JMPF R7 #008A
- 0x8C1C0907, // 0080 GETMET R7 R4 K7
- 0x88240909, // 0081 GETMBR R9 R4 K9
- 0x542A0063, // 0082 LDINT R10 100
- 0x882C010F, // 0083 GETMBR R11 R0 K15
- 0x0428140B, // 0084 SUB R10 R10 R11
- 0x542E0063, // 0085 LDINT R11 100
- 0x0828140B, // 0086 MUL R10 R10 R11
- 0x7C1C0600, // 0087 CALL R7 3
- 0x80040E00, // 0088 RET 1 R7
- 0x70020025, // 0089 JMP #00B0
- 0x541E000B, // 008A LDINT R7 12
- 0x1C1C0C07, // 008B EQ R7 R6 R7
- 0x781E0005, // 008C JMPF R7 #0093
- 0x8C1C0907, // 008D GETMET R7 R4 K7
- 0x88240908, // 008E GETMBR R9 R4 K8
- 0x58280006, // 008F LDCONST R10 K6
- 0x7C1C0600, // 0090 CALL R7 3
- 0x80040E00, // 0091 RET 1 R7
- 0x7002001C, // 0092 JMP #00B0
- 0x541E0016, // 0093 LDINT R7 23
- 0x1C1C0C07, // 0094 EQ R7 R6 R7
- 0x781E0005, // 0095 JMPF R7 #009C
- 0x8C1C0907, // 0096 GETMET R7 R4 K7
- 0x88240908, // 0097 GETMBR R9 R4 K8
- 0x58280006, // 0098 LDCONST R10 K6
- 0x7C1C0600, // 0099 CALL R7 3
- 0x80040E00, // 009A RET 1 R7
- 0x70020013, // 009B JMP #00B0
- 0x541EFFFB, // 009C LDINT R7 65532
- 0x1C1C0C07, // 009D EQ R7 R6 R7
- 0x781E0008, // 009E JMPF R7 #00A8
- 0x8C1C0907, // 009F GETMET R7 R4 K7
- 0x88240910, // 00A0 GETMBR R9 R4 K16
- 0x542A0003, // 00A1 LDINT R10 4
- 0x002A220A, // 00A2 ADD R10 K17 R10
- 0x542E000F, // 00A3 LDINT R11 16
- 0x0028140B, // 00A4 ADD R10 R10 R11
- 0x7C1C0600, // 00A5 CALL R7 3
- 0x80040E00, // 00A6 RET 1 R7
- 0x70020007, // 00A7 JMP #00B0
- 0x541EFFFC, // 00A8 LDINT R7 65533
- 0x1C1C0C07, // 00A9 EQ R7 R6 R7
- 0x781E0004, // 00AA JMPF R7 #00B0
- 0x8C1C0907, // 00AB GETMET R7 R4 K7
- 0x88240910, // 00AC GETMBR R9 R4 K16
- 0x542A0004, // 00AD LDINT R10 5
- 0x7C1C0600, // 00AE CALL R7 3
- 0x80040E00, // 00AF RET 1 R7
- 0x70020007, // 00B0 JMP #00B9
- 0x601C0003, // 00B1 GETGBL R7 G3
- 0x5C200000, // 00B2 MOVE R8 R0
- 0x7C1C0200, // 00B3 CALL R7 1
- 0x8C1C0F12, // 00B4 GETMET R7 R7 K18
- 0x5C240200, // 00B5 MOVE R9 R1
- 0x5C280400, // 00B6 MOVE R10 R2
- 0x7C1C0600, // 00B7 CALL R7 3
- 0x80040E00, // 00B8 RET 1 R7
- 0x80000000, // 00B9 RET 0
+ 0x88240908, // 0060 GETMBR R9 R4 K8
+ 0x58280006, // 0061 LDCONST R10 K6
+ 0x7C1C0600, // 0062 CALL R7 3
+ 0x80040E00, // 0063 RET 1 R7
+ 0x70020011, // 0064 JMP #0077
+ 0x541EFFFB, // 0065 LDINT R7 65532
+ 0x1C1C0C07, // 0066 EQ R7 R6 R7
+ 0x781E0006, // 0067 JMPF R7 #006F
+ 0x8C1C0907, // 0068 GETMET R7 R4 K7
+ 0x8824090F, // 0069 GETMBR R9 R4 K15
+ 0x542A0003, // 006A LDINT R10 4
+ 0x002A140A, // 006B ADD R10 K10 R10
+ 0x7C1C0600, // 006C CALL R7 3
+ 0x80040E00, // 006D RET 1 R7
+ 0x70020007, // 006E JMP #0077
+ 0x541EFFFC, // 006F LDINT R7 65533
+ 0x1C1C0C07, // 0070 EQ R7 R6 R7
+ 0x781E0004, // 0071 JMPF R7 #0077
+ 0x8C1C0907, // 0072 GETMET R7 R4 K7
+ 0x8824090F, // 0073 GETMBR R9 R4 K15
+ 0x542A0004, // 0074 LDINT R10 5
+ 0x7C1C0600, // 0075 CALL R7 3
+ 0x80040E00, // 0076 RET 1 R7
+ 0x70020007, // 0077 JMP #0080
+ 0x601C0003, // 0078 GETGBL R7 G3
+ 0x5C200000, // 0079 MOVE R8 R0
+ 0x7C1C0200, // 007A CALL R7 1
+ 0x8C1C0F10, // 007B GETMET R7 R7 K16
+ 0x5C240200, // 007C MOVE R9 R1
+ 0x5C280400, // 007D MOVE R10 R2
+ 0x7C1C0600, // 007E CALL R7 3
+ 0x80040E00, // 007F RET 1 R7
+ 0x80000000, // 0080 RET 0
})
)
);
@@ -372,7 +313,7 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[24]) { /* constants */
+ ( &(const bvalue[23]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -395,12 +336,11 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
/* K19 */ be_nested_str_weak(ShutterStopPosition),
/* K20 */ be_nested_str_weak(_X20),
/* K21 */ be_nested_str_weak(pos_X25_X3A),
- /* K22 */ be_nested_str_weak(tilt_X25_X3A),
- /* K23 */ be_nested_str_weak(invoke_request),
+ /* K22 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[131]) { /* code */
+ ( &(const binstruction[112]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -408,7 +348,7 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220101, // 0005 LDINT R8 258
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x78220070, // 0007 JMPF R8 #0079
+ 0x7822005D, // 0007 JMPF R8 #0066
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x1C200F06, // 000A EQ R8 R7 K6
@@ -426,7 +366,7 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0x7C200200, // 0016 CALL R8 1
0x50200200, // 0017 LDBOOL R8 1 0
0x80041000, // 0018 RET 1 R8
- 0x7002005D, // 0019 JMP #0078
+ 0x7002004A, // 0019 JMP #0065
0x1C200F0B, // 001A EQ R8 R7 K11
0x7822000D, // 001B JMPF R8 #002A
0xB8220E00, // 001C GETNGBL R8 K7
@@ -442,7 +382,7 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0x7C200200, // 0026 CALL R8 1
0x50200200, // 0027 LDBOOL R8 1 0
0x80041000, // 0028 RET 1 R8
- 0x7002004D, // 0029 JMP #0078
+ 0x7002003A, // 0029 JMP #0065
0x1C200F0E, // 002A EQ R8 R7 K14
0x7822000D, // 002B JMPF R8 #003A
0xB8220E00, // 002C GETNGBL R8 K7
@@ -458,10 +398,10 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0x7C200200, // 0036 CALL R8 1
0x50200200, // 0037 LDBOOL R8 1 0
0x80041000, // 0038 RET 1 R8
- 0x7002003D, // 0039 JMP #0078
+ 0x7002002A, // 0039 JMP #0065
0x54220004, // 003A LDINT R8 5
0x1C200E08, // 003B EQ R8 R7 R8
- 0x78220028, // 003C JMPF R8 #0066
+ 0x78220027, // 003C JMPF R8 #0065
0xB8220E00, // 003D GETNGBL R8 K7
0x8C201110, // 003E GETMET R8 R8 K16
0x60280008, // 003F GETGBL R10 G8
@@ -502,36 +442,17 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
0x7C240200, // 0062 CALL R9 1
0x50240200, // 0063 LDBOOL R9 1 0
0x80041200, // 0064 RET 1 R9
- 0x70020011, // 0065 JMP #0078
- 0x54220007, // 0066 LDINT R8 8
- 0x1C200E08, // 0067 EQ R8 R7 R8
- 0x7822000E, // 0068 JMPF R8 #0078
- 0x8C200512, // 0069 GETMET R8 R2 K18
- 0x58280006, // 006A LDCONST R10 K6
- 0x7C200400, // 006B CALL R8 2
- 0x4C240000, // 006C LDNIL R9
- 0x20241009, // 006D NE R9 R8 R9
- 0x78260006, // 006E JMPF R9 #0076
- 0x54260009, // 006F LDINT R9 10
- 0x0C201009, // 0070 DIV R8 R8 R9
- 0x60240008, // 0071 GETGBL R9 G8
- 0x5C281000, // 0072 MOVE R10 R8
- 0x7C240200, // 0073 CALL R9 1
- 0x00262C09, // 0074 ADD R9 K22 R9
- 0x900E2009, // 0075 SETMBR R3 K16 R9
- 0x50240200, // 0076 LDBOOL R9 1 0
- 0x80041200, // 0077 RET 1 R9
- 0x70020008, // 0078 JMP #0082
- 0x60200003, // 0079 GETGBL R8 G3
- 0x5C240000, // 007A MOVE R9 R0
- 0x7C200200, // 007B CALL R8 1
- 0x8C201117, // 007C GETMET R8 R8 K23
- 0x5C280200, // 007D MOVE R10 R1
- 0x5C2C0400, // 007E MOVE R11 R2
- 0x5C300600, // 007F MOVE R12 R3
- 0x7C200800, // 0080 CALL R8 4
- 0x80041000, // 0081 RET 1 R8
- 0x80000000, // 0082 RET 0
+ 0x70020008, // 0065 JMP #006F
+ 0x60200003, // 0066 GETGBL R8 G3
+ 0x5C240000, // 0067 MOVE R9 R0
+ 0x7C200200, // 0068 CALL R8 1
+ 0x8C201116, // 0069 GETMET R8 R8 K22
+ 0x5C280200, // 006A MOVE R10 R1
+ 0x5C2C0400, // 006B MOVE R11 R2
+ 0x5C300600, // 006C MOVE R12 R3
+ 0x7C200800, // 006D CALL R8 4
+ 0x80041000, // 006E RET 1 R8
+ 0x80000000, // 006F RET 0
})
)
);
@@ -660,20 +581,15 @@ be_local_class(Matter_Plugin_Shutter,
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
- be_const_list( * be_nested_list(15,
+ be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(5),
- be_const_int(6),
be_const_int(7),
- be_const_int(8),
- be_const_int(9),
be_const_int(10),
be_const_int(11),
- be_const_int(12),
be_const_int(13),
be_const_int(14),
- be_const_int(15),
be_const_int(23),
be_const_int(65532),
be_const_int(65533),
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
new file mode 100644
index 000000000..8126a9e45
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
@@ -0,0 +1,219 @@
+/* Solidification of Matter_Plugin_ShutterTilt.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_ShutterTilt;
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
+ be_nested_proto(
+ 13, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(command),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_nested_str_weak(findsubval),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(log),
+ /* K9 */ be_nested_str_weak(tilt_X25_X3A),
+ /* K10 */ be_nested_str_weak(invoke_request),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[37]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0xB8160200, // 0001 GETNGBL R5 K1
+ 0x88140B02, // 0002 GETMBR R5 R5 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x881C0704, // 0004 GETMBR R7 R3 K4
+ 0x54220101, // 0005 LDINT R8 258
+ 0x1C200C08, // 0006 EQ R8 R6 R8
+ 0x78220013, // 0007 JMPF R8 #001C
+ 0x8C200105, // 0008 GETMET R8 R0 K5
+ 0x7C200200, // 0009 CALL R8 1
+ 0x54220007, // 000A LDINT R8 8
+ 0x1C200E08, // 000B EQ R8 R7 R8
+ 0x7822000E, // 000C JMPF R8 #001C
+ 0x8C200506, // 000D GETMET R8 R2 K6
+ 0x58280007, // 000E LDCONST R10 K7
+ 0x7C200400, // 000F CALL R8 2
+ 0x4C240000, // 0010 LDNIL R9
+ 0x20241009, // 0011 NE R9 R8 R9
+ 0x78260006, // 0012 JMPF R9 #001A
+ 0x54260009, // 0013 LDINT R9 10
+ 0x0C201009, // 0014 DIV R8 R8 R9
+ 0x60240008, // 0015 GETGBL R9 G8
+ 0x5C281000, // 0016 MOVE R10 R8
+ 0x7C240200, // 0017 CALL R9 1
+ 0x00261209, // 0018 ADD R9 K9 R9
+ 0x900E1009, // 0019 SETMBR R3 K8 R9
+ 0x50240200, // 001A LDBOOL R9 1 0
+ 0x80041200, // 001B RET 1 R9
+ 0x60200003, // 001C GETGBL R8 G3
+ 0x5C240000, // 001D MOVE R9 R0
+ 0x7C200200, // 001E CALL R8 1
+ 0x8C20110A, // 001F GETMET R8 R8 K10
+ 0x5C280200, // 0020 MOVE R10 R1
+ 0x5C2C0400, // 0021 MOVE R11 R2
+ 0x5C300600, // 0022 MOVE R12 R3
+ 0x7C200800, // 0023 CALL R8 4
+ 0x80041000, // 0024 RET 1 R8
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_nested_str_weak(create_TLV),
+ /* K7 */ be_nested_str_weak(U1),
+ /* K8 */ be_const_int(1),
+ /* K9 */ be_nested_str_weak(U2),
+ /* K10 */ be_nested_str_weak(shadow_shutter_tilt),
+ /* K11 */ be_const_int(0),
+ /* K12 */ be_nested_str_weak(U4),
+ /* K13 */ be_const_int(3),
+ /* K14 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[63]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0101, // 0005 LDINT R7 258
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E002E, // 0007 JMPF R7 #0037
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x541E0006, // 000A LDINT R7 7
+ 0x1C1C0C07, // 000B EQ R7 R6 R7
+ 0x781E0008, // 000C JMPF R7 #0016
+ 0x8C1C0906, // 000D GETMET R7 R4 K6
+ 0x88240907, // 000E GETMBR R9 R4 K7
+ 0x542A0007, // 000F LDINT R10 8
+ 0x002A100A, // 0010 ADD R10 K8 R10
+ 0x542E000F, // 0011 LDINT R11 16
+ 0x0028140B, // 0012 ADD R10 R10 R11
+ 0x7C1C0600, // 0013 CALL R7 3
+ 0x80040E00, // 0014 RET 1 R7
+ 0x70020020, // 0015 JMP #0037
+ 0x541E000E, // 0016 LDINT R7 15
+ 0x1C1C0C07, // 0017 EQ R7 R6 R7
+ 0x781E0009, // 0018 JMPF R7 #0023
+ 0x8C1C0906, // 0019 GETMET R7 R4 K6
+ 0x88240909, // 001A GETMBR R9 R4 K9
+ 0x542A0063, // 001B LDINT R10 100
+ 0x882C010A, // 001C GETMBR R11 R0 K10
+ 0x0428140B, // 001D SUB R10 R10 R11
+ 0x542E0063, // 001E LDINT R11 100
+ 0x0828140B, // 001F MUL R10 R10 R11
+ 0x7C1C0600, // 0020 CALL R7 3
+ 0x80040E00, // 0021 RET 1 R7
+ 0x70020013, // 0022 JMP #0037
+ 0x541E000B, // 0023 LDINT R7 12
+ 0x1C1C0C07, // 0024 EQ R7 R6 R7
+ 0x781E0005, // 0025 JMPF R7 #002C
+ 0x8C1C0906, // 0026 GETMET R7 R4 K6
+ 0x88240907, // 0027 GETMBR R9 R4 K7
+ 0x5828000B, // 0028 LDCONST R10 K11
+ 0x7C1C0600, // 0029 CALL R7 3
+ 0x80040E00, // 002A RET 1 R7
+ 0x7002000A, // 002B JMP #0037
+ 0x541EFFFB, // 002C LDINT R7 65532
+ 0x1C1C0C07, // 002D EQ R7 R6 R7
+ 0x781E0007, // 002E JMPF R7 #0037
+ 0x8C1C0906, // 002F GETMET R7 R4 K6
+ 0x8824090C, // 0030 GETMBR R9 R4 K12
+ 0x542A0003, // 0031 LDINT R10 4
+ 0x002A1A0A, // 0032 ADD R10 K13 R10
+ 0x542E000F, // 0033 LDINT R11 16
+ 0x0028140B, // 0034 ADD R10 R10 R11
+ 0x7C1C0600, // 0035 CALL R7 3
+ 0x80040E00, // 0036 RET 1 R7
+ 0x601C0003, // 0037 GETGBL R7 G3
+ 0x5C200000, // 0038 MOVE R8 R0
+ 0x7C1C0200, // 0039 CALL R7 1
+ 0x8C1C0F0E, // 003A GETMET R7 R7 K14
+ 0x5C240200, // 003B MOVE R9 R1
+ 0x5C280400, // 003C MOVE R10 R2
+ 0x7C1C0600, // 003D CALL R7 3
+ 0x80040E00, // 003E RET 1 R7
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_ShutterTilt
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Shutter;
+be_local_class(Matter_Plugin_ShutterTilt,
+ 0,
+ &be_class_Matter_Plugin_Shutter,
+ be_nested_map(5,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(TYPE, 1), be_nested_str_weak(shutter_X2Btilt) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) },
+ { be_const_key_weak(invoke_request, 3), be_const_closure(Matter_Plugin_ShutterTilt_invoke_request_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) },
+ { be_const_key_weak(CLUSTERS, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(4,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(7),
+ be_const_int(12),
+ be_const_int(15),
+ be_const_int(65532),
+ })) ) } )) },
+ })) ) } )) },
+ })),
+ be_str_weak(Matter_Plugin_ShutterTilt)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_ShutterTilt_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_ShutterTilt);
+ be_setglobal(vm, "Matter_Plugin_ShutterTilt");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
index 424cf1b1d..189b99c1e 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -1792,7 +1792,7 @@ be_local_class(Matter_UI,
be_nested_map(17,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(show_plugins_configuration, -1), be_const_closure(Matter_UI_show_plugins_configuration_closure) },
- { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
+ { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
{ be_const_key_weak(show_fabric_info, 7), be_const_closure(Matter_UI_show_fabric_info_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) },
{ be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) },
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino
index de58aeb91..7e93e3751 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_zigbee.ino
@@ -214,9 +214,9 @@ extern "C" {
extern const be_ctypes_structure_t be_zigbee_zcl_frame_struct = {
sizeof(ZCLFrame), /* size in bytes */
- 12, /* number of elements */
+ 13, /* number of elements */
nullptr,
- (const be_ctypes_structure_item_t[12]) {
+ (const be_ctypes_structure_item_t[13]) {
{ "cluster", offsetof(ZCLFrame, cluster), 0, 0, ctypes_u16, 0 },
{ "cluster_specific", offsetof(ZCLFrame, clusterSpecific), 0, 0, ctypes_u8, 0 },
{ "cmd", offsetof(ZCLFrame, cmd), 0, 0, ctypes_u8, 0 },
@@ -227,6 +227,7 @@ extern "C" {
{ "need_response", offsetof(ZCLFrame, needResponse), 0, 0, ctypes_u8, 0 },
{ "payload_ptr", offsetof(ZCLFrame, payload), 0, 0, ctypes_ptr32, 0 },
{ "shortaddr", offsetof(ZCLFrame, shortaddr), 0, 0, ctypes_u16, 0 },
+ { "srcendpoint", offsetof(ZCLFrame, srcendpoint), 0, 0, ctypes_u8, 0 },
{ "transactseq", offsetof(ZCLFrame, transactseq), 0, 0, ctypes_u8, 0 },
{ "transactseq_set", offsetof(ZCLFrame, transacSet), 0, 0, ctypes_u8, 0 },
}};
From 60855bf367f7ee62cf22196e700f606a1dd72160 Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Thu, 27 Apr 2023 08:03:00 +0200
Subject: [PATCH 044/289] Enabled ZCDimmerSet for ESP8266 (#18518)
* Enabled ZCDimmerSet for ESP8266
- Increased interrupts time to get stablity. Savedata issue is gone.
- Increased accuracy to trigger an on sinus curve.
- Enabled high resolution trigger ZCDimmerSet for ESP8266
* Update xdrv_68_zerocrossDimmer.ino
---
.../xdrv_68_zerocrossDimmer.ino | 101 ++++++++++--------
1 file changed, 59 insertions(+), 42 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
index 307fabc00..890b3bb3b 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
@@ -24,23 +24,25 @@
#define XDRV_68 68
-static const uint32_t GATE_ENABLE_TIME = 100;
+static const uint8_t GATE_ENABLE_TIME = 100;
+static const uint8_t MIN_PERCENT = 5;
+static const uint8_t MAX_PERCENT = 99;
+static const uint8_t TRIGGER_PERIOD = 75;
struct AC_ZERO_CROSS_DIMMER {
- uint32_t cycle_time_us;
- /// Time (in micros()) of last ZC signal
- uint32_t crossed_zero_at;
- /// Time since last ZC pulse to enable gate pin. 0 means not set.
- bool timer_iterrupt_started = false;
- bool dimmer_in_use = false;
- // Check if 50µs timer is running.
- uint32_t enable_time_us[MAX_PWMS];
- /// Time since last ZC pulse to disable gate pin. 0 means no disable.
- uint32_t disable_time_us[MAX_PWMS];
- uint8_t current_state_in_phase[MAX_PWMS]; // 0=before fire HIGH, 1=HIGH, 2=after setting LOW, 3=before HIGH without setting LOW (POWER ON)
- uint32_t lastlight[MAX_PWMS];
- uint16_t detailpower[MAX_PWMS]; // replaces dimmer and light controll 0..10000. required savedata 0.
- uint32_t intr_counter = 0;
+ uint32_t cycle_time_us; // Time (in micros()) of last ZC signal
+ uint32_t crossed_zero_at; // Time (in micros()) of last ZC signal
+ bool timer_iterrupt_started = false; // verification of the interrupt running
+ bool dimmer_in_use = false; // Check if interrupt has to be run. Is stopped if all lights off
+ uint32_t enable_time_us[MAX_PWMS]; // Time since last ZC pulse to enable gate pin. 0 means no disable.
+ uint32_t disable_time_us[MAX_PWMS]; // Time since last ZC pulse to disable gate pin. 0 means no disable.
+ uint8_t current_state_in_phase[MAX_PWMS]; // 0=before fire HIGH, 1=HIGH, 2=after setting LOW, 3=before HIGH without setting LOW (POWER ON)
+ uint32_t lastlight[MAX_PWMS]; // Store the light value. Set 1 if controlled through ZCDimmerSet
+ uint16_t detailpower[MAX_PWMS]; // replaces dimmer and light controll 0..10000. required savedata 0.
+ uint32_t accurracy[MAX_PWMS]; // offset of the time to fire the triac and the real time when it fired
+ uint8_t triggertime = GATE_ENABLE_TIME; // copy of the Time for the gate keep open to start TRIAC
+ uint32_t intr_counter = 0; // counter internally on interrerupt calls
+ uint32_t missed_zero_cross; // count up all missed Zero-cross events.
} ac_zero_cross_dimmer;
@@ -49,12 +51,13 @@ struct AC_ZERO_CROSS_DIMMER {
#endif
#define D_PRFX_ZCDIMMER "ZCDimmer"
-#define D_CMND_DIMMERSET "Set"
+#define D_CMND_DIMMERSET "Set" // Set percent as float value for dimmer
+#define D_CMND_GATEENABLE "GateTime" // Override the GATE ON time DEBUG PURPOSE
-const char kZCDimmerCommands[] PROGMEM = D_PRFX_ZCDIMMER "|" D_CMND_DIMMERSET;
+const char kZCDimmerCommands[] PROGMEM = D_PRFX_ZCDIMMER "|" D_CMND_DIMMERSET "|" D_CMND_GATEENABLE;
void (* const ZCDimmerCommand[])(void) PROGMEM = {
- &CmndZCDimmerSet
+ &CmndZCDimmerSet//,&CmndZCGateEnableTime
};
void IRAM_ATTR ACDimmerZeroCross(uint32_t time) {
@@ -66,12 +69,12 @@ void IRAM_ATTR ACDimmerZeroCross(uint32_t time) {
ac_zero_cross_dimmer.dimmer_in_use |= ac_zero_cross_dimmer.lastlight[i] > 0;
// Dimmer is physically off. Skip swich on
ac_zero_cross_dimmer.current_state_in_phase[i] = 0;
- if (100 * ac_zero_cross_dimmer.enable_time_us[i] > 95 * ac_zero_cross_dimmer.cycle_time_us ) {
+ if (100 * ac_zero_cross_dimmer.enable_time_us[i] > MAX_PERCENT * ac_zero_cross_dimmer.cycle_time_us ) {
ac_zero_cross_dimmer.current_state_in_phase[i] = 1;
ac_zero_cross_dimmer.disable_time_us[i] = ac_zero_cross_dimmer.cycle_time_us / 2;
}
// If full cycle is required keep pin HIGH, skip LOW by skipping phase
- if (100 * ac_zero_cross_dimmer.enable_time_us[i] < 15 * ac_zero_cross_dimmer.cycle_time_us) {
+ if (100 * ac_zero_cross_dimmer.enable_time_us[i] < MIN_PERCENT * ac_zero_cross_dimmer.cycle_time_us) {
ac_zero_cross_dimmer.current_state_in_phase[i] = 3;
}
}
@@ -112,13 +115,7 @@ void ACDimmerInterruptDisable(bool disable)
// For ESP32, we can't use dynamic interval calculation because the timerX functions
// are not callable from ISR (placed in flash storage).
// Here we just use an interrupt firing every 75 µs.
- if (Settings->save_data == 0) {
- AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Save disabled. High frequency scan enabled. DO NOT USE SAVEDATA if channel is on"));
- timerAlarmWrite(dimmer_timer, 30, true);
- } else {
- AddLog(LOG_LEVEL_INFO, PSTR("ZCD: Save on. 75µs scan enabled"));
- timerAlarmWrite(dimmer_timer, 75, true);
- }
+ timerAlarmWrite(dimmer_timer, TRIGGER_PERIOD , true);
}
timerAlarmEnable(dimmer_timer);
#endif
@@ -139,9 +136,12 @@ void IRAM_ATTR ACDimmerTimer_intr() {
return;
uint32_t time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+
+ // Check for missed Zero-Cross event. Single failure will correct
if (time_since_zc > 10100) {
memset(&ac_zero_cross_dimmer.current_state_in_phase, 0x00, sizeof(ac_zero_cross_dimmer.current_state_in_phase));
ac_zero_cross_dimmer.crossed_zero_at += ac_zero_cross_dimmer.cycle_time_us;
+ ac_zero_cross_dimmer.missed_zero_cross++;
time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
}
@@ -149,6 +149,7 @@ void IRAM_ATTR ACDimmerTimer_intr() {
if (Pin(GPIO_PWM1, i) == -1) continue;
switch (ac_zero_cross_dimmer.current_state_in_phase[i]) {
case 1:
+ // Switch off does not need high accuracy. Happens at the next 75µs trigger
if (time_since_zc >= ac_zero_cross_dimmer.disable_time_us[i]) {
digitalWrite(Pin(GPIO_PWM1, i), LOW);
ac_zero_cross_dimmer.current_state_in_phase[i]++;
@@ -156,9 +157,17 @@ void IRAM_ATTR ACDimmerTimer_intr() {
break;
case 0:
case 3:
+ if (time_since_zc + TRIGGER_PERIOD >= ac_zero_cross_dimmer.enable_time_us[i]){
+ // Very close to the fire event. Loop the last µseconds to wait.
+ while (time_since_zc < ac_zero_cross_dimmer.enable_time_us[i]) {
+ now = micros();
+ time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+ }
+ }
if (time_since_zc >= ac_zero_cross_dimmer.enable_time_us[i]) {
digitalWrite(Pin(GPIO_PWM1, i), HIGH);
ac_zero_cross_dimmer.current_state_in_phase[i]++;
+ ac_zero_cross_dimmer.accurracy[i] = time_since_zc-ac_zero_cross_dimmer.enable_time_us[i];
}
break;
}
@@ -173,21 +182,25 @@ void ACDimmerControllTrigger(void) {
}
for (uint8_t i = 0; i < MAX_PWMS; i++){
if (Pin(GPIO_PWM1, i) == -1) continue;
- ac_zero_cross_dimmer.lastlight[i] = Light.fade_running ? Light.fade_cur_10[i] : Light.fade_start_10[i];
+
+ if (ac_zero_cross_dimmer.detailpower[i]){
+ ac_zero_cross_dimmer.lastlight[i] = changeUIntScale(ac_zero_cross_dimmer.detailpower[i]/10, 0, 1000, 0, 1023);
+ } else {
+ ac_zero_cross_dimmer.lastlight[i] = Light.fade_running ? Light.fade_cur_10[i] : Light.fade_start_10[i];
+ }
ac_zero_cross_dimmer.enable_time_us[i] = (ac_zero_cross_dimmer.cycle_time_us * (1023 - ac_zero_cross_power(ac_zero_cross_dimmer.lastlight[i]))) / 1023;
#ifdef ESP32
if (ac_zero_cross_dimmer.detailpower[i]){
float state = (float)(1 - (ac_zero_cross_dimmer.detailpower[i]/10000.0));
//state = std::acos(1 - (2 * state)) / 3.14159 * ac_zero_cross_dimmer.cycle_time_us;
- state = std::acos(1 - (2 * state)) / 3.14159 * 10000;
+ state = std::acos(1 - (2 * state)) / 3.14159 * ac_zero_cross_dimmer.cycle_time_us;
//AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: Float2: %*_f"),0,&state);
ac_zero_cross_dimmer.enable_time_us[i] = (uint32_t)state;
- ac_zero_cross_dimmer.lastlight[i] = 1;
}
#endif
- ac_zero_cross_dimmer.disable_time_us[i] = ac_zero_cross_dimmer.enable_time_us[i] + GATE_ENABLE_TIME;
+ ac_zero_cross_dimmer.disable_time_us[i] = ac_zero_cross_dimmer.enable_time_us[i] + ac_zero_cross_dimmer.triggertime;
}
}
@@ -204,17 +217,18 @@ void ACDimmerLogging(void)
}
#endif
- AddLog(LOG_LEVEL_DEBUG, PSTR("ZCD: ZeroEnable %d -> %d, Alarm %d, intr: %ld, cycle time: %ld µs"),
- ac_zero_cross_dimmer.dimmer_in_use, ac_zero_cross_dimmer.timer_iterrupt_started, alarmEnabled, timercounter, ac_zero_cross_dimmer.cycle_time_us
+ AddLog(LOG_LEVEL_DEBUG, PSTR("ZCD: ZeroEnable %d -> %d, Alarm %d, intr: %ld, cycle time: %ld µs, missed zc %ld"),
+ ac_zero_cross_dimmer.dimmer_in_use, ac_zero_cross_dimmer.timer_iterrupt_started, alarmEnabled, timercounter,
+ ac_zero_cross_dimmer.cycle_time_us, ac_zero_cross_dimmer.missed_zero_cross
);
for (uint8_t i = 0; i < MAX_PWMS; i++){
if (Pin(GPIO_PWM1, i) == -1) continue;
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: PWM[%d] en: %ld µs, dis: %ld µs, state %d, fade: %d, cur: %d, end: %d, lastlight: %d"),
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: PWM[%d] en: %ld µs, dis: %ld µs, state %d, fade: %d, cur: %d, end: %d, lastlight: %d, acc: %ld"),
i+1, ac_zero_cross_dimmer.enable_time_us[i], ac_zero_cross_dimmer.disable_time_us[i],
- ac_zero_cross_dimmer.current_state_in_phase[i], Light.fade_cur_10[i], Light.fade_start_10[i], Light.fade_end_10[i], ac_zero_cross_dimmer.lastlight[i]
+ ac_zero_cross_dimmer.current_state_in_phase[i], Light.fade_cur_10[i], Light.fade_start_10[i], Light.fade_end_10[i], ac_zero_cross_dimmer.lastlight[i],
+ ac_zero_cross_dimmer.accurracy[i]
);
}
-
}
@@ -232,6 +246,14 @@ void CmndZCDimmerSet(void)
}
}
+/* void CmndZCGateEnableTime(void)
+{
+ if (XdrvMailbox.payload > 0) {
+ ac_zero_cross_dimmer.triggertime = XdrvMailbox.payload;
+ }
+ ResponseCmndNumber(ac_zero_cross_dimmer.triggertime);
+} */
+
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
@@ -256,21 +278,16 @@ bool Xdrv68(uint32_t function)
ACDimmerControllTrigger();
break;
case FUNC_INTERRUPT_STOP:
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: FUNC_INTERRUPT_STOP"));
ACDimmerInterruptDisable(true);
break;
case FUNC_INTERRUPT_START:
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: FUNC_INTERRUPT_START"));
ACDimmerInterruptDisable(false);
break;
case FUNC_COMMAND:
result = DecodeCommand(kZCDimmerCommands, ZCDimmerCommand);
- //result = DecodeCommand(kShutterCommands, ShutterCommand);
-
break;
}
- }
+ }
return result;
}
-
#endif // USE_AC_ZERO_CROSS_DIMMER
From e4e2fcdc6d30574e5d924e0174d5ef58d0c0906c Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Thu, 27 Apr 2023 08:54:57 +0200
Subject: [PATCH 045/289] Matter reduce logging for CASE authentication
(#18527)
---
.../src/embedded/Matter_Commissioning.be | 134 +-
.../solidified_Matter_Commissioning.h | 2190 +++++++----------
2 files changed, 899 insertions(+), 1425 deletions(-)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
index 7235186e4..a77ea792d 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Commissioning.be
@@ -358,12 +358,12 @@ class Matter_Commisioning_Context
var Resume1MICPayload = ec.decrypt(encrypted)
var decrypted_tag = ec.tag()
- tasmota.log("****************************************", 4)
- tasmota.log("MTR: * s1rk = " + s1rk.tohex(), 4)
- tasmota.log("MTR: * tag = " + tag.tohex(), 4)
- tasmota.log("MTR: * Resume1MICPayload = " + Resume1MICPayload.tohex(), 4)
- tasmota.log("MTR: * decrypted_tag = " + decrypted_tag.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * s1rk = " + s1rk.tohex(), 4)
+ # tasmota.log("MTR: * tag = " + tag.tohex(), 4)
+ # tasmota.log("MTR: * Resume1MICPayload = " + Resume1MICPayload.tohex(), 4)
+ # tasmota.log("MTR: * decrypted_tag = " + decrypted_tag.tohex(), 4)
+ # tasmota.log("****************************************", 4)
if tag == decrypted_tag
session._fabric = session_resumption._fabric
session._source_node_id = msg.source_node_id
@@ -391,13 +391,13 @@ class Matter_Commisioning_Context
sigma2resume.responderSessionID = session.__future_local_session_id
sigma2resume.sigma2ResumeMIC = Resume2MIC
- tasmota.log("****************************************", 4)
- tasmota.log("MTR: * s2rk = " + s2rk.tohex(), 4)
- tasmota.log("MTR: * s2rk_salt = " + s2rk_salt.tohex(), 4)
- tasmota.log("MTR: * new_resumption_id = " + session.resumption_id.tohex(), 4)
- tasmota.log("MTR: * responderSessionID= " + str(session.__future_local_session_id), 4)
- tasmota.log("MTR: * sigma2ResumeMIC = " + Resume2MIC.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * s2rk = " + s2rk.tohex(), 4)
+ # tasmota.log("MTR: * s2rk_salt = " + s2rk_salt.tohex(), 4)
+ # tasmota.log("MTR: * new_resumption_id = " + session.resumption_id.tohex(), 4)
+ # tasmota.log("MTR: * responderSessionID= " + str(session.__future_local_session_id), 4)
+ # tasmota.log("MTR: * sigma2ResumeMIC = " + Resume2MIC.tohex(), 4)
+ # tasmota.log("****************************************", 4)
# # compute session key, p.178
var session_keys = crypto.HKDF_SHA256().derive(session.shared_secret #- input key -#,
sigma1.initiatorRandom + session.resumption_id #- salt -#,
@@ -408,16 +408,16 @@ class Matter_Commisioning_Context
var ac = session_keys[32..47]
var created = tasmota.rtc()['utc']
- tasmota.log("MTR: ******************************", 4)
- tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4)
- tasmota.log("MTR: R2IKey =" + r2i.tohex(), 4)
- tasmota.log("MTR: AC =" + ac.tohex(), 4)
- tasmota.log("MTR: ******************************", 4)
+ # tasmota.log("MTR: ******************************", 4)
+ # tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4)
+ # tasmota.log("MTR: R2IKey =" + r2i.tohex(), 4)
+ # tasmota.log("MTR: AC =" + ac.tohex(), 4)
+ # tasmota.log("MTR: ******************************", 4)
var sigma2resume_raw = sigma2resume.tlv2raw()
session.__Msg1 = nil
- tasmota.log("MTR: sigma2resume: " + matter.inspect(sigma2resume), 4)
- tasmota.log("MTR: sigma2resume_raw: " + sigma2resume_raw.tohex(), 4)
+ # tasmota.log("MTR: sigma2resume: " + matter.inspect(sigma2resume), 4)
+ # tasmota.log("MTR: sigma2resume_raw: " + sigma2resume_raw.tohex(), 4)
# now package the response message
var resp = msg.build_response(0x33 #-sigma-2-resume-#, true)
@@ -493,40 +493,40 @@ class Matter_Commisioning_Context
sigma2_tbedata.add_TLV(4, matter.TLV.B2, session.resumption_id)
# compute TranscriptHash = Crypto_Hash(message = Msg1)
- tasmota.log("****************************************", 4)
+ # tasmota.log("****************************************", 4)
session.__Msg1 = sigma1.Msg1
- tasmota.log("MTR: * resumptionid = " + session.resumption_id.tohex(), 4)
- tasmota.log("MTR: * MSG1 = " + session.__Msg1.tohex(), 4)
+ # tasmota.log("MTR: * resumptionid = " + session.resumption_id.tohex(), 4)
+ # tasmota.log("MTR: * MSG1 = " + session.__Msg1.tohex(), 4)
var TranscriptHash = crypto.SHA256().update(session.__Msg1).out()
- tasmota.log("MTR: TranscriptHash =" + TranscriptHash.tohex(), 4)
+ # tasmota.log("MTR: TranscriptHash =" + TranscriptHash.tohex(), 4)
# Compute S2K, p.175
var s2k_info = bytes().fromstring(self.S2K_Info)
var s2k_salt = session.get_ipk_group_key() + responderRandom + session.__responder_pub + TranscriptHash
var s2k = crypto.HKDF_SHA256().derive(session.shared_secret, s2k_salt, s2k_info, 16)
- tasmota.log("MTR: * SharedSecret = " + session.shared_secret.tohex(), 4)
- tasmota.log("MTR: * s2k_salt = " + s2k_salt.tohex(), 4)
- tasmota.log("MTR: * s2k = " + s2k.tohex(), 4)
+ # tasmota.log("MTR: * SharedSecret = " + session.shared_secret.tohex(), 4)
+ # tasmota.log("MTR: * s2k_salt = " + s2k_salt.tohex(), 4)
+ # tasmota.log("MTR: * s2k = " + s2k.tohex(), 4)
var sigma2_tbedata_raw = sigma2_tbedata.tlv2raw()
- tasmota.log("MTR: * TBEData2Raw = " + sigma2_tbedata_raw.tohex(), 4)
+ # tasmota.log("MTR: * TBEData2Raw = " + sigma2_tbedata_raw.tohex(), 4)
# // `AES_CCM.init(secret_key:bytes(16 or 32), iv:bytes(7..13), aad:bytes(), data_len:int, tag_len:int) -> instance`
var aes = crypto.AES_CCM(s2k, bytes().fromstring(self.TBEData2_Nonce), bytes(), size(sigma2_tbedata_raw), 16)
var TBEData2Encrypted = aes.encrypt(sigma2_tbedata_raw) + aes.tag()
- tasmota.log("MTR: * TBEData2Enc = " + TBEData2Encrypted.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * TBEData2Enc = " + TBEData2Encrypted.tohex(), 4)
+ # tasmota.log("****************************************", 4)
var sigma2 = matter.Sigma2()
sigma2.responderRandom = responderRandom
sigma2.responderSessionId = session.__future_local_session_id
sigma2.responderEphPubKey = session.__responder_pub
sigma2.encrypted2 = TBEData2Encrypted
- tasmota.log("MTR: sigma2: " + matter.inspect(sigma2), 4)
+ # tasmota.log("MTR: sigma2: " + matter.inspect(sigma2), 4)
var sigma2_raw = sigma2.tlv2raw()
session.__Msg2 = sigma2_raw
- tasmota.log("MTR: sigma2_raw: " + sigma2_raw.tohex(), 4)
+ # tasmota.log("MTR: sigma2_raw: " + sigma2_raw.tohex(), 4)
# now package the response message
var resp = msg.build_response(0x31 #-sigma-2-#, true) # no reliable flag
@@ -550,22 +550,22 @@ class Matter_Commisioning_Context
var session = msg.session
var sigma3 = matter.Sigma3().parse(msg.raw, msg.app_payload_idx)
- tasmota.log("****************************************", 4)
+ # tasmota.log("****************************************", 4)
# compute TranscriptHash = Crypto_Hash(message = Msg1 || Msg2)
var TranscriptHash = crypto.SHA256().update(session.__Msg1).update(session.__Msg2).out()
- tasmota.log("MTR: * session = " + str(session), 4)
- tasmota.log("MTR: .ipk_epoch_key=" + str(session.get_ipk_epoch_key()), 4)
- tasmota.log("MTR: .fabric_compr = " + str(session.get_fabric_compressed()), 4)
- tasmota.log("MTR: * ipk_group_key = " + session.get_ipk_group_key().tohex(), 4)
- tasmota.log("MTR: * TranscriptHash= " + TranscriptHash.tohex(), 4)
+ # tasmota.log("MTR: * session = " + str(session), 4)
+ # tasmota.log("MTR: .ipk_epoch_key=" + str(session.get_ipk_epoch_key()), 4)
+ # tasmota.log("MTR: .fabric_compr = " + str(session.get_fabric_compressed()), 4)
+ # tasmota.log("MTR: * ipk_group_key = " + session.get_ipk_group_key().tohex(), 4)
+ # tasmota.log("MTR: * TranscriptHash= " + TranscriptHash.tohex(), 4)
var s3k_info = bytes().fromstring(self.S3K_Info)
var s3k = crypto.HKDF_SHA256().derive(session.shared_secret, session.get_ipk_group_key() + TranscriptHash, s3k_info, 16)
- tasmota.log("****************************************", 4)
- tasmota.log("MTR: * s3k_salt = " + (session.get_ipk_group_key() + TranscriptHash).tohex(), 4)
- tasmota.log("MTR: * s3k = " + s3k.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * s3k_salt = " + (session.get_ipk_group_key() + TranscriptHash).tohex(), 4)
+ # tasmota.log("MTR: * s3k = " + s3k.tohex(), 4)
+ # tasmota.log("****************************************", 4)
# decrypt
var encrypted = sigma3.TBEData3Encrypted[0..-17]
@@ -573,10 +573,10 @@ class Matter_Commisioning_Context
var ec = crypto.AES_CCM(s3k, bytes().fromstring(self.TBEData3_Nonce), bytes(), size(encrypted), 16)
var TBEData3 = ec.decrypt(encrypted)
var TBETag3 = ec.tag()
- tasmota.log("MTR: * TBEData3 = " + TBEData3.tohex(), 4)
- tasmota.log("MTR: * TBETag3 = " + TBETag3.tohex(), 4)
- tasmota.log("MTR: * tag_sent = " + tag.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * TBEData3 = " + TBEData3.tohex(), 4)
+ # tasmota.log("MTR: * TBETag3 = " + TBETag3.tohex(), 4)
+ # tasmota.log("MTR: * tag_sent = " + tag.tohex(), 4)
+ # tasmota.log("****************************************", 4)
if TBETag3 != tag
tasmota.log("MTR: Tag don't match", 2)
@@ -586,13 +586,13 @@ class Matter_Commisioning_Context
end
var TBEData3TLV = matter.TLV.parse(TBEData3)
- tasmota.log("MTR: * TBEData3TLV = " + str(TBEData3TLV), 4)
+ # tasmota.log("MTR: * TBEData3TLV = " + str(TBEData3TLV), 4)
var initiatorNOC = TBEData3TLV.findsubval(1)
var initiatorICAC = TBEData3TLV.findsubval(2)
var ec_signature = TBEData3TLV.findsubval(3)
- tasmota.log("MTR: * initiatorNOC = " + str(initiatorNOC), 4)
- tasmota.log("MTR: * initiatorICAC = " + str(initiatorICAC), 4)
- tasmota.log("MTR: * ec_signature = " + str(ec_signature), 4)
+ # tasmota.log("MTR: * initiatorNOC = " + str(initiatorNOC), 4)
+ # tasmota.log("MTR: * initiatorICAC = " + str(initiatorICAC), 4)
+ # tasmota.log("MTR: * ec_signature = " + str(ec_signature), 4)
# Success = Crypto_VerifyChain(certificates = [TBEData3.initiatorNOC, TBEData3.initiatorICAC, TrustedRCAC]), when TBEData3.initiatorICAC is present
# TODO
var initiatorNOCTLV = matter.TLV.parse(initiatorNOC)
@@ -608,13 +608,13 @@ class Matter_Commisioning_Context
sigma3_tbs.add_TLV(2, matter.TLV.B1, initiatorICAC)
sigma3_tbs.add_TLV(3, matter.TLV.B1, session.__initiator_pub)
sigma3_tbs.add_TLV(4, matter.TLV.B1, session.__responder_pub)
- tasmota.log("MTR: * sigma3_tbs = " + str(sigma3_tbs), 4)
+ # tasmota.log("MTR: * sigma3_tbs = " + str(sigma3_tbs), 4)
var sigma3_tbs_raw = sigma3_tbs.tlv2raw()
- tasmota.log("MTR: * sigma3_tbs_raw= " + sigma3_tbs_raw.tohex(), 4)
+ # tasmota.log("MTR: * sigma3_tbs_raw= " + sigma3_tbs_raw.tohex(), 4)
- tasmota.log("MTR: * initiatorNOCPubKey= " + initiatorNOCPubKey.tohex(), 4)
- tasmota.log("MTR: * ec_signature = " + ec_signature.tohex(), 4)
- tasmota.log("****************************************", 4)
+ # tasmota.log("MTR: * initiatorNOCPubKey= " + initiatorNOCPubKey.tohex(), 4)
+ # tasmota.log("MTR: * ec_signature = " + ec_signature.tohex(), 4)
+ # tasmota.log("****************************************", 4)
# `crypto.EC_P256().ecdsa_verify_sha256(public_key:bytes(65), message:bytes(), hash:bytes()) -> bool`
var sigma3_tbs_valid = crypto.EC_P256().ecdsa_verify_sha256(initiatorNOCPubKey, sigma3_tbs_raw, ec_signature)
@@ -631,17 +631,17 @@ class Matter_Commisioning_Context
end
TranscriptHash = crypto.SHA256().update(session.__Msg1).update(session.__Msg2).update(sigma3.Msg3).out()
- tasmota.log("MTR: * __Msg1 = " + session.__Msg1.tohex(), 4)
- tasmota.log("MTR: * __Msg2 = " + session.__Msg2.tohex(), 4)
- tasmota.log("MTR: * __Msg3 = " + sigma3.Msg3.tohex(), 4)
- tasmota.log("MTR: * TranscriptHash = " + TranscriptHash.tohex(), 4)
+ # tasmota.log("MTR: * __Msg1 = " + session.__Msg1.tohex(), 4)
+ # tasmota.log("MTR: * __Msg2 = " + session.__Msg2.tohex(), 4)
+ # tasmota.log("MTR: * __Msg3 = " + sigma3.Msg3.tohex(), 4)
+ # tasmota.log("MTR: * TranscriptHash = " + TranscriptHash.tohex(), 4)
# we can now free __Msg1 and __Msg2
session.__Msg1 = nil
session.__Msg2 = nil
- tasmota.log("MTR: ******************************", 4)
- tasmota.log("MTR: shared_secret =" + session.shared_secret.tohex(), 4)
- tasmota.log("MTR: ipk + hash =" + (session.get_ipk_group_key() + TranscriptHash).tohex(), 4)
+ # tasmota.log("MTR: ******************************", 4)
+ # tasmota.log("MTR: shared_secret =" + session.shared_secret.tohex(), 4)
+ # tasmota.log("MTR: ipk + hash =" + (session.get_ipk_group_key() + TranscriptHash).tohex(), 4)
# compute session key
var session_keys = crypto.HKDF_SHA256().derive(session.shared_secret #- input key -#,
session.get_ipk_group_key() + TranscriptHash #- salt -#,
@@ -652,11 +652,11 @@ class Matter_Commisioning_Context
var ac = session_keys[32..47]
var created = tasmota.rtc()['utc']
- tasmota.log("MTR: ******************************", 4)
- tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4)
- tasmota.log("MTR: R2IKey =" + r2i.tohex(), 4)
- tasmota.log("MTR: AC =" + ac.tohex(), 4)
- tasmota.log("MTR: ******************************", 4)
+ # tasmota.log("MTR: ******************************", 4)
+ # tasmota.log("MTR: I2RKey =" + i2r.tohex(), 4)
+ # tasmota.log("MTR: R2IKey =" + r2i.tohex(), 4)
+ # tasmota.log("MTR: AC =" + ac.tohex(), 4)
+ # tasmota.log("MTR: ******************************", 4)
# StatusReport(GeneralCode: SUCCESS, ProtocolId: SECURE_CHANNEL, ProtocolCode: SESSION_ESTABLISHMENT_SUCCESS)
self.send_status_report(msg, 0x00, 0x0000, 0x0000, true)
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
index af2acb9fa..f37665721 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Commissioning.h
@@ -885,7 +885,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[101]) { /* constants */
+ ( &(const bvalue[69]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(opcode),
/* K2 */ be_nested_str_weak(local_session_id),
@@ -903,94 +903,62 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */
/* K14 */ be_nested_str_weak(parse),
/* K15 */ be_nested_str_weak(raw),
/* K16 */ be_nested_str_weak(app_payload_idx),
- /* K17 */ be_nested_str_weak(_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A),
- /* K18 */ be_nested_str_weak(SHA256),
- /* K19 */ be_nested_str_weak(update),
- /* K20 */ be_nested_str_weak(__Msg1),
- /* K21 */ be_nested_str_weak(__Msg2),
- /* K22 */ be_nested_str_weak(out),
- /* K23 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20session_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K24 */ be_nested_str_weak(MTR_X3A_X20_X20_X20_X2Eipk_epoch_key_X3D),
- /* K25 */ be_nested_str_weak(get_ipk_epoch_key),
- /* K26 */ be_nested_str_weak(MTR_X3A_X20_X20_X20_X2Efabric_compr_X20_X3D_X20),
- /* K27 */ be_nested_str_weak(get_fabric_compressed),
- /* K28 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20ipk_group_key_X20_X3D_X20),
- /* K29 */ be_nested_str_weak(get_ipk_group_key),
- /* K30 */ be_nested_str_weak(tohex),
- /* K31 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TranscriptHash_X3D_X20),
- /* K32 */ be_nested_str_weak(fromstring),
- /* K33 */ be_nested_str_weak(S3K_Info),
- /* K34 */ be_nested_str_weak(HKDF_SHA256),
- /* K35 */ be_nested_str_weak(derive),
- /* K36 */ be_nested_str_weak(shared_secret),
- /* K37 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s3k_salt_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K38 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s3k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K39 */ be_nested_str_weak(TBEData3Encrypted),
- /* K40 */ be_const_int(2147483647),
- /* K41 */ be_nested_str_weak(AES_CCM),
- /* K42 */ be_nested_str_weak(TBEData3_Nonce),
- /* K43 */ be_nested_str_weak(decrypt),
- /* K44 */ be_nested_str_weak(tag),
- /* K45 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData3_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K46 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBETag3_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K47 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20tag_sent_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K48 */ be_nested_str_weak(MTR_X3A_X20Tag_X20don_X27t_X20match),
- /* K49 */ be_nested_str_weak(TLV),
- /* K50 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData3TLV_X20_X20_X20_X3D_X20),
- /* K51 */ be_nested_str_weak(findsubval),
- /* K52 */ be_const_int(3),
- /* K53 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20initiatorNOC_X20_X20_X3D_X20),
- /* K54 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20initiatorICAC_X20_X3D_X20),
- /* K55 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20ec_signature_X20_X20_X3D_X20),
- /* K56 */ be_nested_str_weak(MTR_X3A_X20initiatorNOCTLV_X20_X3D_X20),
- /* K57 */ be_nested_str_weak(findsub),
- /* K58 */ be_nested_str_weak(int),
- /* K59 */ be_nested_str_weak(peer_node_id),
- /* K60 */ be_nested_str_weak(int64),
- /* K61 */ be_nested_str_weak(fromu32),
- /* K62 */ be_nested_str_weak(tobytes),
- /* K63 */ be_nested_str_weak(MTR_X3A_X20initiatorFabricId_X3D),
- /* K64 */ be_nested_str_weak(Matter_TLV_struct),
- /* K65 */ be_nested_str_weak(add_TLV),
- /* K66 */ be_nested_str_weak(B1),
- /* K67 */ be_nested_str_weak(__initiator_pub),
- /* K68 */ be_nested_str_weak(__responder_pub),
- /* K69 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20sigma3_tbs_X20_X20_X20_X20_X3D_X20),
- /* K70 */ be_nested_str_weak(tlv2raw),
- /* K71 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20sigma3_tbs_raw_X3D_X20),
- /* K72 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20initiatorNOCPubKey_X3D_X20),
- /* K73 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20ec_signature_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K74 */ be_nested_str_weak(EC_P256),
- /* K75 */ be_nested_str_weak(ecdsa_verify_sha256),
- /* K76 */ be_nested_str_weak(MTR_X3A_X20sigma3_tbs_X20does_X20not_X20have_X20a_X20valid_X20signature),
- /* K77 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X20Invalid_X20signature_X2C_X20trying_X20anyways),
- /* K78 */ be_nested_str_weak(MTR_X3A_X20Sigma3_X20verified_X2C_X20computing_X20new_X20keys),
- /* K79 */ be_nested_str_weak(Msg3),
- /* K80 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20__Msg1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K81 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20__Msg2_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K82 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20__Msg3_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K83 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TranscriptHash_X20_X20_X20_X20_X3D_X20),
- /* K84 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A),
- /* K85 */ be_nested_str_weak(MTR_X3A_X20shared_secret_X20_X3D),
- /* K86 */ be_nested_str_weak(MTR_X3A_X20ipk_X20_X2B_X20hash_X20_X20_X20_X20_X3D),
- /* K87 */ be_nested_str_weak(SEKeys_Info),
- /* K88 */ be_nested_str_weak(rtc),
- /* K89 */ be_nested_str_weak(utc),
- /* K90 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D),
- /* K91 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D),
- /* K92 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
- /* K93 */ be_nested_str_weak(close),
- /* K94 */ be_nested_str_weak(set_keys),
- /* K95 */ be_nested_str_weak(_breadcrumb),
- /* K96 */ be_nested_str_weak(counter_snd_next),
- /* K97 */ be_nested_str_weak(set_persist),
- /* K98 */ be_nested_str_weak(set_no_expiration),
- /* K99 */ be_nested_str_weak(persist_to_fabric),
- /* K100 */ be_nested_str_weak(save),
+ /* K17 */ be_nested_str_weak(SHA256),
+ /* K18 */ be_nested_str_weak(update),
+ /* K19 */ be_nested_str_weak(__Msg1),
+ /* K20 */ be_nested_str_weak(__Msg2),
+ /* K21 */ be_nested_str_weak(out),
+ /* K22 */ be_nested_str_weak(fromstring),
+ /* K23 */ be_nested_str_weak(S3K_Info),
+ /* K24 */ be_nested_str_weak(HKDF_SHA256),
+ /* K25 */ be_nested_str_weak(derive),
+ /* K26 */ be_nested_str_weak(shared_secret),
+ /* K27 */ be_nested_str_weak(get_ipk_group_key),
+ /* K28 */ be_nested_str_weak(TBEData3Encrypted),
+ /* K29 */ be_const_int(2147483647),
+ /* K30 */ be_nested_str_weak(AES_CCM),
+ /* K31 */ be_nested_str_weak(TBEData3_Nonce),
+ /* K32 */ be_nested_str_weak(decrypt),
+ /* K33 */ be_nested_str_weak(tag),
+ /* K34 */ be_nested_str_weak(MTR_X3A_X20Tag_X20don_X27t_X20match),
+ /* K35 */ be_nested_str_weak(TLV),
+ /* K36 */ be_nested_str_weak(findsubval),
+ /* K37 */ be_const_int(3),
+ /* K38 */ be_nested_str_weak(MTR_X3A_X20initiatorNOCTLV_X20_X3D_X20),
+ /* K39 */ be_nested_str_weak(findsub),
+ /* K40 */ be_nested_str_weak(int),
+ /* K41 */ be_nested_str_weak(peer_node_id),
+ /* K42 */ be_nested_str_weak(int64),
+ /* K43 */ be_nested_str_weak(fromu32),
+ /* K44 */ be_nested_str_weak(tobytes),
+ /* K45 */ be_nested_str_weak(MTR_X3A_X20initiatorFabricId_X3D),
+ /* K46 */ be_nested_str_weak(Matter_TLV_struct),
+ /* K47 */ be_nested_str_weak(add_TLV),
+ /* K48 */ be_nested_str_weak(B1),
+ /* K49 */ be_nested_str_weak(__initiator_pub),
+ /* K50 */ be_nested_str_weak(__responder_pub),
+ /* K51 */ be_nested_str_weak(tlv2raw),
+ /* K52 */ be_nested_str_weak(EC_P256),
+ /* K53 */ be_nested_str_weak(ecdsa_verify_sha256),
+ /* K54 */ be_nested_str_weak(MTR_X3A_X20sigma3_tbs_X20does_X20not_X20have_X20a_X20valid_X20signature),
+ /* K55 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X20Invalid_X20signature_X2C_X20trying_X20anyways),
+ /* K56 */ be_nested_str_weak(MTR_X3A_X20Sigma3_X20verified_X2C_X20computing_X20new_X20keys),
+ /* K57 */ be_nested_str_weak(Msg3),
+ /* K58 */ be_nested_str_weak(SEKeys_Info),
+ /* K59 */ be_nested_str_weak(rtc),
+ /* K60 */ be_nested_str_weak(utc),
+ /* K61 */ be_nested_str_weak(close),
+ /* K62 */ be_nested_str_weak(set_keys),
+ /* K63 */ be_nested_str_weak(_breadcrumb),
+ /* K64 */ be_nested_str_weak(counter_snd_next),
+ /* K65 */ be_nested_str_weak(set_persist),
+ /* K66 */ be_nested_str_weak(set_no_expiration),
+ /* K67 */ be_nested_str_weak(persist_to_fabric),
+ /* K68 */ be_nested_str_weak(save),
}),
be_str_weak(parse_Sigma3),
&be_const_str_solidified,
- ( &(const binstruction[554]) { /* code */
+ ( &(const binstruction[303]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x880C0301, // 0001 GETMBR R3 R1 K1
0x54120031, // 0002 LDINT R4 50
@@ -1024,527 +992,276 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma3, /* name */
0x8818030F, // 001E GETMBR R6 R1 K15
0x881C0310, // 001F GETMBR R7 R1 K16
0x7C100600, // 0020 CALL R4 3
- 0xB8160A00, // 0021 GETNGBL R5 K5
- 0x8C140B06, // 0022 GETMET R5 R5 K6
- 0x581C0011, // 0023 LDCONST R7 K17
- 0x54220003, // 0024 LDINT R8 4
- 0x7C140600, // 0025 CALL R5 3
- 0x8C140512, // 0026 GETMET R5 R2 K18
- 0x7C140200, // 0027 CALL R5 1
- 0x8C140B13, // 0028 GETMET R5 R5 K19
- 0x881C0714, // 0029 GETMBR R7 R3 K20
- 0x7C140400, // 002A CALL R5 2
- 0x8C140B13, // 002B GETMET R5 R5 K19
- 0x881C0715, // 002C GETMBR R7 R3 K21
- 0x7C140400, // 002D CALL R5 2
- 0x8C140B16, // 002E GETMET R5 R5 K22
- 0x7C140200, // 002F CALL R5 1
- 0xB81A0A00, // 0030 GETNGBL R6 K5
- 0x8C180D06, // 0031 GETMET R6 R6 K6
- 0x60200008, // 0032 GETGBL R8 G8
- 0x5C240600, // 0033 MOVE R9 R3
- 0x7C200200, // 0034 CALL R8 1
- 0x00222E08, // 0035 ADD R8 K23 R8
- 0x54260003, // 0036 LDINT R9 4
- 0x7C180600, // 0037 CALL R6 3
- 0xB81A0A00, // 0038 GETNGBL R6 K5
- 0x8C180D06, // 0039 GETMET R6 R6 K6
- 0x60200008, // 003A GETGBL R8 G8
- 0x8C240719, // 003B GETMET R9 R3 K25
- 0x7C240200, // 003C CALL R9 1
- 0x7C200200, // 003D CALL R8 1
- 0x00223008, // 003E ADD R8 K24 R8
- 0x54260003, // 003F LDINT R9 4
- 0x7C180600, // 0040 CALL R6 3
- 0xB81A0A00, // 0041 GETNGBL R6 K5
- 0x8C180D06, // 0042 GETMET R6 R6 K6
- 0x60200008, // 0043 GETGBL R8 G8
- 0x8C24071B, // 0044 GETMET R9 R3 K27
- 0x7C240200, // 0045 CALL R9 1
- 0x7C200200, // 0046 CALL R8 1
- 0x00223408, // 0047 ADD R8 K26 R8
- 0x54260003, // 0048 LDINT R9 4
- 0x7C180600, // 0049 CALL R6 3
- 0xB81A0A00, // 004A GETNGBL R6 K5
- 0x8C180D06, // 004B GETMET R6 R6 K6
- 0x8C20071D, // 004C GETMET R8 R3 K29
- 0x7C200200, // 004D CALL R8 1
- 0x8C20111E, // 004E GETMET R8 R8 K30
- 0x7C200200, // 004F CALL R8 1
- 0x00223808, // 0050 ADD R8 K28 R8
- 0x54260003, // 0051 LDINT R9 4
- 0x7C180600, // 0052 CALL R6 3
- 0xB81A0A00, // 0053 GETNGBL R6 K5
- 0x8C180D06, // 0054 GETMET R6 R6 K6
- 0x8C200B1E, // 0055 GETMET R8 R5 K30
- 0x7C200200, // 0056 CALL R8 1
- 0x00223E08, // 0057 ADD R8 K31 R8
- 0x54260003, // 0058 LDINT R9 4
- 0x7C180600, // 0059 CALL R6 3
- 0x60180015, // 005A GETGBL R6 G21
- 0x7C180000, // 005B CALL R6 0
- 0x8C180D20, // 005C GETMET R6 R6 K32
- 0x88200121, // 005D GETMBR R8 R0 K33
- 0x7C180400, // 005E CALL R6 2
- 0x8C1C0522, // 005F GETMET R7 R2 K34
- 0x7C1C0200, // 0060 CALL R7 1
- 0x8C1C0F23, // 0061 GETMET R7 R7 K35
- 0x88240724, // 0062 GETMBR R9 R3 K36
- 0x8C28071D, // 0063 GETMET R10 R3 K29
- 0x7C280200, // 0064 CALL R10 1
- 0x00281405, // 0065 ADD R10 R10 R5
- 0x5C2C0C00, // 0066 MOVE R11 R6
- 0x5432000F, // 0067 LDINT R12 16
- 0x7C1C0A00, // 0068 CALL R7 5
- 0xB8220A00, // 0069 GETNGBL R8 K5
- 0x8C201106, // 006A GETMET R8 R8 K6
- 0x58280011, // 006B LDCONST R10 K17
- 0x542E0003, // 006C LDINT R11 4
- 0x7C200600, // 006D CALL R8 3
- 0xB8220A00, // 006E GETNGBL R8 K5
- 0x8C201106, // 006F GETMET R8 R8 K6
- 0x8C28071D, // 0070 GETMET R10 R3 K29
- 0x7C280200, // 0071 CALL R10 1
- 0x00281405, // 0072 ADD R10 R10 R5
- 0x8C28151E, // 0073 GETMET R10 R10 K30
- 0x7C280200, // 0074 CALL R10 1
- 0x002A4A0A, // 0075 ADD R10 K37 R10
- 0x542E0003, // 0076 LDINT R11 4
- 0x7C200600, // 0077 CALL R8 3
- 0xB8220A00, // 0078 GETNGBL R8 K5
- 0x8C201106, // 0079 GETMET R8 R8 K6
- 0x8C280F1E, // 007A GETMET R10 R7 K30
- 0x7C280200, // 007B CALL R10 1
- 0x002A4C0A, // 007C ADD R10 K38 R10
- 0x542E0003, // 007D LDINT R11 4
- 0x7C200600, // 007E CALL R8 3
- 0xB8220A00, // 007F GETNGBL R8 K5
- 0x8C201106, // 0080 GETMET R8 R8 K6
- 0x58280011, // 0081 LDCONST R10 K17
- 0x542E0003, // 0082 LDINT R11 4
- 0x7C200600, // 0083 CALL R8 3
- 0x5421FFEE, // 0084 LDINT R8 -17
- 0x40220608, // 0085 CONNECT R8 K3 R8
- 0x88240927, // 0086 GETMBR R9 R4 K39
- 0x94201208, // 0087 GETIDX R8 R9 R8
- 0x5429FFEF, // 0088 LDINT R10 -16
- 0x40281528, // 0089 CONNECT R10 R10 K40
- 0x882C0927, // 008A GETMBR R11 R4 K39
- 0x9424160A, // 008B GETIDX R9 R11 R10
- 0x8C300529, // 008C GETMET R12 R2 K41
- 0x5C380E00, // 008D MOVE R14 R7
- 0x603C0015, // 008E GETGBL R15 G21
- 0x7C3C0000, // 008F CALL R15 0
- 0x8C3C1F20, // 0090 GETMET R15 R15 K32
- 0x8844012A, // 0091 GETMBR R17 R0 K42
- 0x7C3C0400, // 0092 CALL R15 2
- 0x60400015, // 0093 GETGBL R16 G21
- 0x7C400000, // 0094 CALL R16 0
- 0x6044000C, // 0095 GETGBL R17 G12
- 0x5C481000, // 0096 MOVE R18 R8
- 0x7C440200, // 0097 CALL R17 1
- 0x544A000F, // 0098 LDINT R18 16
- 0x7C300C00, // 0099 CALL R12 6
- 0x5C281800, // 009A MOVE R10 R12
- 0x8C30152B, // 009B GETMET R12 R10 K43
- 0x5C381000, // 009C MOVE R14 R8
- 0x7C300400, // 009D CALL R12 2
- 0x5C2C1800, // 009E MOVE R11 R12
- 0x8C30152C, // 009F GETMET R12 R10 K44
- 0x7C300200, // 00A0 CALL R12 1
- 0xB8360A00, // 00A1 GETNGBL R13 K5
- 0x8C341B06, // 00A2 GETMET R13 R13 K6
- 0x8C3C171E, // 00A3 GETMET R15 R11 K30
- 0x7C3C0200, // 00A4 CALL R15 1
- 0x003E5A0F, // 00A5 ADD R15 K45 R15
- 0x54420003, // 00A6 LDINT R16 4
- 0x7C340600, // 00A7 CALL R13 3
- 0xB8360A00, // 00A8 GETNGBL R13 K5
- 0x8C341B06, // 00A9 GETMET R13 R13 K6
- 0x8C3C191E, // 00AA GETMET R15 R12 K30
- 0x7C3C0200, // 00AB CALL R15 1
- 0x003E5C0F, // 00AC ADD R15 K46 R15
- 0x54420003, // 00AD LDINT R16 4
- 0x7C340600, // 00AE CALL R13 3
- 0xB8360A00, // 00AF GETNGBL R13 K5
- 0x8C341B06, // 00B0 GETMET R13 R13 K6
- 0x8C3C131E, // 00B1 GETMET R15 R9 K30
- 0x7C3C0200, // 00B2 CALL R15 1
- 0x003E5E0F, // 00B3 ADD R15 K47 R15
- 0x54420003, // 00B4 LDINT R16 4
- 0x7C340600, // 00B5 CALL R13 3
- 0xB8360A00, // 00B6 GETNGBL R13 K5
- 0x8C341B06, // 00B7 GETMET R13 R13 K6
- 0x583C0011, // 00B8 LDCONST R15 K17
- 0x54420003, // 00B9 LDINT R16 4
- 0x7C340600, // 00BA CALL R13 3
- 0x20341809, // 00BB NE R13 R12 R9
- 0x78360012, // 00BC JMPF R13 #00D0
- 0xB8360A00, // 00BD GETNGBL R13 K5
- 0x8C341B06, // 00BE GETMET R13 R13 K6
- 0x583C0030, // 00BF LDCONST R15 K48
- 0x58400008, // 00C0 LDCONST R16 K8
- 0x7C340600, // 00C1 CALL R13 3
- 0xB8360A00, // 00C2 GETNGBL R13 K5
- 0x8C341B06, // 00C3 GETMET R13 R13 K6
- 0x583C0007, // 00C4 LDCONST R15 K7
- 0x58400008, // 00C5 LDCONST R16 K8
- 0x7C340600, // 00C6 CALL R13 3
- 0x8C340109, // 00C7 GETMET R13 R0 K9
- 0x5C3C0200, // 00C8 MOVE R15 R1
- 0x5840000A, // 00C9 LDCONST R16 K10
- 0x58440003, // 00CA LDCONST R17 K3
- 0x58480008, // 00CB LDCONST R18 K8
- 0x504C0000, // 00CC LDBOOL R19 0 0
- 0x7C340C00, // 00CD CALL R13 6
- 0x50340000, // 00CE LDBOOL R13 0 0
- 0x80041A00, // 00CF RET 1 R13
- 0xB8361800, // 00D0 GETNGBL R13 K12
- 0x88341B31, // 00D1 GETMBR R13 R13 K49
- 0x8C341B0E, // 00D2 GETMET R13 R13 K14
- 0x5C3C1600, // 00D3 MOVE R15 R11
- 0x7C340400, // 00D4 CALL R13 2
- 0xB83A0A00, // 00D5 GETNGBL R14 K5
- 0x8C381D06, // 00D6 GETMET R14 R14 K6
- 0x60400008, // 00D7 GETGBL R16 G8
- 0x5C441A00, // 00D8 MOVE R17 R13
- 0x7C400200, // 00D9 CALL R16 1
- 0x00426410, // 00DA ADD R16 K50 R16
- 0x54460003, // 00DB LDINT R17 4
- 0x7C380600, // 00DC CALL R14 3
- 0x8C381B33, // 00DD GETMET R14 R13 K51
- 0x5840000A, // 00DE LDCONST R16 K10
- 0x7C380400, // 00DF CALL R14 2
- 0x8C3C1B33, // 00E0 GETMET R15 R13 K51
- 0x58440008, // 00E1 LDCONST R17 K8
- 0x7C3C0400, // 00E2 CALL R15 2
- 0x8C401B33, // 00E3 GETMET R16 R13 K51
- 0x58480034, // 00E4 LDCONST R18 K52
- 0x7C400400, // 00E5 CALL R16 2
- 0xB8460A00, // 00E6 GETNGBL R17 K5
- 0x8C442306, // 00E7 GETMET R17 R17 K6
- 0x604C0008, // 00E8 GETGBL R19 G8
- 0x5C501C00, // 00E9 MOVE R20 R14
- 0x7C4C0200, // 00EA CALL R19 1
- 0x004E6A13, // 00EB ADD R19 K53 R19
- 0x54520003, // 00EC LDINT R20 4
- 0x7C440600, // 00ED CALL R17 3
- 0xB8460A00, // 00EE GETNGBL R17 K5
- 0x8C442306, // 00EF GETMET R17 R17 K6
- 0x604C0008, // 00F0 GETGBL R19 G8
- 0x5C501E00, // 00F1 MOVE R20 R15
- 0x7C4C0200, // 00F2 CALL R19 1
- 0x004E6C13, // 00F3 ADD R19 K54 R19
- 0x54520003, // 00F4 LDINT R20 4
- 0x7C440600, // 00F5 CALL R17 3
- 0xB8460A00, // 00F6 GETNGBL R17 K5
- 0x8C442306, // 00F7 GETMET R17 R17 K6
- 0x604C0008, // 00F8 GETGBL R19 G8
- 0x5C502000, // 00F9 MOVE R20 R16
- 0x7C4C0200, // 00FA CALL R19 1
- 0x004E6E13, // 00FB ADD R19 K55 R19
- 0x54520003, // 00FC LDINT R20 4
- 0x7C440600, // 00FD CALL R17 3
- 0xB8461800, // 00FE GETNGBL R17 K12
- 0x88442331, // 00FF GETMBR R17 R17 K49
- 0x8C44230E, // 0100 GETMET R17 R17 K14
- 0x5C4C1C00, // 0101 MOVE R19 R14
- 0x7C440400, // 0102 CALL R17 2
- 0xB84A0A00, // 0103 GETNGBL R18 K5
- 0x8C482506, // 0104 GETMET R18 R18 K6
- 0x60500008, // 0105 GETGBL R20 G8
- 0x5C542200, // 0106 MOVE R21 R17
- 0x7C500200, // 0107 CALL R20 1
- 0x00527014, // 0108 ADD R20 K56 R20
- 0x58540034, // 0109 LDCONST R21 K52
- 0x7C480600, // 010A CALL R18 3
- 0x8C482333, // 010B GETMET R18 R17 K51
- 0x54520008, // 010C LDINT R20 9
- 0x7C480400, // 010D CALL R18 2
- 0x8C4C2339, // 010E GETMET R19 R17 K57
- 0x54560005, // 010F LDINT R21 6
- 0x7C4C0400, // 0110 CALL R19 2
- 0x8C502733, // 0111 GETMET R20 R19 K51
- 0x545A0010, // 0112 LDINT R22 17
- 0x7C500400, // 0113 CALL R20 2
- 0x60540004, // 0114 GETGBL R21 G4
- 0x5C582800, // 0115 MOVE R22 R20
- 0x7C540200, // 0116 CALL R21 1
- 0x1C542B3A, // 0117 EQ R21 R21 K58
- 0x78560007, // 0118 JMPF R21 #0121
- 0xB8567800, // 0119 GETNGBL R21 K60
- 0x8C542B3D, // 011A GETMET R21 R21 K61
- 0x5C5C2800, // 011B MOVE R23 R20
- 0x7C540400, // 011C CALL R21 2
- 0x8C542B3E, // 011D GETMET R21 R21 K62
- 0x7C540200, // 011E CALL R21 1
- 0x900E7615, // 011F SETMBR R3 K59 R21
- 0x70020002, // 0120 JMP #0124
- 0x8C54293E, // 0121 GETMET R21 R20 K62
- 0x7C540200, // 0122 CALL R21 1
- 0x900E7615, // 0123 SETMBR R3 K59 R21
- 0xB8560A00, // 0124 GETNGBL R21 K5
- 0x8C542B06, // 0125 GETMET R21 R21 K6
- 0x605C0008, // 0126 GETGBL R23 G8
- 0x8860073B, // 0127 GETMBR R24 R3 K59
- 0x7C5C0200, // 0128 CALL R23 1
- 0x005E7E17, // 0129 ADD R23 K63 R23
- 0x58600034, // 012A LDCONST R24 K52
- 0x7C540600, // 012B CALL R21 3
- 0xB8561800, // 012C GETNGBL R21 K12
- 0x88542B31, // 012D GETMBR R21 R21 K49
- 0x8C542B40, // 012E GETMET R21 R21 K64
- 0x7C540200, // 012F CALL R21 1
- 0x8C582B41, // 0130 GETMET R22 R21 K65
- 0x5860000A, // 0131 LDCONST R24 K10
- 0xB8661800, // 0132 GETNGBL R25 K12
- 0x88643331, // 0133 GETMBR R25 R25 K49
- 0x88643342, // 0134 GETMBR R25 R25 K66
- 0x5C681C00, // 0135 MOVE R26 R14
- 0x7C580800, // 0136 CALL R22 4
- 0x8C582B41, // 0137 GETMET R22 R21 K65
- 0x58600008, // 0138 LDCONST R24 K8
- 0xB8661800, // 0139 GETNGBL R25 K12
- 0x88643331, // 013A GETMBR R25 R25 K49
- 0x88643342, // 013B GETMBR R25 R25 K66
- 0x5C681E00, // 013C MOVE R26 R15
- 0x7C580800, // 013D CALL R22 4
- 0x8C582B41, // 013E GETMET R22 R21 K65
- 0x58600034, // 013F LDCONST R24 K52
- 0xB8661800, // 0140 GETNGBL R25 K12
- 0x88643331, // 0141 GETMBR R25 R25 K49
- 0x88643342, // 0142 GETMBR R25 R25 K66
- 0x88680743, // 0143 GETMBR R26 R3 K67
- 0x7C580800, // 0144 CALL R22 4
- 0x8C582B41, // 0145 GETMET R22 R21 K65
- 0x54620003, // 0146 LDINT R24 4
- 0xB8661800, // 0147 GETNGBL R25 K12
- 0x88643331, // 0148 GETMBR R25 R25 K49
- 0x88643342, // 0149 GETMBR R25 R25 K66
- 0x88680744, // 014A GETMBR R26 R3 K68
- 0x7C580800, // 014B CALL R22 4
- 0xB85A0A00, // 014C GETNGBL R22 K5
- 0x8C582D06, // 014D GETMET R22 R22 K6
- 0x60600008, // 014E GETGBL R24 G8
- 0x5C642A00, // 014F MOVE R25 R21
- 0x7C600200, // 0150 CALL R24 1
- 0x00628A18, // 0151 ADD R24 K69 R24
- 0x54660003, // 0152 LDINT R25 4
- 0x7C580600, // 0153 CALL R22 3
- 0x8C582B46, // 0154 GETMET R22 R21 K70
- 0x7C580200, // 0155 CALL R22 1
- 0xB85E0A00, // 0156 GETNGBL R23 K5
- 0x8C5C2F06, // 0157 GETMET R23 R23 K6
- 0x8C642D1E, // 0158 GETMET R25 R22 K30
- 0x7C640200, // 0159 CALL R25 1
- 0x00668E19, // 015A ADD R25 K71 R25
- 0x546A0003, // 015B LDINT R26 4
- 0x7C5C0600, // 015C CALL R23 3
- 0xB85E0A00, // 015D GETNGBL R23 K5
- 0x8C5C2F06, // 015E GETMET R23 R23 K6
- 0x8C64251E, // 015F GETMET R25 R18 K30
- 0x7C640200, // 0160 CALL R25 1
- 0x00669019, // 0161 ADD R25 K72 R25
- 0x546A0003, // 0162 LDINT R26 4
- 0x7C5C0600, // 0163 CALL R23 3
- 0xB85E0A00, // 0164 GETNGBL R23 K5
- 0x8C5C2F06, // 0165 GETMET R23 R23 K6
- 0x8C64211E, // 0166 GETMET R25 R16 K30
- 0x7C640200, // 0167 CALL R25 1
- 0x00669219, // 0168 ADD R25 K73 R25
- 0x546A0003, // 0169 LDINT R26 4
- 0x7C5C0600, // 016A CALL R23 3
- 0xB85E0A00, // 016B GETNGBL R23 K5
- 0x8C5C2F06, // 016C GETMET R23 R23 K6
- 0x58640011, // 016D LDCONST R25 K17
- 0x546A0003, // 016E LDINT R26 4
- 0x7C5C0600, // 016F CALL R23 3
- 0x8C5C054A, // 0170 GETMET R23 R2 K74
- 0x7C5C0200, // 0171 CALL R23 1
- 0x8C5C2F4B, // 0172 GETMET R23 R23 K75
- 0x5C642400, // 0173 MOVE R25 R18
- 0x5C682C00, // 0174 MOVE R26 R22
- 0x5C6C2000, // 0175 MOVE R27 R16
- 0x7C5C0800, // 0176 CALL R23 4
- 0x5C602E00, // 0177 MOVE R24 R23
- 0x7462000A, // 0178 JMPT R24 #0184
- 0xB8620A00, // 0179 GETNGBL R24 K5
- 0x8C603106, // 017A GETMET R24 R24 K6
- 0x5868004C, // 017B LDCONST R26 K76
- 0x586C0008, // 017C LDCONST R27 K8
- 0x7C600600, // 017D CALL R24 3
- 0xB8620A00, // 017E GETNGBL R24 K5
- 0x8C603106, // 017F GETMET R24 R24 K6
- 0x5868004D, // 0180 LDCONST R26 K77
- 0x586C0008, // 0181 LDCONST R27 K8
- 0x7C600600, // 0182 CALL R24 3
- 0x70020004, // 0183 JMP #0189
- 0xB8620A00, // 0184 GETNGBL R24 K5
- 0x8C603106, // 0185 GETMET R24 R24 K6
- 0x5868004E, // 0186 LDCONST R26 K78
- 0x586C0034, // 0187 LDCONST R27 K52
- 0x7C600600, // 0188 CALL R24 3
- 0x8C600512, // 0189 GETMET R24 R2 K18
- 0x7C600200, // 018A CALL R24 1
- 0x8C603113, // 018B GETMET R24 R24 K19
- 0x88680714, // 018C GETMBR R26 R3 K20
- 0x7C600400, // 018D CALL R24 2
- 0x8C603113, // 018E GETMET R24 R24 K19
- 0x88680715, // 018F GETMBR R26 R3 K21
- 0x7C600400, // 0190 CALL R24 2
- 0x8C603113, // 0191 GETMET R24 R24 K19
- 0x8868094F, // 0192 GETMBR R26 R4 K79
- 0x7C600400, // 0193 CALL R24 2
- 0x8C603116, // 0194 GETMET R24 R24 K22
- 0x7C600200, // 0195 CALL R24 1
- 0x5C143000, // 0196 MOVE R5 R24
- 0xB8620A00, // 0197 GETNGBL R24 K5
- 0x8C603106, // 0198 GETMET R24 R24 K6
- 0x88680714, // 0199 GETMBR R26 R3 K20
- 0x8C68351E, // 019A GETMET R26 R26 K30
- 0x7C680200, // 019B CALL R26 1
- 0x006AA01A, // 019C ADD R26 K80 R26
- 0x546E0003, // 019D LDINT R27 4
- 0x7C600600, // 019E CALL R24 3
- 0xB8620A00, // 019F GETNGBL R24 K5
- 0x8C603106, // 01A0 GETMET R24 R24 K6
- 0x88680715, // 01A1 GETMBR R26 R3 K21
- 0x8C68351E, // 01A2 GETMET R26 R26 K30
- 0x7C680200, // 01A3 CALL R26 1
- 0x006AA21A, // 01A4 ADD R26 K81 R26
- 0x546E0003, // 01A5 LDINT R27 4
- 0x7C600600, // 01A6 CALL R24 3
- 0xB8620A00, // 01A7 GETNGBL R24 K5
- 0x8C603106, // 01A8 GETMET R24 R24 K6
- 0x8868094F, // 01A9 GETMBR R26 R4 K79
- 0x8C68351E, // 01AA GETMET R26 R26 K30
- 0x7C680200, // 01AB CALL R26 1
- 0x006AA41A, // 01AC ADD R26 K82 R26
- 0x546E0003, // 01AD LDINT R27 4
- 0x7C600600, // 01AE CALL R24 3
- 0xB8620A00, // 01AF GETNGBL R24 K5
- 0x8C603106, // 01B0 GETMET R24 R24 K6
- 0x8C680B1E, // 01B1 GETMET R26 R5 K30
- 0x7C680200, // 01B2 CALL R26 1
- 0x006AA61A, // 01B3 ADD R26 K83 R26
- 0x546E0003, // 01B4 LDINT R27 4
- 0x7C600600, // 01B5 CALL R24 3
- 0x4C600000, // 01B6 LDNIL R24
- 0x900E2818, // 01B7 SETMBR R3 K20 R24
- 0x4C600000, // 01B8 LDNIL R24
- 0x900E2A18, // 01B9 SETMBR R3 K21 R24
- 0xB8620A00, // 01BA GETNGBL R24 K5
- 0x8C603106, // 01BB GETMET R24 R24 K6
- 0x58680054, // 01BC LDCONST R26 K84
- 0x546E0003, // 01BD LDINT R27 4
- 0x7C600600, // 01BE CALL R24 3
- 0xB8620A00, // 01BF GETNGBL R24 K5
- 0x8C603106, // 01C0 GETMET R24 R24 K6
- 0x88680724, // 01C1 GETMBR R26 R3 K36
- 0x8C68351E, // 01C2 GETMET R26 R26 K30
- 0x7C680200, // 01C3 CALL R26 1
- 0x006AAA1A, // 01C4 ADD R26 K85 R26
- 0x546E0003, // 01C5 LDINT R27 4
- 0x7C600600, // 01C6 CALL R24 3
- 0xB8620A00, // 01C7 GETNGBL R24 K5
- 0x8C603106, // 01C8 GETMET R24 R24 K6
- 0x8C68071D, // 01C9 GETMET R26 R3 K29
- 0x7C680200, // 01CA CALL R26 1
- 0x00683405, // 01CB ADD R26 R26 R5
- 0x8C68351E, // 01CC GETMET R26 R26 K30
- 0x7C680200, // 01CD CALL R26 1
- 0x006AAC1A, // 01CE ADD R26 K86 R26
- 0x546E0003, // 01CF LDINT R27 4
- 0x7C600600, // 01D0 CALL R24 3
- 0x8C600522, // 01D1 GETMET R24 R2 K34
- 0x7C600200, // 01D2 CALL R24 1
- 0x8C603123, // 01D3 GETMET R24 R24 K35
- 0x88680724, // 01D4 GETMBR R26 R3 K36
- 0x8C6C071D, // 01D5 GETMET R27 R3 K29
- 0x7C6C0200, // 01D6 CALL R27 1
- 0x006C3605, // 01D7 ADD R27 R27 R5
- 0x60700015, // 01D8 GETGBL R28 G21
- 0x7C700000, // 01D9 CALL R28 0
- 0x8C703920, // 01DA GETMET R28 R28 K32
- 0x88780157, // 01DB GETMBR R30 R0 K87
- 0x7C700400, // 01DC CALL R28 2
- 0x5476002F, // 01DD LDINT R29 48
- 0x7C600A00, // 01DE CALL R24 5
- 0x5466000E, // 01DF LDINT R25 15
- 0x40660619, // 01E0 CONNECT R25 K3 R25
- 0x94643019, // 01E1 GETIDX R25 R24 R25
- 0x546A000F, // 01E2 LDINT R26 16
- 0x546E001E, // 01E3 LDINT R27 31
- 0x4068341B, // 01E4 CONNECT R26 R26 R27
- 0x9468301A, // 01E5 GETIDX R26 R24 R26
- 0x546E001F, // 01E6 LDINT R27 32
- 0x5472002E, // 01E7 LDINT R28 47
- 0x406C361C, // 01E8 CONNECT R27 R27 R28
- 0x946C301B, // 01E9 GETIDX R27 R24 R27
- 0xB8720A00, // 01EA GETNGBL R28 K5
- 0x8C703958, // 01EB GETMET R28 R28 K88
- 0x7C700200, // 01EC CALL R28 1
- 0x94703959, // 01ED GETIDX R28 R28 K89
- 0xB8760A00, // 01EE GETNGBL R29 K5
- 0x8C743B06, // 01EF GETMET R29 R29 K6
- 0x587C0054, // 01F0 LDCONST R31 K84
- 0x54820003, // 01F1 LDINT R32 4
- 0x7C740600, // 01F2 CALL R29 3
- 0xB8760A00, // 01F3 GETNGBL R29 K5
- 0x8C743B06, // 01F4 GETMET R29 R29 K6
- 0x8C7C331E, // 01F5 GETMET R31 R25 K30
- 0x7C7C0200, // 01F6 CALL R31 1
- 0x007EB41F, // 01F7 ADD R31 K90 R31
- 0x54820003, // 01F8 LDINT R32 4
- 0x7C740600, // 01F9 CALL R29 3
- 0xB8760A00, // 01FA GETNGBL R29 K5
- 0x8C743B06, // 01FB GETMET R29 R29 K6
- 0x8C7C351E, // 01FC GETMET R31 R26 K30
- 0x7C7C0200, // 01FD CALL R31 1
- 0x007EB61F, // 01FE ADD R31 K91 R31
- 0x54820003, // 01FF LDINT R32 4
- 0x7C740600, // 0200 CALL R29 3
- 0xB8760A00, // 0201 GETNGBL R29 K5
- 0x8C743B06, // 0202 GETMET R29 R29 K6
- 0x8C7C371E, // 0203 GETMET R31 R27 K30
- 0x7C7C0200, // 0204 CALL R31 1
- 0x007EB81F, // 0205 ADD R31 K92 R31
- 0x54820003, // 0206 LDINT R32 4
- 0x7C740600, // 0207 CALL R29 3
- 0xB8760A00, // 0208 GETNGBL R29 K5
- 0x8C743B06, // 0209 GETMET R29 R29 K6
- 0x587C0054, // 020A LDCONST R31 K84
- 0x54820003, // 020B LDINT R32 4
- 0x7C740600, // 020C CALL R29 3
- 0x8C740109, // 020D GETMET R29 R0 K9
- 0x5C7C0200, // 020E MOVE R31 R1
- 0x58800003, // 020F LDCONST R32 K3
- 0x58840003, // 0210 LDCONST R33 K3
- 0x58880003, // 0211 LDCONST R34 K3
- 0x508C0200, // 0212 LDBOOL R35 1 0
- 0x7C740C00, // 0213 CALL R29 6
- 0x8C74075D, // 0214 GETMET R29 R3 K93
- 0x7C740200, // 0215 CALL R29 1
- 0x8C74075E, // 0216 GETMET R29 R3 K94
- 0x5C7C3200, // 0217 MOVE R31 R25
- 0x5C803400, // 0218 MOVE R32 R26
- 0x5C843600, // 0219 MOVE R33 R27
- 0x5C883800, // 021A MOVE R34 R28
- 0x7C740A00, // 021B CALL R29 5
- 0x900EBF03, // 021C SETMBR R3 K95 K3
- 0x8C740760, // 021D GETMET R29 R3 K96
- 0x7C740200, // 021E CALL R29 1
- 0x8C740761, // 021F GETMET R29 R3 K97
- 0x507C0200, // 0220 LDBOOL R31 1 0
- 0x7C740400, // 0221 CALL R29 2
- 0x8C740762, // 0222 GETMET R29 R3 K98
- 0x7C740200, // 0223 CALL R29 1
- 0x8C740763, // 0224 GETMET R29 R3 K99
- 0x7C740200, // 0225 CALL R29 1
- 0x8C740764, // 0226 GETMET R29 R3 K100
- 0x7C740200, // 0227 CALL R29 1
- 0x50740200, // 0228 LDBOOL R29 1 0
- 0x80043A00, // 0229 RET 1 R29
+ 0x8C140511, // 0021 GETMET R5 R2 K17
+ 0x7C140200, // 0022 CALL R5 1
+ 0x8C140B12, // 0023 GETMET R5 R5 K18
+ 0x881C0713, // 0024 GETMBR R7 R3 K19
+ 0x7C140400, // 0025 CALL R5 2
+ 0x8C140B12, // 0026 GETMET R5 R5 K18
+ 0x881C0714, // 0027 GETMBR R7 R3 K20
+ 0x7C140400, // 0028 CALL R5 2
+ 0x8C140B15, // 0029 GETMET R5 R5 K21
+ 0x7C140200, // 002A CALL R5 1
+ 0x60180015, // 002B GETGBL R6 G21
+ 0x7C180000, // 002C CALL R6 0
+ 0x8C180D16, // 002D GETMET R6 R6 K22
+ 0x88200117, // 002E GETMBR R8 R0 K23
+ 0x7C180400, // 002F CALL R6 2
+ 0x8C1C0518, // 0030 GETMET R7 R2 K24
+ 0x7C1C0200, // 0031 CALL R7 1
+ 0x8C1C0F19, // 0032 GETMET R7 R7 K25
+ 0x8824071A, // 0033 GETMBR R9 R3 K26
+ 0x8C28071B, // 0034 GETMET R10 R3 K27
+ 0x7C280200, // 0035 CALL R10 1
+ 0x00281405, // 0036 ADD R10 R10 R5
+ 0x5C2C0C00, // 0037 MOVE R11 R6
+ 0x5432000F, // 0038 LDINT R12 16
+ 0x7C1C0A00, // 0039 CALL R7 5
+ 0x5421FFEE, // 003A LDINT R8 -17
+ 0x40220608, // 003B CONNECT R8 K3 R8
+ 0x8824091C, // 003C GETMBR R9 R4 K28
+ 0x94201208, // 003D GETIDX R8 R9 R8
+ 0x5429FFEF, // 003E LDINT R10 -16
+ 0x4028151D, // 003F CONNECT R10 R10 K29
+ 0x882C091C, // 0040 GETMBR R11 R4 K28
+ 0x9424160A, // 0041 GETIDX R9 R11 R10
+ 0x8C30051E, // 0042 GETMET R12 R2 K30
+ 0x5C380E00, // 0043 MOVE R14 R7
+ 0x603C0015, // 0044 GETGBL R15 G21
+ 0x7C3C0000, // 0045 CALL R15 0
+ 0x8C3C1F16, // 0046 GETMET R15 R15 K22
+ 0x8844011F, // 0047 GETMBR R17 R0 K31
+ 0x7C3C0400, // 0048 CALL R15 2
+ 0x60400015, // 0049 GETGBL R16 G21
+ 0x7C400000, // 004A CALL R16 0
+ 0x6044000C, // 004B GETGBL R17 G12
+ 0x5C481000, // 004C MOVE R18 R8
+ 0x7C440200, // 004D CALL R17 1
+ 0x544A000F, // 004E LDINT R18 16
+ 0x7C300C00, // 004F CALL R12 6
+ 0x5C281800, // 0050 MOVE R10 R12
+ 0x8C301520, // 0051 GETMET R12 R10 K32
+ 0x5C381000, // 0052 MOVE R14 R8
+ 0x7C300400, // 0053 CALL R12 2
+ 0x5C2C1800, // 0054 MOVE R11 R12
+ 0x8C301521, // 0055 GETMET R12 R10 K33
+ 0x7C300200, // 0056 CALL R12 1
+ 0x20341809, // 0057 NE R13 R12 R9
+ 0x78360012, // 0058 JMPF R13 #006C
+ 0xB8360A00, // 0059 GETNGBL R13 K5
+ 0x8C341B06, // 005A GETMET R13 R13 K6
+ 0x583C0022, // 005B LDCONST R15 K34
+ 0x58400008, // 005C LDCONST R16 K8
+ 0x7C340600, // 005D CALL R13 3
+ 0xB8360A00, // 005E GETNGBL R13 K5
+ 0x8C341B06, // 005F GETMET R13 R13 K6
+ 0x583C0007, // 0060 LDCONST R15 K7
+ 0x58400008, // 0061 LDCONST R16 K8
+ 0x7C340600, // 0062 CALL R13 3
+ 0x8C340109, // 0063 GETMET R13 R0 K9
+ 0x5C3C0200, // 0064 MOVE R15 R1
+ 0x5840000A, // 0065 LDCONST R16 K10
+ 0x58440003, // 0066 LDCONST R17 K3
+ 0x58480008, // 0067 LDCONST R18 K8
+ 0x504C0000, // 0068 LDBOOL R19 0 0
+ 0x7C340C00, // 0069 CALL R13 6
+ 0x50340000, // 006A LDBOOL R13 0 0
+ 0x80041A00, // 006B RET 1 R13
+ 0xB8361800, // 006C GETNGBL R13 K12
+ 0x88341B23, // 006D GETMBR R13 R13 K35
+ 0x8C341B0E, // 006E GETMET R13 R13 K14
+ 0x5C3C1600, // 006F MOVE R15 R11
+ 0x7C340400, // 0070 CALL R13 2
+ 0x8C381B24, // 0071 GETMET R14 R13 K36
+ 0x5840000A, // 0072 LDCONST R16 K10
+ 0x7C380400, // 0073 CALL R14 2
+ 0x8C3C1B24, // 0074 GETMET R15 R13 K36
+ 0x58440008, // 0075 LDCONST R17 K8
+ 0x7C3C0400, // 0076 CALL R15 2
+ 0x8C401B24, // 0077 GETMET R16 R13 K36
+ 0x58480025, // 0078 LDCONST R18 K37
+ 0x7C400400, // 0079 CALL R16 2
+ 0xB8461800, // 007A GETNGBL R17 K12
+ 0x88442323, // 007B GETMBR R17 R17 K35
+ 0x8C44230E, // 007C GETMET R17 R17 K14
+ 0x5C4C1C00, // 007D MOVE R19 R14
+ 0x7C440400, // 007E CALL R17 2
+ 0xB84A0A00, // 007F GETNGBL R18 K5
+ 0x8C482506, // 0080 GETMET R18 R18 K6
+ 0x60500008, // 0081 GETGBL R20 G8
+ 0x5C542200, // 0082 MOVE R21 R17
+ 0x7C500200, // 0083 CALL R20 1
+ 0x00524C14, // 0084 ADD R20 K38 R20
+ 0x58540025, // 0085 LDCONST R21 K37
+ 0x7C480600, // 0086 CALL R18 3
+ 0x8C482324, // 0087 GETMET R18 R17 K36
+ 0x54520008, // 0088 LDINT R20 9
+ 0x7C480400, // 0089 CALL R18 2
+ 0x8C4C2327, // 008A GETMET R19 R17 K39
+ 0x54560005, // 008B LDINT R21 6
+ 0x7C4C0400, // 008C CALL R19 2
+ 0x8C502724, // 008D GETMET R20 R19 K36
+ 0x545A0010, // 008E LDINT R22 17
+ 0x7C500400, // 008F CALL R20 2
+ 0x60540004, // 0090 GETGBL R21 G4
+ 0x5C582800, // 0091 MOVE R22 R20
+ 0x7C540200, // 0092 CALL R21 1
+ 0x1C542B28, // 0093 EQ R21 R21 K40
+ 0x78560007, // 0094 JMPF R21 #009D
+ 0xB8565400, // 0095 GETNGBL R21 K42
+ 0x8C542B2B, // 0096 GETMET R21 R21 K43
+ 0x5C5C2800, // 0097 MOVE R23 R20
+ 0x7C540400, // 0098 CALL R21 2
+ 0x8C542B2C, // 0099 GETMET R21 R21 K44
+ 0x7C540200, // 009A CALL R21 1
+ 0x900E5215, // 009B SETMBR R3 K41 R21
+ 0x70020002, // 009C JMP #00A0
+ 0x8C54292C, // 009D GETMET R21 R20 K44
+ 0x7C540200, // 009E CALL R21 1
+ 0x900E5215, // 009F SETMBR R3 K41 R21
+ 0xB8560A00, // 00A0 GETNGBL R21 K5
+ 0x8C542B06, // 00A1 GETMET R21 R21 K6
+ 0x605C0008, // 00A2 GETGBL R23 G8
+ 0x88600729, // 00A3 GETMBR R24 R3 K41
+ 0x7C5C0200, // 00A4 CALL R23 1
+ 0x005E5A17, // 00A5 ADD R23 K45 R23
+ 0x58600025, // 00A6 LDCONST R24 K37
+ 0x7C540600, // 00A7 CALL R21 3
+ 0xB8561800, // 00A8 GETNGBL R21 K12
+ 0x88542B23, // 00A9 GETMBR R21 R21 K35
+ 0x8C542B2E, // 00AA GETMET R21 R21 K46
+ 0x7C540200, // 00AB CALL R21 1
+ 0x8C582B2F, // 00AC GETMET R22 R21 K47
+ 0x5860000A, // 00AD LDCONST R24 K10
+ 0xB8661800, // 00AE GETNGBL R25 K12
+ 0x88643323, // 00AF GETMBR R25 R25 K35
+ 0x88643330, // 00B0 GETMBR R25 R25 K48
+ 0x5C681C00, // 00B1 MOVE R26 R14
+ 0x7C580800, // 00B2 CALL R22 4
+ 0x8C582B2F, // 00B3 GETMET R22 R21 K47
+ 0x58600008, // 00B4 LDCONST R24 K8
+ 0xB8661800, // 00B5 GETNGBL R25 K12
+ 0x88643323, // 00B6 GETMBR R25 R25 K35
+ 0x88643330, // 00B7 GETMBR R25 R25 K48
+ 0x5C681E00, // 00B8 MOVE R26 R15
+ 0x7C580800, // 00B9 CALL R22 4
+ 0x8C582B2F, // 00BA GETMET R22 R21 K47
+ 0x58600025, // 00BB LDCONST R24 K37
+ 0xB8661800, // 00BC GETNGBL R25 K12
+ 0x88643323, // 00BD GETMBR R25 R25 K35
+ 0x88643330, // 00BE GETMBR R25 R25 K48
+ 0x88680731, // 00BF GETMBR R26 R3 K49
+ 0x7C580800, // 00C0 CALL R22 4
+ 0x8C582B2F, // 00C1 GETMET R22 R21 K47
+ 0x54620003, // 00C2 LDINT R24 4
+ 0xB8661800, // 00C3 GETNGBL R25 K12
+ 0x88643323, // 00C4 GETMBR R25 R25 K35
+ 0x88643330, // 00C5 GETMBR R25 R25 K48
+ 0x88680732, // 00C6 GETMBR R26 R3 K50
+ 0x7C580800, // 00C7 CALL R22 4
+ 0x8C582B33, // 00C8 GETMET R22 R21 K51
+ 0x7C580200, // 00C9 CALL R22 1
+ 0x8C5C0534, // 00CA GETMET R23 R2 K52
+ 0x7C5C0200, // 00CB CALL R23 1
+ 0x8C5C2F35, // 00CC GETMET R23 R23 K53
+ 0x5C642400, // 00CD MOVE R25 R18
+ 0x5C682C00, // 00CE MOVE R26 R22
+ 0x5C6C2000, // 00CF MOVE R27 R16
+ 0x7C5C0800, // 00D0 CALL R23 4
+ 0x5C602E00, // 00D1 MOVE R24 R23
+ 0x7462000A, // 00D2 JMPT R24 #00DE
+ 0xB8620A00, // 00D3 GETNGBL R24 K5
+ 0x8C603106, // 00D4 GETMET R24 R24 K6
+ 0x58680036, // 00D5 LDCONST R26 K54
+ 0x586C0008, // 00D6 LDCONST R27 K8
+ 0x7C600600, // 00D7 CALL R24 3
+ 0xB8620A00, // 00D8 GETNGBL R24 K5
+ 0x8C603106, // 00D9 GETMET R24 R24 K6
+ 0x58680037, // 00DA LDCONST R26 K55
+ 0x586C0008, // 00DB LDCONST R27 K8
+ 0x7C600600, // 00DC CALL R24 3
+ 0x70020004, // 00DD JMP #00E3
+ 0xB8620A00, // 00DE GETNGBL R24 K5
+ 0x8C603106, // 00DF GETMET R24 R24 K6
+ 0x58680038, // 00E0 LDCONST R26 K56
+ 0x586C0025, // 00E1 LDCONST R27 K37
+ 0x7C600600, // 00E2 CALL R24 3
+ 0x8C600511, // 00E3 GETMET R24 R2 K17
+ 0x7C600200, // 00E4 CALL R24 1
+ 0x8C603112, // 00E5 GETMET R24 R24 K18
+ 0x88680713, // 00E6 GETMBR R26 R3 K19
+ 0x7C600400, // 00E7 CALL R24 2
+ 0x8C603112, // 00E8 GETMET R24 R24 K18
+ 0x88680714, // 00E9 GETMBR R26 R3 K20
+ 0x7C600400, // 00EA CALL R24 2
+ 0x8C603112, // 00EB GETMET R24 R24 K18
+ 0x88680939, // 00EC GETMBR R26 R4 K57
+ 0x7C600400, // 00ED CALL R24 2
+ 0x8C603115, // 00EE GETMET R24 R24 K21
+ 0x7C600200, // 00EF CALL R24 1
+ 0x5C143000, // 00F0 MOVE R5 R24
+ 0x4C600000, // 00F1 LDNIL R24
+ 0x900E2618, // 00F2 SETMBR R3 K19 R24
+ 0x4C600000, // 00F3 LDNIL R24
+ 0x900E2818, // 00F4 SETMBR R3 K20 R24
+ 0x8C600518, // 00F5 GETMET R24 R2 K24
+ 0x7C600200, // 00F6 CALL R24 1
+ 0x8C603119, // 00F7 GETMET R24 R24 K25
+ 0x8868071A, // 00F8 GETMBR R26 R3 K26
+ 0x8C6C071B, // 00F9 GETMET R27 R3 K27
+ 0x7C6C0200, // 00FA CALL R27 1
+ 0x006C3605, // 00FB ADD R27 R27 R5
+ 0x60700015, // 00FC GETGBL R28 G21
+ 0x7C700000, // 00FD CALL R28 0
+ 0x8C703916, // 00FE GETMET R28 R28 K22
+ 0x8878013A, // 00FF GETMBR R30 R0 K58
+ 0x7C700400, // 0100 CALL R28 2
+ 0x5476002F, // 0101 LDINT R29 48
+ 0x7C600A00, // 0102 CALL R24 5
+ 0x5466000E, // 0103 LDINT R25 15
+ 0x40660619, // 0104 CONNECT R25 K3 R25
+ 0x94643019, // 0105 GETIDX R25 R24 R25
+ 0x546A000F, // 0106 LDINT R26 16
+ 0x546E001E, // 0107 LDINT R27 31
+ 0x4068341B, // 0108 CONNECT R26 R26 R27
+ 0x9468301A, // 0109 GETIDX R26 R24 R26
+ 0x546E001F, // 010A LDINT R27 32
+ 0x5472002E, // 010B LDINT R28 47
+ 0x406C361C, // 010C CONNECT R27 R27 R28
+ 0x946C301B, // 010D GETIDX R27 R24 R27
+ 0xB8720A00, // 010E GETNGBL R28 K5
+ 0x8C70393B, // 010F GETMET R28 R28 K59
+ 0x7C700200, // 0110 CALL R28 1
+ 0x9470393C, // 0111 GETIDX R28 R28 K60
+ 0x8C740109, // 0112 GETMET R29 R0 K9
+ 0x5C7C0200, // 0113 MOVE R31 R1
+ 0x58800003, // 0114 LDCONST R32 K3
+ 0x58840003, // 0115 LDCONST R33 K3
+ 0x58880003, // 0116 LDCONST R34 K3
+ 0x508C0200, // 0117 LDBOOL R35 1 0
+ 0x7C740C00, // 0118 CALL R29 6
+ 0x8C74073D, // 0119 GETMET R29 R3 K61
+ 0x7C740200, // 011A CALL R29 1
+ 0x8C74073E, // 011B GETMET R29 R3 K62
+ 0x5C7C3200, // 011C MOVE R31 R25
+ 0x5C803400, // 011D MOVE R32 R26
+ 0x5C843600, // 011E MOVE R33 R27
+ 0x5C883800, // 011F MOVE R34 R28
+ 0x7C740A00, // 0120 CALL R29 5
+ 0x900E7F03, // 0121 SETMBR R3 K63 K3
+ 0x8C740740, // 0122 GETMET R29 R3 K64
+ 0x7C740200, // 0123 CALL R29 1
+ 0x8C740741, // 0124 GETMET R29 R3 K65
+ 0x507C0200, // 0125 LDBOOL R31 1 0
+ 0x7C740400, // 0126 CALL R29 2
+ 0x8C740742, // 0127 GETMET R29 R3 K66
+ 0x7C740200, // 0128 CALL R29 1
+ 0x8C740743, // 0129 GETMET R29 R3 K67
+ 0x7C740200, // 012A CALL R29 1
+ 0x8C740744, // 012B GETMET R29 R3 K68
+ 0x7C740200, // 012C CALL R29 1
+ 0x50740200, // 012D LDBOOL R29 1 0
+ 0x80043A00, // 012E RET 1 R29
})
)
);
@@ -1708,7 +1425,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[144]) { /* constants */
+ ( &(const bvalue[118]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(session),
@@ -1751,112 +1468,86 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */
/* K39 */ be_nested_str_weak(AES_CCM),
/* K40 */ be_nested_str_weak(decrypt),
/* K41 */ be_nested_str_weak(tag),
- /* K42 */ be_nested_str_weak(_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A),
- /* K43 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s1rk_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K44 */ be_nested_str_weak(tohex),
- /* K45 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20tag_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K46 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20Resume1MICPayload_X20_X3D_X20),
- /* K47 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20decrypted_tag_X20_X20_X20_X20_X20_X3D_X20),
- /* K48 */ be_nested_str_weak(_source_node_id),
- /* K49 */ be_nested_str_weak(source_node_id),
- /* K50 */ be_nested_str_weak(set_mode_CASE),
- /* K51 */ be_nested_str_weak(__future_initiator_session_id),
- /* K52 */ be_nested_str_weak(initiator_session_id),
- /* K53 */ be_nested_str_weak(__future_local_session_id),
- /* K54 */ be_nested_str_weak(gen_local_session_id),
- /* K55 */ be_nested_str_weak(MTR_X3A_X20_X2BSession_X20_X20_X20_X28_X256i_X29_X20from_X20_X27_X5B_X25s_X5D_X3A_X25i_X27),
- /* K56 */ be_nested_str_weak(remote_ip),
- /* K57 */ be_nested_str_weak(remote_port),
- /* K58 */ be_nested_str_weak(resumption_id),
- /* K59 */ be_nested_str_weak(random),
- /* K60 */ be_nested_str_weak(Sigma2_Resume),
- /* K61 */ be_nested_str_weak(NCASE_SigmaS2),
- /* K62 */ be_nested_str_weak(Sigma2Resume),
- /* K63 */ be_nested_str_weak(responderSessionID),
- /* K64 */ be_nested_str_weak(sigma2ResumeMIC),
- /* K65 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2rk_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K66 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2rk_salt_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K67 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20new_resumption_id_X20_X3D_X20),
- /* K68 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20responderSessionID_X3D_X20),
- /* K69 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20sigma2ResumeMIC_X20_X20_X20_X3D_X20),
- /* K70 */ be_nested_str_weak(SessionResumptionKeys),
- /* K71 */ be_nested_str_weak(rtc),
- /* K72 */ be_nested_str_weak(utc),
- /* K73 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A_X2A),
- /* K74 */ be_nested_str_weak(MTR_X3A_X20I2RKey_X20_X20_X20_X20_X20_X20_X3D),
- /* K75 */ be_nested_str_weak(MTR_X3A_X20R2IKey_X20_X20_X20_X20_X20_X20_X3D),
- /* K76 */ be_nested_str_weak(MTR_X3A_X20AC_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
- /* K77 */ be_nested_str_weak(tlv2raw),
- /* K78 */ be_nested_str_weak(__Msg1),
- /* K79 */ be_nested_str_weak(MTR_X3A_X20sigma2resume_X3A_X20),
- /* K80 */ be_nested_str_weak(MTR_X3A_X20sigma2resume_raw_X3A_X20),
- /* K81 */ be_nested_str_weak(build_response),
- /* K82 */ be_nested_str_weak(encode_frame),
- /* K83 */ be_nested_str_weak(responder),
- /* K84 */ be_nested_str_weak(send_response_frame),
- /* K85 */ be_nested_str_weak(close),
- /* K86 */ be_nested_str_weak(set_keys),
- /* K87 */ be_nested_str_weak(_breadcrumb),
- /* K88 */ be_nested_str_weak(counter_snd_next),
- /* K89 */ be_nested_str_weak(set_persist),
- /* K90 */ be_nested_str_weak(set_no_expiration),
- /* K91 */ be_nested_str_weak(persist_to_fabric),
- /* K92 */ be_nested_str_weak(save),
- /* K93 */ be_nested_str_weak(find_fabric_by_destination_id),
- /* K94 */ be_nested_str_weak(destinationId),
- /* K95 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29),
- /* K96 */ be_nested_str_weak(MTR_X3A_X20fabric_X3D),
- /* K97 */ be_nested_str_weak(MTR_X3A_X20no_private_key_X3D),
- /* K98 */ be_nested_str_weak(no_private_key),
- /* K99 */ be_nested_str_weak(MTR_X3A_X20noc_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
- /* K100 */ be_nested_str_weak(noc),
- /* K101 */ be_nested_str_weak(get_icac),
- /* K102 */ be_nested_str_weak(MTR_X3A_X20icac_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
- /* K103 */ be_nested_str_weak(MTR_X3A_X20root_ca_cert_X20_X20_X3D),
- /* K104 */ be_nested_str_weak(root_ca_certificate),
- /* K105 */ be_nested_str_weak(__responder_priv),
- /* K106 */ be_nested_str_weak(__responder_pub),
- /* K107 */ be_nested_str_weak(EC_P256),
- /* K108 */ be_nested_str_weak(public_key),
- /* K109 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_priv_X20_X20_X3D),
- /* K110 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_pub_X20_X20_X3D),
- /* K111 */ be_nested_str_weak(shared_key),
- /* K112 */ be_nested_str_weak(TLV),
- /* K113 */ be_nested_str_weak(Matter_TLV_struct),
- /* K114 */ be_nested_str_weak(add_TLV),
- /* K115 */ be_nested_str_weak(B2),
- /* K116 */ be_nested_str_weak(get_noc),
- /* K117 */ be_const_int(3),
- /* K118 */ be_nested_str_weak(ecdsa_sign_sha256),
- /* K119 */ be_nested_str_weak(get_pk),
- /* K120 */ be_nested_str_weak(Msg1),
- /* K121 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20resumptionid_X20_X20_X3D_X20),
- /* K122 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20MSG1_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K123 */ be_nested_str_weak(SHA256),
- /* K124 */ be_nested_str_weak(update),
- /* K125 */ be_nested_str_weak(out),
- /* K126 */ be_nested_str_weak(MTR_X3A_X20TranscriptHash_X20_X3D),
- /* K127 */ be_nested_str_weak(S2K_Info),
- /* K128 */ be_nested_str_weak(get_ipk_group_key),
- /* K129 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20SharedSecret_X20_X20_X3D_X20),
- /* K130 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_salt_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K131 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20s2k_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D_X20),
- /* K132 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Raw_X20_X20_X20_X3D_X20),
- /* K133 */ be_nested_str_weak(TBEData2_Nonce),
- /* K134 */ be_nested_str_weak(encrypt),
- /* K135 */ be_nested_str_weak(MTR_X3A_X20_X2A_X20TBEData2Enc_X20_X20_X20_X3D_X20),
- /* K136 */ be_nested_str_weak(Sigma2),
- /* K137 */ be_nested_str_weak(responderRandom),
- /* K138 */ be_nested_str_weak(responderSessionId),
- /* K139 */ be_nested_str_weak(responderEphPubKey),
- /* K140 */ be_nested_str_weak(encrypted2),
- /* K141 */ be_nested_str_weak(MTR_X3A_X20sigma2_X3A_X20),
- /* K142 */ be_nested_str_weak(__Msg2),
- /* K143 */ be_nested_str_weak(MTR_X3A_X20sigma2_raw_X3A_X20),
+ /* K42 */ be_nested_str_weak(_source_node_id),
+ /* K43 */ be_nested_str_weak(source_node_id),
+ /* K44 */ be_nested_str_weak(set_mode_CASE),
+ /* K45 */ be_nested_str_weak(__future_initiator_session_id),
+ /* K46 */ be_nested_str_weak(initiator_session_id),
+ /* K47 */ be_nested_str_weak(__future_local_session_id),
+ /* K48 */ be_nested_str_weak(gen_local_session_id),
+ /* K49 */ be_nested_str_weak(MTR_X3A_X20_X2BSession_X20_X20_X20_X28_X256i_X29_X20from_X20_X27_X5B_X25s_X5D_X3A_X25i_X27),
+ /* K50 */ be_nested_str_weak(remote_ip),
+ /* K51 */ be_nested_str_weak(remote_port),
+ /* K52 */ be_nested_str_weak(resumption_id),
+ /* K53 */ be_nested_str_weak(random),
+ /* K54 */ be_nested_str_weak(Sigma2_Resume),
+ /* K55 */ be_nested_str_weak(NCASE_SigmaS2),
+ /* K56 */ be_nested_str_weak(Sigma2Resume),
+ /* K57 */ be_nested_str_weak(responderSessionID),
+ /* K58 */ be_nested_str_weak(sigma2ResumeMIC),
+ /* K59 */ be_nested_str_weak(SessionResumptionKeys),
+ /* K60 */ be_nested_str_weak(rtc),
+ /* K61 */ be_nested_str_weak(utc),
+ /* K62 */ be_nested_str_weak(tlv2raw),
+ /* K63 */ be_nested_str_weak(__Msg1),
+ /* K64 */ be_nested_str_weak(build_response),
+ /* K65 */ be_nested_str_weak(encode_frame),
+ /* K66 */ be_nested_str_weak(responder),
+ /* K67 */ be_nested_str_weak(send_response_frame),
+ /* K68 */ be_nested_str_weak(close),
+ /* K69 */ be_nested_str_weak(set_keys),
+ /* K70 */ be_nested_str_weak(_breadcrumb),
+ /* K71 */ be_nested_str_weak(counter_snd_next),
+ /* K72 */ be_nested_str_weak(set_persist),
+ /* K73 */ be_nested_str_weak(set_no_expiration),
+ /* K74 */ be_nested_str_weak(persist_to_fabric),
+ /* K75 */ be_nested_str_weak(save),
+ /* K76 */ be_nested_str_weak(find_fabric_by_destination_id),
+ /* K77 */ be_nested_str_weak(destinationId),
+ /* K78 */ be_nested_str_weak(MTR_X3A_X20StatusReport_X28GeneralCode_X3A_X20FAILURE_X2C_X20ProtocolId_X3A_X20SECURE_CHANNEL_X2C_X20ProtocolCode_X3A_X20NO_SHARED_TRUST_ROOTS_X29),
+ /* K79 */ be_nested_str_weak(MTR_X3A_X20fabric_X3D),
+ /* K80 */ be_nested_str_weak(MTR_X3A_X20no_private_key_X3D),
+ /* K81 */ be_nested_str_weak(no_private_key),
+ /* K82 */ be_nested_str_weak(tohex),
+ /* K83 */ be_nested_str_weak(MTR_X3A_X20noc_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
+ /* K84 */ be_nested_str_weak(noc),
+ /* K85 */ be_nested_str_weak(get_icac),
+ /* K86 */ be_nested_str_weak(MTR_X3A_X20icac_X20_X20_X20_X20_X20_X20_X20_X20_X20_X20_X3D),
+ /* K87 */ be_nested_str_weak(MTR_X3A_X20root_ca_cert_X20_X20_X3D),
+ /* K88 */ be_nested_str_weak(root_ca_certificate),
+ /* K89 */ be_nested_str_weak(__responder_priv),
+ /* K90 */ be_nested_str_weak(__responder_pub),
+ /* K91 */ be_nested_str_weak(EC_P256),
+ /* K92 */ be_nested_str_weak(public_key),
+ /* K93 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_priv_X20_X20_X3D),
+ /* K94 */ be_nested_str_weak(MTR_X3A_X20ResponderEph_pub_X20_X20_X3D),
+ /* K95 */ be_nested_str_weak(shared_key),
+ /* K96 */ be_nested_str_weak(TLV),
+ /* K97 */ be_nested_str_weak(Matter_TLV_struct),
+ /* K98 */ be_nested_str_weak(add_TLV),
+ /* K99 */ be_nested_str_weak(B2),
+ /* K100 */ be_nested_str_weak(get_noc),
+ /* K101 */ be_const_int(3),
+ /* K102 */ be_nested_str_weak(ecdsa_sign_sha256),
+ /* K103 */ be_nested_str_weak(get_pk),
+ /* K104 */ be_nested_str_weak(Msg1),
+ /* K105 */ be_nested_str_weak(SHA256),
+ /* K106 */ be_nested_str_weak(update),
+ /* K107 */ be_nested_str_weak(out),
+ /* K108 */ be_nested_str_weak(S2K_Info),
+ /* K109 */ be_nested_str_weak(get_ipk_group_key),
+ /* K110 */ be_nested_str_weak(TBEData2_Nonce),
+ /* K111 */ be_nested_str_weak(encrypt),
+ /* K112 */ be_nested_str_weak(Sigma2),
+ /* K113 */ be_nested_str_weak(responderRandom),
+ /* K114 */ be_nested_str_weak(responderSessionId),
+ /* K115 */ be_nested_str_weak(responderEphPubKey),
+ /* K116 */ be_nested_str_weak(encrypted2),
+ /* K117 */ be_nested_str_weak(__Msg2),
}),
be_str_weak(parse_Sigma1),
&be_const_str_solidified,
- ( &(const binstruction[793]) { /* code */
+ ( &(const binstruction[576]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xA40E0200, // 0001 IMPORT R3 K1
0x88100302, // 0002 GETMBR R4 R1 K2
@@ -1957,7 +1648,7 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */
0x1C201009, // 0061 EQ R8 R8 R9
0x78220000, // 0062 JMPF R8 #0064
0x50180000, // 0063 LDBOOL R6 0 0
- 0x781A013A, // 0064 JMPF R6 #01A0
+ 0x781A00B6, // 0064 JMPF R6 #011C
0x88200B1F, // 0065 GETMBR R8 R5 K31
0x88240B17, // 0066 GETMBR R9 R5 K23
0x00201009, // 0067 ADD R8 R8 R9
@@ -2004,652 +1695,435 @@ be_local_closure(Matter_Commisioning_Context_parse_Sigma1, /* name */
0x5C3C2000, // 0090 MOVE R15 R16
0x8C401D29, // 0091 GETMET R16 R14 K41
0x7C400200, // 0092 CALL R16 1
- 0xB8460E00, // 0093 GETNGBL R17 K7
- 0x8C442308, // 0094 GETMET R17 R17 K8
- 0x584C002A, // 0095 LDCONST R19 K42
- 0x54520003, // 0096 LDINT R20 4
- 0x7C440600, // 0097 CALL R17 3
- 0xB8460E00, // 0098 GETNGBL R17 K7
- 0x8C442308, // 0099 GETMET R17 R17 K8
- 0x8C4C152C, // 009A GETMET R19 R10 K44
- 0x7C4C0200, // 009B CALL R19 1
- 0x004E5613, // 009C ADD R19 K43 R19
- 0x54520003, // 009D LDINT R20 4
- 0x7C440600, // 009E CALL R17 3
- 0xB8460E00, // 009F GETNGBL R17 K7
- 0x8C442308, // 00A0 GETMET R17 R17 K8
- 0x8C4C1B2C, // 00A1 GETMET R19 R13 K44
- 0x7C4C0200, // 00A2 CALL R19 1
- 0x004E5A13, // 00A3 ADD R19 K45 R19
- 0x54520003, // 00A4 LDINT R20 4
- 0x7C440600, // 00A5 CALL R17 3
- 0xB8460E00, // 00A6 GETNGBL R17 K7
- 0x8C442308, // 00A7 GETMET R17 R17 K8
- 0x8C4C1F2C, // 00A8 GETMET R19 R15 K44
- 0x7C4C0200, // 00A9 CALL R19 1
- 0x004E5C13, // 00AA ADD R19 K46 R19
- 0x54520003, // 00AB LDINT R20 4
- 0x7C440600, // 00AC CALL R17 3
- 0xB8460E00, // 00AD GETNGBL R17 K7
- 0x8C442308, // 00AE GETMET R17 R17 K8
- 0x8C4C212C, // 00AF GETMET R19 R16 K44
- 0x7C4C0200, // 00B0 CALL R19 1
- 0x004E5E13, // 00B1 ADD R19 K47 R19
- 0x54520003, // 00B2 LDINT R20 4
- 0x7C440600, // 00B3 CALL R17 3
- 0xB8460E00, // 00B4 GETNGBL R17 K7
- 0x8C442308, // 00B5 GETMET R17 R17 K8
- 0x584C002A, // 00B6 LDCONST R19 K42
- 0x54520003, // 00B7 LDINT R20 4
- 0x7C440600, // 00B8 CALL R17 3
- 0x1C441A10, // 00B9 EQ R17 R13 R16
- 0x784600E3, // 00BA JMPF R17 #019F
- 0x88440F1E, // 00BB GETMBR R17 R7 K30
- 0x90123C11, // 00BC SETMBR R4 K30 R17
- 0x88440331, // 00BD GETMBR R17 R1 K49
- 0x90126011, // 00BE SETMBR R4 K48 R17
- 0x8C440932, // 00BF GETMET R17 R4 K50
- 0x7C440200, // 00C0 CALL R17 1
- 0x88440B34, // 00C1 GETMBR R17 R5 K52
- 0x90126611, // 00C2 SETMBR R4 K51 R17
- 0x8844011A, // 00C3 GETMBR R17 R0 K26
- 0x8844231B, // 00C4 GETMBR R17 R17 K27
- 0x8C442336, // 00C5 GETMET R17 R17 K54
- 0x7C440200, // 00C6 CALL R17 1
- 0x90126A11, // 00C7 SETMBR R4 K53 R17
- 0xB8460E00, // 00C8 GETNGBL R17 K7
- 0x8C442308, // 00C9 GETMET R17 R17 K8
- 0x8C4C0712, // 00CA GETMET R19 R3 K18
- 0x58540037, // 00CB LDCONST R21 K55
- 0x88580935, // 00CC GETMBR R22 R4 K53
- 0x885C0338, // 00CD GETMBR R23 R1 K56
- 0x88600339, // 00CE GETMBR R24 R1 K57
- 0x7C4C0A00, // 00CF CALL R19 5
- 0x5850000A, // 00D0 LDCONST R20 K10
- 0x7C440600, // 00D1 CALL R17 3
- 0x88440F24, // 00D2 GETMBR R17 R7 K36
- 0x90124811, // 00D3 SETMBR R4 K36 R17
- 0x8C44053B, // 00D4 GETMET R17 R2 K59
- 0x544E000F, // 00D5 LDINT R19 16
- 0x7C440400, // 00D6 CALL R17 2
- 0x90127411, // 00D7 SETMBR R4 K58 R17
- 0x60440015, // 00D8 GETGBL R17 G21
- 0x7C440000, // 00D9 CALL R17 0
- 0x8C442320, // 00DA GETMET R17 R17 K32
- 0x584C003C, // 00DB LDCONST R19 K60
- 0x7C440400, // 00DC CALL R17 2
- 0x88480B1F, // 00DD GETMBR R18 R5 K31
- 0x884C093A, // 00DE GETMBR R19 R4 K58
- 0x00482413, // 00DF ADD R18 R18 R19
- 0x8C4C0522, // 00E0 GETMET R19 R2 K34
- 0x7C4C0200, // 00E1 CALL R19 1
- 0x8C4C2723, // 00E2 GETMET R19 R19 K35
- 0x88540924, // 00E3 GETMBR R21 R4 K36
- 0x5C582400, // 00E4 MOVE R22 R18
- 0x5C5C2200, // 00E5 MOVE R23 R17
- 0x5462000F, // 00E6 LDINT R24 16
- 0x7C4C0A00, // 00E7 CALL R19 5
- 0x8C500527, // 00E8 GETMET R20 R2 K39
- 0x5C582600, // 00E9 MOVE R22 R19
- 0x605C0015, // 00EA GETGBL R23 G21
- 0x7C5C0000, // 00EB CALL R23 0
- 0x8C5C2F20, // 00EC GETMET R23 R23 K32
- 0x5864003D, // 00ED LDCONST R25 K61
- 0x7C5C0400, // 00EE CALL R23 2
- 0x60600015, // 00EF GETGBL R24 G21
- 0x7C600000, // 00F0 CALL R24 0
- 0x58640005, // 00F1 LDCONST R25 K5
- 0x546A000F, // 00F2 LDINT R26 16
- 0x7C500C00, // 00F3 CALL R20 6
- 0x8C542929, // 00F4 GETMET R21 R20 K41
- 0x7C540200, // 00F5 CALL R21 1
- 0xB85A1A00, // 00F6 GETNGBL R22 K13
- 0x8C582D3E, // 00F7 GETMET R22 R22 K62
- 0x7C580200, // 00F8 CALL R22 1
- 0x885C093A, // 00F9 GETMBR R23 R4 K58
- 0x905A2E17, // 00FA SETMBR R22 K23 R23
- 0x885C0935, // 00FB GETMBR R23 R4 K53
- 0x905A7E17, // 00FC SETMBR R22 K63 R23
- 0x905A8015, // 00FD SETMBR R22 K64 R21
- 0xB85E0E00, // 00FE GETNGBL R23 K7
- 0x8C5C2F08, // 00FF GETMET R23 R23 K8
- 0x5864002A, // 0100 LDCONST R25 K42
- 0x546A0003, // 0101 LDINT R26 4
- 0x7C5C0600, // 0102 CALL R23 3
- 0xB85E0E00, // 0103 GETNGBL R23 K7
- 0x8C5C2F08, // 0104 GETMET R23 R23 K8
- 0x8C64272C, // 0105 GETMET R25 R19 K44
- 0x7C640200, // 0106 CALL R25 1
- 0x00668219, // 0107 ADD R25 K65 R25
- 0x546A0003, // 0108 LDINT R26 4
- 0x7C5C0600, // 0109 CALL R23 3
- 0xB85E0E00, // 010A GETNGBL R23 K7
- 0x8C5C2F08, // 010B GETMET R23 R23 K8
- 0x8C64252C, // 010C GETMET R25 R18 K44
- 0x7C640200, // 010D CALL R25 1
- 0x00668419, // 010E ADD R25 K66 R25
- 0x546A0003, // 010F LDINT R26 4
- 0x7C5C0600, // 0110 CALL R23 3
- 0xB85E0E00, // 0111 GETNGBL R23 K7
- 0x8C5C2F08, // 0112 GETMET R23 R23 K8
- 0x8864093A, // 0113 GETMBR R25 R4 K58
- 0x8C64332C, // 0114 GETMET R25 R25 K44
- 0x7C640200, // 0115 CALL R25 1
- 0x00668619, // 0116 ADD R25 K67 R25
- 0x546A0003, // 0117 LDINT R26 4
- 0x7C5C0600, // 0118 CALL R23 3
- 0xB85E0E00, // 0119 GETNGBL R23 K7
- 0x8C5C2F08, // 011A GETMET R23 R23 K8
- 0x60640008, // 011B GETGBL R25 G8
- 0x88680935, // 011C GETMBR R26 R4 K53
- 0x7C640200, // 011D CALL R25 1
- 0x00668819, // 011E ADD R25 K68 R25
- 0x546A0003, // 011F LDINT R26 4
- 0x7C5C0600, // 0120 CALL R23 3
- 0xB85E0E00, // 0121 GETNGBL R23 K7
- 0x8C5C2F08, // 0122 GETMET R23 R23 K8
- 0x8C642B2C, // 0123 GETMET R25 R21 K44
- 0x7C640200, // 0124 CALL R25 1
- 0x00668A19, // 0125 ADD R25 K69 R25
- 0x546A0003, // 0126 LDINT R26 4
- 0x7C5C0600, // 0127 CALL R23 3
- 0xB85E0E00, // 0128 GETNGBL R23 K7
- 0x8C5C2F08, // 0129 GETMET R23 R23 K8
- 0x5864002A, // 012A LDCONST R25 K42
- 0x546A0003, // 012B LDINT R26 4
- 0x7C5C0600, // 012C CALL R23 3
- 0x8C5C0522, // 012D GETMET R23 R2 K34
- 0x7C5C0200, // 012E CALL R23 1
- 0x8C5C2F23, // 012F GETMET R23 R23 K35
- 0x88640924, // 0130 GETMBR R25 R4 K36
- 0x88680B1F, // 0131 GETMBR R26 R5 K31
- 0x886C093A, // 0132 GETMBR R27 R4 K58
- 0x0068341B, // 0133 ADD R26 R26 R27
- 0x606C0015, // 0134 GETGBL R27 G21
- 0x7C6C0000, // 0135 CALL R27 0
- 0x8C6C3720, // 0136 GETMET R27 R27 K32
- 0x58740046, // 0137 LDCONST R29 K70
- 0x7C6C0400, // 0138 CALL R27 2
- 0x5472002F, // 0139 LDINT R28 48
- 0x7C5C0A00, // 013A CALL R23 5
- 0x5462000E, // 013B LDINT R24 15
- 0x40620A18, // 013C CONNECT R24 K5 R24
- 0x94602E18, // 013D GETIDX R24 R23 R24
- 0x5466000F, // 013E LDINT R25 16
- 0x546A001E, // 013F LDINT R26 31
- 0x4064321A, // 0140 CONNECT R25 R25 R26
- 0x94642E19, // 0141 GETIDX R25 R23 R25
- 0x546A001F, // 0142 LDINT R26 32
- 0x546E002E, // 0143 LDINT R27 47
- 0x4068341B, // 0144 CONNECT R26 R26 R27
- 0x94682E1A, // 0145 GETIDX R26 R23 R26
- 0xB86E0E00, // 0146 GETNGBL R27 K7
- 0x8C6C3747, // 0147 GETMET R27 R27 K71
- 0x7C6C0200, // 0148 CALL R27 1
- 0x946C3748, // 0149 GETIDX R27 R27 K72
- 0xB8720E00, // 014A GETNGBL R28 K7
- 0x8C703908, // 014B GETMET R28 R28 K8
- 0x58780049, // 014C LDCONST R30 K73
- 0x547E0003, // 014D LDINT R31 4
- 0x7C700600, // 014E CALL R28 3
- 0xB8720E00, // 014F GETNGBL R28 K7
- 0x8C703908, // 0150 GETMET R28 R28 K8
- 0x8C78312C, // 0151 GETMET R30 R24 K44
- 0x7C780200, // 0152 CALL R30 1
- 0x007A941E, // 0153 ADD R30 K74 R30
- 0x547E0003, // 0154 LDINT R31 4
- 0x7C700600, // 0155 CALL R28 3
- 0xB8720E00, // 0156 GETNGBL R28 K7
- 0x8C703908, // 0157 GETMET R28 R28 K8
- 0x8C78332C, // 0158 GETMET R30 R25 K44
- 0x7C780200, // 0159 CALL R30 1
- 0x007A961E, // 015A ADD R30 K75 R30
- 0x547E0003, // 015B LDINT R31 4
- 0x7C700600, // 015C CALL R28 3
- 0xB8720E00, // 015D GETNGBL R28 K7
- 0x8C703908, // 015E GETMET R28 R28 K8
- 0x8C78352C, // 015F GETMET R30 R26 K44
- 0x7C780200, // 0160 CALL R30 1
- 0x007A981E, // 0161 ADD R30 K76 R30
- 0x547E0003, // 0162 LDINT R31 4
- 0x7C700600, // 0163 CALL R28 3
- 0xB8720E00, // 0164 GETNGBL R28 K7
- 0x8C703908, // 0165 GETMET R28 R28 K8
- 0x58780049, // 0166 LDCONST R30 K73
- 0x547E0003, // 0167 LDINT R31 4
- 0x7C700600, // 0168 CALL R28 3
- 0x8C702D4D, // 0169 GETMET R28 R22 K77
- 0x7C700200, // 016A CALL R28 1
- 0x4C740000, // 016B LDNIL R29
- 0x90129C1D, // 016C SETMBR R4 K78 R29
- 0xB8760E00, // 016D GETNGBL R29 K7
- 0x8C743B08, // 016E GETMET R29 R29 K8
- 0xB87E1A00, // 016F GETNGBL R31 K13
- 0x8C7C3F14, // 0170 GETMET R31 R31 K20
- 0x5C842C00, // 0171 MOVE R33 R22
- 0x7C7C0400, // 0172 CALL R31 2
- 0x007E9E1F, // 0173 ADD R31 K79 R31
- 0x54820003, // 0174 LDINT R32 4
- 0x7C740600, // 0175 CALL R29 3
- 0xB8760E00, // 0176 GETNGBL R29 K7
- 0x8C743B08, // 0177 GETMET R29 R29 K8
- 0x8C7C392C, // 0178 GETMET R31 R28 K44
- 0x7C7C0200, // 0179 CALL R31 1
- 0x007EA01F, // 017A ADD R31 K80 R31
- 0x54820003, // 017B LDINT R32 4
- 0x7C740600, // 017C CALL R29 3
- 0x8C740351, // 017D GETMET R29 R1 K81
- 0x547E0032, // 017E LDINT R31 51
- 0x50800200, // 017F LDBOOL R32 1 0
- 0x7C740600, // 0180 CALL R29 3
- 0x8C783B52, // 0181 GETMET R30 R29 K82
- 0x5C803800, // 0182 MOVE R32 R28
- 0x7C780400, // 0183 CALL R30 2
- 0x887C0153, // 0184 GETMBR R31 R0 K83
- 0x8C7C3F54, // 0185 GETMET R31 R31 K84
- 0x5C843A00, // 0186 MOVE R33 R29
- 0x7C7C0400, // 0187 CALL R31 2
- 0x8C7C0955, // 0188 GETMET R31 R4 K85
- 0x7C7C0200, // 0189 CALL R31 1
- 0x8C7C0956, // 018A GETMET R31 R4 K86
- 0x5C843000, // 018B MOVE R33 R24
- 0x5C883200, // 018C MOVE R34 R25
- 0x5C8C3400, // 018D MOVE R35 R26
- 0x5C903600, // 018E MOVE R36 R27
- 0x7C7C0A00, // 018F CALL R31 5
- 0x9012AF05, // 0190 SETMBR R4 K87 K5
- 0x8C7C0958, // 0191 GETMET R31 R4 K88
- 0x7C7C0200, // 0192 CALL R31 1
- 0x8C7C0959, // 0193 GETMET R31 R4 K89
- 0x50840200, // 0194 LDBOOL R33 1 0
- 0x7C7C0400, // 0195 CALL R31 2
- 0x8C7C095A, // 0196 GETMET R31 R4 K90
- 0x7C7C0200, // 0197 CALL R31 1
- 0x8C7C095B, // 0198 GETMET R31 R4 K91
- 0x7C7C0200, // 0199 CALL R31 1
- 0x8C7C095C, // 019A GETMET R31 R4 K92
- 0x7C7C0200, // 019B CALL R31 1
- 0x507C0200, // 019C LDBOOL R31 1 0
- 0x80043E00, // 019D RET 1 R31
- 0x70020000, // 019E JMP #01A0
- 0x50180000, // 019F LDBOOL R6 0 0
- 0x5C200C00, // 01A0 MOVE R8 R6
- 0x74220174, // 01A1 JMPT R8 #0317
- 0x8C20015D, // 01A2 GETMET R8 R0 K93
- 0x88280B5E, // 01A3 GETMBR R10 R5 K94
- 0x882C0B1F, // 01A4 GETMBR R11 R5 K31
- 0x7C200600, // 01A5 CALL R8 3
- 0x90123C08, // 01A6 SETMBR R4 K30 R8
- 0x4C240000, // 01A7 LDNIL R9
- 0x1C240809, // 01A8 EQ R9 R4 R9
- 0x74260003, // 01A9 JMPT R9 #01AE
- 0x8824091E, // 01AA GETMBR R9 R4 K30
- 0x4C280000, // 01AB LDNIL R10
- 0x1C24120A, // 01AC EQ R9 R9 R10
- 0x7826000D, // 01AD JMPF R9 #01BC
- 0xB8260E00, // 01AE GETNGBL R9 K7
- 0x8C241308, // 01AF GETMET R9 R9 K8
- 0x582C005F, // 01B0 LDCONST R11 K95
- 0x5830000A, // 01B1 LDCONST R12 K10
- 0x7C240600, // 01B2 CALL R9 3
- 0x8C24010B, // 01B3 GETMET R9 R0 K11
- 0x5C2C0200, // 01B4 MOVE R11 R1
- 0x5830000C, // 01B5 LDCONST R12 K12
- 0x58340005, // 01B6 LDCONST R13 K5
- 0x5838000C, // 01B7 LDCONST R14 K12
- 0x503C0000, // 01B8 LDBOOL R15 0 0
- 0x7C240C00, // 01B9 CALL R9 6
- 0x50240000, // 01BA LDBOOL R9 0 0
- 0x80041200, // 01BB RET 1 R9
- 0x88240331, // 01BC GETMBR R9 R1 K49
- 0x90126009, // 01BD SETMBR R4 K48 R9
- 0x8C240932, // 01BE GETMET R9 R4 K50
- 0x7C240200, // 01BF CALL R9 1
- 0x88240B34, // 01C0 GETMBR R9 R5 K52
- 0x90126609, // 01C1 SETMBR R4 K51 R9
- 0x8824011A, // 01C2 GETMBR R9 R0 K26
- 0x8824131B, // 01C3 GETMBR R9 R9 K27
- 0x8C241336, // 01C4 GETMET R9 R9 K54
- 0x7C240200, // 01C5 CALL R9 1
- 0x90126A09, // 01C6 SETMBR R4 K53 R9
- 0xB8260E00, // 01C7 GETNGBL R9 K7
- 0x8C241308, // 01C8 GETMET R9 R9 K8
- 0x8C2C0712, // 01C9 GETMET R11 R3 K18
- 0x58340037, // 01CA LDCONST R13 K55
- 0x88380935, // 01CB GETMBR R14 R4 K53
- 0x883C0338, // 01CC GETMBR R15 R1 K56
- 0x88400339, // 01CD GETMBR R16 R1 K57
- 0x7C2C0A00, // 01CE CALL R11 5
- 0x5830000A, // 01CF LDCONST R12 K10
- 0x7C240600, // 01D0 CALL R9 3
- 0xB8260E00, // 01D1 GETNGBL R9 K7
- 0x8C241308, // 01D2 GETMET R9 R9 K8
- 0xB82E1A00, // 01D3 GETNGBL R11 K13
- 0x8C2C1714, // 01D4 GETMET R11 R11 K20
- 0x8834091E, // 01D5 GETMBR R13 R4 K30
- 0x7C2C0400, // 01D6 CALL R11 2
- 0x002EC00B, // 01D7 ADD R11 K96 R11
- 0x54320003, // 01D8 LDINT R12 4
- 0x7C240600, // 01D9 CALL R9 3
- 0xB8260E00, // 01DA GETNGBL R9 K7
- 0x8C241308, // 01DB GETMET R9 R9 K8
- 0x882C091E, // 01DC GETMBR R11 R4 K30
- 0x882C1762, // 01DD GETMBR R11 R11 K98
- 0x8C2C172C, // 01DE GETMET R11 R11 K44
- 0x7C2C0200, // 01DF CALL R11 1
- 0x002EC20B, // 01E0 ADD R11 K97 R11
- 0x54320003, // 01E1 LDINT R12 4
- 0x7C240600, // 01E2 CALL R9 3
- 0xB8260E00, // 01E3 GETNGBL R9 K7
- 0x8C241308, // 01E4 GETMET R9 R9 K8
- 0x882C091E, // 01E5 GETMBR R11 R4 K30
- 0x882C1764, // 01E6 GETMBR R11 R11 K100
- 0x8C2C172C, // 01E7 GETMET R11 R11 K44
- 0x7C2C0200, // 01E8 CALL R11 1
- 0x002EC60B, // 01E9 ADD R11 K99 R11
- 0x54320003, // 01EA LDINT R12 4
- 0x7C240600, // 01EB CALL R9 3
- 0x8824091E, // 01EC GETMBR R9 R4 K30
- 0x8C241365, // 01ED GETMET R9 R9 K101
- 0x7C240200, // 01EE CALL R9 1
- 0x78260009, // 01EF JMPF R9 #01FA
- 0xB8260E00, // 01F0 GETNGBL R9 K7
- 0x8C241308, // 01F1 GETMET R9 R9 K8
- 0x882C091E, // 01F2 GETMBR R11 R4 K30
- 0x8C2C1765, // 01F3 GETMET R11 R11 K101
- 0x7C2C0200, // 01F4 CALL R11 1
- 0x8C2C172C, // 01F5 GETMET R11 R11 K44
- 0x7C2C0200, // 01F6 CALL R11 1
- 0x002ECC0B, // 01F7 ADD R11 K102 R11
- 0x54320003, // 01F8 LDINT R12 4
- 0x7C240600, // 01F9 CALL R9 3
- 0xB8260E00, // 01FA GETNGBL R9 K7
- 0x8C241308, // 01FB GETMET R9 R9 K8
- 0x882C091E, // 01FC GETMBR R11 R4 K30
- 0x882C1768, // 01FD GETMBR R11 R11 K104
- 0x8C2C172C, // 01FE GETMET R11 R11 K44
- 0x7C2C0200, // 01FF CALL R11 1
- 0x002ECE0B, // 0200 ADD R11 K103 R11
- 0x54320003, // 0201 LDINT R12 4
- 0x7C240600, // 0202 CALL R9 3
- 0x8C24053B, // 0203 GETMET R9 R2 K59
- 0x542E000F, // 0204 LDINT R11 16
- 0x7C240400, // 0205 CALL R9 2
- 0x90127409, // 0206 SETMBR R4 K58 R9
- 0x8C24053B, // 0207 GETMET R9 R2 K59
- 0x542E001F, // 0208 LDINT R11 32
- 0x7C240400, // 0209 CALL R9 2
- 0x9012D209, // 020A SETMBR R4 K105 R9
- 0x8C24056B, // 020B GETMET R9 R2 K107
- 0x7C240200, // 020C CALL R9 1
- 0x8C24136C, // 020D GETMET R9 R9 K108
- 0x882C0969, // 020E GETMBR R11 R4 K105
- 0x7C240400, // 020F CALL R9 2
- 0x9012D409, // 0210 SETMBR R4 K106 R9
- 0xB8260E00, // 0211 GETNGBL R9 K7
- 0x8C241308, // 0212 GETMET R9 R9 K8
- 0x882C0969, // 0213 GETMBR R11 R4 K105
- 0x8C2C172C, // 0214 GETMET R11 R11 K44
- 0x7C2C0200, // 0215 CALL R11 1
- 0x002EDA0B, // 0216 ADD R11 K109 R11
- 0x54320003, // 0217 LDINT R12 4
- 0x7C240600, // 0218 CALL R9 3
- 0xB8260E00, // 0219 GETNGBL R9 K7
- 0x8C241308, // 021A GETMET R9 R9 K8
- 0x882C096A, // 021B GETMBR R11 R4 K106
- 0x8C2C172C, // 021C GETMET R11 R11 K44
- 0x7C2C0200, // 021D CALL R11 1
- 0x002EDC0B, // 021E ADD R11 K110 R11
- 0x54320003, // 021F LDINT R12 4
- 0x7C240600, // 0220 CALL R9 3
- 0x8C24053B, // 0221 GETMET R9 R2 K59
- 0x542E001F, // 0222 LDINT R11 32
- 0x7C240400, // 0223 CALL R9 2
- 0x8C28056B, // 0224 GETMET R10 R2 K107
- 0x7C280200, // 0225 CALL R10 1
- 0x8C28156F, // 0226 GETMET R10 R10 K111
- 0x88300969, // 0227 GETMBR R12 R4 K105
- 0x88340B16, // 0228 GETMBR R13 R5 K22
- 0x7C280600, // 0229 CALL R10 3
- 0x9012480A, // 022A SETMBR R4 K36 R10
- 0xB82A1A00, // 022B GETNGBL R10 K13
- 0x88281570, // 022C GETMBR R10 R10 K112
- 0x8C281571, // 022D GETMET R10 R10 K113
- 0x7C280200, // 022E CALL R10 1
- 0x8C2C1572, // 022F GETMET R11 R10 K114
- 0x5834000C, // 0230 LDCONST R13 K12
- 0xB83A1A00, // 0231 GETNGBL R14 K13
- 0x88381D70, // 0232 GETMBR R14 R14 K112
- 0x88381D73, // 0233 GETMBR R14 R14 K115
- 0x8C3C0974, // 0234 GETMET R15 R4 K116
- 0x7C3C0200, // 0235 CALL R15 1
- 0x7C2C0800, // 0236 CALL R11 4
- 0x8C2C1572, // 0237 GETMET R11 R10 K114
- 0x5834000A, // 0238 LDCONST R13 K10
- 0xB83A1A00, // 0239 GETNGBL R14 K13
- 0x88381D70, // 023A GETMBR R14 R14 K112
- 0x88381D73, // 023B GETMBR R14 R14 K115
- 0x8C3C0965, // 023C GETMET R15 R4 K101
- 0x7C3C0200, // 023D CALL R15 1
- 0x7C2C0800, // 023E CALL R11 4
- 0x8C2C1572, // 023F GETMET R11 R10 K114
- 0x58340075, // 0240 LDCONST R13 K117
- 0xB83A1A00, // 0241 GETNGBL R14 K13
- 0x88381D70, // 0242 GETMBR R14 R14 K112
- 0x88381D73, // 0243 GETMBR R14 R14 K115
- 0x883C096A, // 0244 GETMBR R15 R4 K106
- 0x7C2C0800, // 0245 CALL R11 4
- 0x8C2C1572, // 0246 GETMET R11 R10 K114
- 0x54360003, // 0247 LDINT R13 4
- 0xB83A1A00, // 0248 GETNGBL R14 K13
- 0x88381D70, // 0249 GETMBR R14 R14 K112
- 0x88381D73, // 024A GETMBR R14 R14 K115
- 0x883C0B16, // 024B GETMBR R15 R5 K22
- 0x7C2C0800, // 024C CALL R11 4
- 0x8C2C056B, // 024D GETMET R11 R2 K107
- 0x7C2C0200, // 024E CALL R11 1
- 0x8C2C1776, // 024F GETMET R11 R11 K118
- 0x8C340977, // 0250 GETMET R13 R4 K119
- 0x7C340200, // 0251 CALL R13 1
- 0x8C38154D, // 0252 GETMET R14 R10 K77
- 0x7C380200, // 0253 CALL R14 1
- 0x7C2C0600, // 0254 CALL R11 3
- 0xB8321A00, // 0255 GETNGBL R12 K13
- 0x88301970, // 0256 GETMBR R12 R12 K112
- 0x8C301971, // 0257 GETMET R12 R12 K113
- 0x7C300200, // 0258 CALL R12 1
- 0x8C341972, // 0259 GETMET R13 R12 K114
- 0x583C000C, // 025A LDCONST R15 K12
- 0xB8421A00, // 025B GETNGBL R16 K13
- 0x88402170, // 025C GETMBR R16 R16 K112
- 0x88402173, // 025D GETMBR R16 R16 K115
- 0x8C440974, // 025E GETMET R17 R4 K116
- 0x7C440200, // 025F CALL R17 1
- 0x7C340800, // 0260 CALL R13 4
- 0x8C341972, // 0261 GETMET R13 R12 K114
- 0x583C000A, // 0262 LDCONST R15 K10
- 0xB8421A00, // 0263 GETNGBL R16 K13
- 0x88402170, // 0264 GETMBR R16 R16 K112
- 0x88402173, // 0265 GETMBR R16 R16 K115
- 0x8C440965, // 0266 GETMET R17 R4 K101
- 0x7C440200, // 0267 CALL R17 1
- 0x7C340800, // 0268 CALL R13 4
- 0x8C341972, // 0269 GETMET R13 R12 K114
- 0x583C0075, // 026A LDCONST R15 K117
- 0xB8421A00, // 026B GETNGBL R16 K13
- 0x88402170, // 026C GETMBR R16 R16 K112
- 0x88402173, // 026D GETMBR R16 R16 K115
- 0x5C441600, // 026E MOVE R17 R11
- 0x7C340800, // 026F CALL R13 4
- 0x8C341972, // 0270 GETMET R13 R12 K114
- 0x543E0003, // 0271 LDINT R15 4
- 0xB8421A00, // 0272 GETNGBL R16 K13
- 0x88402170, // 0273 GETMBR R16 R16 K112
- 0x88402173, // 0274 GETMBR R16 R16 K115
- 0x8844093A, // 0275 GETMBR R17 R4 K58
- 0x7C340800, // 0276 CALL R13 4
- 0xB8360E00, // 0277 GETNGBL R13 K7
- 0x8C341B08, // 0278 GETMET R13 R13 K8
- 0x583C002A, // 0279 LDCONST R15 K42
- 0x54420003, // 027A LDINT R16 4
- 0x7C340600, // 027B CALL R13 3
- 0x88340B78, // 027C GETMBR R13 R5 K120
- 0x90129C0D, // 027D SETMBR R4 K78 R13
- 0xB8360E00, // 027E GETNGBL R13 K7
- 0x8C341B08, // 027F GETMET R13 R13 K8
- 0x883C093A, // 0280 GETMBR R15 R4 K58
- 0x8C3C1F2C, // 0281 GETMET R15 R15 K44
- 0x7C3C0200, // 0282 CALL R15 1
- 0x003EF20F, // 0283 ADD R15 K121 R15
- 0x54420003, // 0284 LDINT R16 4
- 0x7C340600, // 0285 CALL R13 3
- 0xB8360E00, // 0286 GETNGBL R13 K7
- 0x8C341B08, // 0287 GETMET R13 R13 K8
- 0x883C094E, // 0288 GETMBR R15 R4 K78
- 0x8C3C1F2C, // 0289 GETMET R15 R15 K44
- 0x7C3C0200, // 028A CALL R15 1
- 0x003EF40F, // 028B ADD R15 K122 R15
- 0x54420003, // 028C LDINT R16 4
- 0x7C340600, // 028D CALL R13 3
- 0x8C34057B, // 028E GETMET R13 R2 K123
- 0x7C340200, // 028F CALL R13 1
- 0x8C341B7C, // 0290 GETMET R13 R13 K124
- 0x883C094E, // 0291 GETMBR R15 R4 K78
- 0x7C340400, // 0292 CALL R13 2
- 0x8C341B7D, // 0293 GETMET R13 R13 K125
- 0x7C340200, // 0294 CALL R13 1
- 0xB83A0E00, // 0295 GETNGBL R14 K7
- 0x8C381D08, // 0296 GETMET R14 R14 K8
- 0x8C401B2C, // 0297 GETMET R16 R13 K44
- 0x7C400200, // 0298 CALL R16 1
- 0x0042FC10, // 0299 ADD R16 K126 R16
- 0x54460003, // 029A LDINT R17 4
- 0x7C380600, // 029B CALL R14 3
- 0x60380015, // 029C GETGBL R14 G21
- 0x7C380000, // 029D CALL R14 0
- 0x8C381D20, // 029E GETMET R14 R14 K32
- 0x8840017F, // 029F GETMBR R16 R0 K127
- 0x7C380400, // 02A0 CALL R14 2
- 0x8C3C0980, // 02A1 GETMET R15 R4 K128
- 0x7C3C0200, // 02A2 CALL R15 1
- 0x003C1E09, // 02A3 ADD R15 R15 R9
- 0x8840096A, // 02A4 GETMBR R16 R4 K106
- 0x003C1E10, // 02A5 ADD R15 R15 R16
- 0x003C1E0D, // 02A6 ADD R15 R15 R13
- 0x8C400522, // 02A7 GETMET R16 R2 K34
- 0x7C400200, // 02A8 CALL R16 1
- 0x8C402123, // 02A9 GETMET R16 R16 K35
- 0x88480924, // 02AA GETMBR R18 R4 K36
- 0x5C4C1E00, // 02AB MOVE R19 R15
- 0x5C501C00, // 02AC MOVE R20 R14
- 0x5456000F, // 02AD LDINT R21 16
- 0x7C400A00, // 02AE CALL R16 5
- 0xB8460E00, // 02AF GETNGBL R17 K7
- 0x8C442308, // 02B0 GETMET R17 R17 K8
- 0x884C0924, // 02B1 GETMBR R19 R4 K36
- 0x8C4C272C, // 02B2 GETMET R19 R19 K44
- 0x7C4C0200, // 02B3 CALL R19 1
- 0x004F0213, // 02B4 ADD R19 K129 R19
- 0x54520003, // 02B5 LDINT R20 4
- 0x7C440600, // 02B6 CALL R17 3
- 0xB8460E00, // 02B7 GETNGBL R17 K7
- 0x8C442308, // 02B8 GETMET R17 R17 K8
- 0x8C4C1F2C, // 02B9 GETMET R19 R15 K44
- 0x7C4C0200, // 02BA CALL R19 1
- 0x004F0413, // 02BB ADD R19 K130 R19
- 0x54520003, // 02BC LDINT R20 4
- 0x7C440600, // 02BD CALL R17 3
- 0xB8460E00, // 02BE GETNGBL R17 K7
- 0x8C442308, // 02BF GETMET R17 R17 K8
- 0x8C4C212C, // 02C0 GETMET R19 R16 K44
- 0x7C4C0200, // 02C1 CALL R19 1
- 0x004F0613, // 02C2 ADD R19 K131 R19
- 0x54520003, // 02C3 LDINT R20 4
- 0x7C440600, // 02C4 CALL R17 3
- 0x8C44194D, // 02C5 GETMET R17 R12 K77
- 0x7C440200, // 02C6 CALL R17 1
- 0xB84A0E00, // 02C7 GETNGBL R18 K7
- 0x8C482508, // 02C8 GETMET R18 R18 K8
- 0x8C50232C, // 02C9 GETMET R20 R17 K44
- 0x7C500200, // 02CA CALL R20 1
- 0x00530814, // 02CB ADD R20 K132 R20
- 0x54560003, // 02CC LDINT R21 4
- 0x7C480600, // 02CD CALL R18 3
- 0x8C480527, // 02CE GETMET R18 R2 K39
- 0x5C502000, // 02CF MOVE R20 R16
- 0x60540015, // 02D0 GETGBL R21 G21
- 0x7C540000, // 02D1 CALL R21 0
- 0x8C542B20, // 02D2 GETMET R21 R21 K32
- 0x885C0185, // 02D3 GETMBR R23 R0 K133
- 0x7C540400, // 02D4 CALL R21 2
- 0x60580015, // 02D5 GETGBL R22 G21
- 0x7C580000, // 02D6 CALL R22 0
- 0x605C000C, // 02D7 GETGBL R23 G12
- 0x5C602200, // 02D8 MOVE R24 R17
- 0x7C5C0200, // 02D9 CALL R23 1
- 0x5462000F, // 02DA LDINT R24 16
- 0x7C480C00, // 02DB CALL R18 6
- 0x8C4C2586, // 02DC GETMET R19 R18 K134
- 0x5C542200, // 02DD MOVE R21 R17
- 0x7C4C0400, // 02DE CALL R19 2
- 0x8C502529, // 02DF GETMET R20 R18 K41
- 0x7C500200, // 02E0 CALL R20 1
- 0x004C2614, // 02E1 ADD R19 R19 R20
- 0xB8520E00, // 02E2 GETNGBL R20 K7
- 0x8C502908, // 02E3 GETMET R20 R20 K8
- 0x8C58272C, // 02E4 GETMET R22 R19 K44
- 0x7C580200, // 02E5 CALL R22 1
- 0x005B0E16, // 02E6 ADD R22 K135 R22
- 0x545E0003, // 02E7 LDINT R23 4
- 0x7C500600, // 02E8 CALL R20 3
- 0xB8520E00, // 02E9 GETNGBL R20 K7
- 0x8C502908, // 02EA GETMET R20 R20 K8
- 0x5858002A, // 02EB LDCONST R22 K42
- 0x545E0003, // 02EC LDINT R23 4
- 0x7C500600, // 02ED CALL R20 3
- 0xB8521A00, // 02EE GETNGBL R20 K13
- 0x8C502988, // 02EF GETMET R20 R20 K136
- 0x7C500200, // 02F0 CALL R20 1
- 0x90531209, // 02F1 SETMBR R20 K137 R9
- 0x88540935, // 02F2 GETMBR R21 R4 K53
- 0x90531415, // 02F3 SETMBR R20 K138 R21
- 0x8854096A, // 02F4 GETMBR R21 R4 K106
- 0x90531615, // 02F5 SETMBR R20 K139 R21
- 0x90531813, // 02F6 SETMBR R20 K140 R19
- 0xB8560E00, // 02F7 GETNGBL R21 K7
- 0x8C542B08, // 02F8 GETMET R21 R21 K8
- 0xB85E1A00, // 02F9 GETNGBL R23 K13
- 0x8C5C2F14, // 02FA GETMET R23 R23 K20
- 0x5C642800, // 02FB MOVE R25 R20
- 0x7C5C0400, // 02FC CALL R23 2
- 0x005F1A17, // 02FD ADD R23 K141 R23
- 0x54620003, // 02FE LDINT R24 4
- 0x7C540600, // 02FF CALL R21 3
- 0x8C54294D, // 0300 GETMET R21 R20 K77
- 0x7C540200, // 0301 CALL R21 1
- 0x90131C15, // 0302 SETMBR R4 K142 R21
- 0xB85A0E00, // 0303 GETNGBL R22 K7
- 0x8C582D08, // 0304 GETMET R22 R22 K8
- 0x8C602B2C, // 0305 GETMET R24 R21 K44
- 0x7C600200, // 0306 CALL R24 1
- 0x00631E18, // 0307 ADD R24 K143 R24
- 0x54660003, // 0308 LDINT R25 4
- 0x7C580600, // 0309 CALL R22 3
- 0x8C580351, // 030A GETMET R22 R1 K81
- 0x54620030, // 030B LDINT R24 49
- 0x50640200, // 030C LDBOOL R25 1 0
- 0x7C580600, // 030D CALL R22 3
- 0x8C5C2D52, // 030E GETMET R23 R22 K82
- 0x5C642A00, // 030F MOVE R25 R21
- 0x7C5C0400, // 0310 CALL R23 2
- 0x88600153, // 0311 GETMBR R24 R0 K83
- 0x8C603154, // 0312 GETMET R24 R24 K84
- 0x5C682C00, // 0313 MOVE R26 R22
- 0x7C600400, // 0314 CALL R24 2
- 0x50600200, // 0315 LDBOOL R24 1 0
- 0x80043000, // 0316 RET 1 R24
- 0x50200200, // 0317 LDBOOL R8 1 0
- 0x80041000, // 0318 RET 1 R8
+ 0x1C441A10, // 0093 EQ R17 R13 R16
+ 0x78460085, // 0094 JMPF R17 #011B
+ 0x88440F1E, // 0095 GETMBR R17 R7 K30
+ 0x90123C11, // 0096 SETMBR R4 K30 R17
+ 0x8844032B, // 0097 GETMBR R17 R1 K43
+ 0x90125411, // 0098 SETMBR R4 K42 R17
+ 0x8C44092C, // 0099 GETMET R17 R4 K44
+ 0x7C440200, // 009A CALL R17 1
+ 0x88440B2E, // 009B GETMBR R17 R5 K46
+ 0x90125A11, // 009C SETMBR R4 K45 R17
+ 0x8844011A, // 009D GETMBR R17 R0 K26
+ 0x8844231B, // 009E GETMBR R17 R17 K27
+ 0x8C442330, // 009F GETMET R17 R17 K48
+ 0x7C440200, // 00A0 CALL R17 1
+ 0x90125E11, // 00A1 SETMBR R4 K47 R17
+ 0xB8460E00, // 00A2 GETNGBL R17 K7
+ 0x8C442308, // 00A3 GETMET R17 R17 K8
+ 0x8C4C0712, // 00A4 GETMET R19 R3 K18
+ 0x58540031, // 00A5 LDCONST R21 K49
+ 0x8858092F, // 00A6 GETMBR R22 R4 K47
+ 0x885C0332, // 00A7 GETMBR R23 R1 K50
+ 0x88600333, // 00A8 GETMBR R24 R1 K51
+ 0x7C4C0A00, // 00A9 CALL R19 5
+ 0x5850000A, // 00AA LDCONST R20 K10
+ 0x7C440600, // 00AB CALL R17 3
+ 0x88440F24, // 00AC GETMBR R17 R7 K36
+ 0x90124811, // 00AD SETMBR R4 K36 R17
+ 0x8C440535, // 00AE GETMET R17 R2 K53
+ 0x544E000F, // 00AF LDINT R19 16
+ 0x7C440400, // 00B0 CALL R17 2
+ 0x90126811, // 00B1 SETMBR R4 K52 R17
+ 0x60440015, // 00B2 GETGBL R17 G21
+ 0x7C440000, // 00B3 CALL R17 0
+ 0x8C442320, // 00B4 GETMET R17 R17 K32
+ 0x584C0036, // 00B5 LDCONST R19 K54
+ 0x7C440400, // 00B6 CALL R17 2
+ 0x88480B1F, // 00B7 GETMBR R18 R5 K31
+ 0x884C0934, // 00B8 GETMBR R19 R4 K52
+ 0x00482413, // 00B9 ADD R18 R18 R19
+ 0x8C4C0522, // 00BA GETMET R19 R2 K34
+ 0x7C4C0200, // 00BB CALL R19 1
+ 0x8C4C2723, // 00BC GETMET R19 R19 K35
+ 0x88540924, // 00BD GETMBR R21 R4 K36
+ 0x5C582400, // 00BE MOVE R22 R18
+ 0x5C5C2200, // 00BF MOVE R23 R17
+ 0x5462000F, // 00C0 LDINT R24 16
+ 0x7C4C0A00, // 00C1 CALL R19 5
+ 0x8C500527, // 00C2 GETMET R20 R2 K39
+ 0x5C582600, // 00C3 MOVE R22 R19
+ 0x605C0015, // 00C4 GETGBL R23 G21
+ 0x7C5C0000, // 00C5 CALL R23 0
+ 0x8C5C2F20, // 00C6 GETMET R23 R23 K32
+ 0x58640037, // 00C7 LDCONST R25 K55
+ 0x7C5C0400, // 00C8 CALL R23 2
+ 0x60600015, // 00C9 GETGBL R24 G21
+ 0x7C600000, // 00CA CALL R24 0
+ 0x58640005, // 00CB LDCONST R25 K5
+ 0x546A000F, // 00CC LDINT R26 16
+ 0x7C500C00, // 00CD CALL R20 6
+ 0x8C542929, // 00CE GETMET R21 R20 K41
+ 0x7C540200, // 00CF CALL R21 1
+ 0xB85A1A00, // 00D0 GETNGBL R22 K13
+ 0x8C582D38, // 00D1 GETMET R22 R22 K56
+ 0x7C580200, // 00D2 CALL R22 1
+ 0x885C0934, // 00D3 GETMBR R23 R4 K52
+ 0x905A2E17, // 00D4 SETMBR R22 K23 R23
+ 0x885C092F, // 00D5 GETMBR R23 R4 K47
+ 0x905A7217, // 00D6 SETMBR R22 K57 R23
+ 0x905A7415, // 00D7 SETMBR R22 K58 R21
+ 0x8C5C0522, // 00D8 GETMET R23 R2 K34
+ 0x7C5C0200, // 00D9 CALL R23 1
+ 0x8C5C2F23, // 00DA GETMET R23 R23 K35
+ 0x88640924, // 00DB GETMBR R25 R4 K36
+ 0x88680B1F, // 00DC GETMBR R26 R5 K31
+ 0x886C0934, // 00DD GETMBR R27 R4 K52
+ 0x0068341B, // 00DE ADD R26 R26 R27
+ 0x606C0015, // 00DF GETGBL R27 G21
+ 0x7C6C0000, // 00E0 CALL R27 0
+ 0x8C6C3720, // 00E1 GETMET R27 R27 K32
+ 0x5874003B, // 00E2 LDCONST R29 K59
+ 0x7C6C0400, // 00E3 CALL R27 2
+ 0x5472002F, // 00E4 LDINT R28 48
+ 0x7C5C0A00, // 00E5 CALL R23 5
+ 0x5462000E, // 00E6 LDINT R24 15
+ 0x40620A18, // 00E7 CONNECT R24 K5 R24
+ 0x94602E18, // 00E8 GETIDX R24 R23 R24
+ 0x5466000F, // 00E9 LDINT R25 16
+ 0x546A001E, // 00EA LDINT R26 31
+ 0x4064321A, // 00EB CONNECT R25 R25 R26
+ 0x94642E19, // 00EC GETIDX R25 R23 R25
+ 0x546A001F, // 00ED LDINT R26 32
+ 0x546E002E, // 00EE LDINT R27 47
+ 0x4068341B, // 00EF CONNECT R26 R26 R27
+ 0x94682E1A, // 00F0 GETIDX R26 R23 R26
+ 0xB86E0E00, // 00F1 GETNGBL R27 K7
+ 0x8C6C373C, // 00F2 GETMET R27 R27 K60
+ 0x7C6C0200, // 00F3 CALL R27 1
+ 0x946C373D, // 00F4 GETIDX R27 R27 K61
+ 0x8C702D3E, // 00F5 GETMET R28 R22 K62
+ 0x7C700200, // 00F6 CALL R28 1
+ 0x4C740000, // 00F7 LDNIL R29
+ 0x90127E1D, // 00F8 SETMBR R4 K63 R29
+ 0x8C740340, // 00F9 GETMET R29 R1 K64
+ 0x547E0032, // 00FA LDINT R31 51
+ 0x50800200, // 00FB LDBOOL R32 1 0
+ 0x7C740600, // 00FC CALL R29 3
+ 0x8C783B41, // 00FD GETMET R30 R29 K65
+ 0x5C803800, // 00FE MOVE R32 R28
+ 0x7C780400, // 00FF CALL R30 2
+ 0x887C0142, // 0100 GETMBR R31 R0 K66
+ 0x8C7C3F43, // 0101 GETMET R31 R31 K67
+ 0x5C843A00, // 0102 MOVE R33 R29
+ 0x7C7C0400, // 0103 CALL R31 2
+ 0x8C7C0944, // 0104 GETMET R31 R4 K68
+ 0x7C7C0200, // 0105 CALL R31 1
+ 0x8C7C0945, // 0106 GETMET R31 R4 K69
+ 0x5C843000, // 0107 MOVE R33 R24
+ 0x5C883200, // 0108 MOVE R34 R25
+ 0x5C8C3400, // 0109 MOVE R35 R26
+ 0x5C903600, // 010A MOVE R36 R27
+ 0x7C7C0A00, // 010B CALL R31 5
+ 0x90128D05, // 010C SETMBR R4 K70 K5
+ 0x8C7C0947, // 010D GETMET R31 R4 K71
+ 0x7C7C0200, // 010E CALL R31 1
+ 0x8C7C0948, // 010F GETMET R31 R4 K72
+ 0x50840200, // 0110 LDBOOL R33 1 0
+ 0x7C7C0400, // 0111 CALL R31 2
+ 0x8C7C0949, // 0112 GETMET R31 R4 K73
+ 0x7C7C0200, // 0113 CALL R31 1
+ 0x8C7C094A, // 0114 GETMET R31 R4 K74
+ 0x7C7C0200, // 0115 CALL R31 1
+ 0x8C7C094B, // 0116 GETMET R31 R4 K75
+ 0x7C7C0200, // 0117 CALL R31 1
+ 0x507C0200, // 0118 LDBOOL R31 1 0
+ 0x80043E00, // 0119 RET 1 R31
+ 0x70020000, // 011A JMP #011C
+ 0x50180000, // 011B LDBOOL R6 0 0
+ 0x5C200C00, // 011C MOVE R8 R6
+ 0x7422011F, // 011D JMPT R8 #023E
+ 0x8C20014C, // 011E GETMET R8 R0 K76
+ 0x88280B4D, // 011F GETMBR R10 R5 K77
+ 0x882C0B1F, // 0120 GETMBR R11 R5 K31
+ 0x7C200600, // 0121 CALL R8 3
+ 0x90123C08, // 0122 SETMBR R4 K30 R8
+ 0x4C240000, // 0123 LDNIL R9
+ 0x1C240809, // 0124 EQ R9 R4 R9
+ 0x74260003, // 0125 JMPT R9 #012A
+ 0x8824091E, // 0126 GETMBR R9 R4 K30
+ 0x4C280000, // 0127 LDNIL R10
+ 0x1C24120A, // 0128 EQ R9 R9 R10
+ 0x7826000D, // 0129 JMPF R9 #0138
+ 0xB8260E00, // 012A GETNGBL R9 K7
+ 0x8C241308, // 012B GETMET R9 R9 K8
+ 0x582C004E, // 012C LDCONST R11 K78
+ 0x5830000A, // 012D LDCONST R12 K10
+ 0x7C240600, // 012E CALL R9 3
+ 0x8C24010B, // 012F GETMET R9 R0 K11
+ 0x5C2C0200, // 0130 MOVE R11 R1
+ 0x5830000C, // 0131 LDCONST R12 K12
+ 0x58340005, // 0132 LDCONST R13 K5
+ 0x5838000C, // 0133 LDCONST R14 K12
+ 0x503C0000, // 0134 LDBOOL R15 0 0
+ 0x7C240C00, // 0135 CALL R9 6
+ 0x50240000, // 0136 LDBOOL R9 0 0
+ 0x80041200, // 0137 RET 1 R9
+ 0x8824032B, // 0138 GETMBR R9 R1 K43
+ 0x90125409, // 0139 SETMBR R4 K42 R9
+ 0x8C24092C, // 013A GETMET R9 R4 K44
+ 0x7C240200, // 013B CALL R9 1
+ 0x88240B2E, // 013C GETMBR R9 R5 K46
+ 0x90125A09, // 013D SETMBR R4 K45 R9
+ 0x8824011A, // 013E GETMBR R9 R0 K26
+ 0x8824131B, // 013F GETMBR R9 R9 K27
+ 0x8C241330, // 0140 GETMET R9 R9 K48
+ 0x7C240200, // 0141 CALL R9 1
+ 0x90125E09, // 0142 SETMBR R4 K47 R9
+ 0xB8260E00, // 0143 GETNGBL R9 K7
+ 0x8C241308, // 0144 GETMET R9 R9 K8
+ 0x8C2C0712, // 0145 GETMET R11 R3 K18
+ 0x58340031, // 0146 LDCONST R13 K49
+ 0x8838092F, // 0147 GETMBR R14 R4 K47
+ 0x883C0332, // 0148 GETMBR R15 R1 K50
+ 0x88400333, // 0149 GETMBR R16 R1 K51
+ 0x7C2C0A00, // 014A CALL R11 5
+ 0x5830000A, // 014B LDCONST R12 K10
+ 0x7C240600, // 014C CALL R9 3
+ 0xB8260E00, // 014D GETNGBL R9 K7
+ 0x8C241308, // 014E GETMET R9 R9 K8
+ 0xB82E1A00, // 014F GETNGBL R11 K13
+ 0x8C2C1714, // 0150 GETMET R11 R11 K20
+ 0x8834091E, // 0151 GETMBR R13 R4 K30
+ 0x7C2C0400, // 0152 CALL R11 2
+ 0x002E9E0B, // 0153 ADD R11 K79 R11
+ 0x54320003, // 0154 LDINT R12 4
+ 0x7C240600, // 0155 CALL R9 3
+ 0xB8260E00, // 0156 GETNGBL R9 K7
+ 0x8C241308, // 0157 GETMET R9 R9 K8
+ 0x882C091E, // 0158 GETMBR R11 R4 K30
+ 0x882C1751, // 0159 GETMBR R11 R11 K81
+ 0x8C2C1752, // 015A GETMET R11 R11 K82
+ 0x7C2C0200, // 015B CALL R11 1
+ 0x002EA00B, // 015C ADD R11 K80 R11
+ 0x54320003, // 015D LDINT R12 4
+ 0x7C240600, // 015E CALL R9 3
+ 0xB8260E00, // 015F GETNGBL R9 K7
+ 0x8C241308, // 0160 GETMET R9 R9 K8
+ 0x882C091E, // 0161 GETMBR R11 R4 K30
+ 0x882C1754, // 0162 GETMBR R11 R11 K84
+ 0x8C2C1752, // 0163 GETMET R11 R11 K82
+ 0x7C2C0200, // 0164 CALL R11 1
+ 0x002EA60B, // 0165 ADD R11 K83 R11
+ 0x54320003, // 0166 LDINT R12 4
+ 0x7C240600, // 0167 CALL R9 3
+ 0x8824091E, // 0168 GETMBR R9 R4 K30
+ 0x8C241355, // 0169 GETMET R9 R9 K85
+ 0x7C240200, // 016A CALL R9 1
+ 0x78260009, // 016B JMPF R9 #0176
+ 0xB8260E00, // 016C GETNGBL R9 K7
+ 0x8C241308, // 016D GETMET R9 R9 K8
+ 0x882C091E, // 016E GETMBR R11 R4 K30
+ 0x8C2C1755, // 016F GETMET R11 R11 K85
+ 0x7C2C0200, // 0170 CALL R11 1
+ 0x8C2C1752, // 0171 GETMET R11 R11 K82
+ 0x7C2C0200, // 0172 CALL R11 1
+ 0x002EAC0B, // 0173 ADD R11 K86 R11
+ 0x54320003, // 0174 LDINT R12 4
+ 0x7C240600, // 0175 CALL R9 3
+ 0xB8260E00, // 0176 GETNGBL R9 K7
+ 0x8C241308, // 0177 GETMET R9 R9 K8
+ 0x882C091E, // 0178 GETMBR R11 R4 K30
+ 0x882C1758, // 0179 GETMBR R11 R11 K88
+ 0x8C2C1752, // 017A GETMET R11 R11 K82
+ 0x7C2C0200, // 017B CALL R11 1
+ 0x002EAE0B, // 017C ADD R11 K87 R11
+ 0x54320003, // 017D LDINT R12 4
+ 0x7C240600, // 017E CALL R9 3
+ 0x8C240535, // 017F GETMET R9 R2 K53
+ 0x542E000F, // 0180 LDINT R11 16
+ 0x7C240400, // 0181 CALL R9 2
+ 0x90126809, // 0182 SETMBR R4 K52 R9
+ 0x8C240535, // 0183 GETMET R9 R2 K53
+ 0x542E001F, // 0184 LDINT R11 32
+ 0x7C240400, // 0185 CALL R9 2
+ 0x9012B209, // 0186 SETMBR R4 K89 R9
+ 0x8C24055B, // 0187 GETMET R9 R2 K91
+ 0x7C240200, // 0188 CALL R9 1
+ 0x8C24135C, // 0189 GETMET R9 R9 K92
+ 0x882C0959, // 018A GETMBR R11 R4 K89
+ 0x7C240400, // 018B CALL R9 2
+ 0x9012B409, // 018C SETMBR R4 K90 R9
+ 0xB8260E00, // 018D GETNGBL R9 K7
+ 0x8C241308, // 018E GETMET R9 R9 K8
+ 0x882C0959, // 018F GETMBR R11 R4 K89
+ 0x8C2C1752, // 0190 GETMET R11 R11 K82
+ 0x7C2C0200, // 0191 CALL R11 1
+ 0x002EBA0B, // 0192 ADD R11 K93 R11
+ 0x54320003, // 0193 LDINT R12 4
+ 0x7C240600, // 0194 CALL R9 3
+ 0xB8260E00, // 0195 GETNGBL R9 K7
+ 0x8C241308, // 0196 GETMET R9 R9 K8
+ 0x882C095A, // 0197 GETMBR R11 R4 K90
+ 0x8C2C1752, // 0198 GETMET R11 R11 K82
+ 0x7C2C0200, // 0199 CALL R11 1
+ 0x002EBC0B, // 019A ADD R11 K94 R11
+ 0x54320003, // 019B LDINT R12 4
+ 0x7C240600, // 019C CALL R9 3
+ 0x8C240535, // 019D GETMET R9 R2 K53
+ 0x542E001F, // 019E LDINT R11 32
+ 0x7C240400, // 019F CALL R9 2
+ 0x8C28055B, // 01A0 GETMET R10 R2 K91
+ 0x7C280200, // 01A1 CALL R10 1
+ 0x8C28155F, // 01A2 GETMET R10 R10 K95
+ 0x88300959, // 01A3 GETMBR R12 R4 K89
+ 0x88340B16, // 01A4 GETMBR R13 R5 K22
+ 0x7C280600, // 01A5 CALL R10 3
+ 0x9012480A, // 01A6 SETMBR R4 K36 R10
+ 0xB82A1A00, // 01A7 GETNGBL R10 K13
+ 0x88281560, // 01A8 GETMBR R10 R10 K96
+ 0x8C281561, // 01A9 GETMET R10 R10 K97
+ 0x7C280200, // 01AA CALL R10 1
+ 0x8C2C1562, // 01AB GETMET R11 R10 K98
+ 0x5834000C, // 01AC LDCONST R13 K12
+ 0xB83A1A00, // 01AD GETNGBL R14 K13
+ 0x88381D60, // 01AE GETMBR R14 R14 K96
+ 0x88381D63, // 01AF GETMBR R14 R14 K99
+ 0x8C3C0964, // 01B0 GETMET R15 R4 K100
+ 0x7C3C0200, // 01B1 CALL R15 1
+ 0x7C2C0800, // 01B2 CALL R11 4
+ 0x8C2C1562, // 01B3 GETMET R11 R10 K98
+ 0x5834000A, // 01B4 LDCONST R13 K10
+ 0xB83A1A00, // 01B5 GETNGBL R14 K13
+ 0x88381D60, // 01B6 GETMBR R14 R14 K96
+ 0x88381D63, // 01B7 GETMBR R14 R14 K99
+ 0x8C3C0955, // 01B8 GETMET R15 R4 K85
+ 0x7C3C0200, // 01B9 CALL R15 1
+ 0x7C2C0800, // 01BA CALL R11 4
+ 0x8C2C1562, // 01BB GETMET R11 R10 K98
+ 0x58340065, // 01BC LDCONST R13 K101
+ 0xB83A1A00, // 01BD GETNGBL R14 K13
+ 0x88381D60, // 01BE GETMBR R14 R14 K96
+ 0x88381D63, // 01BF GETMBR R14 R14 K99
+ 0x883C095A, // 01C0 GETMBR R15 R4 K90
+ 0x7C2C0800, // 01C1 CALL R11 4
+ 0x8C2C1562, // 01C2 GETMET R11 R10 K98
+ 0x54360003, // 01C3 LDINT R13 4
+ 0xB83A1A00, // 01C4 GETNGBL R14 K13
+ 0x88381D60, // 01C5 GETMBR R14 R14 K96
+ 0x88381D63, // 01C6 GETMBR R14 R14 K99
+ 0x883C0B16, // 01C7 GETMBR R15 R5 K22
+ 0x7C2C0800, // 01C8 CALL R11 4
+ 0x8C2C055B, // 01C9 GETMET R11 R2 K91
+ 0x7C2C0200, // 01CA CALL R11 1
+ 0x8C2C1766, // 01CB GETMET R11 R11 K102
+ 0x8C340967, // 01CC GETMET R13 R4 K103
+ 0x7C340200, // 01CD CALL R13 1
+ 0x8C38153E, // 01CE GETMET R14 R10 K62
+ 0x7C380200, // 01CF CALL R14 1
+ 0x7C2C0600, // 01D0 CALL R11 3
+ 0xB8321A00, // 01D1 GETNGBL R12 K13
+ 0x88301960, // 01D2 GETMBR R12 R12 K96
+ 0x8C301961, // 01D3 GETMET R12 R12 K97
+ 0x7C300200, // 01D4 CALL R12 1
+ 0x8C341962, // 01D5 GETMET R13 R12 K98
+ 0x583C000C, // 01D6 LDCONST R15 K12
+ 0xB8421A00, // 01D7 GETNGBL R16 K13
+ 0x88402160, // 01D8 GETMBR R16 R16 K96
+ 0x88402163, // 01D9 GETMBR R16 R16 K99
+ 0x8C440964, // 01DA GETMET R17 R4 K100
+ 0x7C440200, // 01DB CALL R17 1
+ 0x7C340800, // 01DC CALL R13 4
+ 0x8C341962, // 01DD GETMET R13 R12 K98
+ 0x583C000A, // 01DE LDCONST R15 K10
+ 0xB8421A00, // 01DF GETNGBL R16 K13
+ 0x88402160, // 01E0 GETMBR R16 R16 K96
+ 0x88402163, // 01E1 GETMBR R16 R16 K99
+ 0x8C440955, // 01E2 GETMET R17 R4 K85
+ 0x7C440200, // 01E3 CALL R17 1
+ 0x7C340800, // 01E4 CALL R13 4
+ 0x8C341962, // 01E5 GETMET R13 R12 K98
+ 0x583C0065, // 01E6 LDCONST R15 K101
+ 0xB8421A00, // 01E7 GETNGBL R16 K13
+ 0x88402160, // 01E8 GETMBR R16 R16 K96
+ 0x88402163, // 01E9 GETMBR R16 R16 K99
+ 0x5C441600, // 01EA MOVE R17 R11
+ 0x7C340800, // 01EB CALL R13 4
+ 0x8C341962, // 01EC GETMET R13 R12 K98
+ 0x543E0003, // 01ED LDINT R15 4
+ 0xB8421A00, // 01EE GETNGBL R16 K13
+ 0x88402160, // 01EF GETMBR R16 R16 K96
+ 0x88402163, // 01F0 GETMBR R16 R16 K99
+ 0x88440934, // 01F1 GETMBR R17 R4 K52
+ 0x7C340800, // 01F2 CALL R13 4
+ 0x88340B68, // 01F3 GETMBR R13 R5 K104
+ 0x90127E0D, // 01F4 SETMBR R4 K63 R13
+ 0x8C340569, // 01F5 GETMET R13 R2 K105
+ 0x7C340200, // 01F6 CALL R13 1
+ 0x8C341B6A, // 01F7 GETMET R13 R13 K106
+ 0x883C093F, // 01F8 GETMBR R15 R4 K63
+ 0x7C340400, // 01F9 CALL R13 2
+ 0x8C341B6B, // 01FA GETMET R13 R13 K107
+ 0x7C340200, // 01FB CALL R13 1
+ 0x60380015, // 01FC GETGBL R14 G21
+ 0x7C380000, // 01FD CALL R14 0
+ 0x8C381D20, // 01FE GETMET R14 R14 K32
+ 0x8840016C, // 01FF GETMBR R16 R0 K108
+ 0x7C380400, // 0200 CALL R14 2
+ 0x8C3C096D, // 0201 GETMET R15 R4 K109
+ 0x7C3C0200, // 0202 CALL R15 1
+ 0x003C1E09, // 0203 ADD R15 R15 R9
+ 0x8840095A, // 0204 GETMBR R16 R4 K90
+ 0x003C1E10, // 0205 ADD R15 R15 R16
+ 0x003C1E0D, // 0206 ADD R15 R15 R13
+ 0x8C400522, // 0207 GETMET R16 R2 K34
+ 0x7C400200, // 0208 CALL R16 1
+ 0x8C402123, // 0209 GETMET R16 R16 K35
+ 0x88480924, // 020A GETMBR R18 R4 K36
+ 0x5C4C1E00, // 020B MOVE R19 R15
+ 0x5C501C00, // 020C MOVE R20 R14
+ 0x5456000F, // 020D LDINT R21 16
+ 0x7C400A00, // 020E CALL R16 5
+ 0x8C44193E, // 020F GETMET R17 R12 K62
+ 0x7C440200, // 0210 CALL R17 1
+ 0x8C480527, // 0211 GETMET R18 R2 K39
+ 0x5C502000, // 0212 MOVE R20 R16
+ 0x60540015, // 0213 GETGBL R21 G21
+ 0x7C540000, // 0214 CALL R21 0
+ 0x8C542B20, // 0215 GETMET R21 R21 K32
+ 0x885C016E, // 0216 GETMBR R23 R0 K110
+ 0x7C540400, // 0217 CALL R21 2
+ 0x60580015, // 0218 GETGBL R22 G21
+ 0x7C580000, // 0219 CALL R22 0
+ 0x605C000C, // 021A GETGBL R23 G12
+ 0x5C602200, // 021B MOVE R24 R17
+ 0x7C5C0200, // 021C CALL R23 1
+ 0x5462000F, // 021D LDINT R24 16
+ 0x7C480C00, // 021E CALL R18 6
+ 0x8C4C256F, // 021F GETMET R19 R18 K111
+ 0x5C542200, // 0220 MOVE R21 R17
+ 0x7C4C0400, // 0221 CALL R19 2
+ 0x8C502529, // 0222 GETMET R20 R18 K41
+ 0x7C500200, // 0223 CALL R20 1
+ 0x004C2614, // 0224 ADD R19 R19 R20
+ 0xB8521A00, // 0225 GETNGBL R20 K13
+ 0x8C502970, // 0226 GETMET R20 R20 K112
+ 0x7C500200, // 0227 CALL R20 1
+ 0x9052E209, // 0228 SETMBR R20 K113 R9
+ 0x8854092F, // 0229 GETMBR R21 R4 K47
+ 0x9052E415, // 022A SETMBR R20 K114 R21
+ 0x8854095A, // 022B GETMBR R21 R4 K90
+ 0x9052E615, // 022C SETMBR R20 K115 R21
+ 0x9052E813, // 022D SETMBR R20 K116 R19
+ 0x8C54293E, // 022E GETMET R21 R20 K62
+ 0x7C540200, // 022F CALL R21 1
+ 0x9012EA15, // 0230 SETMBR R4 K117 R21
+ 0x8C580340, // 0231 GETMET R22 R1 K64
+ 0x54620030, // 0232 LDINT R24 49
+ 0x50640200, // 0233 LDBOOL R25 1 0
+ 0x7C580600, // 0234 CALL R22 3
+ 0x8C5C2D41, // 0235 GETMET R23 R22 K65
+ 0x5C642A00, // 0236 MOVE R25 R21
+ 0x7C5C0400, // 0237 CALL R23 2
+ 0x88600142, // 0238 GETMBR R24 R0 K66
+ 0x8C603143, // 0239 GETMET R24 R24 K67
+ 0x5C682C00, // 023A MOVE R26 R22
+ 0x7C600400, // 023B CALL R24 2
+ 0x50600200, // 023C LDBOOL R24 1 0
+ 0x80043000, // 023D RET 1 R24
+ 0x50200200, // 023E LDBOOL R8 1 0
+ 0x80041000, // 023F RET 1 R8
})
)
);
From c33472d9b63f93b0fb425bf6014eefe2a9fd7419 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Thu, 27 Apr 2023 14:19:27 +0200
Subject: [PATCH 046/289] ArduinoOTA support only ESP8266 (#18528)
* ArduinoOTA support only ESP8266
* add comment ArduinoOTA
---
tasmota/my_user_config.h | 2 +-
tasmota/tasmota_support/support_tasmota.ino | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index a246126ab..83c450db6 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -398,7 +398,7 @@
//#define USE_TASMESH // Enable Tasmota Mesh using ESP-NOW (+11k code)
// -- OTA -----------------------------------------
-//#define USE_ARDUINO_OTA // Add optional support for Arduino OTA (+13k code)
+//#define USE_ARDUINO_OTA // Add optional support for Arduino OTA with ESP8266 (+13k code)
// -- Influxdb ------------------------------------
//#define USE_INFLUXDB // Enable influxdb support (+5k code)
diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino
index 09ffc5f73..955f52816 100644
--- a/tasmota/tasmota_support/support_tasmota.ino
+++ b/tasmota/tasmota_support/support_tasmota.ino
@@ -1638,7 +1638,7 @@ void Every250mSeconds(void)
}
}
-#ifdef USE_ARDUINO_OTA
+#if defined(ESP8266) && defined(USE_ARDUINO_OTA)
/*********************************************************************************************\
* Allow updating via the Arduino OTA-protocol.
*
From 53bd49ddcd0164947e7432e3528596f6649df8ef Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Thu, 27 Apr 2023 16:35:47 +0200
Subject: [PATCH 047/289] Remove USE_ARDUINO_OTA from ESP32
---
tasmota/tasmota.ino | 6 ++++++
tasmota/tasmota_support/support_tasmota.ino | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino
index ec4a65f08..8e98f8002 100644
--- a/tasmota/tasmota.ino
+++ b/tasmota/tasmota.ino
@@ -53,12 +53,14 @@
#include
#include
#include
+#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
#include // Arduino OTA
#ifndef USE_DISCOVERY
#define USE_DISCOVERY
#endif
#endif // USE_ARDUINO_OTA
+#endif // ESP8266
#ifdef USE_DISCOVERY
#include // MQTT, Webserver, Arduino OTA
#endif // USE_DISCOVERY
@@ -642,9 +644,11 @@ void setup(void) {
AddLog(LOG_LEVEL_INFO, PSTR(D_WARNING_MINIMAL_VERSION));
#endif // FIRMWARE_MINIMAL
+#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
ArduinoOTAInit();
#endif // USE_ARDUINO_OTA
+#endif // ESP8266
XdrvXsnsCall(FUNC_INIT); // FUNC_INIT
#ifdef USE_SCRIPT
@@ -757,9 +761,11 @@ void Scheduler(void) {
if (!tasconsole_serial) { TasConsoleInput(); }
#endif // ESP32
+#ifdef ESP8266
#ifdef USE_ARDUINO_OTA
ArduinoOtaLoop();
#endif // USE_ARDUINO_OTA
+#endif // ESP8266
}
void loop(void) {
diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino
index 955f52816..c3cec04fd 100644
--- a/tasmota/tasmota_support/support_tasmota.ino
+++ b/tasmota/tasmota_support/support_tasmota.ino
@@ -1638,7 +1638,8 @@ void Every250mSeconds(void)
}
}
-#if defined(ESP8266) && defined(USE_ARDUINO_OTA)
+#ifdef ESP8266
+#ifdef USE_ARDUINO_OTA
/*********************************************************************************************\
* Allow updating via the Arduino OTA-protocol.
*
@@ -1721,6 +1722,7 @@ void ArduinoOtaLoop(void)
while (arduino_ota_triggered) { ArduinoOTA.handle(); }
}
#endif // USE_ARDUINO_OTA
+#endif // ESP8266
/********************************************************************************************/
From f86bc7d8ab612588bde1b8976696a0cf9a455b29 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Thu, 27 Apr 2023 17:44:33 +0200
Subject: [PATCH 048/289] Prep GM861
---
tasmota/include/tasmota_template.h | 6 ++++++
tasmota/language/af_AF.h | 2 ++
tasmota/language/bg_BG.h | 2 ++
tasmota/language/ca_AD.h | 2 ++
tasmota/language/cs_CZ.h | 2 ++
tasmota/language/de_DE.h | 2 ++
tasmota/language/el_GR.h | 2 ++
tasmota/language/en_GB.h | 5 ++++-
tasmota/language/es_ES.h | 2 ++
tasmota/language/fr_FR.h | 2 ++
tasmota/language/fy_NL.h | 2 ++
tasmota/language/he_HE.h | 2 ++
tasmota/language/hu_HU.h | 2 ++
tasmota/language/it_IT.h | 2 ++
tasmota/language/ko_KO.h | 2 ++
tasmota/language/nl_NL.h | 2 ++
tasmota/language/pl_PL.h | 2 ++
tasmota/language/pt_BR.h | 2 ++
tasmota/language/pt_PT.h | 2 ++
tasmota/language/ro_RO.h | 2 ++
tasmota/language/ru_RU.h | 2 ++
tasmota/language/sk_SK.h | 2 ++
tasmota/language/sv_SE.h | 2 ++
tasmota/language/tr_TR.h | 2 ++
tasmota/language/uk_UA.h | 2 ++
tasmota/language/vi_VN.h | 2 ++
tasmota/language/zh_CN.h | 2 ++
tasmota/language/zh_TW.h | 2 ++
28 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/tasmota/include/tasmota_template.h b/tasmota/include/tasmota_template.h
index 53570e3c9..15ac3d198 100644
--- a/tasmota/include/tasmota_template.h
+++ b/tasmota/include/tasmota_template.h
@@ -209,6 +209,7 @@ enum UserSelectablePins {
GPIO_MCP23XXX_INT, GPIO_MCP23SXX_CS, // MCP23xxx Int and SPI Chip select
GPIO_PCF8574_INT, // PCF8574 interrupt
GPIO_LOX_O2_RX, // LOX-O2 RX
+ GPIO_GM861_TX, GPIO_GM861_RX, // GM861 Serial interface
GPIO_SENSOR_END };
// Error as warning to rethink GPIO usage with max 2045
@@ -465,6 +466,7 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_MCP23XXX_INT "|" D_SENSOR_MCP23SXX_CS "|"
D_SENSOR_PCF8574_INT "|"
D_SENSOR_LOX_O2_RX "|"
+ D_SENSOR_GM861_TX "|" D_SENSOR_GM861_RX "|"
;
const char kSensorNamesFixed[] PROGMEM =
@@ -1016,6 +1018,10 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_AS608_TX),
AGPIO(GPIO_AS608_RX),
#endif
+#ifdef USE_GM861 // xsns_107_gm861.ino
+ AGPIO(GPIO_GM861_TX),
+ AGPIO(GPIO_GM861_RX),
+#endif
#ifdef USE_HRG15 // xsns_90_hrg15.ino
AGPIO(GPIO_HRG15_TX),
AGPIO(GPIO_HRG15_RX),
diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h
index 9e3bd4c85..b4b1cfed8 100644
--- a/tasmota/language/af_AF.h
+++ b/tasmota/language/af_AF.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index c3cbbc090..7ed573c10 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/ca_AD.h b/tasmota/language/ca_AD.h
index 9a4b04e36..f82f4d619 100644
--- a/tasmota/language/ca_AD.h
+++ b/tasmota/language/ca_AD.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Sortida baixa"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h
index d0afa8994..261396243 100644
--- a/tasmota/language/cs_CZ.h
+++ b/tasmota/language/cs_CZ.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h
index cee4dcf77..8135fd778 100644
--- a/tasmota/language/de_DE.h
+++ b/tasmota/language/de_DE.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h
index cd4943ae5..86fdbc4e0 100644
--- a/tasmota/language/el_GR.h
+++ b/tasmota/language/el_GR.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h
index b3aafeda2..a322b71c5 100644
--- a/tasmota/language/en_GB.h
+++ b/tasmota/language/en_GB.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
@@ -1190,7 +1192,8 @@
#define D_NEOPOOL_PUMP_TIME_EXCEEDED "pump time exceeded"
// xsns_106_gdk101.ino
-#define D_AVG_RAD_DOSE "Average Radiation Dose"
+//#define D_AVG_RAD_DOSE "Average Radiation Dose"
+#define D_AVG_RAD_DOSE "Radiation"
#define D_UNIT_US_H "µSv/h"
#endif // _LANGUAGE_EN_GB_H_
diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h
index fa98fe4c2..740912dd6 100644
--- a/tasmota/language/es_ES.h
+++ b/tasmota/language/es_ES.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Fijo a OFF"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h
index 85e128b19..28de55477 100644
--- a/tasmota/language/fr_FR.h
+++ b/tasmota/language/fr_FR.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Sortie Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h
index b62305b8e..cf98979de 100644
--- a/tasmota/language/fy_NL.h
+++ b/tasmota/language/fy_NL.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h
index ca11fa22b..13e86a53f 100644
--- a/tasmota/language/he_HE.h
+++ b/tasmota/language/he_HE.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h
index 8b98a4001..3990ac173 100644
--- a/tasmota/language/hu_HU.h
+++ b/tasmota/language/hu_HU.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index 26d70715a..10ad33ea0 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -800,6 +800,8 @@
#define D_SENSOR_OUTPUT_LO "Uscita - Lo"
#define D_SENSOR_AS608_TX "AS608 - TX"
#define D_SENSOR_AS608_RX "AS608 - RX"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 - TX"
#define D_SENSOR_DDS2382_RX "DDS238-2 - RX"
#define D_SENSOR_DDSU666_TX "DDSU666 - TX"
diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h
index e7cb05063..7577e1399 100644
--- a/tasmota/language/ko_KO.h
+++ b/tasmota/language/ko_KO.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h
index 61f1e73ad..a645fdc71 100644
--- a/tasmota/language/nl_NL.h
+++ b/tasmota/language/nl_NL.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h
index fe9696836..e4fa104cb 100644
--- a/tasmota/language/pl_PL.h
+++ b/tasmota/language/pl_PL.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Wyjście Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h
index 6d761c635..81cb42864 100644
--- a/tasmota/language/pt_BR.h
+++ b/tasmota/language/pt_BR.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h
index 04062483d..b8c5f3986 100644
--- a/tasmota/language/pt_PT.h
+++ b/tasmota/language/pt_PT.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h
index cc61f7a62..57034470f 100644
--- a/tasmota/language/ro_RO.h
+++ b/tasmota/language/ro_RO.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h
index be1bc68bb..3afd6b55f 100644
--- a/tasmota/language/ru_RU.h
+++ b/tasmota/language/ru_RU.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h
index e4adf2d20..61b253e19 100644
--- a/tasmota/language/sk_SK.h
+++ b/tasmota/language/sk_SK.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h
index 2874e4f7f..b398d0b06 100644
--- a/tasmota/language/sv_SE.h
+++ b/tasmota/language/sv_SE.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h
index ed0bfd4f3..c7c14ee28 100644
--- a/tasmota/language/tr_TR.h
+++ b/tasmota/language/tr_TR.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h
index 6f77a9267..0063ed1be 100644
--- a/tasmota/language/uk_UA.h
+++ b/tasmota/language/uk_UA.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h
index 8dede81a6..08204fff6 100644
--- a/tasmota/language/vi_VN.h
+++ b/tasmota/language/vi_VN.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h
index 4dac8796f..cd0880c0c 100644
--- a/tasmota/language/zh_CN.h
+++ b/tasmota/language/zh_CN.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h
index 6e3689ab4..6ae065861 100644
--- a/tasmota/language/zh_TW.h
+++ b/tasmota/language/zh_TW.h
@@ -802,6 +802,8 @@
#define D_SENSOR_OUTPUT_LO "Output Lo"
#define D_SENSOR_AS608_TX "AS608 Tx"
#define D_SENSOR_AS608_RX "AS608 Rx"
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define D_SENSOR_GM861_RX "GM861 Rx"
#define D_SENSOR_DDS2382_TX "DDS238-2 Tx"
#define D_SENSOR_DDS2382_RX "DDS238-2 Rx"
#define D_SENSOR_DDSU666_TX "DDSU666 Tx"
From d206de52f11780264cc5401ae5173fbc1ff0955d Mon Sep 17 00:00:00 2001
From: bovirus <1262554+bovirus@users.noreply.github.com>
Date: Thu, 27 Apr 2023 23:38:46 -0700
Subject: [PATCH 049/289] Italian language update (#18531)
---
tasmota/language/it_IT.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index 10ad33ea0..247ea5e1f 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -28,7 +28,7 @@
* Use online command StateText to translate ON, OFF, HOLD and TOGGLE.
* Use online command Prefix to translate cmnd, stat and tele.
*
- * Updated until v9.4.0.1 - Last update 15.04.2023
+ * Updated until v9.4.0.1 - Last update 28.04.2023
\*********************************************************************/
#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English)
@@ -800,8 +800,8 @@
#define D_SENSOR_OUTPUT_LO "Uscita - Lo"
#define D_SENSOR_AS608_TX "AS608 - TX"
#define D_SENSOR_AS608_RX "AS608 - RX"
-#define D_SENSOR_GM861_TX "GM861 Tx"
-#define D_SENSOR_GM861_RX "GM861 Rx"
+#define D_SENSOR_GM861_TX "GM861 - TX"
+#define D_SENSOR_GM861_RX "GM861 - RX"
#define D_SENSOR_DDS2382_TX "DDS238-2 - TX"
#define D_SENSOR_DDS2382_RX "DDS238-2 - RX"
#define D_SENSOR_DDSU666_TX "DDSU666 - TX"
From 17d1d7f5fae6e079d69cc91d55bd920c5c5e276c Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Fri, 28 Apr 2023 17:33:12 +0200
Subject: [PATCH 050/289] Update xdrv_68_zerocrossDimmer.ino (#18532)
---
tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
index 890b3bb3b..060899c49 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
@@ -83,7 +83,7 @@ void IRAM_ATTR ACDimmerZeroCross(uint32_t time) {
uint32_t IRAM_ATTR ACDimmerTimer_intr_ESP8266() {
//ACDimmerTimer_intr();
ACDimmerTimer_intr();
- return 4000;
+ return 6000;
}
void ACDimmerInterruptDisable(bool disable)
From 1d0c19311d9e735355d772f8be7d6b9bc1c484a5 Mon Sep 17 00:00:00 2001
From: Tim L
Date: Sat, 29 Apr 2023 22:45:10 +1000
Subject: [PATCH 051/289] Add support for WT32_SC01 Plus display (#18538)
---
tasmota/displaydesc/WT32_SC01_Plus.ini | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 tasmota/displaydesc/WT32_SC01_Plus.ini
diff --git a/tasmota/displaydesc/WT32_SC01_Plus.ini b/tasmota/displaydesc/WT32_SC01_Plus.ini
new file mode 100644
index 000000000..438141c08
--- /dev/null
+++ b/tasmota/displaydesc/WT32_SC01_Plus.ini
@@ -0,0 +1,20 @@
+:H,ST7796U,480,320,16,PAR,8,4,-1,0,47,-1,45,9,46,3,8,18,17,16,15,20
+:I
+01,A0
+11,A0
+3A,81,55
+36,81,00
+21,80
+13,80
+29,A0
+:o,28
+:O,29
+:A,2A,2B,2C
+:R,36
+:0,28,00,00,01
+:1,88,00,00,02
+:2,E8,00,00,03
+:3,48,00,00,00
+:i,20,21
+:TI1,38,5,6,7,4
+#
From c5612a50fb85bcffe84b2ebcde3caafb334bc4fc Mon Sep 17 00:00:00 2001
From: Jeroen
Date: Sat, 29 Apr 2023 14:46:38 +0200
Subject: [PATCH 052/289] Fix for
https://github.com/arendst/Tasmota/discussions/15703#discussioncomment-5713294
(#18534)
Added and fixed comments
Co-authored-by: JeroenSt
---
.../TasmotaModbus-3.6.0/src/TasmotaModbus.cpp | 3 +-
.../xdrv_63_modbus_bridge.ino | 67 ++++++++++---------
2 files changed, 36 insertions(+), 34 deletions(-)
diff --git a/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp b/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp
index e9ab03ffa..2e2fef4f8 100644
--- a/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp
+++ b/lib/lib_basic/TasmotaModbus-3.6.0/src/TasmotaModbus.cpp
@@ -200,7 +200,8 @@ uint8_t TasmotaModbus::ReceiveBuffer(uint8_t *buffer, uint8_t register_count, ui
} else {
buffer[mb_len++] = data;
if (3 == mb_len) {
- if ((buffer[1] == 5) || (buffer[1] == 6) || (buffer[1] == 15) || (buffer[1] == 16)) header_length = 4; // Addr, Func, StartAddr
+ // If functioncode is 5,6,15 or 16 the header length is 4 instead of 3
+ if ((buffer[1] == 5) || (buffer[1] == 6) || (buffer[1] == 15) || (buffer[1] == 16)) header_length = 4;
}
}
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
index 570cf7049..0bd488981 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_63_modbus_bridge.ino
@@ -163,13 +163,13 @@ struct ModbusBridge
ModbusBridgeFunctionCode functionCode = ModbusBridgeFunctionCode::mb_undefined;
ModbusBridgeType type = ModbusBridgeType::mb_undefined;
- uint16_t dataCount = 0;
- uint16_t byteCount = 0;
- uint16_t startAddress = 0;
- uint8_t deviceAddress = 0;
- uint8_t count = 0;
+ uint16_t dataCount = 0; // Number of bits or registers to read/write
+ uint16_t byteCount = 0; // Number of bytes to read/write
+ uint16_t startAddress = 0; // First address to read/write
+ uint8_t deviceAddress = 0; // Modbus address of device to read
+ uint8_t count = 0; // Number of values to read / write
bool raw = false;
- uint8_t *buffer = nullptr;
+ uint8_t *buffer = nullptr; // Buffer for storing read / write data
};
ModbusBridge modbusBridge;
@@ -240,7 +240,7 @@ void ModbusBridgeSetBaudrate(uint32_t baudrate)
/********************************************************************************************/
//
-// Handles data received from tasmota modbus wrapper and send this to (TCP or) MQTT client
+// Handles data received from tasmota modbus wrapper and send this to (TCP and/or) MQTT client
//
void ModbusBridgeHandle(void)
{
@@ -248,7 +248,7 @@ void ModbusBridgeHandle(void)
if (data_ready)
{
if (modbusBridge.byteCount == 0) modbusBridge.byteCount = modbusBridge.dataCount * 2;
- if (nullptr == modbusBridge.buffer)
+ if (nullptr == modbusBridge.buffer) // If buffer is not initialized do not process received data
{
ModbusBridgeAllocError(PSTR("read"));
modbusBridge.dataCount = 0;
@@ -256,7 +256,7 @@ void ModbusBridgeHandle(void)
return;
}
memset(modbusBridge.buffer, 0, MBR_RECEIVE_BUFFER_SIZE);
- uint32_t error = modbusBridgeModbus->ReceiveBuffer(modbusBridge.buffer, 0, modbusBridge.byteCount);
+ uint32_t error = modbusBridgeModbus->ReceiveBuffer(modbusBridge.buffer, 0, MBR_RECEIVE_BUFFER_SIZE - 9);
#ifdef USE_MODBUS_BRIDGE_TCP
for (uint32_t i = 0; i < nitems(modbusBridgeTCP.client_tcp); i++)
@@ -281,25 +281,16 @@ void ModbusBridgeHandle(void)
nrOfBytes += 1;
client.write(header, 9);
}
- else if (modbusBridge.buffer[1] <= 2)
- {
- header[4] = modbusBridge.byteCount >> 8;
- header[5] = modbusBridge.byteCount + 3;
- header[8] = modbusBridge.byteCount;
- client.write(header, 9);
- nrOfBytes += 1;
- client.write(modbusBridge.buffer + 3, modbusBridge.byteCount); // Don't send CRC
- nrOfBytes += modbusBridge.byteCount;
- }
else if (modbusBridge.buffer[1] <= 4)
{
- header[4] = modbusBridge.byteCount >> 8;
- header[5] = modbusBridge.byteCount + 3;
- header[8] = modbusBridge.byteCount;
+ uint8_t received_data_bytes = modbusBridgeModbus->ReceiveCount() - 5;
+ header[4] = received_data_bytes >> 8;
+ header[5] = received_data_bytes + 3;
+ header[8] = received_data_bytes;
client.write(header, 9);
nrOfBytes += 1;
- client.write(modbusBridge.buffer + 3, modbusBridge.byteCount); // Don't send CRC
- nrOfBytes += modbusBridge.byteCount;
+ client.write(modbusBridge.buffer + 3, received_data_bytes); // Don't send CRC
+ nrOfBytes += received_data_bytes;
}
else
{
@@ -343,20 +334,24 @@ void ModbusBridgeHandle(void)
errorcode = ModbusBridgeError::wrongfunctioncode;
else if ((uint8_t)modbusBridge.functionCode < 5)
{
+ // Do not check buffer[2] but received bytes for correct length but use the nr of received bytes
+ uint8_t received_data_bytes = modbusBridgeModbus->ReceiveCount() - 5;
+
if ((uint8_t)modbusBridge.functionCode < 3)
{
- if ((uint8_t)(((modbusBridge.dataCount - 1) >> 3) + 1) != (uint8_t)modbusBridge.buffer[2])
+ // Check if returned number of bits matches the requested number of bits
+ if ((uint8_t)(((modbusBridge.dataCount - 1) >> 3) + 1) > received_data_bytes)
errorcode = ModbusBridgeError::wrongdataCount;
}
else
{
- if ((modbusBridge.type == ModbusBridgeType::mb_int8 || modbusBridge.type == ModbusBridgeType::mb_uint8) && ((uint8_t)modbusBridge.dataCount * 2 != (uint8_t)modbusBridge.buffer[2]))
+ if ((modbusBridge.type == ModbusBridgeType::mb_int8 || modbusBridge.type == ModbusBridgeType::mb_uint8) && ((uint8_t)modbusBridge.dataCount > received_data_bytes))
errorcode = ModbusBridgeError::wrongdataCount;
- else if ((modbusBridge.type == ModbusBridgeType::mb_bit) && ((uint8_t)modbusBridge.dataCount * 2 != (uint8_t)modbusBridge.buffer[2]))
+ else if ((modbusBridge.type == ModbusBridgeType::mb_bit) && ((uint8_t)modbusBridge.dataCount > received_data_bytes))
errorcode = ModbusBridgeError::wrongdataCount;
- else if ((modbusBridge.type == ModbusBridgeType::mb_int16 || modbusBridge.type == ModbusBridgeType::mb_uint16) && ((uint8_t)modbusBridge.dataCount * 2 != (uint8_t)modbusBridge.buffer[2]))
+ else if ((modbusBridge.type == ModbusBridgeType::mb_int16 || modbusBridge.type == ModbusBridgeType::mb_uint16) && ((uint8_t)modbusBridge.dataCount > received_data_bytes))
errorcode = ModbusBridgeError::wrongdataCount;
- else if ((modbusBridge.type == ModbusBridgeType::mb_int32 || modbusBridge.type == ModbusBridgeType::mb_uint32 || modbusBridge.type == ModbusBridgeType::mb_float) && ((uint8_t)modbusBridge.dataCount * 2 != (uint8_t)modbusBridge.buffer[2]))
+ else if ((modbusBridge.type == ModbusBridgeType::mb_int32 || modbusBridge.type == ModbusBridgeType::mb_uint32 || modbusBridge.type == ModbusBridgeType::mb_float) && ((uint8_t)modbusBridge.dataCount > received_data_bytes))
errorcode = ModbusBridgeError::wrongdataCount;
}
}
@@ -364,6 +359,7 @@ void ModbusBridgeHandle(void)
{
if (modbusBridge.type == ModbusBridgeType::mb_raw)
{
+ // Ouput raw data as decimal bytes
Response_P(PSTR("{\"" D_JSON_MODBUS_RECEIVED "\":{\"RAW\":["));
for (uint8_t i = 0; i < modbusBridgeModbus->ReceiveCount(); i++)
{
@@ -377,6 +373,7 @@ void ModbusBridgeHandle(void)
}
else if (modbusBridge.type == ModbusBridgeType::mb_hex)
{
+ // Output raw data as hexadecimal bytes
Response_P(PSTR("{\"" D_JSON_MODBUS_RECEIVED "\":{\"HEX\":["));
for (uint8_t i = 0; i < modbusBridgeModbus->ReceiveCount(); i++)
{
@@ -388,8 +385,9 @@ void ModbusBridgeHandle(void)
ResponseJsonEnd();
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_TELE, PSTR(D_JSON_MODBUS_RECEIVED));
}
- else if ((modbusBridge.buffer[1] > 0) && (modbusBridge.buffer[1] < 7)) // Read Registers
+ else if ((modbusBridge.buffer[1] > 0) && (modbusBridge.buffer[1] < 7))
{
+ // Read and process Registers
uint8_t dataOffset = 3;
Response_P(PSTR("{\"" D_JSON_MODBUS_RECEIVED "\":{"));
ResponseAppend_P(PSTR("\"" D_JSON_MODBUS_DEVICE_ADDRESS "\":%d,"), modbusBridge.buffer[0]);
@@ -410,6 +408,7 @@ void ModbusBridgeHandle(void)
uint8_t data_count = modbusBridge.count;
if ((uint8_t)modbusBridge.functionCode < 3)
{
+ // Calculate number of values to return in bitmode
if (modbusBridge.type == ModbusBridgeType::mb_int8 || modbusBridge.type == ModbusBridgeType::mb_uint8)
data_count = (uint8_t)(((modbusBridge.count - 1) >> 3) + 1);
else if (modbusBridge.type == ModbusBridgeType::mb_int16 || modbusBridge.type == ModbusBridgeType::mb_uint16)
@@ -426,7 +425,7 @@ void ModbusBridgeHandle(void)
float value = 0;
if (modbusBridge.buffer[1] < 3)
{
- // In bit mode only convert returned bytes
+ // In bit mode only convert returned bits to values
if (modbusBridge.buffer[2] - (count * 4))
((uint8_t *)&value)[0] = modbusBridge.buffer[dataOffset + (count * 4)]; // Get float values
if ((modbusBridge.buffer[2] - (count * 4)) >> 1)
@@ -468,6 +467,7 @@ void ModbusBridgeHandle(void)
uint32_t value = 0;
if (modbusBridge.buffer[1] < 3)
{
+ // In bit mode only convert returned bits to values
if (modbusBridge.buffer[2] - (count * 4))
((uint8_t *)&value)[0] = modbusBridge.buffer[dataOffset + (count * 4)]; // Get uint values
if (modbusBridge.buffer[2] - ((count * 4) - 1))
@@ -495,6 +495,7 @@ void ModbusBridgeHandle(void)
uint16_t value = 0;
if (modbusBridge.buffer[1] < 3)
{
+ // In bit mode only convert returned bits to values
if (modbusBridge.buffer[2] - (count * 2))
((uint8_t *)&value)[0] = modbusBridge.buffer[dataOffset + (count * 2)];
if (modbusBridge.buffer[2] - ((count * 2) - 1))
@@ -747,10 +748,10 @@ void CmndModbusBridgeSend(void)
modbusBridge.startAddress = root.getULong(PSTR(D_JSON_MODBUS_START_ADDRESS), 0);
const char *stype = root.getStr(PSTR(D_JSON_MODBUS_TYPE), "uint8");
- modbusBridge.count = root.getUInt(PSTR(D_JSON_MODBUS_COUNT), 1); // Number of bits or bytes to read / write
+ modbusBridge.count = root.getUInt(PSTR(D_JSON_MODBUS_COUNT), 1); // Number of values to read / write
// If functioncode is 1, 2 or 15, the count is not the number of registers but the number
- // of bit to read or write, so calculate the number data bytes to read/write.
+ // of bits to read or write, so calculate the number data bytes to read/write.
if ((functionCode == 1) || (functionCode == 2) || (functionCode == 15)) bitMode = true;
if (modbusBridge.deviceAddress == 0)
From 616652ea224cba0c33bfeff0434e9781f377d868 Mon Sep 17 00:00:00 2001
From: Jeroen
Date: Mon, 1 May 2023 14:51:02 +0200
Subject: [PATCH 053/289] Added support for Dingtian Relay Board v3.6.10
(#18535)
* Added support for Dingtian Relay Board v3.6.10
* Output OE was never initialized
* Removed white spaces trying to fix language builds
* Fix for https://github.com/arendst/Tasmota/pull/18535#pullrequestreview-1406978097
* Fixed language builds
---------
Co-authored-by: JeroenSt
---
tasmota/include/tasmota_template.h | 3 ++
tasmota/language/af_AF.h | 1 +
tasmota/language/bg_BG.h | 1 +
tasmota/language/ca_AD.h | 1 +
tasmota/language/cs_CZ.h | 1 +
tasmota/language/de_DE.h | 1 +
tasmota/language/el_GR.h | 1 +
tasmota/language/en_GB.h | 1 +
tasmota/language/es_ES.h | 1 +
tasmota/language/fr_FR.h | 1 +
tasmota/language/fy_NL.h | 1 +
tasmota/language/he_HE.h | 1 +
tasmota/language/hu_HU.h | 1 +
tasmota/language/it_IT.h | 1 +
tasmota/language/ko_KO.h | 1 +
tasmota/language/nl_NL.h | 1 +
tasmota/language/pl_PL.h | 1 +
tasmota/language/pt_BR.h | 1 +
tasmota/language/pt_PT.h | 1 +
tasmota/language/ro_RO.h | 1 +
tasmota/language/ru_RU.h | 1 +
tasmota/language/sk_SK.h | 1 +
tasmota/language/sv_SE.h | 1 +
tasmota/language/tr_TR.h | 1 +
tasmota/language/uk_UA.h | 1 +
tasmota/language/vi_VN.h | 1 +
tasmota/language/zh_CN.h | 1 +
tasmota/language/zh_TW.h | 1 +
.../xdrv_90_esp32_dingtian_relay.ino | 48 +++++++++++--------
29 files changed, 59 insertions(+), 19 deletions(-)
diff --git a/tasmota/include/tasmota_template.h b/tasmota/include/tasmota_template.h
index 15ac3d198..009934be7 100644
--- a/tasmota/include/tasmota_template.h
+++ b/tasmota/include/tasmota_template.h
@@ -210,6 +210,7 @@ enum UserSelectablePins {
GPIO_PCF8574_INT, // PCF8574 interrupt
GPIO_LOX_O2_RX, // LOX-O2 RX
GPIO_GM861_TX, GPIO_GM861_RX, // GM861 Serial interface
+ GPIO_DINGTIAN_OE, // New version of Dingtian relay board where PL is not shared with OE
GPIO_SENSOR_END };
// Error as warning to rethink GPIO usage with max 2045
@@ -467,6 +468,7 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_PCF8574_INT "|"
D_SENSOR_LOX_O2_RX "|"
D_SENSOR_GM861_TX "|" D_SENSOR_GM861_RX "|"
+ D_GPIO_DINGTIAN_OE "|"
;
const char kSensorNamesFixed[] PROGMEM =
@@ -1121,6 +1123,7 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_DINGTIAN_SDI),
AGPIO(GPIO_DINGTIAN_Q7),
AGPIO(GPIO_DINGTIAN_PL),
+ AGPIO(GPIO_DINGTIAN_OE),
AGPIO(GPIO_DINGTIAN_RCK),
#endif
diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h
index b4b1cfed8..f63671846 100644
--- a/tasmota/language/af_AF.h
+++ b/tasmota/language/af_AF.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index 7ed573c10..672d88b93 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/ca_AD.h b/tasmota/language/ca_AD.h
index f82f4d619..277902023 100644
--- a/tasmota/language/ca_AD.h
+++ b/tasmota/language/ca_AD.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h
index 261396243..e42c875de 100644
--- a/tasmota/language/cs_CZ.h
+++ b/tasmota/language/cs_CZ.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h
index 8135fd778..408408245 100644
--- a/tasmota/language/de_DE.h
+++ b/tasmota/language/de_DE.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h
index 86fdbc4e0..a359d49dd 100644
--- a/tasmota/language/el_GR.h
+++ b/tasmota/language/el_GR.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h
index a322b71c5..b746c0634 100644
--- a/tasmota/language/en_GB.h
+++ b/tasmota/language/en_GB.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h
index 740912dd6..26dd59688 100644
--- a/tasmota/language/es_ES.h
+++ b/tasmota/language/es_ES.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h
index 28de55477..ae600b589 100644
--- a/tasmota/language/fr_FR.h
+++ b/tasmota/language/fr_FR.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCk"
#define D_SENSOR_CM11_TX "CM110x Tx"
#define D_SENSOR_CM11_RX "CM110x Rx"
diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h
index cf98979de..0ef74fdb6 100644
--- a/tasmota/language/fy_NL.h
+++ b/tasmota/language/fy_NL.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h
index 13e86a53f..c1d13b7bc 100644
--- a/tasmota/language/he_HE.h
+++ b/tasmota/language/he_HE.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h
index 3990ac173..71540307b 100644
--- a/tasmota/language/hu_HU.h
+++ b/tasmota/language/hu_HU.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index 247ea5e1f..2690363bb 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian - SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian - Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian - PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian - OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian - RCK"
#define D_SENSOR_CM11_TX "CM110x - TX"
#define D_SENSOR_CM11_RX "CM110x - RX"
diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h
index 7577e1399..4f941a3b8 100644
--- a/tasmota/language/ko_KO.h
+++ b/tasmota/language/ko_KO.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h
index a645fdc71..05f85db2b 100644
--- a/tasmota/language/nl_NL.h
+++ b/tasmota/language/nl_NL.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h
index e4fa104cb..4444de792 100644
--- a/tasmota/language/pl_PL.h
+++ b/tasmota/language/pl_PL.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h
index 81cb42864..ea04901c7 100644
--- a/tasmota/language/pt_BR.h
+++ b/tasmota/language/pt_BR.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h
index b8c5f3986..3377d7d72 100644
--- a/tasmota/language/pt_PT.h
+++ b/tasmota/language/pt_PT.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h
index 57034470f..c97bc649a 100644
--- a/tasmota/language/ro_RO.h
+++ b/tasmota/language/ro_RO.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h
index 3afd6b55f..6e9bbe95d 100644
--- a/tasmota/language/ru_RU.h
+++ b/tasmota/language/ru_RU.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h
index 61b253e19..679abff2e 100644
--- a/tasmota/language/sk_SK.h
+++ b/tasmota/language/sk_SK.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h
index b398d0b06..0c3c896fe 100644
--- a/tasmota/language/sv_SE.h
+++ b/tasmota/language/sv_SE.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h
index c7c14ee28..bc62a9ff5 100644
--- a/tasmota/language/tr_TR.h
+++ b/tasmota/language/tr_TR.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h
index 0063ed1be..d0664f542 100644
--- a/tasmota/language/uk_UA.h
+++ b/tasmota/language/uk_UA.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h
index 08204fff6..74e8398a2 100644
--- a/tasmota/language/vi_VN.h
+++ b/tasmota/language/vi_VN.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h
index cd0880c0c..b4fa7c00e 100644
--- a/tasmota/language/zh_CN.h
+++ b/tasmota/language/zh_CN.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h
index 6ae065861..a5611d532 100644
--- a/tasmota/language/zh_TW.h
+++ b/tasmota/language/zh_TW.h
@@ -919,6 +919,7 @@
#define D_GPIO_DINGTIAN_SDI "Dingtian SDI"
#define D_GPIO_DINGTIAN_Q7 "Dingtian Q7"
#define D_GPIO_DINGTIAN_PL "Dingtian PL"
+#define D_GPIO_DINGTIAN_OE "Dingtian OE"
#define D_GPIO_DINGTIAN_RCK "Dingtian RCK"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino b/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino
index 93bfd2a34..c6dbd9193 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_90_esp32_dingtian_relay.ino
@@ -30,18 +30,22 @@
#error DINGTIAN - Only one of DINGTIAN_USE_AS_BUTTON or DINGTIAN_USE_AS_SWITCH should be defined
#endif
+#define DINGTIAN_SET_OUTPUT(pin,value) { pinMode((pin), OUTPUT); digitalWrite((pin), (value)); }
+#define DINGTIAN_SET_INPUT(pin) { pinMode((pin), INPUT); }
+
/********************************************************************************************************
* Global private data
*/
struct DINGTIAN_DATA {
- uint32_t outputs; // keep ouputs state
- uint32_t last_inputs; // previous inputs state
- uint8_t count; // number of relay and input (8 * numver of shift registers)
- uint8_t first; // index of 1st Tasmota relay assigned to 1st Dingtian relays
- int8_t key_offset; // index of virtual key
+ uint32_t outputs; // keep ouputs state
+ uint32_t last_inputs; // previous inputs state
+ uint8_t count; // number of relay and input (8 * numver of shift registers)
+ uint8_t first; // index of 1st Tasmota relay assigned to 1st Dingtian relays
+ int8_t key_offset; // index of virtual key
+ bool outputs_initialized; // set when the outputs are initialized
// pins
- uint8_t pin_clk, pin_sdi, pin_q7, pin_pl, pin_rck;
+ uint8_t pin_clk, pin_sdi, pin_q7, pin_pl, pin_oe, pin_rck;
} *Dingtian = nullptr;
@@ -56,7 +60,7 @@ uint32_t DingtianReadWrite(uint32_t outputs)
// setup
digitalWrite(Dingtian->pin_rck, 0); // rclk and clkinh to 0
- digitalWrite(Dingtian->pin_pl, 1); // load inputs in '165, ready for shift-in (side effect '595 in tri-state)
+ if (PinUsed(GPIO_DINGTIAN_PL)) digitalWrite(Dingtian->pin_pl, 1); // load inputs in '165, ready for shift-in (side effect '595 in tri-state)
for ( int i = Dingtian->count ; i > 0 ; i-- ) {
// relay out to '595
digitalWrite(Dingtian->pin_sdi, outputs & 1);
@@ -70,7 +74,13 @@ uint32_t DingtianReadWrite(uint32_t outputs)
}
// ending
digitalWrite(Dingtian->pin_rck, 1); // rclk pulse to load '595 into output registers
- digitalWrite(Dingtian->pin_pl, 0); // re-enable '595 ouputs
+ if (PinUsed(GPIO_DINGTIAN_PL)) digitalWrite(Dingtian->pin_pl, 0); // re-enable '595 ouputs (old board version)
+ if (!Dingtian->outputs_initialized && PinUsed(GPIO_DINGTIAN_OE))
+ {
+ digitalWrite(Dingtian->pin_oe, 0); // enable '595 ouputs (new board version)
+ DINGTIAN_SET_OUTPUT(Dingtian->pin_oe, 0);
+ Dingtian->outputs_initialized = true;
+ }
#ifdef DINGTIAN_INPUTS_INVERTED
return ~inputs;
@@ -83,33 +93,33 @@ uint32_t DingtianReadWrite(uint32_t outputs)
* Driver initialisation
*/
-#define DINGTIAN_SET_OUTPUT(pin,value) { pinMode((pin), OUTPUT); digitalWrite((pin), (value)); }
-#define DINGTIAN_SET_INPUT(pin) { pinMode((pin), INPUT); }
-
void DingtianInit(void) {
if (PinUsed(GPIO_DINGTIAN_CLK, GPIO_ANY) && PinUsed(GPIO_DINGTIAN_SDI) && PinUsed(GPIO_DINGTIAN_Q7)
- && PinUsed(GPIO_DINGTIAN_PL) && PinUsed(GPIO_DINGTIAN_RCK)) {
+ && (PinUsed(GPIO_DINGTIAN_PL) || PinUsed(GPIO_DINGTIAN_OE)) && PinUsed(GPIO_DINGTIAN_RCK)) {
// allocate Dingtian data structure
Dingtian = (struct DINGTIAN_DATA*)calloc(1, sizeof(struct DINGTIAN_DATA));
if (Dingtian) {
// get pins
- Dingtian->pin_clk = Pin(GPIO_DINGTIAN_CLK, GPIO_ANY); // shift clock : 595's SCLK & 165's CLK
- Dingtian->pin_sdi = Pin(GPIO_DINGTIAN_SDI); // Serial out : 595's SER
- Dingtian->pin_q7 = Pin(GPIO_DINGTIAN_Q7); // Serial in : 165's Q7
- Dingtian->pin_pl = Pin(GPIO_DINGTIAN_PL); // Input load : 595's nOE & 165's PL (or SH/LD on some datasheet)
- Dingtian->pin_rck = Pin(GPIO_DINGTIAN_RCK); // Output load : 595's RCLK & 165's CLKINH
+ Dingtian->pin_clk = Pin(GPIO_DINGTIAN_CLK, GPIO_ANY); // shift clock : 595's SCLK & 165's CLK
+ Dingtian->pin_sdi = Pin(GPIO_DINGTIAN_SDI); // Serial out : 595's SER
+ Dingtian->pin_q7 = Pin(GPIO_DINGTIAN_Q7); // Serial in : 165's Q7
+ if (PinUsed(GPIO_DINGTIAN_PL)) Dingtian->pin_pl = Pin(GPIO_DINGTIAN_PL); // Input load : 595's nOE & 165's PL (or SH/LD on some datasheet)
+ if (PinUsed(GPIO_DINGTIAN_OE)) Dingtian->pin_oe = Pin(GPIO_DINGTIAN_OE); // Output enable : 595's nOE (v3.6.10)
+ Dingtian->pin_rck = Pin(GPIO_DINGTIAN_RCK); // Output load : 595's RCLK & 165's CLKINH
// number of shift registers is the CLK index
Dingtian->count = ((GetPin(Dingtian->pin_clk) - AGPIO(GPIO_DINGTIAN_CLK)) + 1) * 8;
- AddLog(LOG_LEVEL_DEBUG, PSTR("DNGT: clk:%d, sdi:%d, q7:%d, pl:%d, rck:%d, count:%d"),
- Dingtian->pin_clk, Dingtian->pin_sdi, Dingtian->pin_q7, Dingtian->pin_pl, Dingtian->pin_rck, Dingtian->count);
+ AddLog(LOG_LEVEL_DEBUG, PSTR("DNGT: clk:%d, sdi:%d, q7:%d, pl:%d, oe:%d, rck:%d, count:%d"),
+ Dingtian->pin_clk, Dingtian->pin_sdi, Dingtian->pin_q7, Dingtian->pin_pl, Dingtian->pin_oe, Dingtian->pin_rck, Dingtian->count);
DINGTIAN_SET_OUTPUT(Dingtian->pin_clk, 0);
DINGTIAN_SET_OUTPUT(Dingtian->pin_sdi, 0);
DINGTIAN_SET_INPUT( Dingtian->pin_q7);
DINGTIAN_SET_OUTPUT(Dingtian->pin_pl, 0);
+ //Do not initialize Dingtian->pin_oe so the relays will not toggle while restarting
DINGTIAN_SET_OUTPUT(Dingtian->pin_rck, 0);
+ Dingtian->outputs_initialized = false;
Dingtian->first = TasmotaGlobal.devices_present;
Dingtian->key_offset = -1;
UpdateDevicesPresent(Dingtian->count);
From cda2bf157dd5dec61a5621e220321d21d1e3784d Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Mon, 1 May 2023 16:26:07 +0200
Subject: [PATCH 054/289] Add support for TC74
Add support for TC74 temperature sensor by Michael Loftis (#18042)
---
BUILDS.md | 2 +
CHANGELOG.md | 1 +
CODE_OWNERS.md | 2 +
I2CDEVICES.md | 3 +-
RELEASENOTES.md | 1 +
tasmota/my_user_config.h | 5 +-
tasmota/tasmota_support/support_features.ino | 9 +-
tasmota/tasmota_xsns_sensor/xsns_108_tc74.ino | 287 ++++++++++++++++++
tools/decode-status.py | 2 +-
9 files changed, 306 insertions(+), 6 deletions(-)
create mode 100644 tasmota/tasmota_xsns_sensor/xsns_108_tc74.ino
diff --git a/BUILDS.md b/BUILDS.md
index e760e3cba..cb6e3de96 100644
--- a/BUILDS.md
+++ b/BUILDS.md
@@ -112,6 +112,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
| USE_ADS1115 | - | - / x | - | x | - | - |
| USE_INA219 | - | - / x | - | x | - | - |
| USE_INA226 | - | - / - | - | - | - | - |
+| USE_INA3221 | - | - / - | - | - | - | - |
| USE_SHT3X | - | - / x | - | x | - | - |
| USE_TSL2561 | - | - / - | - | - | - | - |
| USE_TSL2591 | - | - / - | - | - | - | - |
@@ -147,6 +148,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
| USE_PMSA003I | - | - / - | - | - | - | - |
| USE_LOX_O2 | - | - / x | - | x | - | - |
| USE_GDK101 | - | - / - | - | - | - | - |
+| USE_TC74 | - | - / - | - | - | - | - |
| | | | | | | |
| Feature or Sensor | l | t | k | s | i | d | Remarks
| USE_HIH6 | - | - / x | - | x | - | - |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc77eec5a..67f37e0ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
- Matter allow `Matter#Initialized` rule once the device is configured (#18451)
- Matter UI to change endpoints configuration (#18498)
- Matter support for Shutters (without Tilt) (#18509)
+- Support for TC74 temperature sensor by Michael Loftis (#18042)
### Breaking Changed
diff --git a/CODE_OWNERS.md b/CODE_OWNERS.md
index 2e9bcfc20..49d7f6f53 100644
--- a/CODE_OWNERS.md
+++ b/CODE_OWNERS.md
@@ -206,6 +206,8 @@ In addition to @arendst the following code is mainly owned by:
| xsns_104_pmsa003i | Jean-Pierre Deschamps
| xsns_105_lox_o2 | @ACE1046
| xsns_106_gdk101 | @Szewcson
+| xsns_107_gm861 | @arendst
+| xsns_108_tc74 | Michael Loftis
| |
| Libraries |
| |
diff --git a/I2CDEVICES.md b/I2CDEVICES.md
index d90ff4e44..9faaea61c 100644
--- a/I2CDEVICES.md
+++ b/I2CDEVICES.md
@@ -114,4 +114,5 @@ Index | Define | Driver | Device | Address(es) | Description
76 | USE_SEN5X | xsns_103 | SEN5X | 0x69 | Gas (VOC/NOx index) and air quality (PPM <1,<2.5,<4,<10)
77 | USE_MCP23XXX_DRV | xdrv_67 | MCP23x17 | 0x20 - 0x26 | 16-bit I/O expander as virtual button/switch/relay
78 | USE_PMSA003I | xsns_104 | PMSA003I | 0x12 | PM2.5 Air Quality Sensor with I2C Interface
- 79 | USE_GDK101 | xsns_106 | GDK101 | 0x18 - 0x1B | Gamma Radiation Sensor
\ No newline at end of file
+ 79 | USE_GDK101 | xsns_106 | GDK101 | 0x18 - 0x1B | Gamma Radiation Sensor
+ 80 | USE_TC74 | xsns_108 | TC74 | 0x48 - 0x4F | Temperature sensor
\ No newline at end of file
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index c30e4cfa6..df5c0d388 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -113,6 +113,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
## Changelog v12.5.0.1
### Added
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
+- Support for TC74 temperature sensor by Michael Loftis [#18042](https://github.com/arendst/Tasmota/issues/18042)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
- Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451)
- Matter UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 83c450db6..0d4b8088a 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -706,7 +706,10 @@
// #define GDK101_SHOW_STATUS
// #define GDK101_SHOW_VIBRATION_STATUS
// #define GDK101_SHOW_MEAS_TIME
-
+// #define USE_TC74 // [I2cDriver80] Enable TC74 sensor (I2C addresses 0x48 - 0x4F) (+1k code)
+// #define TC74_MAX_SENSORS 8 // Support non-default/multiple I2C addresses
+// #define TC74_I2C_PROBE_ADDRESSES { 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F } // Addresses to probe/support
+// #define TC74_MAX_FAILCOUNT 8 // Maximum failed polls before it's marked inactive until reprobing later
// #define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
// #define USE_DS3231 // [I2cDriver26] Enable DS3231 RTC (I2C address 0x68) (+1k2 code)
diff --git a/tasmota/tasmota_support/support_features.ino b/tasmota/tasmota_support/support_features.ino
index 7bdb9fb34..e19a74c86 100644
--- a/tasmota/tasmota_support/support_features.ino
+++ b/tasmota/tasmota_support/support_features.ino
@@ -888,9 +888,12 @@ void ResponseAppendFeatures(void)
#if defined(USE_I2C) && defined(USE_GDK101)
feature9 |= 0x00100000; // xsns_106_gdk101.ino
#endif
-
-// feature9 |= 0x00200000;
-// feature9 |= 0x00400000;
+#ifdef USE_GM861
+ feature9 |= 0x00200000; // xsns_107_gm861.ino
+#endif
+#if defined(USE_I2C) && defined(USE_TC74)
+ feature9 |= 0x00400000; // xsns_108_tc74.ino
+#endif
// feature9 |= 0x00800000;
// feature9 |= 0x01000000;
diff --git a/tasmota/tasmota_xsns_sensor/xsns_108_tc74.ino b/tasmota/tasmota_xsns_sensor/xsns_108_tc74.ino
new file mode 100644
index 000000000..ccc4a98ad
--- /dev/null
+++ b/tasmota/tasmota_xsns_sensor/xsns_108_tc74.ino
@@ -0,0 +1,287 @@
+/*
+ xsns_108_tc74.ino - TC74 I2C temperature sensor support for Tasmota
+
+ Copyright (C) 2023 Michael Loftis
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+*/
+
+#ifdef USE_I2C
+#ifdef USE_TC74
+
+/*********************************************************************************************\
+ * TC74 - Temperature Sensor
+ *
+ * TC74 I2C Address: 0x4D
+ * Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/21462D.pdf
+ *
+ * Eight I2C address variant parts are available. The part numbers are TC74An where N is
+ * one of the eight addresses noted in the (unused) #defines below. Be sure to check your
+ * part number for the correct address before building your firmware image! Due to the
+ * limited RAM in ESP8266's the default configuration does not try to work with all eight.
+ *
+ * For I2C 0x4D, TC74A5 part, is the standard address, other addresses are available as a
+ * custom order, eight total addresses. This driver thus supports up to
+ * eight sensors, sensors beyond/other than the default 0x4D require setting
+ * of defines, there is also no good way to ID these sensors as there's no MSR
+ * and nothing unique about their information.
+ *
+ * These sensors only have a nominal 1C resolution. The git devices are sold
+ * calibrated to a specific supply voltage but will work from 2.7V-5.5V, but
+ * will suffer 1C per Volt deviation from the rating of accuracy loss. They're
+ * only accurate to about +/-2C to begin with.
+ \*********************************************************************************************/
+
+#define XSNS_108 108
+#define XI2C_80 80
+
+//#define TC74_MAX_SENSORS 8 // Support non-default/multiple I2C addresses
+//#define TC74_I2C_PROBE_ADDRESSES { 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F } // Addresses to probe/support
+//#define TC74_MAX_FAILCOUNT 8 // maximum failed polls before it's marked inactive until reprobing later
+//#define TC74_EXTRA_DEBUG // Compile in some extra debug logging statements around failures and measurements
+
+#define TC74_ADDR0 0x48
+#define TC74_ADDR1 0x49
+#define TC74_ADDR2 0x4A
+#define TC74_ADDR3 0x4B
+#define TC74_ADDR4 0x4C
+#define TC74_ADDR5 0x4D
+#define TC74_ADDR6 0x4E
+#define TC74_ADDR7 0x4F
+#define TC74_ADDR_BASE TC74_ADDR0
+#define TC74_ADDR_DEFAULT TC74_ADDR5
+
+#ifndef TC74_MAX_SENSORS
+#define TC74_MAX_SENSORS 1
+uint8_t tc74_probes[TC74_MAX_SENSORS] PROGMEM = { TC74_ADDR_DEFAULT };
+#else
+uint8_t tc74_probes[TC74_MAX_SENSORS] PROGMEM = TC74_I2C_PROBE_ADDRESSES;
+#endif
+
+#ifndef TC74_MAX_FAILCOUNT
+#define TC74_MAX_FAILCOUNT 8
+#endif
+
+const uint8_t TC74_CMD_RTR = 0x00; // Read Temperature
+const uint8_t TC74_CMD_RWCR = 0x01; // Read/Write CONFIG
+
+/* CONFIG register
+ * D7 = STANDBY (R/W)
+ * D6 = READY (R/O)
+ * D5-D0 = Reserved - always zero
+ * POR state is all zeroes.
+ */
+const uint8_t TC74_CONFIG_DRDY = 0b00000010;
+
+// only used once...
+#define TC74_CONFIG_MASK 0b11111100
+
+struct {
+ uint8_t found_count = 0;
+ uint8_t tcnt = 0;
+} tc74_status;
+
+struct {
+ // Last read temperature
+ float temperature = NAN;
+ // flag if we could/couldn't read in most recent poll
+ bool is_active;
+ // failure count, if this goes above N we set active to false and
+ // the sensor will be retried later
+ uint8_t failed_count;
+ uint8_t address;
+} tc74_sensors[TC74_MAX_SENSORS];
+
+
+void TC74InitState() {
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: InitState"));
+#endif
+ for (uint32_t i = 0; i < TC74_MAX_SENSORS; i++) {
+ tc74_sensors[i].is_active = false;
+ tc74_sensors[i].failed_count = 0;
+ tc74_sensors[i].address = pgm_read_byte(tc74_probes + i);
+ }
+}
+
+void TC74Detect(bool forced) {
+ for (uint32_t i = 0; i < TC74_MAX_SENSORS; i++) {
+ uint8_t config_reg;
+ uint8_t addr = tc74_sensors[i].address;
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X probing"), addr);
+#endif
+
+ // if we failed more than N times, unless we're being forced to, skip it.
+ if (!forced && tc74_sensors[i].failed_count >= TC74_MAX_FAILCOUNT ) {
+ tc74_sensors[i].is_active = false;
+ continue;
+ }
+
+ // I2cSetDevice ALWAYs returns false if a device is marked active already...
+ // So if we have the is_active flag for this device SKIP this check
+ if (!tc74_sensors[i].is_active && !I2cSetDevice(addr)) {
+ if (tc74_sensors[i].failed_count < 253) { tc74_sensors[i].failed_count++; }
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X failed I2cSetDevice"), addr);
+#endif
+ continue;
+ }
+
+ // Pull CONFIG and check it, best we can do to keep away from other I2C devices
+ if (!I2cValidRead8(&config_reg, addr, TC74_CMD_RWCR)) {
+ tc74_sensors[i].is_active = false;
+ tc74_sensors[i].failed_count++;
+ if(I2cActive(addr)) { I2cResetActive(addr); }
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_ERROR, PSTR("TC7: Addr %X failed CONFIG read, deactivated"), addr);
+#endif
+ continue;
+ }
+
+ // if any reserved bits are set, not our device
+ if (config_reg & TC74_CONFIG_MASK != 0x00 ) {
+ tc74_sensors[i].is_active = false;
+ tc74_sensors[i].failed_count++;
+ if(I2cActive(addr)) { I2cResetActive(addr); }
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X found reserved bits set [%x]"), addr, config_reg);
+#endif
+
+ continue;
+ }
+
+ // Make sure STANDBY is not set, POR should be clear, but, if another I2C driver toggled it....
+ I2cWrite8(addr, TC74_CMD_RWCR, 0x0);
+
+ if (!tc74_sensors[i].is_active) {
+ tc74_sensors[i].is_active = true;
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X set active"), addr);
+#endif
+ I2cSetActiveFound(addr, "TC74");
+ }
+ tc74_sensors[i].failed_count = 0;
+ } // for sensors...
+}
+
+void TC74PollActive() {
+ for (uint8_t i = 0; i < TC74_MAX_SENSORS; i++) {
+ uint8_t addr = tc74_sensors[i].address;
+ uint8_t config_reg;
+ int8_t temperature_register;
+
+ if (!tc74_sensors[i].is_active) { continue; }
+
+ // if timing were a problem we could read both bytes from the RTR, then
+ // do mask/shift to recover the parts we want.
+ if (!I2cValidRead8(&config_reg, addr, TC74_CMD_RWCR)) {
+ tc74_sensors[i].failed_count++;
+ continue;
+ }
+
+ // check if a measurement is ready
+ if (config_reg & TC74_CONFIG_DRDY != 0b00000010) { continue; }
+
+ // grab most recent reading
+ if (!I2cValidRead8((uint8_t*)&temperature_register, addr, TC74_CMD_RTR)) {
+ tc74_sensors[i].failed_count++;
+ continue;
+ }
+
+ tc74_sensors[i].temperature = ConvertTemp(temperature_register);
+ tc74_sensors[i].failed_count = 0;
+#ifdef TC74_EXTRA_DEBUG
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X register temperature was %hhi or [%i]"), addr, temperature_register, temperature_register);
+ AddLog(LOG_LEVEL_DEBUG, PSTR("TC7: Addr %X stored temperature %*_f"), addr, Settings->flag2.temperature_resolution, &tc74_sensors[i].temperature);
+#endif
+
+ } // for sensors...
+}
+
+void TC74Show(bool json) {
+ bool once = true;
+ // loop over sensors, only output if active
+ for (uint8_t i = 0; i < TC74_MAX_SENSORS; i++) {
+ if (tc74_sensors[i].is_active) {
+ char sname[10];
+ snprintf_P(sname, sizeof(sname), PSTR("TC74%c%02X"), IndexSeparator(), tc74_sensors[i].address);
+ if (json) {
+ ResponseAppend_P(JSON_SNS_F_TEMP, sname, Settings->flag2.temperature_resolution, &tc74_sensors[i].temperature);
+ // also send KNX and Domoticz if enabled...and first sensor reporting
+ // might beed guarded by some sort of enable (compile time or otherwise)
+ if ((0 == TasmotaGlobal.tele_period) && once) {
+#ifdef USE_DOMOTICZ
+ DomoticzFloatSensor(DZ_TEMP, tc74_sensors[i].temperature);
+#endif // USE_DOMOTICZ
+#ifdef USE_KNX
+ KnxSensor(KNX_TEMPERATURE, tc74_sensors[i].temperature);
+#endif // USE_KNX
+ once = false;
+ } // tele_period, first reporter
+#ifdef USE_WEBSERVER
+ } else {
+ WSContentSend_Temp(sname, tc74_sensors[i].temperature);
+#endif // USE_WEBSERVER
+ } // if(json)
+ } // if(is_active)
+ } // for sensors...
+}
+
+/*********************************************************************************************\
+ * Interface
+\*********************************************************************************************/
+
+bool Xsns108(uint32_t function) {
+ if (!I2cEnabled(XI2C_80)) { return false; }
+
+ bool result = false;
+
+ // Unlike some other drivers we DO support sensors disappearing and reappearing later
+ // or simply not available during initial startup
+
+ switch (function) {
+ case FUNC_INIT:
+ TC74InitState();
+ TC74Detect(false);
+ break;
+ case FUNC_HOTPLUG_SCAN:
+ TC74Detect(true);
+ tc74_status.tcnt = 1;
+ break;
+ case FUNC_EVERY_SECOND:
+ /* if(tc74_status.tcnt == 0 || tc74_status.tcnt == 60) {
+ TC74Detect(true);
+ } */
+ tc74_status.tcnt++;
+ if(tc74_status.tcnt > 60) {
+ tc74_status.tcnt = 1;
+ }
+ TC74PollActive();
+ break;
+ case FUNC_JSON_APPEND:
+ TC74Show(true);
+ break;
+#ifdef USE_WEBSERVER
+ case FUNC_WEB_SENSOR:
+ TC74Show(false);
+ break;
+#endif
+ } // switch(function)
+ return result;
+}
+
+#endif // USE_TC74
+#endif // USE_I2C
\ No newline at end of file
diff --git a/tools/decode-status.py b/tools/decode-status.py
index ebe18e460..8ff87b7bf 100755
--- a/tools/decode-status.py
+++ b/tools/decode-status.py
@@ -295,7 +295,7 @@ a_features = [[
"USE_DINGTIAN_RELAY","USE_HMC5883L","USE_LD2410","USE_ME007",
"USE_DISPLAY_TM1650","USE_PCA9632","USE_TUYAMCUBR","USE_SEN5X",
"USE_BIOPDU","USE_MCP23XXX_DRV","USE_PMSA003I","USE_LOX_O2",
- "USE_GDK101","","","",
+ "USE_GDK101","USE_GM861","USE_TC74","",
"","","","",
"","","",""
]]
From c498995f7902a3c2a0f771531869269bccd7326d Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Tue, 2 May 2023 15:53:17 +0200
Subject: [PATCH 055/289] Update xdrv_68_zerocrossDimmer.ino (#18556)
* Update xdrv_68_zerocrossDimmer.ino
* Address IRAM issue report
removed some IRAM from ESP8266. Further improvement to ESP32 as soon as measurement is available.
---
.../xdrv_68_zerocrossDimmer.ino | 67 +++++++++++++------
1 file changed, 46 insertions(+), 21 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
index 060899c49..9ec32e59e 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_68_zerocrossDimmer.ino
@@ -29,6 +29,9 @@ static const uint8_t MIN_PERCENT = 5;
static const uint8_t MAX_PERCENT = 99;
static const uint8_t TRIGGER_PERIOD = 75;
+#define ZCDIMMERSET_SHOW 1
+//#define ZC_DEBUG 1
+
struct AC_ZERO_CROSS_DIMMER {
uint32_t cycle_time_us; // Time (in micros()) of last ZC signal
uint32_t crossed_zero_at; // Time (in micros()) of last ZC signal
@@ -43,6 +46,7 @@ struct AC_ZERO_CROSS_DIMMER {
uint8_t triggertime = GATE_ENABLE_TIME; // copy of the Time for the gate keep open to start TRIAC
uint32_t intr_counter = 0; // counter internally on interrerupt calls
uint32_t missed_zero_cross; // count up all missed Zero-cross events.
+ uint8_t actual_tigger_Period = TRIGGER_PERIOD; // copy of tigger period to change during runtime
} ac_zero_cross_dimmer;
@@ -83,7 +87,7 @@ void IRAM_ATTR ACDimmerZeroCross(uint32_t time) {
uint32_t IRAM_ATTR ACDimmerTimer_intr_ESP8266() {
//ACDimmerTimer_intr();
ACDimmerTimer_intr();
- return 6000;
+ return ac_zero_cross_dimmer.actual_tigger_Period * 80;
}
void ACDimmerInterruptDisable(bool disable)
@@ -96,9 +100,6 @@ void ACDimmerInterruptDisable(bool disable)
if (dimmer_timer != nullptr) {
timerAlarmDisable(dimmer_timer);
}
-#endif
-#ifdef ESP8266
- //setTimer1Callback(NULL);
#endif
} else {
for (uint8_t i = 0 ; i < MAX_PWMS; i++) {
@@ -119,32 +120,26 @@ void ACDimmerInterruptDisable(bool disable)
}
timerAlarmEnable(dimmer_timer);
#endif
-
-#ifdef ESP8266
- // Uses ESP8266 waveform (soft PWM) class
- // PWM and AcDimmer can even run at the same time this way
- //setTimer1Callback(&ACDimmerTimer_intr_ESP8266);
-#endif
}
}
void IRAM_ATTR ACDimmerTimer_intr() {
+
+ uint32_t time_since_zc = micros() - ac_zero_cross_dimmer.crossed_zero_at;
// If no ZC signal received yet.
- uint32_t now = micros();
+ if (ac_zero_cross_dimmer.crossed_zero_at == 0) return;
+
+#ifdef ZC_DEBUG
ac_zero_cross_dimmer.intr_counter++;
- if (ac_zero_cross_dimmer.crossed_zero_at == 0)
- return;
-
- uint32_t time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
-
// Check for missed Zero-Cross event. Single failure will correct
if (time_since_zc > 10100) {
memset(&ac_zero_cross_dimmer.current_state_in_phase, 0x00, sizeof(ac_zero_cross_dimmer.current_state_in_phase));
ac_zero_cross_dimmer.crossed_zero_at += ac_zero_cross_dimmer.cycle_time_us;
ac_zero_cross_dimmer.missed_zero_cross++;
- time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+ time_since_zc += ac_zero_cross_dimmer.cycle_time_us;
}
-
+#endif
+ ac_zero_cross_dimmer.actual_tigger_Period = TRIGGER_PERIOD;
for (uint8_t i = 0 ; i < MAX_PWMS; i++ ) {
if (Pin(GPIO_PWM1, i) == -1) continue;
switch (ac_zero_cross_dimmer.current_state_in_phase[i]) {
@@ -159,15 +154,22 @@ void IRAM_ATTR ACDimmerTimer_intr() {
case 3:
if (time_since_zc + TRIGGER_PERIOD >= ac_zero_cross_dimmer.enable_time_us[i]){
// Very close to the fire event. Loop the last µseconds to wait.
+#ifdef ESP8266
+ // on ESP8266 we can change dynamically the trigger interval
+ ac_zero_cross_dimmer.actual_tigger_Period = tmin(ac_zero_cross_dimmer.actual_tigger_Period,tmax(5,ac_zero_cross_dimmer.enable_time_us[i] - time_since_zc));
+#endif
+#ifdef ESP32
while (time_since_zc < ac_zero_cross_dimmer.enable_time_us[i]) {
- now = micros();
- time_since_zc = now - ac_zero_cross_dimmer.crossed_zero_at;
+ time_since_zc = micros() - ac_zero_cross_dimmer.crossed_zero_at;
}
+#endif
}
if (time_since_zc >= ac_zero_cross_dimmer.enable_time_us[i]) {
digitalWrite(Pin(GPIO_PWM1, i), HIGH);
ac_zero_cross_dimmer.current_state_in_phase[i]++;
+#ifdef ZC_DEBUG
ac_zero_cross_dimmer.accurracy[i] = time_since_zc-ac_zero_cross_dimmer.enable_time_us[i];
+#endif
}
break;
}
@@ -175,11 +177,12 @@ void IRAM_ATTR ACDimmerTimer_intr() {
}
void ACDimmerControllTrigger(void) {
-
+#ifdef ESP32
if (ac_zero_cross_dimmer.timer_iterrupt_started != ac_zero_cross_dimmer.dimmer_in_use) {
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("ZCD: ZeroEnable %d --> %d ... change..."),ac_zero_cross_dimmer.timer_iterrupt_started, ac_zero_cross_dimmer.dimmer_in_use);
ACDimmerInterruptDisable(!ac_zero_cross_dimmer.dimmer_in_use);
}
+#endif
for (uint8_t i = 0; i < MAX_PWMS; i++){
if (Pin(GPIO_PWM1, i) == -1) continue;
@@ -231,6 +234,21 @@ void ACDimmerLogging(void)
}
}
+#ifdef USE_WEBSERVER
+#ifdef ZCDIMMERSET_SHOW
+void ACDimmerShow(void)
+{
+ char c_ZCDimmerSetBuffer[8];
+ for (uint8_t i = 0; i < MAX_PWMS; i++){
+ if (Pin(GPIO_PWM1, i) == -1) continue;
+ if (ac_zero_cross_dimmer.detailpower[i]){
+ dtostrfd(ac_zero_cross_dimmer.detailpower[i]/100.0, 2, c_ZCDimmerSetBuffer);
+ WSContentSend_PD(PSTR("{s}ZCDimmer%d{m}%s %%{e}"), i+1, c_ZCDimmerSetBuffer);
+ }
+ }
+}
+#endif // ZCDIMMERSET_SHOW
+#endif // USE_WEBSERVER
/*********************************************************************************************\
* Commands
@@ -286,6 +304,13 @@ bool Xdrv68(uint32_t function)
case FUNC_COMMAND:
result = DecodeCommand(kZCDimmerCommands, ZCDimmerCommand);
break;
+#ifdef USE_WEBSERVER
+#ifdef ZCDIMMERSET_SHOW
+ case FUNC_WEB_SENSOR:
+ ACDimmerShow();
+ break;
+#endif // ZCDIMMERSET_SHOW
+#endif // USE_WEBSERVER
}
}
return result;
From ec00f0f7e2ead311de113462e20b5995aa491ad3 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Wed, 3 May 2023 11:04:10 +0200
Subject: [PATCH 056/289] esp8266 iram metrics (#18564)
---
pio-tools/metrics-firmware.py | 16 ++++++++++++++++
pio-tools/name-firmware.py | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/pio-tools/metrics-firmware.py b/pio-tools/metrics-firmware.py
index d9fb7a9ad..0ecdb3f36 100644
--- a/pio-tools/metrics-firmware.py
+++ b/pio-tools/metrics-firmware.py
@@ -1,9 +1,25 @@
Import("env")
+import os
import tasmotapiolib
+from os.path import join
+
def firm_metrics(source, target, env):
if env["PIOPLATFORM"] == "espressif32":
import tasmota_metrics
env.Execute("$PYTHONEXE -m tasmota_metrics " + str(tasmotapiolib.get_source_map_path(env).resolve()))
+ elif env["PIOPLATFORM"] == "espressif8266":
+ map_file = join(env.subst("$BUILD_DIR")) + os.sep + "firmware.map"
+ with open(map_file,'r') as f:
+ phrase = "_text_end = ABSOLUTE (.)"
+ for line in f:
+ if phrase in line:
+ address = line.strip().split(" ")[0]
+ if int(address, 16) < 0x40108000:
+ used_bytes = int(address, 16) - 0x40100000
+ remaining_bytes = 0x8000 - used_bytes
+ percentage = round(used_bytes / 0x8000 * 100,1)
+ print("Used static IRAM:",used_bytes,"bytes (",remaining_bytes,"remain,",percentage,"% used)")
+
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin",firm_metrics)
\ No newline at end of file
diff --git a/pio-tools/name-firmware.py b/pio-tools/name-firmware.py
index 6162500da..0d853d035 100644
--- a/pio-tools/name-firmware.py
+++ b/pio-tools/name-firmware.py
@@ -1,8 +1,10 @@
Import("env")
+import os
import shutil
import pathlib
import tasmotapiolib
+from os.path import join
def bin_map_copy(source, target, env):
@@ -30,5 +32,7 @@ def bin_map_copy(source, target, env):
shutil.copy(tasmotapiolib.get_source_map_path(env), map_file)
shutil.copy(factory, one_bin_file)
else:
+ map_firm = join(env.subst("$BUILD_DIR")) + os.sep + "firmware.map"
+ shutil.copy(tasmotapiolib.get_source_map_path(env), map_firm)
shutil.move(tasmotapiolib.get_source_map_path(env), map_file)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", bin_map_copy)
From 3fa42072b11613a2222b52b8bb860d1ae9f0883d Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Wed, 3 May 2023 17:33:21 +0200
Subject: [PATCH 057/289] Fix HASPmota demo for the new Berry rule engine
(#18570)
---
tasmota/berry/haspmota_src/haspmota_demo.tapp | Bin 131208 -> 193476 bytes
.../haspmota_src/haspmota_demo/autoexec.be | 4 ++--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tasmota/berry/haspmota_src/haspmota_demo.tapp b/tasmota/berry/haspmota_src/haspmota_demo.tapp
index b25ad84cbc9da4f597cecdae4db745fa1d71772f..26c138e405bb3993e28fd9ad7a2b1871e99fdc8e 100644
GIT binary patch
delta 62133
zcmchAON?aKdET@{`Z1KP7$Pm%@Z+-DR9Bnb#qJ@+#BI(9!(o#gX*fNa8ParyOg(RR
zUv_m>sUAJkq=XwMo50yP9wb~iUL^}JV|bxm7KVWU$=U$|7+D#}Mu1_j3?#DhegEU!
zbL-KMnU+i9bk)7*{O3Ra>-^_G|2gO1{NB&}#s7Kk^*i7G;xm^o@l*T#Kl&hVz4oo=
zpS^U6|2=o(74u&)$3Xzx~=X
z@4oR@?Z@BQsr=d2Z+zwDXKv!xzy8k755BXr^wMYYi|>B$AOHK(?|$i--@f`+?LYg@
zPWKBxNdMQ;Z+%66%j>`R;nFw%$>U$U_A~jXfAHN8mcRD5fBh$acj*%UBOd$B(crK@
zZaN+h|M>aNfA~+&cP5XXyR`Jo-!EOd^vv_Ej%uHb`n_&LAYC7!R?;7gv%~CDwADwUjbwTK@!x(q$&>ZvMv{$^
zVLIqG+i53xn2q=GUaJldL)*1+b1?Yrn7;CxmzU4>$%|z(rU#inuBTW%Bq)i$d`|r!_cM6-F~xEUGXZYv9fwuO0>Jp(I_1ySCa>qlcYk*
zSJskBzx4_KjM~G>8lShuJ^2mNw)gq1y`Q!ZTKz|rwVdy}%~sl#5`(PQOHm8YvYx=o
z4)^$T*zb1r1%Mqk$HNSj1$I-4k3bQ9-yF7CVVpi1H-~AH-#f$ppwoW{Bv|9S!*;)u
zRxW?cF67BBud|b@J3YlfywZ5QKs(3Q(#E=hwlf`~MdwAap?gVCf5rR?qTg*;c)yEE(`fu~6`IfUZz
zJ-Km|4abvaH#tlXTj_8Fp!dd5xRKZcK<~G+<``N`Q50K&hSK&p$vSEZI#8FzOYXA%9&rB3{HS>!V@s!~eFpl3U&gPi*6Dqhw=h=iZz
z=*2M2cR@wk6x!47(Ox&vDqxLqChe>VAz>q7Ifg^T!CM_wNj>=6An#1vx`Y7#!
z>|mHS8Ge$7qqN=cb(+Ita4Cm%uXeM8G&$(?TSRHE&JEZlCHrjD++t#te_1=orpJD{87z2+fN1<^6EvxK&fPOyK449K{b
zj#*TS|4s@Ed(5Y3Ch25Dh+7x@@0F_%A^}OA?MGWdwXIkV@k$yG#RVX~AT2;j(~XB&
zXT0ACE#BM>mI%7gn{>Nt$-`9q6v$)!L+QbueA^xN50n06m|)ORg#r{;OOZh$eKq;)
zGUYF+JgRK*9}Z9WbBDH?7-mtKI4kF}OoN1b-mFBJsm=IVF~08Wk*&&?>k4dAC0-nhlTnRDptSbVce8
zlmsQ0WVBlbiX>^Vh0NDK!1mVBKS`4AtrrSDQ+3SVB%MdaeNlLv|p`n2B
z-L2_Q$7nz6z>EW4Ucx2-@-Gmq!2oInogfsip7tnSozw7HP`lmDV1$$qrT%-X_7}Z5
z?)7`ehiu-ObPUG*Jr&v@;FR8Wzsyd5;_|Uq?+==2*+potp7TNRdJlp(2TJsKsw@mo
z37(YXLn|k&pF%5o=JtPpX1nR`xPTR&7$E*0ipmG{i$_tJaeq(-!Uxg&R)0M1ABG}%
zolxvyRIJ(UhB8uw56XhSoID(6<8&SKtmD9z<3Y*9EGO{nF=^rW2CqG91I)3FA@J-*
zlf1Pq-hTkVacW9Oro@6j7f9AovpY#)!^o2p1UnL}yq~Oas<7e+G`nyQthzsAf%h%@Ytf_LFr*q^93aN~%oR4F6b-yPLC%1p!0
z(>h;q$SGcV)x&I>5{Jz>K;pWXsL}frTUC5l!CFo*nG@KR5hiJr<6(}umOjc3;k48-
zjF)v7Rl>u0CCeHem6jLY@JJ_?-Z3BXdRbl!kC+w&lV$~>8y$Kza7*c)dUdJ{)apvy
zaqz3qqBl-QPCXqWWRkR+oV!d09e8KrMhEBFupUhYjHR$U
zPV!JDo2xcTn$c_dmU?kp&P
zno~NZ^L$5zF&l(+%1!C~-HUveegXXESbjOjuVaF7pqh}+zJ!wRo1VQj7juM3=)lbby_P`!4VAo`GT80Gwl;TB9e&hS}Ist6CP`rL;x2u^Ml1gCsH&nsZf
zjIql}4?22e6F&9rBM4%Ui|TW}!Q@QLa3|Srl0M2tWA6q=3rxM^&rJJ#xr|8)CqX(>
zFXLdYOAKT7`!a|IYfo9HyW=sKq@lGN#XKNiOGf+sNw?Em8Dl(3I0!*k8j)YrNJbfX
z0)PHt6G*|~z>IKj&!#`{?_be~L$W*Ri7z%fyI2JNyBtjY6|uNWB~E*L@HN>w=Lgz9
znHNDK`IKryIxi=f1p{4iim1^XU)NRn;eKKsEm03+NuJbQd1uKOJy{m`V8|HLK1|mX
z3lg`1`Vm20RvfCEga}sgbvem(O1C>~?r{>V#BKIQG$g`1?I>KQRttQQ$rF1z+l3B4EdSjdyZ4PZ~||8nwXF2RFycORk(3Z-!A8Jl4A
z3m(**wigq{Xp+w(N*Q?sQ|5i3=W*j_=N!;1VpbOr;}T#5n!J-DK#Tz31kn%#{Z$=G
z%@qyXw$P{r4L;#wQI7~OB*v(p6gEnIBr^^TOrh%ALA3>aajFP=w
z%zDQ9I)Fhq1zu$n%NJm9Ln_tZcyz77kkw2#p7??HA3!nmFf@oL4Z>SGI@SX=)iK*m
z;HAl;%TPl|!*o1>HE8ww-Rdx{jZ%af_N$0!q3^$eDFGw|6<1jm1Q4sZj@1+{Gr)#6
z!KECXyZ!#HTSRFb&
zd^OpW@}!!O9Xv^{8C2B3T8*@7O|NH)k{5Trpsv$>frL2!7rZ{tzcfd4o%EY~7
z2A2~l(ZEnXN>!Yy`{|=CWzuT0ehob8=KbLo7yxx>j*=^{C9P~cO76b%Cb_~sX+Y1K
z5xJ6uJUE%-YyjHQ@{P8nrFE>#J-U1Mop;`RQv!2XNo*`n{eDCBh=Ijx4M;>2`ln%G
ztUh6QfMj8%p>|{E*3R8}xo{P@Cyim+X#jVK7?vQj-YD&jU}=stOu0_wX#zC~O1H3P
zctD&sVw+2kBLe;1b#qyIT7OnmdQhM#A;A8;Wq>|Ok{Z|+uEqrRBKk(
zRlO3d@uDOa^4P|M>|+B!;PSYR4i(MQELE`rL4xrEhN9xtq_SMm2lg**Pu7F~3FRXw
zp~TAaiuINCKo!uB>?lc6<)1g+NM2h_zL$)0;a$yo2EqQuH$siHD~J*1Mg;S>PJ=lO@-US?Su5ZrO`FAn94qBr8iCB{!N$iVIB02DT3zU@Xm&N0VY7+dAQy9_EB6r%j2`y6
z`sV^H{O@<`v=u<4qBfzDygVz6hKtwW+QU^EFauaa;J?~ETBE%aa4tdU5z)o~bIid2
zL6$)K>3&(U$G`Hz*YagCAIYe>ix~+s64cTN0R+HwWj8@=*T;jYdB!<@MpG8RqdCdO
z#S}|t7dnvBmP@V$&5Pw>u!>Y`4)->{
z7~@YEEp5!Cdib<2MkP!E$LS%GIS>cYW*7p;bk$ZX30|PTx|LKBU|3cB3=r6bo;LF?
z#_P_p&1}VzJ;dN;i(k<34C)E=*FCj2c4}3yZ_$LWI7YCs<2IAe4PkUjgWk~`cT&IsoFA!2wWSWdwSX#u~C3!u-
z$}Q}-G2!Xu-dO|rM`IWn0e_wFk*d*W?4Vcz=ji770&O_0@ZxpVN2eqX>B;_@{s9LH
zM7ftnnPIvIeqdP)tKU7uvRWdCPJ#uV!&x7z%OWK33D>=pVF4x^bubB&?|gp|AHX4~
zh*XjNiJqS2tKbY{tfCdCF_`U{YH2>qv$PLDWDZw+A?HHbi^ny*+3IEWXVsm2B=j`
zZUA6@jR{plJ(K1f;`|C3ww8!^b0#50wLwaI@e;{a@C~*<*uH(ge&g278{gi3Yc1KJ
zoh020E?EcEfN~%&uor8pKLxSehF2@`O)rWy3v~k#T50x}p8=cDfU$+Qi%ARS_lz@Q
z28!8f5Aid}QZhvFCl+xh_1wRK{`1}vP;#9#Zi&-N|JxA7$}{72pp7~?It;%lYjBtu
z^BuDsI6d*K433(j)ROd2J!~E$$0XNzQnSNU0vX>DCeXpdhU?BeV`h>y|r`uoqF8#ejoH+
zP@sNy`_A@tZ3(f59+QHiq90tp_5ODK#=F;VzoY#qhP>pI5Z3@Cjc={Q-hdTkHF|7BCLR#irHF6uYWs8Z#aIC_c-uHgFm;EUJGh%Nk8|3G|~!
zDQjQwXwmKA!wfcn{m1+eQ)-Fr?dKE*#Ejr?boyMnK}I5?0hn>q;W0F{7o0ZIgc~t2
z&w`oe1X*yC^vBZhAT(v)P|=1aF@aVema>z!^DaDaBtLePHL|Rw5~>&&kg>81fzfdt
z8Rm#wY^)`(fKL#xPTxmOl`WyWqHHdK(olL-m$f{X=kzG2TSu|Qw5n4rSO%P<@})Ut
zdGc!ra-;*2ZjHF4AoOAXnSI|)xhlhSOspL@tr8l^Re)w_Skhf9o-i3Nd?#c}&Z8$r
z#`e;OWNuW1XyJ(~aQP*gKg#h^dk2A<>3~IxbXBCfvc_zQ%GOKS${L}rMo|cgqtJkh
zXhvSHenhySIX)>*&{h6DcECAqRAUAsgmZxep;Wd!aG{DYg*plnmZp%iyvl=?Rfk2t
z=jo$%Iv6LlT4=X;U3@FCm;KYwj1%TFN%gO6eO4K~l(k;U_)QpF*{ZxW!vDYj{qKWj
zqCPU8)LCUc>(uRO1|28_4ill0EIIbULV@~MD{JI|p^fsA96zlfkN?N*U&>V~W%a<_
zHPehU`%3c$VSfe`mXqW?b9t~-j7%JeBiBG=*&~)L%zeTQky8=S3<7LMz&cO;#JVbi`maxf3@rt2K6D8#Y+MXAk9){k7tj2L
z@op}ak^U9vB7WBOH*al|=`KJ|^A~WOU53L9zhGlZDUTdnmyIyUk+#1cLr}<%OTiiJeu71wn=s&TmtWDNZpVm~#7M>vUqx
z*fQl7Su>I?mLv`+i=jS|QKGiYQ%sP9GNeHfX6`i-+G;*tpkU{E3^*<*%}(xnIAUp8
z#E+lAh>?GrBcZW0W{mNrAj0CnXKiY*KhK~skN&4oQ}`oZCcNscVri)XpGI;T8(asn
zi6i6roS3vH!)RejKvcnooJ;(eagMO|!jM=g^pD+dItc~@WKM<6N8={;vAIkCbTZ-n
zH=&RXv)T!xH}o^;r6z3Zs?W5H*gJ-kR^GniF{@k31_V<4&jgo$~CX7tlcO6{m6
zFYLC0khDXKsN*9xm&dfF*^s?ZAQuvmmjbcqC@EJUHR}Rs6#4rCiB30FrG4>rd#g?_lAr
z>u+w~LU0h#)8Dy!{f_c5s?q6>M~rNHjl5LltsMqY!JMcDc6VdfUnSHiRk(NK?#``S
zGj$lxid&ger+(w+-5c-U%CFy@sf`8~*M=`@y%K9B1eMN|0wfE>a=!dC#91edD*rJm
z{G4#AO#)Kb_{QmCJSg5u*+FqcpG(&iw<8HDn1QSd$LNSv{LvsR|+I_%hZWj+`akEyM~5|4*K|0SY5}k@%Wp+@WL-h%T@WeaDJzp
zRFaOSLCc=s2+rFIk?<%I#C$|J{%BdOlXy42A%e}UBS{bxOs-3=jBf6b*GyxRDvkNAvlGaZL84e(
zU#AhPNrf;Z6KP$(5gM{}nc#?xz`gMZiLuS``jrjp*C|w9Ox+Uw0mv;#ptKtiTj`zk
z2q^eO5S7Jd$5SFqI6agahnIyqBIUbCZN#h_M?oNt)~Qaj3H=Sx)!ATb43gP{k_8CW
z5poqU3u49KFcva8`(i0P>w+$Qk?|6fsekwU^LgBm#_m9h+#)p|YhBEYul?pnAJx!t
zCdae%s&4XEcq9nn1VoLHCFby%@Mo1sv!bFRIrZ1K;@ncc3UrPq`f5Jq^)3=1g%zRE
zLfCnmh|oz+Kk~y4!n?SMoNb__8v_Ff
z9wFU5a9U_3PuOJmsPvDLy?!4H5#5wWVeB`txu98Eb2>?zHwzQtohu|^)-ZstkAL-r
zufB+}O?olwLE1jM$Nw^U0cQj;OK&=M#V&@NR9m}!_uieY?qp{v@1M
z>2>=ZZcA}F3$Bz;pETsCC8eO0(0pP+3^fa0&W~?KwN;4bEptqHZ3=r@M&@zTu_(`V
zZEM8>c50njek!y5En6ca=Et_2RcHKb9F<+=oQlXE^0RVvu8fo#2Kcg&OG72L&UzAo
z+ZMurCOo1$g=%Hp$;llhj>4VK$HM=9G!+9V0u$2j^Wv3{>&J5uE8}%+v5aZ?D)7=0
z1!GGzT>RrC`Ws_?hdX&2ZEN?RvX|X|h*N*Xe>J`CB@+gi>YeVDOAVzA}#aSQ*&k7r*>V$k1SZVOftOa-AKeQ!&yL
zI;N2Nh4W!0T)RM=2yY4_BJ^`5qMt}76`c!2NdV5^^yTyLj;AhMAVvT;gAdVpE)vWs
z8mX2n*59+fDeJN;s7jLmA`j&|eKet-zX9TBHRz`z1Wc%|v~R9nYI6%^eK4(H`
zBS@Vs23ZFhRQe3M>d2U8P2=;l=or|5(a+DK^e?8(hodBl_0$MG{?iwp|7vJ|w)q+B
z<;|-SJ$3t2{86Y8K3|G$^OOpd<%K##bZn$^%a0-46*Yi$TQ0-9zAel%JIG4fwHcAh
zO{TQ2Hz+RCsS8EPMf5J@nB_<^
z^FvC*&iYX9BG75*u7XBr24W5Tthf17c9+Vf4O9<|bu%F<3sAwg_U)8toO3)(bdfb(
ztz4t2S16d?8XN|Gbc-+oF9(dcysCR~A*lWwQGZIZY>|zgQE@B2cBlHx=1?(^SR*>w
z2(gZypB36g9ySgy#i@QFyr`nXT6PSmX4f99da9{e1v52l1${cJAN^y(^b|
zaPaYEJ(FYus_$1{;LR8Jz7c7JnKZlseYacPg>>1R6ofU8+>#^!~ODz(5cQjR?d&F=mNV%
zh>Bo>uNP_gC^*CiUb$4)sp1n17IfK<#S@*D?Fitg#hy_x*K1kh2(x1wvfyU@&EU3AridAzSWe9;
zAL1N|3I?hn{)H}FwjEVvNUD%ly@XJ_YH&lgmC|-|APeT3HVxMe6e8d_Mt~wPc`{?v
zx%^;Ss&)Ah_>vi#E@n66=8NU~IPwAKf^mPCKoal*1uGhIUL~OA_LW9d&!mH<
z;pC_3qv#ZG@^b3K1H_45@|(#fZU|xbG^v1io`Nm}A;(56_+>MQ!<~o_mjwm_6wI4r
zz$M;DH1y*J8m?OMSWPkrJ?A3`zf{}YP5%79+-T4@yC}v+lW-xk&pNqeD(jSR-;c8X
z1UIXYhp-3DUanij+?a7LE_KVH9^WryCv&m7DYutbJEgj5^6D8}UWA5FathI9*e2bA
zluP#VT!61orot|Bhl1^Qa%L3I)4{@!+e6h9k7#+}d0_>A2P{xY=r1B5-Nr+wV&M5%
z$T&sCQ1?_a=0?X*qv(KR=YG4`PKNfXk65Y0eo=r3DA3fbYv>qvWhH{^XN28zF?gVlVs(k(F#tk
zdTEqYUmC4q&|)oAbnKst|X;s!*KDPdV3fik)Q%D)Tc3FJ|69
z5l3gCoQ0z}2y_lhBUnE5JqJ(E!%{m{;^}xAp{v?9kEb(*gsC}K>+GCYv+UxYK?3lC
zwm8T_Z1^?hD7ehmuIZ3wMIeiuI@6EFAGH@$C4%CC88}F)D>lz})Ds053YX@LJ(7g#tH7>`5hXMfORP?8uQ9@CGLRSdu*`-b@%@aMJr=d$4I7CN0W|%7-B8iMTGFK#tzmTC2BI8Mc
zw2uT*4$UtXB8g2Z4lYCIlptw?NS|fwC^YG;?QY=k8
zJWNcVXn`%B&|bxTbBW~N2)xp(GyIrsKf1e3
zz$ROWSjg>okSIS!h_N8KIZtw)wRw&NS_8+E(DZw>+Rx=jecG1N(Q(v2wWt88wOyb!
zXH+@^y)nG*;)EK*oY4RdIm1&eOnQS%IoV;KaV_p`}WS85>deh?r@P5+*b+p$sxjk
zrPoUt&luE+wnbYCdth97l{Qok3$>nR_?>7Qb>R|6falC@R19S0o`9pm4z)D{wT$j&
zdH!MmSw>ftXYqAH-MszQ%^TP6@7%>Q?pHsgy_tvg<~(IGVFDMfa1l;*Dy@)xfLn+w@0f(jU)QH8uHcUfNJsYk;L&7}Yc4q1;=
zy9qB1ovBUy7S*=)n~&yJXFp^dvyO21;}$o8hVk7t8EzDt1+hc)?v46;J8x~*Z|~fF
z?|QWH&o*^My97}**RpqUCez(}+X6SWcgI&9VART3tC&ln4wo{eWSryR_0{mL0zA68!!^cJWsjMCEk^_CM07{ZZl$)iwtzp;p9)I_zUU*xUQG$(T>G_~QhEqW00*V;TLJ7S*
z0S53cWhljcbcn=lkupuI-$Fgo7oweZf7p4vjfG(ISU(l8DJTX<&^7WZBEPS=!i)wP
z_jYB6JosXWA%pJ-LytCSa1F%aQ;GtAI1k
zfB?^EmMn^8%#!ScZpIwsgwO>?>hip9ob?T%MxM7Fk07A*9B&?ZCMVc<`*=q?A!j#h
zrP5K?%6?U2Ie9NS<(mD+sEkzw9HmAVMRRy6@(gq0*X8V2jgHEtZd2uQz3B~`-*9O|
z+>p8v>bn`a!!g`ahc_Xk-Kb9F_@YN79sKc8AIHh-f$g}|4yG2?5!xn%22*kv6=8^x
z$yk9xWU7Y}3Vv%(3Wh6!@*7a67CuXsuTF2PsEDt`Uc)d-MFl&K}0o!XC04L
zuW?rhhtuQ+qk|J1bcu|qqpXS92)vy%=XAhlA_aC45)f3J`{)9W6X_y~Yk$f}hw^xA
zrSXlT>|>Gi+(w6-8`RD3n#P0xM61*_LOBfsDOm+47Quf-0YuYZeVwU9Y_srLwMoT1
z9{=ij028;gZVq15@91?2x_HyPtxg2!zw}(VSZk8M|H9TZ1aL
zf<<8AV#+f>3uO)3+wvha=|e1@_aZmd21lxJK{Vf1TdOi}kXV7yk7+cV2CJ0h-8PseZ`HGhaVSrp4w&$ML2TW($
z!V$%J`W$%FOVz>l$p|;M|D>E?3&-W-foo%eC7$s~HRS~7`tGA_$tz6Oj(T1x7b3`tCQO!bDrX!+Kcj;cQC?)Q&;rfXzry59eTyuRLoQSa1emW$UNkCzWBNd;2T2!a
zo4s}OZvD-j`}cR=6QShK`#X2ScOFa?e#k*a$;aUM2I{kCZ~*XaG5{0sm%H`Wl2`Ff
zwzw^}d#=5?p5+#F>YVC3EtKchUZg>QEKjVyPp!S^KSleD>MJYss-;j@Zo4s#i{j$U
z5nT0kjAWsQIEqn@VPd30#uU+xWyU$|iWbbU0V2tDy99~}2)jVq*%8$(X`|Z;wQ~#Y
z0ySR|RGiBTY|`;OG9%1|l%c>%$2Y{CY+}?&U1(&~Mj^Zd@2hNMV1G&-JENJwjieB9
zsd=)Y39}oRn%L4nZZ+Rp?4KL;qVvKorK?$U1XFO)gzic0Mj7N>Eje^19Nwjw
zFDQa=1_M-8Yz*Tgy>(XOKZa$x617lyeR3XQ8}8jN6Ksz$7!Z)F4ky5V{1a-IcX42neQN36xTsRJzWl`+}dS_
z%tY-aJWE(sYBY$OzjMn2v@kJHmkw?`=B!PRRl;pji2Ss(T?8&$DW2i3!wb#H@cu_5
zdka=Gq&`qmuN!=5*Cc9$X20$a~kIEwCIC|`3pN)
zkpwK+FV=3FVvXXdGK5_I%1Xxx;0c(m#=vEni@oRqj#ruWd1RdPcOpk@TR>c02x;5Zam!sS`L$2bNc&|8x
z7f1eHf2)4|_RaS&fUZ~Ki6+){-9OI~BlF!me9ibEAQf#DvQh$+eu+z~gx
zIuf?Fcbbo36rK5hvS0+KG@{AGF`v4A7a<7{>cUZZg~YdzX3
zZYvXHJRQ2!i+n*hrY4?G^b;(k-(t&}0WaKhwyz!q5~2}*99y?g+}%sLg$@7AevoB>
zEmcFff5lO?<#kp8BdOuAmUyMR(@RI#3OSbLN_5=EUQi5;wMvFU3HY
zo?#ly@geGjyoN^WYOOIvdL;Y8I&3)NagldbWLs41PW4Usa3yXeG_8!X?`85DklSC=BnjbnW|g$xpE#3not
z0K#rpHmSD{iH0LfN6Tc+ty6v{$B5mby#?)7}tei=~6)1Mg&cXz-G4?6XO7m7;{H9O@
z2#xb5Vq<%{k9n$pGCeM(>fkm#yKUwJCLRLaP!&=zhZL?(%3C=!e+r-jm^zyQpgCp1
zh>nmR?egA`M@(qfUCNOuO}3k8d4B9@jMb2E*Q32;W)yaJKp7evxNruy!|J`)s4XMs
z9-RnUJ2*rfNH~__N$_-)#<)b#UPwt61bh}0(nVFO&`(aYc!y>9DuH$sR>=`OT^_Lq
z78_}^A#S0}F>w%mk~XYi8T)bMF50mcUD+%nr0J%a8iTtpb>L?2@Zc~Ryb%fHHST%E
zQG%P=VH|lP3qrtvqcCs!Qy{9Q(ZUi5SBBJr*P^gmG6*MzMy*=G?Eo*swe-2Uw4ZfW
zk%=#Kk>2U3UoM<;J={xkZ(M7G=YxcPs~e2!3q7;*yda#UbgOp$k9Do~f+6h;0a-yB
z^V?yD7~34L%lKzPz|sran)i5d`vAn@R6{WmAmp@aNiisK{Hj}
zAlX;9qGVjMj#w8Ch~!?uYptX;N@SrW$~v0w1+y^F1v+!HNV!r|=XIshorY;l^j;lu<9=j*s%(Bn)CLEPjd7B{reCVsj+Fm?d6fbZ
zicFz{agDxv>_qaBVF%2}SKK0@yNLD?zV%VwMc7G3BM5O8Y1Xi_(K5^pLdmNvSn4)U
ze}E)mcxZqk)Gcw7_a^BGTVQf}%OTP)Vg30%Q*n&fNK8P@tn4GD8*>)G!cHf-kV;Fk8P3Nh(!NeM2$)*%XTBxDCWE@0q^9MzT5^}4uHw?7$Iq6>A+
zeG{zECD^V&3VUQes3Iknv^(
zp>yDahCSg3UY+Fpgge#Pg3vLr$0KWXBL;ESgb>3j+=rpYWC&*yiDbtnpNWl9qB$A&*HH}Ty-8nYqivBN!USPM
zyD&C!piM_Q5yir1eByv$0Ybh>d{Bd>4Ud;V*ZLBUh^EK>4k|DlLFMxc4euLLh|ywZ
z44qMgXiPP&0!KDrp-2{oaH}4cbFnWQS&xW-fp~h;hAbx`L?)+hYK*9(a4fX!Jpe~2
zD@^>NAzS=GKu#C2IF*;;u=j`QHw6IB<=MwV6z0ENj#}{XkRFQkyEq6`R=(IcjPHUf
z{uos;IKXnR2FE~B>D_GS(uv{b>t12OUxmX9A8^=z`9>o6-?-C9GR~6C*U_senrTCZ
z(aKdY>Zk@}i$>Xw#aW<$GBa8Ykryf|?IpYJu!1@lFzlOC&FwjBLmWGp!D(!csOA`t
z_VC0GdUEK)R3~LvxxfTq1~eY%1@>}Qh(h2j5|I)x2b0Y=w1sOLQVeTaYBbv|gbI5d
zESc=dxlr)HFce9kjWJ203Dv;jIl@02g8?5TNrxXhACxL_F<6L0qp>5`it)Rz(rH*T@>bOjhzhXbL)1u
zKVm9AECMvodz4~dt_TcP>){Utrm|Q_wg?e%l(fYgXFlw+e=WbHV(2@3i(6o1Nvr~+
za1h#DmuEv8BxlqJSLzfFzLj6u_BLxpx6qa9hJ`gP;y=q!5D;sDURp%HUrv4&;UGne
zo#SaV_8KAYpN-yl-m9Tt`-I{WP(Q1SZ>74jUWbY~TfjPB=_Pa36)4luV}PF9WUu{a
zsf^_uDga9>jA4M1wr*+dhX>PLKOF6G6;mPUkLe=gX6q=!Fso(k*PKE{f$~c%NVW%X
ztzBI7N2xzt^i}ZqR(fM;sru4VPvf3q3yjs2-BnY31=SC+A2BpdHrUaw<&t~N2~2{v
zBHv3$ge6lWfiJg0MPt{|X~wku+L
zYuroKtpKpQ=u(K8h%83{cp+oHWt5m>YZr=%Ggh*#IekZ5VCBa?RR$k@)Ooq$ZWQOb
zG<&cI1Gt$I6raF&@!)}nXw4jJHrh#L<-=<(J_@dMhFM-5QB~f^>rUy}kAkC33{xO-
z!VWbgjYf;JE~FxB
zXJf9p!^y?8DiV!`#w&Ow-1_JkgVtg4$}7qJows%*XBA-tWW;bqA2}X4%RKAm;p(`H
z>K$bPQal`2>1*L+ogl_aQjNls8iUMMA5kkFwEt
zR4ssMgUEBzQ;xHKJw^7f?7xsp^HwTJ{&L(9;=e00|Cb}Civw0DS~4hL^{#tFjJXi%
z6L;xt+QHH$E`-(y0vrs)!9i>}2ZQqlp$L||cXclR5Q87<VI!_NR*R-PCFrLHue>Wb2y+MjMZGYtkx`cOJi(d?ok28SHkk
zI7Z=?1v8;IjM!kn^-s3WS7DtIsSy}B#O1~9l9Ick3)oT*bWjROb>40rDthcDFF!0V
z>)`+{kkfYZ3PhocJEc^N&ln4&3`s~pB23@9w{!beQCiYxrp$&7Y?#nq)C}F{#zf^F
zjW{PmxQbO~EFhj@ASedel1Uh5(73^~*+w*i(_@X?74Ojl1A1|P029`T`%}b@
z1E0KVC);t@it!Z!a(i#Nqt0rIJ4gn9}uDX2`_$J
z*X~+mzaQZJmgw|zO$-H@=3B@teg8#0Q0GZ^)gC-Y$4AsDhprn_v{oq
ziT?zYl-BbuemPItM?-9@a3h}lo8W8|p`?|j=NOe5t~{37l{0VlqFSa8u_-fYx!SbW*ckbyLQi
z9Ji2A%$wbZ&10NutE>0KC_zq>nz
zi)tb~FV%Nzj85p@XOVL=6`boNm?2r*U2iYmbuidO`%%x}vvDrBD4x7;yMv=QWsjBy
z>(HXt)1rzvb2@NZev&qk%_`Gyl1A;47&LGp?;)EU7D`Yx%xv~f9@Qv1RhgIZl46Cc
zPA$*O*Zs!yYF9i7#E)b&9tZ{^;a*s}p@@OZ@X+-d8hVqKI)OZGVZaa}Y&ebvG-Zio5rB#<>MFA4mAK%HOlN}}>AJ_qlpr(-
zbAu60D6XwbSRSKXyu!|+Zn$CQaf3A$U*mNjp*7@(M~x%#NV?<|WgXam&mIyDrgk6R+=wvcwo019Cp3-)k{R1FcF=@N{iBjE+7l|%hpqh)o
zgD8Axx?xJedEO~15s4V(TVyOxO?tH3BKH@r5GSYu^e+|?>F7VAGNgHtd$;Je9tt#_
zZlzF=hj{+_d_CA$+gy8f?X|UUti4Y6fQcD1
z$W<}VTfde(kWwr!C8hLr3Bc%*fyDNsCXuoY7ngZ_bai7%Kw=AC=$baNH?+sH--dYm
zDvIDCttd@K$XWo!#2jJSMu2eWLWg4Dv_*_DV1}%jh)=1->aYM0RpKeeRnfEzL8{lw
za%7RAsVT!6trsqXgyRd<$iP4O9|4Y657cj|++Id~_BO&h^MRxHYZCm7^3
z-_$YGzb_|)oLV*oW%?(RIFK_SAqf>PSOfY?Sj4hB(a0)x0Uk6E73jK{?)@s!KuW1k
zB`btR1Cj*YpKTs_wQcyKtPvD$#Ba(E-
zbxUCxUIG&G@#I!+)}a@jg^?ruEv=-mZ%J|kw>wODUO05Ul|rG5ES9QfazU1vF
zhBPU=`p2FyPpe#)dsC!A%)p7U7epS`sGY~H?DKdtZ3W8!-b0q3CE)p=0FIj{PvjZ*
z^T;q!h;=-XhdTIB?-=eAA&7?~%SuP|*BN@Bs2XkJ{Zy$Mg_pMqASM
zy(yn(nBYaJPNHCu+?q9*K{vJxbFBdm-jR(npa!j7Uebm);BMk^sd<(|aAue5)v}NC
zit0CF?{v5&qhd3XPiE?t+bA^wt9_+tVlxlcc{wzIIBYju8VvAH6R3!UMA^lXDhv<<=#uyB_SFBflpwjZVKoK^9FZrxmK$3khY+;mpg~Q}4
zEpFD-&6&msCK*wj+gKhgMDQL%c#47bqXd;`@A{0rCQ&41)6H&}hz|l~2ZU9As
zi%<;Qn2R3e;1u*)&Ae@wB%Ve>*%3*}nDcQ8_RylCC$eC3P8A8Ep6EuLqLHWL8uE48
z`&A{Z6Due*%scL5z=%$hEa_cQ{u^hls4d+`rf;An#YEvfz~T*f9l0gTdTPYzAREAh
zV}}y2lg8Li3Dz@MR9T=Y_@bF&Opa3;7we>E-K^28l{NbogxS&2YlpZ3ihs(@Ox3
zI^qa4s{d=TX`v60(ZemVtc{&_Xct@N$h;8Ud!SDtR2ujWMu6jobW9DEfC+^KxD6Ub
zhyeaqG-;&(%uhDA+F^g8SSUJ87HS68i2wR|Cz3kg85~v>CG>c9Z+yh7f)W2kILj1XfbC0|syVEQ`Hfhu
z?tg`kPp&8H#;%gbP%)C^J%I(9)k$B-)HaN#U^onpiDX_(nii
zu%e}q%=tV@q4mQrKD<^lSzzyRJ}E?2b}oom=MkA23}5Lg!JlL;NUc|z|Ou#Kc(X9J;B(?V;xG#B31
zGo3bvfmkof9OKxRR@!cA-gqMEW!_=>QamPuFwrfISAT!+NJVZn`njri;e{-Nt`-P#6YhTpd4H
zo{8VI!Z=CL&T9eNc+#au3x?!df=15nr?L!?_
zF`!uPRZ_~$4T1%Eo6}~PuYy__V0f456evTHJF|wE|KLg}#jvK-gz6O#9IH7kCD*we
zXiMb9qUt#fxe?WP&6z}fC)ivKETKdxrql#ymA<_&}jRj5I&7(&;$TR
zyGr@rY5y1DOzweU$Wo`nJ3r$bdJ~>e6D#PvE>S|zhq|Cd3zT_tY;i4d
zfDp?)5s>jtDxf^I3UN;x;0QDVh*Oija!4EH*paRs3K>~Ex??im^BtdhLGh&L%dKoy
z@X_`@s=PG%sDdoMaA7f2J>ZM+q`0uStc=pC%n&87glRH#Ig##*-7hOSxU(X2ua&H`
zf~A#Wd^f%kVGtL;M1)HbQYbrLM<1VxYGv$Z#^9!Bx`zZ9118e^B96=xPSL}+CUm}L
z#9B^P^zlk^$ioH^TWY1_hdh;QQ_#Nhjn}Mbf#e%__r32qylXh7)XO;SmDpMD2q%O<
z=h*kH#1Hw<23L7rhb+qygOx45U7P?Y
z+w2>%L#I(oxai!#P8l58l|nGFB-fx-=954O2Z(ieM1|}z#aSOfyZ0FUy$e=OwrC>=sI+BW^$P`}S#xyy~!CJ&i
zL&7%b+Aq{~?@X5nG4Kf)G~KL_c!x`{3Lr#pPvLB3k1D{dSY@z?n8e8?YnXRD<;o*;imNxM0DENVnfV
z5ZNnLm)$xd7;o_FwMMxzxeh{w8DlXLv1>A_Bdv{cRmgJi|CPz`tUQqnT!sl1ZZSO%
zX>V|aB}%t$MKbOTVwa4wp$~Ybvq*%@*xZLM`?f_<@*#zo$UlaME&U2P8FqXgAHvHI
zR@T&8sacvtP}_`Kva(EtLIUZs;%Y-
z8P;Bc;~Y*H(S6a;9b3vRj{oYi5mZTpv097;U`-Q2mI(Yv-C!!*YjTlif}DUL*FspX
zv2kihkvDNTiEl?u?2uN%mE2>6UA;g$FCugPk3{E1WX?|_kNNiR-n+Af>1$6|!Szhl
zHzxVWAR3QbGCCEKqstk_iGt7e0BV!#*JzZ?D+42=znpj!^-#A%5w4*Y3
zDQmry!7(eL%9BFWXz0m8)HF3EwJPM#putKA@laKe54va)!hxK5N#-c2`&9OG=g5n0
zPCpheYDK*n`Z_psa-}|
z+w$(AqhiAt9n77f*kHupWT|Wk(kwA!4PCSiwVi=1h_l1D2&>X+ZgdwsCbBS9;T2p^
zJ6n_s8B8Vg**^XM9``z`kE%IR6pVu{one)7!$6T@JV4`=y|n}@E>iZvfgIFM=HfZE
zp;kR0Q~j+FK}pPi`QJXS%#f{HHQ(cf^8WSd&LW<>1qCN(_kk5QroB**=UME!7Jt?q+xR~*RjK_vB&WGFs3bP9x920@F
z*BrKJjIe!9@5RBXCJw4b`hjVTA5;&69Xqoe7F~Vu
z;b=z>gGk`1_67{3W`VYU=`TRRSUi$UN*|R_Y`QS%OUt0Rz&%ghprQccl?DN0;(b5M?zw-IoKPC)pn@4fK(kAJ-M<`)}3
zT>3o!;nLUs{YPK;+UNiE$4i$VeEJ99{b2cPfBV;e@^_am@xSLTeNE8eKmYmne*FKI
zE;+WfR{H+^XD@y6;U7QWnLK*#($X`3zjW!+GtZ;ooo_$;Q>^eD{`co!ymaY@fAaj^oQ>Lu@zrZ0HIsI=KaMOd39=+6fTce~_uMlYu3-GSS8
z2Qu!gK&ab3>l9-o4-y}!uvrw$-wre
Date: Wed, 3 May 2023 18:30:34 +0200
Subject: [PATCH 058/289] Matter support for Shutters with Tilt (#18569)
---
CHANGELOG.md | 1 +
.../src/embedded/Matter_Plugin_Shutter.be | 12 +-
.../src/embedded/Matter_Plugin_ShutterTilt.be | 68 ++-
.../solidified_Matter_Plugin_Shutter.h | 38 +-
.../solidified_Matter_Plugin_ShutterTilt.h | 404 ++++++++++++++----
5 files changed, 399 insertions(+), 124 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67f37e0ee..ee3c3bebb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
- Matter UI to change endpoints configuration (#18498)
- Matter support for Shutters (without Tilt) (#18509)
- Support for TC74 temperature sensor by Michael Loftis (#18042)
+- Matter support for Shutters with Tilt
### Breaking Changed
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
index c3e0f38df..7648bf5e5 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Shutter.be
@@ -153,8 +153,8 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
#############################################################
# parse sensor
#
- # The device calls regularly `tasmota.read_sensors()` and converts
- # it to json.
+ # parse the output from `ShutterPosition`
+ # Ex: `{"Shutter1":{"Position":50,"Direction":0,"Target":50,"Tilt":30}}`
def parse_sensors(payload)
import string
var k = "Shutter" + str(self.tasmota_shutter_index + 1)
@@ -169,14 +169,6 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
end
self.shadow_shutter_pos = val_pos
end
- # Tilt - we can keep it here knowing that it won't change if not implemented
- var val_tilt = v.find("Tilt")
- if val_tilt != nil
- if val_tilt != self.shadow_shutter_tilt
- self.attribute_updated(0x0102, 0x000F) # CurrentPositionTiltPercent100ths
- end
- self.shadow_shutter_tilt = val_tilt
- end
# Direction
var val_dir = v.find("Direction")
if val_dir != nil
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
index 7d8adb7b4..c181cff36 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
@@ -44,6 +44,7 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
# var shadow_shutter_target
# var shadow_shutter_tilt
# var shadow_shutter_direction # 1=opening -1=closing 0=not moving TODO
+ var tilt_min, tilt_max
#############################################################
# Constructor inherited
@@ -51,6 +52,46 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
#############################################################
# Update shadow inherited
+ #############################################################
+ # parse sensor
+ #
+ # parse the output from `ShutterPosition`
+ # Ex: `{"Shutter1":{"Position":50,"Direction":0,"Target":50,"Tilt":30}}`
+ def parse_sensors(payload)
+ import string
+ var k = "Shutter" + str(self.tasmota_shutter_index + 1)
+ if payload.contains(k)
+ var v = payload[k]
+ # Tilt - we can keep it here knowing that it won't change if not implemented
+ var val_tilt = v.find("Tilt")
+ if val_tilt != nil
+ if val_tilt != self.shadow_shutter_tilt
+ self.attribute_updated(0x0102, 0x000F) # CurrentPositionTiltPercent100ths
+ end
+ self.shadow_shutter_tilt = val_tilt
+ end
+ #
+ end
+ super(self).parse_sensors(payload) # parse other shutter values
+ end
+
+ #############################################################
+ # Update tilt min/max
+ #
+ # Update the min and max tilt values from Status 12
+ def update_tilt_min_max()
+ # get the min/max tilt values
+ var r_st13 = tasmota.cmd("Status 13", true) # issue `Status 13`
+ if r_st13.contains('StatusSHT')
+ r_st13 = r_st13['StatusSHT'] # skip root
+ var d = r_st13.find("SHT"+str(self.tasmota_shutter_index), {}).find('TiltConfig')
+ if d != nil
+ self.tilt_min = int(d[0])
+ self.tilt_max = int(d[1])
+ end
+ end
+ end
+
#############################################################
# read an attribute
#
@@ -67,9 +108,20 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
return TLV.create_TLV(TLV.U1, 1 + 8 + 16) # Operational + Lift Position Aware + Tilt Position Aware
elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
- return TLV.create_TLV(TLV.U2, (100 - self.shadow_shutter_tilt) * 100)
+ self.update_tilt_min_max()
+ if self.tilt_min != nil && self.tilt_max != nil
+ var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt, self.tilt_min, self.tilt_max, 0, 1000)
+ return TLV.create_TLV(TLV.U2, tilt_percentage)
+ else
+ return TLV.create_TLV(TLV.NULL, nil) # return invalid
+ end
elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
- return TLV.create_TLV(TLV.U1, 0) # TODO
+ if self.tilt_min != nil && self.tilt_max != nil
+ var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt, self.tilt_min, self.tilt_max, 0, 1000)
+ return TLV.create_TLV(TLV.U2, tilt_percentage)
+ else
+ return TLV.create_TLV(TLV.NULL, nil) # return invalid
+ end
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
return TLV.create_TLV(TLV.U4, 3 + 4 + 16) # Lift + Tilt + PA_LF + PA_TL
@@ -96,8 +148,16 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
if command == 0x0008 # ---------- GoToTiltPercentage ----------
var tilt = val.findsubval(0)
if tilt != nil
- tilt = tilt / 10
- ctx.log = "tilt%:"+str(tilt)
+ self.update_tilt_min_max()
+ if self.tilt_min != nil && self.tilt_max != nil
+ var tilt_val = tasmota.scale_uint(tilt, 0, 1000, self.tilt_min, self.tilt_max)
+ tasmota.cmd("ShutterTilt"+str(self.tasmota_shutter_index+1) + " " + str(tilt_val), false) # TODO
+ self.update_shadow()
+ ctx.log = "tilt%:"+str(tilt)
+ else
+ ctx.log = "tilt%(no_tilt_support):"+str(tilt)
+ end
+
end
return true
end
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
index 54edf5622..ec02f9890 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Shutter.h
@@ -464,7 +464,7 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
be_nested_proto(
- 13, /* nstack */
+ 12, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@@ -472,7 +472,7 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(Shutter),
/* K2 */ be_nested_str_weak(tasmota_shutter_index),
@@ -482,16 +482,14 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
/* K6 */ be_nested_str_weak(Position),
/* K7 */ be_nested_str_weak(shadow_shutter_pos),
/* K8 */ be_nested_str_weak(attribute_updated),
- /* K9 */ be_nested_str_weak(Tilt),
- /* K10 */ be_nested_str_weak(shadow_shutter_tilt),
- /* K11 */ be_nested_str_weak(Direction),
- /* K12 */ be_nested_str_weak(shadow_shutter_direction),
- /* K13 */ be_nested_str_weak(Target),
- /* K14 */ be_nested_str_weak(shadow_shutter_target),
+ /* K9 */ be_nested_str_weak(Direction),
+ /* K10 */ be_nested_str_weak(shadow_shutter_direction),
+ /* K11 */ be_nested_str_weak(Target),
+ /* K12 */ be_nested_str_weak(shadow_shutter_target),
}),
be_str_weak(parse_sensors),
&be_const_str_solidified,
- ( &(const binstruction[68]) { /* code */
+ ( &(const binstruction[54]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x600C0008, // 0001 GETGBL R3 G8
0x88100102, // 0002 GETMBR R4 R0 K2
@@ -501,7 +499,7 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
0x8C100304, // 0006 GETMET R4 R1 K4
0x5C180600, // 0007 MOVE R6 R3
0x7C100400, // 0008 CALL R4 2
- 0x78120038, // 0009 JMPF R4 #0043
+ 0x7812002A, // 0009 JMPF R4 #0035
0x94100203, // 000A GETIDX R4 R1 R3
0x8C140905, // 000B GETMET R5 R4 K5
0x581C0006, // 000C LDCONST R7 K6
@@ -528,7 +526,7 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
0x781E0003, // 0021 JMPF R7 #0026
0x8C1C0108, // 0022 GETMET R7 R0 K8
0x54260101, // 0023 LDINT R9 258
- 0x542A000E, // 0024 LDINT R10 15
+ 0x542A0009, // 0024 LDINT R10 10
0x7C1C0600, // 0025 CALL R7 3
0x90021406, // 0026 SETMBR R0 K10 R6
0x8C1C0905, // 0027 GETMET R7 R4 K5
@@ -542,24 +540,10 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
0x78220003, // 002F JMPF R8 #0034
0x8C200108, // 0030 GETMET R8 R0 K8
0x542A0101, // 0031 LDINT R10 258
- 0x542E0009, // 0032 LDINT R11 10
+ 0x542E000A, // 0032 LDINT R11 11
0x7C200600, // 0033 CALL R8 3
0x90021807, // 0034 SETMBR R0 K12 R7
- 0x8C200905, // 0035 GETMET R8 R4 K5
- 0x5828000D, // 0036 LDCONST R10 K13
- 0x7C200400, // 0037 CALL R8 2
- 0x4C240000, // 0038 LDNIL R9
- 0x20241009, // 0039 NE R9 R8 R9
- 0x78260007, // 003A JMPF R9 #0043
- 0x8824010E, // 003B GETMBR R9 R0 K14
- 0x20241009, // 003C NE R9 R8 R9
- 0x78260003, // 003D JMPF R9 #0042
- 0x8C240108, // 003E GETMET R9 R0 K8
- 0x542E0101, // 003F LDINT R11 258
- 0x5432000A, // 0040 LDINT R12 11
- 0x7C240600, // 0041 CALL R9 3
- 0x90021C08, // 0042 SETMBR R0 K14 R8
- 0x80000000, // 0043 RET 0
+ 0x80000000, // 0035 RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
index 8126a9e45..9e22968e0 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
@@ -6,12 +6,82 @@
extern const bclass be_class_Matter_Plugin_ShutterTilt;
+/********************************************************************
+** Solidified function: update_tilt_min_max
+********************************************************************/
+be_local_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(cmd),
+ /* K2 */ be_nested_str_weak(Status_X2013),
+ /* K3 */ be_nested_str_weak(contains),
+ /* K4 */ be_nested_str_weak(StatusSHT),
+ /* K5 */ be_nested_str_weak(find),
+ /* K6 */ be_nested_str_weak(SHT),
+ /* K7 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K8 */ be_nested_str_weak(TiltConfig),
+ /* K9 */ be_nested_str_weak(tilt_min),
+ /* K10 */ be_const_int(0),
+ /* K11 */ be_nested_str_weak(tilt_max),
+ /* K12 */ be_const_int(1),
+ }),
+ be_str_weak(update_tilt_min_max),
+ &be_const_str_solidified,
+ ( &(const binstruction[33]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x580C0002, // 0002 LDCONST R3 K2
+ 0x50100200, // 0003 LDBOOL R4 1 0
+ 0x7C040600, // 0004 CALL R1 3
+ 0x8C080303, // 0005 GETMET R2 R1 K3
+ 0x58100004, // 0006 LDCONST R4 K4
+ 0x7C080400, // 0007 CALL R2 2
+ 0x780A0016, // 0008 JMPF R2 #0020
+ 0x94040304, // 0009 GETIDX R1 R1 K4
+ 0x8C080305, // 000A GETMET R2 R1 K5
+ 0x60100008, // 000B GETGBL R4 G8
+ 0x88140107, // 000C GETMBR R5 R0 K7
+ 0x7C100200, // 000D CALL R4 1
+ 0x00120C04, // 000E ADD R4 K6 R4
+ 0x60140013, // 000F GETGBL R5 G19
+ 0x7C140000, // 0010 CALL R5 0
+ 0x7C080600, // 0011 CALL R2 3
+ 0x8C080505, // 0012 GETMET R2 R2 K5
+ 0x58100008, // 0013 LDCONST R4 K8
+ 0x7C080400, // 0014 CALL R2 2
+ 0x4C0C0000, // 0015 LDNIL R3
+ 0x200C0403, // 0016 NE R3 R2 R3
+ 0x780E0007, // 0017 JMPF R3 #0020
+ 0x600C0009, // 0018 GETGBL R3 G9
+ 0x9410050A, // 0019 GETIDX R4 R2 K10
+ 0x7C0C0200, // 001A CALL R3 1
+ 0x90021203, // 001B SETMBR R0 K9 R3
+ 0x600C0009, // 001C GETGBL R3 G9
+ 0x9410050C, // 001D GETIDX R4 R2 K12
+ 0x7C0C0200, // 001E CALL R3 1
+ 0x90021603, // 001F SETMBR R0 K11 R3
+ 0x80000000, // 0020 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
be_nested_proto(
- 13, /* nstack */
+ 16, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@@ -19,7 +89,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[11]) { /* constants */
+ ( &(const bvalue[23]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -28,13 +98,25 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
- /* K8 */ be_nested_str_weak(log),
- /* K9 */ be_nested_str_weak(tilt_X25_X3A),
- /* K10 */ be_nested_str_weak(invoke_request),
+ /* K8 */ be_nested_str_weak(update_tilt_min_max),
+ /* K9 */ be_nested_str_weak(tilt_min),
+ /* K10 */ be_nested_str_weak(tilt_max),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(scale_uint),
+ /* K13 */ be_nested_str_weak(cmd),
+ /* K14 */ be_nested_str_weak(ShutterTilt),
+ /* K15 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K16 */ be_const_int(1),
+ /* K17 */ be_nested_str_weak(_X20),
+ /* K18 */ be_nested_str_weak(update_shadow),
+ /* K19 */ be_nested_str_weak(log),
+ /* K20 */ be_nested_str_weak(tilt_X25_X3A),
+ /* K21 */ be_nested_str_weak(tilt_X25_X28no_tilt_support_X29_X3A),
+ /* K22 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[37]) { /* code */
+ ( &(const binstruction[75]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -42,36 +124,74 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220101, // 0005 LDINT R8 258
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x78220013, // 0007 JMPF R8 #001C
+ 0x78220039, // 0007 JMPF R8 #0042
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220007, // 000A LDINT R8 8
0x1C200E08, // 000B EQ R8 R7 R8
- 0x7822000E, // 000C JMPF R8 #001C
+ 0x78220034, // 000C JMPF R8 #0042
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x4C240000, // 0010 LDNIL R9
0x20241009, // 0011 NE R9 R8 R9
- 0x78260006, // 0012 JMPF R9 #001A
- 0x54260009, // 0013 LDINT R9 10
- 0x0C201009, // 0014 DIV R8 R8 R9
- 0x60240008, // 0015 GETGBL R9 G8
- 0x5C281000, // 0016 MOVE R10 R8
- 0x7C240200, // 0017 CALL R9 1
- 0x00261209, // 0018 ADD R9 K9 R9
- 0x900E1009, // 0019 SETMBR R3 K8 R9
- 0x50240200, // 001A LDBOOL R9 1 0
- 0x80041200, // 001B RET 1 R9
- 0x60200003, // 001C GETGBL R8 G3
- 0x5C240000, // 001D MOVE R9 R0
- 0x7C200200, // 001E CALL R8 1
- 0x8C20110A, // 001F GETMET R8 R8 K10
- 0x5C280200, // 0020 MOVE R10 R1
- 0x5C2C0400, // 0021 MOVE R11 R2
- 0x5C300600, // 0022 MOVE R12 R3
- 0x7C200800, // 0023 CALL R8 4
- 0x80041000, // 0024 RET 1 R8
+ 0x7826002C, // 0012 JMPF R9 #0040
+ 0x8C240108, // 0013 GETMET R9 R0 K8
+ 0x7C240200, // 0014 CALL R9 1
+ 0x88240109, // 0015 GETMBR R9 R0 K9
+ 0x4C280000, // 0016 LDNIL R10
+ 0x2024120A, // 0017 NE R9 R9 R10
+ 0x78260021, // 0018 JMPF R9 #003B
+ 0x8824010A, // 0019 GETMBR R9 R0 K10
+ 0x4C280000, // 001A LDNIL R10
+ 0x2024120A, // 001B NE R9 R9 R10
+ 0x7826001D, // 001C JMPF R9 #003B
+ 0xB8261600, // 001D GETNGBL R9 K11
+ 0x8C24130C, // 001E GETMET R9 R9 K12
+ 0x5C2C1000, // 001F MOVE R11 R8
+ 0x58300007, // 0020 LDCONST R12 K7
+ 0x543603E7, // 0021 LDINT R13 1000
+ 0x88380109, // 0022 GETMBR R14 R0 K9
+ 0x883C010A, // 0023 GETMBR R15 R0 K10
+ 0x7C240C00, // 0024 CALL R9 6
+ 0xB82A1600, // 0025 GETNGBL R10 K11
+ 0x8C28150D, // 0026 GETMET R10 R10 K13
+ 0x60300008, // 0027 GETGBL R12 G8
+ 0x8834010F, // 0028 GETMBR R13 R0 K15
+ 0x00341B10, // 0029 ADD R13 R13 K16
+ 0x7C300200, // 002A CALL R12 1
+ 0x00321C0C, // 002B ADD R12 K14 R12
+ 0x00301911, // 002C ADD R12 R12 K17
+ 0x60340008, // 002D GETGBL R13 G8
+ 0x5C381200, // 002E MOVE R14 R9
+ 0x7C340200, // 002F CALL R13 1
+ 0x0030180D, // 0030 ADD R12 R12 R13
+ 0x50340000, // 0031 LDBOOL R13 0 0
+ 0x7C280600, // 0032 CALL R10 3
+ 0x8C280112, // 0033 GETMET R10 R0 K18
+ 0x7C280200, // 0034 CALL R10 1
+ 0x60280008, // 0035 GETGBL R10 G8
+ 0x5C2C1000, // 0036 MOVE R11 R8
+ 0x7C280200, // 0037 CALL R10 1
+ 0x002A280A, // 0038 ADD R10 K20 R10
+ 0x900E260A, // 0039 SETMBR R3 K19 R10
+ 0x70020004, // 003A JMP #0040
+ 0x60240008, // 003B GETGBL R9 G8
+ 0x5C281000, // 003C MOVE R10 R8
+ 0x7C240200, // 003D CALL R9 1
+ 0x00262A09, // 003E ADD R9 K21 R9
+ 0x900E2609, // 003F SETMBR R3 K19 R9
+ 0x50240200, // 0040 LDBOOL R9 1 0
+ 0x80041200, // 0041 RET 1 R9
+ 0x60200003, // 0042 GETGBL R8 G3
+ 0x5C240000, // 0043 MOVE R9 R0
+ 0x7C200200, // 0044 CALL R8 1
+ 0x8C201116, // 0045 GETMET R8 R8 K22
+ 0x5C280200, // 0046 MOVE R10 R1
+ 0x5C2C0400, // 0047 MOVE R11 R2
+ 0x5C300600, // 0048 MOVE R12 R3
+ 0x7C200800, // 0049 CALL R8 4
+ 0x80041000, // 004A RET 1 R8
})
)
);
@@ -83,7 +203,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
be_nested_proto(
- 12, /* nstack */
+ 14, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
@@ -91,7 +211,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[15]) { /* constants */
+ ( &(const bvalue[21]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -101,16 +221,22 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
/* K6 */ be_nested_str_weak(create_TLV),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_const_int(1),
- /* K9 */ be_nested_str_weak(U2),
- /* K10 */ be_nested_str_weak(shadow_shutter_tilt),
- /* K11 */ be_const_int(0),
- /* K12 */ be_nested_str_weak(U4),
- /* K13 */ be_const_int(3),
- /* K14 */ be_nested_str_weak(read_attribute),
+ /* K9 */ be_nested_str_weak(update_tilt_min_max),
+ /* K10 */ be_nested_str_weak(tilt_min),
+ /* K11 */ be_nested_str_weak(tilt_max),
+ /* K12 */ be_nested_str_weak(tasmota),
+ /* K13 */ be_nested_str_weak(scale_uint),
+ /* K14 */ be_nested_str_weak(shadow_shutter_tilt),
+ /* K15 */ be_const_int(0),
+ /* K16 */ be_nested_str_weak(U2),
+ /* K17 */ be_nested_str_weak(NULL),
+ /* K18 */ be_nested_str_weak(U4),
+ /* K19 */ be_const_int(3),
+ /* K20 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[63]) { /* code */
+ ( &(const binstruction[105]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -118,7 +244,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E0101, // 0005 LDINT R7 258
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E002E, // 0007 JMPF R7 #0037
+ 0x781E0058, // 0007 JMPF R7 #0061
0x8C1C0105, // 0008 GETMET R7 R0 K5
0x7C1C0200, // 0009 CALL R7 1
0x541E0006, // 000A LDINT R7 7
@@ -132,48 +258,156 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0x0028140B, // 0012 ADD R10 R10 R11
0x7C1C0600, // 0013 CALL R7 3
0x80040E00, // 0014 RET 1 R7
- 0x70020020, // 0015 JMP #0037
+ 0x7002004A, // 0015 JMP #0061
0x541E000E, // 0016 LDINT R7 15
0x1C1C0C07, // 0017 EQ R7 R6 R7
- 0x781E0009, // 0018 JMPF R7 #0023
- 0x8C1C0906, // 0019 GETMET R7 R4 K6
- 0x88240909, // 001A GETMBR R9 R4 K9
- 0x542A0063, // 001B LDINT R10 100
- 0x882C010A, // 001C GETMBR R11 R0 K10
- 0x0428140B, // 001D SUB R10 R10 R11
- 0x542E0063, // 001E LDINT R11 100
- 0x0828140B, // 001F MUL R10 R10 R11
- 0x7C1C0600, // 0020 CALL R7 3
- 0x80040E00, // 0021 RET 1 R7
- 0x70020013, // 0022 JMP #0037
- 0x541E000B, // 0023 LDINT R7 12
- 0x1C1C0C07, // 0024 EQ R7 R6 R7
- 0x781E0005, // 0025 JMPF R7 #002C
- 0x8C1C0906, // 0026 GETMET R7 R4 K6
- 0x88240907, // 0027 GETMBR R9 R4 K7
- 0x5828000B, // 0028 LDCONST R10 K11
- 0x7C1C0600, // 0029 CALL R7 3
- 0x80040E00, // 002A RET 1 R7
- 0x7002000A, // 002B JMP #0037
- 0x541EFFFB, // 002C LDINT R7 65532
- 0x1C1C0C07, // 002D EQ R7 R6 R7
- 0x781E0007, // 002E JMPF R7 #0037
- 0x8C1C0906, // 002F GETMET R7 R4 K6
- 0x8824090C, // 0030 GETMBR R9 R4 K12
- 0x542A0003, // 0031 LDINT R10 4
- 0x002A1A0A, // 0032 ADD R10 K13 R10
- 0x542E000F, // 0033 LDINT R11 16
- 0x0028140B, // 0034 ADD R10 R10 R11
- 0x7C1C0600, // 0035 CALL R7 3
- 0x80040E00, // 0036 RET 1 R7
- 0x601C0003, // 0037 GETGBL R7 G3
- 0x5C200000, // 0038 MOVE R8 R0
- 0x7C1C0200, // 0039 CALL R7 1
- 0x8C1C0F0E, // 003A GETMET R7 R7 K14
- 0x5C240200, // 003B MOVE R9 R1
- 0x5C280400, // 003C MOVE R10 R2
- 0x7C1C0600, // 003D CALL R7 3
- 0x80040E00, // 003E RET 1 R7
+ 0x781E001D, // 0018 JMPF R7 #0037
+ 0x8C1C0109, // 0019 GETMET R7 R0 K9
+ 0x7C1C0200, // 001A CALL R7 1
+ 0x881C010A, // 001B GETMBR R7 R0 K10
+ 0x4C200000, // 001C LDNIL R8
+ 0x201C0E08, // 001D NE R7 R7 R8
+ 0x781E0011, // 001E JMPF R7 #0031
+ 0x881C010B, // 001F GETMBR R7 R0 K11
+ 0x4C200000, // 0020 LDNIL R8
+ 0x201C0E08, // 0021 NE R7 R7 R8
+ 0x781E000D, // 0022 JMPF R7 #0031
+ 0xB81E1800, // 0023 GETNGBL R7 K12
+ 0x8C1C0F0D, // 0024 GETMET R7 R7 K13
+ 0x8824010E, // 0025 GETMBR R9 R0 K14
+ 0x8828010A, // 0026 GETMBR R10 R0 K10
+ 0x882C010B, // 0027 GETMBR R11 R0 K11
+ 0x5830000F, // 0028 LDCONST R12 K15
+ 0x543603E7, // 0029 LDINT R13 1000
+ 0x7C1C0C00, // 002A CALL R7 6
+ 0x8C200906, // 002B GETMET R8 R4 K6
+ 0x88280910, // 002C GETMBR R10 R4 K16
+ 0x5C2C0E00, // 002D MOVE R11 R7
+ 0x7C200600, // 002E CALL R8 3
+ 0x80041000, // 002F RET 1 R8
+ 0x70020004, // 0030 JMP #0036
+ 0x8C1C0906, // 0031 GETMET R7 R4 K6
+ 0x88240911, // 0032 GETMBR R9 R4 K17
+ 0x4C280000, // 0033 LDNIL R10
+ 0x7C1C0600, // 0034 CALL R7 3
+ 0x80040E00, // 0035 RET 1 R7
+ 0x70020029, // 0036 JMP #0061
+ 0x541E000B, // 0037 LDINT R7 12
+ 0x1C1C0C07, // 0038 EQ R7 R6 R7
+ 0x781E001B, // 0039 JMPF R7 #0056
+ 0x881C010A, // 003A GETMBR R7 R0 K10
+ 0x4C200000, // 003B LDNIL R8
+ 0x201C0E08, // 003C NE R7 R7 R8
+ 0x781E0011, // 003D JMPF R7 #0050
+ 0x881C010B, // 003E GETMBR R7 R0 K11
+ 0x4C200000, // 003F LDNIL R8
+ 0x201C0E08, // 0040 NE R7 R7 R8
+ 0x781E000D, // 0041 JMPF R7 #0050
+ 0xB81E1800, // 0042 GETNGBL R7 K12
+ 0x8C1C0F0D, // 0043 GETMET R7 R7 K13
+ 0x8824010E, // 0044 GETMBR R9 R0 K14
+ 0x8828010A, // 0045 GETMBR R10 R0 K10
+ 0x882C010B, // 0046 GETMBR R11 R0 K11
+ 0x5830000F, // 0047 LDCONST R12 K15
+ 0x543603E7, // 0048 LDINT R13 1000
+ 0x7C1C0C00, // 0049 CALL R7 6
+ 0x8C200906, // 004A GETMET R8 R4 K6
+ 0x88280910, // 004B GETMBR R10 R4 K16
+ 0x5C2C0E00, // 004C MOVE R11 R7
+ 0x7C200600, // 004D CALL R8 3
+ 0x80041000, // 004E RET 1 R8
+ 0x70020004, // 004F JMP #0055
+ 0x8C1C0906, // 0050 GETMET R7 R4 K6
+ 0x88240911, // 0051 GETMBR R9 R4 K17
+ 0x4C280000, // 0052 LDNIL R10
+ 0x7C1C0600, // 0053 CALL R7 3
+ 0x80040E00, // 0054 RET 1 R7
+ 0x7002000A, // 0055 JMP #0061
+ 0x541EFFFB, // 0056 LDINT R7 65532
+ 0x1C1C0C07, // 0057 EQ R7 R6 R7
+ 0x781E0007, // 0058 JMPF R7 #0061
+ 0x8C1C0906, // 0059 GETMET R7 R4 K6
+ 0x88240912, // 005A GETMBR R9 R4 K18
+ 0x542A0003, // 005B LDINT R10 4
+ 0x002A260A, // 005C ADD R10 K19 R10
+ 0x542E000F, // 005D LDINT R11 16
+ 0x0028140B, // 005E ADD R10 R10 R11
+ 0x7C1C0600, // 005F CALL R7 3
+ 0x80040E00, // 0060 RET 1 R7
+ 0x601C0003, // 0061 GETGBL R7 G3
+ 0x5C200000, // 0062 MOVE R8 R0
+ 0x7C1C0200, // 0063 CALL R7 1
+ 0x8C1C0F14, // 0064 GETMET R7 R7 K20
+ 0x5C240200, // 0065 MOVE R9 R1
+ 0x5C280400, // 0066 MOVE R10 R2
+ 0x7C1C0600, // 0067 CALL R7 3
+ 0x80040E00, // 0068 RET 1 R7
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_ShutterTilt_parse_sensors, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[10]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(Shutter),
+ /* K2 */ be_nested_str_weak(tasmota_shutter_index),
+ /* K3 */ be_const_int(1),
+ /* K4 */ be_nested_str_weak(contains),
+ /* K5 */ be_nested_str_weak(find),
+ /* K6 */ be_nested_str_weak(Tilt),
+ /* K7 */ be_nested_str_weak(shadow_shutter_tilt),
+ /* K8 */ be_nested_str_weak(attribute_updated),
+ /* K9 */ be_nested_str_weak(parse_sensors),
+ }),
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[32]) { /* code */
+ 0xA40A0000, // 0000 IMPORT R2 K0
+ 0x600C0008, // 0001 GETGBL R3 G8
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x00100903, // 0003 ADD R4 R4 K3
+ 0x7C0C0200, // 0004 CALL R3 1
+ 0x000E0203, // 0005 ADD R3 K1 R3
+ 0x8C100304, // 0006 GETMET R4 R1 K4
+ 0x5C180600, // 0007 MOVE R6 R3
+ 0x7C100400, // 0008 CALL R4 2
+ 0x7812000E, // 0009 JMPF R4 #0019
+ 0x94100203, // 000A GETIDX R4 R1 R3
+ 0x8C140905, // 000B GETMET R5 R4 K5
+ 0x581C0006, // 000C LDCONST R7 K6
+ 0x7C140400, // 000D CALL R5 2
+ 0x4C180000, // 000E LDNIL R6
+ 0x20180A06, // 000F NE R6 R5 R6
+ 0x781A0007, // 0010 JMPF R6 #0019
+ 0x88180107, // 0011 GETMBR R6 R0 K7
+ 0x20180A06, // 0012 NE R6 R5 R6
+ 0x781A0003, // 0013 JMPF R6 #0018
+ 0x8C180108, // 0014 GETMET R6 R0 K8
+ 0x54220101, // 0015 LDINT R8 258
+ 0x5426000E, // 0016 LDINT R9 15
+ 0x7C180600, // 0017 CALL R6 3
+ 0x90020E05, // 0018 SETMBR R0 K7 R5
+ 0x60100003, // 0019 GETGBL R4 G3
+ 0x5C140000, // 001A MOVE R5 R0
+ 0x7C100200, // 001B CALL R4 1
+ 0x8C100909, // 001C GETMET R4 R4 K9
+ 0x5C180200, // 001D MOVE R6 R1
+ 0x7C100400, // 001E CALL R4 2
+ 0x80000000, // 001F RET 0
})
)
);
@@ -185,15 +419,15 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
********************************************************************/
extern const bclass be_class_Matter_Plugin_Shutter;
be_local_class(Matter_Plugin_ShutterTilt,
- 0,
+ 2,
&be_class_Matter_Plugin_Shutter,
- be_nested_map(5,
+ be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(TYPE, 1), be_nested_str_weak(shutter_X2Btilt) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(shutter_X2Btilt) },
+ { be_const_key_weak(update_tilt_min_max, 0), be_const_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max_closure) },
+ { be_const_key_weak(parse_sensors, 7), be_const_closure(Matter_Plugin_ShutterTilt_parse_sensors_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) },
- { be_const_key_weak(invoke_request, 3), be_const_closure(Matter_Plugin_ShutterTilt_invoke_request_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) },
- { be_const_key_weak(CLUSTERS, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -205,6 +439,10 @@ be_local_class(Matter_Plugin_ShutterTilt,
be_const_int(65532),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_ShutterTilt_invoke_request_closure) },
+ { be_const_key_weak(tilt_min, 2), be_const_var(0) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) },
+ { be_const_key_weak(tilt_max, -1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin_ShutterTilt)
);
From fe1bc615f00d12c6f98dffe77691640586d27324 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Wed, 3 May 2023 21:18:26 +0200
Subject: [PATCH 059/289] ESP32 LVGL library from v8.3.6 to v8.3.7 (no
functional change) (#18573)
* ESP32 LVGL library from v8.3.7 to v8.3.7 (no functional change)
* Fix version
---
CHANGELOG.md | 1 +
lib/libesp32_lvgl/lvgl/library.json | 2 +-
lib/libesp32_lvgl/lvgl/library.properties | 2 +-
lib/libesp32_lvgl/lvgl/lv_conf_template.h | 2 +-
lib/libesp32_lvgl/lvgl/lvgl.h | 2 +-
.../lvgl/src/core/lv_indev_scroll.c | 5 ++-
.../lvgl/src/core/lv_obj_style.c | 1 +
.../lvgl/src/draw/arm2d/lv_gpu_arm2d.c | 45 +++++++++++++++++--
.../lvgl/src/extra/widgets/menu/lv_menu.c | 5 +++
.../src/extra/widgets/spinbox/lv_spinbox.c | 3 --
lib/libesp32_lvgl/lvgl/src/misc/lv_color.h | 9 +++-
.../lvgl/src/widgets/lv_btnmatrix.h | 25 ++++++-----
12 files changed, 77 insertions(+), 25 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee3c3bebb..61d7359d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
### Changed
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
- Refactored Zero Cross Dimmer (#18481)
+- ESP32 LVGL library from v8.3.6 to v8.3.7 (no functional change)
### Fixed
- ESP8266 Energy Export Active no update regression from v12.3.1.3
diff --git a/lib/libesp32_lvgl/lvgl/library.json b/lib/libesp32_lvgl/lvgl/library.json
index 928d7beed..2efd28a17 100644
--- a/lib/libesp32_lvgl/lvgl/library.json
+++ b/lib/libesp32_lvgl/lvgl/library.json
@@ -1,6 +1,6 @@
{
"name": "lvgl",
- "version": "8.3.6",
+ "version": "8.3.7",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
diff --git a/lib/libesp32_lvgl/lvgl/library.properties b/lib/libesp32_lvgl/lvgl/library.properties
index 19de5008b..c8f7ae9c1 100644
--- a/lib/libesp32_lvgl/lvgl/library.properties
+++ b/lib/libesp32_lvgl/lvgl/library.properties
@@ -1,5 +1,5 @@
name=lvgl
-version=8.3.6
+version=8.3.7
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
diff --git a/lib/libesp32_lvgl/lvgl/lv_conf_template.h b/lib/libesp32_lvgl/lvgl/lv_conf_template.h
index f36af2a28..86ca20764 100644
--- a/lib/libesp32_lvgl/lvgl/lv_conf_template.h
+++ b/lib/libesp32_lvgl/lvgl/lv_conf_template.h
@@ -1,6 +1,6 @@
/**
* @file lv_conf.h
- * Configuration file for v8.3.6
+ * Configuration file for v8.3.7
*/
/*
diff --git a/lib/libesp32_lvgl/lvgl/lvgl.h b/lib/libesp32_lvgl/lvgl/lvgl.h
index 6eedc7f23..985c796c9 100644
--- a/lib/libesp32_lvgl/lvgl/lvgl.h
+++ b/lib/libesp32_lvgl/lvgl/lvgl.h
@@ -15,7 +15,7 @@ extern "C" {
***************************/
#define LVGL_VERSION_MAJOR 8
#define LVGL_VERSION_MINOR 3
-#define LVGL_VERSION_PATCH 6
+#define LVGL_VERSION_PATCH 7
#define LVGL_VERSION_INFO ""
/*********************
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_indev_scroll.c b/lib/libesp32_lvgl/lvgl/src/core/lv_indev_scroll.c
index 3a7318316..8a36ab30a 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_indev_scroll.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_indev_scroll.c
@@ -281,12 +281,13 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
while(obj_act) {
/*Get the transformed scroll_sum with this object*/
int16_t angle = 0;
- int16_t zoom = 256;
+ int32_t zoom = 256;
lv_point_t pivot = { 0, 0 };
lv_obj_t * parent = obj_act;
while(parent) {
angle += lv_obj_get_style_transform_angle(parent, 0);
- zoom *= (lv_obj_get_style_transform_zoom(parent, 0) / 256);
+ int32_t zoom_act = lv_obj_get_style_transform_zoom(parent, 0);
+ zoom = (zoom * zoom_act) >> 8;
parent = lv_obj_get_parent(parent);
}
diff --git a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
index c6cdf825c..c71c9f951 100644
--- a/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
+++ b/lib/libesp32_lvgl/lvgl/src/core/lv_obj_style.c
@@ -749,6 +749,7 @@ static void trans_anim_cb(void * _tr, int32_t v)
else value_final.ptr = tr->end_value.ptr;
break;
case LV_STYLE_BG_COLOR:
+ case LV_STYLE_BG_GRAD_COLOR:
case LV_STYLE_BORDER_COLOR:
case LV_STYLE_TEXT_COLOR:
case LV_STYLE_SHADOW_COLOR:
diff --git a/lib/libesp32_lvgl/lvgl/src/draw/arm2d/lv_gpu_arm2d.c b/lib/libesp32_lvgl/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
index f294125be..83f3e6605 100644
--- a/lib/libesp32_lvgl/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
+++ b/lib/libesp32_lvgl/lvgl/src/draw/arm2d/lv_gpu_arm2d.c
@@ -3,6 +3,24 @@
*
*/
+/*
+ * Copyright (C) 2010-2023 Arm Limited or its affiliates. All rights reserved.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
/*********************
* INCLUDES
*********************/
@@ -94,6 +112,8 @@
arm_2dp_rgb565_tile_transform_with_src_mask_and_opacity_prepare
#define arm_2d_tile_transform_with_opacity_prepare \
arm_2dp_rgb565_tile_transform_with_opacity_prepare
+#define arm_2d_tile_transform_only_with_opacity_prepare \
+ arm_2dp_rgb565_tile_transform_only_with_opacity_prepare
#define arm_2d_tile_transform_prepare \
arm_2dp_rgb565_tile_transform_prepare
@@ -131,6 +151,8 @@
arm_2dp_cccn888_tile_transform_with_src_mask_and_opacity_prepare
#define arm_2d_tile_transform_with_opacity_prepare \
arm_2dp_cccn888_tile_transform_with_opacity_prepare
+#define arm_2d_tile_transform_only_with_opacity_prepare \
+ arm_2dp_cccn888_tile_transform_only_with_opacity_prepare
#define arm_2d_tile_transform_prepare \
arm_2dp_cccn888_tile_transform_prepare
@@ -345,7 +367,7 @@
#define __RECOLOUR_END() \
} while(0); \
if (NULL != rgb_tmp_buf) { \
- lv_free(rgb_tmp_buf); \
+ lv_mem_buf_release(rgb_tmp_buf); \
} \
} while(0); \
src_buf = src_buf_org;
@@ -1270,8 +1292,7 @@ static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
source_center.iX = draw_dsc->pivot.x;
source_center.iY = draw_dsc->pivot.y;
- if((LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED == cf) ||
- (LV_IMG_CF_TRUE_COLOR == cf)) {
+ if(LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED == cf) {
__ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
arm_2d_tile_transform_with_opacity_prepare,
@@ -1289,6 +1310,24 @@ static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
);
is_accelerated = true;
}
+ #if ARM_2D_VERISON >= 10103
+ else if (LV_IMG_CF_TRUE_COLOR == cf) {
+ __ARM_2D_PREPARE_TRANS_AND_TARGET_REGION(
+ arm_2d_tile_transform_only_with_opacity_prepare,
+ &source_tile,
+ source_center,
+ ARM_2D_ANGLE((draw_dsc->angle / 10.0f)),
+ draw_dsc->zoom / 256.0f,
+ blend_dsc.opa);
+
+ arm_2d_tile_transform(
+ &target_tile,
+ &target_region,
+ NULL
+ );
+ is_accelerated = true;
+ }
+ #endif
else if (LV_IMG_CF_RGB565A8 == cf) {
static arm_2d_tile_t mask_tile;
mask_tile = source_tile;
diff --git a/lib/libesp32_lvgl/lvgl/src/extra/widgets/menu/lv_menu.c b/lib/libesp32_lvgl/lvgl/src/extra/widgets/menu/lv_menu.c
index 78577e770..f8dfd41cb 100644
--- a/lib/libesp32_lvgl/lvgl/src/extra/widgets/menu/lv_menu.c
+++ b/lib/libesp32_lvgl/lvgl/src/extra/widgets/menu/lv_menu.c
@@ -195,6 +195,11 @@ void lv_menu_set_page(lv_obj_t * obj, lv_obj_t * page)
lv_menu_t * menu = (lv_menu_t *)obj;
+ /* Guard against setting the same page again */
+ if(menu->main_page == page) {
+ return;
+ }
+
/* Hide previous page */
if(menu->main_page != NULL) {
lv_obj_set_parent(menu->main_page, menu->storage);
diff --git a/lib/libesp32_lvgl/lvgl/src/extra/widgets/spinbox/lv_spinbox.c b/lib/libesp32_lvgl/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
index 34691053e..37db45c37 100644
--- a/lib/libesp32_lvgl/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
+++ b/lib/libesp32_lvgl/lvgl/src/extra/widgets/spinbox/lv_spinbox.c
@@ -434,9 +434,6 @@ static void lv_spinbox_event(const lv_obj_class_t * class_p, lv_event_t * e)
else if(c == LV_KEY_DOWN) {
lv_spinbox_decrement(obj);
}
- else {
- lv_textarea_add_char(obj, c);
- }
}
}
diff --git a/lib/libesp32_lvgl/lvgl/src/misc/lv_color.h b/lib/libesp32_lvgl/lvgl/src/misc/lv_color.h
index 2cc92f277..5ff7b1a86 100644
--- a/lib/libesp32_lvgl/lvgl/src/misc/lv_color.h
+++ b/lib/libesp32_lvgl/lvgl/src/misc/lv_color.h
@@ -440,7 +440,11 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix(lv_color_t c1, lv_co
{
lv_color_t ret;
-#if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP == 0 && LV_COLOR_MIX_ROUND_OFS == 0
+#if LV_COLOR_DEPTH == 16 && LV_COLOR_MIX_ROUND_OFS == 0
+#if LV_COLOR_16_SWAP == 1
+ c1.full = c1.full << 8 | c1.full >> 8;
+ c2.full = c2.full << 8 | c2.full >> 8;
+#endif
/*Source: https://stackoverflow.com/a/50012418/1999969*/
mix = (uint32_t)((uint32_t)mix + 4) >> 3;
uint32_t bg = (uint32_t)((uint32_t)c2.full | ((uint32_t)c2.full << 16)) &
@@ -448,6 +452,9 @@ LV_ATTRIBUTE_FAST_MEM static inline lv_color_t lv_color_mix(lv_color_t c1, lv_co
uint32_t fg = (uint32_t)((uint32_t)c1.full | ((uint32_t)c1.full << 16)) & 0x7E0F81F;
uint32_t result = ((((fg - bg) * mix) >> 5) + bg) & 0x7E0F81F;
ret.full = (uint16_t)((result >> 16) | result);
+#if LV_COLOR_16_SWAP == 1
+ ret.full = ret.full << 8 | ret.full >> 8;
+#endif
#elif LV_COLOR_DEPTH != 1
/*LV_COLOR_DEPTH == 8, 16 or 32*/
LV_COLOR_SET_R(ret, LV_UDIV255((uint16_t)LV_COLOR_GET_R(c1) * mix + LV_COLOR_GET_R(c2) *
diff --git a/lib/libesp32_lvgl/lvgl/src/widgets/lv_btnmatrix.h b/lib/libesp32_lvgl/lvgl/src/widgets/lv_btnmatrix.h
index 780d57b68..2edf202cc 100644
--- a/lib/libesp32_lvgl/lvgl/src/widgets/lv_btnmatrix.h
+++ b/lib/libesp32_lvgl/lvgl/src/widgets/lv_btnmatrix.h
@@ -32,18 +32,19 @@ LV_EXPORT_CONST_INT(LV_BTNMATRIX_BTN_NONE);
/** Type to store button control bits (disabled, hidden etc.)
* The first 3 bits are used to store the width*/
enum {
- _LV_BTNMATRIX_WIDTH = 0x0007, /**< Reserved to stire the size units*/
- LV_BTNMATRIX_CTRL_HIDDEN = 0x0008, /**< Button hidden*/
- LV_BTNMATRIX_CTRL_NO_REPEAT = 0x0010, /**< Do not repeat press this button.*/
- LV_BTNMATRIX_CTRL_DISABLED = 0x0020, /**< Disable this button.*/
- LV_BTNMATRIX_CTRL_CHECKABLE = 0x0040, /**< The button can be toggled.*/
- LV_BTNMATRIX_CTRL_CHECKED = 0x0080, /**< Button is currently toggled (e.g. checked).*/
- LV_BTNMATRIX_CTRL_CLICK_TRIG = 0x0100, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/
- LV_BTNMATRIX_CTRL_POPOVER = 0x0200, /**< Show a popover when pressing this key*/
- LV_BTNMATRIX_CTRL_RECOLOR = 0x1000, /**< Enable text recoloring with `#color`*/
- _LV_BTNMATRIX_CTRL_RESERVED = 0x2000, /**< Reserved for later use*/
- LV_BTNMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/
- LV_BTNMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/
+ _LV_BTNMATRIX_WIDTH = 0x000F, /**< Reserved to store the size units*/
+ LV_BTNMATRIX_CTRL_HIDDEN = 0x0010, /**< Button hidden*/
+ LV_BTNMATRIX_CTRL_NO_REPEAT = 0x0020, /**< Do not repeat press this button.*/
+ LV_BTNMATRIX_CTRL_DISABLED = 0x0040, /**< Disable this button.*/
+ LV_BTNMATRIX_CTRL_CHECKABLE = 0x0080, /**< The button can be toggled.*/
+ LV_BTNMATRIX_CTRL_CHECKED = 0x0100, /**< Button is currently toggled (e.g. checked).*/
+ LV_BTNMATRIX_CTRL_CLICK_TRIG = 0x0200, /**< 1: Send LV_EVENT_VALUE_CHANGE on CLICK, 0: Send LV_EVENT_VALUE_CHANGE on PRESS*/
+ LV_BTNMATRIX_CTRL_POPOVER = 0x0400, /**< Show a popover when pressing this key*/
+ LV_BTNMATRIX_CTRL_RECOLOR = 0x0800, /**< Enable text recoloring with `#color`*/
+ _LV_BTNMATRIX_CTRL_RESERVED_1 = 0x1000, /**< Reserved for later use*/
+ _LV_BTNMATRIX_CTRL_RESERVED_2 = 0x2000, /**< Reserved for later use*/
+ LV_BTNMATRIX_CTRL_CUSTOM_1 = 0x4000, /**< Custom free to use flag*/
+ LV_BTNMATRIX_CTRL_CUSTOM_2 = 0x8000, /**< Custom free to use flag*/
};
typedef uint16_t lv_btnmatrix_ctrl_t;
From 9097f508fd49bf1404db28999d78c15c4d6b67ac Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Wed, 3 May 2023 21:44:09 +0200
Subject: [PATCH 060/289] BugFix Garage + new shutterbuttons options (#18572)
* Fix GarageMode movements
* BugFix Garage + new shutterbuttons options
- Removed logging
- shutterbuttons support incremental change
- garage mode, fix #18539 and fix #18442
---
.../xdrv_27_esp32_shutter.ino | 208 +++++++++++++-----
.../tasmota_xdrv_driver/xdrv_27_shutter.ino | 3 +
2 files changed, 158 insertions(+), 53 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
index bb7aec959..83b623cf5 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
@@ -51,14 +51,29 @@
#define MAX_SHUTTERS_ESP32 16
//
-const uint32_t SHUTTER_VERSION = 0x01010000; // Latest driver version (See settings deltas below)
+const uint32_t SHUTTER_VERSION = 0x01010100; // Latest driver version (See settings deltas below)
+
+typedef struct { // depreciated 2023-04-28
+ int8_t pos;
+ int8_t tilt;
+ bool mqtt_broadcast;
+} tPosition_old;
typedef struct {
int8_t pos;
int8_t tilt;
bool mqtt_broadcast;
+ int8_t pos_incrdecr;
+ int8_t tilt_incrdecr;
} tPosition;
+typedef struct { // depreciated 2023-04-28
+ bool enabled;
+ bool mqtt_all;
+ uint8_t shutter_number;
+ tPosition_old position[4];
+} tButtonSettings_old;
+
typedef struct {
bool enabled;
bool mqtt_all;
@@ -85,6 +100,7 @@ struct SHUTTERSETTINGS {
uint8_t shutter_startrelay[MAX_SHUTTERS_ESP32];
uint8_t shutter_motordelay[MAX_SHUTTERS_ESP32];
uint16_t shutter_pwmrange[2][MAX_SHUTTERS_ESP32];
+ tButtonSettings_old shutter_button_old[MAX_SHUTTERS_ESP32*2]; // depreciated 2023-04-28
tButtonSettings shutter_button[MAX_SHUTTERS_ESP32*2];
} ShutterSettings;
@@ -233,11 +249,29 @@ void ShutterSettingsDefault(void) {
void ShutterSettingsDelta(void) {
// Fix possible setting deltas
if (ShutterSettings.version != SHUTTER_VERSION) { // Fix version dependent changes
-/*
+
if (ShutterSettings.version < 0x01010100) {
AddLog(LOG_LEVEL_INFO, PSTR("SHT: Update oldest version restore"));
+
+ for (uint8_t i=0; i < MAX_SHUTTERS_ESP32; i++){
+ if (ShutterSettings.shutter_startrelay[i] == 0) continue;
+ AddLog(LOG_LEVEL_INFO, PSTR("SHT: %s SHT%d:%d"),D_CMND_SHUTTER_RELAY,i+1,ShutterSettings.shutter_startrelay[i]);
+ AddLog(LOG_LEVEL_INFO, PSTR("SHT: %s: %d"),D_CMND_SHUTTER_OPENTIME,ShutterSettings.shutter_opentime[i]);
+ AddLog(LOG_LEVEL_INFO, PSTR("SHT: %s: %d"),D_CMND_SHUTTER_CLOSETIME,ShutterSettings.shutter_closetime[i]);
+ }
+ for (uint8_t i=0; i < MAX_SHUTTERS_ESP32*2; i++){
+ ShutterSettings.shutter_button[i].enabled = ShutterSettings.shutter_button_old[i].enabled;
+ ShutterSettings.shutter_button[i].mqtt_all = ShutterSettings.shutter_button_old[i].mqtt_all;
+ ShutterSettings.shutter_button[i].shutter_number = ShutterSettings.shutter_button_old[i].shutter_number;
+ for (uint8_t j = 0; j < 4; j++){
+ ShutterSettings.shutter_button[i].position[j].pos = ShutterSettings.shutter_button_old[i].position[j].pos;
+ ShutterSettings.shutter_button[i].position[j].tilt = ShutterSettings.shutter_button_old[i].position[j].tilt;
+ ShutterSettings.shutter_button[i].position[j].mqtt_broadcast = ShutterSettings.shutter_button_old[i].position[j].mqtt_broadcast;
+ }
+ }
}
+/*
if (ShutterSettings.version < 0x01010101) {
AddLog(LOG_LEVEL_INFO, PSTR("SHT: Update old version restore"));
@@ -425,6 +459,8 @@ void ShutterRtc50mS(void)
int32_t ShutterPercentToRealPosition(int16_t percent, uint32_t index)
{
+ // if inverted recalculate the percentposition
+ percent = (ShutterSettings.shutter_options[index] & 1) ? 100 - percent : percent;
if (ShutterSettings.shutter_set50percent[index] != 50) {
return (percent <= 5) ? ShutterSettings.shuttercoeff[2][index] * percent*10 : (ShutterSettings.shuttercoeff[1][index] * percent + (ShutterSettings.shuttercoeff[0][index]*10))*10;
} else {
@@ -485,7 +521,9 @@ uint8_t ShutterRealToPercentPosition(int32_t realpos, uint32_t index)
break;
}
}
- return realpercent < 0 ? 0 : realpercent;
+ realpercent = realpercent < 0 ? 0 : realpercent;
+ // if inverted recalculate the percentposition
+ return (ShutterSettings.shutter_options[index] & 1) ? 100 - realpercent : realpercent;
}
}
@@ -663,9 +701,7 @@ void ShutterReportPosition(bool always, uint32_t index)
shutter_running++;
}
if (i && index == MAX_SHUTTERS_ESP32) { ResponseAppend_P(PSTR(",")); }
- uint32_t position = ShutterRealToPercentPosition(Shutter[i].real_position, i);
- uint32_t target = ShutterRealToPercentPosition(Shutter[i].target_position, i);
- ResponseAppend_P(JSON_SHUTTER_POS, i+1, (ShutterSettings.shutter_options[i] & 1) ? 100-position : position, Shutter[i].direction,(ShutterSettings.shutter_options[i] & 1) ? 100-target : target, Shutter[i].tilt_real_pos );
+ ResponseAppend_P(JSON_SHUTTER_POS, i+1, ShutterRealToPercentPosition(Shutter[i].real_position, i), Shutter[i].direction, ShutterRealToPercentPosition(Shutter[i].target_position, i), Shutter[i].tilt_real_pos );
}
ResponseJsonEnd();
if (always || shutter_running) {
@@ -769,7 +805,7 @@ void ShutterDecellerateForStop(uint8_t i)
void ShutterPowerOff(uint8_t i)
{
- AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Stop %d Mode %d time %d"), i+1,Shutter[i].switch_mode, Shutter[i].time); // fix log to indicate correct shutter number
+ AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Stop %d Mode %d time %d, last source %d"), i+1,Shutter[i].switch_mode, Shutter[i].time, TasmotaGlobal.last_source); // fix log to indicate correct shutter number
ShutterDecellerateForStop(i);
uint8_t cur_relay = ShutterSettings.shutter_startrelay[i] + (Shutter[i].direction == 1 ? 0 : (uint8_t)(ShutterGlobal.position_mode == SHT_TIME)) ;
if (Shutter[i].direction !=0) {
@@ -790,14 +826,18 @@ void ShutterPowerOff(uint8_t i)
break;
case SHT_PULSE:
// we have a momentary switch here. Needs additional pulse on same relay after the end
- if ((SRC_PULSETIMER == TasmotaGlobal.last_source || SRC_SHUTTER == TasmotaGlobal.last_source || SRC_WEBGUI == TasmotaGlobal.last_source)) {
- ExecuteCommandPowerShutter(cur_relay, 1, SRC_SHUTTER);
- // switch off direction relay to make it power less
- if (((1 << (ShutterSettings.shutter_startrelay[i])) & TasmotaGlobal.power) && ShutterSettings.shutter_startrelay[i]+1 != cur_relay) {
- ExecuteCommandPowerShutter(ShutterSettings.shutter_startrelay[i]+1, 0, SRC_SHUTTER);
- }
- } else {
- TasmotaGlobal.last_source = SRC_SHUTTER;
+ switch (TasmotaGlobal.last_source) {
+ case SRC_PULSETIMER:
+ case SRC_SHUTTER:
+ case SRC_WEBGUI:
+ ExecuteCommandPowerShutter(cur_relay, 1, SRC_SHUTTER);
+ // switch off direction relay to make it power less
+ if (((1 << (ShutterSettings.shutter_startrelay[i])) & TasmotaGlobal.power) && ShutterSettings.shutter_startrelay[i]+1 != cur_relay) {
+ ExecuteCommandPowerShutter(ShutterSettings.shutter_startrelay[i]+1, 0, SRC_SHUTTER);
+ }
+ break;
+ default:
+ TasmotaGlobal.last_source = SRC_SHUTTER;
}
break;
}
@@ -913,7 +953,7 @@ void ShutterUpdatePosition(void)
// sending MQTT result to broker
snprintf_P(scommand, sizeof(scommand),PSTR(D_SHUTTER "%d"), i+1);
GetTopic_P(stopic, STAT, TasmotaGlobal.mqtt_topic, scommand);
- Response_P("%d", (ShutterSettings.shutter_options[i] & 1) ? 100 - ShutterSettings.shutter_position[i]: ShutterSettings.shutter_position[i]);
+ Response_P("%d", ShutterSettings.shutter_position[i]);
MqttPublish(stopic, Settings->flag.mqtt_power_retain); // CMND_POWERRETAIN
}
@@ -1160,7 +1200,11 @@ bool ShutterButtonHandlerMulti(void)
char databuf[1] = "";
XdrvMailbox.data = databuf;
XdrvMailbox.command = NULL;
- uint8_t position = ShutterSettings.shutter_button[button_index].position[pos_press_index].pos;
+ int8_t position = ShutterSettings.shutter_button[button_index].position[pos_press_index].pos;
+ if (position == -1) {
+ position = tmin(100,tmax(0,ShutterRealToPercentPosition(Shutter[XdrvMailbox.index-1].real_position, XdrvMailbox.index-1)
+ + ShutterSettings.shutter_button[button_index].position[pos_press_index].pos_incrdecr));
+ }
XdrvMailbox.payload = position;
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d -> %d"), shutter_index+1, position);
if (102 == position) {
@@ -1173,9 +1217,21 @@ bool ShutterButtonHandlerMulti(void)
}
// set the tilt
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Target tilt %d for button %d"), ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt, button_index+1);
- if (ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt != -128) {
- Shutter[shutter_index].tilt_target_pos_override = ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt;
+ switch (ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt) {
+ // No change in tilt defined
+ case -128:
+ break;
+ // tilt change defined on position or (127) incr/decr
+ case 127:
+ Shutter[shutter_index].tilt_target_pos_override = Shutter[shutter_index].tilt_real_pos + ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt_incrdecr;
+ break;
+ default:
+ Shutter[shutter_index].tilt_target_pos_override = ShutterSettings.shutter_button[button_index].position[pos_press_index].tilt;
}
+
+ // set the tilt
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Target tilt %d for button %d"), Shutter[shutter_index].tilt_target_pos_override, button_index+1);
+
// reset button to default
Button.press_counter[button_index] = 0;
@@ -1202,9 +1258,6 @@ bool ShutterButtonHandlerMulti(void)
ResponseJsonEnd();
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_STAT, PSTR(D_PRFX_SHUTTER));
-
-
-
return true;
}
@@ -1238,7 +1291,6 @@ bool ShutterButtonHandler(void)
return true;
}
-
//long press detected. Start moving shutter into direction
if (PRESSED == button
&& Shutter[shutter_index].direction == 0 //shutter in STOP Position
@@ -1376,6 +1428,7 @@ void CmndShutterStop(void)
AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Stop %d: dir: %d"), XdrvMailbox.index, Shutter[i].direction);
Shutter[i].target_position = Shutter[i].real_position;
+ TasmotaGlobal.last_source = SRC_SHUTTER;
}
if (XdrvMailbox.command)
ResponseCmndDone();
@@ -1471,9 +1524,8 @@ void CmndShutterPosition(void)
int8_t target_pos_percent = (XdrvMailbox.payload < 0) ? (XdrvMailbox.payload == -99 ? ShutterRealToPercentPosition(Shutter[index].real_position, index) : 0) : ((XdrvMailbox.payload > 100) ? 100 : XdrvMailbox.payload);
// webgui still send also on inverted shutter the native position.
- target_pos_percent = ((ShutterSettings.shutter_options[index] & 1) && (SRC_WEBGUI != TasmotaGlobal.last_source)) ? 100 - target_pos_percent : target_pos_percent;
+ target_pos_percent = ((ShutterSettings.shutter_options[index] & 1) && (SRC_WEBGUI == TasmotaGlobal.last_source)) ? 100 - target_pos_percent : target_pos_percent;
if (XdrvMailbox.payload != -99) {
- //target_pos_percent = (ShutterSettings.shutter_options[index] & 1) ? 100 - target_pos_percent : target_pos_percent;
Shutter[index].target_position = ShutterPercentToRealPosition(target_pos_percent, index);
//Shutter[i].accelerator[index] = ShutterGlobal.open_velocity_max / ((Shutter[i].motordelay[index] > 0) ? Shutter[i].motordelay[index] : 1);
//Shutter[i].target_position[index] = XdrvMailbox.payload < 5 ? ShutterSettings.shuttercoeff[2][index] * XdrvMailbox.payload : ShutterSettings.shuttercoeff[1][index] * XdrvMailbox.payload + ShutterSettings.shuttercoeff[0,index];
@@ -1526,6 +1578,7 @@ void CmndShutterPosition(void)
}
break;
case SHT_TIME_GARAGE:
+ //AddLog(LOG_LEVEL_INFO, PSTR("SHT: Garage Skip Relay: %d"), ShutterGlobal.skip_relay_change);
if (!ShutterGlobal.skip_relay_change) {
if (new_shutterdirection == Shutter[index].lastdirection) {
AddLog(LOG_LEVEL_INFO, PSTR("SHT: Garage not move in this direction: %d"), Shutter[index].switch_mode == SHT_PULSE);
@@ -1673,7 +1726,7 @@ void CmndShutterButton(void)
// (setting>> 2)&(0x3f) : shutter_position single press 0 disabled, 1..101 == 0..100%, 102 == toggle
// (setting>> 0)&(0x03) : shutter_index
if (XdrvMailbox.data_len > 0) {
- uint32_t i = 0;
+ uint32_t i = 0; // tokencount on " "
uint32_t button_index = 0;
bool done = false;
bool isShortCommand = false;
@@ -1686,44 +1739,62 @@ void CmndShutterButton(void)
for (char *str = strtok_r(data_copy, " ", &str_ptr); str && i < (1+4+4+1); str = strtok_r(nullptr, " ", &str_ptr), i++) {
int field = -1;
int tilt = -128;
- int j = 0;
+ int pos_incrdecr = 0;
+ int tilt_incrdecr = 0;
+ int j = 0; // tokencount on "/"
char field_copy[strlen(str) +1];
strncpy(field_copy, str, sizeof(field_copy)); // Duplicate data as strtok_r will modify it.
- // Loop through the data string, splitting on '/' seperators.
+ // Loop through the data string, splitting on '/' seperators. Syntax position[0..100]/tilt[-90..90]
for (char *str2 = strtok_r(field_copy, "/", &str_ptr2); str2 && j < 2; str2 = strtok_r(nullptr, "/", &str_ptr2), j++) {
switch (j) {
case 0:
switch (str2[0]) {
- case '-':
- field = -1;
- break;
- case 't':
+ case 't': // toggle the tilt. currently not implemented
field = 102;
break;
+ case '-':
+ case '+':
+ field = -1;
+ // check for trigger -- or ++ for incremental change
+ if (str2[1] == '-' || str2[1] == '+') {
+ str2[0] = ' ';
+ pos_incrdecr = atoi(str2);
+ }
+ break;
default:
field = atoi(str2);
break;
}
+ if (i>0)
+ AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: FINAL: pos:%d, inc:%d, string:%s"),field,pos_incrdecr,str2);
break;
case 1:
switch (str2[0]) {
- case '-': // special handling to seperate a - from a negative number. e.g. -90
- if (strlen(str2)==1) {
- tilt = -128;
- } else {
- tilt = atoi(str2);
- }
- break;
case 't':
tilt = 127;
break;
+ case '-': // special handling to seperate a - from a negative number. e.g. -90
+ case '+':
+ if (strlen(str2)==1 && str2[0] == '-') {
+ tilt = -128;
+ } else {
+ if (str2[1] == '-' || str2[1] == '+') {
+ str2[0] = ' ';
+ tilt = 127;
+ tilt_incrdecr = atoi(str2);
+ } else {
+ tilt = atoi(str2);
+ }
+ }
+ break;
default:
tilt = atoi(str2);
break;
}
+ AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: FINAL: tilt:%d, inc:%d, string:%s"),tilt,tilt_incrdecr,str2);
break;
}
- }
+ } // end scanning "++10/-90" tokens
switch (i) {
case 0:
if ((field >= -1) && (field<=MAX_SHUTTERS_ESP32*2)) {
@@ -1771,10 +1842,17 @@ void CmndShutterButton(void)
*/
case 3:
case 4:
+ AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: CASE4: pos:%d, tilt:%d, incpos:%d, inctilt:%d"),
+ field,tilt,pos_incrdecr,tilt_incrdecr);
+
if ((field >= -1) && (field<=102))
setting.position[i-1].pos = field;
if ((tilt >= -128) && (tilt<=127))
- setting.position[i-1].tilt = tilt;
+ setting.position[i-1].tilt = tilt;
+ if ((pos_incrdecr >= -100) && (pos_incrdecr <= 100))
+ setting.position[i-1].pos_incrdecr = pos_incrdecr;
+ if ((tilt_incrdecr >= -90) && (tilt_incrdecr <= 90))
+ setting.position[i-1].tilt_incrdecr = tilt_incrdecr;
break;
case 5:
case 6:
@@ -1818,18 +1896,44 @@ void CmndShutterButton(void)
for (uint32_t j=0 ; j < 4 ; j++) {
int8_t pos = setting.position[j].pos;
int8_t postilt = setting.position[j].tilt;
+ int8_t pos_incrdecr = setting.position[j].pos_incrdecr;
+ int8_t tilt_incrdecr = setting.position[j].tilt_incrdecr;
+ AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Merging: pos:%d, tilt:%d, incpos:%d, inctilt:%d"),
+ pos,postilt,pos_incrdecr,tilt_incrdecr);
if (0 <= pos)
if (102 == pos) {
setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR(" t"));
} else {
setting_chr_ptr += snprintf_P(setting_chr_ptr, 5, PSTR(" %d"), pos);
}
- else
- setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR(" -"));
- if (-128 != postilt) {
+ else {
+ switch (pos_incrdecr) {
+ case 0:
+ setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR(" -"));
+ break;
+ default:
+ if (pos_incrdecr > 0)
+ setting_chr_ptr += snprintf_P(setting_chr_ptr, 6, PSTR(" ++%d"), pos_incrdecr);
+ else
+ setting_chr_ptr += snprintf_P(setting_chr_ptr, 6, PSTR(" -%d"), pos_incrdecr);
+ break;
+ }
+ }
+
+ if (-128 != postilt || tilt_incrdecr !=0) {
setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR("/"));
if (127 == postilt) {
- setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR("t"));
+ switch (tilt_incrdecr) {
+ case 0:
+ setting_chr_ptr += sprintf_P(setting_chr_ptr, PSTR("t"));
+ break;
+ default:
+ if (tilt_incrdecr > 0)
+ setting_chr_ptr += snprintf_P(setting_chr_ptr, 5, PSTR("++%d"), tilt_incrdecr);
+ else
+ setting_chr_ptr += snprintf_P(setting_chr_ptr, 5, PSTR("-%d"), tilt_incrdecr);
+ break;
+ }
} else {
setting_chr_ptr += snprintf_P(setting_chr_ptr, 5, PSTR("%d"), postilt);
}
@@ -1881,6 +1985,7 @@ void CmndShutterSetClose(void)
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= TasmotaGlobal.shutters_present)) {
Shutter[XdrvMailbox.index -1].real_position = 0;
Shutter[XdrvMailbox.index -1].tilt_real_pos = Shutter[XdrvMailbox.index -1].tilt_config[0];
+ Shutter[XdrvMailbox.index -1].lastdirection = -1;
ShutterStartInit(XdrvMailbox.index -1, 0, 0);
ShutterSettings.shutter_position[XdrvMailbox.index -1] = 0;
ResponseCmndIdxChar(D_CONFIGURATION_RESET);
@@ -1892,6 +1997,7 @@ void CmndShutterSetOpen(void)
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= TasmotaGlobal.shutters_present)) {
Shutter[XdrvMailbox.index -1].real_position = Shutter[XdrvMailbox.index -1].open_max;
Shutter[XdrvMailbox.index -1].tilt_real_pos = Shutter[XdrvMailbox.index -1].tilt_config[1];
+ Shutter[XdrvMailbox.index -1].lastdirection = 1;
ShutterStartInit(XdrvMailbox.index -1, 0, Shutter[XdrvMailbox.index -1].open_max);
ShutterSettings.shutter_position[XdrvMailbox.index -1] = 100;
ResponseCmndIdxChar(D_CONFIGURATION_RESET);
@@ -2185,15 +2291,11 @@ bool Xdrv27(uint32_t function)
break;
case FUNC_JSON_APPEND:
for (uint8_t i = 0; i < TasmotaGlobal.shutters_present; i++) {
- uint8_t position = ShutterRealToPercentPosition(Shutter[i].real_position, i);
- uint8_t target = ShutterRealToPercentPosition(Shutter[i].target_position, i);
-
ResponseAppend_P(",");
- ResponseAppend_P(JSON_SHUTTER_POS, i+1, ((ShutterSettings.shutter_options[i] & 1) ? 100 - position : position), Shutter[i].direction,
- ((ShutterSettings.shutter_options[i] & 1) ? 100 - target : target), Shutter[i].tilt_real_pos);
+ ResponseAppend_P(JSON_SHUTTER_POS, i+1, ShutterRealToPercentPosition(Shutter[i].real_position, i), Shutter[i].direction, ShutterRealToPercentPosition(Shutter[i].target_position, i), Shutter[i].tilt_real_pos);
#ifdef USE_DOMOTICZ
if ((0 == TasmotaGlobal.tele_period) && (0 == i)) {
- DomoticzSensor(DZ_SHUTTER, position);
+ DomoticzSensor(DZ_SHUTTER, ShutterRealToPercentPosition(Shutter[i].real_position, i));
}
#endif // USE_DOMOTICZ
}
@@ -2203,7 +2305,7 @@ bool Xdrv27(uint32_t function)
// extract the number of the relay that was switched and save for later in Update Position.
ShutterGlobal.RelayCurrentMask = XdrvMailbox.index ^ ShutterGlobal.RelayOldMask;
ShutterGlobal.LastChangedRelay = ShutterGetRelayNoFromBitfield(XdrvMailbox.index ^ ShutterGlobal.RelayOldMask);
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: FUNC_SET_POWER Relaymask %d SwitchedRelay:%d by %s, payload %d, powermask %d"), ShutterGlobal.RelayOldMask, ShutterGlobal.LastChangedRelay,GetTextIndexed(stemp1, sizeof(stemp1), TasmotaGlobal.last_source, kCommandSource),XdrvMailbox.payload, TasmotaGlobal.power);
+ //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: FUNC_SET_POWER Relaymask %d SwitchedRelay:%d by %s, payload %d, powermask %d"), ShutterGlobal.RelayOldMask, ShutterGlobal.LastChangedRelay,GetTextIndexed(stemp1, sizeof(stemp1), TasmotaGlobal.last_source, kCommandSource),XdrvMailbox.payload, TasmotaGlobal.power);
save_powermatrix = TasmotaGlobal.power; // can be changed in ShutterRelayChanged
if (!ShutterGlobal.LastChangedRelay) {
ShutterGlobal.skip_relay_change = 1;
@@ -2225,7 +2327,7 @@ bool Xdrv27(uint32_t function)
//ExecuteCommandPowerShutter(i+1, 0, SRC_SHUTTER); // should not required anymore. check for bugs
if (ShutterGlobal.LastChangedRelay) ShutterGlobal.RelayOldMask = TasmotaGlobal.power ^= 1<<(ShutterGlobal.LastChangedRelay-1);
}
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: FUNC_SET_DEVICE_POWER end. powermask %ld, current rel: %ld"), TasmotaGlobal.power, ShutterGlobal.RelayOldMask);
+ //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: FUNC_SET_DEVICE_POWER end. powermask %ld, current rel: %ld"), TasmotaGlobal.power, ShutterGlobal.RelayOldMask);
break;
case FUNC_BUTTON_MULTI_PRESSED:
if (XdrvMailbox.index < MAX_SHUTTERS_ESP32*2 && ShutterSettings.shutter_button[XdrvMailbox.index].enabled) {
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
index 566778289..7229a8942 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino
@@ -1256,6 +1256,7 @@ void CmndShutterStop(void)
AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Stop %d: dir: %d"), XdrvMailbox.index, Shutter[i].direction);
Shutter[i].target_position = Shutter[i].real_position;
+ TasmotaGlobal.last_source = SRC_SHUTTER;
}
if (XdrvMailbox.command)
ResponseCmndDone();
@@ -1710,6 +1711,7 @@ void CmndShutterSetClose(void)
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= TasmotaGlobal.shutters_present)) {
Shutter[XdrvMailbox.index -1].real_position = 0;
Shutter[XdrvMailbox.index -1].tilt_real_pos = Shutter[XdrvMailbox.index -1].tilt_config[0];
+ Shutter[XdrvMailbox.index -1].lastdirection = -1;
ShutterStartInit(XdrvMailbox.index -1, 0, 0);
Settings->shutter_position[XdrvMailbox.index -1] = 0;
ResponseCmndIdxChar(D_CONFIGURATION_RESET);
@@ -1721,6 +1723,7 @@ void CmndShutterSetOpen(void)
if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= TasmotaGlobal.shutters_present)) {
Shutter[XdrvMailbox.index -1].real_position = Shutter[XdrvMailbox.index -1].open_max;
Shutter[XdrvMailbox.index -1].tilt_real_pos = Shutter[XdrvMailbox.index -1].tilt_config[1];
+ Shutter[XdrvMailbox.index -1].lastdirection = 1;
ShutterStartInit(XdrvMailbox.index -1, 0, Shutter[XdrvMailbox.index -1].open_max);
Settings->shutter_position[XdrvMailbox.index -1] = 100;
ResponseCmndIdxChar(D_CONFIGURATION_RESET);
From c26ec4440773665cc2575e1af03a40ed3a647b40 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Wed, 3 May 2023 23:03:01 +0200
Subject: [PATCH 061/289] Matter POC for remote Relay (#18575)
---
CHANGELOG.md | 1 +
.../berry_matter/src/be_matter_module.c | 4 +
.../src/embedded/Matter_Device.be | 16 +-
.../src/embedded/Matter_Plugin.be | 61 +-
.../src/embedded/Matter_Plugin_Bridge_HTTP.be | 228 +++++
.../embedded/Matter_Plugin_Bridge_OnOff.be | 135 +++
.../src/embedded/Matter_Plugin_Light0.be | 1 +
.../src/embedded/Matter_Plugin_OnOff.be | 1 +
.../src/embedded/Matter_Plugin_Sensor.be | 1 +
.../embedded/Matter_Plugin_Sensor_Humidity.be | 2 +-
.../Matter_Plugin_Sensor_Illuminance.be | 2 +-
.../embedded/Matter_Plugin_Sensor_Pressure.be | 2 +-
.../src/embedded/Matter_Plugin_Sensor_Temp.be | 2 +-
.../berry_matter/src/embedded/Matter_UI.be | 23 +-
.../src/solidify/solidified_Matter_Device.h | 44 +-
.../src/solidify/solidified_Matter_Plugin.h | 941 ++++++++++--------
.../solidified_Matter_Plugin_Bridge_HTTP.h | 665 +++++++++++++
.../solidified_Matter_Plugin_Bridge_OnOff.h | 400 ++++++++
.../solidified_Matter_Plugin_Light0.h | 357 +++----
.../solidify/solidified_Matter_Plugin_OnOff.h | 321 +++---
.../solidified_Matter_Plugin_Sensor.h | 163 +--
...solidified_Matter_Plugin_Sensor_Humidity.h | 17 +-
...idified_Matter_Plugin_Sensor_Illuminance.h | 15 +-
...solidified_Matter_Plugin_Sensor_Pressure.h | 15 +-
.../solidified_Matter_Plugin_Sensor_Temp.h | 17 +-
.../src/solidify/solidified_Matter_UI.h | 564 +++++------
.../xdrv_52_3_berry_tasmota.ino | 2 +-
27 files changed, 2837 insertions(+), 1163 deletions(-)
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 61d7359d2..b556e979c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
- Matter support for Shutters (without Tilt) (#18509)
- Support for TC74 temperature sensor by Michael Loftis (#18042)
- Matter support for Shutters with Tilt
+- Matter POC for remote Relay
### Breaking Changed
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 459518fee..6469098a3 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -166,6 +166,8 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Sensor_Temp.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h"
+#include "solidify/solidified_Matter_Plugin_Bridge_HTTP.h"
+#include "solidify/solidified_Matter_Plugin_Bridge_OnOff.h"
/*********************************************************************************************\
* Get a bytes() object of the certificate DAC/PAI_Cert
@@ -346,6 +348,8 @@ module matter (scope: global, strings: weak) {
Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor
Plugin_Sensor_Illuminance, class(be_class_Matter_Plugin_Sensor_Illuminance) // Illuminance Sensor
Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor
+ Plugin_Bridge_HTTP, class(be_class_Matter_Plugin_Bridge_HTTP) // HTTP bridge superclass
+ Plugin_Bridge_OnOff, class(be_class_Matter_Plugin_Bridge_OnOff) // HTTP Relay/Light behavior (OnOff)
}
@const_object_info_end */
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
index e96321fb8..d027e7dfd 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be
@@ -297,10 +297,16 @@ class Matter_Device
if self.commissioning_open != nil && tasmota.time_reached(self.commissioning_open) # timeout reached, close provisioning
self.commissioning_open = nil
end
- # call all plugins
+ end
+
+ #############################################################
+ # dispatch every 250ms to all plugins
+ def every_250ms()
+ self.message_handler.every_250ms()
+ # call all plugins, use a manual loop to avoid creating a new object
var idx = 0
while idx < size(self.plugins)
- self.plugins[idx].every_second()
+ self.plugins[idx].every_250ms()
idx += 1
end
end
@@ -334,12 +340,6 @@ class Matter_Device
self.tick += 1
end
- #############################################################
- # dispatch every 250ms click to sub-objects that need it
- def every_250ms()
- self.message_handler.every_250ms()
- end
-
#############################################################
def stop()
tasmota.remove_driver(self)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
index 142987bc3..8f725225d 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be
@@ -23,10 +23,15 @@
#@ solidify:Matter_Plugin,weak
class Matter_Plugin
+ # Global type system for plugins
static var TYPE = "" # name of the plug-in in json
static var NAME = "" # display name of the plug-in
static var ARG = "" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
+ # Behavior of the plugin, frequency at which `update_shadow()` is called
+ static var UPDATE_TIME = 5000 # default is every 5 seconds
+ var update_next # next timestamp for update
+ # Configuration of the plugin: clusters and type
static var CLUSTERS = {
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
}
@@ -53,6 +58,12 @@ class Matter_Plugin
self.clusters = self.consolidate_clusters()
end
+ #############################################################
+ # return the map of all types
+ def get_types()
+ return self.TYPES
+ end
+
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
def update_shadow()
@@ -139,10 +150,11 @@ class Matter_Plugin
if attribute == 0x0000 # ---------- DeviceTypeList / list[DeviceTypeStruct] ----------
var dtl = TLV.Matter_TLV_array()
- for dt: self.TYPES.keys()
+ var types = self.get_types()
+ for dt: types.keys()
var d1 = dtl.add_struct()
d1.add_TLV(0, TLV.U2, dt) # DeviceType
- d1.add_TLV(1, TLV.U2, self.TYPES[dt]) # Revision
+ d1.add_TLV(1, TLV.U2, types[dt]) # Revision
end
return dtl
elif attribute == 0x0001 # ---------- ServerList / list[cluster-id] ----------
@@ -227,9 +239,48 @@ class Matter_Plugin
end
#############################################################
- # every_second
- def every_second()
- self.update_shadow() # force reading value and sending subscriptions
+ # every_250ms
+ #
+ # check if the timer expired and update_shadow() needs to be called
+ def every_250ms()
+ if self.update_next == nil
+ # initialization to a random value within range
+ import crypto
+ var rand31 = crypto.random(4).get(0,4) & 0x7FFFFFFF # random int over 31 bits
+ self.update_next = tasmota.millis(rand31 % self.UPDATE_TIME)
+ else
+ if tasmota.time_reached(self.update_next)
+ self.update_shadow_lazy() # call update_shadow if not already called
+ self.update_next = tasmota.millis(self.UPDATE_TIME) # rearm timer
+ end
+ end
+ end
+
+ #############################################################
+ # UI Methods
+ #############################################################
+ # ui_conf_to_string
+ #
+ # Convert the current plugin parameters to a single string
+ static def ui_conf_to_string(cl, conf)
+ var arg_name = cl.ARG
+ var arg = arg_name ? str(conf.find(arg_name, '')) : ''
+ # print("MTR: ui_conf_to_string", conf, cl, arg_name, arg)
+ return arg
+ end
+
+ #############################################################
+ # ui_string_to_conf
+ #
+ # Convert the string in UI to actual parameters added to the map
+ static def ui_string_to_conf(cl, conf, arg)
+ var arg_name = cl.ARG
+ var arg_type = cl.ARG_TYPE
+ if arg && arg_name
+ conf[arg_name] = arg_type(arg)
+ end
+ # print("ui_string_to_conf", conf, arg)
+ return conf
end
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be
new file mode 100644
index 000000000..612fe489d
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be
@@ -0,0 +1,228 @@
+#
+# Matter_Plugin_Bridge_HTTP.be - implements base class for a Bridge via HTTP
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Device end
+
+#@ solidify:Matter_Plugin_Bridge_HTTP,weak
+
+class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device
+ static var TYPE = "" # name of the plug-in in json
+ static var NAME = "" # display name of the plug-in
+ static var ARG = "" # additional argument name (or empty if none)
+ static var ARG_HTTP = "url" # domain name
+ static var UPDATE_TIME = 3000 # update every 3s
+ static var HTTP_TIMEOUT = 300 # wait for 300ms max, since we're on LAN
+ static var CLUSTERS = {
+ # 0x001D: inherited # Descriptor Cluster 9.5 p.453
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
+ # 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
+
+ # 0x0028: [0,1,2,3,4,5,6,7,8,9,0x0A,0x0F,0x12,0x13],# Basic Information Cluster cluster 11.1 p.565
+ 0x0039: [0x11] # Bridged Device Basic Information 9.13 p.485
+
+ }
+ # static var TYPES = { 0x010A: 2 } # On/Off Light
+
+ var tasmota_http # domain name for HTTP, ex: 'http://192.168.1.10/'
+ var tasmota_status_8 # remote `Status 8` sensor values (last known)
+ var tasmota_status_11 # remote `Status 11` light values (last known)
+ # each contain a `_tick` attribute to known when they were last loaded
+ var reachable # is the device reachable
+ var reachable_tick # last tick when the reachability was seen (avoids sending superfluous ping commands)
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, arguments)
+ import string
+ super(self).init(device, endpoint, arguments)
+
+ var http = arguments.find(self.ARG_HTTP)
+ if http
+ if string.find(http, '://') < 0
+ http = "http://" + http + "/"
+ end
+ self.tasmota_http = http
+ else
+ tasmota.log(string.format("MTR: ERROR: 'url' is not configured for endpoint %i", endpoint), 2)
+ end
+ self.tasmota_status_8 = nil
+ self.tasmota_status_11 = nil
+ self.reachable = false # force a valid bool value
+ end
+
+ #############################################################
+ # return the map of all types, add the bridged type
+ def get_types()
+ var types = {}
+ for k: self.TYPES.keys()
+ types[k] = self.TYPES[k]
+ end
+ # Add Bridged Node
+ types[0x0013] = 1 # Bridged Node, v1
+ return types
+ end
+
+ #############################################################
+ # call_remote
+ #
+ # Call a remote Tasmota device, returns Berry native map or nil
+ def call_remote(cmd, arg)
+ if !self.tasmota_http return nil end
+ import json
+ import string
+ if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network
+ var retry = 2 # try 2 times if first failed
+ while retry > 0
+ var cl = webclient()
+ cl.set_timeouts(1000, 1000)
+ cl.set_follow_redirects(false)
+ var url = string.format("%scm?cmnd=%s%%20%s", self.tasmota_http, cmd, arg ? arg : '')
+ tasmota.log("MTR: HTTP GET "+url, 3)
+ cl.begin(url)
+ var r = cl.GET()
+ tasmota.log("MTR: HTTP GET code=" + str(r), 3)
+ if r == 200
+ var s = cl.get_string()
+ cl.close()
+ tasmota.log("MTR: HTTP GET payload=" + s, 3)
+ var j = json.load(s)
+ # device is known to be reachable
+ self.reachable = true
+ self.reachable_tick = self.device.tick
+ return j
+ end
+ cl.close()
+
+ retry -= 1
+ tasmota.log("MTR: HTTP GET retrying", 3)
+ end
+ self.reachable = false
+ return nil
+ end
+
+ #############################################################
+ # is_reachable()
+ #
+ # Pings the device and checks if it's reachable
+ def is_reachable()
+ if self.device.tick != self.reachable_tick
+ var ret = self.call_remote("", "") # empty command works as a ping
+ self.reachable = (ret != nil)
+ # self.reachable_tick = cur_tick # done by caller
+ end
+ return self.reachable
+ end
+
+ #############################################################
+ # get_status_8()
+ #
+ # Get remote `Status 8` values of sensors, and cache for the current tick
+ def get_status_8()
+ var cur_tick = self.device.tick
+ if self.tasmota_status_8 == nil || self.tasmota_status_8.find("_tick") != cur_tick
+ var ret = self.call_remote("Status", "8") # call `Status 8`
+ if ret
+ ret["_tick"] = cur_tick
+ self.tasmota_status_8 = ret
+ return ret
+ else
+ return nil
+ end
+ else
+ return self.tasmota_status_8 # return cached value
+ end
+ end
+
+ #############################################################
+ # get_status_11()
+ #
+ # Get remote `Status 11` values of sensors, and cache for the current tick
+ def get_status_11()
+ var cur_tick = self.device.tick
+ if self.tasmota_status_11 == nil || self.tasmota_status_11.find("_tick") != cur_tick
+ var ret = self.call_remote("Status", "11") # call `Status 8`
+ if ret
+ ret["_tick"] = cur_tick
+ self.tasmota_status_11 = ret
+ return ret
+ else
+ return nil
+ end
+ else
+ return self.tasmota_status_11 # return cached value
+ end
+ end
+
+ #############################################################
+ # read attribute
+ #
+ def read_attribute(session, ctx)
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ==========
+
+ if attribute == 0x0000 # ---------- DataModelRevision / CommissioningWindowStatus ----------
+ # return TLV.create_TLV(TLV.U2, 1)
+ elif attribute == 0x0011 # ---------- Reachable / bool ----------
+ return TLV.create_TLV(TLV.BOOL, true) # TODO find a way to do a ping
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+ #############################################################
+ # UI Methods
+ #############################################################
+ # ui_conf_to_string
+ #
+ # Convert the current plugin parameters to a single string
+ static def ui_conf_to_string(cl, conf)
+ var s = super(_class).ui_conf_to_string(cl, conf)
+
+ var url = str(conf.find(_class.ARG_HTTP, ''))
+ var arg = s + "," + url
+ print("MTR: ui_conf_to_string", conf, cl, arg)
+ return arg
+ end
+
+ #############################################################
+ # ui_string_to_conf
+ #
+ # Convert the string in UI to actual parameters added to the map
+ static def ui_string_to_conf(cl, conf, arg)
+ import string
+ var elts = string.split(arg + ',', ',', 3) # add ',' at the end to be sure to have at least 2 arguments
+ conf[_class.ARG_HTTP] = elts[1]
+ super(_class).ui_string_to_conf(cl, conf, elts[0])
+ print("ui_string_to_conf", conf, arg)
+ return conf
+ end
+
+end
+matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be
new file mode 100644
index 000000000..49aa7a507
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be
@@ -0,0 +1,135 @@
+#
+# Matter_Plugin_Bridge_OnOff.be - implements the behavior for a Relay via HTTP (OnOff)
+#
+# Copyright (C) 2023 Stephan Hadinger & Theo Arends
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+
+# Matter plug-in for core behavior
+
+# dummy declaration for solidification
+class Matter_Plugin_Bridge_HTTP end
+
+#@ solidify:Matter_Plugin_Bridge_OnOff,weak
+
+class Matter_Plugin_Bridge_OnOff : Matter_Plugin_Bridge_HTTP
+ static var TYPE = "http_relay" # name of the plug-in in json
+ static var NAME = "🔗 Relay" # display name of the plug-in
+ static var ARG = "relay" # additional argument name (or empty if none)
+ static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
+ static var CLUSTERS = {
+ # 0x001D: inherited # Descriptor Cluster 9.5 p.453
+ # 0x0003: inherited # Identify 1.2 p.16
+ # 0x0004: inherited # Groups 1.3 p.21
+ # 0x0005: inherited # Scenes 1.4 p.30 - no writable
+ 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
+ }
+ static var TYPES = { 0x010A: 2 } # On/Off Light
+
+ var tasmota_http # domain name for HTTP
+ var tasmota_relay_index # Relay number in Tasmota (zero based)
+ var shadow_onoff # fake status for now # TODO
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, arguments)
+ import string
+ super(self).init(device, endpoint, arguments)
+ self.shadow_onoff = false
+ self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#)
+ if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end
+ end
+
+ #############################################################
+ # Update shadow
+ #
+ def update_shadow()
+ var st11 = self.get_status_11()
+ if st11
+ st11 = st11.find('StatusSTS', {}) # remove first level
+ var state = (st11.find("POWER") == "ON")
+ if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
+ self.attribute_updated(0x0006, 0x0000)
+ end
+ self.shadow_onoff = state
+ end
+ super(self).update_shadow()
+ end
+
+ #############################################################
+ # Model
+ #
+ def set_onoff(v)
+ self.call_remote("Power", v ? "1" : "0")
+ self.update_shadow()
+ end
+
+ #############################################################
+ # read an attribute
+ #
+ def read_attribute(session, ctx)
+ import string
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var attribute = ctx.attribute
+
+ # ====================================================================================================
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
+ if attribute == 0x0000 # ---------- OnOff / bool ----------
+ return TLV.create_TLV(TLV.BOOL, self.shadow_onoff)
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+ #############################################################
+ # Invoke a command
+ #
+ # returns a TLV object if successful, contains the response
+ # or an `int` to indicate a status
+ def invoke_request(session, val, ctx)
+ var TLV = matter.TLV
+ var cluster = ctx.cluster
+ var command = ctx.command
+
+ # ====================================================================================================
+ if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
+ self.update_shadow_lazy()
+ if command == 0x0000 # ---------- Off ----------
+ self.set_onoff(false)
+ self.update_shadow()
+ return true
+ elif command == 0x0001 # ---------- On ----------
+ self.set_onoff(true)
+ self.update_shadow()
+ return true
+ elif command == 0x0002 # ---------- Toggle ----------
+ self.set_onoff(!self.shadow_onoff)
+ self.update_shadow()
+ return true
+ end
+ end
+
+ end
+
+end
+matter.Plugin_Bridge_OnOff = Matter_Plugin_Bridge_OnOff
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
index c4abc2758..9e43a8189 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be
@@ -27,6 +27,7 @@ class Matter_Plugin_Device end
class Matter_Plugin_Light0 : Matter_Plugin_Device
static var TYPE = "light0" # name of the plug-in in json
static var NAME = "Light 0 On" # display name of the plug-in
+ static var UPDATE_TIME = 250 # update every 250ms
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
index 6d1c9bf90..585a5bce5 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be
@@ -29,6 +29,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
static var NAME = "Relay" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
+ static var UPDATE_TIME = 250 # update every 250ms
static var CLUSTERS = {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
index 3f0d2dfd7..c3f595045 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be
@@ -26,6 +26,7 @@ class Matter_Plugin_Device end
class Matter_Plugin_Sensor : Matter_Plugin_Device
static var ARG = "filter" # additional argument name (or empty if none)
+ static var UPDATE_TIME = 5000 # update sensor every 5s
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
var tasmota_sensor_matcher # Actual matcher object
var shadow_value # Last known value
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
index 55ccdf992..1165b9e65 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be
@@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
- return int(val * 100) # 1/100th of percentage
+ return val != nil ? int(val * 100) : nil # 1/100th of percentage
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
index e676aac18..1ba16a5eb 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be
@@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
- return int(val) # value in lux
+ return val != nil ? int(val) : nil # value in lux
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
index 60414b0c9..0d87d296b 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be
@@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
- return int(val)
+ return val != nil ? int(val) : nil
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
index ec411f537..4d2d9f23b 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be
@@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
- return int(val * 100)
+ return val != nil ? int(val * 100) : nil
end
#############################################################
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index cfc9e4cfc..019af83d9 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -35,6 +35,7 @@ class Matter_UI
static var _ROOT_TYPES = "root"
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
"|temperature|pressure|illuminance|humidity"
+ "|-http|http_relay"
var device
def init(device)
@@ -256,8 +257,13 @@ class Matter_UI
var typ = conf.find('type')
if !typ i += 1 continue end
- var arg_name = self.device.get_plugin_class_arg(typ)
- var arg = arg_name ? str(conf.find(arg_name, '')) : ''
+ var cl = self.device.plugins_classes.find(typ)
+ var arg = ""
+ if cl != nil
+ arg = cl.ui_conf_to_string(cl, conf)
+ end
+ # var arg_name = self.device.get_plugin_class_arg(typ)
+ # var arg = arg_name ? str(conf.find(arg_name, '')) : ''
webserver.content_send(string.format(" ", i, ep))
@@ -297,6 +303,8 @@ class Matter_UI
var typ = class_types[i]
if typ == ''
webserver.content_send(" ")
+ elif typ == '-http'
+ webserver.content_send("--- Tasmota Remote --- ")
else
var nam = self.device.get_plugin_class_displayname(typ)
webserver.content_send(string.format("%s ", typ, (typ == cur) ? " selected" : "", nam))
@@ -429,11 +437,12 @@ class Matter_UI
var typ_class = self.device.plugins_classes.find(typ)
if typ_class != nil
var elt = {'type':typ}
- var arg_name = typ_class.ARG
- var arg_type = typ_class.ARG_TYPE
- if arg && arg_name
- elt[arg_name] = arg_type(arg)
- end
+ typ_class.ui_string_to_conf(typ_class, elt, arg)
+ # var arg_name = typ_class.ARG
+ # var arg_type = typ_class.ARG_TYPE
+ # if arg && arg_name
+ # elt[arg_name] = arg_type(arg)
+ # end
config[ep] = elt
else
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
index 57409987c..a0d557ce7 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h
@@ -1546,20 +1546,17 @@ be_local_closure(Matter_Device_every_second, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 9]) { /* constants */
+ ( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(sessions),
/* K1 */ be_nested_str_weak(every_second),
/* K2 */ be_nested_str_weak(message_handler),
/* K3 */ be_nested_str_weak(commissioning_open),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(time_reached),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(plugins),
- /* K8 */ be_const_int(1),
}),
be_str_weak(every_second),
&be_const_str_solidified,
- ( &(const binstruction[30]) { /* code */
+ ( &(const binstruction[18]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
@@ -1577,19 +1574,7 @@ be_local_closure(Matter_Device_every_second, /* name */
0x78060001, // 000E JMPF R1 #0011
0x4C040000, // 000F LDNIL R1
0x90020601, // 0010 SETMBR R0 K3 R1
- 0x58040006, // 0011 LDCONST R1 K6
- 0x6008000C, // 0012 GETGBL R2 G12
- 0x880C0107, // 0013 GETMBR R3 R0 K7
- 0x7C080200, // 0014 CALL R2 1
- 0x14080202, // 0015 LT R2 R1 R2
- 0x780A0005, // 0016 JMPF R2 #001D
- 0x88080107, // 0017 GETMBR R2 R0 K7
- 0x94080401, // 0018 GETIDX R2 R2 R1
- 0x8C080501, // 0019 GETMET R2 R2 K1
- 0x7C080200, // 001A CALL R2 1
- 0x00040308, // 001B ADD R1 R1 K8
- 0x7001FFF4, // 001C JMP #0012
- 0x80000000, // 001D RET 0
+ 0x80000000, // 0011 RET 0
})
)
);
@@ -4714,7 +4699,7 @@ be_local_closure(Matter_Device_start_operational_discovery, /* name */
********************************************************************/
be_local_closure(Matter_Device_every_250ms, /* name */
be_nested_proto(
- 3, /* nstack */
+ 4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -4722,17 +4707,32 @@ be_local_closure(Matter_Device_every_250ms, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
+ ( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(message_handler),
/* K1 */ be_nested_str_weak(every_250ms),
+ /* K2 */ be_const_int(0),
+ /* K3 */ be_nested_str_weak(plugins),
+ /* K4 */ be_const_int(1),
}),
be_str_weak(every_250ms),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
+ ( &(const binstruction[16]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
- 0x80000000, // 0003 RET 0
+ 0x58040002, // 0003 LDCONST R1 K2
+ 0x6008000C, // 0004 GETGBL R2 G12
+ 0x880C0103, // 0005 GETMBR R3 R0 K3
+ 0x7C080200, // 0006 CALL R2 1
+ 0x14080202, // 0007 LT R2 R1 R2
+ 0x780A0005, // 0008 JMPF R2 #000F
+ 0x88080103, // 0009 GETMBR R2 R0 K3
+ 0x94080401, // 000A GETIDX R2 R2 R1
+ 0x8C080501, // 000B GETMET R2 R2 K1
+ 0x7C080200, // 000C CALL R2 1
+ 0x00040304, // 000D ADD R1 R1 K4
+ 0x7001FFF4, // 000E JMP #0004
+ 0x80000000, // 000F RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
index 1455906aa..147b3a143 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h
@@ -7,24 +7,26 @@
extern const bclass be_class_Matter_Plugin;
/********************************************************************
-** Solidified function: read_event
+** Solidified function:
********************************************************************/
-be_local_closure(Matter_Plugin_read_event, /* name */
+be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
be_nested_proto(
- 6, /* nstack */
- 5, /* argc */
- 2, /* varg */
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(read_event),
+ be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C140000, // 0000 LDNIL R5
- 0x80040A00, // 0001 RET 1 R5
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040008, // 0000 GETGBL R1 G8
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
})
)
);
@@ -32,59 +34,32 @@ be_local_closure(Matter_Plugin_read_event, /* name */
/********************************************************************
-** Solidified function: write_attribute
+** Solidified function: get_attribute_list
********************************************************************/
-be_local_closure(Matter_Plugin_write_attribute, /* name */
+be_local_closure(Matter_Plugin_get_attribute_list, /* name */
be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(write_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: attribute_updated
-********************************************************************/
-be_local_closure(Matter_Plugin_attribute_updated, /* name */
- be_nested_proto(
- 10, /* nstack */
- 4, /* argc */
+ 7, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 3]) { /* constants */
- /* K0 */ be_nested_str_weak(device),
- /* K1 */ be_nested_str_weak(attribute_updated),
- /* K2 */ be_nested_str_weak(endpoint),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(clusters),
+ /* K1 */ be_nested_str_weak(find),
}),
- be_str_weak(attribute_updated),
+ be_str_weak(get_attribute_list),
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88100100, // 0000 GETMBR R4 R0 K0
- 0x8C100901, // 0001 GETMET R4 R4 K1
- 0x88180102, // 0002 GETMBR R6 R0 K2
- 0x5C1C0200, // 0003 MOVE R7 R1
- 0x5C200400, // 0004 MOVE R8 R2
- 0x5C240600, // 0005 MOVE R9 R3
- 0x7C100A00, // 0006 CALL R4 5
- 0x80000000, // 0007 RET 0
+ ( &(const binstruction[ 7]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0001 GETMET R3 R3 K1
+ 0x5C140400, // 0002 MOVE R5 R2
+ 0x60180012, // 0003 GETGBL R6 G18
+ 0x7C180000, // 0004 CALL R6 0
+ 0x7C0C0600, // 0005 CALL R3 3
+ 0x80040600, // 0006 RET 1 R3
})
)
);
@@ -92,12 +67,12 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */
/********************************************************************
-** Solidified function: get_cluster_list
+** Solidified function: has
********************************************************************/
-be_local_closure(Matter_Plugin_get_cluster_list, /* name */
+be_local_closure(Matter_Plugin_has, /* name */
be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
+ 6, /* nstack */
+ 3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -106,196 +81,28 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(keys),
- /* K2 */ be_nested_str_weak(push),
- /* K3 */ be_nested_str_weak(stop_iteration),
+ /* K1 */ be_nested_str_weak(contains),
+ /* K2 */ be_nested_str_weak(endpoints),
+ /* K3 */ be_nested_str_weak(find),
}),
- be_str_weak(get_cluster_list),
+ be_str_weak(has),
&be_const_str_solidified,
- ( &(const binstruction[18]) { /* code */
- 0x60080012, // 0000 GETGBL R2 G18
- 0x7C080000, // 0001 CALL R2 0
- 0x600C0010, // 0002 GETGBL R3 G16
- 0x88100100, // 0003 GETMBR R4 R0 K0
- 0x8C100901, // 0004 GETMET R4 R4 K1
- 0x7C100200, // 0005 CALL R4 1
- 0x7C0C0200, // 0006 CALL R3 1
- 0xA8020005, // 0007 EXBLK 0 #000E
- 0x5C100600, // 0008 MOVE R4 R3
- 0x7C100000, // 0009 CALL R4 0
- 0x8C140502, // 000A GETMET R5 R2 K2
- 0x5C1C0800, // 000B MOVE R7 R4
- 0x7C140400, // 000C CALL R5 2
- 0x7001FFF9, // 000D JMP #0008
- 0x580C0003, // 000E LDCONST R3 K3
- 0xAC0C0200, // 000F CATCH R3 1 0
- 0xB0080000, // 0010 RAISE 2 R0 R0
- 0x80040400, // 0011 RET 1 R2
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_update_shadow, /* name */
- be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(tick),
- /* K1 */ be_nested_str_weak(device),
- }),
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x88040101, // 0000 GETMBR R1 R0 K1
- 0x88040300, // 0001 GETMBR R1 R1 K0
- 0x90020001, // 0002 SETMBR R0 K0 R1
- 0x80000000, // 0003 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_read_attribute, /* name */
- be_nested_proto(
- 15, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[18]) { /* constants */
- /* K0 */ be_nested_str_weak(matter),
- /* K1 */ be_nested_str_weak(TLV),
- /* K2 */ be_nested_str_weak(cluster),
- /* K3 */ be_nested_str_weak(attribute),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(Matter_TLV_array),
- /* K6 */ be_nested_str_weak(TYPES),
- /* K7 */ be_nested_str_weak(keys),
- /* K8 */ be_nested_str_weak(add_struct),
- /* K9 */ be_nested_str_weak(add_TLV),
- /* K10 */ be_nested_str_weak(U2),
- /* K11 */ be_const_int(1),
- /* K12 */ be_nested_str_weak(stop_iteration),
- /* K13 */ be_nested_str_weak(get_cluster_list),
- /* K14 */ be_nested_str_weak(U4),
- /* K15 */ be_const_int(2),
- /* K16 */ be_const_int(3),
- /* K17 */ be_nested_str_weak(create_TLV),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[93]) { /* code */
- 0xB80E0000, // 0000 GETNGBL R3 K0
- 0x880C0701, // 0001 GETMBR R3 R3 K1
- 0x88100502, // 0002 GETMBR R4 R2 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x541A001C, // 0004 LDINT R6 29
- 0x1C180806, // 0005 EQ R6 R4 R6
- 0x781A0052, // 0006 JMPF R6 #005A
- 0x1C180B04, // 0007 EQ R6 R5 K4
- 0x781A001C, // 0008 JMPF R6 #0026
- 0x8C180705, // 0009 GETMET R6 R3 K5
- 0x7C180200, // 000A CALL R6 1
- 0x601C0010, // 000B GETGBL R7 G16
- 0x88200106, // 000C GETMBR R8 R0 K6
- 0x8C201107, // 000D GETMET R8 R8 K7
- 0x7C200200, // 000E CALL R8 1
- 0x7C1C0200, // 000F CALL R7 1
- 0xA802000F, // 0010 EXBLK 0 #0021
- 0x5C200E00, // 0011 MOVE R8 R7
- 0x7C200000, // 0012 CALL R8 0
- 0x8C240D08, // 0013 GETMET R9 R6 K8
- 0x7C240200, // 0014 CALL R9 1
- 0x8C281309, // 0015 GETMET R10 R9 K9
- 0x58300004, // 0016 LDCONST R12 K4
- 0x8834070A, // 0017 GETMBR R13 R3 K10
- 0x5C381000, // 0018 MOVE R14 R8
- 0x7C280800, // 0019 CALL R10 4
- 0x8C281309, // 001A GETMET R10 R9 K9
- 0x5830000B, // 001B LDCONST R12 K11
- 0x8834070A, // 001C GETMBR R13 R3 K10
- 0x88380106, // 001D GETMBR R14 R0 K6
- 0x94381C08, // 001E GETIDX R14 R14 R8
- 0x7C280800, // 001F CALL R10 4
- 0x7001FFEF, // 0020 JMP #0011
- 0x581C000C, // 0021 LDCONST R7 K12
- 0xAC1C0200, // 0022 CATCH R7 1 0
- 0xB0080000, // 0023 RAISE 2 R0 R0
- 0x80040C00, // 0024 RET 1 R6
- 0x70020032, // 0025 JMP #0059
- 0x1C180B0B, // 0026 EQ R6 R5 K11
- 0x781A0013, // 0027 JMPF R6 #003C
- 0x8C180705, // 0028 GETMET R6 R3 K5
- 0x7C180200, // 0029 CALL R6 1
- 0x601C0010, // 002A GETGBL R7 G16
- 0x8C20010D, // 002B GETMET R8 R0 K13
- 0x7C200200, // 002C CALL R8 1
- 0x7C1C0200, // 002D CALL R7 1
- 0xA8020007, // 002E EXBLK 0 #0037
- 0x5C200E00, // 002F MOVE R8 R7
- 0x7C200000, // 0030 CALL R8 0
- 0x8C240D09, // 0031 GETMET R9 R6 K9
- 0x4C2C0000, // 0032 LDNIL R11
- 0x8830070E, // 0033 GETMBR R12 R3 K14
- 0x5C341000, // 0034 MOVE R13 R8
- 0x7C240800, // 0035 CALL R9 4
- 0x7001FFF7, // 0036 JMP #002F
- 0x581C000C, // 0037 LDCONST R7 K12
- 0xAC1C0200, // 0038 CATCH R7 1 0
- 0xB0080000, // 0039 RAISE 2 R0 R0
- 0x80040C00, // 003A RET 1 R6
- 0x7002001C, // 003B JMP #0059
- 0x1C180B0F, // 003C EQ R6 R5 K15
- 0x781A0003, // 003D JMPF R6 #0042
- 0x8C180705, // 003E GETMET R6 R3 K5
- 0x7C180200, // 003F CALL R6 1
- 0x80040C00, // 0040 RET 1 R6
- 0x70020016, // 0041 JMP #0059
- 0x1C180B10, // 0042 EQ R6 R5 K16
- 0x781A0003, // 0043 JMPF R6 #0048
- 0x8C180705, // 0044 GETMET R6 R3 K5
- 0x7C180200, // 0045 CALL R6 1
- 0x80040C00, // 0046 RET 1 R6
- 0x70020010, // 0047 JMP #0059
- 0x541AFFFB, // 0048 LDINT R6 65532
- 0x1C180A06, // 0049 EQ R6 R5 R6
- 0x781A0005, // 004A JMPF R6 #0051
- 0x8C180711, // 004B GETMET R6 R3 K17
- 0x8820070E, // 004C GETMBR R8 R3 K14
- 0x58240004, // 004D LDCONST R9 K4
- 0x7C180600, // 004E CALL R6 3
- 0x80040C00, // 004F RET 1 R6
- 0x70020007, // 0050 JMP #0059
- 0x541AFFFC, // 0051 LDINT R6 65533
- 0x1C180A06, // 0052 EQ R6 R5 R6
- 0x781A0004, // 0053 JMPF R6 #0059
- 0x8C180711, // 0054 GETMET R6 R3 K17
- 0x8820070E, // 0055 GETMBR R8 R3 K14
- 0x5824000B, // 0056 LDCONST R9 K11
- 0x7C180600, // 0057 CALL R6 3
- 0x80040C00, // 0058 RET 1 R6
- 0x70020001, // 0059 JMP #005C
- 0x4C180000, // 005A LDNIL R6
- 0x80040C00, // 005B RET 1 R6
- 0x80000000, // 005C RET 0
+ ( &(const binstruction[15]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0001 GETMET R3 R3 K1
+ 0x5C140200, // 0002 MOVE R5 R1
+ 0x7C0C0400, // 0003 CALL R3 2
+ 0x780E0006, // 0004 JMPF R3 #000C
+ 0x880C0102, // 0005 GETMBR R3 R0 K2
+ 0x8C0C0703, // 0006 GETMET R3 R3 K3
+ 0x5C140400, // 0007 MOVE R5 R2
+ 0x7C0C0400, // 0008 CALL R3 2
+ 0x4C100000, // 0009 LDNIL R4
+ 0x200C0604, // 000A NE R3 R3 R4
+ 0x740E0000, // 000B JMPT R3 #000D
+ 0x500C0001, // 000C LDBOOL R3 0 1
+ 0x500C0200, // 000D LDBOOL R3 1 0
+ 0x80040600, // 000E RET 1 R3
})
)
);
@@ -406,32 +213,26 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */
/********************************************************************
-** Solidified function: get_attribute_list
+** Solidified function: get_endpoint
********************************************************************/
-be_local_closure(Matter_Plugin_get_attribute_list, /* name */
+be_local_closure(Matter_Plugin_get_endpoint, /* name */
be_nested_proto(
- 7, /* nstack */
- 3, /* argc */
+ 2, /* nstack */
+ 1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(find),
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(endpoint),
}),
- be_str_weak(get_attribute_list),
+ be_str_weak(get_endpoint),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0x880C0100, // 0000 GETMBR R3 R0 K0
- 0x8C0C0701, // 0001 GETMET R3 R3 K1
- 0x5C140400, // 0002 MOVE R5 R2
- 0x60180012, // 0003 GETGBL R6 G18
- 0x7C180000, // 0004 CALL R6 0
- 0x7C0C0600, // 0005 CALL R3 3
- 0x80040600, // 0006 RET 1 R3
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
})
)
);
@@ -464,12 +265,12 @@ be_local_closure(Matter_Plugin_timed_request, /* name */
/********************************************************************
-** Solidified function: parse_sensors
+** Solidified function: subscribe_event
********************************************************************/
-be_local_closure(Matter_Plugin_parse_sensors, /* name */
+be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
+ 6, /* nstack */
+ 5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@@ -477,10 +278,11 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(parse_sensors),
+ be_str_weak(subscribe_event),
&be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C140000, // 0000 LDNIL R5
+ 0x80040A00, // 0001 RET 1 R5
})
)
);
@@ -523,26 +325,34 @@ be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */
/********************************************************************
-** Solidified function:
+** Solidified function: attribute_updated
********************************************************************/
-be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
+be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_nested_proto(
- 3, /* nstack */
- 1, /* argc */
- 0, /* varg */
+ 10, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(_X3Clambda_X3E),
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(attribute_updated),
+ /* K2 */ be_nested_str_weak(endpoint),
+ }),
+ be_str_weak(attribute_updated),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60040008, // 0000 GETGBL R1 G8
- 0x5C080000, // 0001 MOVE R2 R0
- 0x7C040200, // 0002 CALL R1 1
- 0x80040200, // 0003 RET 1 R1
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88100100, // 0000 GETMBR R4 R0 K0
+ 0x8C100901, // 0001 GETMET R4 R4 K1
+ 0x88180102, // 0002 GETMBR R6 R0 K2
+ 0x5C1C0200, // 0003 MOVE R7 R1
+ 0x5C200400, // 0004 MOVE R8 R2
+ 0x5C240600, // 0005 MOVE R9 R3
+ 0x7C100A00, // 0006 CALL R4 5
+ 0x80000000, // 0007 RET 0
})
)
);
@@ -550,26 +360,205 @@ be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */
/********************************************************************
-** Solidified function: get_endpoint
+** Solidified function: get_cluster_list
********************************************************************/
-be_local_closure(Matter_Plugin_get_endpoint, /* name */
+be_local_closure(Matter_Plugin_get_cluster_list, /* name */
be_nested_proto(
- 2, /* nstack */
- 1, /* argc */
+ 8, /* nstack */
+ 2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(endpoint),
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(clusters),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(push),
+ /* K3 */ be_nested_str_weak(stop_iteration),
}),
- be_str_weak(get_endpoint),
+ be_str_weak(get_cluster_list),
+ &be_const_str_solidified,
+ ( &(const binstruction[18]) { /* code */
+ 0x60080012, // 0000 GETGBL R2 G18
+ 0x7C080000, // 0001 CALL R2 0
+ 0x600C0010, // 0002 GETGBL R3 G16
+ 0x88100100, // 0003 GETMBR R4 R0 K0
+ 0x8C100901, // 0004 GETMET R4 R4 K1
+ 0x7C100200, // 0005 CALL R4 1
+ 0x7C0C0200, // 0006 CALL R3 1
+ 0xA8020005, // 0007 EXBLK 0 #000E
+ 0x5C100600, // 0008 MOVE R4 R3
+ 0x7C100000, // 0009 CALL R4 0
+ 0x8C140502, // 000A GETMET R5 R2 K2
+ 0x5C1C0800, // 000B MOVE R7 R4
+ 0x7C140400, // 000C CALL R5 2
+ 0x7001FFF9, // 000D JMP #0008
+ 0x580C0003, // 000E LDCONST R3 K3
+ 0xAC0C0200, // 000F CATCH R3 1 0
+ 0xB0080000, // 0010 RAISE 2 R0 R0
+ 0x80040400, // 0011 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_read_attribute, /* name */
+ be_nested_proto(
+ 16, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[18]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(TLV),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(attribute),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(Matter_TLV_array),
+ /* K6 */ be_nested_str_weak(get_types),
+ /* K7 */ be_nested_str_weak(keys),
+ /* K8 */ be_nested_str_weak(add_struct),
+ /* K9 */ be_nested_str_weak(add_TLV),
+ /* K10 */ be_nested_str_weak(U2),
+ /* K11 */ be_const_int(1),
+ /* K12 */ be_nested_str_weak(stop_iteration),
+ /* K13 */ be_nested_str_weak(get_cluster_list),
+ /* K14 */ be_nested_str_weak(U4),
+ /* K15 */ be_const_int(2),
+ /* K16 */ be_const_int(3),
+ /* K17 */ be_nested_str_weak(create_TLV),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[93]) { /* code */
+ 0xB80E0000, // 0000 GETNGBL R3 K0
+ 0x880C0701, // 0001 GETMBR R3 R3 K1
+ 0x88100502, // 0002 GETMBR R4 R2 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x541A001C, // 0004 LDINT R6 29
+ 0x1C180806, // 0005 EQ R6 R4 R6
+ 0x781A0052, // 0006 JMPF R6 #005A
+ 0x1C180B04, // 0007 EQ R6 R5 K4
+ 0x781A001C, // 0008 JMPF R6 #0026
+ 0x8C180705, // 0009 GETMET R6 R3 K5
+ 0x7C180200, // 000A CALL R6 1
+ 0x8C1C0106, // 000B GETMET R7 R0 K6
+ 0x7C1C0200, // 000C CALL R7 1
+ 0x60200010, // 000D GETGBL R8 G16
+ 0x8C240F07, // 000E GETMET R9 R7 K7
+ 0x7C240200, // 000F CALL R9 1
+ 0x7C200200, // 0010 CALL R8 1
+ 0xA802000E, // 0011 EXBLK 0 #0021
+ 0x5C241000, // 0012 MOVE R9 R8
+ 0x7C240000, // 0013 CALL R9 0
+ 0x8C280D08, // 0014 GETMET R10 R6 K8
+ 0x7C280200, // 0015 CALL R10 1
+ 0x8C2C1509, // 0016 GETMET R11 R10 K9
+ 0x58340004, // 0017 LDCONST R13 K4
+ 0x8838070A, // 0018 GETMBR R14 R3 K10
+ 0x5C3C1200, // 0019 MOVE R15 R9
+ 0x7C2C0800, // 001A CALL R11 4
+ 0x8C2C1509, // 001B GETMET R11 R10 K9
+ 0x5834000B, // 001C LDCONST R13 K11
+ 0x8838070A, // 001D GETMBR R14 R3 K10
+ 0x943C0E09, // 001E GETIDX R15 R7 R9
+ 0x7C2C0800, // 001F CALL R11 4
+ 0x7001FFF0, // 0020 JMP #0012
+ 0x5820000C, // 0021 LDCONST R8 K12
+ 0xAC200200, // 0022 CATCH R8 1 0
+ 0xB0080000, // 0023 RAISE 2 R0 R0
+ 0x80040C00, // 0024 RET 1 R6
+ 0x70020032, // 0025 JMP #0059
+ 0x1C180B0B, // 0026 EQ R6 R5 K11
+ 0x781A0013, // 0027 JMPF R6 #003C
+ 0x8C180705, // 0028 GETMET R6 R3 K5
+ 0x7C180200, // 0029 CALL R6 1
+ 0x601C0010, // 002A GETGBL R7 G16
+ 0x8C20010D, // 002B GETMET R8 R0 K13
+ 0x7C200200, // 002C CALL R8 1
+ 0x7C1C0200, // 002D CALL R7 1
+ 0xA8020007, // 002E EXBLK 0 #0037
+ 0x5C200E00, // 002F MOVE R8 R7
+ 0x7C200000, // 0030 CALL R8 0
+ 0x8C240D09, // 0031 GETMET R9 R6 K9
+ 0x4C2C0000, // 0032 LDNIL R11
+ 0x8830070E, // 0033 GETMBR R12 R3 K14
+ 0x5C341000, // 0034 MOVE R13 R8
+ 0x7C240800, // 0035 CALL R9 4
+ 0x7001FFF7, // 0036 JMP #002F
+ 0x581C000C, // 0037 LDCONST R7 K12
+ 0xAC1C0200, // 0038 CATCH R7 1 0
+ 0xB0080000, // 0039 RAISE 2 R0 R0
+ 0x80040C00, // 003A RET 1 R6
+ 0x7002001C, // 003B JMP #0059
+ 0x1C180B0F, // 003C EQ R6 R5 K15
+ 0x781A0003, // 003D JMPF R6 #0042
+ 0x8C180705, // 003E GETMET R6 R3 K5
+ 0x7C180200, // 003F CALL R6 1
+ 0x80040C00, // 0040 RET 1 R6
+ 0x70020016, // 0041 JMP #0059
+ 0x1C180B10, // 0042 EQ R6 R5 K16
+ 0x781A0003, // 0043 JMPF R6 #0048
+ 0x8C180705, // 0044 GETMET R6 R3 K5
+ 0x7C180200, // 0045 CALL R6 1
+ 0x80040C00, // 0046 RET 1 R6
+ 0x70020010, // 0047 JMP #0059
+ 0x541AFFFB, // 0048 LDINT R6 65532
+ 0x1C180A06, // 0049 EQ R6 R5 R6
+ 0x781A0005, // 004A JMPF R6 #0051
+ 0x8C180711, // 004B GETMET R6 R3 K17
+ 0x8820070E, // 004C GETMBR R8 R3 K14
+ 0x58240004, // 004D LDCONST R9 K4
+ 0x7C180600, // 004E CALL R6 3
+ 0x80040C00, // 004F RET 1 R6
+ 0x70020007, // 0050 JMP #0059
+ 0x541AFFFC, // 0051 LDINT R6 65533
+ 0x1C180A06, // 0052 EQ R6 R5 R6
+ 0x781A0004, // 0053 JMPF R6 #0059
+ 0x8C180711, // 0054 GETMET R6 R3 K17
+ 0x8820070E, // 0055 GETMBR R8 R3 K14
+ 0x5824000B, // 0056 LDCONST R9 K11
+ 0x7C180600, // 0057 CALL R6 3
+ 0x80040C00, // 0058 RET 1 R6
+ 0x70020001, // 0059 JMP #005C
+ 0x4C180000, // 005A LDNIL R6
+ 0x80040C00, // 005B RET 1 R6
+ 0x80000000, // 005C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: write_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_write_attribute, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x80040200, // 0001 RET 1 R1
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
})
)
);
@@ -602,11 +591,11 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
/********************************************************************
-** Solidified function: every_second
+** Solidified function: update_shadow
********************************************************************/
-be_local_closure(Matter_Plugin_every_second, /* name */
+be_local_closure(Matter_Plugin_update_shadow, /* name */
be_nested_proto(
- 3, /* nstack */
+ 2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -614,40 +603,17 @@ be_local_closure(Matter_Plugin_every_second, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 1]) { /* constants */
- /* K0 */ be_nested_str_weak(update_shadow),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(tick),
+ /* K1 */ be_nested_str_weak(device),
}),
- be_str_weak(every_second),
+ be_str_weak(update_shadow),
&be_const_str_solidified,
- ( &(const binstruction[ 3]) { /* code */
- 0x8C040100, // 0000 GETMET R1 R0 K0
- 0x7C040200, // 0001 CALL R1 1
- 0x80000000, // 0002 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: invoke_request
-********************************************************************/
-be_local_closure(Matter_Plugin_invoke_request, /* name */
- be_nested_proto(
- 5, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(invoke_request),
- &be_const_str_solidified,
- ( &(const binstruction[ 2]) { /* code */
- 0x4C100000, // 0000 LDNIL R4
- 0x80040800, // 0001 RET 1 R4
+ ( &(const binstruction[ 4]) { /* code */
+ 0x88040101, // 0000 GETMBR R1 R0 K1
+ 0x88040300, // 0001 GETMBR R1 R1 K0
+ 0x90020001, // 0002 SETMBR R0 K0 R1
+ 0x80000000, // 0003 RET 0
})
)
);
@@ -689,52 +655,9 @@ be_local_closure(Matter_Plugin_init, /* name */
/********************************************************************
-** Solidified function: has
+** Solidified function: read_event
********************************************************************/
-be_local_closure(Matter_Plugin_has, /* name */
- be_nested_proto(
- 6, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(clusters),
- /* K1 */ be_nested_str_weak(contains),
- /* K2 */ be_nested_str_weak(endpoints),
- /* K3 */ be_nested_str_weak(find),
- }),
- be_str_weak(has),
- &be_const_str_solidified,
- ( &(const binstruction[15]) { /* code */
- 0x880C0100, // 0000 GETMBR R3 R0 K0
- 0x8C0C0701, // 0001 GETMET R3 R3 K1
- 0x5C140200, // 0002 MOVE R5 R1
- 0x7C0C0400, // 0003 CALL R3 2
- 0x780E0006, // 0004 JMPF R3 #000C
- 0x880C0102, // 0005 GETMBR R3 R0 K2
- 0x8C0C0703, // 0006 GETMET R3 R3 K3
- 0x5C140400, // 0007 MOVE R5 R2
- 0x7C0C0400, // 0008 CALL R3 2
- 0x4C100000, // 0009 LDNIL R4
- 0x200C0604, // 000A NE R3 R3 R4
- 0x740E0000, // 000B JMPT R3 #000D
- 0x500C0001, // 000C LDBOOL R3 0 1
- 0x500C0200, // 000D LDBOOL R3 1 0
- 0x80040600, // 000E RET 1 R3
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: subscribe_event
-********************************************************************/
-be_local_closure(Matter_Plugin_subscribe_event, /* name */
+be_local_closure(Matter_Plugin_read_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
@@ -745,7 +668,7 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
- be_str_weak(subscribe_event),
+ be_str_weak(read_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
@@ -756,22 +679,259 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: get_types
+********************************************************************/
+be_local_closure(Matter_Plugin_get_types, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 1]) { /* constants */
+ /* K0 */ be_nested_str_weak(TYPES),
+ }),
+ be_str_weak(get_types),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x80040200, // 0001 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: ui_string_to_conf
+********************************************************************/
+be_local_closure(Matter_Plugin_ui_string_to_conf, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 3, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Plugin),
+ /* K1 */ be_nested_str_weak(ARG),
+ /* K2 */ be_nested_str_weak(ARG_TYPE),
+ }),
+ be_str_weak(ui_string_to_conf),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x580C0000, // 0000 LDCONST R3 K0
+ 0x88100101, // 0001 GETMBR R4 R0 K1
+ 0x88140102, // 0002 GETMBR R5 R0 K2
+ 0x780A0004, // 0003 JMPF R2 #0009
+ 0x78120003, // 0004 JMPF R4 #0009
+ 0x5C180A00, // 0005 MOVE R6 R5
+ 0x5C1C0400, // 0006 MOVE R7 R2
+ 0x7C180200, // 0007 CALL R6 1
+ 0x98040806, // 0008 SETIDX R1 R4 R6
+ 0x80040200, // 0009 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_invoke_request, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 2]) { /* code */
+ 0x4C100000, // 0000 LDNIL R4
+ 0x80040800, // 0001 RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_parse_sensors, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: every_250ms
+********************************************************************/
+be_local_closure(Matter_Plugin_every_250ms, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(update_next),
+ /* K1 */ be_nested_str_weak(crypto),
+ /* K2 */ be_nested_str_weak(random),
+ /* K3 */ be_nested_str_weak(get),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_const_int(2147483647),
+ /* K6 */ be_nested_str_weak(tasmota),
+ /* K7 */ be_nested_str_weak(millis),
+ /* K8 */ be_nested_str_weak(UPDATE_TIME),
+ /* K9 */ be_nested_str_weak(time_reached),
+ /* K10 */ be_nested_str_weak(update_shadow_lazy),
+ }),
+ be_str_weak(every_250ms),
+ &be_const_str_solidified,
+ ( &(const binstruction[33]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x4C080000, // 0001 LDNIL R2
+ 0x1C040202, // 0002 EQ R1 R1 R2
+ 0x7806000F, // 0003 JMPF R1 #0014
+ 0xA4060200, // 0004 IMPORT R1 K1
+ 0x8C080302, // 0005 GETMET R2 R1 K2
+ 0x54120003, // 0006 LDINT R4 4
+ 0x7C080400, // 0007 CALL R2 2
+ 0x8C080503, // 0008 GETMET R2 R2 K3
+ 0x58100004, // 0009 LDCONST R4 K4
+ 0x54160003, // 000A LDINT R5 4
+ 0x7C080600, // 000B CALL R2 3
+ 0x2C080505, // 000C AND R2 R2 K5
+ 0xB80E0C00, // 000D GETNGBL R3 K6
+ 0x8C0C0707, // 000E GETMET R3 R3 K7
+ 0x88140108, // 000F GETMBR R5 R0 K8
+ 0x10140405, // 0010 MOD R5 R2 R5
+ 0x7C0C0400, // 0011 CALL R3 2
+ 0x90020003, // 0012 SETMBR R0 K0 R3
+ 0x7002000B, // 0013 JMP #0020
+ 0xB8060C00, // 0014 GETNGBL R1 K6
+ 0x8C040309, // 0015 GETMET R1 R1 K9
+ 0x880C0100, // 0016 GETMBR R3 R0 K0
+ 0x7C040400, // 0017 CALL R1 2
+ 0x78060006, // 0018 JMPF R1 #0020
+ 0x8C04010A, // 0019 GETMET R1 R0 K10
+ 0x7C040200, // 001A CALL R1 1
+ 0xB8060C00, // 001B GETNGBL R1 K6
+ 0x8C040307, // 001C GETMET R1 R1 K7
+ 0x880C0108, // 001D GETMBR R3 R0 K8
+ 0x7C040400, // 001E CALL R1 2
+ 0x90020001, // 001F SETMBR R0 K0 R1
+ 0x80000000, // 0020 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: ui_conf_to_string
+********************************************************************/
+be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 2, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Plugin),
+ /* K1 */ be_nested_str_weak(ARG),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(),
+ }),
+ be_str_weak(ui_conf_to_string),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0x58080000, // 0000 LDCONST R2 K0
+ 0x880C0101, // 0001 GETMBR R3 R0 K1
+ 0x780E0006, // 0002 JMPF R3 #000A
+ 0x60100008, // 0003 GETGBL R4 G8
+ 0x8C140302, // 0004 GETMET R5 R1 K2
+ 0x5C1C0600, // 0005 MOVE R7 R3
+ 0x58200003, // 0006 LDCONST R8 K3
+ 0x7C140600, // 0007 CALL R5 3
+ 0x7C100200, // 0008 CALL R4 1
+ 0x70020000, // 0009 JMP #000B
+ 0x58100003, // 000A LDCONST R4 K3
+ 0x80040800, // 000B RET 1 R4
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin
********************************************************************/
be_local_class(Matter_Plugin,
- 4,
+ 5,
NULL,
- be_nested_map(27,
+ be_nested_map(32,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) },
- { be_const_key_weak(TYPE, 18), be_nested_str_weak() },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
- { be_const_key_weak(tick, -1), be_const_var(3) },
- { be_const_key_weak(ARG, -1), be_nested_str_weak() },
- { be_const_key_weak(get_cluster_list, 2), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
+ { be_const_key_weak(ui_conf_to_string, 11), be_const_static_closure(Matter_Plugin_ui_conf_to_string_closure) },
+ { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
+ { be_const_key_weak(tick, -1), be_const_var(4) },
+ { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_every_250ms_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak() },
+ { be_const_key_weak(ARG, 16), be_nested_str_weak() },
+ { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
+ { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
+ { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
+ { be_const_key_weak(clusters, 17), be_const_var(3) },
+ { be_const_key_weak(subscribe_event, 30), be_const_closure(Matter_Plugin_subscribe_event_closure) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak() },
+ { be_const_key_weak(parse_sensors, 29), be_const_closure(Matter_Plugin_parse_sensors_closure) },
+ { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) },
+ { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
+ { be_const_key_weak(ui_string_to_conf, 22), be_const_static_closure(Matter_Plugin_ui_string_to_conf_closure) },
+ { be_const_key_weak(device, -1), be_const_var(1) },
+ { be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) },
+ { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) },
+ { be_const_key_weak(read_event, 24), be_const_closure(Matter_Plugin_read_event_closure) },
+ { be_const_key_weak(init, 18), be_const_closure(Matter_Plugin_init_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
@@ -786,24 +946,13 @@ be_local_class(Matter_Plugin,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) },
- { be_const_key_weak(clusters, -1), be_const_var(2) },
- { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
- { be_const_key_weak(NAME, 3), be_nested_str_weak() },
- { be_const_key_weak(subscribe_attribute, 20), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
- { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
- { be_const_key_weak(read_attribute, 9), be_const_closure(Matter_Plugin_read_attribute_closure) },
- { be_const_key_weak(write_attribute, 13), be_const_closure(Matter_Plugin_write_attribute_closure) },
- { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) },
- { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) },
- { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) },
- { be_const_key_weak(endpoint, -1), be_const_var(1) },
- { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
- { be_const_key_weak(attribute_updated, 8), be_const_closure(Matter_Plugin_attribute_updated_closure) },
+ { be_const_key_weak(get_types, -1), be_const_closure(Matter_Plugin_get_types_closure) },
+ { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_read_attribute_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) },
- { be_const_key_weak(device, 4), be_const_var(0) },
- { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
- { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
+ { be_const_key_weak(update_next, 14), be_const_var(0) },
+ { be_const_key_weak(endpoint, 31), be_const_var(2) },
+ { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) },
+ { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) },
})),
be_str_weak(Matter_Plugin)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h
new file mode 100644
index 000000000..1fd4d331a
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h
@@ -0,0 +1,665 @@
+/* Solidification of Matter_Plugin_Bridge_HTTP.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
+
+/********************************************************************
+** Solidified function: get_types
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_get_types, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(TYPES),
+ /* K1 */ be_nested_str_weak(keys),
+ /* K2 */ be_nested_str_weak(stop_iteration),
+ /* K3 */ be_const_int(1),
+ }),
+ be_str_weak(get_types),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x60040013, // 0000 GETGBL R1 G19
+ 0x7C040000, // 0001 CALL R1 0
+ 0x60080010, // 0002 GETGBL R2 G16
+ 0x880C0100, // 0003 GETMBR R3 R0 K0
+ 0x8C0C0701, // 0004 GETMET R3 R3 K1
+ 0x7C0C0200, // 0005 CALL R3 1
+ 0x7C080200, // 0006 CALL R2 1
+ 0xA8020005, // 0007 EXBLK 0 #000E
+ 0x5C0C0400, // 0008 MOVE R3 R2
+ 0x7C0C0000, // 0009 CALL R3 0
+ 0x88100100, // 000A GETMBR R4 R0 K0
+ 0x94100803, // 000B GETIDX R4 R4 R3
+ 0x98040604, // 000C SETIDX R1 R3 R4
+ 0x7001FFF9, // 000D JMP #0008
+ 0x58080002, // 000E LDCONST R2 K2
+ 0xAC080200, // 000F CATCH R2 1 0
+ 0xB0080000, // 0010 RAISE 2 R0 R0
+ 0x540A0012, // 0011 LDINT R2 19
+ 0x98040503, // 0012 SETIDX R1 R2 K3
+ 0x80040200, // 0013 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: is_reachable
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_is_reachable, /* name */
+ be_nested_proto(
+ 5, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(tick),
+ /* K2 */ be_nested_str_weak(reachable_tick),
+ /* K3 */ be_nested_str_weak(call_remote),
+ /* K4 */ be_nested_str_weak(),
+ /* K5 */ be_nested_str_weak(reachable),
+ }),
+ be_str_weak(is_reachable),
+ &be_const_str_solidified,
+ ( &(const binstruction[14]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x88040301, // 0001 GETMBR R1 R1 K1
+ 0x88080102, // 0002 GETMBR R2 R0 K2
+ 0x20040202, // 0003 NE R1 R1 R2
+ 0x78060006, // 0004 JMPF R1 #000C
+ 0x8C040103, // 0005 GETMET R1 R0 K3
+ 0x580C0004, // 0006 LDCONST R3 K4
+ 0x58100004, // 0007 LDCONST R4 K4
+ 0x7C040600, // 0008 CALL R1 3
+ 0x4C080000, // 0009 LDNIL R2
+ 0x20080202, // 000A NE R2 R1 R2
+ 0x90020A02, // 000B SETMBR R0 K5 R2
+ 0x88040105, // 000C GETMBR R1 R0 K5
+ 0x80040200, // 000D RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(TLV),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(attribute),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(create_TLV),
+ /* K6 */ be_nested_str_weak(BOOL),
+ /* K7 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0xB80E0000, // 0000 GETNGBL R3 K0
+ 0x880C0701, // 0001 GETMBR R3 R3 K1
+ 0x88100502, // 0002 GETMBR R4 R2 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x541A0038, // 0004 LDINT R6 57
+ 0x1C180806, // 0005 EQ R6 R4 R6
+ 0x781A000B, // 0006 JMPF R6 #0013
+ 0x1C180B04, // 0007 EQ R6 R5 K4
+ 0x781A0000, // 0008 JMPF R6 #000A
+ 0x70020007, // 0009 JMP #0012
+ 0x541A0010, // 000A LDINT R6 17
+ 0x1C180A06, // 000B EQ R6 R5 R6
+ 0x781A0004, // 000C JMPF R6 #0012
+ 0x8C180705, // 000D GETMET R6 R3 K5
+ 0x88200706, // 000E GETMBR R8 R3 K6
+ 0x50240200, // 000F LDBOOL R9 1 0
+ 0x7C180600, // 0010 CALL R6 3
+ 0x80040C00, // 0011 RET 1 R6
+ 0x70020007, // 0012 JMP #001B
+ 0x60180003, // 0013 GETGBL R6 G3
+ 0x5C1C0000, // 0014 MOVE R7 R0
+ 0x7C180200, // 0015 CALL R6 1
+ 0x8C180D07, // 0016 GETMET R6 R6 K7
+ 0x5C200200, // 0017 MOVE R8 R1
+ 0x5C240400, // 0018 MOVE R9 R2
+ 0x7C180600, // 0019 CALL R6 3
+ 0x80040C00, // 001A RET 1 R6
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_status_11
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_get_status_11, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(tick),
+ /* K2 */ be_nested_str_weak(tasmota_status_11),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(_tick),
+ /* K5 */ be_nested_str_weak(call_remote),
+ /* K6 */ be_nested_str_weak(Status),
+ /* K7 */ be_nested_str_weak(11),
+ }),
+ be_str_weak(get_status_11),
+ &be_const_str_solidified,
+ ( &(const binstruction[27]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x88040301, // 0001 GETMBR R1 R1 K1
+ 0x88080102, // 0002 GETMBR R2 R0 K2
+ 0x4C0C0000, // 0003 LDNIL R3
+ 0x1C080403, // 0004 EQ R2 R2 R3
+ 0x740A0005, // 0005 JMPT R2 #000C
+ 0x88080102, // 0006 GETMBR R2 R0 K2
+ 0x8C080503, // 0007 GETMET R2 R2 K3
+ 0x58100004, // 0008 LDCONST R4 K4
+ 0x7C080400, // 0009 CALL R2 2
+ 0x20080401, // 000A NE R2 R2 R1
+ 0x780A000B, // 000B JMPF R2 #0018
+ 0x8C080105, // 000C GETMET R2 R0 K5
+ 0x58100006, // 000D LDCONST R4 K6
+ 0x58140007, // 000E LDCONST R5 K7
+ 0x7C080600, // 000F CALL R2 3
+ 0x780A0003, // 0010 JMPF R2 #0015
+ 0x980A0801, // 0011 SETIDX R2 K4 R1
+ 0x90020402, // 0012 SETMBR R0 K2 R2
+ 0x80040400, // 0013 RET 1 R2
+ 0x70020001, // 0014 JMP #0017
+ 0x4C0C0000, // 0015 LDNIL R3
+ 0x80040600, // 0016 RET 1 R3
+ 0x70020001, // 0017 JMP #001A
+ 0x88080102, // 0018 GETMBR R2 R0 K2
+ 0x80040400, // 0019 RET 1 R2
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: ui_string_to_conf
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Plugin_Bridge_HTTP),
+ /* K1 */ be_nested_str_weak(string),
+ /* K2 */ be_nested_str_weak(split),
+ /* K3 */ be_nested_str_weak(_X2C),
+ /* K4 */ be_const_int(3),
+ /* K5 */ be_nested_str_weak(ARG_HTTP),
+ /* K6 */ be_const_int(1),
+ /* K7 */ be_nested_str_weak(ui_string_to_conf),
+ /* K8 */ be_const_int(0),
+ }),
+ be_str_weak(ui_string_to_conf),
+ &be_const_str_solidified,
+ ( &(const binstruction[24]) { /* code */
+ 0x580C0000, // 0000 LDCONST R3 K0
+ 0xA4120200, // 0001 IMPORT R4 K1
+ 0x8C140902, // 0002 GETMET R5 R4 K2
+ 0x001C0503, // 0003 ADD R7 R2 K3
+ 0x58200003, // 0004 LDCONST R8 K3
+ 0x58240004, // 0005 LDCONST R9 K4
+ 0x7C140800, // 0006 CALL R5 4
+ 0x88180705, // 0007 GETMBR R6 R3 K5
+ 0x941C0B06, // 0008 GETIDX R7 R5 K6
+ 0x98040C07, // 0009 SETIDX R1 R6 R7
+ 0x60180003, // 000A GETGBL R6 G3
+ 0x5C1C0600, // 000B MOVE R7 R3
+ 0x7C180200, // 000C CALL R6 1
+ 0x8C180D07, // 000D GETMET R6 R6 K7
+ 0x5C200000, // 000E MOVE R8 R0
+ 0x5C240200, // 000F MOVE R9 R1
+ 0x94280B08, // 0010 GETIDX R10 R5 K8
+ 0x7C180800, // 0011 CALL R6 4
+ 0x60180001, // 0012 GETGBL R6 G1
+ 0x581C0007, // 0013 LDCONST R7 K7
+ 0x5C200200, // 0014 MOVE R8 R1
+ 0x5C240400, // 0015 MOVE R9 R2
+ 0x7C180600, // 0016 CALL R6 3
+ 0x80040200, // 0017 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: call_remote
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote, /* name */
+ be_nested_proto(
+ 14, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[31]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota_http),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(string),
+ /* K3 */ be_nested_str_weak(tasmota),
+ /* K4 */ be_nested_str_weak(wifi),
+ /* K5 */ be_nested_str_weak(up),
+ /* K6 */ be_nested_str_weak(eth),
+ /* K7 */ be_const_int(2),
+ /* K8 */ be_const_int(0),
+ /* K9 */ be_nested_str_weak(webclient),
+ /* K10 */ be_nested_str_weak(set_timeouts),
+ /* K11 */ be_nested_str_weak(set_follow_redirects),
+ /* K12 */ be_nested_str_weak(format),
+ /* K13 */ be_nested_str_weak(_X25scm_X3Fcmnd_X3D_X25s_X25_X2520_X25s),
+ /* K14 */ be_nested_str_weak(),
+ /* K15 */ be_nested_str_weak(log),
+ /* K16 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20),
+ /* K17 */ be_const_int(3),
+ /* K18 */ be_nested_str_weak(begin),
+ /* K19 */ be_nested_str_weak(GET),
+ /* K20 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20code_X3D),
+ /* K21 */ be_nested_str_weak(get_string),
+ /* K22 */ be_nested_str_weak(close),
+ /* K23 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20payload_X3D),
+ /* K24 */ be_nested_str_weak(load),
+ /* K25 */ be_nested_str_weak(reachable),
+ /* K26 */ be_nested_str_weak(reachable_tick),
+ /* K27 */ be_nested_str_weak(device),
+ /* K28 */ be_nested_str_weak(tick),
+ /* K29 */ be_const_int(1),
+ /* K30 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying),
+ }),
+ be_str_weak(call_remote),
+ &be_const_str_solidified,
+ ( &(const binstruction[91]) { /* code */
+ 0x880C0100, // 0000 GETMBR R3 R0 K0
+ 0x740E0001, // 0001 JMPT R3 #0004
+ 0x4C0C0000, // 0002 LDNIL R3
+ 0x80040600, // 0003 RET 1 R3
+ 0xA40E0200, // 0004 IMPORT R3 K1
+ 0xA4120400, // 0005 IMPORT R4 K2
+ 0xB8160600, // 0006 GETNGBL R5 K3
+ 0x8C140B04, // 0007 GETMET R5 R5 K4
+ 0x7C140200, // 0008 CALL R5 1
+ 0x94140B05, // 0009 GETIDX R5 R5 K5
+ 0x74160006, // 000A JMPT R5 #0012
+ 0xB8160600, // 000B GETNGBL R5 K3
+ 0x8C140B06, // 000C GETMET R5 R5 K6
+ 0x7C140200, // 000D CALL R5 1
+ 0x94140B05, // 000E GETIDX R5 R5 K5
+ 0x74160001, // 000F JMPT R5 #0012
+ 0x4C140000, // 0010 LDNIL R5
+ 0x80040A00, // 0011 RET 1 R5
+ 0x58140007, // 0012 LDCONST R5 K7
+ 0x24180B08, // 0013 GT R6 R5 K8
+ 0x781A0041, // 0014 JMPF R6 #0057
+ 0xB81A1200, // 0015 GETNGBL R6 K9
+ 0x7C180000, // 0016 CALL R6 0
+ 0x8C1C0D0A, // 0017 GETMET R7 R6 K10
+ 0x542603E7, // 0018 LDINT R9 1000
+ 0x542A03E7, // 0019 LDINT R10 1000
+ 0x7C1C0600, // 001A CALL R7 3
+ 0x8C1C0D0B, // 001B GETMET R7 R6 K11
+ 0x50240000, // 001C LDBOOL R9 0 0
+ 0x7C1C0400, // 001D CALL R7 2
+ 0x8C1C090C, // 001E GETMET R7 R4 K12
+ 0x5824000D, // 001F LDCONST R9 K13
+ 0x88280100, // 0020 GETMBR R10 R0 K0
+ 0x5C2C0200, // 0021 MOVE R11 R1
+ 0x780A0001, // 0022 JMPF R2 #0025
+ 0x5C300400, // 0023 MOVE R12 R2
+ 0x70020000, // 0024 JMP #0026
+ 0x5830000E, // 0025 LDCONST R12 K14
+ 0x7C1C0A00, // 0026 CALL R7 5
+ 0xB8220600, // 0027 GETNGBL R8 K3
+ 0x8C20110F, // 0028 GETMET R8 R8 K15
+ 0x002A2007, // 0029 ADD R10 K16 R7
+ 0x582C0011, // 002A LDCONST R11 K17
+ 0x7C200600, // 002B CALL R8 3
+ 0x8C200D12, // 002C GETMET R8 R6 K18
+ 0x5C280E00, // 002D MOVE R10 R7
+ 0x7C200400, // 002E CALL R8 2
+ 0x8C200D13, // 002F GETMET R8 R6 K19
+ 0x7C200200, // 0030 CALL R8 1
+ 0xB8260600, // 0031 GETNGBL R9 K3
+ 0x8C24130F, // 0032 GETMET R9 R9 K15
+ 0x602C0008, // 0033 GETGBL R11 G8
+ 0x5C301000, // 0034 MOVE R12 R8
+ 0x7C2C0200, // 0035 CALL R11 1
+ 0x002E280B, // 0036 ADD R11 K20 R11
+ 0x58300011, // 0037 LDCONST R12 K17
+ 0x7C240600, // 0038 CALL R9 3
+ 0x542600C7, // 0039 LDINT R9 200
+ 0x1C241009, // 003A EQ R9 R8 R9
+ 0x78260011, // 003B JMPF R9 #004E
+ 0x8C240D15, // 003C GETMET R9 R6 K21
+ 0x7C240200, // 003D CALL R9 1
+ 0x8C280D16, // 003E GETMET R10 R6 K22
+ 0x7C280200, // 003F CALL R10 1
+ 0xB82A0600, // 0040 GETNGBL R10 K3
+ 0x8C28150F, // 0041 GETMET R10 R10 K15
+ 0x00322E09, // 0042 ADD R12 K23 R9
+ 0x58340011, // 0043 LDCONST R13 K17
+ 0x7C280600, // 0044 CALL R10 3
+ 0x8C280718, // 0045 GETMET R10 R3 K24
+ 0x5C301200, // 0046 MOVE R12 R9
+ 0x7C280400, // 0047 CALL R10 2
+ 0x502C0200, // 0048 LDBOOL R11 1 0
+ 0x9002320B, // 0049 SETMBR R0 K25 R11
+ 0x882C011B, // 004A GETMBR R11 R0 K27
+ 0x882C171C, // 004B GETMBR R11 R11 K28
+ 0x9002340B, // 004C SETMBR R0 K26 R11
+ 0x80041400, // 004D RET 1 R10
+ 0x8C240D16, // 004E GETMET R9 R6 K22
+ 0x7C240200, // 004F CALL R9 1
+ 0x04140B1D, // 0050 SUB R5 R5 K29
+ 0xB8260600, // 0051 GETNGBL R9 K3
+ 0x8C24130F, // 0052 GETMET R9 R9 K15
+ 0x582C001E, // 0053 LDCONST R11 K30
+ 0x58300011, // 0054 LDCONST R12 K17
+ 0x7C240600, // 0055 CALL R9 3
+ 0x7001FFBB, // 0056 JMP #0013
+ 0x50180000, // 0057 LDBOOL R6 0 0
+ 0x90023206, // 0058 SETMBR R0 K25 R6
+ 0x4C180000, // 0059 LDNIL R6
+ 0x80040C00, // 005A RET 1 R6
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: get_status_8
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_get_status_8, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(device),
+ /* K1 */ be_nested_str_weak(tick),
+ /* K2 */ be_nested_str_weak(tasmota_status_8),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(_tick),
+ /* K5 */ be_nested_str_weak(call_remote),
+ /* K6 */ be_nested_str_weak(Status),
+ /* K7 */ be_nested_str_weak(8),
+ }),
+ be_str_weak(get_status_8),
+ &be_const_str_solidified,
+ ( &(const binstruction[27]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x88040301, // 0001 GETMBR R1 R1 K1
+ 0x88080102, // 0002 GETMBR R2 R0 K2
+ 0x4C0C0000, // 0003 LDNIL R3
+ 0x1C080403, // 0004 EQ R2 R2 R3
+ 0x740A0005, // 0005 JMPT R2 #000C
+ 0x88080102, // 0006 GETMBR R2 R0 K2
+ 0x8C080503, // 0007 GETMET R2 R2 K3
+ 0x58100004, // 0008 LDCONST R4 K4
+ 0x7C080400, // 0009 CALL R2 2
+ 0x20080401, // 000A NE R2 R2 R1
+ 0x780A000B, // 000B JMPF R2 #0018
+ 0x8C080105, // 000C GETMET R2 R0 K5
+ 0x58100006, // 000D LDCONST R4 K6
+ 0x58140007, // 000E LDCONST R5 K7
+ 0x7C080600, // 000F CALL R2 3
+ 0x780A0003, // 0010 JMPF R2 #0015
+ 0x980A0801, // 0011 SETIDX R2 K4 R1
+ 0x90020402, // 0012 SETMBR R0 K2 R2
+ 0x80040400, // 0013 RET 1 R2
+ 0x70020001, // 0014 JMP #0017
+ 0x4C0C0000, // 0015 LDNIL R3
+ 0x80040600, // 0016 RET 1 R3
+ 0x70020001, // 0017 JMP #001A
+ 0x88080102, // 0018 GETMBR R2 R0 K2
+ 0x80040400, // 0019 RET 1 R2
+ 0x80000000, // 001A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: ui_conf_to_string
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 2, /* argc */
+ 4, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_const_class(be_class_Matter_Plugin_Bridge_HTTP),
+ /* K1 */ be_nested_str_weak(ui_conf_to_string),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(ARG_HTTP),
+ /* K4 */ be_nested_str_weak(),
+ /* K5 */ be_nested_str_weak(_X2C),
+ /* K6 */ be_nested_str_weak(MTR_X3A_X20ui_conf_to_string),
+ }),
+ be_str_weak(ui_conf_to_string),
+ &be_const_str_solidified,
+ ( &(const binstruction[23]) { /* code */
+ 0x58080000, // 0000 LDCONST R2 K0
+ 0x600C0003, // 0001 GETGBL R3 G3
+ 0x5C100400, // 0002 MOVE R4 R2
+ 0x7C0C0200, // 0003 CALL R3 1
+ 0x8C0C0701, // 0004 GETMET R3 R3 K1
+ 0x5C140000, // 0005 MOVE R5 R0
+ 0x5C180200, // 0006 MOVE R6 R1
+ 0x7C0C0600, // 0007 CALL R3 3
+ 0x60100008, // 0008 GETGBL R4 G8
+ 0x8C140302, // 0009 GETMET R5 R1 K2
+ 0x881C0503, // 000A GETMBR R7 R2 K3
+ 0x58200004, // 000B LDCONST R8 K4
+ 0x7C140600, // 000C CALL R5 3
+ 0x7C100200, // 000D CALL R4 1
+ 0x00140705, // 000E ADD R5 R3 K5
+ 0x00140A04, // 000F ADD R5 R5 R4
+ 0x60180001, // 0010 GETGBL R6 G1
+ 0x581C0006, // 0011 LDCONST R7 K6
+ 0x5C200200, // 0012 MOVE R8 R1
+ 0x5C240000, // 0013 MOVE R9 R0
+ 0x5C280A00, // 0014 MOVE R10 R5
+ 0x7C180800, // 0015 CALL R6 4
+ 0x80040A00, // 0016 RET 1 R5
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */
+ be_nested_proto(
+ 12, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[17]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(init),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(ARG_HTTP),
+ /* K4 */ be_nested_str_weak(_X3A_X2F_X2F),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(http_X3A_X2F_X2F),
+ /* K7 */ be_nested_str_weak(_X2F),
+ /* K8 */ be_nested_str_weak(tasmota_http),
+ /* K9 */ be_nested_str_weak(tasmota),
+ /* K10 */ be_nested_str_weak(log),
+ /* K11 */ be_nested_str_weak(format),
+ /* K12 */ be_nested_str_weak(MTR_X3A_X20ERROR_X3A_X20_X27url_X27_X20is_X20not_X20configured_X20for_X20endpoint_X20_X25i),
+ /* K13 */ be_const_int(2),
+ /* K14 */ be_nested_str_weak(tasmota_status_8),
+ /* K15 */ be_nested_str_weak(tasmota_status_11),
+ /* K16 */ be_nested_str_weak(reachable),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[39]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0x60140003, // 0001 GETGBL R5 G3
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x7C140200, // 0003 CALL R5 1
+ 0x8C140B01, // 0004 GETMET R5 R5 K1
+ 0x5C1C0200, // 0005 MOVE R7 R1
+ 0x5C200400, // 0006 MOVE R8 R2
+ 0x5C240600, // 0007 MOVE R9 R3
+ 0x7C140800, // 0008 CALL R5 4
+ 0x8C140702, // 0009 GETMET R5 R3 K2
+ 0x881C0103, // 000A GETMBR R7 R0 K3
+ 0x7C140400, // 000B CALL R5 2
+ 0x7816000A, // 000C JMPF R5 #0018
+ 0x8C180902, // 000D GETMET R6 R4 K2
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x58240004, // 000F LDCONST R9 K4
+ 0x7C180600, // 0010 CALL R6 3
+ 0x14180D05, // 0011 LT R6 R6 K5
+ 0x781A0002, // 0012 JMPF R6 #0016
+ 0x001A0C05, // 0013 ADD R6 K6 R5
+ 0x00180D07, // 0014 ADD R6 R6 K7
+ 0x5C140C00, // 0015 MOVE R5 R6
+ 0x90021005, // 0016 SETMBR R0 K8 R5
+ 0x70020007, // 0017 JMP #0020
+ 0xB81A1200, // 0018 GETNGBL R6 K9
+ 0x8C180D0A, // 0019 GETMET R6 R6 K10
+ 0x8C20090B, // 001A GETMET R8 R4 K11
+ 0x5828000C, // 001B LDCONST R10 K12
+ 0x5C2C0400, // 001C MOVE R11 R2
+ 0x7C200600, // 001D CALL R8 3
+ 0x5824000D, // 001E LDCONST R9 K13
+ 0x7C180600, // 001F CALL R6 3
+ 0x4C180000, // 0020 LDNIL R6
+ 0x90021C06, // 0021 SETMBR R0 K14 R6
+ 0x4C180000, // 0022 LDNIL R6
+ 0x90021E06, // 0023 SETMBR R0 K15 R6
+ 0x50180000, // 0024 LDBOOL R6 0 0
+ 0x90022006, // 0025 SETMBR R0 K16 R6
+ 0x80000000, // 0026 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Bridge_HTTP
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Device;
+be_local_class(Matter_Plugin_Bridge_HTTP,
+ 5,
+ &be_class_Matter_Plugin_Device,
+ be_nested_map(21,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(get_types, 20), be_const_closure(Matter_Plugin_Bridge_HTTP_get_types_closure) },
+ { be_const_key_weak(is_reachable, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_is_reachable_closure) },
+ { be_const_key_weak(tasmota_http, -1), be_const_var(0) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) },
+ { be_const_key_weak(reachable_tick, -1), be_const_var(4) },
+ { be_const_key_weak(get_status_8, 6), be_const_closure(Matter_Plugin_Bridge_HTTP_get_status_8_closure) },
+ { be_const_key_weak(tasmota_status_11, -1), be_const_var(2) },
+ { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(1,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(17),
+ })) ) } )) },
+ })) ) } )) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak() },
+ { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak() },
+ { be_const_key_weak(reachable, -1), be_const_var(3) },
+ { be_const_key_weak(ARG_HTTP, 3), be_nested_str_weak(url) },
+ { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf_closure) },
+ { be_const_key_weak(tasmota_status_8, 18), be_const_var(1) },
+ { be_const_key_weak(ARG, 8), be_nested_str_weak() },
+ { be_const_key_weak(call_remote, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_closure) },
+ { be_const_key_weak(get_status_11, 5), be_const_closure(Matter_Plugin_Bridge_HTTP_get_status_11_closure) },
+ { be_const_key_weak(HTTP_TIMEOUT, 4), be_const_int(300) },
+ { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string_closure) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_attribute_closure) },
+ })),
+ be_str_weak(Matter_Plugin_Bridge_HTTP)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Bridge_HTTP_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_HTTP);
+ be_setglobal(vm, "Matter_Plugin_Bridge_HTTP");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h
new file mode 100644
index 000000000..937ff508a
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h
@@ -0,0 +1,400 @@
+/* Solidification of Matter_Plugin_Bridge_OnOff.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Bridge_OnOff;
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff__X3Clambda_X3E, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 1, /* argc */
+ 0, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(_X3Clambda_X3E),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 4]) { /* code */
+ 0x60040009, // 0000 GETGBL R1 G9
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x80040200, // 0003 RET 1 R1
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff_init, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(init),
+ /* K2 */ be_nested_str_weak(shadow_onoff),
+ /* K3 */ be_nested_str_weak(tasmota_relay_index),
+ /* K4 */ be_nested_str_weak(find),
+ /* K5 */ be_nested_str_weak(ARG),
+ /* K6 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0xA4120000, // 0000 IMPORT R4 K0
+ 0x60140003, // 0001 GETGBL R5 G3
+ 0x5C180000, // 0002 MOVE R6 R0
+ 0x7C140200, // 0003 CALL R5 1
+ 0x8C140B01, // 0004 GETMET R5 R5 K1
+ 0x5C1C0200, // 0005 MOVE R7 R1
+ 0x5C200400, // 0006 MOVE R8 R2
+ 0x5C240600, // 0007 MOVE R9 R3
+ 0x7C140800, // 0008 CALL R5 4
+ 0x50140000, // 0009 LDBOOL R5 0 0
+ 0x90020405, // 000A SETMBR R0 K2 R5
+ 0x8C140704, // 000B GETMET R5 R3 K4
+ 0x881C0105, // 000C GETMBR R7 R0 K5
+ 0x7C140400, // 000D CALL R5 2
+ 0x90020605, // 000E SETMBR R0 K3 R5
+ 0x88140103, // 000F GETMBR R5 R0 K3
+ 0x4C180000, // 0010 LDNIL R6
+ 0x1C140A06, // 0011 EQ R5 R5 R6
+ 0x78160000, // 0012 JMPF R5 #0014
+ 0x90020706, // 0013 SETMBR R0 K3 K6
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_onoff
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff_set_onoff, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(call_remote),
+ /* K1 */ be_nested_str_weak(Power),
+ /* K2 */ be_nested_str_weak(1),
+ /* K3 */ be_nested_str_weak(0),
+ /* K4 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(set_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x58100001, // 0001 LDCONST R4 K1
+ 0x78060001, // 0002 JMPF R1 #0005
+ 0x58140002, // 0003 LDCONST R5 K2
+ 0x70020000, // 0004 JMP #0006
+ 0x58140003, // 0005 LDCONST R5 K3
+ 0x7C080600, // 0006 CALL R2 3
+ 0x8C080104, // 0007 GETMET R2 R0 K4
+ 0x7C080200, // 0008 CALL R2 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: invoke_request
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff_invoke_request, /* name */
+ be_nested_proto(
+ 10, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[11]) { /* constants */
+ /* K0 */ be_nested_str_weak(matter),
+ /* K1 */ be_nested_str_weak(TLV),
+ /* K2 */ be_nested_str_weak(cluster),
+ /* K3 */ be_nested_str_weak(command),
+ /* K4 */ be_nested_str_weak(update_shadow_lazy),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(set_onoff),
+ /* K7 */ be_nested_str_weak(update_shadow),
+ /* K8 */ be_const_int(1),
+ /* K9 */ be_const_int(2),
+ /* K10 */ be_nested_str_weak(shadow_onoff),
+ }),
+ be_str_weak(invoke_request),
+ &be_const_str_solidified,
+ ( &(const binstruction[42]) { /* code */
+ 0xB8120000, // 0000 GETNGBL R4 K0
+ 0x88100901, // 0001 GETMBR R4 R4 K1
+ 0x88140702, // 0002 GETMBR R5 R3 K2
+ 0x88180703, // 0003 GETMBR R6 R3 K3
+ 0x541E0005, // 0004 LDINT R7 6
+ 0x1C1C0A07, // 0005 EQ R7 R5 R7
+ 0x781E0021, // 0006 JMPF R7 #0029
+ 0x8C1C0104, // 0007 GETMET R7 R0 K4
+ 0x7C1C0200, // 0008 CALL R7 1
+ 0x1C1C0D05, // 0009 EQ R7 R6 K5
+ 0x781E0007, // 000A JMPF R7 #0013
+ 0x8C1C0106, // 000B GETMET R7 R0 K6
+ 0x50240000, // 000C LDBOOL R9 0 0
+ 0x7C1C0400, // 000D CALL R7 2
+ 0x8C1C0107, // 000E GETMET R7 R0 K7
+ 0x7C1C0200, // 000F CALL R7 1
+ 0x501C0200, // 0010 LDBOOL R7 1 0
+ 0x80040E00, // 0011 RET 1 R7
+ 0x70020015, // 0012 JMP #0029
+ 0x1C1C0D08, // 0013 EQ R7 R6 K8
+ 0x781E0007, // 0014 JMPF R7 #001D
+ 0x8C1C0106, // 0015 GETMET R7 R0 K6
+ 0x50240200, // 0016 LDBOOL R9 1 0
+ 0x7C1C0400, // 0017 CALL R7 2
+ 0x8C1C0107, // 0018 GETMET R7 R0 K7
+ 0x7C1C0200, // 0019 CALL R7 1
+ 0x501C0200, // 001A LDBOOL R7 1 0
+ 0x80040E00, // 001B RET 1 R7
+ 0x7002000B, // 001C JMP #0029
+ 0x1C1C0D09, // 001D EQ R7 R6 K9
+ 0x781E0009, // 001E JMPF R7 #0029
+ 0x8C1C0106, // 001F GETMET R7 R0 K6
+ 0x8824010A, // 0020 GETMBR R9 R0 K10
+ 0x78260000, // 0021 JMPF R9 #0023
+ 0x50240001, // 0022 LDBOOL R9 0 1
+ 0x50240200, // 0023 LDBOOL R9 1 0
+ 0x7C1C0400, // 0024 CALL R7 2
+ 0x8C1C0107, // 0025 GETMET R7 R0 K7
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x501C0200, // 0027 LDBOOL R7 1 0
+ 0x80040E00, // 0028 RET 1 R7
+ 0x80000000, // 0029 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(BOOL),
+ /* K9 */ be_nested_str_weak(shadow_onoff),
+ /* K10 */ be_nested_str_weak(U4),
+ /* K11 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0005, // 0005 LDINT R7 6
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E001B, // 0007 JMPF R7 #0024
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x70020010, // 0011 JMP #0023
+ 0x541EFFFB, // 0012 LDINT R7 65532
+ 0x1C1C0C07, // 0013 EQ R7 R6 R7
+ 0x781E0005, // 0014 JMPF R7 #001B
+ 0x8C1C0907, // 0015 GETMET R7 R4 K7
+ 0x8824090A, // 0016 GETMBR R9 R4 K10
+ 0x58280006, // 0017 LDCONST R10 K6
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x80040E00, // 0019 RET 1 R7
+ 0x70020007, // 001A JMP #0023
+ 0x541EFFFC, // 001B LDINT R7 65533
+ 0x1C1C0C07, // 001C EQ R7 R6 R7
+ 0x781E0004, // 001D JMPF R7 #0023
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x8824090A, // 001F GETMBR R9 R4 K10
+ 0x542A0003, // 0020 LDINT R10 4
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020007, // 0023 JMP #002C
+ 0x601C0003, // 0024 GETGBL R7 G3
+ 0x5C200000, // 0025 MOVE R8 R0
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x8C1C0F0B, // 0027 GETMET R7 R7 K11
+ 0x5C240200, // 0028 MOVE R9 R1
+ 0x5C280400, // 0029 MOVE R10 R2
+ 0x7C1C0600, // 002A CALL R7 3
+ 0x80040E00, // 002B RET 1 R7
+ 0x80000000, // 002C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_OnOff_update_shadow, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(get_status_11),
+ /* K1 */ be_nested_str_weak(find),
+ /* K2 */ be_nested_str_weak(StatusSTS),
+ /* K3 */ be_nested_str_weak(POWER),
+ /* K4 */ be_nested_str_weak(ON),
+ /* K5 */ be_nested_str_weak(shadow_onoff),
+ /* K6 */ be_nested_str_weak(attribute_updated),
+ /* K7 */ be_const_int(0),
+ /* K8 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[34]) { /* code */
+ 0x8C040100, // 0000 GETMET R1 R0 K0
+ 0x7C040200, // 0001 CALL R1 1
+ 0x78060018, // 0002 JMPF R1 #001C
+ 0x8C080301, // 0003 GETMET R2 R1 K1
+ 0x58100002, // 0004 LDCONST R4 K2
+ 0x60140013, // 0005 GETGBL R5 G19
+ 0x7C140000, // 0006 CALL R5 0
+ 0x7C080600, // 0007 CALL R2 3
+ 0x5C040400, // 0008 MOVE R1 R2
+ 0x8C080301, // 0009 GETMET R2 R1 K1
+ 0x58100003, // 000A LDCONST R4 K3
+ 0x7C080400, // 000B CALL R2 2
+ 0x1C080504, // 000C EQ R2 R2 K4
+ 0x880C0105, // 000D GETMBR R3 R0 K5
+ 0x4C100000, // 000E LDNIL R4
+ 0x200C0604, // 000F NE R3 R3 R4
+ 0x780E0009, // 0010 JMPF R3 #001B
+ 0x880C0105, // 0011 GETMBR R3 R0 K5
+ 0x60100017, // 0012 GETGBL R4 G23
+ 0x5C140400, // 0013 MOVE R5 R2
+ 0x7C100200, // 0014 CALL R4 1
+ 0x200C0604, // 0015 NE R3 R3 R4
+ 0x780E0003, // 0016 JMPF R3 #001B
+ 0x8C0C0106, // 0017 GETMET R3 R0 K6
+ 0x54160005, // 0018 LDINT R5 6
+ 0x58180007, // 0019 LDCONST R6 K7
+ 0x7C0C0600, // 001A CALL R3 3
+ 0x90020A02, // 001B SETMBR R0 K5 R2
+ 0x60080003, // 001C GETGBL R2 G3
+ 0x5C0C0000, // 001D MOVE R3 R0
+ 0x7C080200, // 001E CALL R2 1
+ 0x8C080508, // 001F GETMET R2 R2 K8
+ 0x7C080200, // 0020 CALL R2 1
+ 0x80000000, // 0021 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Bridge_OnOff
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
+be_local_class(Matter_Plugin_Bridge_OnOff,
+ 3,
+ &be_class_Matter_Plugin_Bridge_HTTP,
+ be_nested_map(14,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+ be_const_list( * be_nested_list(3,
+ ( (struct bvalue*) &(const bvalue[]) {
+ be_const_int(0),
+ be_const_int(65532),
+ be_const_int(65533),
+ })) ) } )) },
+ })) ) } )) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Bridge_OnOff__X3Clambda_X3E_closure) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_relay) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_update_shadow_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_init_closure) },
+ { be_const_key_weak(shadow_onoff, 13), be_const_var(2) },
+ { be_const_key_weak(invoke_request, 4), be_const_closure(Matter_Plugin_Bridge_OnOff_invoke_request_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Relay) },
+ { be_const_key_weak(tasmota_http, 12), be_const_var(0) },
+ { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ be_const_map( * be_nested_map(1,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(266, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_read_attribute_closure) },
+ { be_const_key_weak(tasmota_relay_index, -1), be_const_var(1) },
+ { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_set_onoff_closure) },
+ })),
+ be_str_weak(Matter_Plugin_Bridge_OnOff)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Bridge_OnOff_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_OnOff);
+ be_setglobal(vm, "Matter_Plugin_Bridge_OnOff");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
index 7de68c853..d8782dcac 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h
@@ -6,6 +6,177 @@
extern const bclass be_class_Matter_Plugin_Light0;
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 8]) { /* constants */
+ /* K0 */ be_nested_str_weak(light),
+ /* K1 */ be_nested_str_weak(get),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(power),
+ /* K4 */ be_nested_str_weak(shadow_onoff),
+ /* K5 */ be_nested_str_weak(attribute_updated),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x7C080200, // 0002 CALL R2 1
+ 0x8C0C0502, // 0003 GETMET R3 R2 K2
+ 0x58140003, // 0004 LDCONST R5 K3
+ 0x4C180000, // 0005 LDNIL R6
+ 0x7C0C0600, // 0006 CALL R3 3
+ 0x88100104, // 0007 GETMBR R4 R0 K4
+ 0x20100604, // 0008 NE R4 R3 R4
+ 0x78120004, // 0009 JMPF R4 #000F
+ 0x8C100105, // 000A GETMET R4 R0 K5
+ 0x541A0005, // 000B LDINT R6 6
+ 0x581C0006, // 000C LDCONST R7 K6
+ 0x7C100600, // 000D CALL R4 3
+ 0x90020803, // 000E SETMBR R0 K4 R3
+ 0x60100003, // 000F GETGBL R4 G3
+ 0x5C140000, // 0010 MOVE R5 R0
+ 0x7C100200, // 0011 CALL R4 1
+ 0x8C100907, // 0012 GETMET R4 R4 K7
+ 0x7C100200, // 0013 CALL R4 1
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
+ be_nested_proto(
+ 11, /* nstack */
+ 3, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[12]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(matter),
+ /* K2 */ be_nested_str_weak(TLV),
+ /* K3 */ be_nested_str_weak(cluster),
+ /* K4 */ be_nested_str_weak(attribute),
+ /* K5 */ be_nested_str_weak(update_shadow_lazy),
+ /* K6 */ be_const_int(0),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(BOOL),
+ /* K9 */ be_nested_str_weak(shadow_onoff),
+ /* K10 */ be_nested_str_weak(U4),
+ /* K11 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xB8120200, // 0001 GETNGBL R4 K1
+ 0x88100902, // 0002 GETMBR R4 R4 K2
+ 0x88140503, // 0003 GETMBR R5 R2 K3
+ 0x88180504, // 0004 GETMBR R6 R2 K4
+ 0x541E0005, // 0005 LDINT R7 6
+ 0x1C1C0A07, // 0006 EQ R7 R5 R7
+ 0x781E001B, // 0007 JMPF R7 #0024
+ 0x8C1C0105, // 0008 GETMET R7 R0 K5
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x1C1C0D06, // 000A EQ R7 R6 K6
+ 0x781E0005, // 000B JMPF R7 #0012
+ 0x8C1C0907, // 000C GETMET R7 R4 K7
+ 0x88240908, // 000D GETMBR R9 R4 K8
+ 0x88280109, // 000E GETMBR R10 R0 K9
+ 0x7C1C0600, // 000F CALL R7 3
+ 0x80040E00, // 0010 RET 1 R7
+ 0x70020010, // 0011 JMP #0023
+ 0x541EFFFB, // 0012 LDINT R7 65532
+ 0x1C1C0C07, // 0013 EQ R7 R6 R7
+ 0x781E0005, // 0014 JMPF R7 #001B
+ 0x8C1C0907, // 0015 GETMET R7 R4 K7
+ 0x8824090A, // 0016 GETMBR R9 R4 K10
+ 0x58280006, // 0017 LDCONST R10 K6
+ 0x7C1C0600, // 0018 CALL R7 3
+ 0x80040E00, // 0019 RET 1 R7
+ 0x70020007, // 001A JMP #0023
+ 0x541EFFFC, // 001B LDINT R7 65533
+ 0x1C1C0C07, // 001C EQ R7 R6 R7
+ 0x781E0004, // 001D JMPF R7 #0023
+ 0x8C1C0907, // 001E GETMET R7 R4 K7
+ 0x8824090A, // 001F GETMBR R9 R4 K10
+ 0x542A0003, // 0020 LDINT R10 4
+ 0x7C1C0600, // 0021 CALL R7 3
+ 0x80040E00, // 0022 RET 1 R7
+ 0x70020007, // 0023 JMP #002C
+ 0x601C0003, // 0024 GETGBL R7 G3
+ 0x5C200000, // 0025 MOVE R8 R0
+ 0x7C1C0200, // 0026 CALL R7 1
+ 0x8C1C0F0B, // 0027 GETMET R7 R7 K11
+ 0x5C240200, // 0028 MOVE R9 R1
+ 0x5C280400, // 0029 MOVE R10 R2
+ 0x7C1C0600, // 002A CALL R7 3
+ 0x80040E00, // 002B RET 1 R7
+ 0x80000000, // 002C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Light0_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_onoff),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x50100000, // 0008 LDBOOL R4 0 0
+ 0x90020204, // 0009 SETMBR R0 K1 R4
+ 0x80000000, // 000A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -95,177 +266,6 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: read_attribute
-********************************************************************/
-be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
- be_nested_proto(
- 11, /* nstack */
- 3, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[12]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(matter),
- /* K2 */ be_nested_str_weak(TLV),
- /* K3 */ be_nested_str_weak(cluster),
- /* K4 */ be_nested_str_weak(attribute),
- /* K5 */ be_nested_str_weak(update_shadow_lazy),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(create_TLV),
- /* K8 */ be_nested_str_weak(BOOL),
- /* K9 */ be_nested_str_weak(shadow_onoff),
- /* K10 */ be_nested_str_weak(U4),
- /* K11 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[45]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xB8120200, // 0001 GETNGBL R4 K1
- 0x88100902, // 0002 GETMBR R4 R4 K2
- 0x88140503, // 0003 GETMBR R5 R2 K3
- 0x88180504, // 0004 GETMBR R6 R2 K4
- 0x541E0005, // 0005 LDINT R7 6
- 0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E001B, // 0007 JMPF R7 #0024
- 0x8C1C0105, // 0008 GETMET R7 R0 K5
- 0x7C1C0200, // 0009 CALL R7 1
- 0x1C1C0D06, // 000A EQ R7 R6 K6
- 0x781E0005, // 000B JMPF R7 #0012
- 0x8C1C0907, // 000C GETMET R7 R4 K7
- 0x88240908, // 000D GETMBR R9 R4 K8
- 0x88280109, // 000E GETMBR R10 R0 K9
- 0x7C1C0600, // 000F CALL R7 3
- 0x80040E00, // 0010 RET 1 R7
- 0x70020010, // 0011 JMP #0023
- 0x541EFFFB, // 0012 LDINT R7 65532
- 0x1C1C0C07, // 0013 EQ R7 R6 R7
- 0x781E0005, // 0014 JMPF R7 #001B
- 0x8C1C0907, // 0015 GETMET R7 R4 K7
- 0x8824090A, // 0016 GETMBR R9 R4 K10
- 0x58280006, // 0017 LDCONST R10 K6
- 0x7C1C0600, // 0018 CALL R7 3
- 0x80040E00, // 0019 RET 1 R7
- 0x70020007, // 001A JMP #0023
- 0x541EFFFC, // 001B LDINT R7 65533
- 0x1C1C0C07, // 001C EQ R7 R6 R7
- 0x781E0004, // 001D JMPF R7 #0023
- 0x8C1C0907, // 001E GETMET R7 R4 K7
- 0x8824090A, // 001F GETMBR R9 R4 K10
- 0x542A0003, // 0020 LDINT R10 4
- 0x7C1C0600, // 0021 CALL R7 3
- 0x80040E00, // 0022 RET 1 R7
- 0x70020007, // 0023 JMP #002C
- 0x601C0003, // 0024 GETGBL R7 G3
- 0x5C200000, // 0025 MOVE R8 R0
- 0x7C1C0200, // 0026 CALL R7 1
- 0x8C1C0F0B, // 0027 GETMET R7 R7 K11
- 0x5C240200, // 0028 MOVE R9 R1
- 0x5C280400, // 0029 MOVE R10 R2
- 0x7C1C0600, // 002A CALL R7 3
- 0x80040E00, // 002B RET 1 R7
- 0x80000000, // 002C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
- be_nested_proto(
- 8, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
- /* K0 */ be_nested_str_weak(light),
- /* K1 */ be_nested_str_weak(get),
- /* K2 */ be_nested_str_weak(find),
- /* K3 */ be_nested_str_weak(power),
- /* K4 */ be_nested_str_weak(shadow_onoff),
- /* K5 */ be_nested_str_weak(attribute_updated),
- /* K6 */ be_const_int(0),
- /* K7 */ be_nested_str_weak(update_shadow),
- }),
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[21]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x7C080200, // 0002 CALL R2 1
- 0x8C0C0502, // 0003 GETMET R3 R2 K2
- 0x58140003, // 0004 LDCONST R5 K3
- 0x4C180000, // 0005 LDNIL R6
- 0x7C0C0600, // 0006 CALL R3 3
- 0x88100104, // 0007 GETMBR R4 R0 K4
- 0x20100604, // 0008 NE R4 R3 R4
- 0x78120004, // 0009 JMPF R4 #000F
- 0x8C100105, // 000A GETMET R4 R0 K5
- 0x541A0005, // 000B LDINT R6 6
- 0x581C0006, // 000C LDCONST R7 K6
- 0x7C100600, // 000D CALL R4 3
- 0x90020803, // 000E SETMBR R0 K4 R3
- 0x60100003, // 000F GETGBL R4 G3
- 0x5C140000, // 0010 MOVE R5 R0
- 0x7C100200, // 0011 CALL R4 1
- 0x8C100907, // 0012 GETMET R4 R4 K7
- 0x7C100200, // 0013 CALL R4 1
- 0x80000000, // 0014 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_Light0_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_onoff),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x50100000, // 0008 LDBOOL R4 0 0
- 0x90020204, // 0009 SETMBR R0 K1 R4
- 0x80000000, // 000A RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_Light0
********************************************************************/
@@ -273,17 +273,17 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Light0,
1,
&be_class_Matter_Plugin_Device,
- be_nested_map(9,
+ be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
- { be_const_key_weak(shadow_onoff, 8), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -294,10 +294,11 @@ be_local_class(Matter_Plugin_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
+ { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
- { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
+ { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
})),
be_str_weak(Matter_Plugin_Light0)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
index 07ce40c5a..4d753eca5 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h
@@ -33,6 +33,94 @@ be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_init, /* name */
+ be_nested_proto(
+ 9, /* nstack */
+ 4, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(init),
+ /* K1 */ be_nested_str_weak(shadow_onoff),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(find),
+ /* K4 */ be_nested_str_weak(ARG),
+ /* K5 */ be_const_int(0),
+ }),
+ be_str_weak(init),
+ &be_const_str_solidified,
+ ( &(const binstruction[20]) { /* code */
+ 0x60100003, // 0000 GETGBL R4 G3
+ 0x5C140000, // 0001 MOVE R5 R0
+ 0x7C100200, // 0002 CALL R4 1
+ 0x8C100900, // 0003 GETMET R4 R4 K0
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x5C1C0400, // 0005 MOVE R7 R2
+ 0x5C200600, // 0006 MOVE R8 R3
+ 0x7C100800, // 0007 CALL R4 4
+ 0x50100000, // 0008 LDBOOL R4 0 0
+ 0x90020204, // 0009 SETMBR R0 K1 R4
+ 0x8C100703, // 000A GETMET R4 R3 K3
+ 0x88180104, // 000B GETMBR R6 R0 K4
+ 0x7C100400, // 000C CALL R4 2
+ 0x90020404, // 000D SETMBR R0 K2 R4
+ 0x88100102, // 000E GETMBR R4 R0 K2
+ 0x4C140000, // 000F LDNIL R5
+ 0x1C100805, // 0010 EQ R4 R4 R5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020505, // 0012 SETMBR R0 K2 K5
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: set_onoff
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
+ be_nested_proto(
+ 7, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(set_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(set_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0xB80A0000, // 0000 GETNGBL R2 K0
+ 0x8C080501, // 0001 GETMET R2 R2 K1
+ 0x88100102, // 0002 GETMBR R4 R0 K2
+ 0x60140017, // 0003 GETGBL R5 G23
+ 0x5C180200, // 0004 MOVE R6 R1
+ 0x7C140200, // 0005 CALL R5 1
+ 0x7C080600, // 0006 CALL R2 3
+ 0x8C080103, // 0007 GETMET R2 R0 K3
+ 0x7C080200, // 0008 CALL R2 1
+ 0x80000000, // 0009 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@@ -110,153 +198,6 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: init
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_init, /* name */
- be_nested_proto(
- 9, /* nstack */
- 4, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(init),
- /* K1 */ be_nested_str_weak(shadow_onoff),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(find),
- /* K4 */ be_nested_str_weak(ARG),
- /* K5 */ be_const_int(0),
- }),
- be_str_weak(init),
- &be_const_str_solidified,
- ( &(const binstruction[20]) { /* code */
- 0x60100003, // 0000 GETGBL R4 G3
- 0x5C140000, // 0001 MOVE R5 R0
- 0x7C100200, // 0002 CALL R4 1
- 0x8C100900, // 0003 GETMET R4 R4 K0
- 0x5C180200, // 0004 MOVE R6 R1
- 0x5C1C0400, // 0005 MOVE R7 R2
- 0x5C200600, // 0006 MOVE R8 R3
- 0x7C100800, // 0007 CALL R4 4
- 0x50100000, // 0008 LDBOOL R4 0 0
- 0x90020204, // 0009 SETMBR R0 K1 R4
- 0x8C100703, // 000A GETMET R4 R3 K3
- 0x88180104, // 000B GETMBR R6 R0 K4
- 0x7C100400, // 000C CALL R4 2
- 0x90020404, // 000D SETMBR R0 K2 R4
- 0x88100102, // 000E GETMBR R4 R0 K2
- 0x4C140000, // 000F LDNIL R5
- 0x1C100805, // 0010 EQ R4 R4 R5
- 0x78120000, // 0011 JMPF R4 #0013
- 0x90020505, // 0012 SETMBR R0 K2 K5
- 0x80000000, // 0013 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: update_shadow
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */
- be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 7]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(get_power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(shadow_onoff),
- /* K4 */ be_nested_str_weak(attribute_updated),
- /* K5 */ be_const_int(0),
- /* K6 */ be_nested_str_weak(update_shadow),
- }),
- be_str_weak(update_shadow),
- &be_const_str_solidified,
- ( &(const binstruction[28]) { /* code */
- 0xB8060000, // 0000 GETNGBL R1 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x880C0102, // 0002 GETMBR R3 R0 K2
- 0x7C040400, // 0003 CALL R1 2
- 0x4C080000, // 0004 LDNIL R2
- 0x20080202, // 0005 NE R2 R1 R2
- 0x780A000E, // 0006 JMPF R2 #0016
- 0x88080103, // 0007 GETMBR R2 R0 K3
- 0x4C0C0000, // 0008 LDNIL R3
- 0x20080403, // 0009 NE R2 R2 R3
- 0x780A0009, // 000A JMPF R2 #0015
- 0x88080103, // 000B GETMBR R2 R0 K3
- 0x600C0017, // 000C GETGBL R3 G23
- 0x5C100200, // 000D MOVE R4 R1
- 0x7C0C0200, // 000E CALL R3 1
- 0x20080403, // 000F NE R2 R2 R3
- 0x780A0003, // 0010 JMPF R2 #0015
- 0x8C080104, // 0011 GETMET R2 R0 K4
- 0x54120005, // 0012 LDINT R4 6
- 0x58140005, // 0013 LDCONST R5 K5
- 0x7C080600, // 0014 CALL R2 3
- 0x90020601, // 0015 SETMBR R0 K3 R1
- 0x60080003, // 0016 GETGBL R2 G3
- 0x5C0C0000, // 0017 MOVE R3 R0
- 0x7C080200, // 0018 CALL R2 1
- 0x8C080506, // 0019 GETMET R2 R2 K6
- 0x7C080200, // 001A CALL R2 1
- 0x80000000, // 001B RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: set_onoff
-********************************************************************/
-be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
- be_nested_proto(
- 7, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 4]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota),
- /* K1 */ be_nested_str_weak(set_power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(update_shadow),
- }),
- be_str_weak(set_onoff),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xB80A0000, // 0000 GETNGBL R2 K0
- 0x8C080501, // 0001 GETMET R2 R2 K1
- 0x88100102, // 0002 GETMBR R4 R0 K2
- 0x60140017, // 0003 GETGBL R5 G23
- 0x5C180200, // 0004 MOVE R6 R1
- 0x7C140200, // 0005 CALL R5 1
- 0x7C080600, // 0006 CALL R2 3
- 0x8C080103, // 0007 GETMET R2 R0 K3
- 0x7C080200, // 0008 CALL R2 1
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@@ -338,6 +279,65 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */
+ be_nested_proto(
+ 6, /* nstack */
+ 1, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 7]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota),
+ /* K1 */ be_nested_str_weak(get_power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(shadow_onoff),
+ /* K4 */ be_nested_str_weak(attribute_updated),
+ /* K5 */ be_const_int(0),
+ /* K6 */ be_nested_str_weak(update_shadow),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0xB8060000, // 0000 GETNGBL R1 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x880C0102, // 0002 GETMBR R3 R0 K2
+ 0x7C040400, // 0003 CALL R1 2
+ 0x4C080000, // 0004 LDNIL R2
+ 0x20080202, // 0005 NE R2 R1 R2
+ 0x780A000E, // 0006 JMPF R2 #0016
+ 0x88080103, // 0007 GETMBR R2 R0 K3
+ 0x4C0C0000, // 0008 LDNIL R3
+ 0x20080403, // 0009 NE R2 R2 R3
+ 0x780A0009, // 000A JMPF R2 #0015
+ 0x88080103, // 000B GETMBR R2 R0 K3
+ 0x600C0017, // 000C GETGBL R3 G23
+ 0x5C100200, // 000D MOVE R4 R1
+ 0x7C0C0200, // 000E CALL R3 1
+ 0x20080403, // 000F NE R2 R2 R3
+ 0x780A0003, // 0010 JMPF R2 #0015
+ 0x8C080104, // 0011 GETMET R2 R0 K4
+ 0x54120005, // 0012 LDINT R4 6
+ 0x58140005, // 0013 LDCONST R5 K5
+ 0x7C080600, // 0014 CALL R2 3
+ 0x90020601, // 0015 SETMBR R0 K3 R1
+ 0x60080003, // 0016 GETGBL R2 G3
+ 0x5C0C0000, // 0017 MOVE R3 R0
+ 0x7C080200, // 0018 CALL R2 1
+ 0x8C080506, // 0019 GETMET R2 R2 K6
+ 0x7C080200, // 001A CALL R2 1
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
@@ -345,19 +345,9 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_OnOff,
2,
&be_class_Matter_Plugin_Device,
- be_nested_map(13,
+ be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(ARG, 4), be_nested_str_weak(relay) },
- { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
- { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
- { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
- { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
- { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
- { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -368,12 +358,23 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(set_onoff, 8), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(UPDATE_TIME, 13), be_const_int(250) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
+ { be_const_key_weak(set_onoff, 12), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
+ { be_const_key_weak(invoke_request, 4), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
+ { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
+ { be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
index 53e80ddfa..788358b91 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h
@@ -30,6 +30,80 @@ be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: value_changed
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */
+ be_nested_proto(
+ 2, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 0, /* has constants */
+ NULL, /* no const */
+ be_str_weak(value_changed),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_sensors
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 2, /* argc */
+ 2, /* varg */
+ 0, /* has upvals */
+ NULL, /* no upvals */
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
+ /* K1 */ be_nested_str_weak(pre_value),
+ /* K2 */ be_nested_str_weak(match),
+ /* K3 */ be_nested_str_weak(shadow_value),
+ /* K4 */ be_nested_str_weak(value_changed),
+ }),
+ be_str_weak(parse_sensors),
+ &be_const_str_solidified,
+ ( &(const binstruction[21]) { /* code */
+ 0x88080100, // 0000 GETMBR R2 R0 K0
+ 0x780A0011, // 0001 JMPF R2 #0014
+ 0x8C080101, // 0002 GETMET R2 R0 K1
+ 0x6010000A, // 0003 GETGBL R4 G10
+ 0x88140100, // 0004 GETMBR R5 R0 K0
+ 0x8C140B02, // 0005 GETMET R5 R5 K2
+ 0x5C1C0200, // 0006 MOVE R7 R1
+ 0x7C140400, // 0007 CALL R5 2
+ 0x7C100200, // 0008 CALL R4 1
+ 0x7C080400, // 0009 CALL R2 2
+ 0x4C0C0000, // 000A LDNIL R3
+ 0x200C0403, // 000B NE R3 R2 R3
+ 0x780E0006, // 000C JMPF R3 #0014
+ 0x880C0103, // 000D GETMBR R3 R0 K3
+ 0x200C0403, // 000E NE R3 R2 R3
+ 0x780E0002, // 000F JMPF R3 #0013
+ 0x8C0C0104, // 0010 GETMET R3 R0 K4
+ 0x5C140400, // 0011 MOVE R5 R2
+ 0x7C0C0400, // 0012 CALL R3 2
+ 0x90020602, // 0013 SETMBR R0 K3 R2
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: init
********************************************************************/
@@ -83,80 +157,6 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */
/*******************************************************************/
-/********************************************************************
-** Solidified function: parse_sensors
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */
- be_nested_proto(
- 8, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota_sensor_matcher),
- /* K1 */ be_nested_str_weak(pre_value),
- /* K2 */ be_nested_str_weak(match),
- /* K3 */ be_nested_str_weak(shadow_value),
- /* K4 */ be_nested_str_weak(value_changed),
- }),
- be_str_weak(parse_sensors),
- &be_const_str_solidified,
- ( &(const binstruction[21]) { /* code */
- 0x88080100, // 0000 GETMBR R2 R0 K0
- 0x780A0011, // 0001 JMPF R2 #0014
- 0x8C080101, // 0002 GETMET R2 R0 K1
- 0x6010000A, // 0003 GETGBL R4 G10
- 0x88140100, // 0004 GETMBR R5 R0 K0
- 0x8C140B02, // 0005 GETMET R5 R5 K2
- 0x5C1C0200, // 0006 MOVE R7 R1
- 0x7C140400, // 0007 CALL R5 2
- 0x7C100200, // 0008 CALL R4 1
- 0x7C080400, // 0009 CALL R2 2
- 0x4C0C0000, // 000A LDNIL R3
- 0x200C0403, // 000B NE R3 R2 R3
- 0x780E0006, // 000C JMPF R3 #0014
- 0x880C0103, // 000D GETMBR R3 R0 K3
- 0x200C0403, // 000E NE R3 R2 R3
- 0x780E0002, // 000F JMPF R3 #0013
- 0x8C0C0104, // 0010 GETMET R3 R0 K4
- 0x5C140400, // 0011 MOVE R5 R2
- 0x7C0C0400, // 0012 CALL R3 2
- 0x90020602, // 0013 SETMBR R0 K3 R2
- 0x80000000, // 0014 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: value_changed
-********************************************************************/
-be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */
- be_nested_proto(
- 2, /* nstack */
- 2, /* argc */
- 2, /* varg */
- 0, /* has upvals */
- NULL, /* no upvals */
- 0, /* has sup protos */
- NULL, /* no sub protos */
- 0, /* has constants */
- NULL, /* no const */
- be_str_weak(value_changed),
- &be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified class: Matter_Plugin_Sensor
********************************************************************/
@@ -164,16 +164,17 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor,
3,
&be_class_Matter_Plugin_Device,
- be_nested_map(8,
+ be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
- { be_const_key_weak(shadow_value, -1), be_const_var(2) },
- { be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) },
- { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) },
- { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
- { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) },
+ { be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) },
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
+ { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
+ { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) },
+ { be_const_key_weak(init, 7), be_const_closure(Matter_Plugin_Sensor_init_closure) },
+ { be_const_key_weak(parse_sensors, 5), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) },
+ { be_const_key_weak(shadow_value, -1), be_const_var(2) },
+ { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin_Sensor)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
index 995146e41..179384ac0 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h
@@ -132,12 +132,17 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
+ ( &(const binstruction[10]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x20080202, // 0001 NE R2 R1 R2
+ 0x780A0004, // 0002 JMPF R2 #0008
+ 0x60080009, // 0003 GETGBL R2 G9
+ 0x540E0063, // 0004 LDINT R3 100
+ 0x080C0203, // 0005 MUL R3 R1 R3
+ 0x7C080200, // 0006 CALL R2 1
+ 0x70020000, // 0007 JMP #0009
+ 0x4C080000, // 0008 LDNIL R2
+ 0x80040400, // 0009 RET 1 R2
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
index 13650c269..99cba6068 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h
@@ -132,11 +132,16 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
+ ( &(const binstruction[ 9]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x20080202, // 0001 NE R2 R1 R2
+ 0x780A0003, // 0002 JMPF R2 #0007
+ 0x60080009, // 0003 GETGBL R2 G9
+ 0x5C0C0200, // 0004 MOVE R3 R1
+ 0x7C080200, // 0005 CALL R2 1
+ 0x70020000, // 0006 JMP #0008
+ 0x4C080000, // 0007 LDNIL R2
+ 0x80040400, // 0008 RET 1 R2
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
index c36f76084..d3e645510 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h
@@ -132,11 +132,16 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
- ( &(const binstruction[ 4]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x5C0C0200, // 0001 MOVE R3 R1
- 0x7C080200, // 0002 CALL R2 1
- 0x80040400, // 0003 RET 1 R2
+ ( &(const binstruction[ 9]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x20080202, // 0001 NE R2 R1 R2
+ 0x780A0003, // 0002 JMPF R2 #0007
+ 0x60080009, // 0003 GETGBL R2 G9
+ 0x5C0C0200, // 0004 MOVE R3 R1
+ 0x7C080200, // 0005 CALL R2 1
+ 0x70020000, // 0006 JMP #0008
+ 0x4C080000, // 0007 LDNIL R2
+ 0x80040400, // 0008 RET 1 R2
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
index 4fdf3b743..13569d9e4 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h
@@ -129,12 +129,17 @@ be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
- ( &(const binstruction[ 5]) { /* code */
- 0x60080009, // 0000 GETGBL R2 G9
- 0x540E0063, // 0001 LDINT R3 100
- 0x080C0203, // 0002 MUL R3 R1 R3
- 0x7C080200, // 0003 CALL R2 1
- 0x80040400, // 0004 RET 1 R2
+ ( &(const binstruction[10]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x20080202, // 0001 NE R2 R1 R2
+ 0x780A0004, // 0002 JMPF R2 #0008
+ 0x60080009, // 0003 GETGBL R2 G9
+ 0x540E0063, // 0004 LDINT R3 100
+ 0x080C0203, // 0005 MUL R3 R1 R3
+ 0x7C080200, // 0006 CALL R2 1
+ 0x70020000, // 0007 JMP #0009
+ 0x4C080000, // 0008 LDNIL R2
+ 0x80040400, // 0009 RET 1 R2
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
index 189b99c1e..76d72c390 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -19,7 +19,7 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[35]) { /* constants */
+ ( &(const bvalue[36]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(content_send),
@@ -45,20 +45,21 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */
/* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E),
/* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X26nbsp_X3B_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
/* K24 */ be_const_int(1),
- /* K25 */ be_nested_str_weak(get_plugin_class_arg),
- /* K26 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E),
- /* K27 */ be_nested_str_weak(_CLASSES_TYPES),
- /* K28 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
- /* K29 */ be_nested_str_weak(html_escape),
- /* K30 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E),
- /* K31 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
- /* K32 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
- /* K33 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E),
- /* K34 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K25 */ be_nested_str_weak(plugins_classes),
+ /* K26 */ be_nested_str_weak(ui_conf_to_string),
+ /* K27 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E),
+ /* K28 */ be_nested_str_weak(_CLASSES_TYPES),
+ /* K29 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K30 */ be_nested_str_weak(html_escape),
+ /* K31 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E),
+ /* K32 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E),
+ /* K33 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
+ /* K34 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E),
+ /* K35 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
}),
be_str_weak(show_plugins_configuration),
&be_const_str_solidified,
- ( &(const binstruction[180]) { /* code */
+ ( &(const binstruction[181]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x8C0C0302, // 0002 GETMET R3 R1 K2
@@ -137,7 +138,7 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */
0x5C180600, // 004B MOVE R6 R3
0x7C140200, // 004C CALL R5 1
0x14140805, // 004D LT R5 R4 R5
- 0x7816003F, // 004E JMPF R5 #008F
+ 0x78160040, // 004E JMPF R5 #0090
0x94140604, // 004F GETIDX R5 R3 R4
0x8818010A, // 0050 GETMBR R6 R0 K10
0x601C0008, // 0051 GETGBL R7 G8
@@ -154,91 +155,92 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */
0x00100918, // 005C ADD R4 R4 K24
0x7001FFEB, // 005D JMP #004A
0x8820010A, // 005E GETMBR R8 R0 K10
- 0x8C201119, // 005F GETMET R8 R8 K25
- 0x5C280E00, // 0060 MOVE R10 R7
- 0x7C200400, // 0061 CALL R8 2
- 0x78220006, // 0062 JMPF R8 #006A
- 0x60240008, // 0063 GETGBL R9 G8
- 0x8C280D0E, // 0064 GETMET R10 R6 K14
- 0x5C301000, // 0065 MOVE R12 R8
- 0x58340014, // 0066 LDCONST R13 K20
- 0x7C280600, // 0067 CALL R10 3
- 0x7C240200, // 0068 CALL R9 1
- 0x70020000, // 0069 JMP #006B
- 0x58240014, // 006A LDCONST R9 K20
- 0x8C280302, // 006B GETMET R10 R1 K2
- 0x8C300510, // 006C GETMET R12 R2 K16
- 0x5838001A, // 006D LDCONST R14 K26
- 0x5C3C0800, // 006E MOVE R15 R4
- 0x5C400A00, // 006F MOVE R16 R5
- 0x7C300800, // 0070 CALL R12 4
- 0x7C280400, // 0071 CALL R10 2
- 0x8C280302, // 0072 GETMET R10 R1 K2
- 0x8C300510, // 0073 GETMET R12 R2 K16
- 0x58380012, // 0074 LDCONST R14 K18
- 0x5C3C0800, // 0075 MOVE R15 R4
- 0x7C300600, // 0076 CALL R12 3
- 0x7C280400, // 0077 CALL R10 2
- 0x8C280113, // 0078 GETMET R10 R0 K19
- 0x8C300D0E, // 0079 GETMET R12 R6 K14
- 0x5838000F, // 007A LDCONST R14 K15
- 0x583C0014, // 007B LDCONST R15 K20
- 0x7C300600, // 007C CALL R12 3
- 0x8834011B, // 007D GETMBR R13 R0 K27
- 0x7C280600, // 007E CALL R10 3
- 0x8C280302, // 007F GETMET R10 R1 K2
- 0x8C300510, // 0080 GETMET R12 R2 K16
- 0x58380016, // 0081 LDCONST R14 K22
- 0x7C300400, // 0082 CALL R12 2
- 0x7C280400, // 0083 CALL R10 2
- 0x8C280302, // 0084 GETMET R10 R1 K2
- 0x8C300510, // 0085 GETMET R12 R2 K16
- 0x5838001C, // 0086 LDCONST R14 K28
- 0x5C3C0800, // 0087 MOVE R15 R4
- 0x8C40031D, // 0088 GETMET R16 R1 K29
- 0x5C481200, // 0089 MOVE R18 R9
- 0x7C400400, // 008A CALL R16 2
- 0x7C300800, // 008B CALL R12 4
- 0x7C280400, // 008C CALL R10 2
- 0x00100918, // 008D ADD R4 R4 K24
- 0x7001FFBA, // 008E JMP #004A
- 0x8C140302, // 008F GETMET R5 R1 K2
- 0x8C1C0510, // 0090 GETMET R7 R2 K16
- 0x5824001E, // 0091 LDCONST R9 K30
- 0x5C280800, // 0092 MOVE R10 R4
- 0x7C1C0600, // 0093 CALL R7 3
- 0x7C140400, // 0094 CALL R5 2
- 0x8C140302, // 0095 GETMET R5 R1 K2
- 0x8C1C0510, // 0096 GETMET R7 R2 K16
- 0x58240012, // 0097 LDCONST R9 K18
- 0x5C280800, // 0098 MOVE R10 R4
- 0x7C1C0600, // 0099 CALL R7 3
- 0x7C140400, // 009A CALL R5 2
- 0x8C140113, // 009B GETMET R5 R0 K19
- 0x581C0014, // 009C LDCONST R7 K20
- 0x8820011B, // 009D GETMBR R8 R0 K27
- 0x7C140600, // 009E CALL R5 3
- 0x8C140302, // 009F GETMET R5 R1 K2
- 0x8C1C0510, // 00A0 GETMET R7 R2 K16
- 0x58240016, // 00A1 LDCONST R9 K22
- 0x7C1C0400, // 00A2 CALL R7 2
- 0x7C140400, // 00A3 CALL R5 2
- 0x8C140302, // 00A4 GETMET R5 R1 K2
- 0x8C1C0510, // 00A5 GETMET R7 R2 K16
- 0x5824001F, // 00A6 LDCONST R9 K31
- 0x5C280800, // 00A7 MOVE R10 R4
- 0x7C1C0600, // 00A8 CALL R7 3
- 0x7C140400, // 00A9 CALL R5 2
- 0x8C140302, // 00AA GETMET R5 R1 K2
- 0x581C0020, // 00AB LDCONST R7 K32
- 0x7C140400, // 00AC CALL R5 2
- 0x8C140302, // 00AD GETMET R5 R1 K2
- 0x581C0021, // 00AE LDCONST R7 K33
- 0x7C140400, // 00AF CALL R5 2
- 0x8C140302, // 00B0 GETMET R5 R1 K2
- 0x581C0022, // 00B1 LDCONST R7 K34
- 0x7C140400, // 00B2 CALL R5 2
- 0x80000000, // 00B3 RET 0
+ 0x88201119, // 005F GETMBR R8 R8 K25
+ 0x8C20110E, // 0060 GETMET R8 R8 K14
+ 0x5C280E00, // 0061 MOVE R10 R7
+ 0x7C200400, // 0062 CALL R8 2
+ 0x58240014, // 0063 LDCONST R9 K20
+ 0x4C280000, // 0064 LDNIL R10
+ 0x2028100A, // 0065 NE R10 R8 R10
+ 0x782A0004, // 0066 JMPF R10 #006C
+ 0x8C28111A, // 0067 GETMET R10 R8 K26
+ 0x5C301000, // 0068 MOVE R12 R8
+ 0x5C340C00, // 0069 MOVE R13 R6
+ 0x7C280600, // 006A CALL R10 3
+ 0x5C241400, // 006B MOVE R9 R10
+ 0x8C280302, // 006C GETMET R10 R1 K2
+ 0x8C300510, // 006D GETMET R12 R2 K16
+ 0x5838001B, // 006E LDCONST R14 K27
+ 0x5C3C0800, // 006F MOVE R15 R4
+ 0x5C400A00, // 0070 MOVE R16 R5
+ 0x7C300800, // 0071 CALL R12 4
+ 0x7C280400, // 0072 CALL R10 2
+ 0x8C280302, // 0073 GETMET R10 R1 K2
+ 0x8C300510, // 0074 GETMET R12 R2 K16
+ 0x58380012, // 0075 LDCONST R14 K18
+ 0x5C3C0800, // 0076 MOVE R15 R4
+ 0x7C300600, // 0077 CALL R12 3
+ 0x7C280400, // 0078 CALL R10 2
+ 0x8C280113, // 0079 GETMET R10 R0 K19
+ 0x8C300D0E, // 007A GETMET R12 R6 K14
+ 0x5838000F, // 007B LDCONST R14 K15
+ 0x583C0014, // 007C LDCONST R15 K20
+ 0x7C300600, // 007D CALL R12 3
+ 0x8834011C, // 007E GETMBR R13 R0 K28
+ 0x7C280600, // 007F CALL R10 3
+ 0x8C280302, // 0080 GETMET R10 R1 K2
+ 0x8C300510, // 0081 GETMET R12 R2 K16
+ 0x58380016, // 0082 LDCONST R14 K22
+ 0x7C300400, // 0083 CALL R12 2
+ 0x7C280400, // 0084 CALL R10 2
+ 0x8C280302, // 0085 GETMET R10 R1 K2
+ 0x8C300510, // 0086 GETMET R12 R2 K16
+ 0x5838001D, // 0087 LDCONST R14 K29
+ 0x5C3C0800, // 0088 MOVE R15 R4
+ 0x8C40031E, // 0089 GETMET R16 R1 K30
+ 0x5C481200, // 008A MOVE R18 R9
+ 0x7C400400, // 008B CALL R16 2
+ 0x7C300800, // 008C CALL R12 4
+ 0x7C280400, // 008D CALL R10 2
+ 0x00100918, // 008E ADD R4 R4 K24
+ 0x7001FFB9, // 008F JMP #004A
+ 0x8C140302, // 0090 GETMET R5 R1 K2
+ 0x8C1C0510, // 0091 GETMET R7 R2 K16
+ 0x5824001F, // 0092 LDCONST R9 K31
+ 0x5C280800, // 0093 MOVE R10 R4
+ 0x7C1C0600, // 0094 CALL R7 3
+ 0x7C140400, // 0095 CALL R5 2
+ 0x8C140302, // 0096 GETMET R5 R1 K2
+ 0x8C1C0510, // 0097 GETMET R7 R2 K16
+ 0x58240012, // 0098 LDCONST R9 K18
+ 0x5C280800, // 0099 MOVE R10 R4
+ 0x7C1C0600, // 009A CALL R7 3
+ 0x7C140400, // 009B CALL R5 2
+ 0x8C140113, // 009C GETMET R5 R0 K19
+ 0x581C0014, // 009D LDCONST R7 K20
+ 0x8820011C, // 009E GETMBR R8 R0 K28
+ 0x7C140600, // 009F CALL R5 3
+ 0x8C140302, // 00A0 GETMET R5 R1 K2
+ 0x8C1C0510, // 00A1 GETMET R7 R2 K16
+ 0x58240016, // 00A2 LDCONST R9 K22
+ 0x7C1C0400, // 00A3 CALL R7 2
+ 0x7C140400, // 00A4 CALL R5 2
+ 0x8C140302, // 00A5 GETMET R5 R1 K2
+ 0x8C1C0510, // 00A6 GETMET R7 R2 K16
+ 0x58240020, // 00A7 LDCONST R9 K32
+ 0x5C280800, // 00A8 MOVE R10 R4
+ 0x7C1C0600, // 00A9 CALL R7 3
+ 0x7C140400, // 00AA CALL R5 2
+ 0x8C140302, // 00AB GETMET R5 R1 K2
+ 0x581C0021, // 00AC LDCONST R7 K33
+ 0x7C140400, // 00AD CALL R5 2
+ 0x8C140302, // 00AE GETMET R5 R1 K2
+ 0x581C0022, // 00AF LDCONST R7 K34
+ 0x7C140400, // 00B0 CALL R5 2
+ 0x8C140302, // 00B1 GETMET R5 R1 K2
+ 0x581C0023, // 00B2 LDCONST R7 K35
+ 0x7C140400, // 00B3 CALL R5 2
+ 0x80000000, // 00B4 RET 0
})
)
);
@@ -658,7 +660,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[72]) { /* constants */
+ ( &(const bvalue[71]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(check_privileged_access),
/* K2 */ be_nested_str_weak(string),
@@ -709,32 +711,31 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
/* K47 */ be_nested_str_weak(plugins_classes),
/* K48 */ be_nested_str_weak(find),
/* K49 */ be_nested_str_weak(type),
- /* K50 */ be_nested_str_weak(ARG),
- /* K51 */ be_nested_str_weak(ARG_TYPE),
- /* K52 */ be_nested_str_weak(MTR_X3A_X20unknown_X20type_X20_X3D_X20_X25s),
- /* K53 */ be_const_int(2),
- /* K54 */ be_nested_str_weak(MTR_X3A_X20skipping_X20parameter),
- /* K55 */ be_nested_str_weak(MTR_X3A_X20config_X20_X3D_X20_X25s),
- /* K56 */ be_nested_str_weak(contains),
- /* K57 */ be_nested_str_weak(0),
- /* K58 */ be_nested_str_weak(Missing_X20endpoint_X200),
- /* K59 */ be_nested_str_weak(MTR_X3A_X20config_X20error_X20_X3D_X20_X25s),
- /* K60 */ be_nested_str_weak(plugins_config),
- /* K61 */ be_nested_str_weak(content_start),
- /* K62 */ be_nested_str_weak(Parameter_X20error),
- /* K63 */ be_nested_str_weak(content_send_style),
- /* K64 */ be_nested_str_weak(content_send),
- /* K65 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EError_X3A_X3C_X2Fb_X3E_X25s_X3C_X2Fp_X3E),
- /* K66 */ be_nested_str_weak(html_escape),
- /* K67 */ be_nested_str_weak(content_button),
- /* K68 */ be_nested_str_weak(BUTTON_CONFIGURATION),
- /* K69 */ be_nested_str_weak(content_stop),
- /* K70 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
- /* K71 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
+ /* K50 */ be_nested_str_weak(ui_string_to_conf),
+ /* K51 */ be_nested_str_weak(MTR_X3A_X20unknown_X20type_X20_X3D_X20_X25s),
+ /* K52 */ be_const_int(2),
+ /* K53 */ be_nested_str_weak(MTR_X3A_X20skipping_X20parameter),
+ /* K54 */ be_nested_str_weak(MTR_X3A_X20config_X20_X3D_X20_X25s),
+ /* K55 */ be_nested_str_weak(contains),
+ /* K56 */ be_nested_str_weak(0),
+ /* K57 */ be_nested_str_weak(Missing_X20endpoint_X200),
+ /* K58 */ be_nested_str_weak(MTR_X3A_X20config_X20error_X20_X3D_X20_X25s),
+ /* K59 */ be_nested_str_weak(plugins_config),
+ /* K60 */ be_nested_str_weak(content_start),
+ /* K61 */ be_nested_str_weak(Parameter_X20error),
+ /* K62 */ be_nested_str_weak(content_send_style),
+ /* K63 */ be_nested_str_weak(content_send),
+ /* K64 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EError_X3A_X3C_X2Fb_X3E_X25s_X3C_X2Fp_X3E),
+ /* K65 */ be_nested_str_weak(html_escape),
+ /* K66 */ be_nested_str_weak(content_button),
+ /* K67 */ be_nested_str_weak(BUTTON_CONFIGURATION),
+ /* K68 */ be_nested_str_weak(content_stop),
+ /* K69 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
+ /* K70 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
}),
be_str_weak(page_part_ctl),
&be_const_str_solidified,
- ( &(const binstruction[356]) { /* code */
+ ( &(const binstruction[353]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080301, // 0001 GETMET R2 R1 K1
0x7C080200, // 0002 CALL R2 1
@@ -745,7 +746,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0xA40E0600, // 0007 IMPORT R3 K3
0xA4120800, // 0008 IMPORT R4 K4
0x4C140000, // 0009 LDNIL R5
- 0xA8020139, // 000A EXBLK 0 #0145
+ 0xA8020136, // 000A EXBLK 0 #0142
0x8C180305, // 000B GETMET R6 R1 K5
0x58200006, // 000C LDCONST R8 K6
0x7C180400, // 000D CALL R6 2
@@ -796,7 +797,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C180315, // 003A GETMET R6 R1 K21
0x58200016, // 003B LDCONST R8 K22
0x7C180400, // 003C CALL R6 2
- 0x700200F1, // 003D JMP #0130
+ 0x700200EE, // 003D JMP #012D
0x8C180305, // 003E GETMET R6 R1 K5
0x58200017, // 003F LDCONST R8 K23
0x7C180400, // 0040 CALL R6 2
@@ -821,7 +822,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C180315, // 0053 GETMET R6 R1 K21
0x58200016, // 0054 LDCONST R8 K22
0x7C180400, // 0055 CALL R6 2
- 0x700200D8, // 0056 JMP #0130
+ 0x700200D5, // 0056 JMP #012D
0x8C180305, // 0057 GETMET R6 R1 K5
0x5820001D, // 0058 LDCONST R8 K29
0x7C180400, // 0059 CALL R6 2
@@ -846,7 +847,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C180315, // 006C GETMET R6 R1 K21
0x58200016, // 006D LDCONST R8 K22
0x7C180400, // 006E CALL R6 2
- 0x700200BF, // 006F JMP #0130
+ 0x700200BC, // 006F JMP #012D
0x8C180305, // 0070 GETMET R6 R1 K5
0x5820001F, // 0071 LDCONST R8 K31
0x7C180400, // 0072 CALL R6 2
@@ -889,7 +890,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C240315, // 0097 GETMET R9 R1 K21
0x582C0026, // 0098 LDCONST R11 K38
0x7C240400, // 0099 CALL R9 2
- 0x70020094, // 009A JMP #0130
+ 0x70020091, // 009A JMP #012D
0x8C180305, // 009B GETMET R6 R1 K5
0x58200027, // 009C LDCONST R8 K39
0x7C180400, // 009D CALL R6 2
@@ -911,11 +912,11 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C180315, // 00AD GETMET R6 R1 K21
0x58200016, // 00AE LDCONST R8 K22
0x7C180400, // 00AF CALL R6 2
- 0x7002007E, // 00B0 JMP #0130
+ 0x7002007B, // 00B0 JMP #012D
0x8C180305, // 00B1 GETMET R6 R1 K5
0x58200029, // 00B2 LDCONST R8 K41
0x7C180400, // 00B3 CALL R6 2
- 0x781A007A, // 00B4 JMPF R6 #0130
+ 0x781A0077, // 00B4 JMPF R6 #012D
0x60180013, // 00B5 GETGBL R6 G19
0x7C180000, // 00B6 CALL R6 0
0xB81E1000, // 00B7 GETNGBL R7 K8
@@ -934,7 +935,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x8C240305, // 00C4 GETMET R9 R1 K5
0x002E5608, // 00C5 ADD R11 K43 R8
0x7C240400, // 00C6 CALL R9 2
- 0x78260043, // 00C7 JMPF R9 #010C
+ 0x78260040, // 00C7 JMPF R9 #0109
0x8C24030F, // 00C8 GETMET R9 R1 K15
0x002E5608, // 00C9 ADD R11 K43 R8
0x7C240400, // 00CA CALL R9 2
@@ -958,9 +959,9 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x5840000C, // 00DC LDCONST R16 K12
0x7C340600, // 00DD CALL R13 3
0x2034132E, // 00DE NE R13 R9 K46
- 0x7836001F, // 00DF JMPF R13 #0100
+ 0x7836001C, // 00DF JMPF R13 #00FD
0x2034172E, // 00E0 NE R13 R11 K46
- 0x7836001D, // 00E1 JMPF R13 #0100
+ 0x7836001A, // 00E1 JMPF R13 #00FD
0x8834010D, // 00E2 GETMBR R13 R0 K13
0x88341B2F, // 00E3 GETMBR R13 R13 K47
0x8C341B30, // 00E4 GETMET R13 R13 K48
@@ -968,129 +969,126 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x7C340400, // 00E6 CALL R13 2
0x4C380000, // 00E7 LDNIL R14
0x20381A0E, // 00E8 NE R14 R13 R14
- 0x783A000C, // 00E9 JMPF R14 #00F7
+ 0x783A0009, // 00E9 JMPF R14 #00F4
0x60380013, // 00EA GETGBL R14 G19
0x7C380000, // 00EB CALL R14 0
0x983A620B, // 00EC SETIDX R14 K49 R11
- 0x883C1B32, // 00ED GETMBR R15 R13 K50
- 0x88401B33, // 00EE GETMBR R16 R13 K51
- 0x78320004, // 00EF JMPF R12 #00F5
- 0x783E0003, // 00F0 JMPF R15 #00F5
- 0x5C442000, // 00F1 MOVE R17 R16
- 0x5C481800, // 00F2 MOVE R18 R12
- 0x7C440200, // 00F3 CALL R17 1
- 0x98381E11, // 00F4 SETIDX R14 R15 R17
- 0x9818120E, // 00F5 SETIDX R6 R9 R14
- 0x70020007, // 00F6 JMP #00FF
- 0xB83A1000, // 00F7 GETNGBL R14 K8
- 0x8C381D09, // 00F8 GETMET R14 R14 K9
- 0x8C40050A, // 00F9 GETMET R16 R2 K10
- 0x58480034, // 00FA LDCONST R18 K52
- 0x5C4C1600, // 00FB MOVE R19 R11
- 0x7C400600, // 00FC CALL R16 3
- 0x58440035, // 00FD LDCONST R17 K53
- 0x7C380600, // 00FE CALL R14 3
- 0x70020004, // 00FF JMP #0105
- 0xB8361000, // 0100 GETNGBL R13 K8
- 0x8C341B09, // 0101 GETMET R13 R13 K9
- 0x583C0036, // 0102 LDCONST R15 K54
- 0x58400035, // 0103 LDCONST R16 K53
- 0x7C340600, // 0104 CALL R13 3
- 0x001C0F25, // 0105 ADD R7 R7 K37
- 0x8C34050A, // 0106 GETMET R13 R2 K10
- 0x583C002A, // 0107 LDCONST R15 K42
- 0x5C400E00, // 0108 MOVE R16 R7
- 0x7C340600, // 0109 CALL R13 3
- 0x5C201A00, // 010A MOVE R8 R13
- 0x7001FFB7, // 010B JMP #00C4
- 0xB8261000, // 010C GETNGBL R9 K8
- 0x8C241309, // 010D GETMET R9 R9 K9
- 0x8C2C050A, // 010E GETMET R11 R2 K10
- 0x58340037, // 010F LDCONST R13 K55
- 0x60380008, // 0110 GETGBL R14 G8
- 0x5C3C0C00, // 0111 MOVE R15 R6
- 0x7C380200, // 0112 CALL R14 1
- 0x7C2C0600, // 0113 CALL R11 3
- 0x5830000C, // 0114 LDCONST R12 K12
- 0x7C240600, // 0115 CALL R9 3
- 0x8C240D38, // 0116 GETMET R9 R6 K56
- 0x582C0039, // 0117 LDCONST R11 K57
- 0x7C240400, // 0118 CALL R9 2
- 0x74260000, // 0119 JMPT R9 #011B
- 0x5814003A, // 011A LDCONST R5 K58
- 0x78160008, // 011B JMPF R5 #0125
- 0xB8261000, // 011C GETNGBL R9 K8
- 0x8C241309, // 011D GETMET R9 R9 K9
- 0x8C2C050A, // 011E GETMET R11 R2 K10
- 0x5834003B, // 011F LDCONST R13 K59
- 0x5C380A00, // 0120 MOVE R14 R5
- 0x7C2C0600, // 0121 CALL R11 3
- 0x5830000C, // 0122 LDCONST R12 K12
- 0x7C240600, // 0123 CALL R9 3
- 0x7002000A, // 0124 JMP #0130
- 0x8824010D, // 0125 GETMBR R9 R0 K13
- 0x90267806, // 0126 SETMBR R9 K60 R6
+ 0x8C3C1B32, // 00ED GETMET R15 R13 K50
+ 0x5C441A00, // 00EE MOVE R17 R13
+ 0x5C481C00, // 00EF MOVE R18 R14
+ 0x5C4C1800, // 00F0 MOVE R19 R12
+ 0x7C3C0800, // 00F1 CALL R15 4
+ 0x9818120E, // 00F2 SETIDX R6 R9 R14
+ 0x70020007, // 00F3 JMP #00FC
+ 0xB83A1000, // 00F4 GETNGBL R14 K8
+ 0x8C381D09, // 00F5 GETMET R14 R14 K9
+ 0x8C40050A, // 00F6 GETMET R16 R2 K10
+ 0x58480033, // 00F7 LDCONST R18 K51
+ 0x5C4C1600, // 00F8 MOVE R19 R11
+ 0x7C400600, // 00F9 CALL R16 3
+ 0x58440034, // 00FA LDCONST R17 K52
+ 0x7C380600, // 00FB CALL R14 3
+ 0x70020004, // 00FC JMP #0102
+ 0xB8361000, // 00FD GETNGBL R13 K8
+ 0x8C341B09, // 00FE GETMET R13 R13 K9
+ 0x583C0035, // 00FF LDCONST R15 K53
+ 0x58400034, // 0100 LDCONST R16 K52
+ 0x7C340600, // 0101 CALL R13 3
+ 0x001C0F25, // 0102 ADD R7 R7 K37
+ 0x8C34050A, // 0103 GETMET R13 R2 K10
+ 0x583C002A, // 0104 LDCONST R15 K42
+ 0x5C400E00, // 0105 MOVE R16 R7
+ 0x7C340600, // 0106 CALL R13 3
+ 0x5C201A00, // 0107 MOVE R8 R13
+ 0x7001FFBA, // 0108 JMP #00C4
+ 0xB8261000, // 0109 GETNGBL R9 K8
+ 0x8C241309, // 010A GETMET R9 R9 K9
+ 0x8C2C050A, // 010B GETMET R11 R2 K10
+ 0x58340036, // 010C LDCONST R13 K54
+ 0x60380008, // 010D GETGBL R14 G8
+ 0x5C3C0C00, // 010E MOVE R15 R6
+ 0x7C380200, // 010F CALL R14 1
+ 0x7C2C0600, // 0110 CALL R11 3
+ 0x5830000C, // 0111 LDCONST R12 K12
+ 0x7C240600, // 0112 CALL R9 3
+ 0x8C240D37, // 0113 GETMET R9 R6 K55
+ 0x582C0038, // 0114 LDCONST R11 K56
+ 0x7C240400, // 0115 CALL R9 2
+ 0x74260000, // 0116 JMPT R9 #0118
+ 0x58140039, // 0117 LDCONST R5 K57
+ 0x78160008, // 0118 JMPF R5 #0122
+ 0xB8261000, // 0119 GETNGBL R9 K8
+ 0x8C241309, // 011A GETMET R9 R9 K9
+ 0x8C2C050A, // 011B GETMET R11 R2 K10
+ 0x5834003A, // 011C LDCONST R13 K58
+ 0x5C380A00, // 011D MOVE R14 R5
+ 0x7C2C0600, // 011E CALL R11 3
+ 0x5830000C, // 011F LDCONST R12 K12
+ 0x7C240600, // 0120 CALL R9 3
+ 0x7002000A, // 0121 JMP #012D
+ 0x8824010D, // 0122 GETMBR R9 R0 K13
+ 0x90267606, // 0123 SETMBR R9 K59 R6
+ 0x8824010D, // 0124 GETMBR R9 R0 K13
+ 0x50280200, // 0125 LDBOOL R10 1 0
+ 0x9026500A, // 0126 SETMBR R9 K40 R10
0x8824010D, // 0127 GETMBR R9 R0 K13
- 0x50280200, // 0128 LDBOOL R10 1 0
- 0x9026500A, // 0129 SETMBR R9 K40 R10
- 0x8824010D, // 012A GETMBR R9 R0 K13
- 0x8C241314, // 012B GETMET R9 R9 K20
- 0x7C240200, // 012C CALL R9 1
- 0x8C240315, // 012D GETMET R9 R1 K21
- 0x582C0016, // 012E LDCONST R11 K22
- 0x7C240400, // 012F CALL R9 2
- 0x78160011, // 0130 JMPF R5 #0143
- 0x8C18033D, // 0131 GETMET R6 R1 K61
- 0x5820003E, // 0132 LDCONST R8 K62
- 0x7C180400, // 0133 CALL R6 2
- 0x8C18033F, // 0134 GETMET R6 R1 K63
- 0x7C180200, // 0135 CALL R6 1
- 0x8C180340, // 0136 GETMET R6 R1 K64
- 0x8C20050A, // 0137 GETMET R8 R2 K10
- 0x58280041, // 0138 LDCONST R10 K65
- 0x8C2C0342, // 0139 GETMET R11 R1 K66
- 0x5C340A00, // 013A MOVE R13 R5
- 0x7C2C0400, // 013B CALL R11 2
- 0x7C200600, // 013C CALL R8 3
+ 0x8C241314, // 0128 GETMET R9 R9 K20
+ 0x7C240200, // 0129 CALL R9 1
+ 0x8C240315, // 012A GETMET R9 R1 K21
+ 0x582C0016, // 012B LDCONST R11 K22
+ 0x7C240400, // 012C CALL R9 2
+ 0x78160011, // 012D JMPF R5 #0140
+ 0x8C18033C, // 012E GETMET R6 R1 K60
+ 0x5820003D, // 012F LDCONST R8 K61
+ 0x7C180400, // 0130 CALL R6 2
+ 0x8C18033E, // 0131 GETMET R6 R1 K62
+ 0x7C180200, // 0132 CALL R6 1
+ 0x8C18033F, // 0133 GETMET R6 R1 K63
+ 0x8C20050A, // 0134 GETMET R8 R2 K10
+ 0x58280040, // 0135 LDCONST R10 K64
+ 0x8C2C0341, // 0136 GETMET R11 R1 K65
+ 0x5C340A00, // 0137 MOVE R13 R5
+ 0x7C2C0400, // 0138 CALL R11 2
+ 0x7C200600, // 0139 CALL R8 3
+ 0x7C180400, // 013A CALL R6 2
+ 0x8C180342, // 013B GETMET R6 R1 K66
+ 0x88200343, // 013C GETMBR R8 R1 K67
0x7C180400, // 013D CALL R6 2
- 0x8C180343, // 013E GETMET R6 R1 K67
- 0x88200344, // 013F GETMBR R8 R1 K68
- 0x7C180400, // 0140 CALL R6 2
- 0x8C180345, // 0141 GETMET R6 R1 K69
- 0x7C180200, // 0142 CALL R6 1
- 0xA8040001, // 0143 EXBLK 1 1
- 0x7002001D, // 0144 JMP #0163
- 0xAC180002, // 0145 CATCH R6 0 2
- 0x7002001A, // 0146 JMP #0162
- 0xB8221000, // 0147 GETNGBL R8 K8
- 0x8C201109, // 0148 GETMET R8 R8 K9
- 0x8C28050A, // 0149 GETMET R10 R2 K10
- 0x58300046, // 014A LDCONST R12 K70
- 0x5C340C00, // 014B MOVE R13 R6
- 0x5C380E00, // 014C MOVE R14 R7
- 0x7C280800, // 014D CALL R10 4
- 0x582C0035, // 014E LDCONST R11 K53
- 0x7C200600, // 014F CALL R8 3
- 0x8C20033D, // 0150 GETMET R8 R1 K61
- 0x5828003E, // 0151 LDCONST R10 K62
- 0x7C200400, // 0152 CALL R8 2
- 0x8C20033F, // 0153 GETMET R8 R1 K63
- 0x7C200200, // 0154 CALL R8 1
- 0x8C200340, // 0155 GETMET R8 R1 K64
- 0x8C28050A, // 0156 GETMET R10 R2 K10
- 0x58300047, // 0157 LDCONST R12 K71
- 0x5C340C00, // 0158 MOVE R13 R6
- 0x5C380E00, // 0159 MOVE R14 R7
- 0x7C280800, // 015A CALL R10 4
+ 0x8C180344, // 013E GETMET R6 R1 K68
+ 0x7C180200, // 013F CALL R6 1
+ 0xA8040001, // 0140 EXBLK 1 1
+ 0x7002001D, // 0141 JMP #0160
+ 0xAC180002, // 0142 CATCH R6 0 2
+ 0x7002001A, // 0143 JMP #015F
+ 0xB8221000, // 0144 GETNGBL R8 K8
+ 0x8C201109, // 0145 GETMET R8 R8 K9
+ 0x8C28050A, // 0146 GETMET R10 R2 K10
+ 0x58300045, // 0147 LDCONST R12 K69
+ 0x5C340C00, // 0148 MOVE R13 R6
+ 0x5C380E00, // 0149 MOVE R14 R7
+ 0x7C280800, // 014A CALL R10 4
+ 0x582C0034, // 014B LDCONST R11 K52
+ 0x7C200600, // 014C CALL R8 3
+ 0x8C20033C, // 014D GETMET R8 R1 K60
+ 0x5828003D, // 014E LDCONST R10 K61
+ 0x7C200400, // 014F CALL R8 2
+ 0x8C20033E, // 0150 GETMET R8 R1 K62
+ 0x7C200200, // 0151 CALL R8 1
+ 0x8C20033F, // 0152 GETMET R8 R1 K63
+ 0x8C28050A, // 0153 GETMET R10 R2 K10
+ 0x58300046, // 0154 LDCONST R12 K70
+ 0x5C340C00, // 0155 MOVE R13 R6
+ 0x5C380E00, // 0156 MOVE R14 R7
+ 0x7C280800, // 0157 CALL R10 4
+ 0x7C200400, // 0158 CALL R8 2
+ 0x8C200342, // 0159 GETMET R8 R1 K66
+ 0x88280343, // 015A GETMBR R10 R1 K67
0x7C200400, // 015B CALL R8 2
- 0x8C200343, // 015C GETMET R8 R1 K67
- 0x88280344, // 015D GETMBR R10 R1 K68
- 0x7C200400, // 015E CALL R8 2
- 0x8C200345, // 015F GETMET R8 R1 K69
- 0x7C200200, // 0160 CALL R8 1
- 0x70020000, // 0161 JMP #0163
- 0xB0080000, // 0162 RAISE 2 R0 R0
- 0x80000000, // 0163 RET 0
+ 0x8C200344, // 015C GETMET R8 R1 K68
+ 0x7C200200, // 015D CALL R8 1
+ 0x70020000, // 015E JMP #0160
+ 0xB0080000, // 015F RAISE 2 R0 R0
+ 0x80000000, // 0160 RET 0
})
)
);
@@ -1318,7 +1316,7 @@ be_local_closure(Matter_UI_plugin_option, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[14]) { /* constants */
+ ( &(const bvalue[16]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(split),
@@ -1327,16 +1325,18 @@ be_local_closure(Matter_UI_plugin_option, /* name */
/* K5 */ be_nested_str_weak(),
/* K6 */ be_nested_str_weak(content_send),
/* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E),
- /* K8 */ be_nested_str_weak(device),
- /* K9 */ be_nested_str_weak(get_plugin_class_displayname),
- /* K10 */ be_nested_str_weak(format),
- /* K11 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E),
- /* K12 */ be_nested_str_weak(_X20selected),
- /* K13 */ be_const_int(1),
+ /* K8 */ be_nested_str_weak(_X2Dhttp),
+ /* K9 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X20disabled_X3E_X2D_X2D_X2D_X20Tasmota_X20Remote_X20_X2D_X2D_X2D_X3C_X2Foption_X3E),
+ /* K10 */ be_nested_str_weak(device),
+ /* K11 */ be_nested_str_weak(get_plugin_class_displayname),
+ /* K12 */ be_nested_str_weak(format),
+ /* K13 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E),
+ /* K14 */ be_nested_str_weak(_X20selected),
+ /* K15 */ be_const_int(1),
}),
be_str_weak(plugin_option),
&be_const_str_solidified,
- ( &(const binstruction[42]) { /* code */
+ ( &(const binstruction[48]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xA4120200, // 0001 IMPORT R4 K1
0x780A0004, // 0002 JMPF R2 #0008
@@ -1352,33 +1352,39 @@ be_local_closure(Matter_UI_plugin_option, /* name */
0x5C200A00, // 000C MOVE R8 R5
0x7C1C0200, // 000D CALL R7 1
0x141C0C07, // 000E LT R7 R6 R7
- 0x781E0018, // 000F JMPF R7 #0029
+ 0x781E001E, // 000F JMPF R7 #002F
0x941C0A06, // 0010 GETIDX R7 R5 R6
0x1C200F05, // 0011 EQ R8 R7 K5
0x78220003, // 0012 JMPF R8 #0017
0x8C200706, // 0013 GETMET R8 R3 K6
0x58280007, // 0014 LDCONST R10 K7
0x7C200400, // 0015 CALL R8 2
- 0x7002000F, // 0016 JMP #0027
- 0x88200108, // 0017 GETMBR R8 R0 K8
- 0x8C201109, // 0018 GETMET R8 R8 K9
- 0x5C280E00, // 0019 MOVE R10 R7
- 0x7C200400, // 001A CALL R8 2
- 0x8C240706, // 001B GETMET R9 R3 K6
- 0x8C2C090A, // 001C GETMET R11 R4 K10
- 0x5834000B, // 001D LDCONST R13 K11
- 0x5C380E00, // 001E MOVE R14 R7
- 0x1C3C0E01, // 001F EQ R15 R7 R1
- 0x783E0001, // 0020 JMPF R15 #0023
- 0x583C000C, // 0021 LDCONST R15 K12
- 0x70020000, // 0022 JMP #0024
- 0x583C0005, // 0023 LDCONST R15 K5
- 0x5C401000, // 0024 MOVE R16 R8
- 0x7C2C0A00, // 0025 CALL R11 5
- 0x7C240400, // 0026 CALL R9 2
- 0x00180D0D, // 0027 ADD R6 R6 K13
- 0x7001FFE1, // 0028 JMP #000B
- 0x80000000, // 0029 RET 0
+ 0x70020015, // 0016 JMP #002D
+ 0x1C200F08, // 0017 EQ R8 R7 K8
+ 0x78220003, // 0018 JMPF R8 #001D
+ 0x8C200706, // 0019 GETMET R8 R3 K6
+ 0x58280009, // 001A LDCONST R10 K9
+ 0x7C200400, // 001B CALL R8 2
+ 0x7002000F, // 001C JMP #002D
+ 0x8820010A, // 001D GETMBR R8 R0 K10
+ 0x8C20110B, // 001E GETMET R8 R8 K11
+ 0x5C280E00, // 001F MOVE R10 R7
+ 0x7C200400, // 0020 CALL R8 2
+ 0x8C240706, // 0021 GETMET R9 R3 K6
+ 0x8C2C090C, // 0022 GETMET R11 R4 K12
+ 0x5834000D, // 0023 LDCONST R13 K13
+ 0x5C380E00, // 0024 MOVE R14 R7
+ 0x1C3C0E01, // 0025 EQ R15 R7 R1
+ 0x783E0001, // 0026 JMPF R15 #0029
+ 0x583C000E, // 0027 LDCONST R15 K14
+ 0x70020000, // 0028 JMP #002A
+ 0x583C0005, // 0029 LDCONST R15 K5
+ 0x5C401000, // 002A MOVE R16 R8
+ 0x7C2C0A00, // 002B CALL R11 5
+ 0x7C240400, // 002C CALL R9 2
+ 0x00180D0F, // 002D ADD R6 R6 K15
+ 0x7001FFDB, // 002E JMP #000B
+ 0x80000000, // 002F RET 0
})
)
);
@@ -1792,7 +1798,7 @@ be_local_class(Matter_UI,
be_nested_map(17,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(show_plugins_configuration, -1), be_const_closure(Matter_UI_show_plugins_configuration_closure) },
- { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
+ { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7C_X2Dhttp_X7Chttp_relay) },
{ be_const_key_weak(show_fabric_info, 7), be_const_closure(Matter_UI_show_fabric_info_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) },
{ be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) },
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino
index 842d8804a..56588d339 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino
@@ -198,7 +198,7 @@ extern "C" {
be_map_insert_int(vm, "frag", ESP_getHeapFragmentation());
// give info about stack size
be_map_insert_int(vm, "stack_size", SET_ESP32_STACK_SIZE / 1024);
- be_map_insert_int(vm, "stack_low", uxTaskGetStackHighWaterMark(nullptr) / 1024);
+ be_map_insert_real(vm, "stack_low", ((float)uxTaskGetStackHighWaterMark(nullptr)) / 1024);
if (UsePSRAM()) {
be_map_insert_int(vm, "psram", ESP.getPsramSize() / 1024);
be_map_insert_int(vm, "psram_free", ESP.getFreePsram() / 1024);
From 13de7a486348e5cabc764b03682fa6f5f4f9bdb5 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Thu, 4 May 2023 21:27:55 +0200
Subject: [PATCH 062/289] Berry make add_driver() idempotent (#18580)
---
.../src/embedded/tasmota_class.be | 6 ++--
.../src/solidify/solidified_tasmota_class.h | 28 ++++++++++++-------
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be b/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be
index 1295436bd..02bf7a814 100644
--- a/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be
+++ b/lib/libesp32/berry_tasmota/src/embedded/tasmota_class.be
@@ -621,8 +621,10 @@ class Tasmota
raise "value_error", "instance required"
end
if self._drivers
- self._drivers.push(d)
- else
+ if self._drivers.find(d) == nil # add only if not already added
+ self._drivers.push(d)
+ end
+ else
self._drivers = [d]
end
end
diff --git a/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h b/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h
index 25461a620..8762cef14 100644
--- a/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h
+++ b/lib/libesp32/berry_tasmota/src/solidify/solidified_tasmota_class.h
@@ -1082,16 +1082,17 @@ be_local_closure(Tasmota_add_driver, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 5]) { /* constants */
+ ( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str(instance),
/* K1 */ be_nested_str(value_error),
/* K2 */ be_nested_str(instance_X20required),
/* K3 */ be_nested_str(_drivers),
- /* K4 */ be_nested_str(push),
+ /* K4 */ be_nested_str(find),
+ /* K5 */ be_nested_str(push),
}),
&be_const_str_add_driver,
&be_const_str_solidified,
- ( &(const binstruction[18]) { /* code */
+ ( &(const binstruction[25]) { /* code */
0x60080004, // 0000 GETGBL R2 G4
0x5C0C0200, // 0001 MOVE R3 R1
0x7C080200, // 0002 CALL R2 1
@@ -1099,17 +1100,24 @@ be_local_closure(Tasmota_add_driver, /* name */
0x780A0000, // 0004 JMPF R2 #0006
0xB0060302, // 0005 RAISE 1 K1 K2
0x88080103, // 0006 GETMBR R2 R0 K3
- 0x780A0004, // 0007 JMPF R2 #000D
+ 0x780A000B, // 0007 JMPF R2 #0014
0x88080103, // 0008 GETMBR R2 R0 K3
0x8C080504, // 0009 GETMET R2 R2 K4
0x5C100200, // 000A MOVE R4 R1
0x7C080400, // 000B CALL R2 2
- 0x70020003, // 000C JMP #0011
- 0x60080012, // 000D GETGBL R2 G18
- 0x7C080000, // 000E CALL R2 0
- 0x400C0401, // 000F CONNECT R3 R2 R1
- 0x90020602, // 0010 SETMBR R0 K3 R2
- 0x80000000, // 0011 RET 0
+ 0x4C0C0000, // 000C LDNIL R3
+ 0x1C080403, // 000D EQ R2 R2 R3
+ 0x780A0003, // 000E JMPF R2 #0013
+ 0x88080103, // 000F GETMBR R2 R0 K3
+ 0x8C080505, // 0010 GETMET R2 R2 K5
+ 0x5C100200, // 0011 MOVE R4 R1
+ 0x7C080400, // 0012 CALL R2 2
+ 0x70020003, // 0013 JMP #0018
+ 0x60080012, // 0014 GETGBL R2 G18
+ 0x7C080000, // 0015 CALL R2 0
+ 0x400C0401, // 0016 CONNECT R3 R2 R1
+ 0x90020602, // 0017 SETMBR R0 K3 R2
+ 0x80000000, // 0018 RET 0
})
)
);
From 687b26ad1351cbd10285e783e2addf663194e203 Mon Sep 17 00:00:00 2001
From: gemu
Date: Fri, 5 May 2023 09:17:17 +0200
Subject: [PATCH 063/289] Scripter update (#18578)
* add ds2480b library
* add onewire support
* reset on error
* call to get esp32 HWS
* DS2480 serial invert option
---
.../TasmotaSerial-3.6.0/src/TasmotaSerial.h | 1 +
lib/lib_div/DS2480B/DS2480B.cpp | 569 ++++++++++++++++++
lib/lib_div/DS2480B/DS2480B.h | 200 ++++++
lib/lib_div/DS2480B/README.md | 6 +
.../DS18x20_Temperature.ino | 123 ++++
lib/lib_div/DS2480B/keywords.txt | 64 ++
lib/lib_div/DS2480B/library.properties | 9 +
tasmota/include/Powerwall.h | 5 +
.../tasmota_xdrv_driver/xdrv_10_scripter.ino | 550 +++++++++++++++--
9 files changed, 1486 insertions(+), 41 deletions(-)
create mode 100644 lib/lib_div/DS2480B/DS2480B.cpp
create mode 100644 lib/lib_div/DS2480B/DS2480B.h
create mode 100644 lib/lib_div/DS2480B/README.md
create mode 100644 lib/lib_div/DS2480B/examples/DS18x20_Temperature/DS18x20_Temperature.ino
create mode 100644 lib/lib_div/DS2480B/keywords.txt
create mode 100644 lib/lib_div/DS2480B/library.properties
diff --git a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h
index c41282004..2f9be0963 100644
--- a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h
+++ b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h
@@ -64,6 +64,7 @@ class TasmotaSerial : public Stream {
uint32_t getLoopReadMetric(void) const { return m_bit_follow_metric; }
#ifdef ESP32
uint32_t getUart(void) const { return m_uart; }
+ HardwareSerial *getesp32hws(void) { return TSerial; }
#endif
bool isValid(void) { return m_valid; }
bool overflow(void);
diff --git a/lib/lib_div/DS2480B/DS2480B.cpp b/lib/lib_div/DS2480B/DS2480B.cpp
new file mode 100644
index 000000000..ff091ed2c
--- /dev/null
+++ b/lib/lib_div/DS2480B/DS2480B.cpp
@@ -0,0 +1,569 @@
+/*
+Copyright (c) 2007, Jim Studt (original old version - many contributors since)
+
+This library based on OneWire library currently maintained by Paul Stoffregen. However,
+it has been modified to use the DS2480B serial to 1-wire chip instead of direct
+bitbanging on a digital pin. Also, it is unfortunately hard coded to use the AltSoftSerial library
+since this library has no common ancestor with the hardware serial class and there isn't a good way
+to allow use of either
+
+OneWire has been maintained by Paul Stoffregen (paul@pjrc.com) since
+January 2010. At the time, it was in need of many bug fixes, but had
+been abandoned the original author (Jim Studt). None of the known
+contributors were interested in maintaining OneWire. Paul typically
+works on OneWire every 6 to 12 months. Patches usually wait that
+long. If anyone is interested in more actively maintaining OneWire,
+please contact Paul.
+
+Version 2.2:
+ Teensy 3.0 compatibility, Paul Stoffregen, paul@pjrc.com
+ Arduino Due compatibility, http://arduino.cc/forum/index.php?topic=141030
+ Fix DS18B20 example negative temperature
+ Fix DS18B20 example's low res modes, Ken Butcher
+ Improve reset timing, Mark Tillotson
+ Add const qualifiers, Bertrik Sikken
+ Add initial value input to crc16, Bertrik Sikken
+ Add target_search() function, Scott Roberts
+
+Version 2.1:
+ Arduino 1.0 compatibility, Paul Stoffregen
+ Improve temperature example, Paul Stoffregen
+ DS250x_PROM example, Guillermo Lovato
+ PIC32 (chipKit) compatibility, Jason Dangel, dangel.jason AT gmail.com
+ Improvements from Glenn Trewitt:
+ - crc16() now works
+ - check_crc16() does all of calculation/checking work.
+ - Added read_bytes() and write_bytes(), to reduce tedious loops.
+ - Added ds2408 example.
+ Delete very old, out-of-date readme file (info is here)
+
+Version 2.0: Modifications by Paul Stoffregen, January 2010:
+http://www.pjrc.com/teensy/td_libs_OneWire.html
+ Search fix from Robin James
+ http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238032295/27#27
+ Use direct optimized I/O in all cases
+ Disable interrupts during timing critical sections
+ (this solves many random communication errors)
+ Disable interrupts during read-modify-write I/O
+ Reduce RAM consumption by eliminating unnecessary
+ variables and trimming many to 8 bits
+ Optimize both crc8 - table version moved to flash
+
+Modified to work with larger numbers of devices - avoids loop.
+Tested in Arduino 11 alpha with 12 sensors.
+26 Sept 2008 -- Robin James
+http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1238032295/27#27
+
+Updated to work with arduino-0008 and to include skip() as of
+2007/07/06. --RJL20
+
+Modified to calculate the 8-bit CRC directly, avoiding the need for
+the 256-byte lookup table to be loaded in RAM. Tested in arduino-0010
+-- Tom Pollard, Jan 23, 2008
+
+Jim Studt's original library was modified by Josh Larios.
+
+Tom Pollard, pollard@alum.mit.edu, contributed around May 20, 2008
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Much of the code was inspired by Derek Yerger's code, though I don't
+think much of that remains. In any event that was..
+ (copyleft) 2006 by Derek Yerger - Free to distribute freely.
+
+The CRC code was excerpted and inspired by the Dallas Semiconductor
+sample code bearing this copyright.
+//---------------------------------------------------------------------------
+// Copyright (C) 2000 Dallas Semiconductor Corporation, All Rights Reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
+// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+//
+// Except as contained in this notice, the name of Dallas Semiconductor
+// shall not be used except as stated in the Dallas Semiconductor
+// Branding Policy.
+//--------------------------------------------------------------------------
+*/
+
+#include "DS2480B.h"
+
+
+DS2480B::DS2480B(TasmotaSerial *port)
+{
+ _port = port;
+#if ONEWIRE_SEARCH
+ reset_search();
+#endif
+}
+
+void DS2480B::begin()
+{
+ _port->write(0xC1);
+ if (!waitForReply()) return;
+ _port->read();
+ isCmdMode = true;
+}
+
+
+// Perform the onewire reset function. We will wait up to 250uS for
+// the bus to come high, if it doesn't then it is broken or shorted
+// and we return a 0;
+//
+// Returns 1 if a device asserted a presence pulse, 0 otherwise.
+//
+uint8_t DS2480B::reset(void)
+{
+ uint8_t r;
+
+ commandMode();
+
+ _port->write(0xC1);
+ //proper return is 0xCD otherwise something was wrong
+ //while (!_port->available());
+ if (!waitForReply()) return true;
+
+ r = _port->read();
+ if (r == 0xCD) return 1;
+ return 0;
+}
+
+void DS2480B::dataMode()
+{
+ if (isCmdMode)
+ {
+ _port->write(DATA_MODE);
+ isCmdMode = false;
+ }
+}
+
+void DS2480B::commandMode()
+{
+ if (!isCmdMode)
+ {
+ _port->write(COMMAND_MODE);
+ isCmdMode = true;
+ }
+}
+
+
+void DS2480B::beginTransaction()
+{
+ dataMode();
+}
+
+void DS2480B::endTransaction()
+{
+ commandMode();
+}
+
+#define DS2480_DELAY 50
+
+bool DS2480B::waitForReply() {
+ for (uint16_t i = 0; i < DS2480_DELAY; i++) {
+ if (_port->available()) return true;
+ delay(1);
+ }
+ return false;
+}
+
+
+//
+// Write a bit - actually returns the bit read back in case you care.
+//
+uint8_t DS2480B::write_bit(uint8_t v)
+{
+ uint8_t val;
+ commandMode();
+ if (v == 1) _port->write(0x91); //write a single "on" bit to onewire
+ else _port->write(0x81); //write a single "off" bit to onewire
+ if (!waitForReply()) return 0;
+ val = _port->read();
+ return val & 1;
+}
+
+//
+// Read a bit - short hand for writing a 1 and seeing what we get back.
+//
+uint8_t DS2480B::read_bit(void)
+{
+ uint8_t r = write_bit(1);
+ return r;
+}
+
+//
+// Write a byte. The writing code uses the active drivers to raise the
+// pin high, if you need power after the write (e.g. DS18S20 in
+// parasite power mode) then set 'power' to 1, otherwise the pin will
+// go tri-state at the end of the write to avoid heating in a short or
+// other mishap. - Currently power isn't actually used now.
+//
+void DS2480B::write(uint8_t v, uint8_t power /* = 0 */) {
+ uint8_t r;
+
+ dataMode();
+
+ _port->write(v);
+ //need to double up transmission if the sent byte was one of the command bytes
+ if (v == DATA_MODE || v == COMMAND_MODE || v == PULSE_TERM) _port->write(v);
+ if (!waitForReply()) return;
+ r = _port->read(); //throw away reply
+}
+
+void DS2480B::writeCmd(uint8_t v, uint8_t power)
+{
+ uint8_t r;
+
+ commandMode();
+
+ _port->write(v);
+
+ if (!waitForReply()) return;
+ r = _port->read(); //throw away reply
+}
+
+void DS2480B::write_bytes(const uint8_t *buf, uint16_t count, bool power /* = 0 */) {
+ for (uint16_t i = 0 ; i < count ; i++) write(buf[i]);
+}
+
+//
+// Read a byte
+//
+uint8_t DS2480B::read() {
+ uint8_t r;
+
+ dataMode();
+
+ _port->write(0xFF);
+ if (!waitForReply()) return 0;
+ r = _port->read();
+ return r;
+}
+
+void DS2480B::read_bytes(uint8_t *buf, uint16_t count) {
+ for (uint16_t i = 0 ; i < count ; i++)
+ buf[i] = read();
+}
+
+//
+// Do a ROM select
+//
+void DS2480B::select(const uint8_t rom[8])
+{
+ uint8_t i;
+
+ dataMode();
+ write(0x55); // Choose ROM
+
+ for (i = 0; i < 8; i++) write(rom[i]);
+}
+
+//
+// Do a ROM skip
+//
+void DS2480B::skip()
+{
+ dataMode();
+ write(0xCC); // Skip ROM
+}
+
+void DS2480B::depower()
+{
+
+}
+
+#if ONEWIRE_SEARCH
+
+//
+// You need to use this function to start a search again from the beginning.
+// You do not need to do it for the first search, though you could.
+//
+void DS2480B::reset_search()
+{
+ // reset the search state
+ LastDiscrepancy = 0;
+ LastDeviceFlag = FALSE;
+ LastFamilyDiscrepancy = 0;
+ for(int i = 7; ; i--) {
+ ROM_NO[i] = 0;
+ if ( i == 0) break;
+ }
+}
+
+// Setup the search to find the device type 'family_code' on the next call
+// to search(*newAddr) if it is present.
+//
+void DS2480B::target_search(uint8_t family_code)
+{
+ // set the search state to find SearchFamily type devices
+ ROM_NO[0] = family_code;
+ for (uint8_t i = 1; i < 8; i++)
+ ROM_NO[i] = 0;
+ LastDiscrepancy = 64;
+ LastFamilyDiscrepancy = 0;
+ LastDeviceFlag = FALSE;
+}
+
+//
+// Perform a search. If this function returns a '1' then it has
+// enumerated the next device and you may retrieve the ROM from the
+// DS2480B::address variable. If there are no devices, no further
+// devices, or something horrible happens in the middle of the
+// enumeration then a 0 is returned. If a new device is found then
+// its address is copied to newAddr. Use DS2480B::reset_search() to
+// start over.
+//
+// --- Replaced by the one from the Dallas Semiconductor web site ---
+//--------------------------------------------------------------------------
+// Perform the 1-Wire Search Algorithm on the 1-Wire bus using the existing
+// search state.
+// Return TRUE : device found, ROM number in ROM_NO buffer
+// FALSE : device not found, end of search
+//
+uint8_t DS2480B::search(uint8_t *newAddr)
+{
+ uint8_t id_bit_number;
+ uint8_t last_zero, rom_byte_number, search_result;
+ uint8_t id_bit, cmp_id_bit;
+
+ unsigned char rom_byte_mask, search_direction;
+
+ // initialize for search
+ id_bit_number = 1;
+ last_zero = 0;
+ rom_byte_number = 0;
+ rom_byte_mask = 1;
+ search_result = 0;
+
+ // if the last call was not the last one
+ if (!LastDeviceFlag)
+ {
+ // 1-Wire reset
+ if (!reset())
+ {
+ // reset the search
+ LastDiscrepancy = 0;
+ LastDeviceFlag = FALSE;
+ LastFamilyDiscrepancy = 0;
+ return FALSE;
+ }
+
+ // issue the search command
+ write(0xF0); //send search command to DS18B20 units
+
+ // loop to do the search
+ do
+ {
+ // read a bit and its complement
+ id_bit = read_bit();
+ cmp_id_bit = read_bit();
+
+ // check for no devices on 1-wire
+ if ((id_bit == 1) && (cmp_id_bit == 1))
+ break;
+ else
+ {
+ // all devices coupled have 0 or 1
+ if (id_bit != cmp_id_bit)
+ search_direction = id_bit; // bit write value for search
+ else
+ {
+ // if this discrepancy if before the Last Discrepancy
+ // on a previous next then pick the same as last time
+ if (id_bit_number < LastDiscrepancy)
+ search_direction = ((ROM_NO[rom_byte_number] & rom_byte_mask) > 0);
+ else
+ // if equal to last pick 1, if not then pick 0
+ search_direction = (id_bit_number == LastDiscrepancy);
+
+ // if 0 was picked then record its position in LastZero
+ if (search_direction == 0)
+ {
+ last_zero = id_bit_number;
+
+ // check for Last discrepancy in family
+ if (last_zero < 9)
+ LastFamilyDiscrepancy = last_zero;
+ }
+ }
+
+ // set or clear the bit in the ROM byte rom_byte_number
+ // with mask rom_byte_mask
+ if (search_direction == 1)
+ ROM_NO[rom_byte_number] |= rom_byte_mask;
+ else
+ ROM_NO[rom_byte_number] &= ~rom_byte_mask;
+
+ // serial number search direction write bit
+ write_bit(search_direction);
+
+ // increment the byte counter id_bit_number
+ // and shift the mask rom_byte_mask
+ id_bit_number++;
+ rom_byte_mask <<= 1;
+
+ // if the mask is 0 then go to new SerialNum byte rom_byte_number and reset mask
+ if (rom_byte_mask == 0)
+ {
+ rom_byte_number++;
+ rom_byte_mask = 1;
+ }
+ }
+ }
+ while(rom_byte_number < 8); // loop until through all ROM bytes 0-7
+
+ // if the search was successful then
+ if (!(id_bit_number < 65))
+ {
+ // search successful so set LastDiscrepancy,LastDeviceFlag,search_result
+ LastDiscrepancy = last_zero;
+
+ // check for last device
+ if (LastDiscrepancy == 0)
+ LastDeviceFlag = TRUE;
+
+ search_result = TRUE;
+ }
+ }
+
+ // if no device found then reset counters so next 'search' will be like a first
+ if (!search_result || !ROM_NO[0])
+ {
+ LastDiscrepancy = 0;
+ LastDeviceFlag = FALSE;
+ LastFamilyDiscrepancy = 0;
+ search_result = FALSE;
+ }
+ for (int i = 0; i < 8; i++) newAddr[i] = ROM_NO[i];
+ return search_result;
+ }
+
+#endif
+
+#if ONEWIRE_CRC
+// The 1-Wire CRC scheme is described in Maxim Application Note 27:
+// "Understanding and Using Cyclic Redundancy Checks with Maxim iButton Products"
+//
+
+#if ONEWIRE_CRC8_TABLE
+// This table comes from Dallas sample code where it is freely reusable,
+// though Copyright (C) 2000 Dallas Semiconductor Corporation
+static const uint8_t PROGMEM dscrc_table[] = {
+ 0, 94,188,226, 97, 63,221,131,194,156,126, 32,163,253, 31, 65,
+ 157,195, 33,127,252,162, 64, 30, 95, 1,227,189, 62, 96,130,220,
+ 35,125,159,193, 66, 28,254,160,225,191, 93, 3,128,222, 60, 98,
+ 190,224, 2, 92,223,129, 99, 61,124, 34,192,158, 29, 67,161,255,
+ 70, 24,250,164, 39,121,155,197,132,218, 56,102,229,187, 89, 7,
+ 219,133,103, 57,186,228, 6, 88, 25, 71,165,251,120, 38,196,154,
+ 101, 59,217,135, 4, 90,184,230,167,249, 27, 69,198,152,122, 36,
+ 248,166, 68, 26,153,199, 37,123, 58,100,134,216, 91, 5,231,185,
+ 140,210, 48,110,237,179, 81, 15, 78, 16,242,172, 47,113,147,205,
+ 17, 79,173,243,112, 46,204,146,211,141,111, 49,178,236, 14, 80,
+ 175,241, 19, 77,206,144,114, 44,109, 51,209,143, 12, 82,176,238,
+ 50,108,142,208, 83, 13,239,177,240,174, 76, 18,145,207, 45,115,
+ 202,148,118, 40,171,245, 23, 73, 8, 86,180,234,105, 55,213,139,
+ 87, 9,235,181, 54,104,138,212,149,203, 41,119,244,170, 72, 22,
+ 233,183, 85, 11,136,214, 52,106, 43,117,151,201, 74, 20,246,168,
+ 116, 42,200,150, 21, 75,169,247,182,232, 10, 84,215,137,107, 53};
+
+//
+// Compute a Dallas Semiconductor 8 bit CRC. These show up in the ROM
+// and the registers. (note: this might better be done without to
+// table, it would probably be smaller and certainly fast enough
+// compared to all those delayMicrosecond() calls. But I got
+// confused, so I use this table from the examples.)
+//
+uint8_t DS2480B::crc8(const uint8_t *addr, uint8_t len)
+{
+ uint8_t crc = 0;
+
+ while (len--) {
+ crc = pgm_read_byte(dscrc_table + (crc ^ *addr++));
+ }
+ return crc;
+}
+#else
+//
+// Compute a Dallas Semiconductor 8 bit CRC directly.
+// this is much slower, but much smaller, than the lookup table.
+//
+uint8_t DS2480B::crc8(const uint8_t *addr, uint8_t len)
+{
+ uint8_t crc = 0;
+
+ while (len--) {
+ uint8_t inbyte = *addr++;
+ for (uint8_t i = 8; i; i--) {
+ uint8_t mix = (crc ^ inbyte) & 0x01;
+ crc >>= 1;
+ if (mix) crc ^= 0x8C;
+ inbyte >>= 1;
+ }
+ }
+ return crc;
+}
+#endif
+
+#if ONEWIRE_CRC16
+bool DS2480B::check_crc16(const uint8_t* input, uint16_t len, const uint8_t* inverted_crc, uint16_t crc)
+{
+ crc = ~crc16(input, len, crc);
+ return (crc & 0xFF) == inverted_crc[0] && (crc >> 8) == inverted_crc[1];
+}
+
+uint16_t DS2480B::crc16(const uint8_t* input, uint16_t len, uint16_t crc)
+{
+ static const uint8_t oddparity[16] =
+ { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 };
+
+ for (uint16_t i = 0 ; i < len ; i++) {
+ // Even though we're just copying a byte from the input,
+ // we'll be doing 16-bit computation with it.
+ uint16_t cdata = input[i];
+ cdata = (cdata ^ crc) & 0xff;
+ crc >>= 8;
+
+ if (oddparity[cdata & 0x0F] ^ oddparity[cdata >> 4])
+ crc ^= 0xC001;
+
+ cdata <<= 6;
+ crc ^= cdata;
+ cdata <<= 1;
+ crc ^= cdata;
+ }
+ return crc;
+}
+#endif
+
+#endif
diff --git a/lib/lib_div/DS2480B/DS2480B.h b/lib/lib_div/DS2480B/DS2480B.h
new file mode 100644
index 000000000..1f0520607
--- /dev/null
+++ b/lib/lib_div/DS2480B/DS2480B.h
@@ -0,0 +1,200 @@
+#ifndef DS2480B_h
+#define DS2480B_h
+
+#include
+
+#if ARDUINO >= 100
+#include "Arduino.h" // for delayMicroseconds, digitalPinToBitMask, etc
+#else
+#include "WProgram.h" // for delayMicroseconds
+#include "pins_arduino.h" // for digitalPinToBitMask, etc
+#endif
+
+#include
+
+// You can exclude certain features from OneWire. In theory, this
+// might save some space. In practice, the compiler automatically
+// removes unused code (technically, the linker, using -fdata-sections
+// and -ffunction-sections when compiling, and Wl,--gc-sections
+// when linking), so most of these will not result in any code size
+// reduction. Well, unless you try to use the missing features
+// and redesign your program to not need them! ONEWIRE_CRC8_TABLE
+// is the exception, because it selects a fast but large algorithm
+// or a small but slow algorithm.
+
+// you can exclude onewire_search by defining that to 0
+#ifndef ONEWIRE_SEARCH
+#define ONEWIRE_SEARCH 1
+#endif
+
+// You can exclude CRC checks altogether by defining this to 0
+#ifndef ONEWIRE_CRC
+#define ONEWIRE_CRC 1
+#endif
+
+// Select the table-lookup method of computing the 8-bit CRC
+// by setting this to 1. The lookup table enlarges code size by
+// about 250 bytes. It does NOT consume RAM (but did in very
+// old versions of OneWire). If you disable this, a slower
+// but very compact algorithm is used.
+#ifndef ONEWIRE_CRC8_TABLE
+#define ONEWIRE_CRC8_TABLE 1
+#endif
+
+// You can allow 16-bit CRC checks by defining this to 1
+// (Note that ONEWIRE_CRC must also be 1.)
+#ifndef ONEWIRE_CRC16
+#define ONEWIRE_CRC16 1
+#endif
+
+#define FALSE 0
+#define TRUE 1
+
+// Platform specific I/O definitions
+
+#if defined(__AVR__)
+#elif defined(__MK20DX128__)
+#elif defined(__SAM3X8E__)
+#ifndef PROGMEM
+#define PROGMEM
+#endif
+#ifndef pgm_read_byte
+#define pgm_read_byte(addr) (*(const uint8_t *)(addr))
+#endif
+#elif defined(__PIC32MX__)
+#else
+#endif
+
+#define DATA_MODE 0xE1
+#define COMMAND_MODE 0xE3
+#define PULSE_TERM 0xF1
+
+class DS2480B
+{
+ private:
+ TasmotaSerial *_port;
+ bool isCmdMode;
+
+#if ONEWIRE_SEARCH
+ // global search state
+ unsigned char ROM_NO[8];
+ uint8_t LastDiscrepancy;
+ uint8_t LastFamilyDiscrepancy;
+ uint8_t LastDeviceFlag;
+#endif
+
+ bool waitForReply();
+
+ public:
+ DS2480B(TasmotaSerial *port);
+
+ void begin();
+
+ // Perform a 1-Wire reset cycle. Returns 1 if a device responds
+ // with a presence pulse. Returns 0 if there is no device or the
+ // bus is shorted or otherwise held low for more than 250uS
+ uint8_t reset(void);
+
+ void beginTransaction();
+ void endTransaction();
+
+ void commandMode();
+ void dataMode();
+
+ // Issue a 1-Wire rom select command, you do the reset first.
+ void select(const uint8_t rom[8]);
+
+ // Issue a 1-Wire rom skip command, to address all on bus.
+ void skip(void);
+
+ // Write a byte. If 'power' is one then the wire is held high at
+ // the end for parasitically powered devices. You are responsible
+ // for eventually depowering it by calling depower() or doing
+ // another read or write.
+ void write(uint8_t v, uint8_t power = 0);
+
+ void writeCmd(uint8_t v, uint8_t power = 0);
+
+ void write_bytes(const uint8_t *buf, uint16_t count, bool power = 0);
+
+ // Read a byte.
+ uint8_t read(void);
+
+ void read_bytes(uint8_t *buf, uint16_t count);
+
+ // Write a bit.
+ uint8_t write_bit(uint8_t v);
+
+ // Read a bit.
+ uint8_t read_bit(void);
+
+ // Stop forcing power onto the bus. You only need to do this if
+ // you used the 'power' flag to write() or used a write_bit() call
+ // and aren't about to do another read or write. You would rather
+ // not leave this powered if you don't have to, just in case
+ // someone shorts your bus.
+ void depower(void);
+
+#if ONEWIRE_SEARCH
+ // Clear the search state so that if will start from the beginning again.
+ void reset_search();
+
+ // Setup the search to find the device type 'family_code' on the next call
+ // to search(*newAddr) if it is present.
+ void target_search(uint8_t family_code);
+
+ // Look for the next device. Returns 1 if a new address has been
+ // returned. A zero might mean that the bus is shorted, there are
+ // no devices, or you have already retrieved all of them. It
+ // might be a good idea to check the CRC to make sure you didn't
+ // get garbage. The order is deterministic. You will always get
+ // the same devices in the same order.
+ uint8_t search(uint8_t *newAddr);
+#endif
+
+#if ONEWIRE_CRC
+ // Compute a Dallas Semiconductor 8 bit CRC, these are used in the
+ // ROM and scratchpad registers.
+ static uint8_t crc8(const uint8_t *addr, uint8_t len);
+
+#if ONEWIRE_CRC16
+ // Compute the 1-Wire CRC16 and compare it against the received CRC.
+ // Example usage (reading a DS2408):
+ // // Put everything in a buffer so we can compute the CRC easily.
+ // uint8_t buf[13];
+ // buf[0] = 0xF0; // Read PIO Registers
+ // buf[1] = 0x88; // LSB address
+ // buf[2] = 0x00; // MSB address
+ // WriteBytes(net, buf, 3); // Write 3 cmd bytes
+ // ReadBytes(net, buf+3, 10); // Read 6 data bytes, 2 0xFF, 2 CRC16
+ // if (!CheckCRC16(buf, 11, &buf[11])) {
+ // // Handle error.
+ // }
+ //
+ // @param input - Array of bytes to checksum.
+ // @param len - How many bytes to use.
+ // @param inverted_crc - The two CRC16 bytes in the received data.
+ // This should just point into the received data,
+ // *not* at a 16-bit integer.
+ // @param crc - The crc starting value (optional)
+ // @return True, iff the CRC matches.
+ static bool check_crc16(const uint8_t* input, uint16_t len, const uint8_t* inverted_crc, uint16_t crc = 0);
+
+ // Compute a Dallas Semiconductor 16 bit CRC. This is required to check
+ // the integrity of data received from many 1-Wire devices. Note that the
+ // CRC computed here is *not* what you'll get from the 1-Wire network,
+ // for two reasons:
+ // 1) The CRC is transmitted bitwise inverted.
+ // 2) Depending on the endian-ness of your processor, the binary
+ // representation of the two-byte return value may have a different
+ // byte order than the two bytes you get from 1-Wire.
+ // @param input - Array of bytes to checksum.
+ // @param len - How many bytes to use.
+ // @param crc - The crc starting value (optional)
+ // @return The CRC16, as defined by Dallas Semiconductor.
+ static uint16_t crc16(const uint8_t* input, uint16_t len, uint16_t crc = 0);
+#endif
+#endif
+};
+
+#endif
diff --git a/lib/lib_div/DS2480B/README.md b/lib/lib_div/DS2480B/README.md
new file mode 100644
index 000000000..0684ab42f
--- /dev/null
+++ b/lib/lib_div/DS2480B/README.md
@@ -0,0 +1,6 @@
+DS2480B Library for Arduino
+=======================
+
+Interfaces with DS2480B chip in order
+to acquire access to the 1-wire bus over
+serial
\ No newline at end of file
diff --git a/lib/lib_div/DS2480B/examples/DS18x20_Temperature/DS18x20_Temperature.ino b/lib/lib_div/DS2480B/examples/DS18x20_Temperature/DS18x20_Temperature.ino
new file mode 100644
index 000000000..71014ee1e
--- /dev/null
+++ b/lib/lib_div/DS2480B/examples/DS18x20_Temperature/DS18x20_Temperature.ino
@@ -0,0 +1,123 @@
+#include
+
+// OneWire DS18S20, DS18B20, DS1822 Temperature Example
+//
+// http://www.pjrc.com/teensy/td_libs_OneWire.html
+//
+// The DallasTemperature library can do all this work for you!
+// http://milesburton.com/Dallas_Temperature_Control_Library
+
+
+#include
+
+AltSoftSerial altSerial; //RX 8 - TX 9
+
+DS2480B ds(altSerial);
+
+void setup(void) {
+ Serial.begin(9600);
+ altSerial.begin(9600);
+ ds.begin();
+}
+
+void loop(void) {
+ byte i;
+ byte present = 0;
+ byte type_s;
+ byte data[12];
+ byte addr[8];
+ float celsius, fahrenheit;
+
+ if ( !ds.search(addr)) {
+ Serial.println("No more addresses.");
+ Serial.println();
+ ds.reset_search();
+ delay(5000);
+ return;
+ }
+
+ Serial.print("ROM =");
+ for( i = 0; i < 8; i++) {
+ Serial.write(' ');
+ Serial.print(addr[i], HEX);
+ }
+
+ if (DS2480B::crc8(addr, 7) != addr[7]) {
+ Serial.println("CRC is not valid!");
+ return;
+ }
+ Serial.println();
+
+ // the first ROM byte indicates which chip
+ switch (addr[0]) {
+ case 0x10:
+ Serial.println(" Chip = DS18S20"); // or old DS1820
+ type_s = 1;
+ break;
+ case 0x28:
+ Serial.println(" Chip = DS18B20");
+ type_s = 0;
+ break;
+ case 0x22:
+ Serial.println(" Chip = DS1822");
+ type_s = 0;
+ break;
+ default:
+ Serial.println("Device is not a DS18x20 family device.");
+ return;
+ }
+
+ ds.reset();
+
+ delay(100);
+
+ ds.reset();
+ ds.select(addr);
+ ds.write(0x44); // start conversion
+
+ delay(1000); // maybe 750ms is enough, maybe not
+ // we might do a ds.depower() here, but the reset will take care of it.
+
+ present = ds.reset();
+ ds.select(addr);
+ ds.write(0xBE); // Read Scratchpad
+
+ Serial.print(" Data = ");
+ Serial.print(present, HEX);
+ Serial.print(" ");
+ for ( i = 0; i < 9; i++) { // we need 9 bytes
+ data[i] = ds.read();
+ Serial.print(data[i], HEX);
+ Serial.print(" ");
+ }
+ Serial.print(" CRC=");
+ Serial.print(DS2480B::crc8(data, 8), HEX);
+ Serial.println();
+
+ // Convert the data to actual temperature
+ // because the result is a 16 bit signed integer, it should
+ // be stored to an "int16_t" type, which is always 16 bits
+ // even when compiled on a 32 bit processor.
+ int16_t raw = (data[1] << 8) | data[0];
+ if (type_s) {
+ raw = raw << 3; // 9 bit resolution default
+ if (data[7] == 0x10) {
+ // "count remain" gives full 12 bit resolution
+ raw = (raw & 0xFFF0) + 12 - data[6];
+ }
+ } else {
+ byte cfg = (data[4] & 0x60);
+ // at lower res, the low bits are undefined, so let's zero them
+ if (cfg == 0x00) raw = raw & ~7; // 9 bit resolution, 93.75 ms
+ else if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms
+ else if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms
+ //// default is 12 bit resolution, 750 ms conversion time
+ }
+ celsius = (float)raw / 16.0;
+ fahrenheit = celsius * 1.8 + 32.0;
+ Serial.print(" Temperature = ");
+ Serial.print(celsius);
+ Serial.print(" Celsius, ");
+ Serial.print(fahrenheit);
+ Serial.println(" Fahrenheit");
+}
diff --git a/lib/lib_div/DS2480B/keywords.txt b/lib/lib_div/DS2480B/keywords.txt
new file mode 100644
index 000000000..67c3b7938
--- /dev/null
+++ b/lib/lib_div/DS2480B/keywords.txt
@@ -0,0 +1,64 @@
+#######################################
+# Syntax Coloring Map For DS2480B
+#######################################
+
+#######################################
+# Datatypes (KEYWORD1)
+#######################################
+
+RTC_clock KEYWORD1
+
+#######################################
+# Methods and Functions (KEYWORD2)
+#######################################
+
+init KEYWORD2
+set_time KEYWORD2
+set_date KEYWORD2
+set_seconds KEYWORD2
+set_minutes KEYWORD2
+set_hours KEYWORD2
+set_days KEYWORD2
+set_months KEYWORD2
+set_years KEYWORD2
+set_alarmtime KEYWORD2
+set_alarmdate KEYWORD2
+get_seconds KEYWORD2
+get_minutes KEYWORD2
+get_hours KEYWORD2
+get_days KEYWORD2
+get_day_of_week KEYWORD2
+get_months KEYWORD2
+get_years KEYWORD2
+attachalarm KEYWORD2
+disable_alarm KEYWORD2
+unixtime KEYWORD2
+get_time KEYWORD2
+get_date KEYWORD2
+summertime KEYWORD2
+switch_years KEYWORD2
+timing KEYWORD2
+date_already_set KEYWORD2
+
+#######################################
+# Instances (KEYWORD2)
+#######################################
+
+
+#######################################
+# Mean Instances (KEYWORD3)
+#######################################
+
+rtc_clock KEYWORD3
+
+#######################################
+# Constants (LITERAL1)
+#######################################
+
+RC LITERAL1
+XTAL LITERAL1
+
+__TIME__ LITERAL1
+__DATE__ LITERAL1
+
+Germany LITERAL1
\ No newline at end of file
diff --git a/lib/lib_div/DS2480B/library.properties b/lib/lib_div/DS2480B/library.properties
new file mode 100644
index 000000000..8773c7971
--- /dev/null
+++ b/lib/lib_div/DS2480B/library.properties
@@ -0,0 +1,9 @@
+name=DS2480 Library
+version=0.1.0
+author=Jim Studt
+maintainer=Jim Studt
+sentence=DS2480
+paragraph=DS2480
+category=Communication
+architectures=*
+includes=DS2408.h
diff --git a/tasmota/include/Powerwall.h b/tasmota/include/Powerwall.h
index 324bfa262..435ab27cd 100755
--- a/tasmota/include/Powerwall.h
+++ b/tasmota/include/Powerwall.h
@@ -24,6 +24,7 @@ class Powerwall {
String GetRequest(String url, String authCookie);
String GetRequest(String url);
String AuthCookie();
+ void resetAuthCookie();
};
@@ -37,6 +38,9 @@ Powerwall::Powerwall() {
String Powerwall::AuthCookie() {
return authCookie;
}
+void Powerwall::resetAuthCookie() {
+ authCookie = "";
+}
/**
* This function returns a string with the authToken based on the basic login endpoint of
@@ -165,6 +169,7 @@ String Powerwall::GetRequest(String url, String authCookie) {
// in case of error 401, get new cookie
if (result == 401) {
authCookie = "";
+ resetAuthCookie();
}
}
}
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
index 076989292..4b209123e 100755
--- a/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino
@@ -46,11 +46,10 @@ keywords if then else endif, or, and are better readable for beginners (others m
#ifndef TS_FLOAT
#define TS_FLOAT float
#endif
-
-
// float = 4, double = 8 bytes
-const uint8_t SCRIPT_VERS[2] = {5, 1};
+
+const uint8_t SCRIPT_VERS[2] = {5, 2};
#define SCRIPT_DEBUG 0
@@ -190,6 +189,8 @@ void Script_ticker4_end(void) {
}
#endif
+
+
// EEPROM MACROS
// i2c eeprom
#define EEP_WRITE(A,B,C) eeprom_writeBytes(A, B, (uint8_t*)C);
@@ -439,6 +440,22 @@ struct SCRIPT_SPI {
#define FLT_MAX 99999999
#endif
+#ifdef USE_SCRIPT_ONEWIRE
+#include
+#include
+
+#ifndef MAX_DS_SENSORS
+#define MAX_DS_SENSORS 20
+#endif
+
+typedef struct {
+ OneWire *ds;
+ DS2480B *dsh;
+ TasmotaSerial *ts;
+ uint8_t ds_address[MAX_DS_SENSORS][8];
+} ScriptOneWire;
+#endif // USE_SCRIPT_ONEWIRE
+
#define SFS_MAX 4
// global memory
struct SCRIPT_MEM {
@@ -499,6 +516,7 @@ struct SCRIPT_MEM {
char *web_pages[10];
uint32_t script_lastmillis;
bool event_handeled = false;
+ bool res_ivar = false;
#ifdef USE_BUTTON_EVENT
int8_t script_button[MAX_KEYS];
#endif //USE_BUTTON_EVENT
@@ -523,6 +541,15 @@ struct SCRIPT_MEM {
char *hstr;
#endif
+#ifdef USE_SCRIPT_I2C
+ uint8_t script_i2c_addr;
+ TwoWire *script_i2c_wire;
+#endif
+
+#ifdef USE_SCRIPT_ONEWIRE
+ ScriptOneWire ow;
+#endif
+
} glob_script_mem;
@@ -533,10 +560,10 @@ void flt2char(TS_FLOAT num, char *nbuff) {
dtostrfd(num, glob_script_mem.script_dprec, nbuff);
}
-void f2char(TS_FLOAT num, uint32_t dprec, uint32_t lzeros, char *nbuff, char dsep);
+void f2char(double num, uint32_t dprec, uint32_t lzeros, char *nbuff, char dsep);
// convert float to char with leading zeros
-void f2char(TS_FLOAT num, uint32_t dprec, uint32_t lzeros, char *nbuff, char dsep) {
+void f2char(double num, uint32_t dprec, uint32_t lzeros, char *nbuff, char dsep) {
dtostrfd(num, dprec, nbuff);
if (lzeros > 1) {
// check leading zeros
@@ -583,6 +610,8 @@ int32_t opt_fext(File *fp, char *ts_from, char *ts_to, uint32_t flg);
int32_t extract_from_file(File *fp, char *ts_from, char *ts_to, int8_t coffs, TS_FLOAT **a_ptr, uint16_t *a_len, uint8_t numa, int16_t accum);
#endif
char *eval_sub(char *lp, TS_FLOAT *fvar, char *rstr);
+uint32_t script_ow(uint8_t sel, uint32_t val);
+int32_t script_logfile_write(char *path, char *payload, uint32_t size);
void ScriptEverySecond(void) {
@@ -2296,6 +2325,33 @@ uint32_t match_vars(char *dvnam, TS_FLOAT **fp, char **sp, uint32_t *ind) {
#define SCRIPT_IS_STRING_MAXSIZE 256
#endif
+
+void script_sort_string_array(uint8_t num) {
+ uint16_t sasize = glob_script_mem.si_num[num];
+ char *sa = glob_script_mem.last_index_string[num];
+ if (!sa) {
+ return;
+ }
+ char temp[SCRIPT_MAXSSIZE];
+ bool swapped;
+ do {
+ swapped = false;
+ for (uint16_t i = 0; i < sasize - 1; ++i) {
+ char *s1 = sa + (i * glob_script_mem.max_ssize);
+ char *s2 = sa + ((i + 1) * glob_script_mem.max_ssize);
+ if (strcmp(s1, s2) > 0) {
+ // swap
+ strcpy(temp, s1);
+ strcpy(s1, s2);
+ strcpy(s2, temp);
+ swapped = true;
+ }
+ }
+ sasize -= 1;
+ } while (swapped);
+}
+
+
char *isargs(char *lp, uint32_t isind) {
TS_FLOAT fvar;
lp = GetNumericArgument(lp, OPER_EQU, &fvar, 0);
@@ -2331,11 +2387,11 @@ char *isargs(char *lp, uint32_t isind) {
glob_script_mem.si_num[isind] = MAX_SARRAY_NUM;
}
- glob_script_mem.last_index_string[isind] = (char*)calloc(glob_script_mem.max_ssize*glob_script_mem.si_num[isind], 1);
- for (uint32_t cnt = 0; cnt glob_script_mem.si_num[isind]) {
- index = glob_script_mem.si_num[isind];
+ if (index >= glob_script_mem.si_num[isind]) {
+ index = glob_script_mem.si_num[isind] - 1;
}
strlcpy(str,glob_script_mem.last_index_string[isind] + (index * glob_script_mem.max_ssize), glob_script_mem.max_ssize);
}
@@ -2449,6 +2505,7 @@ char *isvar(char *lp, uint8_t *vtype, struct T_INDEX *tind, TS_FLOAT *fp, char *
// isnumber
if (fp) {
if (*lp == '0' && *(lp + 1) == 'x') {
+
lp += 2;
*fp = strtoll(lp, &lp, 16);
} else {
@@ -2466,6 +2523,8 @@ char *isvar(char *lp, uint8_t *vtype, struct T_INDEX *tind, TS_FLOAT *fp, char *
return lp;
}
+
+
if (*lp == '"') {
lp++;
while (*lp != '"') {
@@ -2521,6 +2580,7 @@ char *isvar(char *lp, uint8_t *vtype, struct T_INDEX *tind, TS_FLOAT *fp, char *
olen = strlen(dvnam);
}
+
glob_script_mem.arres = 0;
for (count = 0; count < glob_script_mem.numvars; count++) {
char *cp = glob_script_mem.glob_vnp + glob_script_mem.vnp_offset[count];
@@ -2558,6 +2618,7 @@ char *isvar(char *lp, uint8_t *vtype, struct T_INDEX *tind, TS_FLOAT *fp, char *
}
}
+
#define USE_SCRIPT_JSON
//#define USE_SCRIPT_FULL_JSON_PARSER
@@ -2785,6 +2846,19 @@ chknext:
goto nfuncexit;
}
+ if (!strncmp_XP(lp, XPSTR("as("), 3)) {
+ uint16_t alen;
+ TS_FLOAT *fa;
+ lp = get_array_by_name(lp + 3, &fa, &alen, 0);
+ if (!fa) {
+ fvar = -1;
+ goto exit;
+ }
+ script_sort_array(fa, alen);
+ fvar = 0;
+ goto nfuncexit;
+ }
+
if (!strncmp_XP(lp, XPSTR("af("), 3)) {
// array to float
uint16_t alend;
@@ -3022,6 +3096,10 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
goto nfuncexit;
}
#endif
+ if (!strncmp_XP(vname, XPSTR("ctper"), 5)) {
+ fvar = TasmotaGlobal.tele_period;
+ goto exit;
+ }
break;
case 'd':
if (!strncmp_XP(vname, XPSTR("day"), 3)) {
@@ -3268,6 +3346,13 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
lp = GetNumericArgument(lp, OPER_EQU, &fvar, gv);
uint8_t find = fvar;
if (find >= SFS_MAX) find = SFS_MAX - 1;
+ while (*lp == ' ') lp++;
+ uint8_t options = 0;
+ if (*lp != ')') {
+ // options
+ lp = GetNumericArgument(lp, OPER_EQU, &fvar, gv);
+ options = fvar;
+ }
uint8_t index = 0;
char str[SCRIPT_MAXSSIZE];
char *cp = str;
@@ -3298,9 +3383,12 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
while (glob_script_mem.files[find].available()) {
uint8_t buf[1];
glob_script_mem.files[find].read(buf,1);
- if (buf[0] == '\t' || buf[0] == ',' || buf[0] == '\n' || buf[0] == '\r') {
+ if (!options && (buf[0] == '\t' || buf[0] == ',' || buf[0] == '\n' || buf[0] == '\r')) {
break;
} else {
+ if (options && (buf[0] == '\n' || buf[0] == '\r')) {
+ break;
+ }
*cp++ = buf[0];
index++;
if (index >= glob_script_mem.max_ssize - 1) break;
@@ -3679,6 +3767,13 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
goto nfuncexit;
}
#endif
+
+ if (!strncmp_XP(lp, XPSTR("f("), 2)) {
+ // convert to float var
+ lp = GetNumericArgument(lp + 2, OPER_EQU, &fvar, gv);
+ fvar = *(uint32_t*)&fvar;
+ goto nfuncexit;
+ }
break;
case 'g':
@@ -3732,7 +3827,7 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
}
} else {
// preserve mqtt_data
- char *mqd = (char*)malloc(ResponseSize()+2);
+ char *mqd = (char*)malloc(ResponseSize() + 2);
if (mqd) {
strlcpy(mqd, ResponseData(), ResponseSize());
wd = mqd;
@@ -4025,7 +4120,11 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
// arg2
TS_FLOAT fvar2;
lp = GetNumericArgument(lp, OPER_EQU, &fvar2, gv);
- fvar = script_i2c(9 + bytes, fvar, fvar2);
+ if (glob_script_mem.res_ivar) {
+ fvar = script_i2c(9 + bytes, fvar, *(uint32_t*)&fvar2);
+ } else {
+ fvar = script_i2c(9 + bytes, fvar, fvar2);
+ }
goto nfuncexit;
}
if (!strncmp_XP(lp, XPSTR("ir"), 2)) {
@@ -4038,7 +4137,12 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
lp++;
}
lp = GetNumericArgument(lp + 1, OPER_EQU, &fvar, gv);
- fvar = script_i2c(2, fvar, bytes);
+ if (glob_script_mem.res_ivar) {
+ uint32_t intres = script_i2c(2, fvar, bytes);
+ (*(uint32_t*)&fvar) = intres;
+ } else {
+ fvar = script_i2c(2, fvar, bytes);
+ }
goto nfuncexit;
}
#endif // USE_SCRIPT_I2C
@@ -4070,6 +4174,12 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
}
#endif // USE_I2S_AUDIO
#endif // ESP32
+ if (!strncmp_XP(lp, XPSTR("i("), 2)) {
+ // convert to integer var
+ lp = GetNumericArgument(lp + 2, OPER_EQU, &fvar, gv);
+ *(uint32_t*)&fvar = fvar;
+ goto nfuncexit;
+ }
break;
#ifdef ESP32
@@ -4144,6 +4254,21 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
goto nfuncexit;
}
#endif // USE_LVGL
+
+#ifdef USE_UFILESYS
+#ifdef USE_SCRIPT_FATFS_EXT
+ if (!strncmp_XP(lp, XPSTR("lfw("), 4)) {
+ char path[SCRIPT_MAXSSIZE];
+ lp = GetStringArgument(lp + 4, OPER_EQU, path, 0);
+ char payload[SCRIPT_MAXSSIZE];
+ lp = GetStringArgument(lp, OPER_EQU, payload, 0);
+ lp = GetNumericArgument(lp, OPER_EQU, &fvar, 0);
+ // write to logfile
+ fvar = script_logfile_write(path, payload, fvar);
+ goto nfuncexit;
+ }
+#endif // USE_SCRIPT_FATFS_EXT
+#endif
break;
case 'm':
if (!strncmp_XP(lp, XPSTR("med("), 4)) {
@@ -4293,6 +4418,21 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
}
break;
+#ifdef USE_SCRIPT_ONEWIRE
+ case 'o':
+ if (!strncmp_XP(vname, XPSTR("ow("), 3)) {
+ lp = GetNumericArgument(lp + 3, OPER_EQU, &fvar, 0);
+ uint8_t sel = fvar;
+ SCRIPT_SKIP_SPACES
+ if (*lp != ')') {
+ lp = GetNumericArgument(lp, OPER_EQU, &fvar, 0);
+ }
+ fvar = script_ow(sel, fvar);
+ goto nfuncexit;
+ }
+ break;
+#endif // USE_SCRIPT_ONEWIRE
+
case 'p':
if (!strncmp_XP(lp, XPSTR("pin["), 4)) {
// raw pin level
@@ -4610,9 +4750,15 @@ extern void W8960_SetGain(uint8_t sel, uint16_t value);
lp++;
}
}
+ bool isint = is_int_var(lp);
lp = GetNumericArgument(lp, OPER_EQU, &fvar, gv);
char str[SCRIPT_MAXSSIZE];
- f2char(fvar, dprec, lzero, str, dsep);
+ if (isint) {
+ double dvar = *(int32_t*)&fvar;
+ f2char(dvar, dprec, lzero, str, dsep);
+ } else {
+ f2char(fvar, dprec, lzero, str, dsep);
+ }
if (sp) strlcpy(sp, str, glob_script_mem.max_ssize);
lp++;
len = 0;
@@ -5174,6 +5320,14 @@ extern char *SML_GetSVal(uint32_t index);
#endif //USE_SCRIPT_SERIAL
+ if (!strncmp_XP(lp, XPSTR("sas("), 4)) {
+ lp = GetNumericArgument(lp + 4, OPER_EQU, &fvar, 0);
+ if (fvar < 1 || fvar > 3) {
+ fvar = 1;
+ }
+ script_sort_string_array(fvar - 1);
+ goto nfuncexit;
+ }
#ifdef USE_SCRIPT_SPI
if (!strncmp_XP(lp, XPSTR("spi("), 4)) {
@@ -5789,6 +5943,43 @@ char *getop(char *lp, uint8_t *operand) {
return lp;
}
+#ifdef USE_SCRIPT_FATFS_EXT
+#ifdef USE_UFILESYS
+int32_t script_logfile_write(char *path, char *payload, uint32_t size) {
+
+ File rfd = ufsp->open(path, FS_FILE_APPEND);
+ if (rfd == 0) {
+ return -1;
+ }
+
+ uint32_t fsize = rfd.size();
+ // append string
+ rfd.write((uint8_t*)payload, strlen(payload));
+ rfd.write((uint8_t*)"\n", 1);
+ if (fsize < size) {
+ rfd.close();
+ return fsize;
+ }
+ rfd.seek(0, SeekSet);
+ String line = rfd.readStringUntil('\n');
+ File wfd = ufsp->open("/ltmp", FS_FILE_WRITE);
+ if (!wfd) {
+ return -2;
+ }
+ while (rfd.available()) {
+ line = rfd.readStringUntil('\n');
+ wfd.write((uint8_t*)line.c_str(), line.length());
+ wfd.write((uint8_t*)"\n", 1);
+ }
+ rfd.close();
+ wfd.close();
+ ufsp->remove(path);
+ ufsp->rename("/ltmp", path);
+
+ return fsize;
+}
+#endif // USE_UFILESYS
+#endif // USE_SCRIPT_FATFS_EXT
#ifdef ESP8266
extern "C" {
@@ -6090,6 +6281,24 @@ extern "C" {
#endif // USE_HOMEKIT
+
+bool is_int_var(char *name) {
+uint8_t vtype;
+struct T_INDEX ind;
+
+ isvar(name, &vtype, &ind, 0, 0, 0);
+
+ if (vtype != VAR_NV) {
+ if (vtype == NUM_RES || (vtype & STYPE) == 0) {
+ // numeric result
+ if (ind.bits.integer) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
// replace vars in cmd %var%
void Replace_Cmd_Vars(char *srcbuf, uint32_t srcsize, char *dstbuf, uint32_t dstsize) {
char *cp;
@@ -6148,7 +6357,8 @@ void Replace_Cmd_Vars(char *srcbuf, uint32_t srcsize, char *dstbuf, uint32_t dst
if (vtype == NUM_RES || (vtype & STYPE) == 0) {
// numeric result
if (ind.bits.integer) {
- dtostrfd(*(int32_t*)&fvar, 0, string);
+ double dval = *(int32_t*)&fvar;
+ f2char(dval, dprec, lzero, string, dsep);
} else {
f2char(fvar, dprec, lzero, string, dsep);
}
@@ -7147,6 +7357,7 @@ getnext:
} else {
dfvar = &glob_script_mem.fvars[index];
sysv_type = 0;
+ glob_script_mem.res_ivar = ind.bits.integer;
}
numeric = 1;
SCRIPT_SKIP_SPACES
@@ -7483,6 +7694,201 @@ getnext:
return -1;
}
+#ifdef USE_SCRIPT_ONEWIRE
+
+uint32_t script_ow(uint8_t sel, uint32_t val) {
+uint32_t res = 0;
+uint8_t bits;
+bool invert = false;
+ScriptOneWire *ow = &glob_script_mem.ow;
+
+ if (sel >= 10 && sel <= 18) {
+ if (val < 1 || val > MAX_DS_SENSORS) {
+ val = 1;
+ }
+ return ow->ds_address[val - 1][sel - 10];
+ }
+
+ if (sel > 0 && (ow->ds == nullptr && ow->dsh == nullptr)) {
+ return 0xffff;
+ }
+
+ switch (sel) {
+ case 0:
+ if (val & 0x8000) {
+ if (val & 0x10000) {
+ // inverted serial
+ invert = true;
+ }
+ val &= 0x7fff;
+ ow->ts = new TasmotaSerial(val & 0xff, (val >> 8) & 0x7f, 1, 0, 64);
+ if (ow->ts) {
+
+ ow->ts->begin(9600);
+
+#ifdef ESP8266
+ if (ow->ts->hardwareSerial()) {
+ ClaimSerial();
+#ifdef ALLOW_OW_INVERT
+ if (invert == true) {
+ U0C0 = U0C0 | BIT(UCRXI) | BIT(UCTXI); // Inverse RX, TX
+ }
+#endif
+ }
+#endif // ESP8266
+
+#ifdef ESP32
+#ifdef ALLOW_OW_INVERT
+ if (invert == true) {
+ HardwareSerial *hws = ow->ts->getesp32hws();
+ hws->end();
+ hws->begin(9600, SERIAL_8N1, val & 0xff, (val >> 8) & 0x7f, true);
+ }
+#endif
+#endif // ESP32
+
+ ow->dsh = new DS2480B(ow->ts);
+ ow->dsh->begin();
+ }
+ ow->ds = nullptr;
+ } else {
+ ow->ds = new OneWire(val);
+ ow->dsh = nullptr;
+ }
+ break;
+ case 1:
+ if (ow->ds) {
+ ow->ds->reset();
+ } else {
+ ow->dsh->reset();
+ }
+ break;
+ case 2:
+ if (ow->ds) {
+ ow->ds->skip();
+ } else {
+ ow->dsh->skip();
+ }
+ break;
+ case 3:
+ if (ow->ds) {
+ ow->ds->write(val, 1);
+ } else {
+ ow->dsh->write(val, 1);
+ }
+ break;
+ case 4:
+ if (ow->ds) {
+ return ow->ds->read();
+ } else {
+ return ow->dsh->read();
+ }
+ break;
+ case 5:
+ if (ow->ds) {
+ ow->ds->reset_search();
+ } else {
+ ow->dsh->reset_search();
+ }
+ break;
+ case 6:
+ if (val < 1 || val > MAX_DS_SENSORS) {
+ val = 1;
+ }
+ if (ow->ds) {
+ return ow->ds->search(ow->ds_address[val - 1]);
+ } else {
+ return ow->dsh->search(ow->ds_address[val - 1]);
+ }
+ break;
+ case 7:
+ if (val < 1 || val > MAX_DS_SENSORS) {
+ val = 1;
+ }
+ if (ow->ds) {
+ ow->ds->select(ow->ds_address[val - 1]);
+ } else {
+ ow->dsh->select(ow->ds_address[val - 1]);
+ }
+ break;
+ case 8:
+ bits = val & 0xc0;
+ val &= 0x3f;
+ if (val < 1 || val > MAX_DS_SENSORS) {
+ val = 1;
+ }
+ if (ow->ds) {
+ ow->ds->reset();
+ ow->ds->select(ow->ds_address[val - 1]);
+ ow->ds->write(0xf5, 1);
+ ow->ds->write(0x0c, 1);
+ ow->ds->write(0xff, 1);
+ res = ow->ds->read();
+ ow->ds->write(bits, 1);
+ } else {
+ ow->dsh->reset();
+ ow->dsh->select(ow->ds_address[val - 1]);
+ ow->dsh->write(0xf5, 1);
+ ow->dsh->write(0x0c, 1);
+ ow->dsh->write(0xff, 1);
+ res = ow->dsh->read();
+ ow->dsh->write(bits, 1);
+ }
+ break;
+ case 9:
+ bits = val & 0x80;
+ val &= 0x3f;
+ if (val < 1 || val > MAX_DS_SENSORS) {
+ val = 1;
+ }
+
+ if (ow->ds) {
+ ow->ds->reset();
+ ow->ds->select(ow->ds_address[val - 1]);
+ if (!bits) {
+ ow->ds->write(0x44, 1);
+ } else {
+ ow->ds->write(0xbe, 1);
+ delay(10);
+ res = ow->ds->read();
+ res |= ow->ds->read() << 8;
+ ow->ds->reset();
+ }
+ } else {
+ ow->dsh->reset();
+ ow->dsh->select(ow->ds_address[val - 1]);
+ if (!bits) {
+ ow->dsh->write(0x44, 1);
+ } else {
+ ow->dsh->write(0xbe, 1);
+ delay(10);
+ res = ow->dsh->read();
+ res |= ow->dsh->read() << 8;
+ ow->dsh->reset();
+ }
+ }
+ break;
+ case 99:
+ if (ow->ds) {
+ ow->ds->reset();
+ delete ow->ds;
+ ow->ds = nullptr;
+ } else {
+ ow->dsh->reset();
+ delete ow->dsh;
+ ow->dsh = nullptr;
+ delete ow->ts;
+ }
+ break;
+ case 98:
+ ow->ts->write(val);
+ break;
+ }
+ return res;
+}
+#endif // USE_SCRIPT_ONEWIRE
+
+
#ifdef USE_SCRIPT_SPI
// transfer 1-3 bytes
@@ -7586,6 +7992,25 @@ bool Script_Close_Serial() {
}
#endif //USE_SCRIPT_SERIAL
+
+void script_sort_array(float *array, uint16_t size) {
+ bool swapped;
+ do {
+ swapped = false;
+ for (uint16_t i = 0; i < size - 1; ++i) {
+ if (array[i] > array[i + 1]) {
+ // swap
+ float tmp = array[i];
+ array[i] = array[i + 1];
+ array[i + 1] = tmp;
+ swapped = true;
+ }
+ }
+ size -= 1;
+ } while (swapped);
+}
+
+
bool Is_gpio_used(uint8_t gpiopin) {
if (gpiopin >= 0 && (gpiopin < nitems(TasmotaGlobal.gpio_pin)) && (TasmotaGlobal.gpio_pin[gpiopin] > 0)) {
return true;
@@ -9673,6 +10098,11 @@ void Script_Check_HTML_Setvars(void) {
*cp1 = '=';
cp1++;
+ if (is_int_var(vname)) {
+ memmove(cp1 + 1, cp1, strlen(cp1));
+ *cp1++ = '#';
+ }
+
struct T_INDEX ind;
uint8_t vtype;
isvar(vname, &vtype, &ind, 0, 0, 0);
@@ -10143,7 +10573,7 @@ const char *gc_str;
lp = GetStringArgument(lp, OPER_EQU, right, 0);
SCRIPT_SKIP_SPACES
- WSContentSend_P(SCRIPT_MSG_SLIDER, left,mid, right, (uint32_t)min, (uint32_t)max, (uint32_t)val, vname);
+ WSContentSend_P(SCRIPT_MSG_SLIDER, left, mid, right, (uint32_t)min, (uint32_t)max, (uint32_t)val, vname);
lp++;
} else if (!strncmp(lin, "ck(", 3)) {
@@ -10400,6 +10830,8 @@ const char *gc_str;
char vname[16];
ScriptGetVarname(vname, slp, sizeof(vname));
+ bool isint = is_int_var(vname);
+
char label[SCRIPT_MAXSSIZE];
lp = GetStringArgument(lp, OPER_EQU, label, 0);
SCRIPT_SKIP_SPACES
@@ -10417,10 +10849,17 @@ const char *gc_str;
}
char vstr[16],minstr[16],maxstr[16],stepstr[16];
- dtostrfd(val, dprec, vstr);
- dtostrfd(min, dprec, minstr);
- dtostrfd(max, dprec, maxstr);
- dtostrfd(step, dprec, stepstr);
+ if (isint) {
+ dtostrfd(*(int32_t*)&val, 0, vstr);
+ dtostrfd(*(int32_t*)&min, dprec, minstr);
+ dtostrfd(*(int32_t*)&max, dprec, maxstr);
+ dtostrfd(*(int32_t*)&step, dprec, stepstr);
+ } else {
+ dtostrfd(val, dprec, vstr);
+ dtostrfd(min, dprec, minstr);
+ dtostrfd(max, dprec, maxstr);
+ dtostrfd(step, dprec, stepstr);
+ }
WCS_DIV(specopt);
WSContentSend_P(SCRIPT_MSG_NUMINP, center, label, minstr, maxstr, stepstr, vstr, tsiz, vname);
WCS_DIV(specopt | WSO_STOP_DIV);
@@ -10867,8 +11306,11 @@ exgc:
WSContentSend_P(PSTR("%s"), lin);
}
#else
- if (!(specopt&WSO_FORCEMAIN)) {
- lin++;
+
+ if (mc != 'z') {
+ if (!(specopt&WSO_FORCEMAIN)) {
+ lin++;
+ }
}
WSContentSend_P(PSTR("%s"), lin);
} else {
@@ -11305,10 +11747,27 @@ int32_t call2pwl(const char *url) {
result.replace("instant", "i");
result.replace("apparent", "a");
result.replace("reactive", "r");
+
+// custom replace
+#ifdef TESLA_POWERWALL_CTS1
+ result.replace(TESLA_POWERWALL_CTS1, "PW_CTS1");
+#endif
+
+#ifdef TESLA_POWERWALL_CTS2
+ result.replace(TESLA_POWERWALL_CTS2, "PW_CTS2");
+#endif
+
if (result.length()>4095) {
AddLog(LOG_LEVEL_INFO, PSTR("PWL: result overflow: %d"), result.length());
}
+
+#ifdef MQTT_DATA_STRING
+ TasmotaGlobal.mqtt_data = result;
+#else
+ strncpy(TasmotaGlobal.mqtt_data, result.c_str(), MESSZ);
+#endif
+
// meter aggregates has also too many tokens
char *cp = (char*)result.c_str();
if (!strncmp_P(cp, PSTR("{\"site\""), 7)) {
@@ -11415,36 +11874,38 @@ void cpy2lf(char *dst, uint32_t dstlen, char *src) {
}
#ifdef USE_SCRIPT_I2C
-uint8_t script_i2c_addr;
-TwoWire *script_i2c_wire;
uint32_t script_i2c(uint8_t sel, uint16_t val, uint32_t val1) {
uint32_t rval = 0;
uint8_t bytes = 1;
+ if (sel > 0) {
+ if (!glob_script_mem.script_i2c_wire) return 0;
+ }
+
switch (sel) {
case 0:
- script_i2c_addr = val;
+ glob_script_mem.script_i2c_addr = val;
#ifdef ESP32
- if (val1 == 0) script_i2c_wire = &Wire;
- else script_i2c_wire = &Wire1;
+ if (val1 == 0) glob_script_mem.script_i2c_wire = &Wire;
+ else glob_script_mem.script_i2c_wire = &Wire1;
#else
- script_i2c_wire = &Wire;
+ glob_script_mem.script_i2c_wire = &Wire;
#endif
- script_i2c_wire->beginTransmission(script_i2c_addr);
- return (0 == script_i2c_wire->endTransmission());
+ glob_script_mem.script_i2c_wire->beginTransmission(glob_script_mem.script_i2c_addr);
+ return (0 == glob_script_mem.script_i2c_wire->endTransmission());
break;
case 2:
// read 1..4 bytes
if ((val & 0x8000) == 0) {
- script_i2c_wire->beginTransmission(script_i2c_addr);
- script_i2c_wire->write(val);
- script_i2c_wire->endTransmission();
+ glob_script_mem.script_i2c_wire->beginTransmission(glob_script_mem.script_i2c_addr);
+ glob_script_mem.script_i2c_wire->write(val);
+ glob_script_mem.script_i2c_wire->endTransmission();
}
- script_i2c_wire->requestFrom((int)script_i2c_addr, (int)val1);
+ glob_script_mem.script_i2c_wire->requestFrom((int)glob_script_mem.script_i2c_addr, (int)val1);
for (uint8_t cnt = 0; cnt < val1; cnt++) {
rval <<= 8;
- rval |= (uint8_t)script_i2c_wire->read();
+ rval |= (uint8_t)glob_script_mem.script_i2c_wire->read();
}
break;
@@ -11454,23 +11915,23 @@ uint32_t script_i2c(uint8_t sel, uint16_t val, uint32_t val1) {
case 13:
// write 1 .. 4 bytes
bytes = sel - 9;
- script_i2c_wire->beginTransmission(script_i2c_addr);
+ glob_script_mem.script_i2c_wire->beginTransmission(glob_script_mem.script_i2c_addr);
if ((val & 0x8000) == 0) {
- script_i2c_wire->write(val);
+ glob_script_mem.script_i2c_wire->write(val);
}
if ((val & 0x4000) == 0) {
for (uint8_t cnt = 0; cnt < bytes; cnt++) {
- script_i2c_wire->write(val1);
+ glob_script_mem.script_i2c_wire->write(val1);
val1 >>= 8;
}
} else {
uint32_t wval = 0;
for (uint8_t cnt = 0; cnt < bytes; cnt++) {
wval = val1 >> ((bytes - 1 - cnt) * 8);
- script_i2c_wire->write(wval);
+ glob_script_mem.script_i2c_wire->write(wval);
}
}
- script_i2c_wire->endTransmission();
+ glob_script_mem.script_i2c_wire->endTransmission();
break;
}
@@ -11918,6 +12379,9 @@ bool Xdrv10(uint32_t function)
case FUNC_INIT:
//bitWrite(Settings->rule_enabled, 0, 0); // >>>>>>>>>>>
+#ifndef NO_SCRIPT_STOP_ON_ERROR
+ bitWrite(Settings->rule_stop, 0, 1);
+#endif
// set defaults to rules memory
//bitWrite(Settings->rule_enabled,0,0);
@@ -12224,6 +12688,10 @@ bool Xdrv10(uint32_t function)
}
}
break;
+ case FUNC_BUTTON_MULTI_PRESSED:
+ if (bitRead(Settings->rule_enabled, 0)) {
+ Run_Scripter1(">b", 2, 0);
+ }
#endif //USE_BUTTON_EVENT
case FUNC_LOOP:
From 07a9f33ae7f4800575fd59942b26ea6ccfb200c3 Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Fri, 5 May 2023 09:18:23 +0200
Subject: [PATCH 064/289] Update CHANGELOG.md (#18581)
Added my latest changes
---
CHANGELOG.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b556e979c..a56ff7584 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,9 @@ All notable changes to this project will be documented in this file.
- Support for TC74 temperature sensor by Michael Loftis (#18042)
- Matter support for Shutters with Tilt
- Matter POC for remote Relay
+- Added support for Zero-Cross Dimmer on ESP32, changed calculation on EPS8266, high resolution control e.g. Solar: `ZCDimmerSet`
+- ESP32: Enhanced Shutterbuttons functionality to control tilt position, additionally incr/decr possible to position and tilt.
+- ESP32: `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
### Breaking Changed
@@ -25,6 +28,7 @@ All notable changes to this project will be documented in this file.
- ESP8266 Energy Export Active no update regression from v12.3.1.3
- NovaSDS GUI values (#18444)
- Berry fix rules for string comparisons (#18464)
+- Shutter: GarageMode does not stop on console commands, `ShutterSetOpen` and `ShutterSetClose` does not reset direction (#18539)
### Removed
From 069278f966ad89e30377a25b26938876bc973b9b Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Fri, 5 May 2023 15:13:22 +0200
Subject: [PATCH 065/289] Berry add `tcpclientasync` class for non-blocking TCP
client (#18584)
---
CHANGELOG.md | 1 +
lib/libesp32/berry/default/be_modtab.c | 2 +
lib/libesp32/berry_mapping/src/be_mapping.h | 1 +
.../berry_mapping/src/be_mapping_utils.c | 8 +
lib/libesp32/berry_matter/solidify_all.be | 2 +-
.../berry_tasmota/src/be_tcpclientasyc_lib.c | 46 ++
.../xdrv_52_3_berry_tcpclientasync.ino | 534 ++++++++++++++++++
7 files changed, 593 insertions(+), 1 deletion(-)
create mode 100644 lib/libesp32/berry_tasmota/src/be_tcpclientasyc_lib.c
create mode 100644 tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tcpclientasync.ino
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a56ff7584..d2c63a54b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
- Added support for Zero-Cross Dimmer on ESP32, changed calculation on EPS8266, high resolution control e.g. Solar: `ZCDimmerSet`
- ESP32: Enhanced Shutterbuttons functionality to control tilt position, additionally incr/decr possible to position and tilt.
- ESP32: `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
+- Berry add `tcpclientasync` class for non-blocking TCP client
### Breaking Changed
diff --git a/lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c
index 5051dd948..c4f548031 100644
--- a/lib/libesp32/berry/default/be_modtab.c
+++ b/lib/libesp32/berry/default/be_modtab.c
@@ -220,6 +220,7 @@ be_extern_native_class(md5);
be_extern_native_class(udp);
be_extern_native_class(webclient);
be_extern_native_class(tcpclient);
+be_extern_native_class(tcpclientasync);
be_extern_native_class(tcpserver);
be_extern_native_class(energy_struct);
// LVGL core classes
@@ -267,6 +268,7 @@ BERRY_LOCAL bclass_array be_class_table = {
&be_native_class(udp),
&be_native_class(webclient),
&be_native_class(tcpclient),
+ &be_native_class(tcpclientasync),
#endif // USE_WEBCLIENT
#ifdef USE_BERRY_TCPSERVER
&be_native_class(tcpserver),
diff --git a/lib/libesp32/berry_mapping/src/be_mapping.h b/lib/libesp32/berry_mapping/src/be_mapping.h
index 0b0ef2c1e..9876278f3 100644
--- a/lib/libesp32/berry_mapping/src/be_mapping.h
+++ b/lib/libesp32/berry_mapping/src/be_mapping.h
@@ -88,6 +88,7 @@ extern "C" {
void be_raisef(bvm *vm, const char *except, const char *msg, ...);
+extern void be_map_insert_nil(bvm *vm, const char *key);
extern void be_map_insert_int(bvm *vm, const char *key, bint value);
extern void be_map_insert_bool(bvm *vm, const char *key, bbool value);
extern void be_map_insert_real(bvm *vm, const char *key, breal value);
diff --git a/lib/libesp32/berry_mapping/src/be_mapping_utils.c b/lib/libesp32/berry_mapping/src/be_mapping_utils.c
index e3a2cc6e2..51f7388ba 100644
--- a/lib/libesp32/berry_mapping/src/be_mapping_utils.c
+++ b/lib/libesp32/berry_mapping/src/be_mapping_utils.c
@@ -5,6 +5,14 @@
/*********************************************************************************************\
* Helper functions to create a map with single line calls
\*********************************************************************************************/
+/* Insert an nil to a key */
+void be_map_insert_nil(bvm *vm, const char *key)
+{
+ be_pushstring(vm, key);
+ be_pushnil(vm);
+ be_data_insert(vm, -3);
+ be_pop(vm, 2);
+}
/* Insert an int to a key */
void be_map_insert_int(bvm *vm, const char *key, bint value)
{
diff --git a/lib/libesp32/berry_matter/solidify_all.be b/lib/libesp32/berry_matter/solidify_all.be
index 81f392870..2d9bf3f45 100755
--- a/lib/libesp32/berry_matter/solidify_all.be
+++ b/lib/libesp32/berry_matter/solidify_all.be
@@ -14,7 +14,7 @@ import sys
sys.path().push('src/embedded') # allow to import from src/embedded
# globals that need to exist to make compilation succeed
-var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,udp,"
+var globs = "path,ctypes_bytes_dyn,tasmota,ccronexpr,gpio,light,webclient,load,MD5,lv,light_state,udp,tcpclientasync,"
"lv_clock,lv_clock_icon,lv_signal_arcs,lv_signal_bars,lv_wifi_arcs_icon,lv_wifi_arcs,"
"lv_wifi_bars_icon,lv_wifi_bars,"
"_lvgl,"
diff --git a/lib/libesp32/berry_tasmota/src/be_tcpclientasyc_lib.c b/lib/libesp32/berry_tasmota/src/be_tcpclientasyc_lib.c
new file mode 100644
index 000000000..16d5f7240
--- /dev/null
+++ b/lib/libesp32/berry_tasmota/src/be_tcpclientasyc_lib.c
@@ -0,0 +1,46 @@
+/********************************************************************
+ * TCP client non-blocking (async)
+ *
+ *
+ *******************************************************************/
+#include "be_constobj.h"
+
+#ifdef USE_WEBCLIENT
+
+extern int wc_tcpasync_init(bvm *vm);
+extern int wc_tcpasync_deinit(bvm *vm);
+
+extern int wc_tcpasync_connect(bvm *vm);
+extern int wc_tcpasync_connected(bvm *vm);
+extern int wc_tcpasync_listening(bvm *vm);
+extern int wc_tcpasync_info(bvm *vm);
+extern int wc_tcpasync_close(bvm *vm);
+extern int wc_tcpasync_available(bvm *vm);
+
+extern int wc_tcpasync_write(bvm *vm);
+extern int wc_tcpasync_read(bvm *vm);
+extern int wc_tcpasync_readbytes(bvm *vm);
+
+#include "be_fixed_be_class_tcpclientasync.h"
+
+/* @const_object_info_begin
+
+class be_class_tcpclientasync (scope: global, name: tcpclientasync) {
+ .p, var
+ init, func(wc_tcpasync_init)
+ deinit, func(wc_tcpasync_deinit)
+
+ connect, func(wc_tcpasync_connect)
+ connected, func(wc_tcpasync_connected)
+ listening, func(wc_tcpasync_listening)
+ info, func(wc_tcpasync_info)
+ close, func(wc_tcpasync_close)
+ available, func(wc_tcpasync_available)
+
+ write, func(wc_tcpasync_write)
+ read, func(wc_tcpasync_read)
+ readbytes, func(wc_tcpasync_readbytes)
+}
+@const_object_info_end */
+
+#endif // USE_WEBCLIENT
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tcpclientasync.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tcpclientasync.ino
new file mode 100644
index 000000000..8c6fa9841
--- /dev/null
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tcpclientasync.ino
@@ -0,0 +1,534 @@
+/*
+ xdrv_52_3_berry_tcpclientasync.ino - Berry scripting language, TCP client non-blocking
+
+ Copyright (C) 2021 Stephan Hadinger, Berry language by Guan Wenliang https://github.com/Skiars/berry
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+// also includes tcp_client
+
+#ifdef USE_BERRY
+
+#ifdef USE_WEBCLIENT
+
+#include
+// #include "be_sys.h"
+#include
+#include
+
+#define T_IN6_IS_ADDR_V4MAPPED(a) \
+ ((((__const uint32_t *) (a))[0] == 0) \
+ && (((__const uint32_t *) (a))[1] == 0) \
+ && (((__const uint32_t *) (a))[2] == htonl (0xffff)))
+
+enum class AsyncTCPState {
+ INPROGRESS,
+ CONNECTED,
+ REFUSED,
+ CLOSED
+};
+
+class AsyncTCPClient {
+public:
+
+ AsyncTCPClient() : sockfd(-1), state(AsyncTCPState::INPROGRESS), _timeout_ms(1), local_port(-1) {
+
+ }
+
+ ~AsyncTCPClient() {
+ this->stop();
+ }
+
+ void stop() {
+ if (sockfd > 0) {
+ close(sockfd);
+ }
+ sockfd = -1;
+ state = AsyncTCPState::CLOSED;
+ }
+
+ int connect(IPAddress ip, uint16_t port) {
+ struct sockaddr_storage serveraddr = {};
+ sockfd = -1;
+
+ if (state != AsyncTCPState::INPROGRESS) {
+ stop();
+ state = AsyncTCPState::INPROGRESS; // reset state
+ }
+
+ if (ip.type() == IPv6) {
+ struct sockaddr_in6 *tmpaddr = (struct sockaddr_in6 *)&serveraddr;
+ sockfd = socket(AF_INET6, SOCK_STREAM, 0);
+ tmpaddr->sin6_family = AF_INET6;
+ memcpy(tmpaddr->sin6_addr.un.u8_addr, &ip[0], 16);
+ tmpaddr->sin6_port = htons(port);
+ } else {
+ struct sockaddr_in *tmpaddr = (struct sockaddr_in *)&serveraddr;
+ sockfd = socket(AF_INET, SOCK_STREAM, 0);
+ tmpaddr->sin_family = AF_INET;
+ tmpaddr->sin_addr.s_addr = ip;
+ tmpaddr->sin_port = htons(port);
+ }
+ if (sockfd < 0) {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: Error: socket: %d", errno);
+ return 0;
+ }
+ // berry_log_C("sockfd=%i", sockfd);
+ fcntl(sockfd, F_SETFL, fcntl(sockfd, F_GETFL, 0) | O_NONBLOCK ); // set non-blocking
+
+ fd_set fdset;
+ FD_ZERO(&fdset);
+ FD_SET(sockfd, &fdset);
+
+ int res = lwip_connect(sockfd, (struct sockaddr*)&serveraddr, sizeof(serveraddr));
+ if (res < 0 && errno != EINPROGRESS) {
+ AddLog(LOG_LEVEL_INFO, "BRY: Error: connect on fd %d, errno: %d, \"%s\"", sockfd, errno, strerror(errno));
+ close(sockfd);
+ return 0;
+ }
+ // berry_log_C("lwip_connect res=%i errno=%i (EINPROGRESS=%i)", res, errno, EINPROGRESS);
+ return 1;
+ }
+
+ void _update_connection_state(void) {
+ if (state != AsyncTCPState::INPROGRESS) {
+ return;
+ }
+
+ fd_set fdset;
+ FD_ZERO(&fdset);
+ FD_SET(sockfd, &fdset);
+
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+
+ int res = ::select(sockfd + 1, nullptr, &fdset, nullptr, &tv);
+ if (res < 0) {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: select on fd %d, errno: %d, \"%s\"", sockfd, errno, strerror(errno));
+ stop();
+ state = AsyncTCPState::REFUSED;
+ return;
+ } else if (res == 0) {
+ // AddLog(LOG_LEVEL_DEBUG, "BRY: select returned due to timeout %d ms for fd %d", _timeout_ms, sockfd);
+ // stop();
+ // state = AsyncTCPState::TIMEOUT;
+ return;
+ } else {
+ int sockerr;
+ socklen_t len = (socklen_t)sizeof(int);
+ res = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &sockerr, &len);
+
+ if (res < 0) {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: getsockopt on fd %d, errno: %d, \"%s\"", sockfd, errno, strerror(errno));
+ stop();
+ state = AsyncTCPState::REFUSED;
+ return;
+ }
+
+ if (sockerr != 0) {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: socket error on fd %d, errno: %d, \"%s\"", sockfd, sockerr, strerror(sockerr));
+ stop();
+ state = AsyncTCPState::REFUSED;
+ return;
+ }
+
+ state = AsyncTCPState::CONNECTED;
+ return;
+ }
+ }
+
+ void _update_connected(void) {
+ if (state == AsyncTCPState::INPROGRESS) {
+ this->_update_connection_state(); // force an update
+ }
+ if (state == AsyncTCPState::CONNECTED) {
+ uint8_t dummy;
+ int res = recv(sockfd, &dummy, 0, MSG_DONTWAIT);
+ // recv only sets errno if res is <= 0
+ if (res <= 0){
+ switch (errno) {
+ case EWOULDBLOCK:
+ case ENOENT: //caused by vfs
+ // connected, don't change status
+ break;
+ case ENOTCONN:
+ case EPIPE:
+ case ECONNRESET:
+ case ECONNREFUSED:
+ case ECONNABORTED:
+ stop();
+ break;
+ default:
+ // AddLog(LOG_LEVEL_DEBUG, "BRY: tcpclientasync unexpected: RES: %d, ERR: %d", res, errno);
+ stop();
+ break;
+ }
+ } else {
+ // connected do nothing
+ }
+ }
+ }
+
+ // connected()
+ // returns:
+ // 0: still in progres, unknown
+ // 1: connected
+ // -1: refused
+ int connected(void) {
+ _update_connected();
+ switch (state) {
+ case AsyncTCPState::CONNECTED: return 1; break;
+ case AsyncTCPState::INPROGRESS: return 0; break;
+ // all other values indicated that the connection is down
+ case AsyncTCPState::REFUSED:
+ case AsyncTCPState::CLOSED:
+ default:
+ return -1;
+ break;
+ }
+ }
+
+ size_t available(void) {
+ _update_connected();
+ if (state == AsyncTCPState::CONNECTED) {
+ size_t bytes_available = 0;
+ int res = ioctl(sockfd, FIONREAD, &bytes_available);
+ if (res >= 0) {
+ return bytes_available;
+ } else {
+ return 0;
+ }
+ } else {
+ return 0;
+ }
+ }
+
+ bool listening(void) {
+ _update_connected();
+ if (state == AsyncTCPState::CONNECTED) {
+ fd_set fdset;
+ FD_ZERO(&fdset);
+ FD_SET(sockfd, &fdset);
+
+ struct timeval tv;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+
+ int res = ::select(sockfd + 1, nullptr, &fdset, nullptr, &tv);
+ if (res < 0) {
+ stop();
+ return false;
+ } else if (res == 0) {
+ // connection is up but not ready to send
+ return false;
+ } else {
+ // we assume that since we got select answering it's good
+ return true;
+ }
+ }
+ return false;
+ }
+
+ size_t write(const char *buffer, size_t size) {
+ _update_connected();
+ if (state == AsyncTCPState::CONNECTED) {
+ // is the socket ready for writing
+ fd_set set;
+ struct timeval tv;
+ FD_ZERO(&set); // empties the set
+ FD_SET(sockfd, &set); // adds FD to the set
+ tv.tv_sec = 0;
+ tv.tv_usec = 0; // non-blocking
+
+ if (select(sockfd + 1, NULL, &set, NULL, &tv) < 0) {
+ return 0; // error TODO close connection?
+ }
+
+ if (FD_ISSET(sockfd, &set)) {
+ // ready for writes
+ int res = send(sockfd, (void*) buffer, size, MSG_DONTWAIT);
+ if (res >= 0) {
+ return res;
+ } else { // res < 0
+ if (errno != EAGAIN) {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: tcpclientasync send fail on fd %d, errno: %d, \"%s\"", sockfd, errno, strerror(errno));
+ stop();
+ return 0;
+ }
+ }
+ } else {
+ return 0; // not ready for writes
+ }
+
+ } else {
+ return 0;
+ }
+ return 0;
+ }
+
+ size_t read(uint8_t* buf, size_t size) {
+ _update_connected();
+ if (state == AsyncTCPState::CONNECTED) {
+ if (size > 1436) { size = 1436; } // let's keep it reasonable
+
+ int res = recv(sockfd, buf, size, MSG_DONTWAIT);
+ if (res < 0) { // check error
+ if (errno != EWOULDBLOCK) { // something went wrong
+ stop();
+ return 0;
+ }
+ }
+ return res;
+ }
+ return 0;
+ }
+
+ void update_local_addr_port(void) {
+ local_port = -1; // default to unknwon
+ if (sockfd > 0) {
+ struct sockaddr_storage local_address;
+ socklen_t addr_size = sizeof(local_address);
+ // getpeername(fd, (struct sockaddr*)&addr, &len);
+ int res = getsockname(sockfd, (struct sockaddr*)&local_address, &addr_size);
+ if (res != 0) { return; }
+
+ // IPv4 socket, old way
+ if (((struct sockaddr*)&local_address)->sa_family == AF_INET) {
+ struct sockaddr_in *s = (struct sockaddr_in *)&local_address;
+ local_port = ntohs(s->sin_port);
+ local_addr = IPAddress((uint32_t)(s->sin_addr.s_addr));
+ // return IPAddress((uint32_t)(s->sin_addr.s_addr));
+ }
+
+ // IPv6, but it might be IPv4 mapped address
+ if (((struct sockaddr*)&local_address)->sa_family == AF_INET6) {
+ struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)&local_address;
+ local_port = ntohs(saddr6->sin6_port);
+ if (T_IN6_IS_ADDR_V4MAPPED(saddr6->sin6_addr.un.u32_addr)) {
+ local_addr = IPAddress(IPv4, (uint8_t*)saddr6->sin6_addr.s6_addr+12);
+ // return IPAddress(IPv4, (uint8_t*)saddr6->sin6_addr.s6_addr+12);
+ } else {
+ local_addr = IPAddress(IPv6, (uint8_t*)(saddr6->sin6_addr.s6_addr));
+ // return IPAddress(IPv6, (uint8_t*)(saddr6->sin6_addr.s6_addr));
+ }
+ }
+ }
+ }
+
+public:
+ int sockfd;
+ AsyncTCPState state;
+ uint32_t _timeout_ms;
+ String remota_addr; // address in numerical format (after DNS resolution), either IPv4 or IPv6
+ uint16_t remote_port; // remote port number
+ IPAddress local_addr;
+ int32_t local_port; // -1 if unknown or invalid
+};
+
+/*********************************************************************************************\
+ * Native functions mapped to Berry functions
+ *
+ *
+\*********************************************************************************************/
+extern "C" {
+ // same but using `.p` argument
+ AsyncTCPClient * wc_gettcpclientasync_p(struct bvm *vm) {
+ be_getmember(vm, 1, ".p");
+ void *p = be_tocomptr(vm, -1);
+ be_pop(vm, 1);
+ return (AsyncTCPClient*) p;
+ }
+
+ int32_t wc_tcpasync_init(struct bvm *vm);
+ int32_t wc_tcpasync_init(struct bvm *vm) {
+ int32_t argc = be_top(vm);
+ AsyncTCPClient * wcl;
+ if (argc >= 2 && be_iscomptr(vm, 2)) {
+ wcl = (AsyncTCPClient*) be_tocomptr(vm, 2);
+ } else {
+ wcl = new AsyncTCPClient();
+ }
+ be_pushcomptr(vm, (void*) wcl);
+ be_setmember(vm, 1, ".p");
+ be_return_nil(vm);
+ }
+
+ int32_t wc_tcpasync_deinit(struct bvm *vm);
+ int32_t wc_tcpasync_deinit(struct bvm *vm) {
+ AsyncTCPClient * wcl = wc_gettcpclientasync_p(vm);
+ if (wcl != nullptr) { delete wcl; }
+ be_setmember(vm, 1, ".p");
+ be_return_nil(vm);
+ }
+
+ // tcp.connect(address:string, port:int) -> bool
+ int32_t wc_tcpasync_connect(struct bvm *vm);
+ int32_t wc_tcpasync_connect(struct bvm *vm) {
+ int32_t argc = be_top(vm);
+ if (argc >= 3 && be_isstring(vm, 2) && be_isint(vm, 3)) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ const char * address = be_tostring(vm, 2);
+ int32_t port = be_toint(vm, 3);
+ // open connection
+ IPAddress ipaddr;
+ bool success = WifiHostByName(address, ipaddr);
+ if (success) {
+ success = tcp->connect(ipaddr, port);
+ } else {
+ AddLog(LOG_LEVEL_DEBUG, "BRY: tcpclientasync.connect couldn't resolve '%s'", address);
+ }
+ be_pushbool(vm, success);
+ be_return(vm); /* return self */
+ }
+ be_raise(vm, "attribute_error", NULL);
+ }
+
+ // tcp.close(void) -> nil
+ int32_t wc_tcpasync_close(struct bvm *vm);
+ int32_t wc_tcpasync_close(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ tcp->stop();
+ be_return_nil(vm);
+ }
+
+ // tcp.available(void) -> int
+ int32_t wc_tcpasync_available(struct bvm *vm);
+ int32_t wc_tcpasync_available(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ int32_t available = tcp->available();
+ be_pushint(vm, available);
+ be_return(vm);
+ }
+
+ // tcp.connected(void) -> bool or nil
+ // new value: returns `nil` if the status is still unknown
+ int32_t wc_tcpasync_connected(struct bvm *vm);
+ int32_t wc_tcpasync_connected(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ int res = tcp->connected();
+ if (res) {
+ be_pushbool(vm, res > 0);
+ } else {
+ be_pushnil(vm);
+ }
+ be_return(vm); /* return code */
+ }
+
+ // tcp.listening(void) -> bool
+ // is the socket ready for sending
+ int32_t wc_tcpasync_listening(struct bvm *vm);
+ int32_t wc_tcpasync_listening(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ bool res = tcp->listening();
+ be_pushbool(vm, res);
+ be_return(vm); /* return code */
+ }
+
+ // tcp.info(void) -> map
+ // get information about the socket
+ int32_t wc_tcpasync_info(struct bvm *vm);
+ int32_t wc_tcpasync_info(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ be_newobject(vm, "map");
+ int connected = tcp->connected();
+ if (connected == 0) {
+ be_map_insert_nil(vm, "connected");
+ } else {
+ be_map_insert_bool(vm, "connected", connected > 0);
+ }
+ if (connected >= 0) {
+ be_map_insert_bool(vm, "available", tcp->available());
+ be_map_insert_bool(vm, "listening", tcp->listening());
+ be_map_insert_int(vm, "fd", tcp->sockfd);
+ tcp->update_local_addr_port();
+ if (tcp->local_port > 0) {
+ be_map_insert_int(vm, "local_port", tcp->local_port);
+ be_map_insert_str(vm, "local_addr", tcp->local_addr.toString().c_str());
+ }
+ }
+ be_pop(vm, 1);
+ be_return(vm);
+ }
+
+ // tcp.write(bytes | string) -> int
+ int32_t wc_tcpasync_write(struct bvm *vm);
+ int32_t wc_tcpasync_write(struct bvm *vm) {
+ int32_t argc = be_top(vm);
+ if (argc >= 2 && (be_isstring(vm, 2) || be_isbytes(vm, 2))) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ const char * buf = nullptr;
+ size_t buf_len = 0;
+ if (be_isstring(vm, 2)) { // string
+ buf = be_tostring(vm, 2);
+ buf_len = strlen(buf);
+ } else { // bytes
+ buf = (const char*) be_tobytes(vm, 2, &buf_len);
+ }
+ size_t bw = tcp->write(buf, buf_len);
+ be_pushint(vm, bw);
+ be_return(vm); /* return code */
+ }
+ be_raise(vm, kTypeError, nullptr);
+ }
+
+ // tcp.read() -> string
+ int32_t wc_tcpasync_read(struct bvm *vm);
+ int32_t wc_tcpasync_read(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ int32_t max_read = -1; // by default read as much as we can
+ if (be_top(vm) >= 2 && be_isint(vm, 2)) {
+ max_read = be_toint(vm, 2);
+ }
+ int32_t btr = tcp->available();
+ if (btr <= 0) {
+ be_pushstring(vm, "");
+ } else {
+ if ((max_read >= 0) && (btr > max_read)) {
+ btr = max_read;
+ }
+ char * buf = (char*) be_pushbuffer(vm, btr);
+ int32_t btr2 = tcp->read((uint8_t*) buf, btr);
+ be_pushnstring(vm, buf, btr2);
+ }
+ be_return(vm); /* return code */
+ }
+
+ // tcp.readbytes() -> bytes
+ int32_t wc_tcpasync_readbytes(struct bvm *vm);
+ int32_t wc_tcpasync_readbytes(struct bvm *vm) {
+ AsyncTCPClient * tcp = wc_gettcpclientasync_p(vm);
+ int32_t max_read = -1; // by default read as much as we can
+ if (be_top(vm) >= 2 && be_isint(vm, 2)) {
+ max_read = be_toint(vm, 2);
+ }
+ int32_t btr = tcp->available();
+ if (btr <= 0) {
+ be_pushbytes(vm, nullptr, 0);
+ } else {
+ if ((max_read >= 0) && (btr > max_read)) {
+ btr = max_read;
+ }
+ uint8_t * buf = (uint8_t*) be_pushbuffer(vm, btr);
+ int32_t btr2 = tcp->read(buf, btr);
+ be_pushbytes(vm, buf, btr2);
+ }
+ be_return(vm); /* return code */
+ }
+
+}
+
+#endif // USE_WEBCLIENT
+#endif // USE_BERRY
From d7b6d72e19c934be7b426ae5b0819e24929f555a Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Fri, 5 May 2023 16:50:19 +0200
Subject: [PATCH 066/289] Add support for GM861
- Add support for GM861 1D and 2D bar code reader (#18399)
- Bump version to v12.5.0.2
---
BUILDS.md | 1 +
CHANGELOG.md | 30 +-
RELEASENOTES.md | 8 +-
tasmota/include/tasmota_version.h | 2 +-
tasmota/my_user_config.h | 3 +-
.../tasmota_xsns_sensor/xsns_107_gm861.ino | 329 ++++++++++++++++++
6 files changed, 358 insertions(+), 15 deletions(-)
create mode 100644 tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
diff --git a/BUILDS.md b/BUILDS.md
index cb6e3de96..32aa08d78 100644
--- a/BUILDS.md
+++ b/BUILDS.md
@@ -215,6 +215,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
| USE_PROJECTOR_CTRL | - | - / - | - | - | - | - |
| USE_AS608 | - | - / - | - | - | - | - |
| USE_LD2410 | - | - / - | - | - | - | - |
+| USE_GM861 | - | - / - | - | - | - | - |
| USE_TCP_BRIDGE | - | - / - | - | - | - | - | zbbridge / zbbrdgpro
| | | | | | | |
| USE_NRF24 | - | - / - | - | - | - | - |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2c63a54b..6532b2f1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,25 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
-## [12.5.0.1]
+## [12.5.0.2]
+### Added
+- Matter support for Shutters with Tilt
+- Matter POC for remote Relay
+- Support for Zero-Cross Dimmer on ESP32, changed calculation on EPS8266, high resolution control e.g. Solar: `ZCDimmerSet`
+- ESP32 Enhanced Shutterbuttons functionality to control tilt position, additionally incr/decr possible to position and tilt.
+- ESP32 `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
+- Berry `tcpclientasync` class for non-blocking TCP client
+- Support for GM861 1D and 2D bar code reader (#18399)
+
+### Breaking Changed
+
+### Changed
+
+### Fixed
+
+### Removed
+
+## [12.5.0.1] 20230505
### Added
- Matter sensors Humidity, Pressure, Illuminance; optimize memory (#18441)
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control (#18386)
@@ -11,14 +29,6 @@ All notable changes to this project will be documented in this file.
- Matter UI to change endpoints configuration (#18498)
- Matter support for Shutters (without Tilt) (#18509)
- Support for TC74 temperature sensor by Michael Loftis (#18042)
-- Matter support for Shutters with Tilt
-- Matter POC for remote Relay
-- Added support for Zero-Cross Dimmer on ESP32, changed calculation on EPS8266, high resolution control e.g. Solar: `ZCDimmerSet`
-- ESP32: Enhanced Shutterbuttons functionality to control tilt position, additionally incr/decr possible to position and tilt.
-- ESP32: `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
-- Berry add `tcpclientasync` class for non-blocking TCP client
-
-### Breaking Changed
### Changed
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
@@ -31,8 +41,6 @@ All notable changes to this project will be documented in this file.
- Berry fix rules for string comparisons (#18464)
- Shutter: GarageMode does not stop on console commands, `ShutterSetOpen` and `ShutterSetClose` does not reset direction (#18539)
-### Removed
-
## [Released]
## [12.5.0] 20230417
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index df5c0d388..4d651e25a 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -110,14 +110,18 @@ 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 v12.5.0.1
+## Changelog v12.5.0.2
### Added
- Command ``SetOption152 0/1`` to select two (0 = default) pin bistable or one (1) pin latching relay control [#18386](https://github.com/arendst/Tasmota/issues/18386)
- Support for TC74 temperature sensor by Michael Loftis [#18042](https://github.com/arendst/Tasmota/issues/18042)
+- Support for GM861 1D and 2D bar code reader [#18399](https://github.com/arendst/Tasmota/issues/18399)
- Matter sensors Humidity, Pressure, Illuminance [#18441](https://github.com/arendst/Tasmota/issues/18441)
- Matter allow `Matter#Initialized` rule once the device is configured [#18451](https://github.com/arendst/Tasmota/issues/18451)
- Matter UI to change endpoints configuration [#18498](https://github.com/arendst/Tasmota/issues/18498)
-- Matter support for Shutters (without Tilt) [#18509](https://github.com/arendst/Tasmota/issues/18509)
+- Matter support for Shutters with Tilt [#18509](https://github.com/arendst/Tasmota/issues/18509)
+- ESP32 Enhanced Shutterbuttons functionality to control tilt position, additionally incr/decr possible to position and tilt.
+- ESP32 `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
+- Berry `tcpclientasync` class for non-blocking TCP client
### Breaking Changed
diff --git a/tasmota/include/tasmota_version.h b/tasmota/include/tasmota_version.h
index 5d31fe5bd..a98d9e299 100644
--- a/tasmota/include/tasmota_version.h
+++ b/tasmota/include/tasmota_version.h
@@ -20,6 +20,6 @@
#ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_
-const uint32_t VERSION = 0x0C050001; // 12.5.0.1
+const uint32_t VERSION = 0x0C050002; // 12.5.0.2
#endif // _TASMOTA_VERSION_H_
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 0d4b8088a..3559b6303 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -831,7 +831,8 @@
// #define VINDRIKTNING_SHOW_PM1 // Display undocumented/supposed PM1.0 values
// #define VINDRIKTNING_SHOW_PM10 // Display undocumented/supposed PM10 values
//#define USE_LD2410 // Add support for HLK-LD2410 24GHz smart wave motion sensor (+2k8 code)
-// #define USE_LOX_O2 // Add support for LuminOx LOX O2 Sensor (+0k8 code)
+//#define USE_LOX_O2 // Add support for LuminOx LOX O2 Sensor (+0k8 code)
+//#define USE_GM861 // Add support for GM861 1D and 2D Bar Code Reader (+1k3 code)
// -- Power monitoring sensors --------------------
#define USE_ENERGY_SENSOR // Add support for Energy Monitors (+14k code)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
new file mode 100644
index 000000000..23c0b37e2
--- /dev/null
+++ b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
@@ -0,0 +1,329 @@
+/*
+ xsns_107_gm861.ino - Support for GM861 Bar Code Reader for Tasmota
+
+ Copyright (C) 2023 Theo Arends
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#ifdef USE_GM861
+/*********************************************************************************************\
+ * GM861 1D and 2D Bar Code Reader
+ *
+ * For background information see https://github.com/arendst/Tasmota/discussions/18399
+\*********************************************************************************************/
+
+#define XSNS_107 107
+
+/*
+#define GPIO_GM861_TX 304
+#define D_SENSOR_GM861_TX "GM861 Tx"
+#define GPIO_GM861_RX 305
+#define D_SENSOR_GM861_RX "GM861 Rx"
+
+Command ===================== Response ============== Description =========================================================
+Headr Ty Ln Addrs Data Check Headr Ty Ln Data Check
+----- -- -- ----- ----- ----- ----- -- -- ----- -----
+7E 00 07 01 00 2A 02 D8 0F 02 00 00 02 39 01 C1 4C Get baudrate (9600)
+7E 00 08 02 00 2A 39 01 A7 EA 02 00 00 02 39 01 SS SS Set baudrate to 9600
+7E 00 08 01 00 00 D6 AB CD LED on, Mute off, Normal lighting, Normal brightness, Continuous mode
+7E 00 08 01 00 02 01 AB CD 02 00 00 01 00 33 31 Command trigger Mode (Set bit0 of zone byte 0x0002)
+7E 00 08 01 00 02 01 AB CD Trigger mode
+7E 00 08 01 00 2C 02 AB CD Full area, Allow read all bar codes
+7E 00 08 01 00 36 01 AB CD Allow read Code39
+7E 00 08 01 00 37 00 AB CD Code39 Min length
+7E 00 08 01 00 38 FF AB CD Code39 Max length
+7E 00 08 01 00 B0 01 AB CD Cut out data:Output Start part
+7E 00 08 01 00 B1 FF AB CD Cut out M bytes from start
+7E 00 08 01 00 B0 02 AB CD Output End part
+7E 00 08 01 00 B2 FF AB CD Cut out N bytes from end
+7E 00 08 01 00 B0 03 AB CD Output center part
+7E 00 08 01 00 B1 03 AB CD Cut out N bytes from start (Eg: three characters)
+7E 00 08 01 00 B2 02 AB CD Cut out N bytes from end (Eg: two characters)
+7E 00 08 01 00 D9 50 81 D3 02 00 00 01 00 33 31 Zone bytes reset to defaults
+7E 00 08 01 00 D9 55 D1 76 02 00 00 01 00 33 31 Restore user-defined factory settings
+7E 00 08 01 00 D9 56 E1 15 02 00 00 01 00 33 31 Save as user-defined factory settings
+7E 00 08 01 00 D9 A5 3E 69 02 00 00 01 00 33 31 Deep sleep, can be awakened by serial port interrupt, this serial port command is invalid
+7E 00 08 01 00 D9 00 DB 26 02 00 00 01 00 33 31 Wake up from sleep
+7E 00 08 01 00 E7 00 AB CD OUT1 Output low level
+7E 00 08 01 00 E7 01 AB CD OUT1 Output high level
+7E 00 09 01 00 00 00 DE C8 02 00 00 01 00 33 31 Save settings to flash
+7E 00 0A 01 00 00 00 30 1A 03 00 00 01 00 33 31 Send heartbeat every 10 seconds
+*/
+
+enum Gm861States {
+ GM861_STATE_DONE,
+ GM861_STATE_DUMP,
+ GM861_STATE_SERIAL_OUTPUT,
+ GM861_STATE_OUTPUT,
+ GM861_STATE_SETUP_CODE_ON,
+ GM861_STATE_INIT_OFFSET = 16, // Init after (GM861_STATE_INIT_OFFSET - GM861_STATE_SETUP_CODE_ON) * 0.25 seconds restart
+ GM861_STATE_RESET
+};
+
+#include
+TasmotaSerial *Gm861Serial = nullptr;
+
+struct GDK {
+ char barcode[30];
+ uint8_t index;
+ uint8_t state;
+ bool heartbeat;
+ bool read;
+} Gm861;
+
+/*********************************************************************************************/
+
+uint32_t Gm861Crc(uint8_t* ptr, uint32_t len) {
+ // When no need for checking CRC, CRC byte can be filled in 0xAB 0xCD
+ uint32_t crc = 0;
+ while (len-- != 0) {
+ for (uint8_t i = 0x80; i != 0; i /= 2) {
+ crc *= 2;
+ if ((crc & 0x10000) !=0) { // After multiplying the last bit of CRC by 2, if the first bit is 1, then divide by 0x11021
+ crc ^= 0x11021;
+ }
+ if ((*ptr & i) != 0) { // If this bit is 1, then CRC = previous CRC + this bit/CRC_CCITT
+ crc ^= 0x1021;
+ }
+ }
+ ptr++;
+ }
+ return crc;
+}
+
+void Gm861Send(uint32_t type, uint32_t len, uint32_t address, uint32_t data) {
+ uint8_t buffer[10];
+
+ buffer[0] = 0x7E;
+ buffer[1] = 0;
+ buffer[2] = type;
+ buffer[3] = len;
+ buffer[4] = 0;
+ buffer[5] = address;
+ buffer[6] = data;
+ uint8_t index = 7;
+ if (len > 1) {
+ buffer[7] = data >> 8;
+ index++;
+ }
+ uint32_t crc = Gm861Crc(buffer+2, len + 4);
+ buffer[index] = crc >> 8;
+ index++;
+ buffer[index] = crc;
+ index++;
+
+ AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t*)buffer, index);
+
+ Gm861Serial->write(buffer, index);
+}
+
+void Gm861SetZone(uint32_t address, uint32_t data) {
+ Gm861.read = false;
+ uint32_t len = 1;
+ if (0x2A == address) { len = 2; } // Baudrate
+ Gm861Send(8, len, address, data);
+}
+
+void Gm861GetZone(uint32_t address) {
+ Gm861.read = true;
+ Gm861.index = address;
+ uint32_t data = 1;
+ if (0x2A == address) { data = 2; } // Baudrate
+ Gm861Send(7, 1, address, data);
+}
+
+void Gm861SerialInput(void) {
+ if (!Gm861Serial->available()) { return; }
+
+ char buffer[256];
+ uint32_t byte_counter = 0;
+
+ // Use timeout to allow large serial reads within a window
+ uint32_t timeout = millis();
+ while (millis() - 10 < timeout) {
+ if (Gm861Serial->available()) {
+ timeout = millis();
+ buffer[byte_counter++] = Gm861Serial->read();
+ if (byte_counter >= sizeof(buffer) -1) { break; }
+ }
+ }
+ buffer[byte_counter] = 0; // Add string terminating zero
+
+ AddLogBuffer(LOG_LEVEL_DEBUG_MORE, (uint8_t*)buffer, byte_counter);
+
+ if (0 == buffer[1]) { // Command result or Heartbeat
+ if (2 == buffer[0]) { // Command result
+ // 02 00 00 01 00 33 31 - Command acknowledge
+ // 02 00 00 01 01 23 10 - Command result (Zonebyte 96 - 0x60)
+ // 02 00 00 02 39 01 C1 4C - Command result (Zonebytes 42/43 - 0x2A)
+ if (Gm861.read) {
+ uint32_t result = buffer[4];
+ if (2 == buffer[3]) { // Length
+ result += (buffer[5] << 8);
+ }
+ Gm861.read = false;
+ Response_P(S_JSON_COMMAND_INDEX_NVALUE, PSTR("GM861Zone"), Gm861.index, result);
+ MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_STAT, PSTR("GM861Zone"));
+ }
+ }
+ else if (3 == buffer[0]) { // Heartbeat
+ // 03 00 00 01 00 33 31 - Heartbeat response
+ // 03 00 0A 30 33 32 31 35 36 33 38 34 30 - Scan response with zone byte 96 = 0x81
+ Gm861.heartbeat = true;
+ }
+ } else { // Bar code
+ // 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - Barcode 8711218972875
+ RemoveControlCharacter(buffer); // Remove control character (0x00 .. 0x1F and 0x7F)
+ snprintf_P(Gm861.barcode, sizeof(Gm861.barcode) -3, PSTR("%s"), buffer);
+ if (strlen(buffer) > sizeof(Gm861.barcode) -3) {
+ strcat(Gm861.barcode, "...");
+ }
+ ResponseTime_P(PSTR(",\"GM861\":\"%s\"}"), buffer);
+ MqttPublishTeleSensor();
+ }
+}
+
+/********************************************************************************************/
+
+void Gm861Init(void) {
+ if (PinUsed(GPIO_GM861_RX) && PinUsed(GPIO_GM861_TX)) {
+ Gm861Serial = new TasmotaSerial(Pin(GPIO_GM861_RX), Pin(GPIO_GM861_TX), 1);
+ if (Gm861Serial->begin(9600)) {
+ if (Gm861Serial->hardwareSerial()) {
+ ClaimSerial();
+ }
+ Gm861.barcode[0] = '0'; // No barcode yet
+ Gm861.state = GM861_STATE_INIT_OFFSET;
+// AddLog(LOG_LEVEL_INFO, PSTR("GM8: Connected"));
+ }
+ }
+}
+
+void Gm861StateMachine(void) {
+ /*
+ Power on
+ 14:25:04.219-025 DMP: 02 00 00 62 D6 00 20 00 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 30 FE
+ Default: setup code on
+ 12:12:18.672-024 DMP: 02 00 00 61 D6 00 20 00 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 30 FE
+ Output:
+ 14:37:45.129-027 DMP: 02 00 00 62 D6 00 20 01 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 20 91
+ Serial output:
+ 14:39:04.887-027 DMP: 02 00 00 62 D6 00 20 01 00 0A 32 01 2C 00 87 3C 01 A0 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 2D 9E
+ */
+ if (!Gm861.state) { return; }
+
+ switch (Gm861.state) {
+ case GM861_STATE_RESET:
+ Gm861SetZone(0xD9, 0x50); // Factory reset
+ Gm861.state = GM861_STATE_SETUP_CODE_ON +7; // Add time for reset to complete
+ break;
+ case GM861_STATE_SETUP_CODE_ON:
+ Gm861SetZone(0x00, 0xD6); // Set LED on, Mute off, Normal lighting, Normal brightness, Continuous mode (Default: setup code on)
+ break;
+ case GM861_STATE_OUTPUT:
+ Gm861SetZone(0x03, 0x01); // Enable output (Output)
+ break;
+ case GM861_STATE_SERIAL_OUTPUT:
+ Gm861SetZone(0x0D, 0xA0); // Enable serial port output (Serial Output)
+ break;
+ case GM861_STATE_DUMP:
+ Gm861Send(7, 1, 0, 0x62); // Dump zone bytes 0 to 97
+ AddLog(LOG_LEVEL_INFO, PSTR("GM8: Initialized"));
+ break;
+ }
+ Gm861.state--;
+}
+
+/*********************************************************************************************\
+ * Commands
+\*********************************************************************************************/
+
+const char kGm861Commands[] PROGMEM = "GM861|" // Prefix
+ "Zone|Reset|Dump";
+
+void (* const Gm861Command[])(void) PROGMEM = {
+ &CmndGm816Zone, &CmndGm816Reset, &CmndGm816Dump };
+
+void CmndGm816Zone(void) {
+ // GM861Zone42 - Read baudrate
+ // GM861Zone0 0xD6 - Set LED on, Mute off, Normal lighting, Normal brightness, Continuous mode
+ if ((XdrvMailbox.index >= 0x00) && (XdrvMailbox.index <= 0xD9)) {
+ if ((XdrvMailbox.payload >= 0x00) && (XdrvMailbox.payload <= 0x09C4)) {
+ Gm861SetZone(XdrvMailbox.index, XdrvMailbox.payload);
+ ResponseCmndIdxNumber(XdrvMailbox.payload);
+ } else {
+ Gm861GetZone(XdrvMailbox.index);
+ ResponseClear();
+ }
+ }
+}
+
+void CmndGm816Reset(void) {
+ // GM861Reset 1 - Do factory reset and inititalize for serial comms
+ if (1 == XdrvMailbox.payload) {
+ Gm861.state = GM861_STATE_RESET;
+ ResponseCmndDone();
+ }
+}
+
+void CmndGm816Dump(void) {
+ // GM861Dump - Dump zone bytes 0 to 97. Needs logging level 4
+ Gm861Send(7, 1, 0, 0x62); // Dump zone bytes 0 to 97
+ ResponseCmndDone();
+}
+
+/*********************************************************************************************\
+ * Presentation
+\*********************************************************************************************/
+
+#ifdef USE_WEBSERVER
+void Gm861Show(void) {
+ WSContentSend_PD(PSTR("{s}GM816{m}%s{e}"), Gm861.barcode);
+}
+#endif // USE_WEBSERVER
+
+/*********************************************************************************************\
+ Interface
+\*********************************************************************************************/
+
+bool Xsns107(uint32_t function) {
+ bool result = false;
+
+ if (FUNC_INIT == function) {
+ Gm861Init();
+ }
+ else if (Gm861Serial) {
+ switch (function) {
+ case FUNC_LOOP:
+ case FUNC_SLEEP_LOOP:
+ Gm861SerialInput();
+ break;
+ case FUNC_EVERY_250_MSECOND:
+ Gm861StateMachine();
+ break;
+#ifdef USE_WEBSERVER
+ case FUNC_WEB_SENSOR:
+ Gm861Show();
+ break;
+#endif // USE_WEBSERVER
+ case FUNC_COMMAND:
+ result = DecodeCommand(kGm861Commands, Gm861Command);
+ break;
+ }
+ }
+ return result;
+}
+
+#endif // USE_GM861
From 08ce63863e6e4a36a4c2e15e791f7765d76d32b4 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Fri, 5 May 2023 17:09:24 +0200
Subject: [PATCH 067/289] Fix CONFIG_BT_NIMBLE_NVS_PERSIST value unused
https://github.com/h2zero/NimBLE-Arduino/pull/520
---
.../src/nimble/esp_port/port/include/esp_nimble_cfg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libesp32_div/NimBLE-Arduino/src/nimble/esp_port/port/include/esp_nimble_cfg.h b/lib/libesp32_div/NimBLE-Arduino/src/nimble/esp_port/port/include/esp_nimble_cfg.h
index fb00ae115..3b1e4e3ae 100644
--- a/lib/libesp32_div/NimBLE-Arduino/src/nimble/esp_port/port/include/esp_nimble_cfg.h
+++ b/lib/libesp32_div/NimBLE-Arduino/src/nimble/esp_port/port/include/esp_nimble_cfg.h
@@ -686,7 +686,7 @@
#ifndef MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST
#ifdef CONFIG_BT_NIMBLE_NVS_PERSIST
-#define MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST (1)
+#define MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST (CONFIG_BT_NIMBLE_NVS_PERSIST)
#else
#define MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST (0)
#endif
From 7612dfabcfbee69bd056e4312139db057085d6c0 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Fri, 5 May 2023 17:41:18 +0200
Subject: [PATCH 068/289] Remove coffee
---
FIRMWARE.md | 1 -
README.md | 2 --
2 files changed, 3 deletions(-)
diff --git a/FIRMWARE.md b/FIRMWARE.md
index c1c701be7..e7d042c39 100644
--- a/FIRMWARE.md
+++ b/FIRMWARE.md
@@ -13,7 +13,6 @@ If you like **Tasmota**, give it a star, or fork it and contribute!
[](https://github.com/arendst/Tasmota/stargazers)
[](https://github.com/arendst/Tasmota/network)
[](https://paypal.me/tasmota)
-[](https://www.buymeacoffee.com/tasmota)
See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/CHANGELOG.md) for changes since last release.
diff --git a/README.md b/README.md
index efbfc44a9..f3039bda5 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,6 @@ If you like **Tasmota**, give it a star, or fork it and contribute!
[](https://github.com/arendst/Tasmota/stargazers)
[](https://github.com/arendst/Tasmota/network)
[](https://paypal.me/tasmota)
-[](https://www.buymeacoffee.com/tasmota)
See [RELEASENOTES.md](https://github.com/arendst/Tasmota/blob/master/RELEASENOTES.md) for release information.
@@ -126,7 +125,6 @@ You can contribute to Tasmota by
- Contributing missing [documentation](https://tasmota.github.io/docs) for features and devices
[](https://paypal.me/tasmota)
-[](https://www.buymeacoffee.com/tasmota)
## Credits
From 8b2539a35a26af2744a0225ff7ad3fac27d8d0a1 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sat, 6 May 2023 12:18:12 +0200
Subject: [PATCH 069/289] Partition_Manager.tapp fixed (#18588)
---
CHANGELOG.md | 1 +
tasmota/berry/modules/Partition_Manager.tapp | Bin 17087 -> 17089 bytes
.../modules/Partition_Manager/partition.bec | Bin 16636 -> 16638 bytes
tasmota/berry/modules/partition.be | 58 +++++++++---------
4 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6532b2f1c..0184f9c4e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
### Changed
### Fixed
+- Partition_Manager.tapp fixed
### Removed
diff --git a/tasmota/berry/modules/Partition_Manager.tapp b/tasmota/berry/modules/Partition_Manager.tapp
index 282490659078c0c4c69a6d99bed5c0a4ecc6c005..71f0a0e3fbe93f89953faa3acfca4081179cb476 100644
GIT binary patch
delta 723
zcmY*XL1+^}6n#58yF0s?jZ2(Lj7zK_wA7?tA|m8agSUFF*=EUvCCuPwLlPA}cQIUl(&
z-%T#u(((4N$~nWmhrOybf5YZb8Wp@LAzFZp!9-$M;=F{{Nr!I4Ao_F;Z8|eUbR`11
zr|4dgm~OzqMFOxD9Y2Q#t$c%H@YyOGS)ak7ogVE{all5oKe_A16~Q5?wQdgP?J`Sr
z$1?B?xC<0x6XghYkfg&gTB#Awz#sUpt#x`nnLS6d0Nx^)Bp?kb@{!5%Gg`+PupMyH
z1ep*_96+^flp>pzsIC&J>t2!S#e}(Gg`?b|wQimWE64{icY_)uUB`0=q|t(EP7%N>
zK)kU{)rAOSaFu+^ih}frtOmw69P~b(Y^}Q-;~8DiOou*ErWMsL3R+
zsS#x$NF1DsET-yaPE{aEyD3e@VVdrEU*yA@shRfEUlU&O+OBo;Dbq5F9z
zlQr0y&fulGQyBe+(-ZGUZWw&MFqIqST{Ev*Hev)6>Yuyog57Q
i*Px+m|IE!AtZa@9`kx(p?ZyPxw(C7>oVA^X9>71XE19nV
delta 705
zcmY*X&ubG=5dPlV*|#sr+wx4-5Nc=m*x3|i&bK&XY!)Pyj@?q}L&t)JJA62a1xVzce?A*D%xVm<8CCtGo@rO)a
ze?LcxaIbTJEm?3^LKi4;S_5hWI)bDa4xKho-E{1R0yN-vRqKho2vm9q)=@|lX
zJmh*NU&ewpZ8@Wl?wt5rWb{L&|L(u^p`6;k6|RaU4=8YTK5U8
znRS`{Ha3}G2kZ}G;Z^E{*)Hp*^ec536FHt~NTznwcE~gd_B#I`p5er=Tw(iAl?Y_x
zPZKAxlZKfu>xW9-m)boI%rnGvoC~F-hJ|h)ZKmL6I+$TpI-bc;FZ2$lO
diff --git a/tasmota/berry/modules/Partition_Manager/partition.bec b/tasmota/berry/modules/Partition_Manager/partition.bec
index 30064881a02ce6af29da439b9829443844b18f01..c7278f0759377ea2a343cc0c379aa2f803e3e600 100644
GIT binary patch
delta 574
zcmYjPv1;5v5Pcerq?No@mh(D@i#S}E5RNN_A=rgKAf*BqP@yWM2?WxZuwc7Oah(sh
z0aqy!FkIutfqXzJe?n?QY)BV$8LeD+VVT`|yKml`-G8S+cN$zymL@C6c{Js7j
z9n19>{yOF(a4R&CPqF%X|5IQubbk5k5u
zm#gO8dQ&8FWuV)~?IdX@(@3Ogm-o^{GGJVSr*%a3Al$GssPR=NT}h~yyR%ezSw)-0
z=R_CFII|TpZvKdh7+O?lucEJ)g`_LQy`0s>*1OU04(9pw@EcY))9J>L3-`{WVfAJI
L=fhuldwBjIrm|~L
delta 576
zcmYjPzfaph7=3sC?tDqE=m<_^1q2H%63S@7P=@>g9X)jL;H6SJwGvB&P69TDY>D^>
zx-bAj%EH3Hz|PLdRtX73jL7ciw5~E(-`)4VAMd?$aVp+V#my#Z!r}L$Z5Iu@Aj$&tQfTXoa+M=*lGXGd_DUUd
z=MML^ft-VP%)dZ0m1qts4eO8>kgNyBgKXyDa*Zy_?K1AXt#A`D9(fVQeL`=<@j!lv
z`>-|(LYqj|w49r>K7#wo{g)qk@Qo5~3>{}6=bslKF-VscRvDou5AFQe09#D4C>yDi
zlsK4t*+s!F23TQM#;;VYm@U7D57ACZx&zs8edz9O!Cq(?_XBK9LmMa5iq3R1nkwTG
z7|LFmfP!HHWwBN>>i=N&w7c7?^Nqc8RiA%-zOQR0!@>C<
D7+rBl
diff --git a/tasmota/berry/modules/partition.be b/tasmota/berry/modules/partition.be
index e039f3723..8652f238c 100644
--- a/tasmota/berry/modules/partition.be
+++ b/tasmota/berry/modules/partition.be
@@ -26,7 +26,7 @@ class Partition_info
var type
var subtype
var start
- var size
+ var sz
var label
var flags
@@ -46,7 +46,7 @@ class Partition_info
self.type = 0
self.subtype = 0
self.start = 0
- self.size = 0
+ self.sz = 0
self.label = ''
self.flags = 0
return
@@ -59,7 +59,7 @@ class Partition_info
self.type = raw.get(2,1)
self.subtype = raw.get(3,1)
self.start = raw.get(4,4)
- self.size = raw.get(8,4)
+ self.sz = raw.get(8,4)
self.label = self.remove_trailing_zeroes(raw[12..27]).asstring()
self.flags = raw.get(28,4)
@@ -149,7 +149,7 @@ class Partition_info
return string.format("",
self.type, type_s,
self.subtype, subtype_s,
- self.start, self.size,
+ self.start, self.sz,
self.label, self.flags)
end
@@ -160,7 +160,7 @@ class Partition_info
b.add(self.type, 1)
b.add(self.subtype, 1)
b.add(self.start, 4)
- b.add(self.size, 4)
+ b.add(self.sz, 4)
var label = bytes().fromstring(self.label)
label.resize(16)
b = b + label
@@ -525,12 +525,12 @@ class Partition_manager_UI
webserver.content_send(string.format(" %s%s ",
slot.start / 0x1000, slot.label, active ? " (active)" : ""))
- webserver.content_send(string.format("Partition size: %i KB
", slot.size / 1024))
+ webserver.content_send(string.format("Partition size: %i KB
", slot.sz / 1024))
var used = slot.get_image_size()
- if used > slot.size slot.used = -1 end # we may have a leftover of a previous firmware but the slot shrank - in this case the slot is inknown
+ if used > slot.sz slot.used = -1 end # we may have a leftover of a previous firmware but the slot shrank - in this case the slot is inknown
if used >= 0
webserver.content_send(string.format("Used: %i KB
", used / 1024))
- webserver.content_send(string.format("Free: %i KB
", (slot.size - used) / 1024))
+ webserver.content_send(string.format("Free: %i KB
", (slot.sz - used) / 1024))
else
webserver.content_send("Used : unknown
")
webserver.content_send("Free : unknown
")
@@ -567,10 +567,10 @@ class Partition_manager_UI
webserver.content_send(string.format(" filesystem ",
slot.start / 0x1000))
- webserver.content_send(string.format("Partition size: %i KB
", slot.size / 1024))
+ webserver.content_send(string.format("Partition size: %i KB
", slot.sz / 1024))
if free_mem != nil
- webserver.content_send(string.format("Max size: %i KB
", (slot.size + free_mem) / 1024))
+ webserver.content_send(string.format("Max size: %i KB
", (slot.sz + free_mem) / 1024))
webserver.content_send(string.format("Unallocated: %i KB
", free_mem / 1024))
end
@@ -578,7 +578,7 @@ class Partition_manager_UI
webserver.content_send("New size: (multiple of 16 KB)
")
webserver.content_send("")
- webserver.content_send(string.format(" ", (slot.size + free_mem) / 1024, ((slot.size + free_mem) / 1024 / 16)*16))
+ webserver.content_send(string.format(" ", (slot.sz + free_mem) / 1024, ((slot.sz + free_mem) / 1024 / 16)*16))
webserver.content_send("
Resize filesystem ")
webserver.content_send("
")
end
@@ -598,7 +598,7 @@ class Partition_manager_UI
self.page_show_partition(slot, false, nil, nil)
elif slot.is_spiffs()
var flash_size = tasmota.memory()['flash'] * 1024
- var used_size = (slot.start + slot.size)
+ var used_size = (slot.start + slot.sz)
self.page_show_spiffs(slot, slot == p.slots[-1] ? flash_size - used_size : nil)
end
end
@@ -615,11 +615,11 @@ class Partition_manager_UI
else
# we can proceed
var app0 = p.get_ota_slot(0)
- var app0_size_kb = ((app0.size / 1024 + 63) / 64) * 64 # rounded to upper 64kb
+ var app0_size_kb = ((app0.sz / 1024 + 63) / 64) * 64 # rounded to upper 64kb
var app0_used_kb = (((app0.get_image_size()) / 1024 / 64) + 1) * 64
var app1 = p.get_ota_slot(1)
- var app1_size_kb = ((app1.size / 1024 + 63) / 64) * 64 # rounded to upper 64kb
+ var app1_size_kb = ((app1.sz / 1024 + 63) / 64) * 64 # rounded to upper 64kb
# var app1_used_kb = (((app1.get_image_size()) / 1024 / 64) + 1) * 64 # we don't actually need it
var flash_size_kb = tasmota.memory()['flash']
@@ -723,10 +723,10 @@ class Partition_manager_UI
if spiffs_size_kb < 0 || spiffs_size_kb > spiffs_max_size
raise "value_error", string.format("Invalid fs_size %i, should be between 0 and %i", spiffs_size_kb, spiffs_max_size)
end
- if spiffs_size_kb == spiffs_slot.size/1024 raise "value_error", "FS size unchanged, abort" end
+ if spiffs_size_kb == spiffs_slot.sz/1024 raise "value_error", "FS size unchanged, abort" end
#- write the new SPIFFS partition size -#
- spiffs_slot.size = spiffs_size_kb * 1024
+ spiffs_slot.sz = spiffs_size_kb * 1024
p.save()
p.invalidate_spiffs() # erase SPIFFS or data is corrupt
@@ -750,7 +750,7 @@ class Partition_manager_UI
if p.ota_max() != 1
raise "internal_error", "There are more than 2 OTA partition, abort"
end
- var app0_size_kb = ((app0.size / 1024 + 63) / 64) * 64 # rounded to upper 64kb
+ var app0_size_kb = ((app0.sz / 1024 + 63) / 64) * 64 # rounded to upper 64kb
var app0_used_kb = (((app0.get_image_size()) / 1024 / 64) + 1) * 64
var flash_size_kb = tasmota.memory()['flash']
@@ -762,13 +762,13 @@ class Partition_manager_UI
#- all good, proceed -#
# resize app0
- app0.size = part_size_kb * 1024
+ app0.sz = part_size_kb * 1024
# change app1
- app1.start = app0.start + app0.size
- app1.size = part_size_kb * 1024
+ app1.start = app0.start + app0.sz
+ app1.sz = part_size_kb * 1024
# change spiffs
- spiffs.start = app1.start + app1.size
- spiffs.size = flash_size_kb * 1024 - spiffs.start
+ spiffs.start = app1.start + app1.sz
+ spiffs.sz = flash_size_kb * 1024 - spiffs.start
p.save()
p.invalidate_spiffs() # erase SPIFFS or data is corrupt
@@ -792,9 +792,9 @@ class Partition_manager_UI
if p.ota_max() != 1
raise "internal_error", "There are more than 2 OTA partition, abort"
end
- var app0_size_kb = ((app0.size / 1024 + 63) / 64) * 64 # rounded to upper 64kb
+ var app0_size_kb = ((app0.sz / 1024 + 63) / 64) * 64 # rounded to upper 64kb
var app0_used_kb = (((app0.get_image_size()) / 1024 / 64) + 1) * 64
- var app1_size_kb = ((app1.size / 1024 + 63) / 64) * 64 # rounded to upper 64kb
+ var app1_size_kb = ((app1.sz / 1024 + 63) / 64) * 64 # rounded to upper 64kb
var flash_size_kb = tasmota.memory()['flash']
var part0_size_kb = int(webserver.arg("app0"))
@@ -809,13 +809,13 @@ class Partition_manager_UI
#- all good, proceed -#
# resize app0
- app0.size = part0_size_kb * 1024
+ app0.sz = part0_size_kb * 1024
# change app1
- app1.start = app0.start + app0.size
- app1.size = part1_size_kb * 1024
+ app1.start = app0.start + app0.sz
+ app1.sz = part1_size_kb * 1024
# change spiffs
- spiffs.start = app1.start + app1.size
- spiffs.size = flash_size_kb * 1024 - spiffs.start
+ spiffs.start = app1.start + app1.sz
+ spiffs.sz = flash_size_kb * 1024 - spiffs.start
p.save()
p.invalidate_spiffs() # erase SPIFFS or data is corrupt
From 25e55ae0732a2271783e1e3e71b057ca8c9f0713 Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Sat, 6 May 2023 15:46:29 +0200
Subject: [PATCH 070/289] #18548 fix shuttersetup (#18586)
- code optimization
- shuttersetup reluctant on relay to energy measure relation
---
.../xdrv_27_esp32_shutter.ino | 105 ++++++++----------
1 file changed, 46 insertions(+), 59 deletions(-)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
index 83b623cf5..eb5569e4f 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino
@@ -50,6 +50,10 @@
#undef MAX_SHUTTERS_ESP32
#define MAX_SHUTTERS_ESP32 16
+// Define Std Text Strings
+#define D_ERROR_FILESYSTEM_NOT_READY "SHT: ERROR File system not enabled"
+#define D_ERROR_FILE_NOT_FOUND "SHT: ERROR File system not ready or file not found"
+
//
const uint32_t SHUTTER_VERSION = 0x01010100; // Latest driver version (See settings deltas below)
@@ -271,12 +275,12 @@ void ShutterSettingsDelta(void) {
}
}
-/*
- if (ShutterSettings.version < 0x01010101) {
- AddLog(LOG_LEVEL_INFO, PSTR("SHT: Update old version restore"));
- }
-*/
+ // if (ShutterSettings.version < 0x01010101) {
+ // AddLog(LOG_LEVEL_INFO, PSTR("SHT: Update old version restore"));
+
+ // }
+
// Set current version and save settings
ShutterSettings.version = SHUTTER_VERSION;
ShutterSettingsSave();
@@ -291,12 +295,10 @@ void ShutterSettingsLoad(bool erase) {
// Try to load file /.drvset027
char filename[20];
- // Use for sensors:
-// snprintf_P(filename, sizeof(filename), PSTR(TASM_FILE_SENSOR), XSNS_27);
// Use for drivers:
snprintf_P(filename, sizeof(filename), PSTR(TASM_FILE_DRIVER), XDRV_27);
- AddLog(LOG_LEVEL_INFO, PSTR("SHUTTER: About to load settings from file %s"), filename);
+ AddLog(LOG_LEVEL_INFO, PSTR("SHT: About to load settings from file %s"), filename);
#ifdef USE_UFILESYS
if (erase) {
@@ -307,11 +309,11 @@ void ShutterSettingsLoad(bool erase) {
ShutterSettingsDelta();
} else {
// File system not ready: No flash space reserved for file system
- AddLog(LOG_LEVEL_INFO, PSTR("DRV: ERROR File system not ready or file not found"));
+ AddLog(LOG_LEVEL_INFO, PSTR(D_ERROR_FILE_NOT_FOUND));
}
#else
- AddLog(LOG_LEVEL_INFO, PSTR("DRV: ERROR File system not enabled"));
+ AddLog(LOG_LEVEL_INFO, D_ERROR_FILESYSTEM_NOT_READY);
#endif // USE_UFILESYS
}
@@ -324,20 +326,18 @@ void ShutterSettingsSave(void) {
ShutterSettings.crc32 = crc32;
char filename[20];
- // Use for sensors:
-// snprintf_P(filename, sizeof(filename), PSTR(TASM_FILE_SENSOR), XSNS_27);
// Use for drivers:
snprintf_P(filename, sizeof(filename), PSTR(TASM_FILE_DRIVER), XDRV_27);
- AddLog(LOG_LEVEL_INFO, PSTR("SHUTTER: About to save settings to file %s"), filename);
+ AddLog(LOG_LEVEL_INFO, PSTR("SHT: About to save settings to file %s"), filename);
#ifdef USE_UFILESYS
if (!TfsSaveFile(filename, (const uint8_t*)&ShutterSettings, sizeof(ShutterSettings))) {
// File system not ready: No flash space reserved for file system
- AddLog(LOG_LEVEL_INFO, PSTR("DRV: ERROR File system not ready or unable to save file"));
+ AddLog(LOG_LEVEL_INFO, D_ERROR_FILE_NOT_FOUND);
}
#else
- AddLog(LOG_LEVEL_INFO, PSTR("SHUTTER: ERROR File system not enabled"));
+ AddLog(LOG_LEVEL_INFO, D_ERROR_FILESYSTEM_NOT_READY);
#endif // USE_UFILESYS
}
}
@@ -903,7 +903,7 @@ void ShutterUpdatePosition(void)
XnrgCall(FUNC_ENERGY_EVERY_SECOND);
// fency calculation with direction gives index 0 and 1 of the energy meter
// stop if endpoint is reached
- if (Energy->active_power[(1 - Shutter[i].direction ) / 2] < 1.0 && Shutter[i].time > 20){
+ if (Energy->active_power[0]+Energy->active_power[1] < 1.0 && Shutter[i].time > 20){
ShutterGlobal.stopp_armed++;
AddLog(LOG_LEVEL_INFO, PSTR("SHT: stopp_armed:%d"),ShutterGlobal.stopp_armed);
if (ShutterGlobal.stopp_armed > 2) {
@@ -1058,6 +1058,7 @@ int32_t ShutterCalculatePosition(uint32_t i)
case SHT_TIME_UP_DOWN:
case SHT_TIME_GARAGE:
if (Shutter[i].tilt_config[2] > 0) {
+ // the tilt time is defined and therefore the tiltposition must be calculated
if (Shutter[i].time <= Shutter[i].venetian_delay+Shutter[i].motordelay) {
Shutter[i].tilt_real_pos = (Shutter[i].tilt_start_pos + ((Shutter[i].direction * (int16_t)(Shutter[i].time - tmin(Shutter[i].motordelay, Shutter[i].time)) * (Shutter[i].tilt_config[1]-Shutter[i].tilt_config[0])) / Shutter[i].tilt_config[2]));
} else {
@@ -1114,53 +1115,39 @@ void ShutterRelayChanged(void)
if (powerstate_local > 0) {
Shutter[i].tiltmoving = 0;
}
- switch (ShutterGlobal.position_mode) {
- // enum Shutterposition_mode {SHT_TIME, SHT_TIME_UP_DOWN, SHT_TIME_GARAGE, SHT_COUNTER, SHT_PWM_VALUE, SHT_PWM_TIME,};
- case SHT_TIME_UP_DOWN:
- case SHT_COUNTER:
- case SHT_PWM_VALUE:
- case SHT_PWM_TIME:
- //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: power off manual change"));
- ShutterPowerOff(i);
- switch (powerstate_local) {
- case 1:
- ShutterStartInit(i, 1, Shutter[i].open_max);
- break;
- case 3:
- ShutterStartInit(i, -1, 0);
- break;
- default:
- //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d Switch OFF motor."),i);
+ switch (ShutterGlobal.position_mode) {
+ // enum Shutterposition_mode {SHT_TIME, SHT_TIME_UP_DOWN, SHT_TIME_GARAGE, SHT_COUNTER, SHT_PWM_VALUE, SHT_PWM_TIME,};
+ case SHT_TIME_UP_DOWN:
+ case SHT_COUNTER:
+ case SHT_PWM_VALUE:
+ case SHT_PWM_TIME:
+ case SHT_TIME: {
+ ShutterPowerOff(i);
+ // powerstate_local == 0 => direction=0, stop
+ // powerstate_local == 1 => direction=1, target=Shutter[i].open_max
+ // powerstate_local == 2 => direction=-1, target=0 // only happen on SHT_TIME
+ // powerstate_local == 3 => direction=-1, target=0 // only happen if NOT SHT_TIME
+ int direction = (powerstate_local == 0) ? 0 : (powerstate_local == 1) ? 1 : -1;
+ int target = (powerstate_local == 1) ? Shutter[i].open_max : 0;
+
+ if (direction != 0) {
+ ShutterStartInit(i, direction, target);
+ } else {
Shutter[i].target_position = Shutter[i].real_position;
Shutter[i].last_stop_time = millis();
}
- break;
- case SHT_TIME:
- switch (powerstate_local) {
- case 1:
- ShutterStartInit(i, 1, Shutter[i].open_max);
- break;
- case 2:
- ShutterStartInit(i, -1, 0);
- break;
- default:
- //AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d Switch OFF motor."),i+1);
- Shutter[i].target_position = Shutter[i].real_position;
- Shutter[i].last_stop_time = millis();
+ break;
}
- break;
- case SHT_TIME_GARAGE:
- switch (powerstate_local) {
- case 1:
- ShutterStartInit(i, Shutter[i].lastdirection*-1 , Shutter[i].lastdirection == 1 ? 0 : Shutter[i].open_max);
- AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d Garage. NewTarget %d"), i, Shutter[i].target_position);
- break;
- default:
- Shutter[i].target_position = Shutter[i].real_position;
- }
-
-
- } // switch (ShutterGlobal.position_mode)
+ case SHT_TIME_GARAGE:
+ switch (powerstate_local) {
+ case 1:
+ ShutterStartInit(i, Shutter[i].lastdirection * -1, Shutter[i].lastdirection == 1 ? 0 : Shutter[i].open_max);
+ AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d Garage. NewTarget %d"), i, Shutter[i].target_position);
+ break;
+ default:
+ Shutter[i].target_position = Shutter[i].real_position;
+ }
+ }
AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("SHT: Shtr%d, Target %ld, Power: %d, tiltmv: %d"), i+1, Shutter[i].target_position, powerstate_local,Shutter[i].tiltmoving);
} // if (manual_relays_changed)
} // for (uint32_t i = 0; i < TasmotaGlobal.shutters_present; i++)
From b9464a21a8eb064264888fe2c5cd1c689d932115 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sat, 6 May 2023 17:18:52 +0200
Subject: [PATCH 071/289] GM861 add support for AIM
---
.../tasmota_xsns_sensor/xsns_107_gm861.ino | 49 ++++++++++++++-----
1 file changed, 36 insertions(+), 13 deletions(-)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
index 23c0b37e2..ed8564e6c 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
@@ -22,6 +22,15 @@
* GM861 1D and 2D Bar Code Reader
*
* For background information see https://github.com/arendst/Tasmota/discussions/18399
+ *
+ * Commands available:
+ * GM861Zone - Show zone byte state
+ * GM861Zone - Set zone byte to value
+ * GM861Zone5 20 - Set read interval to 2 seconds (default 10 = 0x0A)
+ * GM861Zone44 0x02 - Enable all barcodes using full area (default 5 = 0x05)
+ * GM861Save - Save changes in zone bytes to flash
+ * GM861Reset 1 - Reset to factory settings and re-init the scanner
+ * GM861Dump - Dump zone bytes 0 to 97 if logging level 4
\*********************************************************************************************/
#define XSNS_107 107
@@ -147,9 +156,8 @@ void Gm861GetZone(uint32_t address) {
void Gm861SerialInput(void) {
if (!Gm861Serial->available()) { return; }
- char buffer[256];
+ char buffer[272]; // Max 256 code characters and some control characters
uint32_t byte_counter = 0;
-
// Use timeout to allow large serial reads within a window
uint32_t timeout = millis();
while (millis() - 10 < timeout) {
@@ -165,9 +173,9 @@ void Gm861SerialInput(void) {
if (0 == buffer[1]) { // Command result or Heartbeat
if (2 == buffer[0]) { // Command result
- // 02 00 00 01 00 33 31 - Command acknowledge
- // 02 00 00 01 01 23 10 - Command result (Zonebyte 96 - 0x60)
- // 02 00 00 02 39 01 C1 4C - Command result (Zonebytes 42/43 - 0x2A)
+ // 02 00 00 01 00 33 31 - Command acknowledge
+ // 02 00 00 01 01 23 10 - Command result (Zonebyte 96 - 0x60)
+ // 02 00 00 02 39 01 C1 4C - Command result (Zonebytes 42/43 - 0x2A)
if (Gm861.read) {
uint32_t result = buffer[4];
if (2 == buffer[3]) { // Length
@@ -179,18 +187,27 @@ void Gm861SerialInput(void) {
}
}
else if (3 == buffer[0]) { // Heartbeat
- // 03 00 00 01 00 33 31 - Heartbeat response
- // 03 00 0A 30 33 32 31 35 36 33 38 34 30 - Scan response with zone byte 96 = 0x81
+ // 03 00 00 01 00 33 31 - Heartbeat response
+ // 03 00 0A 30 33 32 31 35 36 33 38 34 30 - Scan response with zone byte 96 = 0x81
Gm861.heartbeat = true;
}
} else { // Bar code
- // 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - Barcode 8711218972875
+ // 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - Barcode 8711218972875
+ // 5D 45 30 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - AIM ]E0, Barcode 8711218972875
RemoveControlCharacter(buffer); // Remove control character (0x00 .. 0x1F and 0x7F)
- snprintf_P(Gm861.barcode, sizeof(Gm861.barcode) -3, PSTR("%s"), buffer);
+ uint32_t offset = 0;
+ if (']' == buffer[0]) { // AIM code
+ offset = 3;
+ }
+ snprintf_P(Gm861.barcode, sizeof(Gm861.barcode) -3, PSTR("%s"), buffer + offset);
if (strlen(buffer) > sizeof(Gm861.barcode) -3) {
strcat(Gm861.barcode, "...");
}
- ResponseTime_P(PSTR(",\"GM861\":\"%s\"}"), buffer);
+ ResponseTime_P(PSTR(",\"GM861\":{"));
+ if (offset) {
+ ResponseAppend_P(PSTR("\"AIM\":\"%c%c\","), buffer[1], buffer[2]);
+ }
+ ResponseAppend_P(PSTR("\"Code\":\"%s\"}}"), buffer + offset);
MqttPublishTeleSensor();
}
}
@@ -216,7 +233,7 @@ void Gm861StateMachine(void) {
Power on
14:25:04.219-025 DMP: 02 00 00 62 D6 00 20 00 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 30 FE
Default: setup code on
- 12:12:18.672-024 DMP: 02 00 00 61 D6 00 20 00 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 30 FE
+ 12:12:18.672-024 DMP: 02 00 00 62 D6 00 20 00 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 30 FE
Output:
14:37:45.129-027 DMP: 02 00 00 62 D6 00 20 01 00 0A 32 01 2C 00 87 3C 01 A1 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 20 91
Serial output:
@@ -251,10 +268,10 @@ void Gm861StateMachine(void) {
\*********************************************************************************************/
const char kGm861Commands[] PROGMEM = "GM861|" // Prefix
- "Zone|Reset|Dump";
+ "Zone|Save|Reset|Dump";
void (* const Gm861Command[])(void) PROGMEM = {
- &CmndGm816Zone, &CmndGm816Reset, &CmndGm816Dump };
+ &CmndGm816Zone, &CmndGm816Save, &CmndGm816Reset, &CmndGm816Dump };
void CmndGm816Zone(void) {
// GM861Zone42 - Read baudrate
@@ -270,6 +287,12 @@ void CmndGm816Zone(void) {
}
}
+void CmndGm816Save(void) {
+ // GM861Save - Save zone bytes to flash
+ Gm861Send(9, 1, 0, 0); // Save to flash
+ ResponseCmndDone();
+}
+
void CmndGm816Reset(void) {
// GM861Reset 1 - Do factory reset and inititalize for serial comms
if (1 == XdrvMailbox.payload) {
From e9d1e8c7250d89a24ade0c42a64731d6c492bbb2 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sat, 6 May 2023 18:09:11 +0200
Subject: [PATCH 072/289] Change command FileUpload binary index
---
CHANGELOG.md | 1 +
RELEASENOTES.md | 1 +
tasmota/tasmota_support/support_command.ino | 2 +-
tasmota/tasmota_xdrv_driver/xdrv_02_1_mqtt_file.ino | 2 +-
tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino | 1 +
tools/mqtt-file/upload-ota.py | 2 +-
tools/mqtt-file/upload-settings.py | 2 +-
7 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0184f9c4e..5f7f4d2f1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- Support for GM861 1D and 2D bar code reader (#18399)
### Breaking Changed
+- Change command ``FileUpload`` index binary data detection from >199 to >299
### Changed
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 4d651e25a..464e0acb6 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -124,6 +124,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Berry `tcpclientasync` class for non-blocking TCP client
### Breaking Changed
+- Change command ``FileUpload`` index binary data detection from >199 to >299
### Changed
- ESP32 Framework (Core) from v2.0.7 to v2.0.8
diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino
index a5926b353..c19314725 100644
--- a/tasmota/tasmota_support/support_command.ino
+++ b/tasmota/tasmota_support/support_command.ino
@@ -408,7 +408,7 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
}
type[i] = '\0';
- bool binary_data = (index > 199); // Suppose binary data on topic index > 199
+ bool binary_data = (index > 299); // Suppose binary data on topic index > 299
if (!binary_data) {
bool keep_spaces = ((strstr_P(type, PSTR("SERIALSEND")) != nullptr) && (index > 9)); // Do not skip leading spaces on (s)serialsend10 and up
if (!keep_spaces) {
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_02_1_mqtt_file.ino b/tasmota/tasmota_xdrv_driver/xdrv_02_1_mqtt_file.ino
index 7c6ddc63c..9f025caa0 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_02_1_mqtt_file.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_02_1_mqtt_file.ino
@@ -210,7 +210,7 @@ void CmndFileUpload(void) {
const char* base64_data = nullptr;
uint32_t rcv_id = 0;
- bool binary_data = (XdrvMailbox.index > 199); // Check for raw data
+ bool binary_data = (XdrvMailbox.index > 299); // Check for raw data
if (!binary_data) {
if (strlen(XdrvMailbox.data) > 8) { // Workaround exception if empty JSON like {} - Needs checks
diff --git a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
index ed8564e6c..fe904430f 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
@@ -28,6 +28,7 @@
* GM861Zone - Set zone byte to value
* GM861Zone5 20 - Set read interval to 2 seconds (default 10 = 0x0A)
* GM861Zone44 0x02 - Enable all barcodes using full area (default 5 = 0x05)
+ * GM861Zone208 0x80 - Enable AIM ID (default 0 = 0x00)
* GM861Save - Save changes in zone bytes to flash
* GM861Reset 1 - Reset to factory settings and re-init the scanner
* GM861Dump - Dump zone bytes 0 to 97 if logging level 4
diff --git a/tools/mqtt-file/upload-ota.py b/tools/mqtt-file/upload-ota.py
index e7cd22e77..0c09cf180 100644
--- a/tools/mqtt-file/upload-ota.py
+++ b/tools/mqtt-file/upload-ota.py
@@ -158,7 +158,7 @@ while Run_flag:
# Message length used by Tasmota (FileTransferHeaderSize)
client.publish(mypublish, "{\"Id\":"+str("%3d"%file_id)+",\"Data\":\""+base64_data+"\"}")
else:
- client.publish(mypublish+"201", chunk)
+ client.publish(mypublish+"301", chunk)
file_pos = file_pos + file_chunk_size
if file_pos % 102400 < file_chunk_size:
progress = round((file_pos / 10240)) * 10
diff --git a/tools/mqtt-file/upload-settings.py b/tools/mqtt-file/upload-settings.py
index fd8216d15..50c64d37c 100644
--- a/tools/mqtt-file/upload-settings.py
+++ b/tools/mqtt-file/upload-settings.py
@@ -156,7 +156,7 @@ while Run_flag:
# Message length used by Tasmota (FileTransferHeaderSize)
client.publish(mypublish, "{\"Id\":"+str("%3d"%file_id)+",\"Data\":\""+base64_data+"\"}")
else:
- client.publish(mypublish+"201", chunk)
+ client.publish(mypublish+"301", chunk)
Ack_flag = True
else:
From 0287291cd9fe2be7938e31339dc46544b6b37747 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sun, 7 May 2023 14:11:29 +0200
Subject: [PATCH 073/289] Add GM861 optional AIMId decode
---
tasmota/my_user_config.h | 1 +
.../tasmota_xsns_sensor/xsns_107_gm861.ino | 33 +++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 3559b6303..24184ee2c 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -833,6 +833,7 @@
//#define USE_LD2410 // Add support for HLK-LD2410 24GHz smart wave motion sensor (+2k8 code)
//#define USE_LOX_O2 // Add support for LuminOx LOX O2 Sensor (+0k8 code)
//#define USE_GM861 // Add support for GM861 1D and 2D Bar Code Reader (+1k3 code)
+// #define GM861_DECODE_AIM // Decode AIM-id (+0k3 code)
// -- Power monitoring sensors --------------------
#define USE_ENERGY_SENSOR // Add support for Energy Monitors (+14k code)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
index fe904430f..564bdcf83 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
@@ -36,6 +36,8 @@
#define XSNS_107 107
+//#define GM861_DECODE_AIM // Decode AIM-id (+0k3 code)
+
/*
#define GPIO_GM861_TX 304
#define D_SENSOR_GM861_TX "GM861 Tx"
@@ -95,6 +97,23 @@ struct GDK {
/*********************************************************************************************/
+#ifdef GM861_DECODE_AIM
+const char kGm861AIMID[] PROGMEM = "A1C0E0E4F0G0H1I0I1L0M1Q1R0S0X0X1X4X5d1emzm";
+const char kGm861AIM[] PROGMEM = "Code39|Code128|EAN13|EAN8|Codabar|Code93|Code11|I2of5|ITF|PDF417|MSIPlessey|QRCode|S2of5|D2of5|CnPost|M2of5|ISBN|ISSN|DMCode|GS1|Aztec";
+
+String Gm861AIMId2AIM(const char* aim_id) {
+ char aim_ids[sizeof(kGm861AIMID)];
+ strcpy_P(aim_ids, kGm861AIMID);
+ int index = (strstr(aim_ids, aim_id) -aim_ids) /2;
+ if (index < 0) { // Unknown
+ strcpy(aim_ids, aim_id); // Return AIM-id
+ } else {
+ GetTextIndexed(aim_ids, sizeof(aim_ids), index, kGm861AIM);
+ }
+ return aim_ids;
+}
+#endif // GM861_DECODE_AIM
+
uint32_t Gm861Crc(uint8_t* ptr, uint32_t len) {
// When no need for checking CRC, CRC byte can be filled in 0xAB 0xCD
uint32_t crc = 0;
@@ -197,16 +216,26 @@ void Gm861SerialInput(void) {
// 5D 45 30 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - AIM ]E0, Barcode 8711218972875
RemoveControlCharacter(buffer); // Remove control character (0x00 .. 0x1F and 0x7F)
uint32_t offset = 0;
- if (']' == buffer[0]) { // AIM code
+ char aim_id[3] = { 0 };
+ if (']' == buffer[0]) { // AIM code ]xy
offset = 3;
+ aim_id[0] = buffer[1];
+ aim_id[1] = buffer[2];
}
+
+ // Prepare GUI result
snprintf_P(Gm861.barcode, sizeof(Gm861.barcode) -3, PSTR("%s"), buffer + offset);
if (strlen(buffer) > sizeof(Gm861.barcode) -3) {
strcat(Gm861.barcode, "...");
}
+
ResponseTime_P(PSTR(",\"GM861\":{"));
if (offset) {
- ResponseAppend_P(PSTR("\"AIM\":\"%c%c\","), buffer[1], buffer[2]);
+#ifdef GM861_DECODE_AIM
+ ResponseAppend_P(PSTR("\"AIM\":\"%s\","), Gm861AIMId2AIM(aim_id).c_str());
+#else
+ ResponseAppend_P(PSTR("\"AIM\":\"%s\","), aim_id);
+#endif // GM861_DECODE_AIM
}
ResponseAppend_P(PSTR("\"Code\":\"%s\"}}"), buffer + offset);
MqttPublishTeleSensor();
From a46b926530616dd7f73ada91c50bb1d1f1c6ad4e Mon Sep 17 00:00:00 2001
From: gemu
Date: Sun, 7 May 2023 14:48:49 +0200
Subject: [PATCH 074/289] fix i2c touch init (#18594)
---
.../tasmota_xdsp_display/xdsp_17_universal.ino | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
index c784ed31c..5482183eb 100644
--- a/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
+++ b/tasmota/tasmota_xdsp_display/xdsp_17_universal.ino
@@ -175,11 +175,15 @@ int8_t cs;
replacepin(&cp, Pin(GPIO_OLED_RESET));
if (wire_n == 1) {
- I2cBegin(sda, scl);
+ if (!TasmotaGlobal.i2c_enabled) {
+ I2cBegin(sda, scl);
+ }
}
#ifdef ESP32
if (wire_n == 2) {
- I2c2Begin(sda, scl);
+ if (!TasmotaGlobal.i2c_enabled_2) {
+ I2c2Begin(sda, scl);
+ }
}
if (I2cSetDevice(i2caddr, wire_n - 1)) {
I2cSetActiveFound(i2caddr, "DSP-I2C", wire_n - 1);
@@ -333,11 +337,15 @@ int8_t cs;
}
if (wire_n == 0) {
- I2cBegin(sda, scl);
+ if (!TasmotaGlobal.i2c_enabled) {
+ I2cBegin(sda, scl);
+ }
}
#ifdef ESP32
if (wire_n == 1) {
- I2c2Begin(sda, scl, 400000);
+ if (!TasmotaGlobal.i2c_enabled_2) {
+ I2c2Begin(sda, scl, 400000);
+ }
}
if (I2cSetDevice(i2caddr, wire_n)) {
if (i2caddr == GT911_address) {
From eccc1af0a250e2ef9b593d1a9300713a4fd3bf08 Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sun, 7 May 2023 15:32:15 +0200
Subject: [PATCH 075/289] disable SHT pig on i2c / add missing GT911 defines
(#18595)
* disable SHT pig on i2c / add missing GT911
* GT911 missing in config
---
tasmota/include/tasmota_configurations_ESP32.h | 3 ++-
tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_display.ino | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h
index abdd66f7c..74108b8b1 100644
--- a/tasmota/include/tasmota_configurations_ESP32.h
+++ b/tasmota/include/tasmota_configurations_ESP32.h
@@ -306,6 +306,7 @@
#define SHOW_SPLASH
#define USE_XPT2046
#define USE_FT5206
+#define USE_GT911
#define USE_MPU_ACCEL
#define USE_RTC_CHIPS // Enable RTC chip support and NTP server - Select only one
#define USE_BM8563
@@ -357,7 +358,7 @@
#define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram)
#undef USE_MLX90614
-#define USE_SHT // [I2cDriver8] Enable SHT1X sensor (+1k4 code)
+//#define USE_SHT // [I2cDriver8] Enable SHT1X sensor (+1k4 code)
#define USE_HTU // [I2cDriver9] Enable HTU21/SI7013/SI7020/SI7021 sensor (I2C address 0x40) (+1k5 code)
#define USE_BMP // [I2cDriver10] Enable BMP085/BMP180/BMP280/BME280 sensors (I2C addresses 0x76 and 0x77) (+4k4 code)
// #define USE_BME68X // Enable support for BME680/BME688 sensor using Bosch BME68x library (+6k9 code)
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_display.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_display.ino
index ae8ec888f..a9dc76127 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_display.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_display.ino
@@ -73,7 +73,7 @@ int be_ntv_display_dimmer(struct bvm *vm) {
}
void be_ntv_display_touch_update(int32_t touches, int32_t raw_x, int32_t raw_y, int32_t gesture) {
-#if defined(USE_LVGL_TOUCHSCREEN) || defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_LILYGO47) || defined(USE_TOUCH_BUTTONS)
+#if defined(USE_LVGL_TOUCHSCREEN) || defined(USE_FT5206) || defined(USE_XPT2046) || defined(USE_GT911) || defined(USE_LILYGO47) || defined(USE_TOUCH_BUTTONS)
Touch_SetStatus(touches, raw_x, raw_y, gesture);
#endif
}
From 91523fd90b7b15abc510152f85188080a019aee6 Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sun, 7 May 2023 16:01:33 +0200
Subject: [PATCH 076/289] Add GM861 optional heartbeat
---
tasmota/my_user_config.h | 1 +
.../tasmota_xsns_sensor/xsns_107_gm861.ino | 92 ++++++++++++-------
2 files changed, 58 insertions(+), 35 deletions(-)
diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h
index 24184ee2c..df6d82b53 100644
--- a/tasmota/my_user_config.h
+++ b/tasmota/my_user_config.h
@@ -834,6 +834,7 @@
//#define USE_LOX_O2 // Add support for LuminOx LOX O2 Sensor (+0k8 code)
//#define USE_GM861 // Add support for GM861 1D and 2D Bar Code Reader (+1k3 code)
// #define GM861_DECODE_AIM // Decode AIM-id (+0k3 code)
+// #define GM861_HEARTBEAT // Enable heartbeat (+0k2 code)
// -- Power monitoring sensors --------------------
#define USE_ENERGY_SENSOR // Add support for Energy Monitors (+14k code)
diff --git a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
index 564bdcf83..356e7ef39 100644
--- a/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
+++ b/tasmota/tasmota_xsns_sensor/xsns_107_gm861.ino
@@ -34,9 +34,13 @@
* GM861Dump - Dump zone bytes 0 to 97 if logging level 4
\*********************************************************************************************/
-#define XSNS_107 107
+#define XSNS_107 107
//#define GM861_DECODE_AIM // Decode AIM-id (+0k3 code)
+//#define GM861_HEARTBEAT // Enable heartbeat
+
+#define GM861_BAUDRATE 9600 // Serial baudrate
+#define GM861_GUI_LENGTH 30 // Max number of code characters in GUI
/*
#define GPIO_GM861_TX 304
@@ -87,13 +91,14 @@ enum Gm861States {
#include
TasmotaSerial *Gm861Serial = nullptr;
-struct GDK {
- char barcode[30];
+typedef struct {
+ char barcode[GM861_GUI_LENGTH];
uint8_t index;
uint8_t state;
- bool heartbeat;
+ uint8_t heartbeat;
bool read;
-} Gm861;
+} tGm861;
+tGm861 *Gm861 = nullptr;
/*********************************************************************************************/
@@ -159,15 +164,15 @@ void Gm861Send(uint32_t type, uint32_t len, uint32_t address, uint32_t data) {
}
void Gm861SetZone(uint32_t address, uint32_t data) {
- Gm861.read = false;
+ Gm861->read = false;
uint32_t len = 1;
if (0x2A == address) { len = 2; } // Baudrate
Gm861Send(8, len, address, data);
}
void Gm861GetZone(uint32_t address) {
- Gm861.read = true;
- Gm861.index = address;
+ Gm861->read = true;
+ Gm861->index = address;
uint32_t data = 1;
if (0x2A == address) { data = 2; } // Baudrate
Gm861Send(7, 1, address, data);
@@ -196,20 +201,24 @@ void Gm861SerialInput(void) {
// 02 00 00 01 00 33 31 - Command acknowledge
// 02 00 00 01 01 23 10 - Command result (Zonebyte 96 - 0x60)
// 02 00 00 02 39 01 C1 4C - Command result (Zonebytes 42/43 - 0x2A)
- if (Gm861.read) {
+ if (Gm861->read) {
uint32_t result = buffer[4];
if (2 == buffer[3]) { // Length
result += (buffer[5] << 8);
}
- Gm861.read = false;
- Response_P(S_JSON_COMMAND_INDEX_NVALUE, PSTR("GM861Zone"), Gm861.index, result);
+ Gm861->read = false;
+ Response_P(S_JSON_COMMAND_INDEX_NVALUE, PSTR("GM861Zone"), Gm861->index, result);
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_STAT, PSTR("GM861Zone"));
}
}
else if (3 == buffer[0]) { // Heartbeat
// 03 00 00 01 00 33 31 - Heartbeat response
// 03 00 0A 30 33 32 31 35 36 33 38 34 30 - Scan response with zone byte 96 = 0x81
- Gm861.heartbeat = true;
+#ifdef GM861_HEARTBEAT
+ if ((0 == buffer[2]) && (1 == buffer[3]) && (0 == buffer[4])) {
+ Gm861->heartbeat = 0;
+ }
+#endif // GM861_HEARTBEAT
}
} else { // Bar code
// 38 37 31 31 32 31 38 39 37 32 38 37 35 0D - Barcode 8711218972875
@@ -224,9 +233,9 @@ void Gm861SerialInput(void) {
}
// Prepare GUI result
- snprintf_P(Gm861.barcode, sizeof(Gm861.barcode) -3, PSTR("%s"), buffer + offset);
- if (strlen(buffer) > sizeof(Gm861.barcode) -3) {
- strcat(Gm861.barcode, "...");
+ snprintf_P(Gm861->barcode, sizeof(Gm861->barcode) -3, PSTR("%s"), buffer + offset);
+ if (strlen(buffer) > sizeof(Gm861->barcode) -3) {
+ strcat(Gm861->barcode, "...");
}
ResponseTime_P(PSTR(",\"GM861\":{"));
@@ -246,14 +255,16 @@ void Gm861SerialInput(void) {
void Gm861Init(void) {
if (PinUsed(GPIO_GM861_RX) && PinUsed(GPIO_GM861_TX)) {
+ Gm861 = (tGm861*)calloc(sizeof(tGm861), 1);
+ if (!Gm861) { return; }
+
Gm861Serial = new TasmotaSerial(Pin(GPIO_GM861_RX), Pin(GPIO_GM861_TX), 1);
- if (Gm861Serial->begin(9600)) {
+ if (Gm861Serial->begin(GM861_BAUDRATE)) {
if (Gm861Serial->hardwareSerial()) {
ClaimSerial();
}
- Gm861.barcode[0] = '0'; // No barcode yet
- Gm861.state = GM861_STATE_INIT_OFFSET;
-// AddLog(LOG_LEVEL_INFO, PSTR("GM8: Connected"));
+ Gm861->barcode[0] = '0'; // No barcode yet
+ Gm861->state = GM861_STATE_INIT_OFFSET;
}
}
}
@@ -269,12 +280,12 @@ void Gm861StateMachine(void) {
Serial output:
14:39:04.887-027 DMP: 02 00 00 62 D6 00 20 01 00 0A 32 01 2C 00 87 3C 01 A0 1C 32 03 00 80 00 06 00 00 00 00 00 00 00 00 00 00 00 00 02 80 3C 00 00 00 06 00 00 39 01 05 64 0D 0D 0D 01 0D 01 04 80 09 04 80 05 04 80 01 04 80 01 08 04 80 08 04 80 08 04 80 08 04 80 08 01 80 00 00 00 04 80 01 01 00 00 00 00 04 80 00 00 03 00 01 00 2D 9E
*/
- if (!Gm861.state) { return; }
+ if (!Gm861->state) { return; }
- switch (Gm861.state) {
+ switch (Gm861->state) {
case GM861_STATE_RESET:
Gm861SetZone(0xD9, 0x50); // Factory reset
- Gm861.state = GM861_STATE_SETUP_CODE_ON +7; // Add time for reset to complete
+ Gm861->state = GM861_STATE_SETUP_CODE_ON +7; // Add time for reset to complete
break;
case GM861_STATE_SETUP_CODE_ON:
Gm861SetZone(0x00, 0xD6); // Set LED on, Mute off, Normal lighting, Normal brightness, Continuous mode (Default: setup code on)
@@ -290,9 +301,25 @@ void Gm861StateMachine(void) {
AddLog(LOG_LEVEL_INFO, PSTR("GM8: Initialized"));
break;
}
- Gm861.state--;
+ Gm861->state--;
}
+#ifdef GM861_HEARTBEAT
+void Gm861Heartbeat(void) {
+ if (!Gm861->state && (!(TasmotaGlobal.uptime % 10))) {
+ // It is recommended to send a heartbeat packet every 10 seconds
+ Gm861Send(10, 1, 0, 0); // Send heartbeat
+ Gm861->heartbeat++;
+ // If no correct reply is received for three consecutive times, the main control should be handle it accordingly.
+ if (Gm861->heartbeat > 3) {
+ AddLog(LOG_LEVEL_DEBUG, PSTR("GM8: Heartbeat lost"));
+ Gm861->heartbeat = 0;
+ Gm861->state = GM861_STATE_RESET;
+ }
+ }
+}
+#endif // GM861_HEARTBEAT
+
/*********************************************************************************************\
* Commands
\*********************************************************************************************/
@@ -326,7 +353,7 @@ void CmndGm816Save(void) {
void CmndGm816Reset(void) {
// GM861Reset 1 - Do factory reset and inititalize for serial comms
if (1 == XdrvMailbox.payload) {
- Gm861.state = GM861_STATE_RESET;
+ Gm861->state = GM861_STATE_RESET;
ResponseCmndDone();
}
}
@@ -337,16 +364,6 @@ void CmndGm816Dump(void) {
ResponseCmndDone();
}
-/*********************************************************************************************\
- * Presentation
-\*********************************************************************************************/
-
-#ifdef USE_WEBSERVER
-void Gm861Show(void) {
- WSContentSend_PD(PSTR("{s}GM816{m}%s{e}"), Gm861.barcode);
-}
-#endif // USE_WEBSERVER
-
/*********************************************************************************************\
Interface
\*********************************************************************************************/
@@ -366,9 +383,14 @@ bool Xsns107(uint32_t function) {
case FUNC_EVERY_250_MSECOND:
Gm861StateMachine();
break;
+#ifdef GM861_HEARTBEAT
+ case FUNC_EVERY_SECOND:
+ Gm861Heartbeat();
+ break;
+#endif // GM861_HEARTBEAT
#ifdef USE_WEBSERVER
case FUNC_WEB_SENSOR:
- Gm861Show();
+ WSContentSend_PD(PSTR("{s}GM816{m}%s{e}"), Gm861->barcode);
break;
#endif // USE_WEBSERVER
case FUNC_COMMAND:
From 519ea557c7f6a10b274391d828822a5e8b09e3d8 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sun, 7 May 2023 16:18:34 +0200
Subject: [PATCH 077/289] Berry `re` (regex) add `match2` and optional offset
(#18596)
---
CHANGELOG.md | 1 +
lib/libesp32/berry/default/be_re_lib.c | 74 ++++++++++++++++++++------
2 files changed, 60 insertions(+), 15 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f7f4d2f1..d08bad6d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
- ESP32 `Shuttersetup` for "Shelly 2.5 pro" automatic calibration and setup (experimental)
- Berry `tcpclientasync` class for non-blocking TCP client
- Support for GM861 1D and 2D bar code reader (#18399)
+- Berry `re` (regex) add `match2` and optional offset
### Breaking Changed
- Change command ``FileUpload`` index binary data detection from >199 to >299
diff --git a/lib/libesp32/berry/default/be_re_lib.c b/lib/libesp32/berry/default/be_re_lib.c
index 6bd116591..956757858 100644
--- a/lib/libesp32/berry/default/be_re_lib.c
+++ b/lib/libesp32/berry/default/be_re_lib.c
@@ -62,7 +62,7 @@ int be_re_compile(bvm *vm) {
// pushes either a list if matched, else `nil`
// return index of next offset, or -1 if not found
-const char *be_re_match_search_run(bvm *vm, ByteProg *code, const char *hay, bbool is_anchored) {
+const char *be_re_match_search_run(bvm *vm, ByteProg *code, const char *hay, bbool is_anchored, bbool size_only) {
Subject subj = {hay, hay + strlen(hay)};
int sub_els = (code->sub + 1) * 2;
@@ -80,7 +80,11 @@ const char *be_re_match_search_run(bvm *vm, ByteProg *code, const char *hay, bbo
if (sub[i] == nil || sub[i+1] == nil) {
be_pushnil(vm);
} else {
- be_pushnstring(vm, sub[i], sub[i+1] - sub[i]);
+ if (size_only && i==0) {
+ be_pushint(vm, sub[i+1] - sub[i]);
+ } else {
+ be_pushnstring(vm, sub[i], sub[i+1] - sub[i]);
+ }
}
be_data_push(vm, -2);
be_pop(vm, 1);
@@ -89,11 +93,20 @@ const char *be_re_match_search_run(bvm *vm, ByteProg *code, const char *hay, bbo
return sub[1];
}
-int be_re_match_search(bvm *vm, bbool is_anchored) {
+int be_re_match_search(bvm *vm, bbool is_anchored, bbool size_only) {
int32_t argc = be_top(vm); // Get the number of arguments
if (argc >= 2 && be_isstring(vm, 1) && be_isstring(vm, 2)) {
const char * regex_str = be_tostring(vm, 1);
const char * hay = be_tostring(vm, 2);
+ int32_t offset = 0;
+ if (argc >= 3 && be_isint(vm, 3)) {
+ offset = be_toint(vm, 3);
+ }
+ int32_t hay_len = strlen(hay);
+ if (offset < 0) { offset = 0; }
+ if (offset >= hay_len) { be_return_nil(vm); } // any match of empty string returns nil, this catches implicitly when hay_len == 0
+ hay += offset; // shift to offset
+
int sz = re1_5_sizecode(regex_str);
if (sz < 0) {
be_raise(vm, "internal_error", "error in regex");
@@ -104,7 +117,7 @@ int be_re_match_search(bvm *vm, bbool is_anchored) {
if (ret != 0) {
be_raise(vm, "internal_error", "error in regex");
}
- be_re_match_search_run(vm, code, hay, is_anchored);
+ be_re_match_search_run(vm, code, hay, is_anchored, size_only);
be_return(vm);
}
be_raise(vm, "type_error", NULL);
@@ -132,7 +145,7 @@ int be_re_match_search_all(bvm *vm, bbool is_anchored) {
be_newobject(vm, "list");
for (int i = limit; i != 0 && hay != NULL; i--) {
- hay = be_re_match_search_run(vm, code, hay, is_anchored);
+ hay = be_re_match_search_run(vm, code, hay, is_anchored, bfalse);
if (hay != NULL) {
be_data_push(vm, -2); // add sub list to list
}
@@ -144,13 +157,17 @@ int be_re_match_search_all(bvm *vm, bbool is_anchored) {
be_raise(vm, "type_error", NULL);
}
-// Berry: `re.match(value:int | s:string) -> nil`
+// Berry: `re.match(s:string [, offset:int]) -> nil`
int be_re_match(bvm *vm) {
- return be_re_match_search(vm, btrue);
+ return be_re_match_search(vm, btrue, bfalse);
}
-// Berry: `re.search(value:int | s:string) -> nil`
+// Berry: `re.match2(s:string [, offset:int]) -> nil`
+int be_re_match2(bvm *vm) {
+ return be_re_match_search(vm, btrue, btrue);
+}
+// Berry: `re.search(s:string [, offset:int]) -> nil`
int be_re_search(bvm *vm) {
- return be_re_match_search(vm, bfalse);
+ return be_re_match_search(vm, bfalse, bfalse);
}
// Berry: `re.search_all`
@@ -162,14 +179,22 @@ int be_re_search_all(bvm *vm) {
return be_re_match_search_all(vm, bfalse);
}
-// Berry: `re_pattern.search(s:string) -> list(string)`
+// Berry: `re_pattern.search(s:string [, offset:int]) -> list(string)`
int re_pattern_search(bvm *vm) {
int32_t argc = be_top(vm); // Get the number of arguments
if (argc >= 2 && be_isstring(vm, 2)) {
const char * hay = be_tostring(vm, 2);
+ int32_t offset = 0;
+ if (argc >= 3 && be_isint(vm, 3)) {
+ offset = be_toint(vm, 3);
+ }
+ int32_t hay_len = strlen(hay);
+ if (offset < 0) { offset = 0; }
+ if (offset >= hay_len) { be_return_nil(vm); } // any match of empty string returns nil, this catches implicitly when hay_len == 0
+ hay += offset; // shift to offset
be_getmember(vm, 1, "_p");
ByteProg * code = (ByteProg*) be_tocomptr(vm, -1);
- be_re_match_search_run(vm, code, hay, bfalse);
+ be_re_match_search_run(vm, code, hay, bfalse, bfalse);
be_return(vm);
}
be_raise(vm, "type_error", NULL);
@@ -189,7 +214,7 @@ int re_pattern_match_search_all(bvm *vm, bbool is_anchored) {
be_newobject(vm, "list");
for (int i = limit; i != 0 && hay != NULL; i--) {
- hay = be_re_match_search_run(vm, code, hay, is_anchored);
+ hay = be_re_match_search_run(vm, code, hay, is_anchored, bfalse);
if (hay != NULL) {
be_data_push(vm, -2); // add sub list to list
}
@@ -211,19 +236,36 @@ int re_pattern_match_all(bvm *vm) {
return re_pattern_match_search_all(vm, btrue);
}
-// Berry: `re_pattern.match(s:string) -> list(string)`
-int re_pattern_match(bvm *vm) {
+// Berry: `re_pattern.match(s:string [, offset:int]) -> list(string)`
+int re_pattern_match_size(bvm *vm, bbool size_only) {
int32_t argc = be_top(vm); // Get the number of arguments
if (argc >= 2 && be_isstring(vm, 2)) {
const char * hay = be_tostring(vm, 2);
+ int32_t offset = 0;
+ if (argc >= 3 && be_isint(vm, 3)) {
+ offset = be_toint(vm, 3);
+ }
+ int32_t hay_len = strlen(hay);
+ if (offset < 0) { offset = 0; }
+ if (offset >= hay_len) { be_return_nil(vm); } // any match of empty string returns nil, this catches implicitly when hay_len == 0
+ hay += offset; // shift to offset
be_getmember(vm, 1, "_p");
ByteProg * code = (ByteProg*) be_tocomptr(vm, -1);
- be_re_match_search_run(vm, code, hay, btrue);
+ be_re_match_search_run(vm, code, hay, btrue, size_only);
be_return(vm);
}
be_raise(vm, "type_error", NULL);
}
+// Berry: `re_pattern.match(s:string [, offset:int]) -> list(string)`
+int re_pattern_match(bvm *vm) {
+ return re_pattern_match_size(vm, bfalse);
+}
+
+// Berry: `re_pattern.match(s:string [, offset:int]) -> list(string)`
+int re_pattern_match2(bvm *vm) {
+ return re_pattern_match_size(vm, btrue);
+}
int re_pattern_split_run(bvm *vm, ByteProg *code, const char *hay, int split_limit) {
Subject subj = {hay, hay + strlen(hay)};
@@ -304,6 +346,7 @@ module re (scope: global) {
search, func(be_re_search)
searchall, func(be_re_search_all)
match, func(be_re_match)
+ match2, func(be_re_match2)
matchall, func(be_re_match_all)
split, func(be_re_split)
}
@@ -315,6 +358,7 @@ class be_class_re_pattern (scope: global, name: re_pattern) {
search, func(re_pattern_search)
searchall, func(re_pattern_search_all)
match, func(re_pattern_match)
+ match2, func(re_pattern_match2)
matchall, func(re_pattern_match_all)
split, func(re_pattern_split)
}
From da5396a080bf46a182704ca5a101addf5d2cfedb Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Sun, 7 May 2023 17:25:18 +0200
Subject: [PATCH 078/289] Add filesystem size to esp8266 GUI
---
tasmota/language/af_AF.h | 1 +
tasmota/language/bg_BG.h | 1 +
tasmota/language/ca_AD.h | 1 +
tasmota/language/cs_CZ.h | 1 +
tasmota/language/de_DE.h | 1 +
tasmota/language/el_GR.h | 1 +
tasmota/language/en_GB.h | 1 +
tasmota/language/es_ES.h | 1 +
tasmota/language/fr_FR.h | 1 +
tasmota/language/fy_NL.h | 1 +
tasmota/language/he_HE.h | 1 +
tasmota/language/hu_HU.h | 1 +
tasmota/language/it_IT.h | 1 +
tasmota/language/ko_KO.h | 1 +
tasmota/language/nl_NL.h | 1 +
tasmota/language/pl_PL.h | 1 +
tasmota/language/pt_BR.h | 1 +
tasmota/language/pt_PT.h | 1 +
tasmota/language/ro_RO.h | 1 +
tasmota/language/ru_RU.h | 1 +
tasmota/language/sk_SK.h | 1 +
tasmota/language/sv_SE.h | 1 +
tasmota/language/tr_TR.h | 1 +
tasmota/language/uk_UA.h | 1 +
tasmota/language/vi_VN.h | 1 +
tasmota/language/zh_CN.h | 1 +
tasmota/language/zh_TW.h | 1 +
tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino | 8 ++++++--
tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino | 8 ++++++++
29 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h
index f63671846..f3df5343f 100644
--- a/tasmota/language/af_AF.h
+++ b/tasmota/language/af_AF.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Terugval onderwerp"
#define D_FALSE "Onwaar"
#define D_FILE "Lêer"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Vloeitempo"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h
index 672d88b93..880777669 100644
--- a/tasmota/language/bg_BG.h
+++ b/tasmota/language/bg_BG.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Резервна тема"
#define D_FALSE "Невярно"
#define D_FILE "Файл"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Дебит"
#define D_FRAGMENTATION "фраг." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Кадъра в секунда"
diff --git a/tasmota/language/ca_AD.h b/tasmota/language/ca_AD.h
index 277902023..ef786b868 100644
--- a/tasmota/language/ca_AD.h
+++ b/tasmota/language/ca_AD.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Tema de recuperació"
#define D_FALSE "Fals"
#define D_FILE "Arxiu"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Cabal"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h
index e42c875de..863ab0786 100644
--- a/tasmota/language/cs_CZ.h
+++ b/tasmota/language/cs_CZ.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Záložní topic"
#define D_FALSE "Nepravda"
#define D_FILE "Soubor"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h
index 408408245..a43e36587 100644
--- a/tasmota/language/de_DE.h
+++ b/tasmota/language/de_DE.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback-Topic"
#define D_FALSE "falsch"
#define D_FILE "Datei"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Durchflussmenge"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h
index a359d49dd..d25e8c307 100644
--- a/tasmota/language/el_GR.h
+++ b/tasmota/language/el_GR.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "Ψευδές"
#define D_FILE "Αρχείο"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h
index b746c0634..416fc3c03 100644
--- a/tasmota/language/en_GB.h
+++ b/tasmota/language/en_GB.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "False"
#define D_FILE "File"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h
index 26dd59688..1e8632008 100644
--- a/tasmota/language/es_ES.h
+++ b/tasmota/language/es_ES.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "FallbackTopic"
#define D_FALSE "Falso"
#define D_FILE "Archivo"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Caudal"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h
index ae600b589..0f62d1571 100644
--- a/tasmota/language/fr_FR.h
+++ b/tasmota/language/fr_FR.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Topic de secours"
#define D_FALSE "Faux"
#define D_FILE "Fichier"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Débit"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Fréq. image"
diff --git a/tasmota/language/fy_NL.h b/tasmota/language/fy_NL.h
index 0ef74fdb6..7c3955dac 100644
--- a/tasmota/language/fy_NL.h
+++ b/tasmota/language/fy_NL.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Underwerp"
#define D_FALSE "Falsk"
#define D_FILE "Bestân"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Stromingssnelheid"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h
index c1d13b7bc..39daf879e 100644
--- a/tasmota/language/he_HE.h
+++ b/tasmota/language/he_HE.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "נושא לחזרה"
#define D_FALSE "שגוי"
#define D_FILE "קובץ"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h
index 71540307b..bb0e6b211 100644
--- a/tasmota/language/hu_HU.h
+++ b/tasmota/language/hu_HU.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "fallback topik"
#define D_FALSE "Hamis"
#define D_FILE "Fájl"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Átfolyás ráta"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h
index 2690363bb..a5378c52a 100644
--- a/tasmota/language/it_IT.h
+++ b/tasmota/language/it_IT.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Topic Riserva"
#define D_FALSE "Falso"
#define D_FILE "File"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flusso dati"
#define D_FRAGMENTATION "framm." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frequenza fotogrammi"
diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h
index 4f941a3b8..c5db16e45 100644
--- a/tasmota/language/ko_KO.h
+++ b/tasmota/language/ko_KO.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "거짓"
#define D_FILE "파일"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h
index 05f85db2b..4ab10ce0e 100644
--- a/tasmota/language/nl_NL.h
+++ b/tasmota/language/nl_NL.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "Onwaar"
#define D_FILE "Bestand"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Debiet"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h
index 4444de792..db8330800 100644
--- a/tasmota/language/pl_PL.h
+++ b/tasmota/language/pl_PL.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Temat zastępczy"
#define D_FALSE "Fałsz"
#define D_FILE "Plik"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Przepływ"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h
index ea04901c7..b4b32eeb1 100644
--- a/tasmota/language/pt_BR.h
+++ b/tasmota/language/pt_BR.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Tópico para retornar"
#define D_FALSE "Falso"
#define D_FILE "Arquivo"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Quociente de vazão"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h
index 3377d7d72..8d22afd35 100644
--- a/tasmota/language/pt_PT.h
+++ b/tasmota/language/pt_PT.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Tópico de contingência"
#define D_FALSE "Falso"
#define D_FILE "Ficheiro"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Taxa de Fluxo"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h
index c97bc649a..ddb93ccc6 100644
--- a/tasmota/language/ro_RO.h
+++ b/tasmota/language/ro_RO.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Listă de rezervă"
#define D_FALSE "Fals"
#define D_FILE "Fișier"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Debit"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h
index 6e9bbe95d..655778364 100644
--- a/tasmota/language/ru_RU.h
+++ b/tasmota/language/ru_RU.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Топик обратной связи"
#define D_FALSE "Ложно"
#define D_FILE "Файл"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h
index 679abff2e..bcb03e92d 100644
--- a/tasmota/language/sk_SK.h
+++ b/tasmota/language/sk_SK.h
@@ -80,6 +80,7 @@
#define D_CURRENT "Prúd" // As in Voltage and Current
#define D_CURRENT_NEUTRAL "Current Neutral"
#define D_DATA "Dáta"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_DARKLIGHT "Tmavý"
#define D_DEBUG "Debug"
diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h
index 0c3c896fe..7555763c0 100644
--- a/tasmota/language/sv_SE.h
+++ b/tasmota/language/sv_SE.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Reservämne"
#define D_FALSE "Falskt"
#define D_FILE "Fil"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h
index bc62a9ff5..36b763a07 100644
--- a/tasmota/language/tr_TR.h
+++ b/tasmota/language/tr_TR.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Geri İletim Topiği"
#define D_FALSE "False"
#define D_FILE "Dosya"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h
index d0664f542..0023f5c34 100644
--- a/tasmota/language/uk_UA.h
+++ b/tasmota/language/uk_UA.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Запасний топік"
#define D_FALSE "Ні"
#define D_FILE "Файл"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Потік"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h
index 74e8398a2..11f293b03 100644
--- a/tasmota/language/vi_VN.h
+++ b/tasmota/language/vi_VN.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "Sai"
#define D_FILE "Tệp"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Tốc độ dòng"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h
index b4fa7c00e..ea316b48d 100644
--- a/tasmota/language/zh_CN.h
+++ b/tasmota/language/zh_CN.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "回退主题"
#define D_FALSE "False"
#define D_FILE "文件:"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "Flow rate"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h
index a5611d532..62b656086 100644
--- a/tasmota/language/zh_TW.h
+++ b/tasmota/language/zh_TW.h
@@ -104,6 +104,7 @@
#define D_FALLBACK_TOPIC "Fallback Topic"
#define D_FALSE "假"
#define D_FILE "檔案:"
+#define D_FILE_SYSTEM_SIZE "File System Size"
#define D_FLOW_RATE "流量"
#define D_FRAGMENTATION "frag." // Lower case abbreviated version of fragmentation used in "memory fragmentation"
#define D_FRAME_RATE "Frame rate"
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
index 7c8300cb7..01de3fe42 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino
@@ -2508,9 +2508,13 @@ void HandleInformation(void)
}
}
esp_partition_iterator_release(it);
-#else // ESP32
+#else // not ESP32
WSContentSend_PD(PSTR("}1" D_FREE_MEMORY "}2%1_f KB"), &freemem);
-#endif // ESP32
+#ifdef USE_UFILESYS
+ WSContentSend_P(PSTR("}1}2 ")); // Empty line
+ WSContentSend_P(PSTR("}1" D_FILE_SYSTEM_SIZE "}2%d KB"), UfsSize());
+#endif // USE_UFILESYS
+#endif // ESP32
WSContentSend_P(PSTR(" "));
WSContentSend_P(HTTP_SCRIPT_INFO_END);
diff --git a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino
index dce7fdee1..e61a22535 100644
--- a/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino
+++ b/tasmota/tasmota_xdrv_driver/xdrv_50_filesystem.ino
@@ -267,6 +267,14 @@ uint32_t UfsInfo(uint32_t sel, uint32_t type) {
return result / 1024;
}
+uint32_t UfsSize(void) {
+ return UfsInfo(0, ufs_dir == 2 ? 1:0);
+}
+
+uint32_t UfsFree(void) {
+ return UfsInfo(1, ufs_dir == 2 ? 1:0);
+}
+
#if USE_LONG_FILE_NAMES>0
#undef REJCMPL
#define REJCMPL 6
From 4a85ac5f1903e617be237f68a4689eef006a6167 Mon Sep 17 00:00:00 2001
From: stefanbode
Date: Sun, 7 May 2023 17:53:38 +0200
Subject: [PATCH 079/289] Matter TiltSupport fixes (#18598)
* Tilt bugfix
- enabled negative tilt values in tilt_min
- fix scale to 10.000
* Update solidified_Matter_Plugin_ShutterTilt.h
* Update solidified_Matter_TLV.h
---
.../src/embedded/Matter_Plugin_ShutterTilt.be | 6 +-
.../solidified_Matter_Plugin_ShutterTilt.h | 284 ++++++++++--------
.../src/solidify/solidified_Matter_TLV.h | 22 +-
3 files changed, 167 insertions(+), 145 deletions(-)
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
index c181cff36..8c99aab51 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_ShutterTilt.be
@@ -110,14 +110,14 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
elif attribute == 0x000F # ---------- CurrentPositionTiltPercent100ths / u8 ----------
self.update_tilt_min_max()
if self.tilt_min != nil && self.tilt_max != nil
- var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt, self.tilt_min, self.tilt_max, 0, 1000)
+ var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt - self.tilt_min, 0, self.tilt_max - self.tilt_min, 0, 10000)
return TLV.create_TLV(TLV.U2, tilt_percentage)
else
return TLV.create_TLV(TLV.NULL, nil) # return invalid
end
elif attribute == 0x000C # ---------- TargetPositionTiltPercent100ths / u16 ----------
if self.tilt_min != nil && self.tilt_max != nil
- var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt, self.tilt_min, self.tilt_max, 0, 1000)
+ var tilt_percentage = tasmota.scale_uint(self.shadow_shutter_tilt - self.tilt_min, 0, self.tilt_max - self.tilt_min, 0, 10000)
return TLV.create_TLV(TLV.U2, tilt_percentage)
else
return TLV.create_TLV(TLV.NULL, nil) # return invalid
@@ -150,7 +150,7 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
if tilt != nil
self.update_tilt_min_max()
if self.tilt_min != nil && self.tilt_max != nil
- var tilt_val = tasmota.scale_uint(tilt, 0, 1000, self.tilt_min, self.tilt_max)
+ var tilt_val = self.tilt_min + tasmota.scale_uint(tilt, 0, 10000, 0, self.tilt_max - self.tilt_min)
tasmota.cmd("ShutterTilt"+str(self.tasmota_shutter_index+1) + " " + str(tilt_val), false) # TODO
self.update_shadow()
ctx.log = "tilt%:"+str(tilt)
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
index 9e22968e0..99038f799 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_ShutterTilt.h
@@ -81,7 +81,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max, /* name */
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
be_nested_proto(
- 16, /* nstack */
+ 18, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@@ -116,7 +116,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
- ( &(const binstruction[75]) { /* code */
+ ( &(const binstruction[79]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
@@ -124,74 +124,78 @@ be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220101, // 0005 LDINT R8 258
0x1C200C08, // 0006 EQ R8 R6 R8
- 0x78220039, // 0007 JMPF R8 #0042
+ 0x7822003D, // 0007 JMPF R8 #0046
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220007, // 000A LDINT R8 8
0x1C200E08, // 000B EQ R8 R7 R8
- 0x78220034, // 000C JMPF R8 #0042
+ 0x78220038, // 000C JMPF R8 #0046
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x4C240000, // 0010 LDNIL R9
0x20241009, // 0011 NE R9 R8 R9
- 0x7826002C, // 0012 JMPF R9 #0040
+ 0x78260030, // 0012 JMPF R9 #0044
0x8C240108, // 0013 GETMET R9 R0 K8
0x7C240200, // 0014 CALL R9 1
0x88240109, // 0015 GETMBR R9 R0 K9
0x4C280000, // 0016 LDNIL R10
0x2024120A, // 0017 NE R9 R9 R10
- 0x78260021, // 0018 JMPF R9 #003B
+ 0x78260025, // 0018 JMPF R9 #003F
0x8824010A, // 0019 GETMBR R9 R0 K10
0x4C280000, // 001A LDNIL R10
0x2024120A, // 001B NE R9 R9 R10
- 0x7826001D, // 001C JMPF R9 #003B
- 0xB8261600, // 001D GETNGBL R9 K11
- 0x8C24130C, // 001E GETMET R9 R9 K12
- 0x5C2C1000, // 001F MOVE R11 R8
- 0x58300007, // 0020 LDCONST R12 K7
- 0x543603E7, // 0021 LDINT R13 1000
- 0x88380109, // 0022 GETMBR R14 R0 K9
- 0x883C010A, // 0023 GETMBR R15 R0 K10
- 0x7C240C00, // 0024 CALL R9 6
- 0xB82A1600, // 0025 GETNGBL R10 K11
- 0x8C28150D, // 0026 GETMET R10 R10 K13
- 0x60300008, // 0027 GETGBL R12 G8
- 0x8834010F, // 0028 GETMBR R13 R0 K15
- 0x00341B10, // 0029 ADD R13 R13 K16
- 0x7C300200, // 002A CALL R12 1
- 0x00321C0C, // 002B ADD R12 K14 R12
- 0x00301911, // 002C ADD R12 R12 K17
- 0x60340008, // 002D GETGBL R13 G8
- 0x5C381200, // 002E MOVE R14 R9
- 0x7C340200, // 002F CALL R13 1
- 0x0030180D, // 0030 ADD R12 R12 R13
- 0x50340000, // 0031 LDBOOL R13 0 0
- 0x7C280600, // 0032 CALL R10 3
- 0x8C280112, // 0033 GETMET R10 R0 K18
- 0x7C280200, // 0034 CALL R10 1
- 0x60280008, // 0035 GETGBL R10 G8
- 0x5C2C1000, // 0036 MOVE R11 R8
- 0x7C280200, // 0037 CALL R10 1
- 0x002A280A, // 0038 ADD R10 K20 R10
- 0x900E260A, // 0039 SETMBR R3 K19 R10
- 0x70020004, // 003A JMP #0040
- 0x60240008, // 003B GETGBL R9 G8
- 0x5C281000, // 003C MOVE R10 R8
- 0x7C240200, // 003D CALL R9 1
- 0x00262A09, // 003E ADD R9 K21 R9
- 0x900E2609, // 003F SETMBR R3 K19 R9
- 0x50240200, // 0040 LDBOOL R9 1 0
- 0x80041200, // 0041 RET 1 R9
- 0x60200003, // 0042 GETGBL R8 G3
- 0x5C240000, // 0043 MOVE R9 R0
- 0x7C200200, // 0044 CALL R8 1
- 0x8C201116, // 0045 GETMET R8 R8 K22
- 0x5C280200, // 0046 MOVE R10 R1
- 0x5C2C0400, // 0047 MOVE R11 R2
- 0x5C300600, // 0048 MOVE R12 R3
- 0x7C200800, // 0049 CALL R8 4
- 0x80041000, // 004A RET 1 R8
+ 0x78260021, // 001C JMPF R9 #003F
+ 0x88240109, // 001D GETMBR R9 R0 K9
+ 0xB82A1600, // 001E GETNGBL R10 K11
+ 0x8C28150C, // 001F GETMET R10 R10 K12
+ 0x5C301000, // 0020 MOVE R12 R8
+ 0x58340007, // 0021 LDCONST R13 K7
+ 0x543A270F, // 0022 LDINT R14 10000
+ 0x583C0007, // 0023 LDCONST R15 K7
+ 0x8840010A, // 0024 GETMBR R16 R0 K10
+ 0x88440109, // 0025 GETMBR R17 R0 K9
+ 0x04402011, // 0026 SUB R16 R16 R17
+ 0x7C280C00, // 0027 CALL R10 6
+ 0x0024120A, // 0028 ADD R9 R9 R10
+ 0xB82A1600, // 0029 GETNGBL R10 K11
+ 0x8C28150D, // 002A GETMET R10 R10 K13
+ 0x60300008, // 002B GETGBL R12 G8
+ 0x8834010F, // 002C GETMBR R13 R0 K15
+ 0x00341B10, // 002D ADD R13 R13 K16
+ 0x7C300200, // 002E CALL R12 1
+ 0x00321C0C, // 002F ADD R12 K14 R12
+ 0x00301911, // 0030 ADD R12 R12 K17
+ 0x60340008, // 0031 GETGBL R13 G8
+ 0x5C381200, // 0032 MOVE R14 R9
+ 0x7C340200, // 0033 CALL R13 1
+ 0x0030180D, // 0034 ADD R12 R12 R13
+ 0x50340000, // 0035 LDBOOL R13 0 0
+ 0x7C280600, // 0036 CALL R10 3
+ 0x8C280112, // 0037 GETMET R10 R0 K18
+ 0x7C280200, // 0038 CALL R10 1
+ 0x60280008, // 0039 GETGBL R10 G8
+ 0x5C2C1000, // 003A MOVE R11 R8
+ 0x7C280200, // 003B CALL R10 1
+ 0x002A280A, // 003C ADD R10 K20 R10
+ 0x900E260A, // 003D SETMBR R3 K19 R10
+ 0x70020004, // 003E JMP #0044
+ 0x60240008, // 003F GETGBL R9 G8
+ 0x5C281000, // 0040 MOVE R10 R8
+ 0x7C240200, // 0041 CALL R9 1
+ 0x00262A09, // 0042 ADD R9 K21 R9
+ 0x900E2609, // 0043 SETMBR R3 K19 R9
+ 0x50240200, // 0044 LDBOOL R9 1 0
+ 0x80041200, // 0045 RET 1 R9
+ 0x60200003, // 0046 GETGBL R8 G3
+ 0x5C240000, // 0047 MOVE R9 R0
+ 0x7C200200, // 0048 CALL R8 1
+ 0x8C201116, // 0049 GETMET R8 R8 K22
+ 0x5C280200, // 004A MOVE R10 R1
+ 0x5C2C0400, // 004B MOVE R11 R2
+ 0x5C300600, // 004C MOVE R12 R3
+ 0x7C200800, // 004D CALL R8 4
+ 0x80041000, // 004E RET 1 R8
})
)
);
@@ -211,7 +215,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[21]) { /* constants */
+ ( &(const bvalue[24]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
@@ -228,15 +232,18 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
/* K13 */ be_nested_str_weak(scale_uint),
/* K14 */ be_nested_str_weak(shadow_shutter_tilt),
/* K15 */ be_const_int(0),
- /* K16 */ be_nested_str_weak(U2),
- /* K17 */ be_nested_str_weak(NULL),
- /* K18 */ be_nested_str_weak(U4),
- /* K19 */ be_const_int(3),
- /* K20 */ be_nested_str_weak(read_attribute),
+ /* K16 */ be_nested_str_weak(log),
+ /* K17 */ be_nested_str_weak(format),
+ /* K18 */ be_nested_str_weak(MATTER_X3A_X20new_X20percent_X20_X25d),
+ /* K19 */ be_nested_str_weak(U2),
+ /* K20 */ be_nested_str_weak(NULL),
+ /* K21 */ be_nested_str_weak(U4),
+ /* K22 */ be_const_int(3),
+ /* K23 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[105]) { /* code */
+ ( &(const binstruction[120]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@@ -244,7 +251,7 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0x88180504, // 0004 GETMBR R6 R2 K4
0x541E0101, // 0005 LDINT R7 258
0x1C1C0A07, // 0006 EQ R7 R5 R7
- 0x781E0058, // 0007 JMPF R7 #0061
+ 0x781E0067, // 0007 JMPF R7 #0070
0x8C1C0105, // 0008 GETMET R7 R0 K5
0x7C1C0200, // 0009 CALL R7 1
0x541E0006, // 000A LDINT R7 7
@@ -258,90 +265,105 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
0x0028140B, // 0012 ADD R10 R10 R11
0x7C1C0600, // 0013 CALL R7 3
0x80040E00, // 0014 RET 1 R7
- 0x7002004A, // 0015 JMP #0061
+ 0x70020059, // 0015 JMP #0070
0x541E000E, // 0016 LDINT R7 15
0x1C1C0C07, // 0017 EQ R7 R6 R7
- 0x781E001D, // 0018 JMPF R7 #0037
+ 0x781E0028, // 0018 JMPF R7 #0042
0x8C1C0109, // 0019 GETMET R7 R0 K9
0x7C1C0200, // 001A CALL R7 1
0x881C010A, // 001B GETMBR R7 R0 K10
0x4C200000, // 001C LDNIL R8
0x201C0E08, // 001D NE R7 R7 R8
- 0x781E0011, // 001E JMPF R7 #0031
+ 0x781E001C, // 001E JMPF R7 #003C
0x881C010B, // 001F GETMBR R7 R0 K11
0x4C200000, // 0020 LDNIL R8
0x201C0E08, // 0021 NE R7 R7 R8
- 0x781E000D, // 0022 JMPF R7 #0031
+ 0x781E0018, // 0022 JMPF R7 #003C
0xB81E1800, // 0023 GETNGBL R7 K12
0x8C1C0F0D, // 0024 GETMET R7 R7 K13
0x8824010E, // 0025 GETMBR R9 R0 K14
0x8828010A, // 0026 GETMBR R10 R0 K10
- 0x882C010B, // 0027 GETMBR R11 R0 K11
- 0x5830000F, // 0028 LDCONST R12 K15
- 0x543603E7, // 0029 LDINT R13 1000
- 0x7C1C0C00, // 002A CALL R7 6
- 0x8C200906, // 002B GETMET R8 R4 K6
- 0x88280910, // 002C GETMBR R10 R4 K16
- 0x5C2C0E00, // 002D MOVE R11 R7
- 0x7C200600, // 002E CALL R8 3
- 0x80041000, // 002F RET 1 R8
- 0x70020004, // 0030 JMP #0036
- 0x8C1C0906, // 0031 GETMET R7 R4 K6
- 0x88240911, // 0032 GETMBR R9 R4 K17
- 0x4C280000, // 0033 LDNIL R10
- 0x7C1C0600, // 0034 CALL R7 3
- 0x80040E00, // 0035 RET 1 R7
- 0x70020029, // 0036 JMP #0061
- 0x541E000B, // 0037 LDINT R7 12
- 0x1C1C0C07, // 0038 EQ R7 R6 R7
- 0x781E001B, // 0039 JMPF R7 #0056
- 0x881C010A, // 003A GETMBR R7 R0 K10
- 0x4C200000, // 003B LDNIL R8
- 0x201C0E08, // 003C NE R7 R7 R8
- 0x781E0011, // 003D JMPF R7 #0050
- 0x881C010B, // 003E GETMBR R7 R0 K11
- 0x4C200000, // 003F LDNIL R8
- 0x201C0E08, // 0040 NE R7 R7 R8
- 0x781E000D, // 0041 JMPF R7 #0050
- 0xB81E1800, // 0042 GETNGBL R7 K12
- 0x8C1C0F0D, // 0043 GETMET R7 R7 K13
- 0x8824010E, // 0044 GETMBR R9 R0 K14
- 0x8828010A, // 0045 GETMBR R10 R0 K10
- 0x882C010B, // 0046 GETMBR R11 R0 K11
- 0x5830000F, // 0047 LDCONST R12 K15
- 0x543603E7, // 0048 LDINT R13 1000
- 0x7C1C0C00, // 0049 CALL R7 6
- 0x8C200906, // 004A GETMET R8 R4 K6
- 0x88280910, // 004B GETMBR R10 R4 K16
- 0x5C2C0E00, // 004C MOVE R11 R7
- 0x7C200600, // 004D CALL R8 3
- 0x80041000, // 004E RET 1 R8
- 0x70020004, // 004F JMP #0055
- 0x8C1C0906, // 0050 GETMET R7 R4 K6
- 0x88240911, // 0051 GETMBR R9 R4 K17
- 0x4C280000, // 0052 LDNIL R10
- 0x7C1C0600, // 0053 CALL R7 3
- 0x80040E00, // 0054 RET 1 R7
- 0x7002000A, // 0055 JMP #0061
- 0x541EFFFB, // 0056 LDINT R7 65532
- 0x1C1C0C07, // 0057 EQ R7 R6 R7
- 0x781E0007, // 0058 JMPF R7 #0061
- 0x8C1C0906, // 0059 GETMET R7 R4 K6
- 0x88240912, // 005A GETMBR R9 R4 K18
- 0x542A0003, // 005B LDINT R10 4
- 0x002A260A, // 005C ADD R10 K19 R10
- 0x542E000F, // 005D LDINT R11 16
- 0x0028140B, // 005E ADD R10 R10 R11
- 0x7C1C0600, // 005F CALL R7 3
- 0x80040E00, // 0060 RET 1 R7
- 0x601C0003, // 0061 GETGBL R7 G3
- 0x5C200000, // 0062 MOVE R8 R0
- 0x7C1C0200, // 0063 CALL R7 1
- 0x8C1C0F14, // 0064 GETMET R7 R7 K20
- 0x5C240200, // 0065 MOVE R9 R1
- 0x5C280400, // 0066 MOVE R10 R2
- 0x7C1C0600, // 0067 CALL R7 3
- 0x80040E00, // 0068 RET 1 R7
+ 0x0424120A, // 0027 SUB R9 R9 R10
+ 0x5828000F, // 0028 LDCONST R10 K15
+ 0x882C010B, // 0029 GETMBR R11 R0 K11
+ 0x8830010A, // 002A GETMBR R12 R0 K10
+ 0x042C160C, // 002B SUB R11 R11 R12
+ 0x5830000F, // 002C LDCONST R12 K15
+ 0x5436270F, // 002D LDINT R13 10000
+ 0x7C1C0C00, // 002E CALL R7 6
+ 0xB8221800, // 002F GETNGBL R8 K12
+ 0x8C201110, // 0030 GETMET R8 R8 K16
+ 0x8C280711, // 0031 GETMET R10 R3 K17
+ 0x58300012, // 0032 LDCONST R12 K18
+ 0x5C340E00, // 0033 MOVE R13 R7
+ 0x7C280600, // 0034 CALL R10 3
+ 0x7C200400, // 0035 CALL R8 2
+ 0x8C200906, // 0036 GETMET R8 R4 K6
+ 0x88280913, // 0037 GETMBR R10 R4 K19
+ 0x5C2C0E00, // 0038 MOVE R11 R7
+ 0x7C200600, // 0039 CALL R8 3
+ 0x80041000, // 003A RET 1 R8
+ 0x70020004, // 003B JMP #0041
+ 0x8C1C0906, // 003C GETMET R7 R4 K6
+ 0x88240914, // 003D GETMBR R9 R4 K20
+ 0x4C280000, // 003E LDNIL R10
+ 0x7C1C0600, // 003F CALL R7 3
+ 0x80040E00, // 0040 RET 1 R7
+ 0x7002002D, // 0041 JMP #0070
+ 0x541E000B, // 0042 LDINT R7 12
+ 0x1C1C0C07, // 0043 EQ R7 R6 R7
+ 0x781E001F, // 0044 JMPF R7 #0065
+ 0x881C010A, // 0045 GETMBR R7 R0 K10
+ 0x4C200000, // 0046 LDNIL R8
+ 0x201C0E08, // 0047 NE R7 R7 R8
+ 0x781E0015, // 0048 JMPF R7 #005F
+ 0x881C010B, // 0049 GETMBR R7 R0 K11
+ 0x4C200000, // 004A LDNIL R8
+ 0x201C0E08, // 004B NE R7 R7 R8
+ 0x781E0011, // 004C JMPF R7 #005F
+ 0xB81E1800, // 004D GETNGBL R7 K12
+ 0x8C1C0F0D, // 004E GETMET R7 R7 K13
+ 0x8824010E, // 004F GETMBR R9 R0 K14
+ 0x8828010A, // 0050 GETMBR R10 R0 K10
+ 0x0424120A, // 0051 SUB R9 R9 R10
+ 0x5828000F, // 0052 LDCONST R10 K15
+ 0x882C010B, // 0053 GETMBR R11 R0 K11
+ 0x8830010A, // 0054 GETMBR R12 R0 K10
+ 0x042C160C, // 0055 SUB R11 R11 R12
+ 0x5830000F, // 0056 LDCONST R12 K15
+ 0x5436270F, // 0057 LDINT R13 10000
+ 0x7C1C0C00, // 0058 CALL R7 6
+ 0x8C200906, // 0059 GETMET R8 R4 K6
+ 0x88280913, // 005A GETMBR R10 R4 K19
+ 0x5C2C0E00, // 005B MOVE R11 R7
+ 0x7C200600, // 005C CALL R8 3
+ 0x80041000, // 005D RET 1 R8
+ 0x70020004, // 005E JMP #0064
+ 0x8C1C0906, // 005F GETMET R7 R4 K6
+ 0x88240914, // 0060 GETMBR R9 R4 K20
+ 0x4C280000, // 0061 LDNIL R10
+ 0x7C1C0600, // 0062 CALL R7 3
+ 0x80040E00, // 0063 RET 1 R7
+ 0x7002000A, // 0064 JMP #0070
+ 0x541EFFFB, // 0065 LDINT R7 65532
+ 0x1C1C0C07, // 0066 EQ R7 R6 R7
+ 0x781E0007, // 0067 JMPF R7 #0070
+ 0x8C1C0906, // 0068 GETMET R7 R4 K6
+ 0x88240915, // 0069 GETMBR R9 R4 K21
+ 0x542A0003, // 006A LDINT R10 4
+ 0x002A2C0A, // 006B ADD R10 K22 R10
+ 0x542E000F, // 006C LDINT R11 16
+ 0x0028140B, // 006D ADD R10 R10 R11
+ 0x7C1C0600, // 006E CALL R7 3
+ 0x80040E00, // 006F RET 1 R7
+ 0x601C0003, // 0070 GETGBL R7 G3
+ 0x5C200000, // 0071 MOVE R8 R0
+ 0x7C1C0200, // 0072 CALL R7 1
+ 0x8C1C0F17, // 0073 GETMET R7 R7 K23
+ 0x5C240200, // 0074 MOVE R9 R1
+ 0x5C280400, // 0075 MOVE R10 R2
+ 0x7C1C0600, // 0076 CALL R7 3
+ 0x80040E00, // 0077 RET 1 R7
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
index 6cc6300b0..b1e3292f3 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_TLV.h
@@ -3282,18 +3282,18 @@ be_local_class(Matter_TLV,
be_const_int(0),
be_const_int(4),
be_const_int(8),
- be_const_int(4294967295),
- be_const_int(4294967294),
- be_const_int(4294967292),
- be_const_int(4294967288),
- be_const_int(4294967295),
- be_const_int(4294967294),
- be_const_int(4294967292),
- be_const_int(4294967288),
+ be_const_int(-1),
+ be_const_int(-2),
+ be_const_int(-4),
+ be_const_int(-8),
+ be_const_int(-1),
+ be_const_int(-2),
+ be_const_int(-4),
+ be_const_int(-8),
be_const_int(0),
- be_const_int(4294967197),
- be_const_int(4294967197),
- be_const_int(4294967197),
+ be_const_int(-99),
+ be_const_int(-99),
+ be_const_int(-99),
be_const_int(0),
})) ) } )) },
{ be_const_key_weak(EOC, -1), be_const_int(24) },
From 97cbfe007f473f0ff0e7b7e5aa605be8ee8b571e Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Sun, 7 May 2023 18:12:47 +0200
Subject: [PATCH 080/289] Add windows berry binary (#18599)
---
lib/libesp32/berry/berry.exe | Bin 0 -> 362434 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 lib/libesp32/berry/berry.exe
diff --git a/lib/libesp32/berry/berry.exe b/lib/libesp32/berry/berry.exe
new file mode 100644
index 0000000000000000000000000000000000000000..7dfe426b590b8a5793438c367d0e4b03c80cef17
GIT binary patch
literal 362434
zcmeFad3Y36_CMU61ri`s2M8cK5;Q6ZV&a;Xs9i}nRHTDZP;lIkXa;wMZb4-U(}|>}
zZH)Uej=PSIGo#LEKvd{XAOTSfxDnTYg12aafC?cXc|Yges_G8g_xt-j@AJI>ygZt&
zy34uep6#A{?owrctaGF~9F8>n-__-CEWt1R^YGuJ|EWTD-=RzUI^NFwc-RuB|Knkk
zrr$U-_l_C2|7pf`x8_z{ciU~Z2Xd#~kUJxITkegw<$5okn0xE(*WWNYE2~$Y3A)_p
za9n?1fBDug&2hQQ;b?c9?C716GThOU;&5yQc1RmSMevJ%9w+^!XJixJ^e>%W=wCZh
zdN>?sRP{i=rlM#rC!2NgEP+@*l*uWsG{@O}@RFP6i1wyb^WSr+j^j?YUhrF<=J+fl
z>HVO`sk2iZ!w*WM*TE;IIX0Lm9wyr{I&j1605Yb3fjKvy
zv7Iv7P=;WBL4OkeJPt>6^bA>W>hnl%NB#@=JqQ7m^NhYjmg7F6uZ;XXBoT>!9x69m
zmP;eXwIH8p^1@-tO`AEBYCfmXUyD2RocLEo_}w7kG0j1HM_=TxIt;uUWjW>vc;g@*
zeQ`*+=;)G5Cs7Mi=}$h&5lJ>3rd;3_#*caKG0XjUm~u02xaIZ=hvYSQ?&t-0TMj8#
zeEM0`pujS4PuQWS|GJ%0)3?!&?#;_Zd7_6moFPsF8g&3v*r;BvUZzgEZ1Uw30TM+{+lp4T
z@Y($_c-^3d(@r8i(!x_R3Zm_r^48UkKwr(>7|428K-sh>L>V@$_YqzJFMTy5ZEW
zRlz>*4yE31S()O9j|`{QM1#ko!#fys)&~4Er!qOxfk(Vob9yOoqy(;f42r%ai$?Gx
z+5n|Fl?Yk0JJCfLrh&r^IXrPa;Ai9(a6s+!Q5hXVh`LbfD>nr%NE60Uk?6|1$_##C`Ju=0n`Zb53PzS8Ud
zVcy8`;XYf$8%Wn8)18`bh>`TH8{>8FX8bmf51+NAv}?sLFU4C5qBURp_0t|gZB5ZO
z6hupP@3#&y^-qLVdT(Iu52xRP+;G-iR3_~3>xAERco82pr#M3At9S$hFT{@?3#N;6
zK!MQtr%)>1o?DUP2&bQbH*hfb%4@E@TD?lWTD``S{SCKTGA)ij(A8B(jAn@;#dr^y
z1?wSnsok^0Lx8GS{!iDJX@S{-qXvFdsbA^tFDy(N6-_
z?9CfaCQ++duT*cMhsZ4uJAG%VF2t@Aoy;pGT%J+2X@00PTd7_|Wx|gU7!>gptVUUp
znTLXUCs>NNW)C|jn!Zvjz(CjR%gClWIwU}E)@r^E{z20_NRWvPjg@t%NHA6gQ7F{t
z(!%|LOu$WP>l&S){P>JgJz7??I{3ND8fjKI3(iXXW7H3$YYBiL-Mtwn2MV;@36yf5q(pFwNlx4`4fsJ^a
zunk}4(n2e#LU4Wj0c9we7Kg*6_i#;L!$QF`X>h
z_6v*!fdj{cItK>RJ=MDdf0A~CsYLi8E%>t*&e!yfuAd+`W-G<}!&^&Ze;
z7}3Kj^3cIWE}89coDV0vEAS!-7=unKKkeZ1s?X_&udS>cZS{@tu?}Mjc)X779Yow8<=l4
z&?^al34ilX7X0ymUkZ+MI*DQD{;sZMF|@jlCcVVQ133%zh|5UUpQegl*cR_JQDtwc7BKJaP=1_
z@=rco{^N=Kv4_i_CG$gVLqi=stO6$ex&Mj!{jF?eXj1=k{^N=Kw8Q1kO5_hZT>fOr2P;ggFUHZkX?0Tq11gmr(NL!|
za4eUQbo)hd$qFW&sLU_QsWL4|f?0m{K$A`Q(reJyh#!z`)x4(Kbp6~px}
zV829^s+nlG0t2L`?fb;(kWbGOgm8w`MWbYSQvIdm8xV+pLF6?(M%LkkdyS5K~0vYpS+2Vr3FS6
ztPXV!3S?>eDkiXL7l4`uYc11k`$Qd1E@#?9F9tVscM$;7fCh`$Bo^T17v=UIN;YwY
z#(f&^OnVb42W++}X7?Mr*&~0%+oE8S7+rKtAmHCE&*YMSaL)A^9HV{s{fi
z{drU9b-3ui4)DmqO%h(Ky;8lUU_H_In#Gdw7ScpS9!@nqBN=Jq9rTX*DCI{Bza_i2
zM#PJmD-I>QhZf?#V;HB=5adgY2TAnRm>v{vpz+M^|1Zl)!jDM5u}7faq5PBZX)q-C
zCcZShHi=I_<5Io-2+csqEKZ4>-K1wWHhOt`v!{bSFWI*w`DKwhq<>VF+CLJ00nHjpg{8(sF0tg$GMCwb
zfuYWRfoyp0mym^|J|^sn2VP?|@Pnp1?Oe+rFzt!{rHT3)aUL4-!aGo_+UBdFj(&k#
z@HabnIeB_Dy8{#0-iQIzJJVM83tRzbGI*ApY+;hCxtoGH@sp)};Kn(zJ6PpW{<|YL{)lBi>D`kXf5m#I@%!-$rCLJPj5s1fNh-|a&n)Cy$Ylre
zh%!B;xo>3no?O`4Tw$
zWzSLV1BKsAxkw0qvVD0mhiGbR^uhKy=YOjIOW{%L4?IHsWdFWNEIU8JxPgKG%riNV
z+4Q3M7rXc;)XN4jE0Lp};V5z@>m%pWTtO`U21UdFC6kOEM#e&W*mTsazk5(Yw0W$Y
zLRwb23dKN*R&fW0eGI4$hyzALvfpgClQ>}c3p7?d^v)3pkZd_$|C)-?%p@D&mtv9)
zYr_U32K1>pZs~PG)*302TD0ud8gT-*$Nf8n{FDFl{?&mj|I7YWe1&Oz&DS&$`2iD=
zCwX)m`J|k~>`MzZI(3xTDSjWr3@nJU(d!qmdtmbq9$6&ku8$B~DL~g{ty%j(gwVf}
zyKI%WG#U#=A2p4WYl_!#dPBoM1G2{s5b^1ykPZ;FtGW%uMf{IvfPrw1mc
z;w+NaUTyq%Genf^m@Jomq;f^)b~BfC3H=i)a4`c1;X5*tVh5oE0|J8zb{9nTS#oS)
z(=F{I>=UVq?^mc6a`m39ET%@1{|S2y28l^Ky1Htj%A-+IqNMSc@@1e!6rf1=DI4rl
z5`NFSyVLGLydN6q05wCM0|MhhojHMiX4E5LN9xRJabPo3F-o}Koeek`AJ`+Hez}1cO@DKNl<7s^0C*TV@a-^YE^Z?57VZ`t7IG)BkgH0%)RrDNF
zJb3PVGFniaOL+bpc=}*dq!o)lpM)*dx9y2nZ$e~g3j8s1nsj7mV{9P1S?z8!!3c-H
zqUoZrH=2t_NlB+^FsU8!0|YPrI^>NwURu$P#?G`GD`c{Wj)&%ZtyJmvay@<)LMlc&smKBFMfDhJ#ai1dYm6
zC}n)9Mc=T`l&4pKxi{=Hqkduq@CF1byC_M7lIW4r4cjKM>ujb6DdTxGO0z$zgLz=Q*&LVbrJ;PXcn8j8q!5iT
z$uPK}i#UHBhs5(K1gu^q^;K_W<{*lLb)Y8HvnF@sKAVw&Fio3hKUHwOhuhFQETdr6VFV1kz?8nmRFqHfnAQCWUgY5xK%meHh}>!udCzA~UOmjeveDF+$XiqpB0^5$6Q4p#
zLK~2P@u{!WhJ>F(rb(t5&!S+G@JqXFj!zuRLW^KeaXW^$f~YwTSmPH&2Q5%~5(tW?
zYt0St47+F{gUCFhK}%&|MmxFDN6DZ1jKj1q2$qnz58Z~b9CKoHo(-x(?;&>GbIE=v
zFCd6Wp)`7FcmltN1d=fSEzgL5m>A#KUy8y~Qu(VRnswgT5kPET5DrqE`iXnidO)1xJ%ZxD}{k+}y;
zpoIEznL{xnm|B?DrII@3Z8PG2<$ot4RyNdJ!kf+#+OmM*pp5KYW_!il7wi(#je=J7ONm0qsi
zN&X7OOy%W!)7&w_l$_NpY_QYb1pg1@UQ1N3B
zT}yxf2bd9&@;1c$+Kv6+byHz0o{Y(x%%9WtKjd#Zdj8Wt96kU2ACI2@&1RUYq<@xv
ziHSdQ?@tH8xX
z`~!H=1XpI!r4V{aU9jlv&0Ss9QKkBPBw`3X;0%tIaknCxDnqO~#d_4l6EQ)KtLoLp
zcb(R_#Ih5a*Coa?q(BT)W6uYcOjYh8@PU7NBe!9*LaSHbDk@~TC-ICF@!79kU8=qU
zYmbAZ%IdAfkvXSyi7U~paR)3&q&yV`3$}?HpMr~G^$$s*l}=FuVyW(*gYDxY-jf_A
zOb-$nud$J|lbN2j=AX0&-gUlZ#|VKJk)rDDc8OF}w#WmO7N2gyyEHnj;;s(rPq4u%
zAl^Z)Q35Q{?MvQ=s77*bp&tM~4>YQ?@wNRqP5(k%i&|K(oY&Wa)Aa?Q9!F~dtz!L_
zBzhZxy>cDjB92G}%dKkS6_^wVO1v5Jp0l?s)e(Q(n#YH8R@3`J^WAP=Y}zO#Au!Yi
zvm7!AHszst$!6mZXck@i=X>0xx9JC{{Ryd|?aq0dZEPMzPf+tSJK+(4!iX1NousSQ
zc%DmwSb^rD?Lz^N+ZWSNLpF@nx*8Bz#*=|cB&QS&i(xiFP~dtlV9h7Z9;^|6h$pCm
z1%|$W>91G|2pJM}+TBq42#**iQOo3fiH>FQO9g
z&$fy85IO|z%_9Qc$C<%?c7HxcW$uq%{6tByZ$aIeK*LVI5>W|IawTEMzUmO!ZTa#q
zz_D{YXvJ<}BDX;7ktO@nD8q5T*OCc4ih7YSA4&76_20`1P2veut=Wws%oc;)Sbl*B
z!=BrCQvZSH*LH(1phNTmB_Pg=ha>`~AiWI;-T9B^K)(}gfR_TG^#VE$6vMcM;As*K
z@VpK%#2DEOg;}S*kAaSHMCL?pAc5Zx=yiN!V*c{WcL(ze3WRq0+7Jo=q0W9wmGEr)
z{9jqWpM|1GA)AXiF4k2^M1Vs3Z%hF~Eod7{q%T3bWv`O#F}(OS;wpe8dz>UluOSJP
z&5>|!8~0#Ik?$BX1a?Op|H=0
z_Ge{5ZnQ958qjp0L9I*wTdwC+zeer2%X5R<4l{AnQ1RkVmLt`vv++j&{cXTQEte2xSJ#ogb|ZIZl?WZeiz;sc}u5X&b|hK=#RbTa@+
z@;JOy|5$wVHK~bG^FGi~-@P7x;V>6qrQQ&+90WKhViW#|WW%k+(YeY2QvLC_+722+>%
z5;zXx$OXlP=#p(c9@>ev687gsyrMlZ9w?DR5EFO414)BJIDD1Z4Pmt_UO^Qt`y#>+
zDQuR(&P7ZXPF*F|Bo`e`MHAK^@U8g_Owl^*sRZk*Ga-srN5uQ+ru9N*WB(>Kg+$i|GTtj;zYb49j&!ea-C_vYS9jaDVA_j@Bv#KE<`PJF%I2O
zAu6ab27B%TUbMt5ijhFVcIK8XOmgOIf0Ab~MuRz8%eMjO3Xvz0a{*cx?~sT>geXls
zK?HwB^1-I}i(ec>o?U1doBW}C_Tr4briN2Au&O8rf}_3fUj
z-@5{;xC&}TvA)p&tS*r}Y}SRRHjp>E_WHcjMZ8yv!>cTYf7&VAW(URi49PTZDT{By
z27(!`_&btbK#mJo@iuF}wgsCu;+gI36wd+(wtS}qh7p$|Im_Rc8gIfd-gtyIPgFsW
z(9WE^(Umn_fzPqTz(W)f^?1eH9E)vuz_3A-0V1zq@g(zh)VCJ3kbsz4tB6y87JHB^
zJd<>R`lC+nb|9fpMYt=}HXpM$Eixx>ICh$A`p1@S0Y!G!!UGabnb;9u!k&~%sU8f2
zH2)lEMj#!X3l0vasvPx_8?HG_{3t3QHZN%L{QNF3jvD#%oZs@Wfm+t&V6C$3bW%T(2I;Lue%p#1iKKyjO2CGe)$_WN!IbWcg}-
zocCvc_~yaXisi!j;LsggR&l^2t}!9f=XavKco)InQhkLV{XZGwRVR(IFY|7YMxduu
z$505U(r(}M;Du#1KPuHHkS1a4dqoL_xL06SXxT?f#S;BNJvT1<-P9MEFMN16VfGJ<
z40W6w7)xFX1>XvyQkMKAkUJ~UsguRn49NazwUcr$v9PJVA?|TN~)2K44K#j02p^6
zwhpnc2SnNDu}YIT`IP#XtB|RMug(X#bH$e^qgD7kYUoF&KXO*c@BU?`Thj3mS&k
zMV72M1Ita-ltFzQ9`Uk65_-iD+
z3_=zPeDz?k1bGKh{&5qSpK~LlN;G$T=7lV0N#lJZ+b1=vE4VK>-OXSKK8_IRh?s28>%FW>Vk0N<9ebtKJsatSa@t
zgXYqHI}wxFD-QI;09boVUT@9Wj8kBFn1nTI?v5Gf#uuAMf=VKb8cGoU8Q@e~
zf_)Z^DVlrV%s+Q4yD=rHY_MLb_vZQIZ&>3sy&2Jm|f~e)opwpc|M^SN{`f
zUWy{LhVLyDeFi!mWfh;uPK6z%v5hInp?%gcmfpNVaV)y%$5xGepFYo1s*lZw%uR@#
z1r2OhLQ?@ts{kpw;)5i;d^ovP8d{lF=Kf6ysmM-do9K%!p($c+@N;h%UGVDBm>44M
z)~p7+oz&Hp>QLRy^WUKjB8A$B4lnS?ms?`gTp)+2ig@{L+T@CKS$sj8!?C|h&5Rmz
zFyfG(LEWX^{)mB2tN4-{MNOQ{Da8<=uS1N#xCb_Et}oNuOLgqUkBLhcr8ve%2Ao@_
z&&^f!x!zLumrCems*c6ve6Rje9xaT-2g`nH)OcyA*;VRpRzlc1VcK^oQ{p5ii?B2J
zB{QZ7UJEt?IFyCQp=1$M?rppkr39C#Se+uTup60va?p0vv2)wuu|liDN*oU_IFfbZu57#Zji;KHR6z(tP^viz9*G
zEWfV|$MW=z;8=#VC}PY$fOY>C++utJ+g&H+Y6{wt{U&@(-LX*KDb5AHmQ+J)H6X0&
zJ&g?{9dZ%uGE5Grsta8$Mb-z%VtecjOS&3k&>HMpQMOX^95StLiJQj&7;0vtre*Yc
zVi%1_A&{ouM|!O3<8pC+1l}j4OR2t>SwbeoWXVHTR*eVnB^?X4F)2@HL~qF}j883t
z&|$Ygy_ywjO9_tfg;lQ)@ub|+@Flt7i!xw|bF6*9`gvSf(xp1e!5IuhtvIox)JJ(#
zyR8V#n+wV+BK(2bCOv!zd6`=sWC}(E^<7XIx|EhziUs-HGW>C=7)d43@Ib@^EnsH)
zbGPJDOms;t}A2qbXDc(XP%UU1h
zZ6yFgi|jh~U^Td!i#w=&`}{^z?bG0-Ack>^g^321T*0&+}M)4!s}Wgj0%6E~nr*oR2jSM0-)*nok2m9c<`kthM@Hqf_><^${x*YZsGP$#^7KQ-dAgqFZ?BLeCEil9r%yagGawHBU>
zKJ6)uZAmS|m|2IQFEl!?Ku>6^3kQB(0Y78CSKJv#|KN822s1zLSic^Jb3NLc55TX!
z1i>oHuZG$4)97c2F#u|e0r@Sv=F%!Wm{m+#>4?8VUSK3=`zxg0hPdM+0Kl#S`ATaN
z|NagpB58(KY3@hON3m8EE7&dK`-mAdlL_|cX(2gL$@>AZqCP3_G<69r7>R9M8c~&I
z(SS!!Raa_ob=91_)0PDr@H6`3;CuKv{eVY#q$&O;=wQcx^Cekn#)YHHkw6}%ba1)A
zkiFt@f(ok;P%YYXa+Q^Qp4VMbsNDY|3rMS&-a>YZ;sB<@XIu^sNz%s~zCLeMd6b!)cGi(2{YX13CT=cNdDX;y%(0cSb1P|Ve=np$NA-o*HS
zB{mU?35bE1_QM66{2${6FbcH2?`7ghtN89ie!W4y5=V~vwmU~;JQ8F1mmC<#32@Q9
zVp3;9N7homX`|JlIwGz@IZ%A~vS3gAjQBV(njHQ}&RHe~S4j+hc!?1r44(Q1vSgnD
zMx|2^1lQnalq0wTKO@tEAIJsS>;6LeNW8YT)$lRjlYx!+?Ow_w7gr2{eeg%d!L_1S
z^<7Y)OFRnuX&F|ik$7}3b%*vuuy{!v&jC`#WE4+|*pxYAr6d`jOpTHsZx*O(Xg*rX+E-s1makxL6Gp_31Tt~1EyFRKr
zsw!pC@B`HtqTH+WwaSEcgkZ4e76un9^@?{L44@yI;t;$m--l7{OieGzKql`C;hw*{Hv&b{6chSf|&yYC1sMoB1kY}e-pHlS4
zyS9YHbw$VAwH+t
zyb;amhhQu9-+A@YG*w>*aUblf?Sp`bnnpQPB9Y}fY*y`YhZe6Lz-iqGURl>IK9uW&
zLs+mI6Lp-=h19?I99gwB99|H+)*@6)#)s_9=0-bijLG#1ksc)@l^#I_S$ais>2VE-
z(zsz@!*Z-bcA|I%!`~?$PcA$Jh4to|=-o=Fmdqa{$jN*ZfUO*SgJcm}4UupOd8fQ7N$J@gIc@sd$&m4}0?7%fNQqsfifdNT
zoaH0SRpy0?n>wi-vh6f_d_;r=9BNuDUztEbuC{*gxrqmi(a2}zAb16;#5b7!Y|{Gc
z6tGVCm&rAh2hIc;m*tXZQ=csgd?oh5xAYUzWwiQ!K1wm-m|-oVxQ*AnMTz_!50P8W
z;hhN;+c2LHkD^WL1r}E@hvy}iW^u>gXb{>8wZp86b}2^s^d#Y^g@-N+KZL@i&J`C$
z`kYcWqD@?g3KvDr%H_;H=K|UkDlnp5oW!8WjrT{=dWd=wAd4!mfr!WeW9)#D@$zRT
zT}lxD=|#B`&uyqEn^qEdu6mmB1S1l7(&}+r2LL;pj9Wo|%f8#oPA`5S*L{}&4Lk8R
zlH?}iHKbYdiAc`lwCoJ-#bR*mDNLLse!PF=FrpL0%mL1UDwisQy&;DocpVPq5m>HP
zF%Y0+mm!Pqe#*|O9Dj}=&nE#MZxg55Q<5e5UaFlixkr=dHcW*z1QH<6h$K7(2NiOX
zr@sICKmPF#z>Ne`N|iT$)neO+#kQnGE{Bk>7juBAs>d-IC{x~OEY%xIV`5n7_Y~#6
zGf;6M3VVo~U;R}n7Q5GH#?uVkP
zaRx~N+Yh|OzsC4Mzt6~D<0|A@@)nAYi@(R|JxzN64lXUBy#M
z;7sz^^!3=?NYXWAIm;%ir^reYRB5q#ucOXkzNYA_z_F^mU>Fv6x-kqVkGeAqH0-I=
zUu^O#YNTbZ0y*#d-mJHSenEVOlg#L1aBLiE5wobmD=6rVc*aGv{Y7WOmr%yVYKv2r
zoR8#6y*Sl42b7R}Ny6{0o59=?g8u-ulMJ8mYAQ~1NI3#zHKL6xIz~c%_k6&u)Gtbb
zqicL4c^ChP7$_N51!%-~;}1#nCpmc4l!NP#PWfji<->2`s3w7-dc;49AJA`>`TH^2
zB2JWJ-km%fr8wXb>_a+C9Zr$Z_#|52=jw8xyXuo}=D|8&$?KA9#poqu5hi9}$}(o+
z;K0e`3Un@`(Hu`0(EsuT{NvRawK$ASxj!#PLle`+OdKFf--5=h($`Yyzb2PnhSF8{
z4s(S22ahK&56wY(d@b&Yt{`^gvri`ddKNb%2MlUuU=q~61l5-W)vRY+2jKF&+Jc{J
z!3t{(On3o1c2oB(gZCelL9{Us!_s$;vq`7Lg>vDR<`g@Io_){mX{(qC@Lc#-CR{e>fHd^R$XDaFWKk%96)EJyr7h
zXtLyP2=4GABs~f2!f3``n3yKHt}R$WouQ=@l!|v#W>-