From 83e47fa4a8018199cb58135498721f87830e09c1 Mon Sep 17 00:00:00 2001
From: s-hadinger <49731213+s-hadinger@users.noreply.github.com>
Date: Mon, 29 May 2023 19:24:06 +0200
Subject: [PATCH] Matter support for Occupancy via Switch (experimental)
(#18742)
---
CHANGELOG.md | 1 +
.../berry_matter/src/be_matter_module.c | 4 +
.../src/embedded/Matter_Message.be | 2 +-
.../src/embedded/Matter_Plugin_Bridge_HTTP.be | 5 +
.../embedded/Matter_Plugin_Bridge_Light0.be | 8 +-
.../embedded/Matter_Plugin_Bridge_Light1.be | 2 +-
.../embedded/Matter_Plugin_Bridge_Light2.be | 2 +-
.../embedded/Matter_Plugin_Bridge_Light3.be | 2 +-
.../embedded/Matter_Plugin_Bridge_OnOff.be | 2 +-
.../Matter_Plugin_Bridge_Sensor_Occupancy.be | 111 +++
.../Matter_Plugin_Sensor_Occupancy.be | 104 +++
.../berry_matter/src/embedded/Matter_UI.be | 3 +-
.../src/solidify/solidified_Matter_Message.h | 140 ++--
.../solidified_Matter_Plugin_Bridge_HTTP.h | 644 ++++++++++--------
.../solidified_Matter_Plugin_Bridge_Light0.h | 537 +++++++--------
.../solidified_Matter_Plugin_Bridge_Light1.h | 20 +-
.../solidified_Matter_Plugin_Bridge_Light2.h | 26 +-
.../solidified_Matter_Plugin_Bridge_Light3.h | 26 +-
.../solidified_Matter_Plugin_Bridge_OnOff.h | 16 +-
...ed_Matter_Plugin_Bridge_Sensor_Occupancy.h | 348 ++++++++++
...olidified_Matter_Plugin_Sensor_Occupancy.h | 324 +++++++++
.../src/solidify/solidified_Matter_UI.h | 4 +-
22 files changed, 1614 insertions(+), 717 deletions(-)
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Occupancy.be
create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Occupancy.be
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h
create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Occupancy.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c9a5e076164..ce9e73f275db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file.
- HASPmota `meta` attribute and improved `berry_run`
- Matter Border Router for ESP8266 (experimental)
- Display descriptor for ST7735 128x160 display
+- Matter support for Occupancy via Switch (experimental)
### Breaking Changed
- Matter relay number starts at 1 instead of 0 to match Tasmota numbering
diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 59f51901c848..b335cd14785c 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -202,6 +202,7 @@ 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_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_Bridge_HTTP.h"
#include "solidify/solidified_Matter_Plugin_Bridge_OnOff.h"
#include "solidify/solidified_Matter_Plugin_Bridge_Light0.h"
@@ -213,6 +214,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h"
#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h"
+#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h"
/*********************************************************************************************\
* Get a bytes() object of the certificate DAC/PAI_Cert
@@ -399,6 +401,7 @@ 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_Sensor_Occupancy, class(be_class_Matter_Plugin_Sensor_Occupancy) // Occupancy 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)
Plugin_Bridge_Light0, class(be_class_Matter_Plugin_Bridge_Light0) // HTTP OnOff Light
@@ -410,6 +413,7 @@ module matter (scope: global, strings: weak) {
Plugin_Bridge_Sensor_Temp, class(be_class_Matter_Plugin_Bridge_Sensor_Temp) // HTTP Temperature sensor
Plugin_Bridge_Sensor_Illuminance, class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) // HTTP Illuminance sensor
Plugin_Bridge_Sensor_Humidity, class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) // HTTP Humidity sensor
+ Plugin_Bridge_Sensor_Occupancy, class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) // HTTP Occupancy sensor
}
@const_object_info_end */
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
index 81cbe4a7eed5..39cf74e30526 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Message.be
@@ -364,7 +364,7 @@ class Matter_Frame
var m = self.raw[4 .. self.payload_idx-1]
var m_clear = crypto.AES_CTR(k).decrypt(m, n, 2)
# replace in-place
- self.raw = self.raw[0..3] + m_clear + m[self.self.payload_idx .. ]
+ self.raw = self.raw[0..3] + m_clear + m[self.payload_idx .. ]
end
# use AES_CCM
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
index ca96619f544f..2ab00695b6e2 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be
@@ -232,5 +232,10 @@ class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device
webserver.content_send("| <-- (" + self.NAME + ") -->")
end
+ # Show on/off value as html
+ def web_value_onoff(onoff)
+ var onoff_html = (onoff != nil ? (onoff ? "On" : "Off") : "")
+ return onoff_html
+ end
end
matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be
index c601a17dfc46..b35184d51fe9 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light0.be
@@ -142,14 +142,8 @@ class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Bridge_HTTP
def web_values()
import webserver
import string
- webserver.content_send(string.format("| Light %s", self.web_value_onoff()))
+ webserver.content_send(string.format("| Light %s", self.web_value_onoff(self.shadow_onoff)))
end
- # Show on/off value as html
- def web_value_onoff()
- var onoff_html = (self.shadow_onoff != nil ? (self.shadow_onoff ? "On" : "Off") : "")
- return onoff_html
- end
-
end
matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be
index d6b4ef551619..788a278f0653 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light1.be
@@ -171,7 +171,7 @@ class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Bridge_Light0
def web_values()
import webserver
import string
- webserver.content_send(string.format("| Light %s %s", self.web_value_onoff(), self.web_value_dimmer()))
+ webserver.content_send(string.format("| Light %s %s", self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer()))
end
# Show on/off value as html
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be
index 4d7940bbc5e8..b1ca998317a7 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light2.be
@@ -172,7 +172,7 @@ class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1
import webserver
import string
webserver.content_send(string.format("| Light %s %s %s",
- self.web_value_onoff(), self.web_value_dimmer(),
+ self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_ct()))
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be
index 6561ac7950f4..5a687b88a90b 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Light3.be
@@ -200,7 +200,7 @@ class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1
import webserver
import string
webserver.content_send(string.format("| Light %s %s %s",
- self.web_value_onoff(), self.web_value_dimmer(),
+ self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_RGB()))
end
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
index e26763aa0d01..465454329c6e 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be
@@ -36,7 +36,7 @@ class Matter_Plugin_Bridge_OnOff : Matter_Plugin_Bridge_Light0
def web_values()
import webserver
import string
- webserver.content_send(string.format("| Relay %i %s", self.tasmota_relay_index, self.web_value_onoff()))
+ webserver.content_send(string.format("| Relay %i %s", self.tasmota_relay_index, self.web_value_onoff(self.shadow_onoff)))
end
end
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Occupancy.be
new file mode 100644
index 000000000000..b40bbf1c8f55
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Occupancy.be
@@ -0,0 +1,111 @@
+#
+# Matter_Plugin_Bridge_Sensor_Occupancy.be - implements base class for a Occupancy Sensor via HTTP to Tasmota
+#
+# 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_Sensor_Occupancy,weak
+
+class Matter_Plugin_Bridge_Sensor_Occupancy : Matter_Plugin_Bridge_HTTP
+ static var TYPE = "http_occupancy" # name of the plug-in in json
+ static var NAME = "🔗 Occupancy" # display name of the plug-in
+ static var ARG = "switch" # 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 = 5000 # update every 5s
+ static var UPDATE_CMD = "Status 8" # command to send for updates
+
+ static var CLUSTERS = {
+ 0x0406: [0,1,2,0xFFFC,0xFFFD], # Occupancy Sensing p.105 - no writable
+ }
+ static var TYPES = { 0x0107: 2, 0x0013: 1 } # Occupancy Sensor, rev 2
+
+ var tasmota_switch_index # Switch number in Tasmota (one based)
+ var shadow_occupancy
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
+ self.tasmota_switch_index = int(arguments.find(self.ARG #-'relay'-#, 1))
+ if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
+ end
+
+ #############################################################
+ # Stub for updating shadow values (local copies of what we published to the Matter gateway)
+ #
+ # This call is synnchronous and blocking.
+ def parse_update(data, index)
+ if index == 8 # Status 8
+ var state = false
+
+ state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
+
+ if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state)
+ self.attribute_updated(0x0406, 0x0000)
+ end
+ self.shadow_occupancy = state
+ end
+ 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 == 0x0406 # ========== Occupancy Sensing ==========
+ if attribute == 0x0000 # ---------- Occupancy / U8 ----------
+ if self.shadow_occupancy != nil
+ return TLV.create_TLV(TLV.U1, self.shadow_occupancy)
+ else
+ return TLV.create_TLV(TLV.NULL, nil)
+ end
+ elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ----------
+ return TLV.create_TLV(TLV.U1, 3) # physical contact
+ elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ----------
+ return TLV.create_TLV(TLV.U1, 0) # unknown
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0)
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 3) # 4 = New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+ #############################################################
+ # web_values
+ #
+ # Show values of the remote device as HTML
+ def web_values()
+ import webserver
+ import string
+ webserver.content_send(string.format("| Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy)))
+ end
+
+end
+matter.Plugin_Bridge_Sensor_Occupancy = Matter_Plugin_Bridge_Sensor_Occupancy
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Occupancy.be
new file mode 100644
index 000000000000..fb0c0d0792f4
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Occupancy.be
@@ -0,0 +1,104 @@
+#
+# Matter_Plugin_Sensor_Occupancy.be - implements the behavior for a Occupany Switch
+#
+# 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_Occupancy,weak
+
+class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
+ static var TYPE = "occupancy" # name of the plug-in in json
+ static var NAME = "Occupancy" # display name of the plug-in
+ static var ARG = "switch" # 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 = 5000 # update every 250ms
+ static var CLUSTERS = {
+ 0x0406: [0,1,2,0xFFFC,0xFFFD], # Occupancy Sensing p.105 - no writable
+ }
+ static var TYPES = { 0x0107: 2 } # Occupancy Sensor, rev 2
+
+ var tasmota_switch_index # Switch number in Tasmota (one based)
+ var shadow_occupancy
+
+ #############################################################
+ # Constructor
+ def init(device, endpoint, arguments)
+ super(self).init(device, endpoint, arguments)
+ self.tasmota_switch_index = int(arguments.find(self.ARG #-'relay'-#, 1))
+ if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
+ end
+
+ #############################################################
+ # Update shadow
+ #
+ def update_shadow()
+ super(self).update_shadow()
+
+ import json
+ var ret = tasmota.cmd("Status 8", true)
+ if ret != nil
+ var j = json.load(ret)
+ if j != nil
+ var state = false
+ state = (j.find("Switch" + str(self.tasmota_switch_index)) == "ON")
+
+ if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state)
+ self.attribute_updated(0x0406, 0x0000)
+ end
+ self.shadow_occupancy = state
+ end
+ end
+ 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 == 0x0406 # ========== Occupancy Sensing ==========
+ if attribute == 0x0000 # ---------- Occupancy / U8 ----------
+ if self.shadow_occupancy != nil
+ return TLV.create_TLV(TLV.U1, self.shadow_occupancy)
+ else
+ return TLV.create_TLV(TLV.NULL, nil)
+ end
+ elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ----------
+ return TLV.create_TLV(TLV.U1, 3) # physical contact
+ elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ----------
+ return TLV.create_TLV(TLV.U1, 0) # unknown
+ elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
+ return TLV.create_TLV(TLV.U4, 0)
+ elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
+ return TLV.create_TLV(TLV.U4, 3) # 4 = New data model format and notation
+ end
+
+ else
+ return super(self).read_attribute(session, ctx)
+ end
+ end
+
+end
+matter.Plugin_Sensor_Occupancy = Matter_Plugin_Sensor_Occupancy
diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index 5e7429aeb189..a59955ded820 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -34,9 +34,10 @@ import matter
class Matter_UI
static var _ROOT_TYPES = "root"
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
- "|temperature|pressure|illuminance|humidity"
+ "|temperature|pressure|illuminance|humidity|occupancy"
static var _CLASSES_TYPES2= "-http|http_relay|http_light0|http_light1|http_light2|http_light3"
"|http_temperature|http_pressure|http_illuminance|http_humidity"
+ "|http_occupancy"
var device
def init(device)
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
index 55aa4510bd16..5bfbc0bee70d 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Message.h
@@ -1039,7 +1039,7 @@ be_local_closure(Matter_Frame_decrypt, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[28]) { /* constants */
+ ( &(const bvalue[27]) { /* constants */
/* K0 */ be_nested_str_weak(crypto),
/* K1 */ be_nested_str_weak(session),
/* K2 */ be_nested_str_weak(raw),
@@ -1059,19 +1059,18 @@ be_local_closure(Matter_Frame_decrypt, /* name */
/* K16 */ be_nested_str_weak(decrypt),
/* K17 */ be_const_int(0),
/* K18 */ be_const_int(3),
- /* K19 */ be_nested_str_weak(self),
- /* K20 */ be_nested_str_weak(flags),
- /* K21 */ be_nested_str_weak(message_counter),
- /* K22 */ be_nested_str_weak(source_node_id),
- /* K23 */ be_nested_str_weak(peer_node_id),
- /* K24 */ be_nested_str_weak(resize),
- /* K25 */ be_nested_str_weak(AES_CCM),
- /* K26 */ be_nested_str_weak(tag),
- /* K27 */ be_nested_str_weak(MTR_X3A_X20rejected_X20packet_X20due_X20to_X20invalid_X20MIC),
+ /* K19 */ be_nested_str_weak(flags),
+ /* K20 */ be_nested_str_weak(message_counter),
+ /* K21 */ be_nested_str_weak(source_node_id),
+ /* K22 */ be_nested_str_weak(peer_node_id),
+ /* K23 */ be_nested_str_weak(resize),
+ /* K24 */ be_nested_str_weak(AES_CCM),
+ /* K25 */ be_nested_str_weak(tag),
+ /* K26 */ be_nested_str_weak(MTR_X3A_X20rejected_X20packet_X20due_X20to_X20invalid_X20MIC),
}),
be_str_weak(decrypt),
&be_const_str_solidified,
- ( &(const binstruction[106]) { /* code */
+ ( &(const binstruction[105]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x880C0102, // 0002 GETMBR R3 R0 K2
@@ -1081,7 +1080,7 @@ be_local_closure(Matter_Frame_decrypt, /* name */
0x8C140504, // 0006 GETMET R5 R2 K4
0x7C140200, // 0007 CALL R5 1
0x88180105, // 0008 GETMBR R6 R0 K5
- 0x781A002A, // 0009 JMPF R6 #0035
+ 0x781A0029, // 0009 JMPF R6 #0034
0xB81A0C00, // 000A GETNGBL R6 K6
0x8C180D07, // 000B GETMET R6 R6 K7
0x58200008, // 000C LDCONST R8 K8
@@ -1119,65 +1118,64 @@ be_local_closure(Matter_Frame_decrypt, /* name */
0x882C0102, // 002C GETMBR R11 R0 K2
0x9428160A, // 002D GETIDX R10 R11 R10
0x00281409, // 002E ADD R10 R10 R9
- 0x882C0113, // 002F GETMBR R11 R0 K19
- 0x882C170D, // 0030 GETMBR R11 R11 K13
- 0x402C1703, // 0031 CONNECT R11 R11 K3
- 0x942C100B, // 0032 GETIDX R11 R8 R11
- 0x0028140B, // 0033 ADD R10 R10 R11
- 0x9002040A, // 0034 SETMBR R0 K2 R10
- 0x8818010D, // 0035 GETMBR R6 R0 K13
- 0x04180D0E, // 0036 SUB R6 R6 K14
- 0x401A2206, // 0037 CONNECT R6 K17 R6
- 0x94180606, // 0038 GETIDX R6 R3 R6
- 0x881C010D, // 0039 GETMBR R7 R0 K13
- 0x5421FFEE, // 003A LDINT R8 -17
- 0x401C0E08, // 003B CONNECT R7 R7 R8
- 0x941C0607, // 003C GETIDX R7 R3 R7
- 0x60200015, // 003D GETGBL R8 G21
- 0x7C200000, // 003E CALL R8 0
- 0x8C24110B, // 003F GETMET R9 R8 K11
- 0x882C0114, // 0040 GETMBR R11 R0 K20
- 0x5830000E, // 0041 LDCONST R12 K14
- 0x7C240600, // 0042 CALL R9 3
- 0x8C24110B, // 0043 GETMET R9 R8 K11
- 0x882C0115, // 0044 GETMBR R11 R0 K21
- 0x54320003, // 0045 LDINT R12 4
- 0x7C240600, // 0046 CALL R9 3
- 0x88240116, // 0047 GETMBR R9 R0 K22
- 0x78260001, // 0048 JMPF R9 #004B
- 0x40241103, // 0049 CONNECT R9 R8 K3
- 0x70020006, // 004A JMP #0052
- 0x88240517, // 004B GETMBR R9 R2 K23
- 0x78260001, // 004C JMPF R9 #004F
- 0x88240517, // 004D GETMBR R9 R2 K23
- 0x40241009, // 004E CONNECT R9 R8 R9
- 0x8C241118, // 004F GETMET R9 R8 K24
- 0x542E000C, // 0050 LDINT R11 13
- 0x7C240400, // 0051 CALL R9 2
- 0x8C240319, // 0052 GETMET R9 R1 K25
- 0x5C2C0A00, // 0053 MOVE R11 R5
- 0x5C301000, // 0054 MOVE R12 R8
- 0x5C340C00, // 0055 MOVE R13 R6
- 0x6038000C, // 0056 GETGBL R14 G12
- 0x5C3C0E00, // 0057 MOVE R15 R7
- 0x7C380200, // 0058 CALL R14 1
- 0x543E000F, // 0059 LDINT R15 16
- 0x7C240C00, // 005A CALL R9 6
- 0x8C281310, // 005B GETMET R10 R9 K16
- 0x5C300E00, // 005C MOVE R12 R7
- 0x7C280400, // 005D CALL R10 2
- 0x8C2C131A, // 005E GETMET R11 R9 K26
- 0x7C2C0200, // 005F CALL R11 1
- 0x20301604, // 0060 NE R12 R11 R4
- 0x78320006, // 0061 JMPF R12 #0069
- 0xB8320C00, // 0062 GETNGBL R12 K6
- 0x8C301907, // 0063 GETMET R12 R12 K7
- 0x5838001B, // 0064 LDCONST R14 K27
- 0x583C0009, // 0065 LDCONST R15 K9
- 0x7C300600, // 0066 CALL R12 3
- 0x4C300000, // 0067 LDNIL R12
- 0x80041800, // 0068 RET 1 R12
- 0x80041400, // 0069 RET 1 R10
+ 0x882C010D, // 002F GETMBR R11 R0 K13
+ 0x402C1703, // 0030 CONNECT R11 R11 K3
+ 0x942C100B, // 0031 GETIDX R11 R8 R11
+ 0x0028140B, // 0032 ADD R10 R10 R11
+ 0x9002040A, // 0033 SETMBR R0 K2 R10
+ 0x8818010D, // 0034 GETMBR R6 R0 K13
+ 0x04180D0E, // 0035 SUB R6 R6 K14
+ 0x401A2206, // 0036 CONNECT R6 K17 R6
+ 0x94180606, // 0037 GETIDX R6 R3 R6
+ 0x881C010D, // 0038 GETMBR R7 R0 K13
+ 0x5421FFEE, // 0039 LDINT R8 -17
+ 0x401C0E08, // 003A CONNECT R7 R7 R8
+ 0x941C0607, // 003B GETIDX R7 R3 R7
+ 0x60200015, // 003C GETGBL R8 G21
+ 0x7C200000, // 003D CALL R8 0
+ 0x8C24110B, // 003E GETMET R9 R8 K11
+ 0x882C0113, // 003F GETMBR R11 R0 K19
+ 0x5830000E, // 0040 LDCONST R12 K14
+ 0x7C240600, // 0041 CALL R9 3
+ 0x8C24110B, // 0042 GETMET R9 R8 K11
+ 0x882C0114, // 0043 GETMBR R11 R0 K20
+ 0x54320003, // 0044 LDINT R12 4
+ 0x7C240600, // 0045 CALL R9 3
+ 0x88240115, // 0046 GETMBR R9 R0 K21
+ 0x78260001, // 0047 JMPF R9 #004A
+ 0x40241103, // 0048 CONNECT R9 R8 K3
+ 0x70020006, // 0049 JMP #0051
+ 0x88240516, // 004A GETMBR R9 R2 K22
+ 0x78260001, // 004B JMPF R9 #004E
+ 0x88240516, // 004C GETMBR R9 R2 K22
+ 0x40241009, // 004D CONNECT R9 R8 R9
+ 0x8C241117, // 004E GETMET R9 R8 K23
+ 0x542E000C, // 004F LDINT R11 13
+ 0x7C240400, // 0050 CALL R9 2
+ 0x8C240318, // 0051 GETMET R9 R1 K24
+ 0x5C2C0A00, // 0052 MOVE R11 R5
+ 0x5C301000, // 0053 MOVE R12 R8
+ 0x5C340C00, // 0054 MOVE R13 R6
+ 0x6038000C, // 0055 GETGBL R14 G12
+ 0x5C3C0E00, // 0056 MOVE R15 R7
+ 0x7C380200, // 0057 CALL R14 1
+ 0x543E000F, // 0058 LDINT R15 16
+ 0x7C240C00, // 0059 CALL R9 6
+ 0x8C281310, // 005A GETMET R10 R9 K16
+ 0x5C300E00, // 005B MOVE R12 R7
+ 0x7C280400, // 005C CALL R10 2
+ 0x8C2C1319, // 005D GETMET R11 R9 K25
+ 0x7C2C0200, // 005E CALL R11 1
+ 0x20301604, // 005F NE R12 R11 R4
+ 0x78320006, // 0060 JMPF R12 #0068
+ 0xB8320C00, // 0061 GETNGBL R12 K6
+ 0x8C301907, // 0062 GETMET R12 R12 K7
+ 0x5838001A, // 0063 LDCONST R14 K26
+ 0x583C0009, // 0064 LDCONST R15 K9
+ 0x7C300600, // 0065 CALL R12 3
+ 0x4C300000, // 0066 LDNIL R12
+ 0x80041800, // 0067 RET 1 R12
+ 0x80041400, // 0068 RET 1 R10
})
)
);
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
index d63c564dff3c..ad91a53e0950 100644
--- 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
@@ -6,151 +6,6 @@
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
-/********************************************************************
-** 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[10]) { /* 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(http_remote),
- /* K8 */ be_nested_str_weak(reachable),
- /* K9 */ be_nested_str_weak(read_attribute),
- }),
- be_str_weak(read_attribute),
- &be_const_str_solidified,
- ( &(const binstruction[29]) { /* 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
- 0x781A000C, // 0006 JMPF R6 #0014
- 0x1C180B04, // 0007 EQ R6 R5 K4
- 0x781A0000, // 0008 JMPF R6 #000A
- 0x70020008, // 0009 JMP #0013
- 0x541A0010, // 000A LDINT R6 17
- 0x1C180A06, // 000B EQ R6 R5 R6
- 0x781A0005, // 000C JMPF R6 #0013
- 0x8C180705, // 000D GETMET R6 R3 K5
- 0x88200706, // 000E GETMBR R8 R3 K6
- 0x88240107, // 000F GETMBR R9 R0 K7
- 0x88241308, // 0010 GETMBR R9 R9 K8
- 0x7C180600, // 0011 CALL R6 3
- 0x80040C00, // 0012 RET 1 R6
- 0x70020007, // 0013 JMP #001C
- 0x60180003, // 0014 GETGBL R6 G3
- 0x5C1C0000, // 0015 MOVE R7 R0
- 0x7C180200, // 0016 CALL R6 1
- 0x8C180D09, // 0017 GETMET R6 R6 K9
- 0x5C200200, // 0018 MOVE R8 R1
- 0x5C240400, // 0019 MOVE R9 R2
- 0x7C180600, // 001A CALL R6 3
- 0x80040C00, // 001B RET 1 R6
- 0x80000000, // 001C RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: call_remote_sync
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync, /* 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[15]) { /* constants */
- /* K0 */ be_nested_str_weak(string),
- /* K1 */ be_nested_str_weak(json),
- /* K2 */ be_const_int(2),
- /* K3 */ be_nested_str_weak(_X20),
- /* K4 */ be_const_int(0),
- /* K5 */ be_nested_str_weak(http_remote),
- /* K6 */ be_nested_str_weak(call_sync),
- /* K7 */ be_nested_str_weak(SYNC_TIMEOUT),
- /* K8 */ be_nested_str_weak(device_is_alive),
- /* K9 */ be_nested_str_weak(load),
- /* K10 */ be_const_int(1),
- /* K11 */ be_nested_str_weak(tasmota),
- /* K12 */ be_nested_str_weak(log),
- /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying),
- /* K14 */ be_const_int(3),
- }),
- be_str_weak(call_remote_sync),
- &be_const_str_solidified,
- ( &(const binstruction[43]) { /* code */
- 0xA40E0000, // 0000 IMPORT R3 K0
- 0xA4120200, // 0001 IMPORT R4 K1
- 0x58140002, // 0002 LDCONST R5 K2
- 0x4C180000, // 0003 LDNIL R6
- 0x20180406, // 0004 NE R6 R2 R6
- 0x781A0005, // 0005 JMPF R6 #000C
- 0x00180303, // 0006 ADD R6 R1 K3
- 0x601C0008, // 0007 GETGBL R7 G8
- 0x5C200400, // 0008 MOVE R8 R2
- 0x7C1C0200, // 0009 CALL R7 1
- 0x00180C07, // 000A ADD R6 R6 R7
- 0x5C040C00, // 000B MOVE R1 R6
- 0x24180B04, // 000C GT R6 R5 K4
- 0x781A0016, // 000D JMPF R6 #0025
- 0x88180105, // 000E GETMBR R6 R0 K5
- 0x8C180D06, // 000F GETMET R6 R6 K6
- 0x5C200200, // 0010 MOVE R8 R1
- 0x88240107, // 0011 GETMBR R9 R0 K7
- 0x7C180600, // 0012 CALL R6 3
- 0x4C1C0000, // 0013 LDNIL R7
- 0x201C0C07, // 0014 NE R7 R6 R7
- 0x781E0007, // 0015 JMPF R7 #001E
- 0x881C0105, // 0016 GETMBR R7 R0 K5
- 0x8C1C0F08, // 0017 GETMET R7 R7 K8
- 0x50240200, // 0018 LDBOOL R9 1 0
- 0x7C1C0400, // 0019 CALL R7 2
- 0x8C1C0909, // 001A GETMET R7 R4 K9
- 0x5C240C00, // 001B MOVE R9 R6
- 0x7C1C0400, // 001C CALL R7 2
- 0x80040E00, // 001D RET 1 R7
- 0x04140B0A, // 001E SUB R5 R5 K10
- 0xB81E1600, // 001F GETNGBL R7 K11
- 0x8C1C0F0C, // 0020 GETMET R7 R7 K12
- 0x5824000D, // 0021 LDCONST R9 K13
- 0x5828000E, // 0022 LDCONST R10 K14
- 0x7C1C0600, // 0023 CALL R7 3
- 0x7001FFE6, // 0024 JMP #000C
- 0x88180105, // 0025 GETMBR R6 R0 K5
- 0x8C180D08, // 0026 GETMET R6 R6 K8
- 0x50200000, // 0027 LDBOOL R8 0 0
- 0x7C180400, // 0028 CALL R6 2
- 0x4C180000, // 0029 LDNIL R6
- 0x80040C00, // 002A RET 1 R6
- })
- )
-);
-/*******************************************************************/
-
-
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
@@ -194,6 +49,69 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_update_shadow, /* name */
/*******************************************************************/
+/********************************************************************
+** Solidified function: register_cmd_cb
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb, /* 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(
+ 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(parse_http_response),
+ }),
+ 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[ 4]) { /* constants */
+ /* K0 */ be_nested_str_weak(http_remote),
+ /* K1 */ be_nested_str_weak(add_schedule),
+ /* K2 */ be_nested_str_weak(UPDATE_CMD),
+ /* K3 */ be_nested_str_weak(UPDATE_TIME),
+ }),
+ be_str_weak(register_cmd_cb),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 8]) { /* code */
+ 0x88040100, // 0000 GETMBR R1 R0 K0
+ 0x8C040301, // 0001 GETMET R1 R1 K1
+ 0x880C0102, // 0002 GETMBR R3 R0 K2
+ 0x88100103, // 0003 GETMBR R4 R0 K3
+ 0x84140000, // 0004 CLOSURE R5 P0
+ 0x7C040800, // 0005 CALL R1 4
+ 0xA0000000, // 0006 CLOSE R0
+ 0x80000000, // 0007 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: ui_conf_to_string
********************************************************************/
@@ -317,65 +235,159 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_parse_http_response, /* name */
/********************************************************************
-** Solidified function: every_250ms
+** Solidified function: init
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_every_250ms, /* name */
+be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */
be_nested_proto(
- 3, /* nstack */
- 1, /* 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[ 2]) { /* constants */
- /* K0 */ be_nested_str_weak(http_remote),
- /* K1 */ be_nested_str_weak(scheduler),
+ ( &(const bvalue[ 9]) { /* 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(http_remote),
+ /* K5 */ be_nested_str_weak(device),
+ /* K6 */ be_nested_str_weak(register_http_remote),
+ /* K7 */ be_nested_str_weak(PROBE_TIMEOUT),
+ /* K8 */ be_nested_str_weak(register_cmd_cb),
}),
- be_str_weak(every_250ms),
+ be_str_weak(init),
&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: web_values
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_web_values, /* 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(webserver),
- /* K1 */ be_nested_str_weak(content_send),
- /* K2 */ be_nested_str_weak(_X7C_X20_X26lt_X3B_X2D_X2D_X20_X28),
- /* K3 */ be_nested_str_weak(NAME),
- /* K4 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B),
+ ( &(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
+ 0x8C140702, // 0009 GETMET R5 R3 K2
+ 0x881C0103, // 000A GETMBR R7 R0 K3
+ 0x7C140400, // 000B CALL R5 2
+ 0x88180105, // 000C GETMBR R6 R0 K5
+ 0x8C180D06, // 000D GETMET R6 R6 K6
+ 0x5C200A00, // 000E MOVE R8 R5
+ 0x88240107, // 000F GETMBR R9 R0 K7
+ 0x7C180600, // 0010 CALL R6 3
+ 0x90020806, // 0011 SETMBR R0 K4 R6
+ 0x8C180108, // 0012 GETMET R6 R0 K8
+ 0x7C180200, // 0013 CALL R6 1
+ 0x80000000, // 0014 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: call_remote_sync
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync, /* 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[15]) { /* constants */
+ /* K0 */ be_nested_str_weak(string),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_const_int(2),
+ /* K3 */ be_nested_str_weak(_X20),
+ /* K4 */ be_const_int(0),
+ /* K5 */ be_nested_str_weak(http_remote),
+ /* K6 */ be_nested_str_weak(call_sync),
+ /* K7 */ be_nested_str_weak(SYNC_TIMEOUT),
+ /* K8 */ be_nested_str_weak(device_is_alive),
+ /* K9 */ be_nested_str_weak(load),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_nested_str_weak(tasmota),
+ /* K12 */ be_nested_str_weak(log),
+ /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying),
+ /* K14 */ be_const_int(3),
}),
- be_str_weak(web_values),
+ be_str_weak(call_remote_sync),
&be_const_str_solidified,
- ( &(const binstruction[ 7]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0x8C080301, // 0001 GETMET R2 R1 K1
- 0x88100103, // 0002 GETMBR R4 R0 K3
- 0x00120404, // 0003 ADD R4 K2 R4
- 0x00100904, // 0004 ADD R4 R4 K4
- 0x7C080400, // 0005 CALL R2 2
- 0x80000000, // 0006 RET 0
+ ( &(const binstruction[43]) { /* code */
+ 0xA40E0000, // 0000 IMPORT R3 K0
+ 0xA4120200, // 0001 IMPORT R4 K1
+ 0x58140002, // 0002 LDCONST R5 K2
+ 0x4C180000, // 0003 LDNIL R6
+ 0x20180406, // 0004 NE R6 R2 R6
+ 0x781A0005, // 0005 JMPF R6 #000C
+ 0x00180303, // 0006 ADD R6 R1 K3
+ 0x601C0008, // 0007 GETGBL R7 G8
+ 0x5C200400, // 0008 MOVE R8 R2
+ 0x7C1C0200, // 0009 CALL R7 1
+ 0x00180C07, // 000A ADD R6 R6 R7
+ 0x5C040C00, // 000B MOVE R1 R6
+ 0x24180B04, // 000C GT R6 R5 K4
+ 0x781A0016, // 000D JMPF R6 #0025
+ 0x88180105, // 000E GETMBR R6 R0 K5
+ 0x8C180D06, // 000F GETMET R6 R6 K6
+ 0x5C200200, // 0010 MOVE R8 R1
+ 0x88240107, // 0011 GETMBR R9 R0 K7
+ 0x7C180600, // 0012 CALL R6 3
+ 0x4C1C0000, // 0013 LDNIL R7
+ 0x201C0C07, // 0014 NE R7 R6 R7
+ 0x781E0007, // 0015 JMPF R7 #001E
+ 0x881C0105, // 0016 GETMBR R7 R0 K5
+ 0x8C1C0F08, // 0017 GETMET R7 R7 K8
+ 0x50240200, // 0018 LDBOOL R9 1 0
+ 0x7C1C0400, // 0019 CALL R7 2
+ 0x8C1C0909, // 001A GETMET R7 R4 K9
+ 0x5C240C00, // 001B MOVE R9 R6
+ 0x7C1C0400, // 001C CALL R7 2
+ 0x80040E00, // 001D RET 1 R7
+ 0x04140B0A, // 001E SUB R5 R5 K10
+ 0xB81E1600, // 001F GETNGBL R7 K11
+ 0x8C1C0F0C, // 0020 GETMET R7 R7 K12
+ 0x5824000D, // 0021 LDCONST R9 K13
+ 0x5828000E, // 0022 LDCONST R10 K14
+ 0x7C1C0600, // 0023 CALL R7 3
+ 0x7001FFE6, // 0024 JMP #000C
+ 0x88180105, // 0025 GETMBR R6 R0 K5
+ 0x8C180D08, // 0026 GETMET R6 R6 K8
+ 0x50200000, // 0027 LDBOOL R8 0 0
+ 0x7C180400, // 0028 CALL R6 2
+ 0x4C180000, // 0029 LDNIL R6
+ 0x80040C00, // 002A RET 1 R6
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: parse_update
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_parse_update, /* name */
+ be_nested_proto(
+ 3, /* nstack */
+ 3, /* 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_update),
+ &be_const_str_solidified,
+ ( &(const binstruction[ 1]) { /* code */
+ 0x80000000, // 0000 RET 0
})
)
);
@@ -435,23 +447,62 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf, /* name */
/********************************************************************
-** Solidified function: parse_update
+** Solidified function: read_attribute
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_parse_update, /* name */
+be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */
be_nested_proto(
- 3, /* nstack */
+ 10, /* nstack */
3, /* 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_update),
+ 1, /* has constants */
+ ( &(const bvalue[10]) { /* 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(http_remote),
+ /* K8 */ be_nested_str_weak(reachable),
+ /* K9 */ be_nested_str_weak(read_attribute),
+ }),
+ be_str_weak(read_attribute),
&be_const_str_solidified,
- ( &(const binstruction[ 1]) { /* code */
- 0x80000000, // 0000 RET 0
+ ( &(const binstruction[29]) { /* 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
+ 0x781A000C, // 0006 JMPF R6 #0014
+ 0x1C180B04, // 0007 EQ R6 R5 K4
+ 0x781A0000, // 0008 JMPF R6 #000A
+ 0x70020008, // 0009 JMP #0013
+ 0x541A0010, // 000A LDINT R6 17
+ 0x1C180A06, // 000B EQ R6 R5 R6
+ 0x781A0005, // 000C JMPF R6 #0013
+ 0x8C180705, // 000D GETMET R6 R3 K5
+ 0x88200706, // 000E GETMBR R8 R3 K6
+ 0x88240107, // 000F GETMBR R9 R0 K7
+ 0x88241308, // 0010 GETMBR R9 R9 K8
+ 0x7C180600, // 0011 CALL R6 3
+ 0x80040C00, // 0012 RET 1 R6
+ 0x70020007, // 0013 JMP #001C
+ 0x60180003, // 0014 GETGBL R6 G3
+ 0x5C1C0000, // 0015 MOVE R7 R0
+ 0x7C180200, // 0016 CALL R6 1
+ 0x8C180D09, // 0017 GETMET R6 R6 K9
+ 0x5C200200, // 0018 MOVE R8 R1
+ 0x5C240400, // 0019 MOVE R9 R2
+ 0x7C180600, // 001A CALL R6 3
+ 0x80040C00, // 001B RET 1 R6
+ 0x80000000, // 001C RET 0
})
)
);
@@ -459,53 +510,29 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_parse_update, /* name */
/********************************************************************
-** Solidified function: init
+** Solidified function: every_250ms
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */
+be_local_closure(Matter_Plugin_Bridge_HTTP_every_250ms, /* name */
be_nested_proto(
- 10, /* nstack */
- 4, /* 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[ 9]) { /* 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(http_remote),
- /* K5 */ be_nested_str_weak(device),
- /* K6 */ be_nested_str_weak(register_http_remote),
- /* K7 */ be_nested_str_weak(PROBE_TIMEOUT),
- /* K8 */ be_nested_str_weak(register_cmd_cb),
+ ( &(const bvalue[ 2]) { /* constants */
+ /* K0 */ be_nested_str_weak(http_remote),
+ /* K1 */ be_nested_str_weak(scheduler),
}),
- be_str_weak(init),
+ be_str_weak(every_250ms),
&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
- 0x8C140702, // 0009 GETMET R5 R3 K2
- 0x881C0103, // 000A GETMBR R7 R0 K3
- 0x7C140400, // 000B CALL R5 2
- 0x88180105, // 000C GETMBR R6 R0 K5
- 0x8C180D06, // 000D GETMET R6 R6 K6
- 0x5C200A00, // 000E MOVE R8 R5
- 0x88240107, // 000F GETMBR R9 R0 K7
- 0x7C180600, // 0010 CALL R6 3
- 0x90020806, // 0011 SETMBR R0 K4 R6
- 0x8C180108, // 0012 GETMET R6 R0 K8
- 0x7C180200, // 0013 CALL R6 1
- 0x80000000, // 0014 RET 0
+ ( &(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
})
)
);
@@ -513,62 +540,72 @@ be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */
/********************************************************************
-** Solidified function: register_cmd_cb
+** Solidified function: web_value_onoff
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb, /* name */
+be_local_closure(Matter_Plugin_Bridge_HTTP_web_value_onoff, /* name */
be_nested_proto(
- 6, /* nstack */
- 1, /* argc */
+ 3, /* 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(parse_http_response),
- }),
- 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
- })
- ),
+ 0, /* has sup protos */
+ NULL, /* no sub protos */
+ 1, /* has constants */
+ ( &(const bvalue[ 3]) { /* constants */
+ /* K0 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E),
+ /* K1 */ be_nested_str_weak(Off),
+ /* K2 */ be_nested_str_weak(),
}),
+ be_str_weak(web_value_onoff),
+ &be_const_str_solidified,
+ ( &(const binstruction[10]) { /* code */
+ 0x4C080000, // 0000 LDNIL R2
+ 0x20080202, // 0001 NE R2 R1 R2
+ 0x780A0004, // 0002 JMPF R2 #0008
+ 0x78060001, // 0003 JMPF R1 #0006
+ 0x58080000, // 0004 LDCONST R2 K0
+ 0x70020000, // 0005 JMP #0007
+ 0x58080001, // 0006 LDCONST R2 K1
+ 0x70020000, // 0007 JMP #0009
+ 0x58080002, // 0008 LDCONST R2 K2
+ 0x80040400, // 0009 RET 1 R2
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_values
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_HTTP_web_values, /* 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(http_remote),
- /* K1 */ be_nested_str_weak(add_schedule),
- /* K2 */ be_nested_str_weak(UPDATE_CMD),
- /* K3 */ be_nested_str_weak(UPDATE_TIME),
+ ( &(const bvalue[ 5]) { /* constants */
+ /* K0 */ be_nested_str_weak(webserver),
+ /* K1 */ be_nested_str_weak(content_send),
+ /* K2 */ be_nested_str_weak(_X7C_X20_X26lt_X3B_X2D_X2D_X20_X28),
+ /* K3 */ be_nested_str_weak(NAME),
+ /* K4 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B),
}),
- be_str_weak(register_cmd_cb),
+ be_str_weak(web_values),
&be_const_str_solidified,
- ( &(const binstruction[ 8]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x8C040301, // 0001 GETMET R1 R1 K1
- 0x880C0102, // 0002 GETMBR R3 R0 K2
- 0x88100103, // 0003 GETMBR R4 R0 K3
- 0x84140000, // 0004 CLOSURE R5 P0
- 0x7C040800, // 0005 CALL R1 4
- 0xA0000000, // 0006 CLOSE R0
- 0x80000000, // 0007 RET 0
+ ( &(const binstruction[ 7]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0x8C080301, // 0001 GETMET R2 R1 K1
+ 0x88100103, // 0002 GETMBR R4 R0 K3
+ 0x00120404, // 0003 ADD R4 K2 R4
+ 0x00100904, // 0004 ADD R4 R4 K4
+ 0x7C080400, // 0005 CALL R2 2
+ 0x80000000, // 0006 RET 0
})
)
);
@@ -582,10 +619,15 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Bridge_HTTP,
1,
&be_class_Matter_Plugin_Device,
- be_nested_map(21,
+ be_nested_map(22,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_attribute_closure) },
- { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+ { be_const_key_weak(NAME, 2), be_nested_str_weak() },
+ { be_const_key_weak(web_values, 11), be_const_closure(Matter_Plugin_Bridge_HTTP_web_values_closure) },
+ { be_const_key_weak(web_value_onoff, 21), be_const_closure(Matter_Plugin_Bridge_HTTP_web_value_onoff_closure) },
+ { be_const_key_weak(register_cmd_cb, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb_closure) },
+ { 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(http_remote, -1), be_const_var(0) },
+ { 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(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -594,25 +636,21 @@ be_local_class(Matter_Plugin_Bridge_HTTP,
be_const_int(17),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(SYNC_TIMEOUT, -1), be_const_int(500) },
- { be_const_key_weak(http_remote, -1), be_const_var(0) },
- { be_const_key_weak(init, 17), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) },
- { be_const_key_weak(parse_http_response, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_http_response_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak() },
- { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Bridge_HTTP_update_shadow_closure) },
- { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_every_250ms_closure) },
- { 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(web_values, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_web_values_closure) },
- { be_const_key_weak(ARG_HTTP, 4), be_nested_str_weak(url) },
- { be_const_key_weak(PROBE_TIMEOUT, 18), be_const_int(1700) },
- { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_update_closure) },
- { be_const_key_weak(NAME, 6), be_nested_str_weak() },
- { be_const_key_weak(call_remote_sync, 14), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2011) },
+ { be_const_key_weak(parse_http_response, 19), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_http_response_closure) },
+ { be_const_key_weak(call_remote_sync, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) },
+ { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_parse_update_closure) },
+ { be_const_key_weak(ARG_HTTP, 16), be_nested_str_weak(url) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak() },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_attribute_closure) },
+ { be_const_key_weak(PROBE_TIMEOUT, 13), be_const_int(1700) },
{ 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(ui_conf_to_string, 3), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string_closure) },
- { be_const_key_weak(register_cmd_cb, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_register_cmd_cb_closure) },
+ { be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Bridge_HTTP_update_shadow_closure) },
+ { be_const_key_weak(every_250ms, 5), be_const_closure(Matter_Plugin_Bridge_HTTP_every_250ms_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) },
+ { be_const_key_weak(UPDATE_TIME, 1), be_const_int(3000) },
+ { be_const_key_weak(SYNC_TIMEOUT, -1), be_const_int(500) },
})),
be_str_weak(Matter_Plugin_Bridge_HTTP)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h
index 3da8f171b209..25839355be1c 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light0.h
@@ -6,6 +6,156 @@
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_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:
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Light0__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: web_values
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Light0_web_values, /* 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[ 7]) { /* 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(format),
+ /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s),
+ /* K5 */ be_nested_str_weak(web_value_onoff),
+ /* K6 */ be_nested_str_weak(shadow_onoff),
+ }),
+ be_str_weak(web_values),
+ &be_const_str_solidified,
+ ( &(const binstruction[11]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x8C140503, // 0003 GETMET R5 R2 K3
+ 0x581C0004, // 0004 LDCONST R7 K4
+ 0x8C200105, // 0005 GETMET R8 R0 K5
+ 0x88280106, // 0006 GETMBR R10 R0 K6
+ 0x7C200400, // 0007 CALL R8 2
+ 0x7C140600, // 0008 CALL R5 3
+ 0x7C0C0400, // 0009 CALL R3 2
+ 0x80000000, // 000A RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
/********************************************************************
** Solidified function: init
********************************************************************/
@@ -60,73 +210,47 @@ be_local_closure(Matter_Plugin_Bridge_Light0_init, /* name */
/********************************************************************
-** Solidified function: parse_update
+** Solidified function: set_onoff
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0_parse_update, /* name */
+be_local_closure(Matter_Plugin_Bridge_Light0_set_onoff, /* name */
be_nested_proto(
- 8, /* nstack */
- 3, /* 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[ 9]) { /* constants */
- /* K0 */ be_nested_str_weak(tasmota_relay_index),
- /* K1 */ be_const_int(1),
- /* K2 */ be_nested_str_weak(contains),
- /* K3 */ be_nested_str_weak(POWER),
- /* K4 */ be_nested_str_weak(find),
- /* K5 */ be_nested_str_weak(ON),
- /* K6 */ be_nested_str_weak(shadow_onoff),
- /* K7 */ be_nested_str_weak(attribute_updated),
- /* K8 */ be_const_int(0),
+ ( &(const bvalue[ 6]) { /* constants */
+ /* K0 */ be_nested_str_weak(call_remote_sync),
+ /* K1 */ be_nested_str_weak(Power),
+ /* K2 */ be_nested_str_weak(tasmota_relay_index),
+ /* K3 */ be_nested_str_weak(1),
+ /* K4 */ be_nested_str_weak(0),
+ /* K5 */ be_nested_str_weak(parse_update),
}),
- be_str_weak(parse_update),
+ be_str_weak(set_onoff),
&be_const_str_solidified,
- ( &(const binstruction[41]) { /* code */
- 0x540E000A, // 0000 LDINT R3 11
- 0x1C0C0403, // 0001 EQ R3 R2 R3
- 0x780E0024, // 0002 JMPF R3 #0028
- 0x500C0000, // 0003 LDBOOL R3 0 0
- 0x88100100, // 0004 GETMBR R4 R0 K0
- 0x1C100901, // 0005 EQ R4 R4 K1
- 0x78120009, // 0006 JMPF R4 #0011
- 0x8C100302, // 0007 GETMET R4 R1 K2
- 0x58180003, // 0008 LDCONST R6 K3
- 0x7C100400, // 0009 CALL R4 2
- 0x78120005, // 000A JMPF R4 #0011
- 0x8C100304, // 000B GETMET R4 R1 K4
- 0x58180003, // 000C LDCONST R6 K3
- 0x7C100400, // 000D CALL R4 2
- 0x1C100905, // 000E EQ R4 R4 K5
- 0x5C0C0800, // 000F MOVE R3 R4
- 0x70020007, // 0010 JMP #0019
- 0x8C100304, // 0011 GETMET R4 R1 K4
- 0x60180008, // 0012 GETGBL R6 G8
- 0x881C0100, // 0013 GETMBR R7 R0 K0
- 0x7C180200, // 0014 CALL R6 1
- 0x001A0606, // 0015 ADD R6 K3 R6
- 0x7C100400, // 0016 CALL R4 2
- 0x1C100905, // 0017 EQ R4 R4 K5
- 0x5C0C0800, // 0018 MOVE R3 R4
- 0x88100106, // 0019 GETMBR R4 R0 K6
- 0x4C140000, // 001A LDNIL R5
- 0x20100805, // 001B NE R4 R4 R5
- 0x78120009, // 001C JMPF R4 #0027
- 0x88100106, // 001D GETMBR R4 R0 K6
- 0x60140017, // 001E GETGBL R5 G23
- 0x5C180600, // 001F MOVE R6 R3
- 0x7C140200, // 0020 CALL R5 1
- 0x20100805, // 0021 NE R4 R4 R5
- 0x78120003, // 0022 JMPF R4 #0027
- 0x8C100107, // 0023 GETMET R4 R0 K7
- 0x541A0005, // 0024 LDINT R6 6
- 0x581C0008, // 0025 LDCONST R7 K8
- 0x7C100600, // 0026 CALL R4 3
- 0x90020C03, // 0027 SETMBR R0 K6 R3
- 0x80000000, // 0028 RET 0
+ ( &(const binstruction[18]) { /* code */
+ 0x8C080100, // 0000 GETMET R2 R0 K0
+ 0x60100008, // 0001 GETGBL R4 G8
+ 0x88140102, // 0002 GETMBR R5 R0 K2
+ 0x7C100200, // 0003 CALL R4 1
+ 0x00120204, // 0004 ADD R4 K1 R4
+ 0x78060001, // 0005 JMPF R1 #0008
+ 0x58140003, // 0006 LDCONST R5 K3
+ 0x70020000, // 0007 JMP #0009
+ 0x58140004, // 0008 LDCONST R5 K4
+ 0x7C080600, // 0009 CALL R2 3
+ 0x4C0C0000, // 000A LDNIL R3
+ 0x200C0403, // 000B NE R3 R2 R3
+ 0x780E0003, // 000C JMPF R3 #0011
+ 0x8C0C0105, // 000D GETMET R3 R0 K5
+ 0x5C140400, // 000E MOVE R5 R2
+ 0x541A000A, // 000F LDINT R6 11
+ 0x7C0C0600, // 0010 CALL R3 3
+ 0x80000000, // 0011 RET 0
})
)
);
@@ -204,166 +328,11 @@ be_local_closure(Matter_Plugin_Bridge_Light0_invoke_request, /* name */
/********************************************************************
-** Solidified function: set_onoff
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0_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[ 6]) { /* constants */
- /* K0 */ be_nested_str_weak(call_remote_sync),
- /* K1 */ be_nested_str_weak(Power),
- /* K2 */ be_nested_str_weak(tasmota_relay_index),
- /* K3 */ be_nested_str_weak(1),
- /* K4 */ be_nested_str_weak(0),
- /* K5 */ be_nested_str_weak(parse_update),
- }),
- be_str_weak(set_onoff),
- &be_const_str_solidified,
- ( &(const binstruction[18]) { /* code */
- 0x8C080100, // 0000 GETMET R2 R0 K0
- 0x60100008, // 0001 GETGBL R4 G8
- 0x88140102, // 0002 GETMBR R5 R0 K2
- 0x7C100200, // 0003 CALL R4 1
- 0x00120204, // 0004 ADD R4 K1 R4
- 0x78060001, // 0005 JMPF R1 #0008
- 0x58140003, // 0006 LDCONST R5 K3
- 0x70020000, // 0007 JMP #0009
- 0x58140004, // 0008 LDCONST R5 K4
- 0x7C080600, // 0009 CALL R2 3
- 0x4C0C0000, // 000A LDNIL R3
- 0x200C0403, // 000B NE R3 R2 R3
- 0x780E0003, // 000C JMPF R3 #0011
- 0x8C0C0105, // 000D GETMET R3 R0 K5
- 0x5C140400, // 000E MOVE R5 R2
- 0x541A000A, // 000F LDINT R6 11
- 0x7C0C0600, // 0010 CALL R3 3
- 0x80000000, // 0011 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function:
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0__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: web_values
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0_web_values, /* 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[ 6]) { /* 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(format),
- /* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s),
- /* K5 */ be_nested_str_weak(web_value_onoff),
- }),
- be_str_weak(web_values),
- &be_const_str_solidified,
- ( &(const binstruction[10]) { /* code */
- 0xA4060000, // 0000 IMPORT R1 K0
- 0xA40A0200, // 0001 IMPORT R2 K1
- 0x8C0C0302, // 0002 GETMET R3 R1 K2
- 0x8C140503, // 0003 GETMET R5 R2 K3
- 0x581C0004, // 0004 LDCONST R7 K4
- 0x8C200105, // 0005 GETMET R8 R0 K5
- 0x7C200200, // 0006 CALL R8 1
- 0x7C140600, // 0007 CALL R5 3
- 0x7C0C0400, // 0008 CALL R3 2
- 0x80000000, // 0009 RET 0
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: web_value_onoff
-********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0_web_value_onoff, /* 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(shadow_onoff),
- /* K1 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E),
- /* K2 */ be_nested_str_weak(Off),
- /* K3 */ be_nested_str_weak(),
- }),
- be_str_weak(web_value_onoff),
- &be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
- 0x88040100, // 0000 GETMBR R1 R0 K0
- 0x4C080000, // 0001 LDNIL R2
- 0x20040202, // 0002 NE R1 R1 R2
- 0x78060005, // 0003 JMPF R1 #000A
- 0x88040100, // 0004 GETMBR R1 R0 K0
- 0x78060001, // 0005 JMPF R1 #0008
- 0x58040001, // 0006 LDCONST R1 K1
- 0x70020000, // 0007 JMP #0009
- 0x58040002, // 0008 LDCONST R1 K2
- 0x70020000, // 0009 JMP #000B
- 0x58040003, // 000A LDCONST R1 K3
- 0x80040200, // 000B RET 1 R1
- })
- )
-);
-/*******************************************************************/
-
-
-/********************************************************************
-** Solidified function: read_attribute
+** Solidified function: parse_update
********************************************************************/
-be_local_closure(Matter_Plugin_Bridge_Light0_read_attribute, /* name */
+be_local_closure(Matter_Plugin_Bridge_Light0_parse_update, /* name */
be_nested_proto(
- 11, /* nstack */
+ 8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
@@ -371,68 +340,61 @@ be_local_closure(Matter_Plugin_Bridge_Light0_read_attribute, /* name */
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),
+ ( &(const bvalue[ 9]) { /* constants */
+ /* K0 */ be_nested_str_weak(tasmota_relay_index),
+ /* K1 */ be_const_int(1),
+ /* K2 */ be_nested_str_weak(contains),
+ /* K3 */ be_nested_str_weak(POWER),
+ /* K4 */ be_nested_str_weak(find),
+ /* K5 */ be_nested_str_weak(ON),
+ /* K6 */ be_nested_str_weak(shadow_onoff),
+ /* K7 */ be_nested_str_weak(attribute_updated),
+ /* K8 */ be_const_int(0),
}),
- be_str_weak(read_attribute),
+ be_str_weak(parse_update),
&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
+ ( &(const binstruction[41]) { /* code */
+ 0x540E000A, // 0000 LDINT R3 11
+ 0x1C0C0403, // 0001 EQ R3 R2 R3
+ 0x780E0024, // 0002 JMPF R3 #0028
+ 0x500C0000, // 0003 LDBOOL R3 0 0
+ 0x88100100, // 0004 GETMBR R4 R0 K0
+ 0x1C100901, // 0005 EQ R4 R4 K1
+ 0x78120009, // 0006 JMPF R4 #0011
+ 0x8C100302, // 0007 GETMET R4 R1 K2
+ 0x58180003, // 0008 LDCONST R6 K3
+ 0x7C100400, // 0009 CALL R4 2
+ 0x78120005, // 000A JMPF R4 #0011
+ 0x8C100304, // 000B GETMET R4 R1 K4
+ 0x58180003, // 000C LDCONST R6 K3
+ 0x7C100400, // 000D CALL R4 2
+ 0x1C100905, // 000E EQ R4 R4 K5
+ 0x5C0C0800, // 000F MOVE R3 R4
+ 0x70020007, // 0010 JMP #0019
+ 0x8C100304, // 0011 GETMET R4 R1 K4
+ 0x60180008, // 0012 GETGBL R6 G8
+ 0x881C0100, // 0013 GETMBR R7 R0 K0
+ 0x7C180200, // 0014 CALL R6 1
+ 0x001A0606, // 0015 ADD R6 K3 R6
+ 0x7C100400, // 0016 CALL R4 2
+ 0x1C100905, // 0017 EQ R4 R4 K5
+ 0x5C0C0800, // 0018 MOVE R3 R4
+ 0x88100106, // 0019 GETMBR R4 R0 K6
+ 0x4C140000, // 001A LDNIL R5
+ 0x20100805, // 001B NE R4 R4 R5
+ 0x78120009, // 001C JMPF R4 #0027
+ 0x88100106, // 001D GETMBR R4 R0 K6
+ 0x60140017, // 001E GETGBL R5 G23
+ 0x5C180600, // 001F MOVE R6 R3
+ 0x7C140200, // 0020 CALL R5 1
+ 0x20100805, // 0021 NE R4 R4 R5
+ 0x78120003, // 0022 JMPF R4 #0027
+ 0x8C100107, // 0023 GETMET R4 R0 K7
+ 0x541A0005, // 0024 LDINT R6 6
+ 0x581C0008, // 0025 LDCONST R7 K8
+ 0x7C100600, // 0026 CALL R4 3
+ 0x90020C03, // 0027 SETMBR R0 K6 R3
+ 0x80000000, // 0028 RET 0
})
)
);
@@ -446,25 +408,25 @@ extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Light0,
2,
&be_class_Matter_Plugin_Bridge_HTTP,
- be_nested_map(15,
+ be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Light0_init_closure) },
- { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Light0_parse_update_closure) },
- { be_const_key_weak(invoke_request, 14), be_const_closure(Matter_Plugin_Bridge_Light0_invoke_request_closure) },
- { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Bridge_Light0_set_onoff_closure) },
- { be_const_key_weak(ARG_TYPE, 11), be_const_static_closure(Matter_Plugin_Bridge_Light0__X3Clambda_X3E_closure) },
- { be_const_key_weak(tasmota_relay_index, 7), be_const_var(0) },
+ { be_const_key_weak(read_attribute, 11), be_const_closure(Matter_Plugin_Bridge_Light0_read_attribute_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
+ { be_const_key_weak(ARG_TYPE, 12), be_const_static_closure(Matter_Plugin_Bridge_Light0__X3Clambda_X3E_closure) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) },
+ { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Light0_web_values_closure) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Light0_init_closure) },
+ { be_const_key_weak(set_onoff, 13), be_const_closure(Matter_Plugin_Bridge_Light0_set_onoff_closure) },
+ { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Bridge_Light0_invoke_request_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X200_X20On) },
+ { 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(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
{ be_const_key_int(19, -1), be_const_int(1) },
})) ) } )) },
- { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) },
- { be_const_key_weak(NAME, 6), be_nested_str_weak(_X26_X23x1F517_X3B_X20Light_X200_X20On) },
- { be_const_key_weak(web_value_onoff, -1), be_const_closure(Matter_Plugin_Bridge_Light0_web_value_onoff_closure) },
- { be_const_key_weak(CLUSTERS, 8), 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(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@@ -475,9 +437,8 @@ be_local_class(Matter_Plugin_Bridge_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
- { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Light0_read_attribute_closure) },
+ { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Light0_parse_update_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
- { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Light0_web_values_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light0)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h
index 2ff2c9f37b67..d82710edf75e 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light1.h
@@ -286,30 +286,32 @@ be_local_closure(Matter_Plugin_Bridge_Light1_web_values, /* 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(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(format),
/* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s),
/* K5 */ be_nested_str_weak(web_value_onoff),
- /* K6 */ be_nested_str_weak(web_value_dimmer),
+ /* K6 */ be_nested_str_weak(shadow_onoff),
+ /* K7 */ be_nested_str_weak(web_value_dimmer),
}),
be_str_weak(web_values),
&be_const_str_solidified,
- ( &(const binstruction[12]) { /* code */
+ ( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x8C0C0302, // 0002 GETMET R3 R1 K2
0x8C140503, // 0003 GETMET R5 R2 K3
0x581C0004, // 0004 LDCONST R7 K4
0x8C200105, // 0005 GETMET R8 R0 K5
- 0x7C200200, // 0006 CALL R8 1
- 0x8C240106, // 0007 GETMET R9 R0 K6
- 0x7C240200, // 0008 CALL R9 1
- 0x7C140800, // 0009 CALL R5 4
- 0x7C0C0400, // 000A CALL R3 2
- 0x80000000, // 000B RET 0
+ 0x88280106, // 0006 GETMBR R10 R0 K6
+ 0x7C200400, // 0007 CALL R8 2
+ 0x8C240107, // 0008 GETMET R9 R0 K7
+ 0x7C240200, // 0009 CALL R9 1
+ 0x7C140800, // 000A CALL R5 4
+ 0x7C0C0400, // 000B CALL R3 2
+ 0x80000000, // 000C RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h
index 88870f768b7b..b6a09c24ef34 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light2.h
@@ -122,33 +122,35 @@ be_local_closure(Matter_Plugin_Bridge_Light2_web_values, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
+ ( &(const bvalue[ 9]) { /* 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(format),
/* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s_X20_X25s),
/* K5 */ be_nested_str_weak(web_value_onoff),
- /* K6 */ be_nested_str_weak(web_value_dimmer),
- /* K7 */ be_nested_str_weak(web_value_ct),
+ /* K6 */ be_nested_str_weak(shadow_onoff),
+ /* K7 */ be_nested_str_weak(web_value_dimmer),
+ /* K8 */ be_nested_str_weak(web_value_ct),
}),
be_str_weak(web_values),
&be_const_str_solidified,
- ( &(const binstruction[14]) { /* code */
+ ( &(const binstruction[15]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x8C0C0302, // 0002 GETMET R3 R1 K2
0x8C140503, // 0003 GETMET R5 R2 K3
0x581C0004, // 0004 LDCONST R7 K4
0x8C200105, // 0005 GETMET R8 R0 K5
- 0x7C200200, // 0006 CALL R8 1
- 0x8C240106, // 0007 GETMET R9 R0 K6
- 0x7C240200, // 0008 CALL R9 1
- 0x8C280107, // 0009 GETMET R10 R0 K7
- 0x7C280200, // 000A CALL R10 1
- 0x7C140A00, // 000B CALL R5 5
- 0x7C0C0400, // 000C CALL R3 2
- 0x80000000, // 000D RET 0
+ 0x88280106, // 0006 GETMBR R10 R0 K6
+ 0x7C200400, // 0007 CALL R8 2
+ 0x8C240107, // 0008 GETMET R9 R0 K7
+ 0x7C240200, // 0009 CALL R9 1
+ 0x8C280108, // 000A GETMET R10 R0 K8
+ 0x7C280200, // 000B CALL R10 1
+ 0x7C140A00, // 000C CALL R5 5
+ 0x7C0C0400, // 000D CALL R3 2
+ 0x80000000, // 000E RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h
index 13daccf0e19b..d9af0894e7b6 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Light3.h
@@ -176,33 +176,35 @@ be_local_closure(Matter_Plugin_Bridge_Light3_web_values, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
- ( &(const bvalue[ 8]) { /* constants */
+ ( &(const bvalue[ 9]) { /* 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(format),
/* K4 */ be_nested_str_weak(_X7C_X20Light_X20_X25s_X20_X25s_X20_X25s),
/* K5 */ be_nested_str_weak(web_value_onoff),
- /* K6 */ be_nested_str_weak(web_value_dimmer),
- /* K7 */ be_nested_str_weak(web_value_RGB),
+ /* K6 */ be_nested_str_weak(shadow_onoff),
+ /* K7 */ be_nested_str_weak(web_value_dimmer),
+ /* K8 */ be_nested_str_weak(web_value_RGB),
}),
be_str_weak(web_values),
&be_const_str_solidified,
- ( &(const binstruction[14]) { /* code */
+ ( &(const binstruction[15]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x8C0C0302, // 0002 GETMET R3 R1 K2
0x8C140503, // 0003 GETMET R5 R2 K3
0x581C0004, // 0004 LDCONST R7 K4
0x8C200105, // 0005 GETMET R8 R0 K5
- 0x7C200200, // 0006 CALL R8 1
- 0x8C240106, // 0007 GETMET R9 R0 K6
- 0x7C240200, // 0008 CALL R9 1
- 0x8C280107, // 0009 GETMET R10 R0 K7
- 0x7C280200, // 000A CALL R10 1
- 0x7C140A00, // 000B CALL R5 5
- 0x7C0C0400, // 000C CALL R3 2
- 0x80000000, // 000D RET 0
+ 0x88280106, // 0006 GETMBR R10 R0 K6
+ 0x7C200400, // 0007 CALL R8 2
+ 0x8C240107, // 0008 GETMET R9 R0 K7
+ 0x7C240200, // 0009 CALL R9 1
+ 0x8C280108, // 000A GETMET R10 R0 K8
+ 0x7C280200, // 000B CALL R10 1
+ 0x7C140A00, // 000C CALL R5 5
+ 0x7C0C0400, // 000D CALL R3 2
+ 0x80000000, // 000E RET 0
})
)
);
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
index d80c3e6faf04..a547e02c6a88 100644
--- 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
@@ -11,7 +11,7 @@ extern const bclass be_class_Matter_Plugin_Bridge_OnOff;
********************************************************************/
be_local_closure(Matter_Plugin_Bridge_OnOff_web_values, /* name */
be_nested_proto(
- 11, /* nstack */
+ 12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@@ -19,7 +19,7 @@ be_local_closure(Matter_Plugin_Bridge_OnOff_web_values, /* 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(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(content_send),
@@ -27,10 +27,11 @@ be_local_closure(Matter_Plugin_Bridge_OnOff_web_values, /* name */
/* K4 */ be_nested_str_weak(_X7C_X20Relay_X20_X25i_X20_X25s),
/* K5 */ be_nested_str_weak(tasmota_relay_index),
/* K6 */ be_nested_str_weak(web_value_onoff),
+ /* K7 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(web_values),
&be_const_str_solidified,
- ( &(const binstruction[11]) { /* code */
+ ( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0x8C0C0302, // 0002 GETMET R3 R1 K2
@@ -38,10 +39,11 @@ be_local_closure(Matter_Plugin_Bridge_OnOff_web_values, /* name */
0x581C0004, // 0004 LDCONST R7 K4
0x88200105, // 0005 GETMBR R8 R0 K5
0x8C240106, // 0006 GETMET R9 R0 K6
- 0x7C240200, // 0007 CALL R9 1
- 0x7C140800, // 0008 CALL R5 4
- 0x7C0C0400, // 0009 CALL R3 2
- 0x80000000, // 000A RET 0
+ 0x882C0107, // 0007 GETMBR R11 R0 K7
+ 0x7C240400, // 0008 CALL R9 2
+ 0x7C140800, // 0009 CALL R5 4
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x80000000, // 000B RET 0
})
)
);
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h
new file mode 100644
index 000000000000..5edda2ce7945
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h
@@ -0,0 +1,348 @@
+/* Solidification of Matter_Plugin_Bridge_Sensor_Occupancy.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
+
+/********************************************************************
+** Solidified function: web_values
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Occupancy_web_values, /* 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[ 8]) { /* 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(format),
+ /* K4 */ be_nested_str_weak(_X7C_X20Occupancy_X25i_X20_X25s),
+ /* K5 */ be_nested_str_weak(tasmota_switch_index),
+ /* K6 */ be_nested_str_weak(web_value_onoff),
+ /* K7 */ be_nested_str_weak(shadow_occupancy),
+ }),
+ be_str_weak(web_values),
+ &be_const_str_solidified,
+ ( &(const binstruction[12]) { /* code */
+ 0xA4060000, // 0000 IMPORT R1 K0
+ 0xA40A0200, // 0001 IMPORT R2 K1
+ 0x8C0C0302, // 0002 GETMET R3 R1 K2
+ 0x8C140503, // 0003 GETMET R5 R2 K3
+ 0x581C0004, // 0004 LDCONST R7 K4
+ 0x88200105, // 0005 GETMBR R8 R0 K5
+ 0x8C240106, // 0006 GETMET R9 R0 K6
+ 0x882C0107, // 0007 GETMBR R11 R0 K7
+ 0x7C240400, // 0008 CALL R9 2
+ 0x7C140800, // 0009 CALL R5 4
+ 0x7C0C0400, // 000A CALL R3 2
+ 0x80000000, // 000B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Occupancy_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[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_occupancy),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U1),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_const_int(2),
+ /* K13 */ be_nested_str_weak(U4),
+ /* K14 */ 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
+ 0x541E0405, // 0005 LDINT R7 1030
+ 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
+ 0x5828000B, // 001E LDCONST R10 K11
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x80040E00, // 0020 RET 1 R7
+ 0x70020018, // 0021 JMP #003B
+ 0x1C1C0D0C, // 0022 EQ R7 R6 K12
+ 0x781E0005, // 0023 JMPF R7 #002A
+ 0x8C1C0907, // 0024 GETMET R7 R4 K7
+ 0x88240908, // 0025 GETMBR R9 R4 K8
+ 0x58280005, // 0026 LDCONST R10 K5
+ 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
+ 0x8824090D, // 002E GETMBR R9 R4 K13
+ 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
+ 0x8824090D, // 0037 GETMBR R9 R4 K13
+ 0x5828000B, // 0038 LDCONST R10 K11
+ 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
+ 0x8C1C0F0E, // 003F GETMET R7 R7 K14
+ 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 function: parse_update
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Occupancy_parse_update, /* name */
+ be_nested_proto(
+ 8, /* nstack */
+ 3, /* 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(find),
+ /* K1 */ be_nested_str_weak(Switch),
+ /* K2 */ be_nested_str_weak(tasmota_switch_index),
+ /* K3 */ be_nested_str_weak(ON),
+ /* K4 */ be_nested_str_weak(shadow_occupancy),
+ /* K5 */ be_nested_str_weak(attribute_updated),
+ /* K6 */ be_const_int(0),
+ }),
+ be_str_weak(parse_update),
+ &be_const_str_solidified,
+ ( &(const binstruction[28]) { /* code */
+ 0x540E0007, // 0000 LDINT R3 8
+ 0x1C0C0403, // 0001 EQ R3 R2 R3
+ 0x780E0017, // 0002 JMPF R3 #001B
+ 0x500C0000, // 0003 LDBOOL R3 0 0
+ 0x8C100300, // 0004 GETMET R4 R1 K0
+ 0x60180008, // 0005 GETGBL R6 G8
+ 0x881C0102, // 0006 GETMBR R7 R0 K2
+ 0x7C180200, // 0007 CALL R6 1
+ 0x001A0206, // 0008 ADD R6 K1 R6
+ 0x7C100400, // 0009 CALL R4 2
+ 0x1C100903, // 000A EQ R4 R4 K3
+ 0x5C0C0800, // 000B MOVE R3 R4
+ 0x88100104, // 000C GETMBR R4 R0 K4
+ 0x4C140000, // 000D LDNIL R5
+ 0x20100805, // 000E NE R4 R4 R5
+ 0x78120009, // 000F JMPF R4 #001A
+ 0x88100104, // 0010 GETMBR R4 R0 K4
+ 0x60140017, // 0011 GETGBL R5 G23
+ 0x5C180600, // 0012 MOVE R6 R3
+ 0x7C140200, // 0013 CALL R5 1
+ 0x20100805, // 0014 NE R4 R4 R5
+ 0x78120003, // 0015 JMPF R4 #001A
+ 0x8C100105, // 0016 GETMET R4 R0 K5
+ 0x541A0405, // 0017 LDINT R6 1030
+ 0x581C0006, // 0018 LDCONST R7 K6
+ 0x7C100600, // 0019 CALL R4 3
+ 0x90020803, // 001A SETMBR R0 K4 R3
+ 0x80000000, // 001B RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Occupancy__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_Sensor_Occupancy_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(tasmota_switch_index),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(ARG),
+ /* K4 */ be_const_int(1),
+ /* 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
+ 0x60100009, // 0008 GETGBL R4 G9
+ 0x8C140702, // 0009 GETMET R5 R3 K2
+ 0x881C0103, // 000A GETMBR R7 R0 K3
+ 0x58200004, // 000B LDCONST R8 K4
+ 0x7C140600, // 000C CALL R5 3
+ 0x7C100200, // 000D CALL R4 1
+ 0x90020204, // 000E SETMBR R0 K1 R4
+ 0x88100101, // 000F GETMBR R4 R0 K1
+ 0x18100905, // 0010 LE R4 R4 K5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020304, // 0012 SETMBR R0 K1 K4
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Bridge_Sensor_Occupancy
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
+be_local_class(Matter_Plugin_Bridge_Sensor_Occupancy,
+ 2,
+ &be_class_Matter_Plugin_Bridge_HTTP,
+ be_nested_map(14,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(CLUSTERS, 6), 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(1030, -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_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
+ { be_const_key_weak(UPDATE_TIME, 7), be_const_int(5000) },
+ { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_occupancy) },
+ { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Occupancy_web_values_closure) },
+ { be_const_key_weak(UPDATE_CMD, 9), be_nested_str_weak(Status_X208) },
+ { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Occupancy_read_attribute_closure) },
+ { be_const_key_weak(tasmota_switch_index, 11), be_const_var(0) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Occupancy) },
+ { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Occupancy_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(2,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_int(263, -1), be_const_int(2) },
+ { be_const_key_int(19, 0), be_const_int(1) },
+ })) ) } )) },
+ { be_const_key_weak(ARG_TYPE, 12), be_const_static_closure(Matter_Plugin_Bridge_Sensor_Occupancy__X3Clambda_X3E_closure) },
+ { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Occupancy_parse_update_closure) },
+ { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
+ })),
+ be_str_weak(Matter_Plugin_Bridge_Sensor_Occupancy)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Bridge_Sensor_Occupancy_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Occupancy);
+ be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Occupancy");
+ be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */
diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Occupancy.h
new file mode 100644
index 000000000000..5ce78e2dd467
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Occupancy.h
@@ -0,0 +1,324 @@
+/* Solidification of Matter_Plugin_Sensor_Occupancy.h */
+/********************************************************************\
+* Generated code, don't edit *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Occupancy_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(tasmota_switch_index),
+ /* K2 */ be_nested_str_weak(find),
+ /* K3 */ be_nested_str_weak(ARG),
+ /* K4 */ be_const_int(1),
+ /* 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
+ 0x60100009, // 0008 GETGBL R4 G9
+ 0x8C140702, // 0009 GETMET R5 R3 K2
+ 0x881C0103, // 000A GETMBR R7 R0 K3
+ 0x58200004, // 000B LDCONST R8 K4
+ 0x7C140600, // 000C CALL R5 3
+ 0x7C100200, // 000D CALL R4 1
+ 0x90020204, // 000E SETMBR R0 K1 R4
+ 0x88100101, // 000F GETMBR R4 R0 K1
+ 0x18100905, // 0010 LE R4 R4 K5
+ 0x78120000, // 0011 JMPF R4 #0013
+ 0x90020304, // 0012 SETMBR R0 K1 K4
+ 0x80000000, // 0013 RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function:
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Occupancy__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_Sensor_Occupancy_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[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_occupancy),
+ /* K7 */ be_nested_str_weak(create_TLV),
+ /* K8 */ be_nested_str_weak(U1),
+ /* K9 */ be_nested_str_weak(NULL),
+ /* K10 */ be_const_int(1),
+ /* K11 */ be_const_int(3),
+ /* K12 */ be_const_int(2),
+ /* K13 */ be_nested_str_weak(U4),
+ /* K14 */ 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
+ 0x541E0405, // 0005 LDINT R7 1030
+ 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
+ 0x5828000B, // 001E LDCONST R10 K11
+ 0x7C1C0600, // 001F CALL R7 3
+ 0x80040E00, // 0020 RET 1 R7
+ 0x70020018, // 0021 JMP #003B
+ 0x1C1C0D0C, // 0022 EQ R7 R6 K12
+ 0x781E0005, // 0023 JMPF R7 #002A
+ 0x8C1C0907, // 0024 GETMET R7 R4 K7
+ 0x88240908, // 0025 GETMBR R9 R4 K8
+ 0x58280005, // 0026 LDCONST R10 K5
+ 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
+ 0x8824090D, // 002E GETMBR R9 R4 K13
+ 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
+ 0x8824090D, // 0037 GETMBR R9 R4 K13
+ 0x5828000B, // 0038 LDCONST R10 K11
+ 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
+ 0x8C1C0F0E, // 003F GETMET R7 R7 K14
+ 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 function: update_shadow
+********************************************************************/
+be_local_closure(Matter_Plugin_Sensor_Occupancy_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[13]) { /* constants */
+ /* K0 */ be_nested_str_weak(update_shadow),
+ /* K1 */ be_nested_str_weak(json),
+ /* K2 */ be_nested_str_weak(tasmota),
+ /* K3 */ be_nested_str_weak(cmd),
+ /* K4 */ be_nested_str_weak(Status_X208),
+ /* K5 */ be_nested_str_weak(load),
+ /* K6 */ be_nested_str_weak(find),
+ /* K7 */ be_nested_str_weak(Switch),
+ /* K8 */ be_nested_str_weak(tasmota_switch_index),
+ /* K9 */ be_nested_str_weak(ON),
+ /* K10 */ be_nested_str_weak(shadow_occupancy),
+ /* K11 */ be_nested_str_weak(attribute_updated),
+ /* K12 */ be_const_int(0),
+ }),
+ be_str_weak(update_shadow),
+ &be_const_str_solidified,
+ ( &(const binstruction[45]) { /* code */
+ 0x60040003, // 0000 GETGBL R1 G3
+ 0x5C080000, // 0001 MOVE R2 R0
+ 0x7C040200, // 0002 CALL R1 1
+ 0x8C040300, // 0003 GETMET R1 R1 K0
+ 0x7C040200, // 0004 CALL R1 1
+ 0xA4060200, // 0005 IMPORT R1 K1
+ 0xB80A0400, // 0006 GETNGBL R2 K2
+ 0x8C080503, // 0007 GETMET R2 R2 K3
+ 0x58100004, // 0008 LDCONST R4 K4
+ 0x50140200, // 0009 LDBOOL R5 1 0
+ 0x7C080600, // 000A CALL R2 3
+ 0x4C0C0000, // 000B LDNIL R3
+ 0x200C0403, // 000C NE R3 R2 R3
+ 0x780E001D, // 000D JMPF R3 #002C
+ 0x8C0C0305, // 000E GETMET R3 R1 K5
+ 0x5C140400, // 000F MOVE R5 R2
+ 0x7C0C0400, // 0010 CALL R3 2
+ 0x4C100000, // 0011 LDNIL R4
+ 0x20100604, // 0012 NE R4 R3 R4
+ 0x78120017, // 0013 JMPF R4 #002C
+ 0x50100000, // 0014 LDBOOL R4 0 0
+ 0x8C140706, // 0015 GETMET R5 R3 K6
+ 0x601C0008, // 0016 GETGBL R7 G8
+ 0x88200108, // 0017 GETMBR R8 R0 K8
+ 0x7C1C0200, // 0018 CALL R7 1
+ 0x001E0E07, // 0019 ADD R7 K7 R7
+ 0x7C140400, // 001A CALL R5 2
+ 0x1C140B09, // 001B EQ R5 R5 K9
+ 0x5C100A00, // 001C MOVE R4 R5
+ 0x8814010A, // 001D GETMBR R5 R0 K10
+ 0x4C180000, // 001E LDNIL R6
+ 0x20140A06, // 001F NE R5 R5 R6
+ 0x78160009, // 0020 JMPF R5 #002B
+ 0x8814010A, // 0021 GETMBR R5 R0 K10
+ 0x60180017, // 0022 GETGBL R6 G23
+ 0x5C1C0800, // 0023 MOVE R7 R4
+ 0x7C180200, // 0024 CALL R6 1
+ 0x20140A06, // 0025 NE R5 R5 R6
+ 0x78160003, // 0026 JMPF R5 #002B
+ 0x8C14010B, // 0027 GETMET R5 R0 K11
+ 0x541E0405, // 0028 LDINT R7 1030
+ 0x5820000C, // 0029 LDCONST R8 K12
+ 0x7C140600, // 002A CALL R5 3
+ 0x90021404, // 002B SETMBR R0 K10 R4
+ 0x80000000, // 002C RET 0
+ })
+ )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Sensor_Occupancy
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Device;
+be_local_class(Matter_Plugin_Sensor_Occupancy,
+ 2,
+ &be_class_Matter_Plugin_Device,
+ be_nested_map(12,
+ ( (struct bmapnode*) &(const bmapnode[]) {
+ { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
+ { be_const_key_weak(TYPE, 9), be_nested_str_weak(occupancy) },
+ { 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(263, -1), be_const_int(2) },
+ })) ) } )) },
+ { be_const_key_weak(init, 11), be_const_closure(Matter_Plugin_Sensor_Occupancy_init_closure) },
+ { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) },
+ { be_const_key_weak(NAME, -1), be_nested_str_weak(Occupancy) },
+ { be_const_key_weak(read_attribute, 5), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) },
+ { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
+ { 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(1030, -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_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) },
+ { be_const_key_weak(tasmota_switch_index, 8), be_const_var(0) },
+ { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
+ })),
+ be_str_weak(Matter_Plugin_Sensor_Occupancy)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Sensor_Occupancy_class(bvm *vm) {
+ be_pushntvclass(vm, &be_class_Matter_Plugin_Sensor_Occupancy);
+ be_setglobal(vm, "Matter_Plugin_Sensor_Occupancy");
+ 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 fe0022411243..5081bf00b0ef 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -1969,7 +1969,7 @@ be_local_class(Matter_UI,
NULL,
be_nested_map(19,
( (struct bmapnode*) &(const bmapnode[]) {
- { be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) },
+ { be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(show_enable, -1), be_const_closure(Matter_UI_show_enable_closure) },
{ be_const_key_weak(plugin_option, -1), be_const_closure(Matter_UI_plugin_option_closure) },
@@ -1986,7 +1986,7 @@ be_local_class(Matter_UI,
{ be_const_key_weak(web_add_config_button, 8), be_const_closure(Matter_UI_web_add_config_button_closure) },
{ be_const_key_weak(page_part_mgr, 7), be_const_closure(Matter_UI_page_part_mgr_closure) },
{ be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) },
- { be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X2Dhttp_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity) },
+ { be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X2Dhttp_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity_X7Chttp_occupancy) },
{ be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) },
})),
be_str_weak(Matter_UI)