From 7cb8c0259dcb56d3233a3b786e4ffbc3d167775b Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:54:27 +0200 Subject: [PATCH] Matter support for Rain sensor (#21633) --- CHANGELOG.md | 1 + .../berry_matter/src/be_matter_module.c | 12 +- .../src/embedded/Matter_Plugin_0.be | 12 +- .../Matter_Plugin_2_Sensor_Boolean.be | 104 ++ .../Matter_Plugin_2_Sensor_Waterleak.be | 157 --- ...t.be => Matter_Plugin_3_Sensor_Contact.be} | 77 +- ...be => Matter_Plugin_3_Sensor_Occupancy.be} | 79 +- ...Off.be => Matter_Plugin_3_Sensor_OnOff.be} | 51 +- .../embedded/Matter_Plugin_3_Sensor_Rain.be | 105 ++ .../Matter_Plugin_3_Sensor_Waterleak.be | 90 ++ .../Matter_Plugin_8_Bridge_Sensor_Rain.be | 32 + .../Matter_Plugin_9_Virt_Sensor_Rain.be | 34 + .../Matter_Plugin_9_Virt_Sensor_Waterleak.be | 4 +- .../berry_matter/src/embedded/Matter_UI.be | 6 +- .../src/solidify/solidified_Matter_Plugin_0.h | 1169 ++++++++--------- ...olidified_Matter_Plugin_2_Sensor_Boolean.h | 301 +++++ ...idified_Matter_Plugin_2_Sensor_Waterleak.h | 594 --------- ...lidified_Matter_Plugin_3_Sensor_Contact.h} | 434 ++---- ...dified_Matter_Plugin_3_Sensor_Occupancy.h} | 436 ++---- ...solidified_Matter_Plugin_3_Sensor_OnOff.h} | 218 +-- .../solidified_Matter_Plugin_3_Sensor_Rain.h | 358 +++++ ...idified_Matter_Plugin_3_Sensor_Waterleak.h | 273 ++++ ...ified_Matter_Plugin_8_Bridge_Sensor_Rain.h | 26 + ...idified_Matter_Plugin_9_Virt_Sensor_Rain.h | 27 + ...ed_Matter_Plugin_9_Virt_Sensor_Waterleak.h | 12 +- .../src/solidify/solidified_Matter_UI.h | 4 +- .../solidify/solidified_Matter_zz_Device.h | 85 +- 27 files changed, 2284 insertions(+), 2417 deletions(-) create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Boolean.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_2_Sensor_Contact.be => Matter_Plugin_3_Sensor_Contact.be} (56%) rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_2_Sensor_Occupancy.be => Matter_Plugin_3_Sensor_Occupancy.be} (56%) rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_2_Sensor_OnOff.be => Matter_Plugin_3_Sensor_OnOff.be} (60%) create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Rain.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Waterleak.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Rain.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Rain.be create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_2_Sensor_Contact.h => solidified_Matter_Plugin_3_Sensor_Contact.h} (55%) rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_2_Sensor_Occupancy.h => solidified_Matter_Plugin_3_Sensor_Occupancy.h} (56%) rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_2_Sensor_OnOff.h => solidified_Matter_Plugin_3_Sensor_OnOff.h} (55%) create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Rain.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Rain.h diff --git a/CHANGELOG.md b/CHANGELOG.md index c614b47ccd62..4052438f54ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3`` - Berry `classof` extended to class methods (#21615) - Extend command ``SetOption147 1`` to disable publish of IRReceived MQTT messages (#21574) +- Matter support for Rain sensor ### Breaking Changed diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index e7f3f440416c..a641cad332e1 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -252,12 +252,15 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Illuminance.h" #include "solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Humidity.h" -#include "solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h" -#include "solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h" -#include "solidify/solidified_Matter_Plugin_2_Sensor_Contact.h" -#include "solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h" +#include "solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h" +#include "solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h" +#include "solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h" +#include "solidify/solidified_Matter_Plugin_3_Sensor_Contact.h" +#include "solidify/solidified_Matter_Plugin_3_Sensor_Rain.h" +#include "solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Contact.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Occupancy.h" +#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Rain.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Light0.h" @@ -272,6 +275,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_z_All.h" #include "solidify/solidified_Matter_zz_Device.h" diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be index 28716b38a0a4..748eb2d96291 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be @@ -116,7 +116,7 @@ class Matter_Plugin def init(device, endpoint, config) self.device = device self.endpoint = endpoint - self.clusters = self.consolidate_clusters() + self.clusters = self.get_clusters() self.parse_configuration(config) self.node_label = config.find("name", "") end @@ -179,11 +179,11 @@ class Matter_Plugin end ############################################################# - # consolidate_clusters + # get_clusters # # Build a consolidated map of all the `CLUSTERS` static vars # from the inheritance hierarchy - def consolidate_clusters() + def get_clusters() return self.CLUSTERS # def real_super(o) return super(o) end # enclose `super()` in a static function to disable special behavior for super in instances # var ret = {} @@ -257,12 +257,6 @@ class Matter_Plugin return false end - ############################################################# - # Does it handle this endpoint and this cluster - def has(cluster, endpoint) - return self.clusters.contains(cluster) && self.endpoints.find(endpoint) != nil - end - def set_name(n) if n != self.node_label self.attribute_updated(0x0039, 0x0005) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Boolean.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Boolean.be new file mode 100644 index 000000000000..06d65baa84d1 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Boolean.be @@ -0,0 +1,104 @@ +# +# Matter_Plugin_Sensor_Boolean.be - implements the behavior for an abstract boolean sensor - to be inherited +# +# 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Sensor_Boolean,weak + +class Matter_Plugin_Sensor_Boolean : Matter_Plugin_Device + # static var TYPE = "" # name of the plug-in in json + # static var DISPLAY_NAME = "" # display name of the plug-in + static var ARG = "switch" # additional argument name (or empty if none) + static var ARG_HINT = "Switch number" + static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var UPDATE_TIME = 750 # update every 750ms + + var tasmota_switch_index # Switch number in Tasmota (one based) + var shadow_bool_value + + ############################################################# + # Constructor + def init(device, endpoint, config) + super(self).init(device, endpoint, config) + self.shadow_bool_value = false + end + + ############################################################# + # parse_configuration + # + # Parse configuration map + def parse_configuration(config) + self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1)) + if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end + end + + ############################################################# + # Update shadow + # + def update_shadow() + super(self).update_shadow() + if !self.VIRTUAL + var switch_str = "Switch" + str(self.tasmota_switch_index) + + var j = tasmota.cmd("Status 10", true) + if j != nil j = j.find("StatusSNS") end + if j != nil && j.contains(switch_str) + var state = (j.find(switch_str) == "ON") + + if (self.shadow_bool_value != state) + self.value_updated() + end + self.shadow_bool_value = state + end + end + end + + ############################################################# + # value_updated + # + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated() + end + + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + if index == 10 # Status 10 + var state = false + + state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") + + if self.shadow_bool_value != nil && self.shadow_bool_value != bool(state) + self.value_updated() + end + self.shadow_bool_value = state + end + end + ############################################################# + ############################################################# +end +matter.Plugin_Sensor_Boolean = Matter_Plugin_Sensor_Boolean diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be deleted file mode 100644 index 680ad5b9135d..000000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be +++ /dev/null @@ -1,157 +0,0 @@ -# -# Matter_Plugin_2_Sensor_Waterleak.be - implements the behavior for a Water leak Sensor -# -# Copyright (C) 2024 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Sensor_Waterleak,weak - -class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device - static var TYPE = "waterleak" # name of the plug-in in json - static var DISPLAY_NAME = "Waterleak" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 750 # update every 750ms - static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Waterleak") - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0045: [0], # Boolean State p.70 - no writable - }) - # MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043 - static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1 - - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_leak - - ############################################################# - # Constructor - def init(device, endpoint, config) - super(self).init(device, endpoint, config) - self.shadow_leak = false - end - - ############################################################# - # parse_configuration - # - # Parse configuration map - def parse_configuration(config) - self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1)) - if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end - end - - ############################################################# - # Update shadow - # - def update_shadow() - super(self).update_shadow() - if !self.VIRTUAL - var switch_str = "Switch" + str(self.tasmota_switch_index) - - var j = tasmota.cmd("Status 10", true) - if j != nil j = j.find("StatusSNS") end - if j != nil && j.contains(switch_str) - var state = (j.find(switch_str) == "ON") - - if (self.shadow_leak != state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_leak = state - end - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0045 # ========== Boolean State ========== - if attribute == 0x0000 # ---------- StateValue / bool ---------- - return tlv_solo.set(TLV.BOOL, self.shadow_leak) - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end - - ############################################################# - # update_virtual - # - # Update internal state for virtual devices - def update_virtual(payload_json) - var val_onoff = payload_json.find("Waterleak") - if val_onoff != nil - val_onoff = bool(val_onoff) - if self.shadow_leak != val_onoff - self.attribute_updated(0x0045, 0x0000) - self.shadow_leak = val_onoff - end - end - super(self).update_virtual(payload_json) - end - - ############################################################# - # For Bridge devices - ############################################################# - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_status(data, index) - if index == 10 # Status 10 - var state = false - - state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") - - if self.shadow_leak != nil && self.shadow_leak != bool(state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_leak = state - end - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_leak))) - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if !name - name = "Switch" + str(self.tasmota_switch_index) - end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end - ############################################################# - ############################################################# - -end -matter.Plugin_Sensor_Waterleak = Matter_Plugin_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be similarity index 56% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be index 9057ace50194..abb2fa7f7c0a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Contact.be @@ -1,5 +1,5 @@ # -# Matter_Plugin_Sensor_Contact.be - implements the behavior for a Contact Sensor +# Matter_Plugin_3_Sensor_Contact.be - implements the behavior for a Contact Sensor # # Copyright (C) 2023 Stephan Hadinger & Theo Arends # @@ -23,57 +23,29 @@ import matter #@ solidify:Matter_Plugin_Sensor_Contact,weak -class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device +class Matter_Plugin_Sensor_Contact : Matter_Plugin_Sensor_Boolean static var TYPE = "contact" # name of the plug-in in json static var DISPLAY_NAME = "Contact" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 750 # update every 750ms + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 750 # update every 750ms static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Contact") static var CLUSTERS = matter.consolidate_clusters(_class, { 0x0045: [0], # Boolean State p.70 - no writable }) static var TYPES = { 0x0015: 1 } # Contact Sensor, rev 1 - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_contact + # var tasmota_switch_index # Switch number in Tasmota (one based) + # var shadow_bool_value ############################################################# - # Constructor - def init(device, endpoint, config) - super(self).init(device, endpoint, config) - self.shadow_contact = false - end - - ############################################################# - # parse_configuration + # value_updated # - # Parse configuration map - def parse_configuration(config) - self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1)) - if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end - end - - ############################################################# - # Update shadow - # - def update_shadow() - super(self).update_shadow() - if !self.VIRTUAL - var switch_str = "Switch" + str(self.tasmota_switch_index) - - var j = tasmota.cmd("Status 10", true) - if j != nil j = j.find("StatusSNS") end - if j != nil && j.contains(switch_str) - var state = (j.find(switch_str) == "ON") - - if (self.shadow_contact != state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_contact = state - end - end + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated() + self.attribute_updated(0x0045, 0x0000) end ############################################################# @@ -87,7 +59,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device # ==================================================================================================== if cluster == 0x0045 # ========== Boolean State ========== if attribute == 0x0000 # ---------- StateValue / bool ---------- - return tlv_solo.set_or_nil(TLV.BOOL, self.shadow_contact) + return tlv_solo.set_or_nil(TLV.BOOL, self.shadow_bool_value) end end @@ -99,30 +71,13 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device # # Update internal state for virtual devices def update_virtual(payload) - self.shadow_contact = self._parse_update_virtual(payload, "Contact", self.shadow_contact, bool, 0x0045, 0x0000) + self.shadow_bool_value = self._parse_update_virtual(payload, "Contact", self.shadow_bool_value, bool, 0x0045, 0x0000) super(self).update_virtual(payload) end ############################################################# # For Bridge devices ############################################################# - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_status(data, index) - if index == 10 # Status 10 - var state = false - - state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") - - if self.shadow_contact != nil && self.shadow_contact != bool(state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_contact = state - end - end - ############################################################# # web_values # @@ -130,7 +85,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device def web_values() import webserver self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_contact))) + webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value))) end # Show prefix before web value diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be similarity index 56% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be index f786bc82c6d8..c30193c9e8c6 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Occupancy.be @@ -1,5 +1,5 @@ # -# Matter_Plugin_Sensor_Occupancy.be - implements the behavior for a Occupany Switch +# Matter_Plugin_3_Sensor_Occupancy.be - implements the behavior for a Occupany Switch # # Copyright (C) 2023 Stephan Hadinger & Theo Arends # @@ -23,57 +23,29 @@ import matter #@ solidify:Matter_Plugin_Sensor_Occupancy,weak -class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device +class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Sensor_Boolean static var TYPE = "occupancy" # name of the plug-in in json static var DISPLAY_NAME = "Occupancy" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 750 # update every 750ms + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 750 # update every 750ms static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Occupancy") static var CLUSTERS = matter.consolidate_clusters(_class, { 0x0406: [0,1,2], # 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 + # var tasmota_switch_index # Switch number in Tasmota (one based) + # var shadow_bool_value ############################################################# - # Constructor - def init(device, endpoint, config) - super(self).init(device, endpoint, config) - self.shadow_occupancy = false - end - - ############################################################# - # parse_configuration + # value_updated # - # Parse configuration map - def parse_configuration(config) - self.tasmota_switch_index = int(config.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() - if !self.VIRTUAL - var switch_str = "Switch" + str(self.tasmota_switch_index) - - var j = tasmota.cmd("Status 10", true) - if j != nil j = j.find("StatusSNS") end - if j != nil && j.contains(switch_str) - var state = (j.find(switch_str) == "ON") - - if (self.shadow_occupancy != state) - self.attribute_updated(0x0406, 0x0000) - end - self.shadow_occupancy = state - end - end + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated() + self.attribute_updated(0x0406, 0x0000) end ############################################################# @@ -87,7 +59,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device # ==================================================================================================== if cluster == 0x0406 # ========== Occupancy Sensing ========== if attribute == 0x0000 # ---------- Occupancy / U8 ---------- - return tlv_solo.set_or_nil(TLV.U1, self.shadow_occupancy) + return tlv_solo.set_or_nil(TLV.U1, self.shadow_bool_value) elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ---------- return tlv_solo.set(TLV.U1, 3) # physical contact elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ---------- @@ -103,30 +75,13 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device # # Update internal state for virtual devices def update_virtual(payload) - self.val_onoff = self._parse_update_virtual(payload, "Occupancy", self.val_onoff, bool, 0x0406, 0x0000) + self.shadow_bool_value = self._parse_update_virtual(payload, "Occupancy", self.shadow_bool_value, bool, 0x0406, 0x0000) super(self).update_virtual(payload) end ############################################################# # For Bridge devices ############################################################# - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_status(data, index) - if index == 10 # Status 10 - 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 - ############################################################# # web_values # @@ -134,7 +89,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device def web_values() import webserver self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy))) + webserver.content_send(format("Occupancy%i %s", self.shadow_bool_value, self.web_value_onoff(self.shadow_occupancy))) end # Show prefix before web value @@ -142,7 +97,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device import webserver var name = self.get_name() if !name - name = "Switch" + str(self.tasmota_switch_index) + name = "Switch" + str(self.shadow_bool_value) end webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be similarity index 60% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be index 21e0c779b883..ae736e5bdc5e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_OnOff.be @@ -1,5 +1,5 @@ # -# Matter_Plugin_Sensor_OnOff.be - implements the behavior for a Occupany Switch +# Matter_Plugin_3_Sensor_OnOff.be - implements the behavior for a Occupany Switch # # Copyright (C) 2023 Stephan Hadinger & Theo Arends # @@ -21,49 +21,28 @@ #@ solidify:Matter_Plugin_Sensor_OnOff,weak -class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device +class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Sensor_Boolean static var TYPE = "onoff" # name of the plug-in in json static var DISPLAY_NAME = "OnOff Sensor" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 750 # update every 750ms + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 750 # update every 750ms static var CLUSTERS = matter.consolidate_clusters(_class, { 0x0006: [0], # On/Off 1.5 p.48 }) static var TYPES = { 0x0850: 2 } # OnOff Sensor, rev 2 - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_onoff + # var tasmota_switch_index # Switch number in Tasmota (one based) + # var shadow_bool_value ############################################################# - # parse_configuration + # value_updated # - # Parse configuration map - def parse_configuration(config) - self.tasmota_switch_index = int(config.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() - if !self.VIRTUAL - var switch_str = "Switch" + str(self.tasmota_switch_index) - - var j = tasmota.cmd("Status 10", true) - if j != nil j = j.find("StatusSNS") end - if j != nil && j.contains(switch_str) - var state = (j.find(switch_str) == "ON") - - if (self.shadow_onoff != state) - self.attribute_updated(0x0006, 0x0000) - end - self.shadow_onoff = state - end - end + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated() + self.attribute_updated(0x0006, 0x0000) end ############################################################# @@ -78,7 +57,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== self.update_shadow_lazy() if attribute == 0x0000 # ---------- OnOff / bool ---------- - return tlv_solo.set(TLV.BOOL, self.shadow_onoff) + return tlv_solo.set(TLV.BOOL, self.shadow_bool_value) end end @@ -93,7 +72,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device # # Override the default behavior to use the key `OnOff` instead of `Power` def append_state_json() - return f',"OnOff":{int(self.shadow_onoff)}' + return f',"OnOff":{int(self.shadow_bool_value)}' end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Rain.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Rain.be new file mode 100644 index 000000000000..970be52b82b4 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Rain.be @@ -0,0 +1,105 @@ +# +# Matter_Plugin_3_Sensor_Rain.be - implements the behavior for a Rain Sensor +# +# Copyright (C) 2024 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Sensor_Rain,weak + +class Matter_Plugin_Sensor_Rain : Matter_Plugin_Sensor_Boolean + static var TYPE = "rain" # name of the plug-in in json + static var DISPLAY_NAME = "Rain" # display name of the plug-in + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 750 # update every 750ms + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Rain") + static var CLUSTERS = matter.consolidate_clusters(_class, { + 0x0045: [0], # Boolean State p.70 - no writable + }) + # MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043 + static var TYPES = { 0x0044: 1 } # Rain Sensor, rev 1 + + # var tasmota_switch_index # Switch number in Tasmota (one based) + # var shadow_bool_value + + ############################################################# + # value_updated + # + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated() + self.attribute_updated(0x0045, 0x0000) + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx, tlv_solo) + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0045 # ========== Boolean State ========== + if attribute == 0x0000 # ---------- StateValue / bool ---------- + return tlv_solo.set(TLV.BOOL, self.shadow_bool_value) + end + + end + return super(self).read_attribute(session, ctx, tlv_solo) + end + + ############################################################# + # update_virtual + # + # Update internal state for virtual devices + def update_virtual(payload) + self.shadow_bool_value = self._parse_update_virtual(payload, "Rain", self.shadow_bool_value, bool, 0x0045, 0x0000) + super(self).update_virtual(payload) + end + + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("Rain%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Switch" + str(self.tasmota_switch_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + +end +matter.Plugin_Sensor_Rain = Matter_Plugin_Sensor_Rain diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Waterleak.be new file mode 100644 index 000000000000..3b82427563e5 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Waterleak.be @@ -0,0 +1,90 @@ +# +# Matter_Plugin_3_Sensor_Waterleak.be - implements the behavior for a Water leak Sensor +# +# Copyright (C) 2024 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Sensor_Waterleak,weak + +class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Sensor_Boolean + static var TYPE = "waterleak" # name of the plug-in in json + static var DISPLAY_NAME = "Waterleak" # display name of the plug-in + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + # static var UPDATE_TIME = 750 # update every 750ms + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Waterleak") + static var CLUSTERS = matter.consolidate_clusters(_class, { + 0x0045: [0], # Boolean State p.70 - no writable + }) + # MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043 + static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1 + + # var tasmota_switch_index # Switch number in Tasmota (one based) + # var shadow_bool_value + + ############################################################# + # value_updated + # + # This is triggered when a new value is changed, for subscription + # This method is meant to be overloaded and maximize shared code + def value_updated = Matter_Plugin_Sensor_Rain.value_updated + + ############################################################# + # read an attribute + # + def read_attribute = Matter_Plugin_Sensor_Rain.read_attribute + + ############################################################# + # update_virtual + # + # Update internal state for virtual devices + def update_virtual(payload) + self.shadow_bool_value = self._parse_update_virtual(payload, "Waterleak", self.shadow_bool_value, bool, 0x0045, 0x0000) + super(self).update_virtual(payload) + end + + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Switch" + str(self.tasmota_switch_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + +end +matter.Plugin_Sensor_Waterleak = Matter_Plugin_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Rain.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Rain.be new file mode 100644 index 000000000000..b9a275eb10cf --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Rain.be @@ -0,0 +1,32 @@ +# +# Matter_Plugin_Bridge_8_Sensor_Rain.be - implements Rain Sensor via HTTP to Tasmota +# +# Copyright (C) 2024 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Rain,weak + +class Matter_Plugin_Bridge_Sensor_Rain : Matter_Plugin_Sensor_Rain + static var BRIDGE = true + static var TYPE = "http_rain" # name of the plug-in in json + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 10" # command to send for updates +end +matter.Plugin_Bridge_Sensor_Rain = Matter_Plugin_Bridge_Sensor_Rain diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Rain.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Rain.be new file mode 100644 index 000000000000..5e811fae015e --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Rain.be @@ -0,0 +1,34 @@ + +# +# Matter_Plugin_9_Virt_Sensor_Rain.be - implements the behavior for a Virtual Rain Sensor +# +# Copyright (C) 2024 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Virt_Sensor_Rain,weak + +class Matter_Plugin_Virt_Sensor_Rain : Matter_Plugin_Virt_Sensor_Rain + static var TYPE = "v_rain" # name of the plug-in in json + static var DISPLAY_NAME = "v.Rain" # display name of the plug-in + static var ARG = "" # no arg for virtual device + static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') + static var VIRTUAL = true # virtual device +end +matter.Plugin_Virt_Sensor_Rain = Matter_Plugin_Virt_Sensor_Rain diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be index 63573b2149a2..264435193a1b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be @@ -22,9 +22,9 @@ import matter # Matter plug-in for core behavior -#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak ,weak +#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak,weak -class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak +class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak static var TYPE = "v_waterleak" # name of the plug-in in json static var DISPLAY_NAME = "v.Waterleak" # display name of the plug-in static var ARG = "" # no arg for virtual device diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index 5a80aeba933a..29bf665fa3bf 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -33,14 +33,14 @@ import matter ################################################################################# class Matter_UI static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" - "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|waterleak" + "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|rain|waterleak" "|airquality" "|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3" - "|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_waterleak" + "|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_rain|v_waterleak" "|v_airquality" static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3" "|http_temperature|http_pressure|http_illuminance|http_humidity" - "|http_occupancy|http_contact|http_flow|http_waterleak" + "|http_occupancy|http_contact|http_flow|http_rain|http_waterleak" "|http_airquality" var device diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h index 4321835eacf0..6fed7984dcf4 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h @@ -7,10 +7,10 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: invoke_request +** Solidified function: write_attribute ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_invoke_request, /* name */ +be_local_closure(class_Matter_Plugin_write_attribute, /* name */ be_nested_proto( 5, /* nstack */ 4, /* argc */ @@ -21,7 +21,7 @@ be_local_closure(class_Matter_Plugin_invoke_request, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(invoke_request), + be_str_weak(write_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C100000, // 0000 LDNIL R4 @@ -32,6 +32,33 @@ be_local_closure(class_Matter_Plugin_invoke_request, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_append_state_json, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(), + }), + be_str_weak(append_state_json), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80060000, // 0000 RET 1 K0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: state_json ********************************************************************/ @@ -91,42 +118,25 @@ be_local_closure(class_Matter_Plugin_state_json, /* name */ /******************************************************************** -** Solidified function: ack_request +** Solidified function: timed_request ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_ack_request, /* name */ +be_local_closure(class_Matter_Plugin_timed_request, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 5, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(msg), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(message_handler), - /* K3 */ be_nested_str_weak(im), - /* K4 */ be_nested_str_weak(send_ack_now), - }), - be_str_weak(ack_request), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(timed_request), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x200C0403, // 0002 NE R3 R2 R3 - 0x780E0005, // 0003 JMPF R3 #000A - 0x880C0101, // 0004 GETMBR R3 R0 K1 - 0x880C0702, // 0005 GETMBR R3 R3 K2 - 0x880C0703, // 0006 GETMBR R3 R3 K3 - 0x8C0C0704, // 0007 GETMET R3 R3 K4 - 0x5C140400, // 0008 MOVE R5 R2 - 0x7C0C0400, // 0009 CALL R3 2 - 0x4C0C0000, // 000A LDNIL R3 - 0x90060003, // 000B SETMBR R1 K0 R3 - 0x80000000, // 000C RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 }) ) ); @@ -134,13 +144,13 @@ be_local_closure(class_Matter_Plugin_ack_request, /* name */ /******************************************************************** -** Solidified function: write_attribute +** Solidified function: parse_sensors ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_write_attribute, /* name */ +be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ be_nested_proto( - 5, /* nstack */ - 4, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -148,11 +158,10 @@ be_local_closure(class_Matter_Plugin_write_attribute, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(write_attribute), + be_str_weak(parse_sensors), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -160,10 +169,10 @@ be_local_closure(class_Matter_Plugin_write_attribute, /* name */ /******************************************************************** -** Solidified function: consolidate_update_commands +** Solidified function: get_endpoint ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ +be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -174,9 +183,9 @@ be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), + /* K0 */ be_nested_str_weak(endpoint), }), - be_str_weak(consolidate_update_commands), + be_str_weak(get_endpoint), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -188,26 +197,24 @@ be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ /******************************************************************** -** Solidified function: append_state_json +** Solidified function: update_virtual ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_append_state_json, /* name */ +be_local_closure(class_Matter_Plugin_update_virtual, /* name */ be_nested_proto( - 1, /* nstack */ - 1, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(), - }), - be_str_weak(append_state_json), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(update_virtual), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ - 0x80060000, // 0000 RET 1 K0 + 0x80000000, // 0000 RET 0 }) ) ); @@ -215,62 +222,40 @@ be_local_closure(class_Matter_Plugin_append_state_json, /* name */ /******************************************************************** -** Solidified function: every_250ms +** Solidified function: ui_conf_to_string ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_every_250ms, /* name */ +be_local_closure(class_Matter_Plugin_ui_conf_to_string, /* name */ be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ + 9, /* nstack */ + 2, /* argc */ + 4, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(update_next), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(jitter), - /* K3 */ be_nested_str_weak(UPDATE_TIME), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(time_reached), - /* K6 */ be_nested_str_weak(tick), - /* K7 */ be_nested_str_weak(device), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(millis), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(), }), - be_str_weak(every_250ms), + be_str_weak(ui_conf_to_string), &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060005, // 0003 JMPF R1 #000A - 0xB8060200, // 0004 GETNGBL R1 K1 - 0x8C040302, // 0005 GETMET R1 R1 K2 - 0x880C0103, // 0006 GETMBR R3 R0 K3 - 0x7C040400, // 0007 CALL R1 2 - 0x90020001, // 0008 SETMBR R0 K0 R1 - 0x70020010, // 0009 JMP #001B - 0xB8060800, // 000A GETNGBL R1 K4 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x880C0100, // 000C GETMBR R3 R0 K0 - 0x7C040400, // 000D CALL R1 2 - 0x7806000B, // 000E JMPF R1 #001B - 0x88040106, // 000F GETMBR R1 R0 K6 - 0x88080107, // 0010 GETMBR R2 R0 K7 - 0x88080506, // 0011 GETMBR R2 R2 K6 - 0x20040202, // 0012 NE R1 R1 R2 - 0x78060001, // 0013 JMPF R1 #0016 - 0x8C040108, // 0014 GETMET R1 R0 K8 - 0x7C040200, // 0015 CALL R1 1 - 0xB8060800, // 0016 GETNGBL R1 K4 - 0x8C040309, // 0017 GETMET R1 R1 K9 - 0x880C0103, // 0018 GETMBR R3 R0 K3 - 0x7C040400, // 0019 CALL R1 2 - 0x90020001, // 001A SETMBR R0 K0 R1 - 0x80000000, // 001B RET 0 + ( &(const binstruction[12]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x780E0006, // 0002 JMPF R3 #000A + 0x60100008, // 0003 GETGBL R4 G8 + 0x8C140302, // 0004 GETMET R5 R1 K2 + 0x5C1C0600, // 0005 MOVE R7 R3 + 0x58200003, // 0006 LDCONST R8 K3 + 0x7C140600, // 0007 CALL R5 3 + 0x7C100200, // 0008 CALL R4 1 + 0x70020000, // 0009 JMP #000B + 0x58100003, // 000A LDCONST R4 K3 + 0x80040800, // 000B RET 1 R4 }) ) ); @@ -278,43 +263,24 @@ be_local_closure(class_Matter_Plugin_every_250ms, /* name */ /******************************************************************** -** Solidified function: has +** Solidified function: parse_configuration ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_has, /* name */ +be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ be_nested_proto( - 6, /* nstack */ - 3, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(endpoints), - /* K3 */ be_nested_str_weak(find), - }), - be_str_weak(has), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_configuration), &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x780E0006, // 0004 JMPF R3 #000C - 0x880C0102, // 0005 GETMBR R3 R0 K2 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x5C140400, // 0007 MOVE R5 R2 - 0x7C0C0400, // 0008 CALL R3 2 - 0x4C100000, // 0009 LDNIL R4 - 0x200C0604, // 000A NE R3 R3 R4 - 0x740E0000, // 000B JMPT R3 #000D - 0x500C0001, // 000C LDBOOL R3 0 1 - 0x500C0200, // 000D LDBOOL R3 1 0 - 0x80040600, // 000E RET 1 R3 + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 }) ) ); @@ -322,38 +288,42 @@ be_local_closure(class_Matter_Plugin_has, /* name */ /******************************************************************** -** Solidified function: update_shadow_lazy +** Solidified function: ack_request ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ +be_local_closure(class_Matter_Plugin_ack_request, /* name */ be_nested_proto( - 3, /* nstack */ - 1, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(msg), /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(update_shadow), + /* K2 */ be_nested_str_weak(message_handler), + /* K3 */ be_nested_str_weak(im), + /* K4 */ be_nested_str_weak(send_ack_now), }), - be_str_weak(update_shadow_lazy), + be_str_weak(ack_request), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x88080500, // 0002 GETMBR R2 R2 K0 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060004, // 0004 JMPF R1 #000A - 0x8C040102, // 0005 GETMET R1 R0 K2 - 0x7C040200, // 0006 CALL R1 1 - 0x88040101, // 0007 GETMBR R1 R0 K1 - 0x88040300, // 0008 GETMBR R1 R1 K0 - 0x90020001, // 0009 SETMBR R0 K0 R1 - 0x80000000, // 000A RET 0 + ( &(const binstruction[13]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x200C0403, // 0002 NE R3 R2 R3 + 0x780E0005, // 0003 JMPF R3 #000A + 0x880C0101, // 0004 GETMBR R3 R0 K1 + 0x880C0702, // 0005 GETMBR R3 R3 K2 + 0x880C0703, // 0006 GETMBR R3 R3 K3 + 0x8C0C0704, // 0007 GETMET R3 R3 K4 + 0x5C140400, // 0008 MOVE R5 R2 + 0x7C0C0400, // 0009 CALL R3 2 + 0x4C0C0000, // 000A LDNIL R3 + 0x90060003, // 000B SETMBR R1 K0 R3 + 0x80000000, // 000C RET 0 }) ) ); @@ -361,62 +331,32 @@ be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ /******************************************************************** -** Solidified function: set_name +** Solidified function: get_cluster_list_sorted ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_set_name, /* name */ +be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 4, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), - /* K1 */ be_nested_str_weak(attribute_updated), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(k2l), + /* K2 */ be_nested_str_weak(clusters), }), - be_str_weak(set_name), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0003, // 0002 JMPF R2 #0007 - 0x8C080101, // 0003 GETMET R2 R0 K1 - 0x54120038, // 0004 LDINT R4 57 - 0x54160004, // 0005 LDINT R5 5 - 0x7C080600, // 0006 CALL R2 3 - 0x90020001, // 0007 SETMBR R0 K0 R1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + be_str_weak(get_cluster_list_sorted), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040008, // 0000 GETGBL R1 G8 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 + ( &(const binstruction[ 5]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 }) ) ); @@ -424,13 +364,13 @@ be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ /******************************************************************** -** Solidified function: update_shadow +** Solidified function: contains_cluster ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow, /* name */ +be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ + 5, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -438,42 +378,17 @@ be_local_closure(class_Matter_Plugin_update_shadow, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(contains), }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040101, // 0000 GETMBR R1 R0 K1 - 0x88040300, // 0001 GETMBR R1 R1 K0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: timed_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_timed_request, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(timed_request), + be_str_weak(contains_cluster), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 }) ) ); @@ -498,7 +413,7 @@ be_local_closure(class_Matter_Plugin_init, /* name */ /* K0 */ be_nested_str_weak(device), /* K1 */ be_nested_str_weak(endpoint), /* K2 */ be_nested_str_weak(clusters), - /* K3 */ be_nested_str_weak(consolidate_clusters), + /* K3 */ be_nested_str_weak(get_clusters), /* K4 */ be_nested_str_weak(parse_configuration), /* K5 */ be_nested_str_weak(node_label), /* K6 */ be_nested_str_weak(find), @@ -528,37 +443,6 @@ be_local_closure(class_Matter_Plugin_init, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: is_local_device -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_is_local_device, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(BRIDGE), - }), - be_str_weak(is_local_device), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060000, // 0001 JMPF R1 #0003 - 0x50040001, // 0002 LDBOOL R1 0 1 - 0x50040200, // 0003 LDBOOL R1 1 0 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: ui_string_to_conf ********************************************************************/ @@ -598,10 +482,10 @@ be_local_closure(class_Matter_Plugin_ui_string_to_conf, /* name */ /******************************************************************** -** Solidified function: get_cluster_list_sorted +** Solidified function: every_250ms ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ +be_local_closure(class_Matter_Plugin_every_250ms, /* name */ be_nested_proto( 4, /* nstack */ 1, /* argc */ @@ -611,19 +495,49 @@ be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(k2l), - /* K2 */ be_nested_str_weak(clusters), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(update_next), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(jitter), + /* K3 */ be_nested_str_weak(UPDATE_TIME), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), + /* K6 */ be_nested_str_weak(tick), + /* K7 */ be_nested_str_weak(device), + /* K8 */ be_nested_str_weak(update_shadow), + /* K9 */ be_nested_str_weak(millis), }), - be_str_weak(get_cluster_list_sorted), + be_str_weak(every_250ms), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ + ( &(const binstruction[28]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060005, // 0003 JMPF R1 #000A + 0xB8060200, // 0004 GETNGBL R1 K1 + 0x8C040302, // 0005 GETMET R1 R1 K2 + 0x880C0103, // 0006 GETMBR R3 R0 K3 + 0x7C040400, // 0007 CALL R1 2 + 0x90020001, // 0008 SETMBR R0 K0 R1 + 0x70020010, // 0009 JMP #001B + 0xB8060800, // 000A GETNGBL R1 K4 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x880C0100, // 000C GETMBR R3 R0 K0 + 0x7C040400, // 000D CALL R1 2 + 0x7806000B, // 000E JMPF R1 #001B + 0x88040106, // 000F GETMBR R1 R0 K6 + 0x88080107, // 0010 GETMBR R2 R0 K7 + 0x88080506, // 0011 GETMBR R2 R2 K6 + 0x20040202, // 0012 NE R1 R1 R2 + 0x78060001, // 0013 JMPF R1 #0016 + 0x8C040108, // 0014 GETMET R1 R0 K8 + 0x7C040200, // 0015 CALL R1 1 + 0xB8060800, // 0016 GETNGBL R1 K4 + 0x8C040309, // 0017 GETMET R1 R1 K9 + 0x880C0103, // 0018 GETMBR R3 R0 K3 + 0x7C040400, // 0019 CALL R1 2 + 0x90020001, // 001A SETMBR R0 K0 R1 + 0x80000000, // 001B RET 0 }) ) ); @@ -631,40 +545,25 @@ be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ /******************************************************************** -** Solidified function: ui_conf_to_string +** Solidified function: subscribe_event ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_ui_conf_to_string, /* name */ +be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 4, /* varg */ + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Plugin), - /* K1 */ be_nested_str_weak(ARG), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(), - }), - be_str_weak(ui_conf_to_string), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(subscribe_event), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x58080000, // 0000 LDCONST R2 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x780E0006, // 0002 JMPF R3 #000A - 0x60100008, // 0003 GETGBL R4 G8 - 0x8C140302, // 0004 GETMET R5 R1 K2 - 0x5C1C0600, // 0005 MOVE R7 R3 - 0x58200003, // 0006 LDCONST R8 K3 - 0x7C140600, // 0007 CALL R5 3 - 0x7C100200, // 0008 CALL R4 1 - 0x70020000, // 0009 JMP #000B - 0x58100003, // 000A LDCONST R4 K3 - 0x80040800, // 000B RET 1 R4 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -672,60 +571,33 @@ be_local_closure(class_Matter_Plugin_ui_conf_to_string, /* name */ /******************************************************************** -** Solidified function: attribute_updated +** Solidified function: get_attribute_list ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ +be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 6, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(attribute_updated), - /* K2 */ be_nested_str_weak(endpoint), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), }), - be_str_weak(attribute_updated), + be_str_weak(get_attribute_list), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x88180102, // 0002 GETMBR R6 R0 K2 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_virtual, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x60140012, // 0003 GETGBL R5 G18 + 0x7C140000, // 0004 CALL R5 0 + 0x7C080600, // 0005 CALL R2 3 + 0x80040400, // 0006 RET 1 R2 }) ) ); @@ -778,13 +650,41 @@ be_local_closure(class_Matter_Plugin__parse_update_virtual, /* name */ /******************************************************************** -** Solidified function: parse_configuration +** Solidified function: consolidate_update_commands ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ +be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ be_nested_proto( 2, /* nstack */ - 2, /* argc */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), + }), + be_str_weak(consolidate_update_commands), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: subscribe_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_subscribe_attribute, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -792,10 +692,11 @@ be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(parse_configuration), + be_str_weak(subscribe_attribute), &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -803,10 +704,61 @@ be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ /******************************************************************** -** Solidified function: consolidate_clusters +** Solidified function: contains_attribute ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ +be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_const_int(0), + /* K3 */ be_const_int(1), + }), + be_str_weak(contains_attribute), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x20100604, // 0005 NE R4 R3 R4 + 0x7812000C, // 0006 JMPF R4 #0014 + 0x58100002, // 0007 LDCONST R4 K2 + 0x6014000C, // 0008 GETGBL R5 G12 + 0x5C180600, // 0009 MOVE R6 R3 + 0x7C140200, // 000A CALL R5 1 + 0x14140805, // 000B LT R5 R4 R5 + 0x78160006, // 000C JMPF R5 #0014 + 0x94140604, // 000D GETIDX R5 R3 R4 + 0x1C140A02, // 000E EQ R5 R5 R2 + 0x78160001, // 000F JMPF R5 #0012 + 0x50140200, // 0010 LDBOOL R5 1 0 + 0x80040A00, // 0011 RET 1 R5 + 0x00100903, // 0012 ADD R4 R4 K3 + 0x7001FFF3, // 0013 JMP #0008 + 0x50100000, // 0014 LDBOOL R4 0 0 + 0x80040800, // 0015 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_clusters +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_clusters, /* name */ be_nested_proto( 2, /* nstack */ 1, /* argc */ @@ -819,7 +771,7 @@ be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ ( &(const bvalue[ 1]) { /* constants */ /* K0 */ be_nested_str_weak(CLUSTERS), }), - be_str_weak(consolidate_clusters), + be_str_weak(get_clusters), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 @@ -830,6 +782,33 @@ be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040008, // 0000 GETGBL R1 G8 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: get_name ********************************************************************/ @@ -859,27 +838,79 @@ be_local_closure(class_Matter_Plugin_get_name, /* name */ /******************************************************************** -** Solidified function: get_endpoint +** Solidified function: publish_command ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ +be_local_closure(class_Matter_Plugin_publish_command, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ + 16, /* nstack */ + 7, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K2 */ be_nested_str_weak(dump), + /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(publish_command), + /* K6 */ be_nested_str_weak(MtrReceived), + /* K7 */ be_nested_str_weak(endpoint), + /* K8 */ be_nested_str_weak(node_label), }), - be_str_weak(get_endpoint), + be_str_weak(publish_command), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + ( &(const binstruction[46]) { /* code */ + 0xA41E0000, // 0000 IMPORT R7 K0 + 0x60200018, // 0001 GETGBL R8 G24 + 0x58240001, // 0002 LDCONST R9 K1 + 0x8C280F02, // 0003 GETMET R10 R7 K2 + 0x5C300200, // 0004 MOVE R12 R1 + 0x7C280400, // 0005 CALL R10 2 + 0x8C2C0F02, // 0006 GETMET R11 R7 K2 + 0x5C340400, // 0007 MOVE R13 R2 + 0x7C2C0400, // 0008 CALL R11 2 + 0x7C200600, // 0009 CALL R8 3 + 0x4C240000, // 000A LDNIL R9 + 0x20240609, // 000B NE R9 R3 R9 + 0x7826000A, // 000C JMPF R9 #0018 + 0x60240018, // 000D GETGBL R9 G24 + 0x58280003, // 000E LDCONST R10 K3 + 0x5C2C1000, // 000F MOVE R11 R8 + 0x8C300F02, // 0010 GETMET R12 R7 K2 + 0x5C380600, // 0011 MOVE R14 R3 + 0x7C300400, // 0012 CALL R12 2 + 0x8C340F02, // 0013 GETMET R13 R7 K2 + 0x5C3C0800, // 0014 MOVE R15 R4 + 0x7C340400, // 0015 CALL R13 2 + 0x7C240800, // 0016 CALL R9 4 + 0x5C201200, // 0017 MOVE R8 R9 + 0x4C240000, // 0018 LDNIL R9 + 0x20240A09, // 0019 NE R9 R5 R9 + 0x7826000A, // 001A JMPF R9 #0026 + 0x60240018, // 001B GETGBL R9 G24 + 0x58280003, // 001C LDCONST R10 K3 + 0x5C2C1000, // 001D MOVE R11 R8 + 0x8C300F02, // 001E GETMET R12 R7 K2 + 0x5C380A00, // 001F MOVE R14 R5 + 0x7C300400, // 0020 CALL R12 2 + 0x8C340F02, // 0021 GETMET R13 R7 K2 + 0x5C3C0C00, // 0022 MOVE R15 R6 + 0x7C340400, // 0023 CALL R13 2 + 0x7C240800, // 0024 CALL R9 4 + 0x5C201200, // 0025 MOVE R8 R9 + 0xB8260800, // 0026 GETNGBL R9 K4 + 0x8C241305, // 0027 GETMET R9 R9 K5 + 0x582C0006, // 0028 LDCONST R11 K6 + 0x88300107, // 0029 GETMBR R12 R0 K7 + 0x88340108, // 002A GETMBR R13 R0 K8 + 0x5C381000, // 002B MOVE R14 R8 + 0x7C240A00, // 002C CALL R9 5 + 0x80000000, // 002D RET 0 }) ) ); @@ -887,25 +918,35 @@ be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ /******************************************************************** -** Solidified function: subscribe_event +** Solidified function: set_name ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ +be_local_closure(class_Matter_Plugin_set_name, /* name */ be_nested_proto( 6, /* nstack */ - 5, /* argc */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(subscribe_event), + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(node_label), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(set_name), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x8C080101, // 0003 GETMET R2 R0 K1 + 0x54120038, // 0004 LDINT R4 57 + 0x54160004, // 0005 LDINT R5 5 + 0x7C080600, // 0006 CALL R2 3 + 0x90020001, // 0007 SETMBR R0 K0 R1 + 0x80000000, // 0008 RET 0 }) ) ); @@ -913,25 +954,38 @@ be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ /******************************************************************** -** Solidified function: read_event +** Solidified function: update_shadow_lazy ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_read_event, /* name */ +be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ + 3, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(read_event), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow_lazy), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + ( &(const binstruction[11]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x88080500, // 0002 GETMBR R2 R2 K0 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060004, // 0004 JMPF R1 #000A + 0x8C040102, // 0005 GETMET R1 R0 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x88040101, // 0007 GETMBR R1 R0 K1 + 0x88040300, // 0008 GETMBR R1 R1 K0 + 0x90020001, // 0009 SETMBR R0 K0 R1 + 0x80000000, // 000A RET 0 }) ) ); @@ -939,13 +993,13 @@ be_local_closure(class_Matter_Plugin_read_event, /* name */ /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: read_event ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ +be_local_closure(class_Matter_Plugin_read_event, /* name */ be_nested_proto( - 2, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -953,10 +1007,11 @@ be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(parse_sensors), + be_str_weak(read_event), &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -964,13 +1019,13 @@ be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ /******************************************************************** -** Solidified function: get_attribute_list +** Solidified function: update_shadow ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ +be_local_closure(class_Matter_Plugin_update_shadow, /* name */ be_nested_proto( - 6, /* nstack */ - 2, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -978,19 +1033,16 @@ be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ &be_class_Matter_Plugin, 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), }), - be_str_weak(get_attribute_list), + be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x60140012, // 0003 GETGBL R5 G18 - 0x7C140000, // 0004 CALL R5 0 - 0x7C080600, // 0005 CALL R2 3 - 0x80040400, // 0006 RET 1 R2 + ( &(const binstruction[ 4]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x88040300, // 0001 GETMBR R1 R1 K0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 }) ) ); @@ -998,79 +1050,25 @@ be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ /******************************************************************** -** Solidified function: publish_command +** Solidified function: invoke_request ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_publish_command, /* name */ +be_local_closure(class_Matter_Plugin_invoke_request, /* name */ be_nested_proto( - 16, /* nstack */ - 7, /* argc */ + 5, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), - /* K2 */ be_nested_str_weak(dump), - /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(publish_command), - /* K6 */ be_nested_str_weak(MtrReceived), - /* K7 */ be_nested_str_weak(endpoint), - /* K8 */ be_nested_str_weak(node_label), - }), - be_str_weak(publish_command), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[46]) { /* code */ - 0xA41E0000, // 0000 IMPORT R7 K0 - 0x60200018, // 0001 GETGBL R8 G24 - 0x58240001, // 0002 LDCONST R9 K1 - 0x8C280F02, // 0003 GETMET R10 R7 K2 - 0x5C300200, // 0004 MOVE R12 R1 - 0x7C280400, // 0005 CALL R10 2 - 0x8C2C0F02, // 0006 GETMET R11 R7 K2 - 0x5C340400, // 0007 MOVE R13 R2 - 0x7C2C0400, // 0008 CALL R11 2 - 0x7C200600, // 0009 CALL R8 3 - 0x4C240000, // 000A LDNIL R9 - 0x20240609, // 000B NE R9 R3 R9 - 0x7826000A, // 000C JMPF R9 #0018 - 0x60240018, // 000D GETGBL R9 G24 - 0x58280003, // 000E LDCONST R10 K3 - 0x5C2C1000, // 000F MOVE R11 R8 - 0x8C300F02, // 0010 GETMET R12 R7 K2 - 0x5C380600, // 0011 MOVE R14 R3 - 0x7C300400, // 0012 CALL R12 2 - 0x8C340F02, // 0013 GETMET R13 R7 K2 - 0x5C3C0800, // 0014 MOVE R15 R4 - 0x7C340400, // 0015 CALL R13 2 - 0x7C240800, // 0016 CALL R9 4 - 0x5C201200, // 0017 MOVE R8 R9 - 0x4C240000, // 0018 LDNIL R9 - 0x20240A09, // 0019 NE R9 R5 R9 - 0x7826000A, // 001A JMPF R9 #0026 - 0x60240018, // 001B GETGBL R9 G24 - 0x58280003, // 001C LDCONST R10 K3 - 0x5C2C1000, // 001D MOVE R11 R8 - 0x8C300F02, // 001E GETMET R12 R7 K2 - 0x5C380A00, // 001F MOVE R14 R5 - 0x7C300400, // 0020 CALL R12 2 - 0x8C340F02, // 0021 GETMET R13 R7 K2 - 0x5C3C0C00, // 0022 MOVE R15 R6 - 0x7C340400, // 0023 CALL R13 2 - 0x7C240800, // 0024 CALL R9 4 - 0x5C201200, // 0025 MOVE R8 R9 - 0xB8260800, // 0026 GETNGBL R9 K4 - 0x8C241305, // 0027 GETMET R9 R9 K5 - 0x582C0006, // 0028 LDCONST R11 K6 - 0x88300107, // 0029 GETMBR R12 R0 K7 - 0x88340108, // 002A GETMBR R13 R0 K8 - 0x5C381000, // 002B MOVE R14 R8 - 0x7C240A00, // 002C CALL R9 5 - 0x80000000, // 002D RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 }) ) ); @@ -1078,50 +1076,35 @@ be_local_closure(class_Matter_Plugin_publish_command, /* name */ /******************************************************************** -** Solidified function: contains_attribute +** Solidified function: attribute_updated ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ +be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ be_nested_proto( - 7, /* nstack */ - 3, /* argc */ + 10, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_const_int(0), - /* K3 */ be_const_int(1), + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(attribute_updated), + /* K2 */ be_nested_str_weak(endpoint), }), - be_str_weak(contains_attribute), + be_str_weak(attribute_updated), &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x20100604, // 0005 NE R4 R3 R4 - 0x7812000C, // 0006 JMPF R4 #0014 - 0x58100002, // 0007 LDCONST R4 K2 - 0x6014000C, // 0008 GETGBL R5 G12 - 0x5C180600, // 0009 MOVE R6 R3 - 0x7C140200, // 000A CALL R5 1 - 0x14140805, // 000B LT R5 R4 R5 - 0x78160006, // 000C JMPF R5 #0014 - 0x94140604, // 000D GETIDX R5 R3 R4 - 0x1C140A02, // 000E EQ R5 R5 R2 - 0x78160001, // 000F JMPF R5 #0012 - 0x50140200, // 0010 LDBOOL R5 1 0 - 0x80040A00, // 0011 RET 1 R5 - 0x00100903, // 0012 ADD R4 R4 K3 - 0x7001FFF3, // 0013 JMP #0008 - 0x50100000, // 0014 LDBOOL R4 0 0 - 0x80040800, // 0015 RET 1 R4 + ( &(const binstruction[ 8]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x88180102, // 0002 GETMBR R6 R0 K2 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80000000, // 0007 RET 0 }) ) ); @@ -1129,31 +1112,30 @@ be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ /******************************************************************** -** Solidified function: contains_cluster +** Solidified function: is_local_device ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ +be_local_closure(class_Matter_Plugin_is_local_device, /* name */ be_nested_proto( - 5, /* nstack */ - 2, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), }), - be_str_weak(contains_cluster), + be_str_weak(is_local_device), &be_const_str_solidified, ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060000, // 0001 JMPF R1 #0003 + 0x50040001, // 0002 LDBOOL R1 0 1 + 0x50040200, // 0003 LDBOOL R1 1 0 + 0x80040200, // 0004 RET 1 R1 }) ) ); @@ -1368,85 +1350,56 @@ be_local_closure(class_Matter_Plugin_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: subscribe_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_subscribe_attribute, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(subscribe_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, 6, NULL, - be_nested_map(52, + be_nested_map(51, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(subscribe_attribute, 34), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, - { be_const_key_weak(state_json, 38), be_const_closure(class_Matter_Plugin_state_json_closure) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, - { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(ack_request, -1), be_const_closure(class_Matter_Plugin_ack_request_closure) }, - { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, - { be_const_key_weak(is_local_device, 2), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, - { be_const_key_weak(write_attribute, -1), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(BRIDGE, -1), be_const_bool(0) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(CLUSTERS, 51), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, + { be_const_key_weak(FEATURE_MAPS, -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(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, + { be_const_key_int(258, -1), be_const_int(5) }, + { be_const_key_int(49, -1), be_const_int(4) }, })) ) } )) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_parse_configuration_closure) }, + { be_const_key_weak(state_json, -1), be_const_closure(class_Matter_Plugin_state_json_closure) }, + { be_const_key_weak(read_attribute, 9), be_const_closure(class_Matter_Plugin_read_attribute_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(class_Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(clusters, -1), be_const_var(3) }, + { be_const_key_weak(is_local_device, -1), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(_parse_update_virtual, 2), be_const_closure(class_Matter_Plugin__parse_update_virtual_closure) }, + { be_const_key_weak(ack_request, -1), be_const_closure(class_Matter_Plugin_ack_request_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(get_endpoint, 19), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { be_const_key_weak(UPDATE_COMMANDS, 47), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(0, ( (struct bvalue*) &(const bvalue[]) { })) ) } )) }, - { be_const_key_weak(every_250ms, 0), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, - { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, + { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, + { be_const_key_weak(every_250ms, 34), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, + { be_const_key_weak(device, -1), be_const_var(1) }, + { be_const_key_weak(consolidate_update_commands, 48), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, + { be_const_key_weak(subscribe_event, -1), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, { be_const_key_weak(get_attribute_list, -1), be_const_closure(class_Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(has, 5), be_const_closure(class_Matter_Plugin_has_closure) }, + { be_const_key_weak(write_attribute, 10), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(contains_attribute, -1), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, + { be_const_key_weak(read_event, 38), be_const_closure(class_Matter_Plugin_read_event_closure) }, + { be_const_key_weak(subscribe_attribute, -1), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(contains_cluster, 23), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, + { be_const_key_weak(get_clusters, -1), be_const_closure(class_Matter_Plugin_get_clusters_closure) }, { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(get_cluster_list_sorted, -1), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, - { be_const_key_weak(timed_request, -1), be_const_closure(class_Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, - { be_const_key_weak(endpoint, 6), be_const_var(2) }, - { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(clusters, -1), be_const_var(3) }, - { be_const_key_weak(VIRTUAL, 9), be_const_bool(0) }, - { be_const_key_weak(CLUSTER_REVISIONS, 23), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(get_name, 30), be_const_closure(class_Matter_Plugin_get_name_closure) }, + { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, + { be_const_key_weak(TYPE, 6), be_nested_str_weak() }, + { be_const_key_weak(tick, -1), be_const_var(4) }, + { be_const_key_weak(CLUSTER_REVISIONS, 24), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(25, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, -1), be_const_int(5) }, @@ -1475,42 +1428,44 @@ be_local_class(Matter_Plugin, { be_const_key_int(6, -1), be_const_int(5) }, { be_const_key_int(1024, -1), be_const_int(3) }, })) ) } )) }, - { be_const_key_weak(consolidate_update_commands, 17), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, - { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, - { be_const_key_weak(_parse_update_virtual, 21), be_const_closure(class_Matter_Plugin__parse_update_virtual_closure) }, - { be_const_key_weak(update_virtual, 36), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_parse_configuration_closure) }, - { be_const_key_weak(invoke_request, 27), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(node_label, -1), be_const_var(5) }, - { be_const_key_weak(update_shadow, 30), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(class_Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(get_name, -1), be_const_closure(class_Matter_Plugin_get_name_closure) }, { be_const_key_weak(update_next, -1), be_const_var(0) }, - { be_const_key_weak(get_endpoint, -1), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(FEATURE_MAPS, -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(258, -1), be_const_int(5) }, - { be_const_key_int(49, -1), be_const_int(4) }, - })) ) } )) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, - { be_const_key_weak(read_event, -1), be_const_closure(class_Matter_Plugin_read_event_closure) }, { be_const_key_weak(COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(29, -1), be_const_nil() }, })) ) } )) }, - { be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(DISPLAY_NAME, 14), be_nested_str_weak() }, - { be_const_key_weak(ui_string_to_conf, 13), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, - { be_const_key_weak(contains_attribute, -1), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, - { be_const_key_weak(tick, -1), be_const_var(4) }, - { be_const_key_weak(contains_cluster, -1), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, + { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, + { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, + { be_const_key_weak(parse_sensors, 14), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(CLUSTERS, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(VIRTUAL, -1), be_const_bool(0) }, + { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak() }, + { be_const_key_weak(node_label, 7), be_const_var(5) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, + { be_const_key_weak(get_cluster_list_sorted, 39), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, + { be_const_key_weak(endpoint, -1), be_const_var(2) }, + { be_const_key_weak(BRIDGE, 0), be_const_bool(0) }, })), be_str_weak(Matter_Plugin) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h new file mode 100644 index 000000000000..81f010d5b83d --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h @@ -0,0 +1,301 @@ +/* Solidification of Matter_Plugin_2_Sensor_Boolean.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_closure(class_Matter_Plugin_Sensor_Boolean_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Boolean, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_updated +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_closure(class_Matter_Plugin_Sensor_Boolean_value_updated, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Boolean, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(value_updated), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Sensor_Boolean__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 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: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_closure(class_Matter_Plugin_Sensor_Boolean_update_shadow, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Boolean, + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(VIRTUAL), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(cmd), + /* K6 */ be_nested_str_weak(Status_X2010), + /* K7 */ be_nested_str_weak(find), + /* K8 */ be_nested_str_weak(StatusSNS), + /* K9 */ be_nested_str_weak(contains), + /* K10 */ be_nested_str_weak(ON), + /* K11 */ be_nested_str_weak(shadow_bool_value), + /* K12 */ be_nested_str_weak(value_updated), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[41]) { /* 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 + 0x88040101, // 0005 GETMBR R1 R0 K1 + 0x74060020, // 0006 JMPT R1 #0028 + 0x60040008, // 0007 GETGBL R1 G8 + 0x88080103, // 0008 GETMBR R2 R0 K3 + 0x7C040200, // 0009 CALL R1 1 + 0x00060401, // 000A ADD R1 K2 R1 + 0xB80A0800, // 000B GETNGBL R2 K4 + 0x8C080505, // 000C GETMET R2 R2 K5 + 0x58100006, // 000D LDCONST R4 K6 + 0x50140200, // 000E LDBOOL R5 1 0 + 0x7C080600, // 000F CALL R2 3 + 0x4C0C0000, // 0010 LDNIL R3 + 0x200C0403, // 0011 NE R3 R2 R3 + 0x780E0003, // 0012 JMPF R3 #0017 + 0x8C0C0507, // 0013 GETMET R3 R2 K7 + 0x58140008, // 0014 LDCONST R5 K8 + 0x7C0C0400, // 0015 CALL R3 2 + 0x5C080600, // 0016 MOVE R2 R3 + 0x4C0C0000, // 0017 LDNIL R3 + 0x200C0403, // 0018 NE R3 R2 R3 + 0x780E000D, // 0019 JMPF R3 #0028 + 0x8C0C0509, // 001A GETMET R3 R2 K9 + 0x5C140200, // 001B MOVE R5 R1 + 0x7C0C0400, // 001C CALL R3 2 + 0x780E0009, // 001D JMPF R3 #0028 + 0x8C0C0507, // 001E GETMET R3 R2 K7 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0x1C0C070A, // 0021 EQ R3 R3 K10 + 0x8810010B, // 0022 GETMBR R4 R0 K11 + 0x20100803, // 0023 NE R4 R4 R3 + 0x78120001, // 0024 JMPF R4 #0027 + 0x8C10010C, // 0025 GETMET R4 R0 K12 + 0x7C100200, // 0026 CALL R4 1 + 0x90021603, // 0027 SETMBR R0 K11 R3 + 0x80000000, // 0028 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_closure(class_Matter_Plugin_Sensor_Boolean_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Boolean, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_bool_value), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_closure(class_Matter_Plugin_Sensor_Boolean_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Boolean, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* 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_bool_value), + /* K5 */ be_nested_str_weak(value_updated), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[26]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0015, // 0002 JMPF R3 #0019 + 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 + 0x78120007, // 000F JMPF R4 #0018 + 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 + 0x78120001, // 0015 JMPF R4 #0018 + 0x8C100105, // 0016 GETMET R4 R0 K5 + 0x7C100200, // 0017 CALL R4 1 + 0x90020803, // 0018 SETMBR R0 K4 R3 + 0x80000000, // 0019 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Sensor_Boolean +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_class(Matter_Plugin_Sensor_Boolean, + 2, + &be_class_Matter_Plugin_Device, + be_nested_map(11, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(shadow_bool_value, -1), be_const_var(1) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_parse_status_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_value_updated_closure) }, + { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Boolean__X3Clambda_X3E_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_update_shadow_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, + { be_const_key_weak(init, 8), be_const_closure(class_Matter_Plugin_Sensor_Boolean_init_closure) }, + { be_const_key_weak(parse_configuration, 2), be_const_closure(class_Matter_Plugin_Sensor_Boolean_parse_configuration_closure) }, + })), + be_str_weak(Matter_Plugin_Sensor_Boolean) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h deleted file mode 100644 index 2973b20d57a4..000000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h +++ /dev/null @@ -1,594 +0,0 @@ -/* Solidification of Matter_Plugin_2_Sensor_Waterleak.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* 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(set), - /* K6 */ be_nested_str_weak(BOOL), - /* K7 */ be_nested_str_weak(shadow_leak), - /* K8 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0044, // 0004 LDINT R7 69 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0006, // 0006 JMPF R7 #000E - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0004, // 0008 JMPF R7 #000E - 0x8C1C0705, // 0009 GETMET R7 R3 K5 - 0x88240906, // 000A GETMBR R9 R4 K6 - 0x88280107, // 000B GETMBR R10 R0 K7 - 0x7C1C0600, // 000C CALL R7 3 - 0x80040E00, // 000D RET 1 R7 - 0x601C0003, // 000E GETGBL R7 G3 - 0x5C200000, // 000F MOVE R8 R0 - 0x7C1C0200, // 0010 CALL R7 1 - 0x8C1C0F08, // 0011 GETMET R7 R7 K8 - 0x5C240200, // 0012 MOVE R9 R1 - 0x5C280400, // 0013 MOVE R10 R2 - 0x5C2C0600, // 0014 MOVE R11 R3 - 0x7C1C0800, // 0015 CALL R7 4 - 0x80040E00, // 0016 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_leak), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(content_send), - /* K5 */ be_nested_str_weak(PREFIX), - /* K6 */ be_nested_str_weak(html_escape), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0004, // 0004 JMPT R3 #000A - 0x600C0008, // 0005 GETGBL R3 G8 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0403, // 0008 ADD R3 K2 R3 - 0x5C080600, // 0009 MOVE R2 R3 - 0x8C0C0304, // 000A GETMET R3 R1 K4 - 0x60140018, // 000B GETGBL R5 G24 - 0x88180105, // 000C GETMBR R6 R0 K5 - 0x780A0003, // 000D JMPF R2 #0012 - 0x8C1C0306, // 000E GETMET R7 R1 K6 - 0x5C240400, // 000F MOVE R9 R2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020000, // 0011 JMP #0013 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x7C140400, // 0013 CALL R5 2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X2010), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_leak), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* 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 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0044, // 0026 LDINT R6 69 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Waterleak), - /* K2 */ be_nested_str_weak(shadow_leak), - /* K3 */ be_nested_str_weak(attribute_updated), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x8C080300, // 0000 GETMET R2 R1 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0403, // 0004 NE R3 R2 R3 - 0x780E000B, // 0005 JMPF R3 #0012 - 0x600C0017, // 0006 GETGBL R3 G23 - 0x5C100400, // 0007 MOVE R4 R2 - 0x7C0C0200, // 0008 CALL R3 1 - 0x5C080600, // 0009 MOVE R2 R3 - 0x880C0102, // 000A GETMBR R3 R0 K2 - 0x200C0602, // 000B NE R3 R3 R2 - 0x780E0004, // 000C JMPF R3 #0012 - 0x8C0C0103, // 000D GETMET R3 R0 K3 - 0x54160044, // 000E LDINT R5 69 - 0x58180004, // 000F LDCONST R6 K4 - 0x7C0C0600, // 0010 CALL R3 3 - 0x90020402, // 0011 SETMBR R0 K2 R2 - 0x600C0003, // 0012 GETGBL R3 G3 - 0x5C100000, // 0013 MOVE R4 R0 - 0x7C0C0200, // 0014 CALL R3 1 - 0x8C0C0705, // 0015 GETMET R3 R3 K5 - 0x5C140200, // 0016 MOVE R5 R1 - 0x7C0C0400, // 0017 CALL R3 2 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_status -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 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_leak), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - }), - be_str_weak(parse_status), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0009, // 0000 LDINT R3 10 - 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 - 0x541A0044, // 0017 LDINT R6 69 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020803, // 001A SETMBR R0 K4 R3 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_leak), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 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 class: Matter_Plugin_Sensor_Waterleak -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; -be_local_class(Matter_Plugin_Sensor_Waterleak, - 2, - &be_class_Matter_Plugin_Device, - be_nested_map(19, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(67, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(1, - ( (struct bvalue*) &(const bvalue[]) { - be_nested_str_weak(Waterleak), - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_init_closure) }, - { be_const_key_weak(shadow_leak, 6), be_const_var(1) }, - { be_const_key_weak(web_values, 18), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_closure) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration_closure) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) }, - { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status_closure) }, - { be_const_key_weak(ARG_HINT, 4), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(waterleak) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) }, - })), - be_str_weak(Matter_Plugin_Sensor_Waterleak) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h similarity index 55% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h index 3f24a0ffe3cf..4d5232838380 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Contact.h @@ -1,4 +1,4 @@ -/* Solidification of Matter_Plugin_2_Sensor_Contact.h */ +/* Solidification of Matter_Plugin_3_Sensor_Contact.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ @@ -6,6 +6,52 @@ extern const bclass be_class_Matter_Plugin_Sensor_Contact; +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_bool_value), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Contact), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220044, // 0005 LDINT R8 69 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -28,7 +74,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */ /* K4 */ be_const_int(0), /* K5 */ be_nested_str_weak(set_or_nil), /* K6 */ be_nested_str_weak(BOOL), - /* K7 */ be_nested_str_weak(shadow_contact), + /* K7 */ be_nested_str_weak(shadow_bool_value), /* K8 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), @@ -64,37 +110,44 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */ /******************************************************************** -** Solidified function: init +** Solidified function: web_values ********************************************************************/ extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */ +be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values, /* name */ be_nested_proto( - 9, /* nstack */ - 4, /* argc */ + 10, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Contact, 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_contact), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_bool_value), }), - be_str_weak(init), + be_str_weak(web_values), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 }) ) ); @@ -157,12 +210,12 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix, /* name /******************************************************************** -** Solidified function: update_shadow +** Solidified function: value_updated ********************************************************************/ extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */ +be_local_closure(class_Matter_Plugin_Sensor_Contact_value_updated, /* name */ be_nested_proto( - 8, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -170,288 +223,18 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Contact, 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X2010), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_contact), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* 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 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0044, // 0026 LDINT R6 69 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(shadow_contact), - /* K1 */ be_nested_str_weak(_parse_update_virtual), - /* K2 */ be_nested_str_weak(Contact), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x8C080101, // 0000 GETMET R2 R0 K1 - 0x5C100200, // 0001 MOVE R4 R1 - 0x58140002, // 0002 LDCONST R5 K2 - 0x88180100, // 0003 GETMBR R6 R0 K0 - 0x601C0017, // 0004 GETGBL R7 G23 - 0x54220044, // 0005 LDINT R8 69 - 0x58240003, // 0006 LDCONST R9 K3 - 0x7C080E00, // 0007 CALL R2 7 - 0x90020002, // 0008 SETMBR R0 K0 R2 - 0x60080003, // 0009 GETGBL R2 G3 - 0x5C0C0000, // 000A MOVE R3 R0 - 0x7C080200, // 000B CALL R2 1 - 0x8C080504, // 000C GETMET R2 R2 K4 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_status -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_status, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 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_contact), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - }), - be_str_weak(parse_status), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0009, // 0000 LDINT R3 10 - 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 - 0x541A0044, // 0017 LDINT R6 69 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020803, // 001A SETMBR R0 K4 R3 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_contact), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 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: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), }), - be_str_weak(parse_configuration), + be_str_weak(value_updated), &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x540E0044, // 0001 LDINT R3 69 + 0x58100001, // 0002 LDCONST R4 K1 + 0x7C040600, // 0003 CALL R1 3 + 0x80000000, // 0004 RET 0 }) ) ); @@ -461,34 +244,20 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* na /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Contact ********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; be_local_class(Matter_Plugin_Sensor_Contact, - 2, - &be_class_Matter_Plugin_Device, - be_nested_map(19, + 0, + &be_class_Matter_Plugin_Sensor_Boolean, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(21, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(parse_configuration, 7), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, + { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) }, + { be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Contact), })) ) } )) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_shadow_closure) }, - { be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Contact) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_closure) }, - { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix_closure) }, - { be_const_key_weak(shadow_contact, 4), be_const_var(1) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) }, - { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_status_closure) }, - { be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -573,10 +342,15 @@ be_local_class(Matter_Plugin_Sensor_Contact, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_init_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(21, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_value_updated_closure) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(contact) }, })), be_str_weak(Matter_Plugin_Sensor_Contact) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h similarity index 56% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h index 3ba19f96ef39..2071c7b9568a 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h @@ -1,4 +1,4 @@ -/* Solidification of Matter_Plugin_2_Sensor_Occupancy.h */ +/* Solidification of Matter_Plugin_3_Sensor_Occupancy.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ @@ -6,6 +6,52 @@ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_bool_value), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Occupancy), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220405, // 0005 LDINT R8 1030 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -28,7 +74,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name /* K4 */ be_const_int(0), /* K5 */ be_nested_str_weak(set_or_nil), /* K6 */ be_nested_str_weak(U1), - /* K7 */ be_nested_str_weak(shadow_occupancy), + /* K7 */ be_nested_str_weak(shadow_bool_value), /* K8 */ be_const_int(1), /* K9 */ be_nested_str_weak(set), /* K10 */ be_const_int(3), @@ -84,37 +130,44 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name /******************************************************************** -** Solidified function: init +** Solidified function: web_values ********************************************************************/ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */ +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */ be_nested_proto( - 9, /* nstack */ - 4, /* argc */ + 10, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Occupancy, 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_occupancy), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(shadow_bool_value), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_occupancy), }), - be_str_weak(init), + be_str_weak(web_values), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 }) ) ); @@ -139,7 +192,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* na /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(get_name), /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(shadow_bool_value), /* K4 */ be_nested_str_weak(content_send), /* K5 */ be_nested_str_weak(PREFIX), /* K6 */ be_nested_str_weak(html_escape), @@ -177,242 +230,12 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* na /******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X2010), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_occupancy), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* 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 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0405, // 0026 LDINT R6 1030 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(val_onoff), - /* K1 */ be_nested_str_weak(_parse_update_virtual), - /* K2 */ be_nested_str_weak(Occupancy), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x8C080101, // 0000 GETMET R2 R0 K1 - 0x5C100200, // 0001 MOVE R4 R1 - 0x58140002, // 0002 LDCONST R5 K2 - 0x88180100, // 0003 GETMBR R6 R0 K0 - 0x601C0017, // 0004 GETGBL R7 G23 - 0x54220405, // 0005 LDINT R8 1030 - 0x58240003, // 0006 LDCONST R9 K3 - 0x7C080E00, // 0007 CALL R2 7 - 0x90020002, // 0008 SETMBR R0 K0 R2 - 0x60080003, // 0009 GETGBL R2 G3 - 0x5C0C0000, // 000A MOVE R3 R0 - 0x7C080200, // 000B CALL R2 1 - 0x8C080504, // 000C GETMET R2 R2 K4 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_status -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 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_status), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0009, // 0000 LDINT R3 10 - 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: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values +** Solidified function: value_updated ********************************************************************/ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */ +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_value_updated, /* name */ be_nested_proto( - 10, /* nstack */ + 5, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -420,58 +243,18 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Occupancy, 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_occupancy), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_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, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + be_str_weak(value_updated), &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 + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x540E0405, // 0001 LDINT R3 1030 + 0x58100001, // 0002 LDCONST R4 K1 + 0x7C040600, // 0003 CALL R1 3 + 0x80000000, // 0004 RET 0 }) ) ); @@ -481,34 +264,20 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Occupancy ********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; be_local_class(Matter_Plugin_Sensor_Occupancy, - 2, - &be_class_Matter_Plugin_Device, - be_nested_map(19, + 0, + &be_class_Matter_Plugin_Sensor_Boolean, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(263, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, + { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) }, + { be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Occupancy), })) ) } )) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Occupancy) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_closure) }, - { be_const_key_weak(parse_configuration, 4), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, - { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status_closure) }, - { be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -595,10 +364,15 @@ be_local_class(Matter_Plugin_Sensor_Occupancy, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) }, - { be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_init_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(263, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_value_updated_closure) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(occupancy) }, })), be_str_weak(Matter_Plugin_Sensor_Occupancy) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h similarity index 55% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h index 1d82ec3fa9a7..b436d5fbd2ac 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h @@ -1,4 +1,4 @@ -/* Solidification of Matter_Plugin_2_Sensor_OnOff.h */ +/* Solidification of Matter_Plugin_3_Sensor_OnOff.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ @@ -6,157 +6,6 @@ extern const bclass be_class_Matter_Plugin_Sensor_OnOff; -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_OnOff__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 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: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_OnOff; -be_local_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_OnOff, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X2010), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_onoff), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* 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 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0005, // 0026 LDINT R6 6 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_OnOff; -be_local_closure(class_Matter_Plugin_Sensor_OnOff_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_OnOff, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -180,7 +29,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_read_attribute, /* name */ /* K5 */ be_const_int(0), /* K6 */ be_nested_str_weak(set), /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(shadow_onoff), + /* K8 */ be_nested_str_weak(shadow_bool_value), /* K9 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), @@ -233,7 +82,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json, /* name * 1, /* has constants */ ( &(const bvalue[ 2]) { /* constants */ /* K0 */ be_nested_str_weak(_X2C_X22OnOff_X22_X3A_X25s), - /* K1 */ be_nested_str_weak(shadow_onoff), + /* K1 */ be_nested_str_weak(shadow_bool_value), }), be_str_weak(append_state_json), &be_const_str_solidified, @@ -251,16 +100,49 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json, /* name * /*******************************************************************/ +/******************************************************************** +** Solidified function: value_updated +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_OnOff; +be_local_closure(class_Matter_Plugin_Sensor_OnOff_value_updated, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_OnOff, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_updated), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x540E0005, // 0001 LDINT R3 6 + 0x58100001, // 0002 LDCONST R4 K1 + 0x7C040600, // 0003 CALL R1 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_OnOff ********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; be_local_class(Matter_Plugin_Sensor_OnOff, - 2, - &be_class_Matter_Plugin_Device, - be_nested_map(14, + 0, + &be_class_Matter_Plugin_Sensor_Boolean, + be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(read_attribute, 1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_read_attribute_closure) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -344,23 +226,15 @@ be_local_class(Matter_Plugin_Sensor_OnOff, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) }, - { be_const_key_weak(append_state_json, 12), be_const_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(OnOff_X20Sensor) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_read_attribute_closure) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_parse_configuration_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json_closure) }, + { be_const_key_weak(TYPES, 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(2128, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(tasmota_switch_index, 13), be_const_var(0) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_value_updated_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(OnOff_X20Sensor) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) }, })), be_str_weak(Matter_Plugin_Sensor_OnOff) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Rain.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Rain.h new file mode 100644 index 000000000000..f40e8679406c --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Rain.h @@ -0,0 +1,358 @@ +/* Solidification of Matter_Plugin_3_Sensor_Rain.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Sensor_Rain; + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_closure(class_Matter_Plugin_Sensor_Rain_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Rain, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_bool_value), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Rain), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220044, // 0005 LDINT R8 69 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_closure(class_Matter_Plugin_Sensor_Rain_read_attribute, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Rain, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* 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(set), + /* K6 */ be_nested_str_weak(BOOL), + /* K7 */ be_nested_str_weak(shadow_bool_value), + /* K8 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E0044, // 0004 LDINT R7 69 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0006, // 0006 JMPF R7 #000E + 0x1C1C0D04, // 0007 EQ R7 R6 K4 + 0x781E0004, // 0008 JMPF R7 #000E + 0x8C1C0705, // 0009 GETMET R7 R3 K5 + 0x88240906, // 000A GETMBR R9 R4 K6 + 0x88280107, // 000B GETMBR R10 R0 K7 + 0x7C1C0600, // 000C CALL R7 3 + 0x80040E00, // 000D RET 1 R7 + 0x601C0003, // 000E GETGBL R7 G3 + 0x5C200000, // 000F MOVE R8 R0 + 0x7C1C0200, // 0010 CALL R7 1 + 0x8C1C0F08, // 0011 GETMET R7 R7 K8 + 0x5C240200, // 0012 MOVE R9 R1 + 0x5C280400, // 0013 MOVE R10 R2 + 0x5C2C0600, // 0014 MOVE R11 R3 + 0x7C1C0800, // 0015 CALL R7 4 + 0x80040E00, // 0016 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_closure(class_Matter_Plugin_Sensor_Rain_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Rain, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Rain_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_bool_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_closure(class_Matter_Plugin_Sensor_Rain_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Rain, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_updated +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_closure(class_Matter_Plugin_Sensor_Rain_value_updated, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Rain, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(attribute_updated), + /* K1 */ be_const_int(0), + }), + be_str_weak(value_updated), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x540E0044, // 0001 LDINT R3 69 + 0x58100001, // 0002 LDCONST R4 K1 + 0x7C040600, // 0003 CALL R1 3 + 0x80000000, // 0004 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Sensor_Rain +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_class(Matter_Plugin_Sensor_Rain, + 0, + &be_class_Matter_Plugin_Sensor_Boolean, + be_nested_map(10, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Rain_update_virtual_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Rain) }, + { be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Rain_read_attribute_closure) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Rain), + })) ) } )) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(4), + be_const_int(5), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(8, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(3), + be_const_int(5), + be_const_int(10), + be_const_int(15), + be_const_int(17), + be_const_int(18), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_web_values_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(68, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_web_values_prefix_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_value_updated_closure) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(rain) }, + })), + be_str_weak(Matter_Plugin_Sensor_Rain) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h new file mode 100644 index 000000000000..a25021d9a01c --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h @@ -0,0 +1,273 @@ +/* Solidification of Matter_Plugin_3_Sensor_Waterleak.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_bool_value), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Waterleak), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220044, // 0005 LDINT R8 69 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + +// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Rain' +extern bclosure *class_Matter_Plugin_Sensor_Rain_read_attribute; + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_bool_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + +// Borrowed method 'value_updated' from class 'class_Matter_Plugin_Sensor_Rain' +extern bclosure *class_Matter_Plugin_Sensor_Rain_value_updated; + +/******************************************************************** +** Solidified class: Matter_Plugin_Sensor_Waterleak +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Boolean; +be_local_class(Matter_Plugin_Sensor_Waterleak, + 0, + &be_class_Matter_Plugin_Sensor_Boolean, + be_nested_map(10, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) }, + { be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Rain_read_attribute_closure) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Waterleak), + })) ) } )) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(4), + be_const_int(5), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(8, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(12, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(3), + be_const_int(5), + be_const_int(10), + be_const_int(15), + be_const_int(17), + be_const_int(18), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(7, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(67, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix_closure) }, + { be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_value_updated_closure) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(waterleak) }, + })), + be_str_weak(Matter_Plugin_Sensor_Waterleak) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h new file mode 100644 index 000000000000..61311846b5aa --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h @@ -0,0 +1,26 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Rain.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Rain; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Rain +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Rain; +be_local_class(Matter_Plugin_Bridge_Sensor_Rain, + 0, + &be_class_Matter_Plugin_Sensor_Rain, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, 2), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_rain) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Rain) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Rain.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Rain.h new file mode 100644 index 000000000000..66881e1b50ac --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Rain.h @@ -0,0 +1,27 @@ +/* Solidification of Matter_Plugin_9_Virt_Sensor_Rain.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain; + +/******************************************************************** +** Solidified class: Matter_Plugin_Virt_Sensor_Rain +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain; +be_local_class(Matter_Plugin_Virt_Sensor_Rain, + 0, + &be_class_Matter_Plugin_Virt_Sensor_Rain, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(VIRTUAL, 3), be_const_bool(1) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2ERain) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(v_rain) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(ARG, 2), be_nested_str_weak() }, + })), + be_str_weak(Matter_Plugin_Virt_Sensor_Rain) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h index 8b90cdfe9e40..f33b2921e314 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h @@ -15,13 +15,13 @@ be_local_class(Matter_Plugin_Virt_Sensor_Waterleak, &be_class_Matter_Plugin_Virt_Sensor_Waterleak, be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key(VIRTUAL, 3), be_const_bool(1) }, - { be_const_key(DISPLAY_NAME, -1), be_nested_str(v_X2EWaterleak) }, - { be_const_key(TYPE, -1), be_nested_str(v_waterleak) }, - { be_const_key(ARG_HINT, -1), be_nested_str(_Not_X20used_) }, - { be_const_key(ARG, 2), be_nested_str() }, + { be_const_key_weak(VIRTUAL, 3), be_const_bool(1) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2EWaterleak) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(v_waterleak) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, + { be_const_key_weak(ARG, 2), be_nested_str_weak() }, })), - (bstring*) &be_const_str_Matter_Plugin_Virt_Sensor_Waterleak + be_str_weak(Matter_Plugin_Virt_Sensor_Waterleak) ); /********************************************************************/ /* 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 a92be66c2725..93f389557af5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -3385,7 +3385,7 @@ be_local_class(Matter_UI, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_weak(equal_map, -1), be_const_static_closure(class_Matter_UI_equal_map_closure) }, { be_const_key_weak(page_part_mgr_adv, -1), be_const_closure(class_Matter_UI_page_part_mgr_adv_closure) }, - { be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity_X7Chttp_occupancy_X7Chttp_contact_X7Chttp_flow_X7Chttp_waterleak_X7Chttp_airquality) }, + { be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity_X7Chttp_occupancy_X7Chttp_contact_X7Chttp_flow_X7Chttp_rain_X7Chttp_waterleak_X7Chttp_airquality) }, { be_const_key_weak(page_part_mgr, 25), be_const_closure(class_Matter_UI_page_part_mgr_closure) }, { be_const_key_weak(show_plugins_hints_js, -1), be_const_closure(class_Matter_UI_show_plugins_hints_js_closure) }, { be_const_key_weak(show_enable, -1), be_const_closure(class_Matter_UI_show_enable_closure) }, @@ -3397,7 +3397,7 @@ be_local_class(Matter_UI, { be_const_key_weak(show_commissioning_info, -1), be_const_closure(class_Matter_UI_show_commissioning_info_closure) }, { be_const_key_weak(page_part_ctl, 18), be_const_closure(class_Matter_UI_page_part_ctl_closure) }, { be_const_key_weak(show_fabric_info, -1), be_const_closure(class_Matter_UI_show_fabric_info_closure) }, - { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak_X7Cv_airquality) }, + { be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Crain_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_rain_X7Cv_waterleak_X7Cv_airquality) }, { be_const_key_weak(web_get_arg, -1), be_const_closure(class_Matter_UI_web_get_arg_closure) }, { be_const_key_weak(plugin_option, 5), be_const_closure(class_Matter_UI_plugin_option_closure) }, { be_const_key_weak(web_add_config_button, -1), be_const_closure(class_Matter_UI_web_add_config_button_closure) }, diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h index bcf0a1b9aed6..a36e124cc80f 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h @@ -6213,55 +6213,58 @@ be_local_class(Matter_Device, { be_const_key_weak(stop, 14), be_const_closure(class_Matter_Device_stop_closure) }, { be_const_key_weak(stop_basic_commissioning, 13), be_const_closure(class_Matter_Device_stop_basic_commissioning_closure) }, { be_const_key_weak(plugins_classes, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(47, + be_const_map( * be_nested_map(50, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(v_waterleak, 40), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, - { be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) }, - { be_const_key_weak(http_illuminance, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, - { be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) }, - { be_const_key_weak(humidity, 24), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) }, + { be_const_key_weak(relay, 29), be_const_class(be_class_Matter_Plugin_OnOff) }, + { be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) }, + { be_const_key_weak(v_light2, -1), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, + { be_const_key_weak(illuminance, -1), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, + { be_const_key_weak(humidity, -1), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) }, + { be_const_key_weak(http_occupancy, 31), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) }, + { be_const_key_weak(http_contact, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) }, + { be_const_key_weak(light0, 16), be_const_class(be_class_Matter_Plugin_Light0) }, { be_const_key_weak(v_pressure, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) }, - { be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) }, - { be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) }, - { be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) }, - { be_const_key_weak(airquality, -1), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) }, - { be_const_key_weak(light1, 17), be_const_class(be_class_Matter_Plugin_Light1) }, - { be_const_key_weak(v_illuminance, 26), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) }, - { be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) }, - { be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) }, - { be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, - { be_const_key_weak(http_light0, 6), be_const_class(be_class_Matter_Plugin_Bridge_Light0) }, - { be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) }, - { be_const_key_weak(contact, 29), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, - { be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) }, - { be_const_key_weak(http_flow, 10), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) }, - { be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) }, - { be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) }, + { be_const_key_weak(v_light1, 10), be_const_class(be_class_Matter_Plugin_Virt_Light1) }, { be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) }, - { be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) }, - { be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) }, - { be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, - { be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) }, + { be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) }, + { be_const_key_weak(http_flow, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) }, + { be_const_key_weak(v_contact, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) }, + { be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) }, + { be_const_key_weak(http_illuminance, 33), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, + { be_const_key_weak(rain, 22), be_const_class(be_class_Matter_Plugin_Sensor_Rain) }, { be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) }, + { be_const_key_weak(shutter, 6), be_const_class(be_class_Matter_Plugin_Shutter) }, + { be_const_key_weak(light2, -1), be_const_class(be_class_Matter_Plugin_Light2) }, + { be_const_key_weak(http_light0, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light0) }, + { be_const_key_weak(v_illuminance, 49), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) }, + { be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) }, + { be_const_key_weak(root, 27), be_const_class(be_class_Matter_Plugin_Root) }, + { be_const_key_weak(v_waterleak, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, + { be_const_key_weak(contact, -1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, + { be_const_key_weak(http_rain, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Rain) }, + { be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) }, { be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) }, + { be_const_key_weak(pressure, 43), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) }, + { be_const_key_weak(shutter_X2Btilt, 24), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, + { be_const_key_weak(v_humidity, 46), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) }, + { be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) }, + { be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) }, + { be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) }, { be_const_key_weak(v_airquality, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) }, - { be_const_key_weak(illuminance, 36), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, - { be_const_key_weak(shutter, 34), be_const_class(be_class_Matter_Plugin_Shutter) }, - { be_const_key_weak(waterleak, 5), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) }, - { be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) }, - { be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) }, - { be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) }, - { be_const_key_weak(v_light2, 42), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, - { be_const_key_weak(light2, 3), be_const_class(be_class_Matter_Plugin_Light2) }, - { be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) }, - { be_const_key_weak(v_contact, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) }, - { be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, + { be_const_key_weak(http_waterleak, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) }, + { be_const_key_weak(waterleak, 8), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) }, + { be_const_key_weak(light1, 3), be_const_class(be_class_Matter_Plugin_Light1) }, + { be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, + { be_const_key_weak(v_flow, 13), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) }, { be_const_key_weak(v_light0, -1), be_const_class(be_class_Matter_Plugin_Virt_Light0) }, - { be_const_key_weak(relay, 43), be_const_class(be_class_Matter_Plugin_OnOff) }, + { be_const_key_weak(occupancy, 48), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, + { be_const_key_weak(airquality, 34), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) }, + { be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) }, + { be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) }, { be_const_key_weak(flow, -1), be_const_class(be_class_Matter_Plugin_Sensor_Flow) }, - { be_const_key_weak(http_waterleak, 2), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) }, - { be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) }, - { be_const_key_weak(root, 39), be_const_class(be_class_Matter_Plugin_Root) }, + { be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) }, + { be_const_key_weak(v_rain, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Rain) }, + { be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) }, })) ) } )) }, { be_const_key_weak(tick, 9), be_const_var(10) }, { be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(17) },