diff --git a/CHANGELOG.md b/CHANGELOG.md index 61d7359d2..b556e979c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - Matter support for Shutters (without Tilt) (#18509) - Support for TC74 temperature sensor by Michael Loftis (#18042) - Matter support for Shutters with Tilt +- Matter POC for remote Relay ### Breaking Changed diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index 459518fee..6469098a3 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -166,6 +166,8 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_Sensor_Temp.h" #include "solidify/solidified_Matter_Plugin_Sensor_Illuminance.h" #include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h" +#include "solidify/solidified_Matter_Plugin_Bridge_HTTP.h" +#include "solidify/solidified_Matter_Plugin_Bridge_OnOff.h" /*********************************************************************************************\ * Get a bytes() object of the certificate DAC/PAI_Cert @@ -346,6 +348,8 @@ module matter (scope: global, strings: weak) { Plugin_Sensor_Temp, class(be_class_Matter_Plugin_Sensor_Temp) // Temperature Sensor Plugin_Sensor_Illuminance, class(be_class_Matter_Plugin_Sensor_Illuminance) // Illuminance Sensor Plugin_Sensor_Humidity, class(be_class_Matter_Plugin_Sensor_Humidity) // Humidity Sensor + Plugin_Bridge_HTTP, class(be_class_Matter_Plugin_Bridge_HTTP) // HTTP bridge superclass + Plugin_Bridge_OnOff, class(be_class_Matter_Plugin_Bridge_OnOff) // HTTP Relay/Light behavior (OnOff) } @const_object_info_end */ diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be index e96321fb8..d027e7dfd 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Device.be @@ -297,10 +297,16 @@ class Matter_Device if self.commissioning_open != nil && tasmota.time_reached(self.commissioning_open) # timeout reached, close provisioning self.commissioning_open = nil end - # call all plugins + end + + ############################################################# + # dispatch every 250ms to all plugins + def every_250ms() + self.message_handler.every_250ms() + # call all plugins, use a manual loop to avoid creating a new object var idx = 0 while idx < size(self.plugins) - self.plugins[idx].every_second() + self.plugins[idx].every_250ms() idx += 1 end end @@ -334,12 +340,6 @@ class Matter_Device self.tick += 1 end - ############################################################# - # dispatch every 250ms click to sub-objects that need it - def every_250ms() - self.message_handler.every_250ms() - end - ############################################################# def stop() tasmota.remove_driver(self) diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be index 142987bc3..8f725225d 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin.be @@ -23,10 +23,15 @@ #@ solidify:Matter_Plugin,weak class Matter_Plugin + # Global type system for plugins static var TYPE = "" # name of the plug-in in json static var NAME = "" # display name of the plug-in static var ARG = "" # additional argument name (or empty if none) static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type + # Behavior of the plugin, frequency at which `update_shadow()` is called + static var UPDATE_TIME = 5000 # default is every 5 seconds + var update_next # next timestamp for update + # Configuration of the plugin: clusters and type static var CLUSTERS = { 0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453 } @@ -53,6 +58,12 @@ class Matter_Plugin self.clusters = self.consolidate_clusters() end + ############################################################# + # return the map of all types + def get_types() + return self.TYPES + end + ############################################################# # Stub for updating shadow values (local copies of what we published to the Matter gateway) def update_shadow() @@ -139,10 +150,11 @@ class Matter_Plugin if attribute == 0x0000 # ---------- DeviceTypeList / list[DeviceTypeStruct] ---------- var dtl = TLV.Matter_TLV_array() - for dt: self.TYPES.keys() + var types = self.get_types() + for dt: types.keys() var d1 = dtl.add_struct() d1.add_TLV(0, TLV.U2, dt) # DeviceType - d1.add_TLV(1, TLV.U2, self.TYPES[dt]) # Revision + d1.add_TLV(1, TLV.U2, types[dt]) # Revision end return dtl elif attribute == 0x0001 # ---------- ServerList / list[cluster-id] ---------- @@ -227,9 +239,48 @@ class Matter_Plugin end ############################################################# - # every_second - def every_second() - self.update_shadow() # force reading value and sending subscriptions + # every_250ms + # + # check if the timer expired and update_shadow() needs to be called + def every_250ms() + if self.update_next == nil + # initialization to a random value within range + import crypto + var rand31 = crypto.random(4).get(0,4) & 0x7FFFFFFF # random int over 31 bits + self.update_next = tasmota.millis(rand31 % self.UPDATE_TIME) + else + if tasmota.time_reached(self.update_next) + self.update_shadow_lazy() # call update_shadow if not already called + self.update_next = tasmota.millis(self.UPDATE_TIME) # rearm timer + end + end + end + + ############################################################# + # UI Methods + ############################################################# + # ui_conf_to_string + # + # Convert the current plugin parameters to a single string + static def ui_conf_to_string(cl, conf) + var arg_name = cl.ARG + var arg = arg_name ? str(conf.find(arg_name, '')) : '' + # print("MTR: ui_conf_to_string", conf, cl, arg_name, arg) + return arg + end + + ############################################################# + # ui_string_to_conf + # + # Convert the string in UI to actual parameters added to the map + static def ui_string_to_conf(cl, conf, arg) + var arg_name = cl.ARG + var arg_type = cl.ARG_TYPE + if arg && arg_name + conf[arg_name] = arg_type(arg) + end + # print("ui_string_to_conf", conf, arg) + return conf end end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be new file mode 100644 index 000000000..612fe489d --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_HTTP.be @@ -0,0 +1,228 @@ +# +# Matter_Plugin_Bridge_HTTP.be - implements base class for a Bridge via HTTP +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Device end + +#@ solidify:Matter_Plugin_Bridge_HTTP,weak + +class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device + static var TYPE = "" # name of the plug-in in json + static var NAME = "" # display name of the plug-in + static var ARG = "" # additional argument name (or empty if none) + static var ARG_HTTP = "url" # domain name + static var UPDATE_TIME = 3000 # update every 3s + static var HTTP_TIMEOUT = 300 # wait for 300ms max, since we're on LAN + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + # 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 + + # 0x0028: [0,1,2,3,4,5,6,7,8,9,0x0A,0x0F,0x12,0x13],# Basic Information Cluster cluster 11.1 p.565 + 0x0039: [0x11] # Bridged Device Basic Information 9.13 p.485 + + } + # static var TYPES = { 0x010A: 2 } # On/Off Light + + var tasmota_http # domain name for HTTP, ex: 'http://192.168.1.10/' + var tasmota_status_8 # remote `Status 8` sensor values (last known) + var tasmota_status_11 # remote `Status 11` light values (last known) + # each contain a `_tick` attribute to known when they were last loaded + var reachable # is the device reachable + var reachable_tick # last tick when the reachability was seen (avoids sending superfluous ping commands) + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + import string + super(self).init(device, endpoint, arguments) + + var http = arguments.find(self.ARG_HTTP) + if http + if string.find(http, '://') < 0 + http = "http://" + http + "/" + end + self.tasmota_http = http + else + tasmota.log(string.format("MTR: ERROR: 'url' is not configured for endpoint %i", endpoint), 2) + end + self.tasmota_status_8 = nil + self.tasmota_status_11 = nil + self.reachable = false # force a valid bool value + end + + ############################################################# + # return the map of all types, add the bridged type + def get_types() + var types = {} + for k: self.TYPES.keys() + types[k] = self.TYPES[k] + end + # Add Bridged Node + types[0x0013] = 1 # Bridged Node, v1 + return types + end + + ############################################################# + # call_remote + # + # Call a remote Tasmota device, returns Berry native map or nil + def call_remote(cmd, arg) + if !self.tasmota_http return nil end + import json + import string + if !tasmota.wifi()['up'] && !tasmota.eth()['up'] return nil end # no network + var retry = 2 # try 2 times if first failed + while retry > 0 + var cl = webclient() + cl.set_timeouts(1000, 1000) + cl.set_follow_redirects(false) + var url = string.format("%scm?cmnd=%s%%20%s", self.tasmota_http, cmd, arg ? arg : '') + tasmota.log("MTR: HTTP GET "+url, 3) + cl.begin(url) + var r = cl.GET() + tasmota.log("MTR: HTTP GET code=" + str(r), 3) + if r == 200 + var s = cl.get_string() + cl.close() + tasmota.log("MTR: HTTP GET payload=" + s, 3) + var j = json.load(s) + # device is known to be reachable + self.reachable = true + self.reachable_tick = self.device.tick + return j + end + cl.close() + + retry -= 1 + tasmota.log("MTR: HTTP GET retrying", 3) + end + self.reachable = false + return nil + end + + ############################################################# + # is_reachable() + # + # Pings the device and checks if it's reachable + def is_reachable() + if self.device.tick != self.reachable_tick + var ret = self.call_remote("", "") # empty command works as a ping + self.reachable = (ret != nil) + # self.reachable_tick = cur_tick # done by caller + end + return self.reachable + end + + ############################################################# + # get_status_8() + # + # Get remote `Status 8` values of sensors, and cache for the current tick + def get_status_8() + var cur_tick = self.device.tick + if self.tasmota_status_8 == nil || self.tasmota_status_8.find("_tick") != cur_tick + var ret = self.call_remote("Status", "8") # call `Status 8` + if ret + ret["_tick"] = cur_tick + self.tasmota_status_8 = ret + return ret + else + return nil + end + else + return self.tasmota_status_8 # return cached value + end + end + + ############################################################# + # get_status_11() + # + # Get remote `Status 11` values of sensors, and cache for the current tick + def get_status_11() + var cur_tick = self.device.tick + if self.tasmota_status_11 == nil || self.tasmota_status_11.find("_tick") != cur_tick + var ret = self.call_remote("Status", "11") # call `Status 8` + if ret + ret["_tick"] = cur_tick + self.tasmota_status_11 = ret + return ret + else + return nil + end + else + return self.tasmota_status_11 # return cached value + end + end + + ############################################################# + # read attribute + # + def read_attribute(session, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ========== + + if attribute == 0x0000 # ---------- DataModelRevision / CommissioningWindowStatus ---------- + # return TLV.create_TLV(TLV.U2, 1) + elif attribute == 0x0011 # ---------- Reachable / bool ---------- + return TLV.create_TLV(TLV.BOOL, true) # TODO find a way to do a ping + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # UI Methods + ############################################################# + # ui_conf_to_string + # + # Convert the current plugin parameters to a single string + static def ui_conf_to_string(cl, conf) + var s = super(_class).ui_conf_to_string(cl, conf) + + var url = str(conf.find(_class.ARG_HTTP, '')) + var arg = s + "," + url + print("MTR: ui_conf_to_string", conf, cl, arg) + return arg + end + + ############################################################# + # ui_string_to_conf + # + # Convert the string in UI to actual parameters added to the map + static def ui_string_to_conf(cl, conf, arg) + import string + var elts = string.split(arg + ',', ',', 3) # add ',' at the end to be sure to have at least 2 arguments + conf[_class.ARG_HTTP] = elts[1] + super(_class).ui_string_to_conf(cl, conf, elts[0]) + print("ui_string_to_conf", conf, arg) + return conf + end + +end +matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be new file mode 100644 index 000000000..49aa7a507 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_OnOff.be @@ -0,0 +1,135 @@ +# +# Matter_Plugin_Bridge_OnOff.be - implements the behavior for a Relay via HTTP (OnOff) +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Matter plug-in for core behavior + +# dummy declaration for solidification +class Matter_Plugin_Bridge_HTTP end + +#@ solidify:Matter_Plugin_Bridge_OnOff,weak + +class Matter_Plugin_Bridge_OnOff : Matter_Plugin_Bridge_HTTP + static var TYPE = "http_relay" # name of the plug-in in json + static var NAME = "🔗 Relay" # display name of the plug-in + static var ARG = "relay" # additional argument name (or empty if none) + static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var CLUSTERS = { + # 0x001D: inherited # Descriptor Cluster 9.5 p.453 + # 0x0003: inherited # Identify 1.2 p.16 + # 0x0004: inherited # Groups 1.3 p.21 + # 0x0005: inherited # Scenes 1.4 p.30 - no writable + 0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48 + } + static var TYPES = { 0x010A: 2 } # On/Off Light + + var tasmota_http # domain name for HTTP + var tasmota_relay_index # Relay number in Tasmota (zero based) + var shadow_onoff # fake status for now # TODO + + ############################################################# + # Constructor + def init(device, endpoint, arguments) + import string + super(self).init(device, endpoint, arguments) + self.shadow_onoff = false + self.tasmota_relay_index = arguments.find(self.ARG #-'relay'-#) + if self.tasmota_relay_index == nil self.tasmota_relay_index = 0 end + end + + ############################################################# + # Update shadow + # + def update_shadow() + var st11 = self.get_status_11() + if st11 + st11 = st11.find('StatusSTS', {}) # remove first level + var state = (st11.find("POWER") == "ON") + if self.shadow_onoff != nil && self.shadow_onoff != bool(state) + self.attribute_updated(0x0006, 0x0000) + end + self.shadow_onoff = state + end + super(self).update_shadow() + end + + ############################################################# + # Model + # + def set_onoff(v) + self.call_remote("Power", v ? "1" : "0") + self.update_shadow() + end + + ############################################################# + # read an attribute + # + def read_attribute(session, ctx) + import string + var TLV = matter.TLV + var cluster = ctx.cluster + var attribute = ctx.attribute + + # ==================================================================================================== + if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + self.update_shadow_lazy() + if attribute == 0x0000 # ---------- OnOff / bool ---------- + return TLV.create_TLV(TLV.BOOL, self.shadow_onoff) + elif attribute == 0xFFFC # ---------- FeatureMap / map32 ---------- + return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting + elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ---------- + return TLV.create_TLV(TLV.U4, 4) # 0 = no Level Control for Lighting + end + + else + return super(self).read_attribute(session, ctx) + end + end + + ############################################################# + # Invoke a command + # + # returns a TLV object if successful, contains the response + # or an `int` to indicate a status + def invoke_request(session, val, ctx) + var TLV = matter.TLV + var cluster = ctx.cluster + var command = ctx.command + + # ==================================================================================================== + if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== + self.update_shadow_lazy() + if command == 0x0000 # ---------- Off ---------- + self.set_onoff(false) + self.update_shadow() + return true + elif command == 0x0001 # ---------- On ---------- + self.set_onoff(true) + self.update_shadow() + return true + elif command == 0x0002 # ---------- Toggle ---------- + self.set_onoff(!self.shadow_onoff) + self.update_shadow() + return true + end + end + + end + +end +matter.Plugin_Bridge_OnOff = Matter_Plugin_Bridge_OnOff diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be index c4abc2758..9e43a8189 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Light0.be @@ -27,6 +27,7 @@ class Matter_Plugin_Device end class Matter_Plugin_Light0 : Matter_Plugin_Device static var TYPE = "light0" # name of the plug-in in json static var NAME = "Light 0 On" # display name of the plug-in + static var UPDATE_TIME = 250 # update every 250ms static var CLUSTERS = { # 0x001D: inherited # Descriptor Cluster 9.5 p.453 # 0x0003: inherited # Identify 1.2 p.16 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be index 6d1c9bf90..585a5bce5 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_OnOff.be @@ -29,6 +29,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device static var NAME = "Relay" # display name of the plug-in static var ARG = "relay" # additional argument name (or empty if none) static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var UPDATE_TIME = 250 # update every 250ms static var CLUSTERS = { # 0x001D: inherited # Descriptor Cluster 9.5 p.453 # 0x0003: inherited # Identify 1.2 p.16 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be index 3f0d2dfd7..c3f595045 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor.be @@ -26,6 +26,7 @@ class Matter_Plugin_Device end class Matter_Plugin_Sensor : Matter_Plugin_Device static var ARG = "filter" # additional argument name (or empty if none) + static var UPDATE_TIME = 5000 # update sensor every 5s var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature" var tasmota_sensor_matcher # Actual matcher object var shadow_value # Last known value diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be index 55ccdf992..1165b9e65 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Humidity.be @@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor # This must be overriden. # This allows to convert the raw sensor value to the target one, typically int def pre_value(val) - return int(val * 100) # 1/100th of percentage + return val != nil ? int(val * 100) : nil # 1/100th of percentage end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be index e676aac18..1ba16a5eb 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Illuminance.be @@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor # This must be overriden. # This allows to convert the raw sensor value to the target one, typically int def pre_value(val) - return int(val) # value in lux + return val != nil ? int(val) : nil # value in lux end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be index 60414b0c9..0d87d296b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Pressure.be @@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor # This must be overriden. # This allows to convert the raw sensor value to the target one, typically int def pre_value(val) - return int(val) + return val != nil ? int(val) : nil end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be index ec411f537..4d2d9f23b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Temp.be @@ -38,7 +38,7 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor # This must be overriden. # This allows to convert the raw sensor value to the target one, typically int def pre_value(val) - return int(val * 100) + return val != nil ? int(val * 100) : nil end ############################################################# diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index cfc9e4cfc..019af83d9 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -35,6 +35,7 @@ class Matter_UI static var _ROOT_TYPES = "root" static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" "|temperature|pressure|illuminance|humidity" + "|-http|http_relay" var device def init(device) @@ -256,8 +257,13 @@ class Matter_UI var typ = conf.find('type') if !typ i += 1 continue end - var arg_name = self.device.get_plugin_class_arg(typ) - var arg = arg_name ? str(conf.find(arg_name, '')) : '' + var cl = self.device.plugins_classes.find(typ) + var arg = "" + if cl != nil + arg = cl.ui_conf_to_string(cl, conf) + end + # var arg_name = self.device.get_plugin_class_arg(typ) + # var arg = arg_name ? str(conf.find(arg_name, '')) : '' webserver.content_send(string.format("", i, ep)) @@ -297,6 +303,8 @@ class Matter_UI var typ = class_types[i] if typ == '' webserver.content_send("") + elif typ == '-http' + webserver.content_send("") else var nam = self.device.get_plugin_class_displayname(typ) webserver.content_send(string.format("", typ, (typ == cur) ? " selected" : "", nam)) @@ -429,11 +437,12 @@ class Matter_UI var typ_class = self.device.plugins_classes.find(typ) if typ_class != nil var elt = {'type':typ} - var arg_name = typ_class.ARG - var arg_type = typ_class.ARG_TYPE - if arg && arg_name - elt[arg_name] = arg_type(arg) - end + typ_class.ui_string_to_conf(typ_class, elt, arg) + # var arg_name = typ_class.ARG + # var arg_type = typ_class.ARG_TYPE + # if arg && arg_name + # elt[arg_name] = arg_type(arg) + # end config[ep] = elt else diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h index 57409987c..a0d557ce7 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Device.h @@ -1546,20 +1546,17 @@ be_local_closure(Matter_Device_every_second, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ + ( &(const bvalue[ 6]) { /* constants */ /* K0 */ be_nested_str_weak(sessions), /* K1 */ be_nested_str_weak(every_second), /* K2 */ be_nested_str_weak(message_handler), /* K3 */ be_nested_str_weak(commissioning_open), /* K4 */ be_nested_str_weak(tasmota), /* K5 */ be_nested_str_weak(time_reached), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(plugins), - /* K8 */ be_const_int(1), }), be_str_weak(every_second), &be_const_str_solidified, - ( &(const binstruction[30]) { /* code */ + ( &(const binstruction[18]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x7C040200, // 0002 CALL R1 1 @@ -1577,19 +1574,7 @@ be_local_closure(Matter_Device_every_second, /* name */ 0x78060001, // 000E JMPF R1 #0011 0x4C040000, // 000F LDNIL R1 0x90020601, // 0010 SETMBR R0 K3 R1 - 0x58040006, // 0011 LDCONST R1 K6 - 0x6008000C, // 0012 GETGBL R2 G12 - 0x880C0107, // 0013 GETMBR R3 R0 K7 - 0x7C080200, // 0014 CALL R2 1 - 0x14080202, // 0015 LT R2 R1 R2 - 0x780A0005, // 0016 JMPF R2 #001D - 0x88080107, // 0017 GETMBR R2 R0 K7 - 0x94080401, // 0018 GETIDX R2 R2 R1 - 0x8C080501, // 0019 GETMET R2 R2 K1 - 0x7C080200, // 001A CALL R2 1 - 0x00040308, // 001B ADD R1 R1 K8 - 0x7001FFF4, // 001C JMP #0012 - 0x80000000, // 001D RET 0 + 0x80000000, // 0011 RET 0 }) ) ); @@ -4714,7 +4699,7 @@ be_local_closure(Matter_Device_start_operational_discovery, /* name */ ********************************************************************/ be_local_closure(Matter_Device_every_250ms, /* name */ be_nested_proto( - 3, /* nstack */ + 4, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -4722,17 +4707,32 @@ be_local_closure(Matter_Device_every_250ms, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_weak(message_handler), /* K1 */ be_nested_str_weak(every_250ms), + /* K2 */ be_const_int(0), + /* K3 */ be_nested_str_weak(plugins), + /* K4 */ be_const_int(1), }), be_str_weak(every_250ms), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ + ( &(const binstruction[16]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x8C040301, // 0001 GETMET R1 R1 K1 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 + 0x58040002, // 0003 LDCONST R1 K2 + 0x6008000C, // 0004 GETGBL R2 G12 + 0x880C0103, // 0005 GETMBR R3 R0 K3 + 0x7C080200, // 0006 CALL R2 1 + 0x14080202, // 0007 LT R2 R1 R2 + 0x780A0005, // 0008 JMPF R2 #000F + 0x88080103, // 0009 GETMBR R2 R0 K3 + 0x94080401, // 000A GETIDX R2 R2 R1 + 0x8C080501, // 000B GETMET R2 R2 K1 + 0x7C080200, // 000C CALL R2 1 + 0x00040304, // 000D ADD R1 R1 K4 + 0x7001FFF4, // 000E JMP #0004 + 0x80000000, // 000F RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h index 1455906aa..147b3a143 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin.h @@ -7,24 +7,26 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: read_event +** Solidified function: ********************************************************************/ -be_local_closure(Matter_Plugin_read_event, /* name */ +be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(read_event), + be_str_weak(_X3Clambda_X3E), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 + ( &(const binstruction[ 4]) { /* code */ + 0x60040008, // 0000 GETGBL R1 G8 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 }) ) ); @@ -32,59 +34,32 @@ be_local_closure(Matter_Plugin_read_event, /* name */ /******************************************************************** -** Solidified function: write_attribute +** Solidified function: get_attribute_list ********************************************************************/ -be_local_closure(Matter_Plugin_write_attribute, /* name */ +be_local_closure(Matter_Plugin_get_attribute_list, /* name */ be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(write_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: attribute_updated -********************************************************************/ -be_local_closure(Matter_Plugin_attribute_updated, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ + 7, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(attribute_updated), - /* K2 */ be_nested_str_weak(endpoint), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), }), - be_str_weak(attribute_updated), + be_str_weak(get_attribute_list), &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x88180102, // 0002 GETMBR R6 R0 K2 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80000000, // 0007 RET 0 + ( &(const binstruction[ 7]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140400, // 0002 MOVE R5 R2 + 0x60180012, // 0003 GETGBL R6 G18 + 0x7C180000, // 0004 CALL R6 0 + 0x7C0C0600, // 0005 CALL R3 3 + 0x80040600, // 0006 RET 1 R3 }) ) ); @@ -92,12 +67,12 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */ /******************************************************************** -** Solidified function: get_cluster_list +** Solidified function: has ********************************************************************/ -be_local_closure(Matter_Plugin_get_cluster_list, /* name */ +be_local_closure(Matter_Plugin_has, /* name */ be_nested_proto( - 8, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -106,196 +81,28 @@ be_local_closure(Matter_Plugin_get_cluster_list, /* name */ 1, /* has constants */ ( &(const bvalue[ 4]) { /* constants */ /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(keys), - /* K2 */ be_nested_str_weak(push), - /* K3 */ be_nested_str_weak(stop_iteration), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(endpoints), + /* K3 */ be_nested_str_weak(find), }), - be_str_weak(get_cluster_list), + be_str_weak(has), &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x60080012, // 0000 GETGBL R2 G18 - 0x7C080000, // 0001 CALL R2 0 - 0x600C0010, // 0002 GETGBL R3 G16 - 0x88100100, // 0003 GETMBR R4 R0 K0 - 0x8C100901, // 0004 GETMET R4 R4 K1 - 0x7C100200, // 0005 CALL R4 1 - 0x7C0C0200, // 0006 CALL R3 1 - 0xA8020005, // 0007 EXBLK 0 #000E - 0x5C100600, // 0008 MOVE R4 R3 - 0x7C100000, // 0009 CALL R4 0 - 0x8C140502, // 000A GETMET R5 R2 K2 - 0x5C1C0800, // 000B MOVE R7 R4 - 0x7C140400, // 000C CALL R5 2 - 0x7001FFF9, // 000D JMP #0008 - 0x580C0003, // 000E LDCONST R3 K3 - 0xAC0C0200, // 000F CATCH R3 1 0 - 0xB0080000, // 0010 RAISE 2 R0 R0 - 0x80040400, // 0011 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_update_shadow, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040101, // 0000 GETMBR R1 R0 K1 - 0x88040300, // 0001 GETMBR R1 R1 K0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_read_attribute, /* name */ - be_nested_proto( - 15, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[18]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(Matter_TLV_array), - /* K6 */ be_nested_str_weak(TYPES), - /* K7 */ be_nested_str_weak(keys), - /* K8 */ be_nested_str_weak(add_struct), - /* K9 */ be_nested_str_weak(add_TLV), - /* K10 */ be_nested_str_weak(U2), - /* K11 */ be_const_int(1), - /* K12 */ be_nested_str_weak(stop_iteration), - /* K13 */ be_nested_str_weak(get_cluster_list), - /* K14 */ be_nested_str_weak(U4), - /* K15 */ be_const_int(2), - /* K16 */ be_const_int(3), - /* K17 */ be_nested_str_weak(create_TLV), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[93]) { /* code */ - 0xB80E0000, // 0000 GETNGBL R3 K0 - 0x880C0701, // 0001 GETMBR R3 R3 K1 - 0x88100502, // 0002 GETMBR R4 R2 K2 - 0x88140503, // 0003 GETMBR R5 R2 K3 - 0x541A001C, // 0004 LDINT R6 29 - 0x1C180806, // 0005 EQ R6 R4 R6 - 0x781A0052, // 0006 JMPF R6 #005A - 0x1C180B04, // 0007 EQ R6 R5 K4 - 0x781A001C, // 0008 JMPF R6 #0026 - 0x8C180705, // 0009 GETMET R6 R3 K5 - 0x7C180200, // 000A CALL R6 1 - 0x601C0010, // 000B GETGBL R7 G16 - 0x88200106, // 000C GETMBR R8 R0 K6 - 0x8C201107, // 000D GETMET R8 R8 K7 - 0x7C200200, // 000E CALL R8 1 - 0x7C1C0200, // 000F CALL R7 1 - 0xA802000F, // 0010 EXBLK 0 #0021 - 0x5C200E00, // 0011 MOVE R8 R7 - 0x7C200000, // 0012 CALL R8 0 - 0x8C240D08, // 0013 GETMET R9 R6 K8 - 0x7C240200, // 0014 CALL R9 1 - 0x8C281309, // 0015 GETMET R10 R9 K9 - 0x58300004, // 0016 LDCONST R12 K4 - 0x8834070A, // 0017 GETMBR R13 R3 K10 - 0x5C381000, // 0018 MOVE R14 R8 - 0x7C280800, // 0019 CALL R10 4 - 0x8C281309, // 001A GETMET R10 R9 K9 - 0x5830000B, // 001B LDCONST R12 K11 - 0x8834070A, // 001C GETMBR R13 R3 K10 - 0x88380106, // 001D GETMBR R14 R0 K6 - 0x94381C08, // 001E GETIDX R14 R14 R8 - 0x7C280800, // 001F CALL R10 4 - 0x7001FFEF, // 0020 JMP #0011 - 0x581C000C, // 0021 LDCONST R7 K12 - 0xAC1C0200, // 0022 CATCH R7 1 0 - 0xB0080000, // 0023 RAISE 2 R0 R0 - 0x80040C00, // 0024 RET 1 R6 - 0x70020032, // 0025 JMP #0059 - 0x1C180B0B, // 0026 EQ R6 R5 K11 - 0x781A0013, // 0027 JMPF R6 #003C - 0x8C180705, // 0028 GETMET R6 R3 K5 - 0x7C180200, // 0029 CALL R6 1 - 0x601C0010, // 002A GETGBL R7 G16 - 0x8C20010D, // 002B GETMET R8 R0 K13 - 0x7C200200, // 002C CALL R8 1 - 0x7C1C0200, // 002D CALL R7 1 - 0xA8020007, // 002E EXBLK 0 #0037 - 0x5C200E00, // 002F MOVE R8 R7 - 0x7C200000, // 0030 CALL R8 0 - 0x8C240D09, // 0031 GETMET R9 R6 K9 - 0x4C2C0000, // 0032 LDNIL R11 - 0x8830070E, // 0033 GETMBR R12 R3 K14 - 0x5C341000, // 0034 MOVE R13 R8 - 0x7C240800, // 0035 CALL R9 4 - 0x7001FFF7, // 0036 JMP #002F - 0x581C000C, // 0037 LDCONST R7 K12 - 0xAC1C0200, // 0038 CATCH R7 1 0 - 0xB0080000, // 0039 RAISE 2 R0 R0 - 0x80040C00, // 003A RET 1 R6 - 0x7002001C, // 003B JMP #0059 - 0x1C180B0F, // 003C EQ R6 R5 K15 - 0x781A0003, // 003D JMPF R6 #0042 - 0x8C180705, // 003E GETMET R6 R3 K5 - 0x7C180200, // 003F CALL R6 1 - 0x80040C00, // 0040 RET 1 R6 - 0x70020016, // 0041 JMP #0059 - 0x1C180B10, // 0042 EQ R6 R5 K16 - 0x781A0003, // 0043 JMPF R6 #0048 - 0x8C180705, // 0044 GETMET R6 R3 K5 - 0x7C180200, // 0045 CALL R6 1 - 0x80040C00, // 0046 RET 1 R6 - 0x70020010, // 0047 JMP #0059 - 0x541AFFFB, // 0048 LDINT R6 65532 - 0x1C180A06, // 0049 EQ R6 R5 R6 - 0x781A0005, // 004A JMPF R6 #0051 - 0x8C180711, // 004B GETMET R6 R3 K17 - 0x8820070E, // 004C GETMBR R8 R3 K14 - 0x58240004, // 004D LDCONST R9 K4 - 0x7C180600, // 004E CALL R6 3 - 0x80040C00, // 004F RET 1 R6 - 0x70020007, // 0050 JMP #0059 - 0x541AFFFC, // 0051 LDINT R6 65533 - 0x1C180A06, // 0052 EQ R6 R5 R6 - 0x781A0004, // 0053 JMPF R6 #0059 - 0x8C180711, // 0054 GETMET R6 R3 K17 - 0x8820070E, // 0055 GETMBR R8 R3 K14 - 0x5824000B, // 0056 LDCONST R9 K11 - 0x7C180600, // 0057 CALL R6 3 - 0x80040C00, // 0058 RET 1 R6 - 0x70020001, // 0059 JMP #005C - 0x4C180000, // 005A LDNIL R6 - 0x80040C00, // 005B RET 1 R6 - 0x80000000, // 005C RET 0 + ( &(const binstruction[15]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x780E0006, // 0004 JMPF R3 #000C + 0x880C0102, // 0005 GETMBR R3 R0 K2 + 0x8C0C0703, // 0006 GETMET R3 R3 K3 + 0x5C140400, // 0007 MOVE R5 R2 + 0x7C0C0400, // 0008 CALL R3 2 + 0x4C100000, // 0009 LDNIL R4 + 0x200C0604, // 000A NE R3 R3 R4 + 0x740E0000, // 000B JMPT R3 #000D + 0x500C0001, // 000C LDBOOL R3 0 1 + 0x500C0200, // 000D LDBOOL R3 1 0 + 0x80040600, // 000E RET 1 R3 }) ) ); @@ -406,32 +213,26 @@ be_local_closure(Matter_Plugin_consolidate_clusters, /* name */ /******************************************************************** -** Solidified function: get_attribute_list +** Solidified function: get_endpoint ********************************************************************/ -be_local_closure(Matter_Plugin_get_attribute_list, /* name */ +be_local_closure(Matter_Plugin_get_endpoint, /* name */ be_nested_proto( - 7, /* nstack */ - 3, /* argc */ + 2, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(endpoint), }), - be_str_weak(get_attribute_list), + be_str_weak(get_endpoint), &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140400, // 0002 MOVE R5 R2 - 0x60180012, // 0003 GETGBL R6 G18 - 0x7C180000, // 0004 CALL R6 0 - 0x7C0C0600, // 0005 CALL R3 3 - 0x80040600, // 0006 RET 1 R3 + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 }) ) ); @@ -464,12 +265,12 @@ be_local_closure(Matter_Plugin_timed_request, /* name */ /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: subscribe_event ********************************************************************/ -be_local_closure(Matter_Plugin_parse_sensors, /* name */ +be_local_closure(Matter_Plugin_subscribe_event, /* name */ be_nested_proto( - 2, /* nstack */ - 2, /* argc */ + 6, /* nstack */ + 5, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ @@ -477,10 +278,11 @@ be_local_closure(Matter_Plugin_parse_sensors, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(parse_sensors), + be_str_weak(subscribe_event), &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 }) ) ); @@ -523,26 +325,34 @@ be_local_closure(Matter_Plugin_update_shadow_lazy, /* name */ /******************************************************************** -** Solidified function: +** Solidified function: attribute_updated ********************************************************************/ -be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ +be_local_closure(Matter_Plugin_attribute_updated, /* name */ be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(attribute_updated), + /* K2 */ be_nested_str_weak(endpoint), + }), + be_str_weak(attribute_updated), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040008, // 0000 GETGBL R1 G8 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 + ( &(const binstruction[ 8]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x88180102, // 0002 GETMBR R6 R0 K2 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80000000, // 0007 RET 0 }) ) ); @@ -550,26 +360,205 @@ be_local_closure(Matter_Plugin__X3Clambda_X3E, /* name */ /******************************************************************** -** Solidified function: get_endpoint +** Solidified function: get_cluster_list ********************************************************************/ -be_local_closure(Matter_Plugin_get_endpoint, /* name */ +be_local_closure(Matter_Plugin_get_cluster_list, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ + 8, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(push), + /* K3 */ be_nested_str_weak(stop_iteration), }), - be_str_weak(get_endpoint), + be_str_weak(get_cluster_list), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x60080012, // 0000 GETGBL R2 G18 + 0x7C080000, // 0001 CALL R2 0 + 0x600C0010, // 0002 GETGBL R3 G16 + 0x88100100, // 0003 GETMBR R4 R0 K0 + 0x8C100901, // 0004 GETMET R4 R4 K1 + 0x7C100200, // 0005 CALL R4 1 + 0x7C0C0200, // 0006 CALL R3 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C100600, // 0008 MOVE R4 R3 + 0x7C100000, // 0009 CALL R4 0 + 0x8C140502, // 000A GETMET R5 R2 K2 + 0x5C1C0800, // 000B MOVE R7 R4 + 0x7C140400, // 000C CALL R5 2 + 0x7001FFF9, // 000D JMP #0008 + 0x580C0003, // 000E LDCONST R3 K3 + 0xAC0C0200, // 000F CATCH R3 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x80040400, // 0011 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_read_attribute, /* name */ + be_nested_proto( + 16, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(Matter_TLV_array), + /* K6 */ be_nested_str_weak(get_types), + /* K7 */ be_nested_str_weak(keys), + /* K8 */ be_nested_str_weak(add_struct), + /* K9 */ be_nested_str_weak(add_TLV), + /* K10 */ be_nested_str_weak(U2), + /* K11 */ be_const_int(1), + /* K12 */ be_nested_str_weak(stop_iteration), + /* K13 */ be_nested_str_weak(get_cluster_list), + /* K14 */ be_nested_str_weak(U4), + /* K15 */ be_const_int(2), + /* K16 */ be_const_int(3), + /* K17 */ be_nested_str_weak(create_TLV), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[93]) { /* code */ + 0xB80E0000, // 0000 GETNGBL R3 K0 + 0x880C0701, // 0001 GETMBR R3 R3 K1 + 0x88100502, // 0002 GETMBR R4 R2 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x541A001C, // 0004 LDINT R6 29 + 0x1C180806, // 0005 EQ R6 R4 R6 + 0x781A0052, // 0006 JMPF R6 #005A + 0x1C180B04, // 0007 EQ R6 R5 K4 + 0x781A001C, // 0008 JMPF R6 #0026 + 0x8C180705, // 0009 GETMET R6 R3 K5 + 0x7C180200, // 000A CALL R6 1 + 0x8C1C0106, // 000B GETMET R7 R0 K6 + 0x7C1C0200, // 000C CALL R7 1 + 0x60200010, // 000D GETGBL R8 G16 + 0x8C240F07, // 000E GETMET R9 R7 K7 + 0x7C240200, // 000F CALL R9 1 + 0x7C200200, // 0010 CALL R8 1 + 0xA802000E, // 0011 EXBLK 0 #0021 + 0x5C241000, // 0012 MOVE R9 R8 + 0x7C240000, // 0013 CALL R9 0 + 0x8C280D08, // 0014 GETMET R10 R6 K8 + 0x7C280200, // 0015 CALL R10 1 + 0x8C2C1509, // 0016 GETMET R11 R10 K9 + 0x58340004, // 0017 LDCONST R13 K4 + 0x8838070A, // 0018 GETMBR R14 R3 K10 + 0x5C3C1200, // 0019 MOVE R15 R9 + 0x7C2C0800, // 001A CALL R11 4 + 0x8C2C1509, // 001B GETMET R11 R10 K9 + 0x5834000B, // 001C LDCONST R13 K11 + 0x8838070A, // 001D GETMBR R14 R3 K10 + 0x943C0E09, // 001E GETIDX R15 R7 R9 + 0x7C2C0800, // 001F CALL R11 4 + 0x7001FFF0, // 0020 JMP #0012 + 0x5820000C, // 0021 LDCONST R8 K12 + 0xAC200200, // 0022 CATCH R8 1 0 + 0xB0080000, // 0023 RAISE 2 R0 R0 + 0x80040C00, // 0024 RET 1 R6 + 0x70020032, // 0025 JMP #0059 + 0x1C180B0B, // 0026 EQ R6 R5 K11 + 0x781A0013, // 0027 JMPF R6 #003C + 0x8C180705, // 0028 GETMET R6 R3 K5 + 0x7C180200, // 0029 CALL R6 1 + 0x601C0010, // 002A GETGBL R7 G16 + 0x8C20010D, // 002B GETMET R8 R0 K13 + 0x7C200200, // 002C CALL R8 1 + 0x7C1C0200, // 002D CALL R7 1 + 0xA8020007, // 002E EXBLK 0 #0037 + 0x5C200E00, // 002F MOVE R8 R7 + 0x7C200000, // 0030 CALL R8 0 + 0x8C240D09, // 0031 GETMET R9 R6 K9 + 0x4C2C0000, // 0032 LDNIL R11 + 0x8830070E, // 0033 GETMBR R12 R3 K14 + 0x5C341000, // 0034 MOVE R13 R8 + 0x7C240800, // 0035 CALL R9 4 + 0x7001FFF7, // 0036 JMP #002F + 0x581C000C, // 0037 LDCONST R7 K12 + 0xAC1C0200, // 0038 CATCH R7 1 0 + 0xB0080000, // 0039 RAISE 2 R0 R0 + 0x80040C00, // 003A RET 1 R6 + 0x7002001C, // 003B JMP #0059 + 0x1C180B0F, // 003C EQ R6 R5 K15 + 0x781A0003, // 003D JMPF R6 #0042 + 0x8C180705, // 003E GETMET R6 R3 K5 + 0x7C180200, // 003F CALL R6 1 + 0x80040C00, // 0040 RET 1 R6 + 0x70020016, // 0041 JMP #0059 + 0x1C180B10, // 0042 EQ R6 R5 K16 + 0x781A0003, // 0043 JMPF R6 #0048 + 0x8C180705, // 0044 GETMET R6 R3 K5 + 0x7C180200, // 0045 CALL R6 1 + 0x80040C00, // 0046 RET 1 R6 + 0x70020010, // 0047 JMP #0059 + 0x541AFFFB, // 0048 LDINT R6 65532 + 0x1C180A06, // 0049 EQ R6 R5 R6 + 0x781A0005, // 004A JMPF R6 #0051 + 0x8C180711, // 004B GETMET R6 R3 K17 + 0x8820070E, // 004C GETMBR R8 R3 K14 + 0x58240004, // 004D LDCONST R9 K4 + 0x7C180600, // 004E CALL R6 3 + 0x80040C00, // 004F RET 1 R6 + 0x70020007, // 0050 JMP #0059 + 0x541AFFFC, // 0051 LDINT R6 65533 + 0x1C180A06, // 0052 EQ R6 R5 R6 + 0x781A0004, // 0053 JMPF R6 #0059 + 0x8C180711, // 0054 GETMET R6 R3 K17 + 0x8820070E, // 0055 GETMBR R8 R3 K14 + 0x5824000B, // 0056 LDCONST R9 K11 + 0x7C180600, // 0057 CALL R6 3 + 0x80040C00, // 0058 RET 1 R6 + 0x70020001, // 0059 JMP #005C + 0x4C180000, // 005A LDNIL R6 + 0x80040C00, // 005B RET 1 R6 + 0x80000000, // 005C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: write_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_write_attribute, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(write_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 }) ) ); @@ -602,11 +591,11 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */ /******************************************************************** -** Solidified function: every_second +** Solidified function: update_shadow ********************************************************************/ -be_local_closure(Matter_Plugin_every_second, /* name */ +be_local_closure(Matter_Plugin_update_shadow, /* name */ be_nested_proto( - 3, /* nstack */ + 2, /* nstack */ 1, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -614,40 +603,17 @@ be_local_closure(Matter_Plugin_every_second, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), }), - be_str_weak(every_second), + be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[ 3]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x7C040200, // 0001 CALL R1 1 - 0x80000000, // 0002 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -be_local_closure(Matter_Plugin_invoke_request, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 + ( &(const binstruction[ 4]) { /* code */ + 0x88040101, // 0000 GETMBR R1 R0 K1 + 0x88040300, // 0001 GETMBR R1 R1 K0 + 0x90020001, // 0002 SETMBR R0 K0 R1 + 0x80000000, // 0003 RET 0 }) ) ); @@ -689,52 +655,9 @@ be_local_closure(Matter_Plugin_init, /* name */ /******************************************************************** -** Solidified function: has +** Solidified function: read_event ********************************************************************/ -be_local_closure(Matter_Plugin_has, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(endpoints), - /* K3 */ be_nested_str_weak(find), - }), - be_str_weak(has), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x780E0006, // 0004 JMPF R3 #000C - 0x880C0102, // 0005 GETMBR R3 R0 K2 - 0x8C0C0703, // 0006 GETMET R3 R3 K3 - 0x5C140400, // 0007 MOVE R5 R2 - 0x7C0C0400, // 0008 CALL R3 2 - 0x4C100000, // 0009 LDNIL R4 - 0x200C0604, // 000A NE R3 R3 R4 - 0x740E0000, // 000B JMPT R3 #000D - 0x500C0001, // 000C LDBOOL R3 0 1 - 0x500C0200, // 000D LDBOOL R3 1 0 - 0x80040600, // 000E RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: subscribe_event -********************************************************************/ -be_local_closure(Matter_Plugin_subscribe_event, /* name */ +be_local_closure(Matter_Plugin_read_event, /* name */ be_nested_proto( 6, /* nstack */ 5, /* argc */ @@ -745,7 +668,7 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */ NULL, /* no sub protos */ 0, /* has constants */ NULL, /* no const */ - be_str_weak(subscribe_event), + be_str_weak(read_event), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C140000, // 0000 LDNIL R5 @@ -756,22 +679,259 @@ be_local_closure(Matter_Plugin_subscribe_event, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: get_types +********************************************************************/ +be_local_closure(Matter_Plugin_get_types, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(TYPES), + }), + be_str_weak(get_types), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_string_to_conf +********************************************************************/ +be_local_closure(Matter_Plugin_ui_string_to_conf, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(ARG_TYPE), + }), + be_str_weak(ui_string_to_conf), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0x88100101, // 0001 GETMBR R4 R0 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x780A0004, // 0003 JMPF R2 #0009 + 0x78120003, // 0004 JMPF R4 #0009 + 0x5C180A00, // 0005 MOVE R6 R5 + 0x5C1C0400, // 0006 MOVE R7 R2 + 0x7C180200, // 0007 CALL R6 1 + 0x98040806, // 0008 SETIDX R1 R4 R6 + 0x80040200, // 0009 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_invoke_request, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +be_local_closure(Matter_Plugin_parse_sensors, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +be_local_closure(Matter_Plugin_every_250ms, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(update_next), + /* K1 */ be_nested_str_weak(crypto), + /* K2 */ be_nested_str_weak(random), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_const_int(0), + /* K5 */ be_const_int(2147483647), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(millis), + /* K8 */ be_nested_str_weak(UPDATE_TIME), + /* K9 */ be_nested_str_weak(time_reached), + /* K10 */ be_nested_str_weak(update_shadow_lazy), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x7806000F, // 0003 JMPF R1 #0014 + 0xA4060200, // 0004 IMPORT R1 K1 + 0x8C080302, // 0005 GETMET R2 R1 K2 + 0x54120003, // 0006 LDINT R4 4 + 0x7C080400, // 0007 CALL R2 2 + 0x8C080503, // 0008 GETMET R2 R2 K3 + 0x58100004, // 0009 LDCONST R4 K4 + 0x54160003, // 000A LDINT R5 4 + 0x7C080600, // 000B CALL R2 3 + 0x2C080505, // 000C AND R2 R2 K5 + 0xB80E0C00, // 000D GETNGBL R3 K6 + 0x8C0C0707, // 000E GETMET R3 R3 K7 + 0x88140108, // 000F GETMBR R5 R0 K8 + 0x10140405, // 0010 MOD R5 R2 R5 + 0x7C0C0400, // 0011 CALL R3 2 + 0x90020003, // 0012 SETMBR R0 K0 R3 + 0x7002000B, // 0013 JMP #0020 + 0xB8060C00, // 0014 GETNGBL R1 K6 + 0x8C040309, // 0015 GETMET R1 R1 K9 + 0x880C0100, // 0016 GETMBR R3 R0 K0 + 0x7C040400, // 0017 CALL R1 2 + 0x78060006, // 0018 JMPF R1 #0020 + 0x8C04010A, // 0019 GETMET R1 R0 K10 + 0x7C040200, // 001A CALL R1 1 + 0xB8060C00, // 001B GETNGBL R1 K6 + 0x8C040307, // 001C GETMET R1 R1 K7 + 0x880C0108, // 001D GETMBR R3 R0 K8 + 0x7C040400, // 001E CALL R1 2 + 0x90020001, // 001F SETMBR R0 K0 R1 + 0x80000000, // 0020 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_conf_to_string +********************************************************************/ +be_local_closure(Matter_Plugin_ui_conf_to_string, /* name */ + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(), + }), + be_str_weak(ui_conf_to_string), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x880C0101, // 0001 GETMBR R3 R0 K1 + 0x780E0006, // 0002 JMPF R3 #000A + 0x60100008, // 0003 GETGBL R4 G8 + 0x8C140302, // 0004 GETMET R5 R1 K2 + 0x5C1C0600, // 0005 MOVE R7 R3 + 0x58200003, // 0006 LDCONST R8 K3 + 0x7C140600, // 0007 CALL R5 3 + 0x7C100200, // 0008 CALL R4 1 + 0x70020000, // 0009 JMP #000B + 0x58100003, // 000A LDCONST R4 K3 + 0x80040800, // 000B RET 1 R4 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, - 4, + 5, NULL, - be_nested_map(27, + be_nested_map(32, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) }, - { be_const_key_weak(TYPE, 18), be_nested_str_weak() }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, { be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) }, - { be_const_key_weak(tick, -1), be_const_var(3) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(get_cluster_list, 2), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, + { be_const_key_weak(ui_conf_to_string, 11), be_const_static_closure(Matter_Plugin_ui_conf_to_string_closure) }, + { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, + { be_const_key_weak(tick, -1), be_const_var(4) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(Matter_Plugin_every_250ms_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak() }, + { be_const_key_weak(ARG, 16), be_nested_str_weak() }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(clusters, 17), be_const_var(3) }, + { be_const_key_weak(subscribe_event, 30), be_const_closure(Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, + { be_const_key_weak(parse_sensors, 29), be_const_closure(Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) }, + { be_const_key_weak(ui_string_to_conf, 22), be_const_static_closure(Matter_Plugin_ui_string_to_conf_closure) }, + { be_const_key_weak(device, -1), be_const_var(1) }, + { be_const_key_weak(write_attribute, 23), be_const_closure(Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(read_event, 24), be_const_closure(Matter_Plugin_read_event_closure) }, + { be_const_key_weak(init, 18), be_const_closure(Matter_Plugin_init_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { @@ -786,24 +946,13 @@ be_local_class(Matter_Plugin, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(clusters, -1), be_const_var(2) }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(NAME, 3), be_nested_str_weak() }, - { be_const_key_weak(subscribe_attribute, 20), be_const_closure(Matter_Plugin_subscribe_attribute_closure) }, - { be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(read_attribute, 9), be_const_closure(Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(write_attribute, 13), be_const_closure(Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(get_endpoint, -1), be_const_closure(Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(endpoint, -1), be_const_var(1) }, - { be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) }, - { be_const_key_weak(attribute_updated, 8), be_const_closure(Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(get_types, -1), be_const_closure(Matter_Plugin_get_types_closure) }, + { be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_read_attribute_closure) }, { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(device, 4), be_const_var(0) }, - { be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(update_next, 14), be_const_var(0) }, + { be_const_key_weak(endpoint, 31), be_const_var(2) }, + { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(Matter_Plugin_update_shadow_lazy_closure) }, + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(Matter_Plugin_consolidate_clusters_closure) }, })), be_str_weak(Matter_Plugin) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h new file mode 100644 index 000000000..1fd4d331a --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_HTTP.h @@ -0,0 +1,665 @@ +/* Solidification of Matter_Plugin_Bridge_HTTP.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_HTTP; + +/******************************************************************** +** Solidified function: get_types +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_get_types, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(TYPES), + /* K1 */ be_nested_str_weak(keys), + /* K2 */ be_nested_str_weak(stop_iteration), + /* K3 */ be_const_int(1), + }), + be_str_weak(get_types), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x60040013, // 0000 GETGBL R1 G19 + 0x7C040000, // 0001 CALL R1 0 + 0x60080010, // 0002 GETGBL R2 G16 + 0x880C0100, // 0003 GETMBR R3 R0 K0 + 0x8C0C0701, // 0004 GETMET R3 R3 K1 + 0x7C0C0200, // 0005 CALL R3 1 + 0x7C080200, // 0006 CALL R2 1 + 0xA8020005, // 0007 EXBLK 0 #000E + 0x5C0C0400, // 0008 MOVE R3 R2 + 0x7C0C0000, // 0009 CALL R3 0 + 0x88100100, // 000A GETMBR R4 R0 K0 + 0x94100803, // 000B GETIDX R4 R4 R3 + 0x98040604, // 000C SETIDX R1 R3 R4 + 0x7001FFF9, // 000D JMP #0008 + 0x58080002, // 000E LDCONST R2 K2 + 0xAC080200, // 000F CATCH R2 1 0 + 0xB0080000, // 0010 RAISE 2 R0 R0 + 0x540A0012, // 0011 LDINT R2 19 + 0x98040503, // 0012 SETIDX R1 R2 K3 + 0x80040200, // 0013 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_reachable +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_is_reachable, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(tick), + /* K2 */ be_nested_str_weak(reachable_tick), + /* K3 */ be_nested_str_weak(call_remote), + /* K4 */ be_nested_str_weak(), + /* K5 */ be_nested_str_weak(reachable), + }), + be_str_weak(is_reachable), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x88080102, // 0002 GETMBR R2 R0 K2 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060006, // 0004 JMPF R1 #000C + 0x8C040103, // 0005 GETMET R1 R0 K3 + 0x580C0004, // 0006 LDCONST R3 K4 + 0x58100004, // 0007 LDCONST R4 K4 + 0x7C040600, // 0008 CALL R1 3 + 0x4C080000, // 0009 LDNIL R2 + 0x20080202, // 000A NE R2 R1 R2 + 0x90020A02, // 000B SETMBR R0 K5 R2 + 0x88040105, // 000C GETMBR R1 R0 K5 + 0x80040200, // 000D RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_read_attribute, /* name */ + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(create_TLV), + /* K6 */ be_nested_str_weak(BOOL), + /* K7 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0xB80E0000, // 0000 GETNGBL R3 K0 + 0x880C0701, // 0001 GETMBR R3 R3 K1 + 0x88100502, // 0002 GETMBR R4 R2 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x541A0038, // 0004 LDINT R6 57 + 0x1C180806, // 0005 EQ R6 R4 R6 + 0x781A000B, // 0006 JMPF R6 #0013 + 0x1C180B04, // 0007 EQ R6 R5 K4 + 0x781A0000, // 0008 JMPF R6 #000A + 0x70020007, // 0009 JMP #0012 + 0x541A0010, // 000A LDINT R6 17 + 0x1C180A06, // 000B EQ R6 R5 R6 + 0x781A0004, // 000C JMPF R6 #0012 + 0x8C180705, // 000D GETMET R6 R3 K5 + 0x88200706, // 000E GETMBR R8 R3 K6 + 0x50240200, // 000F LDBOOL R9 1 0 + 0x7C180600, // 0010 CALL R6 3 + 0x80040C00, // 0011 RET 1 R6 + 0x70020007, // 0012 JMP #001B + 0x60180003, // 0013 GETGBL R6 G3 + 0x5C1C0000, // 0014 MOVE R7 R0 + 0x7C180200, // 0015 CALL R6 1 + 0x8C180D07, // 0016 GETMET R6 R6 K7 + 0x5C200200, // 0017 MOVE R8 R1 + 0x5C240400, // 0018 MOVE R9 R2 + 0x7C180600, // 0019 CALL R6 3 + 0x80040C00, // 001A RET 1 R6 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_status_11 +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_get_status_11, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(tick), + /* K2 */ be_nested_str_weak(tasmota_status_11), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(_tick), + /* K5 */ be_nested_str_weak(call_remote), + /* K6 */ be_nested_str_weak(Status), + /* K7 */ be_nested_str_weak(11), + }), + be_str_weak(get_status_11), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x88080102, // 0002 GETMBR R2 R0 K2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C080403, // 0004 EQ R2 R2 R3 + 0x740A0005, // 0005 JMPT R2 #000C + 0x88080102, // 0006 GETMBR R2 R0 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x58100004, // 0008 LDCONST R4 K4 + 0x7C080400, // 0009 CALL R2 2 + 0x20080401, // 000A NE R2 R2 R1 + 0x780A000B, // 000B JMPF R2 #0018 + 0x8C080105, // 000C GETMET R2 R0 K5 + 0x58100006, // 000D LDCONST R4 K6 + 0x58140007, // 000E LDCONST R5 K7 + 0x7C080600, // 000F CALL R2 3 + 0x780A0003, // 0010 JMPF R2 #0015 + 0x980A0801, // 0011 SETIDX R2 K4 R1 + 0x90020402, // 0012 SETMBR R0 K2 R2 + 0x80040400, // 0013 RET 1 R2 + 0x70020001, // 0014 JMP #0017 + 0x4C0C0000, // 0015 LDNIL R3 + 0x80040600, // 0016 RET 1 R3 + 0x70020001, // 0017 JMP #001A + 0x88080102, // 0018 GETMBR R2 R0 K2 + 0x80040400, // 0019 RET 1 R2 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_string_to_conf +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin_Bridge_HTTP), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(split), + /* K3 */ be_nested_str_weak(_X2C), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(ARG_HTTP), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(ui_string_to_conf), + /* K8 */ be_const_int(0), + }), + be_str_weak(ui_string_to_conf), + &be_const_str_solidified, + ( &(const binstruction[24]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0x8C140902, // 0002 GETMET R5 R4 K2 + 0x001C0503, // 0003 ADD R7 R2 K3 + 0x58200003, // 0004 LDCONST R8 K3 + 0x58240004, // 0005 LDCONST R9 K4 + 0x7C140800, // 0006 CALL R5 4 + 0x88180705, // 0007 GETMBR R6 R3 K5 + 0x941C0B06, // 0008 GETIDX R7 R5 K6 + 0x98040C07, // 0009 SETIDX R1 R6 R7 + 0x60180003, // 000A GETGBL R6 G3 + 0x5C1C0600, // 000B MOVE R7 R3 + 0x7C180200, // 000C CALL R6 1 + 0x8C180D07, // 000D GETMET R6 R6 K7 + 0x5C200000, // 000E MOVE R8 R0 + 0x5C240200, // 000F MOVE R9 R1 + 0x94280B08, // 0010 GETIDX R10 R5 K8 + 0x7C180800, // 0011 CALL R6 4 + 0x60180001, // 0012 GETGBL R6 G1 + 0x581C0007, // 0013 LDCONST R7 K7 + 0x5C200200, // 0014 MOVE R8 R1 + 0x5C240400, // 0015 MOVE R9 R2 + 0x7C180600, // 0016 CALL R6 3 + 0x80040200, // 0017 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: call_remote +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_call_remote, /* name */ + be_nested_proto( + 14, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[31]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_http), + /* K1 */ be_nested_str_weak(json), + /* K2 */ be_nested_str_weak(string), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(wifi), + /* K5 */ be_nested_str_weak(up), + /* K6 */ be_nested_str_weak(eth), + /* K7 */ be_const_int(2), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(webclient), + /* K10 */ be_nested_str_weak(set_timeouts), + /* K11 */ be_nested_str_weak(set_follow_redirects), + /* K12 */ be_nested_str_weak(format), + /* K13 */ be_nested_str_weak(_X25scm_X3Fcmnd_X3D_X25s_X25_X2520_X25s), + /* K14 */ be_nested_str_weak(), + /* K15 */ be_nested_str_weak(log), + /* K16 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20), + /* K17 */ be_const_int(3), + /* K18 */ be_nested_str_weak(begin), + /* K19 */ be_nested_str_weak(GET), + /* K20 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20code_X3D), + /* K21 */ be_nested_str_weak(get_string), + /* K22 */ be_nested_str_weak(close), + /* K23 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20payload_X3D), + /* K24 */ be_nested_str_weak(load), + /* K25 */ be_nested_str_weak(reachable), + /* K26 */ be_nested_str_weak(reachable_tick), + /* K27 */ be_nested_str_weak(device), + /* K28 */ be_nested_str_weak(tick), + /* K29 */ be_const_int(1), + /* K30 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying), + }), + be_str_weak(call_remote), + &be_const_str_solidified, + ( &(const binstruction[91]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x740E0001, // 0001 JMPT R3 #0004 + 0x4C0C0000, // 0002 LDNIL R3 + 0x80040600, // 0003 RET 1 R3 + 0xA40E0200, // 0004 IMPORT R3 K1 + 0xA4120400, // 0005 IMPORT R4 K2 + 0xB8160600, // 0006 GETNGBL R5 K3 + 0x8C140B04, // 0007 GETMET R5 R5 K4 + 0x7C140200, // 0008 CALL R5 1 + 0x94140B05, // 0009 GETIDX R5 R5 K5 + 0x74160006, // 000A JMPT R5 #0012 + 0xB8160600, // 000B GETNGBL R5 K3 + 0x8C140B06, // 000C GETMET R5 R5 K6 + 0x7C140200, // 000D CALL R5 1 + 0x94140B05, // 000E GETIDX R5 R5 K5 + 0x74160001, // 000F JMPT R5 #0012 + 0x4C140000, // 0010 LDNIL R5 + 0x80040A00, // 0011 RET 1 R5 + 0x58140007, // 0012 LDCONST R5 K7 + 0x24180B08, // 0013 GT R6 R5 K8 + 0x781A0041, // 0014 JMPF R6 #0057 + 0xB81A1200, // 0015 GETNGBL R6 K9 + 0x7C180000, // 0016 CALL R6 0 + 0x8C1C0D0A, // 0017 GETMET R7 R6 K10 + 0x542603E7, // 0018 LDINT R9 1000 + 0x542A03E7, // 0019 LDINT R10 1000 + 0x7C1C0600, // 001A CALL R7 3 + 0x8C1C0D0B, // 001B GETMET R7 R6 K11 + 0x50240000, // 001C LDBOOL R9 0 0 + 0x7C1C0400, // 001D CALL R7 2 + 0x8C1C090C, // 001E GETMET R7 R4 K12 + 0x5824000D, // 001F LDCONST R9 K13 + 0x88280100, // 0020 GETMBR R10 R0 K0 + 0x5C2C0200, // 0021 MOVE R11 R1 + 0x780A0001, // 0022 JMPF R2 #0025 + 0x5C300400, // 0023 MOVE R12 R2 + 0x70020000, // 0024 JMP #0026 + 0x5830000E, // 0025 LDCONST R12 K14 + 0x7C1C0A00, // 0026 CALL R7 5 + 0xB8220600, // 0027 GETNGBL R8 K3 + 0x8C20110F, // 0028 GETMET R8 R8 K15 + 0x002A2007, // 0029 ADD R10 K16 R7 + 0x582C0011, // 002A LDCONST R11 K17 + 0x7C200600, // 002B CALL R8 3 + 0x8C200D12, // 002C GETMET R8 R6 K18 + 0x5C280E00, // 002D MOVE R10 R7 + 0x7C200400, // 002E CALL R8 2 + 0x8C200D13, // 002F GETMET R8 R6 K19 + 0x7C200200, // 0030 CALL R8 1 + 0xB8260600, // 0031 GETNGBL R9 K3 + 0x8C24130F, // 0032 GETMET R9 R9 K15 + 0x602C0008, // 0033 GETGBL R11 G8 + 0x5C301000, // 0034 MOVE R12 R8 + 0x7C2C0200, // 0035 CALL R11 1 + 0x002E280B, // 0036 ADD R11 K20 R11 + 0x58300011, // 0037 LDCONST R12 K17 + 0x7C240600, // 0038 CALL R9 3 + 0x542600C7, // 0039 LDINT R9 200 + 0x1C241009, // 003A EQ R9 R8 R9 + 0x78260011, // 003B JMPF R9 #004E + 0x8C240D15, // 003C GETMET R9 R6 K21 + 0x7C240200, // 003D CALL R9 1 + 0x8C280D16, // 003E GETMET R10 R6 K22 + 0x7C280200, // 003F CALL R10 1 + 0xB82A0600, // 0040 GETNGBL R10 K3 + 0x8C28150F, // 0041 GETMET R10 R10 K15 + 0x00322E09, // 0042 ADD R12 K23 R9 + 0x58340011, // 0043 LDCONST R13 K17 + 0x7C280600, // 0044 CALL R10 3 + 0x8C280718, // 0045 GETMET R10 R3 K24 + 0x5C301200, // 0046 MOVE R12 R9 + 0x7C280400, // 0047 CALL R10 2 + 0x502C0200, // 0048 LDBOOL R11 1 0 + 0x9002320B, // 0049 SETMBR R0 K25 R11 + 0x882C011B, // 004A GETMBR R11 R0 K27 + 0x882C171C, // 004B GETMBR R11 R11 K28 + 0x9002340B, // 004C SETMBR R0 K26 R11 + 0x80041400, // 004D RET 1 R10 + 0x8C240D16, // 004E GETMET R9 R6 K22 + 0x7C240200, // 004F CALL R9 1 + 0x04140B1D, // 0050 SUB R5 R5 K29 + 0xB8260600, // 0051 GETNGBL R9 K3 + 0x8C24130F, // 0052 GETMET R9 R9 K15 + 0x582C001E, // 0053 LDCONST R11 K30 + 0x58300011, // 0054 LDCONST R12 K17 + 0x7C240600, // 0055 CALL R9 3 + 0x7001FFBB, // 0056 JMP #0013 + 0x50180000, // 0057 LDBOOL R6 0 0 + 0x90023206, // 0058 SETMBR R0 K25 R6 + 0x4C180000, // 0059 LDNIL R6 + 0x80040C00, // 005A RET 1 R6 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_status_8 +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_get_status_8, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(tick), + /* K2 */ be_nested_str_weak(tasmota_status_8), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(_tick), + /* K5 */ be_nested_str_weak(call_remote), + /* K6 */ be_nested_str_weak(Status), + /* K7 */ be_nested_str_weak(8), + }), + be_str_weak(get_status_8), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88040301, // 0001 GETMBR R1 R1 K1 + 0x88080102, // 0002 GETMBR R2 R0 K2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x1C080403, // 0004 EQ R2 R2 R3 + 0x740A0005, // 0005 JMPT R2 #000C + 0x88080102, // 0006 GETMBR R2 R0 K2 + 0x8C080503, // 0007 GETMET R2 R2 K3 + 0x58100004, // 0008 LDCONST R4 K4 + 0x7C080400, // 0009 CALL R2 2 + 0x20080401, // 000A NE R2 R2 R1 + 0x780A000B, // 000B JMPF R2 #0018 + 0x8C080105, // 000C GETMET R2 R0 K5 + 0x58100006, // 000D LDCONST R4 K6 + 0x58140007, // 000E LDCONST R5 K7 + 0x7C080600, // 000F CALL R2 3 + 0x780A0003, // 0010 JMPF R2 #0015 + 0x980A0801, // 0011 SETIDX R2 K4 R1 + 0x90020402, // 0012 SETMBR R0 K2 R2 + 0x80040400, // 0013 RET 1 R2 + 0x70020001, // 0014 JMP #0017 + 0x4C0C0000, // 0015 LDNIL R3 + 0x80040600, // 0016 RET 1 R3 + 0x70020001, // 0017 JMP #001A + 0x88080102, // 0018 GETMBR R2 R0 K2 + 0x80040400, // 0019 RET 1 R2 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_conf_to_string +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string, /* name */ + be_nested_proto( + 11, /* nstack */ + 2, /* argc */ + 4, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin_Bridge_HTTP), + /* K1 */ be_nested_str_weak(ui_conf_to_string), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG_HTTP), + /* K4 */ be_nested_str_weak(), + /* K5 */ be_nested_str_weak(_X2C), + /* K6 */ be_nested_str_weak(MTR_X3A_X20ui_conf_to_string), + }), + be_str_weak(ui_conf_to_string), + &be_const_str_solidified, + ( &(const binstruction[23]) { /* code */ + 0x58080000, // 0000 LDCONST R2 K0 + 0x600C0003, // 0001 GETGBL R3 G3 + 0x5C100400, // 0002 MOVE R4 R2 + 0x7C0C0200, // 0003 CALL R3 1 + 0x8C0C0701, // 0004 GETMET R3 R3 K1 + 0x5C140000, // 0005 MOVE R5 R0 + 0x5C180200, // 0006 MOVE R6 R1 + 0x7C0C0600, // 0007 CALL R3 3 + 0x60100008, // 0008 GETGBL R4 G8 + 0x8C140302, // 0009 GETMET R5 R1 K2 + 0x881C0503, // 000A GETMBR R7 R2 K3 + 0x58200004, // 000B LDCONST R8 K4 + 0x7C140600, // 000C CALL R5 3 + 0x7C100200, // 000D CALL R4 1 + 0x00140705, // 000E ADD R5 R3 K5 + 0x00140A04, // 000F ADD R5 R5 R4 + 0x60180001, // 0010 GETGBL R6 G1 + 0x581C0006, // 0011 LDCONST R7 K6 + 0x5C200200, // 0012 MOVE R8 R1 + 0x5C240000, // 0013 MOVE R9 R0 + 0x5C280A00, // 0014 MOVE R10 R5 + 0x7C180800, // 0015 CALL R6 4 + 0x80040A00, // 0016 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_HTTP_init, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[17]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(init), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG_HTTP), + /* K4 */ be_nested_str_weak(_X3A_X2F_X2F), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(http_X3A_X2F_X2F), + /* K7 */ be_nested_str_weak(_X2F), + /* K8 */ be_nested_str_weak(tasmota_http), + /* K9 */ be_nested_str_weak(tasmota), + /* K10 */ be_nested_str_weak(log), + /* K11 */ be_nested_str_weak(format), + /* K12 */ be_nested_str_weak(MTR_X3A_X20ERROR_X3A_X20_X27url_X27_X20is_X20not_X20configured_X20for_X20endpoint_X20_X25i), + /* K13 */ be_const_int(2), + /* K14 */ be_nested_str_weak(tasmota_status_8), + /* K15 */ be_nested_str_weak(tasmota_status_11), + /* K16 */ be_nested_str_weak(reachable), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[39]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x60140003, // 0001 GETGBL R5 G3 + 0x5C180000, // 0002 MOVE R6 R0 + 0x7C140200, // 0003 CALL R5 1 + 0x8C140B01, // 0004 GETMET R5 R5 K1 + 0x5C1C0200, // 0005 MOVE R7 R1 + 0x5C200400, // 0006 MOVE R8 R2 + 0x5C240600, // 0007 MOVE R9 R3 + 0x7C140800, // 0008 CALL R5 4 + 0x8C140702, // 0009 GETMET R5 R3 K2 + 0x881C0103, // 000A GETMBR R7 R0 K3 + 0x7C140400, // 000B CALL R5 2 + 0x7816000A, // 000C JMPF R5 #0018 + 0x8C180902, // 000D GETMET R6 R4 K2 + 0x5C200A00, // 000E MOVE R8 R5 + 0x58240004, // 000F LDCONST R9 K4 + 0x7C180600, // 0010 CALL R6 3 + 0x14180D05, // 0011 LT R6 R6 K5 + 0x781A0002, // 0012 JMPF R6 #0016 + 0x001A0C05, // 0013 ADD R6 K6 R5 + 0x00180D07, // 0014 ADD R6 R6 K7 + 0x5C140C00, // 0015 MOVE R5 R6 + 0x90021005, // 0016 SETMBR R0 K8 R5 + 0x70020007, // 0017 JMP #0020 + 0xB81A1200, // 0018 GETNGBL R6 K9 + 0x8C180D0A, // 0019 GETMET R6 R6 K10 + 0x8C20090B, // 001A GETMET R8 R4 K11 + 0x5828000C, // 001B LDCONST R10 K12 + 0x5C2C0400, // 001C MOVE R11 R2 + 0x7C200600, // 001D CALL R8 3 + 0x5824000D, // 001E LDCONST R9 K13 + 0x7C180600, // 001F CALL R6 3 + 0x4C180000, // 0020 LDNIL R6 + 0x90021C06, // 0021 SETMBR R0 K14 R6 + 0x4C180000, // 0022 LDNIL R6 + 0x90021E06, // 0023 SETMBR R0 K15 R6 + 0x50180000, // 0024 LDBOOL R6 0 0 + 0x90022006, // 0025 SETMBR R0 K16 R6 + 0x80000000, // 0026 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_HTTP +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_class(Matter_Plugin_Bridge_HTTP, + 5, + &be_class_Matter_Plugin_Device, + be_nested_map(21, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(get_types, 20), be_const_closure(Matter_Plugin_Bridge_HTTP_get_types_closure) }, + { be_const_key_weak(is_reachable, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_is_reachable_closure) }, + { be_const_key_weak(tasmota_http, -1), be_const_var(0) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_init_closure) }, + { be_const_key_weak(reachable_tick, -1), be_const_var(4) }, + { be_const_key_weak(get_status_8, 6), be_const_closure(Matter_Plugin_Bridge_HTTP_get_status_8_closure) }, + { be_const_key_weak(tasmota_status_11, -1), be_const_var(2) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(17), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak() }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, + { be_const_key_weak(reachable, -1), be_const_var(3) }, + { be_const_key_weak(ARG_HTTP, 3), be_nested_str_weak(url) }, + { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_string_to_conf_closure) }, + { be_const_key_weak(tasmota_status_8, 18), be_const_var(1) }, + { be_const_key_weak(ARG, 8), be_nested_str_weak() }, + { be_const_key_weak(call_remote, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_call_remote_closure) }, + { be_const_key_weak(get_status_11, 5), be_const_closure(Matter_Plugin_Bridge_HTTP_get_status_11_closure) }, + { be_const_key_weak(HTTP_TIMEOUT, 4), be_const_int(300) }, + { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(Matter_Plugin_Bridge_HTTP_ui_conf_to_string_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_HTTP_read_attribute_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_HTTP) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_HTTP_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_HTTP); + be_setglobal(vm, "Matter_Plugin_Bridge_HTTP"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h new file mode 100644 index 000000000..937ff508a --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_OnOff.h @@ -0,0 +1,400 @@ +/* Solidification of Matter_Plugin_Bridge_OnOff.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_OnOff; + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff_init, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(init), + /* K2 */ be_nested_str_weak(shadow_onoff), + /* K3 */ be_nested_str_weak(tasmota_relay_index), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(ARG), + /* K6 */ be_const_int(0), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0x60140003, // 0001 GETGBL R5 G3 + 0x5C180000, // 0002 MOVE R6 R0 + 0x7C140200, // 0003 CALL R5 1 + 0x8C140B01, // 0004 GETMET R5 R5 K1 + 0x5C1C0200, // 0005 MOVE R7 R1 + 0x5C200400, // 0006 MOVE R8 R2 + 0x5C240600, // 0007 MOVE R9 R3 + 0x7C140800, // 0008 CALL R5 4 + 0x50140000, // 0009 LDBOOL R5 0 0 + 0x90020405, // 000A SETMBR R0 K2 R5 + 0x8C140704, // 000B GETMET R5 R3 K4 + 0x881C0105, // 000C GETMBR R7 R0 K5 + 0x7C140400, // 000D CALL R5 2 + 0x90020605, // 000E SETMBR R0 K3 R5 + 0x88140103, // 000F GETMBR R5 R0 K3 + 0x4C180000, // 0010 LDNIL R6 + 0x1C140A06, // 0011 EQ R5 R5 R6 + 0x78160000, // 0012 JMPF R5 #0014 + 0x90020706, // 0013 SETMBR R0 K3 K6 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_onoff +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff_set_onoff, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(call_remote), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(1), + /* K3 */ be_nested_str_weak(0), + /* K4 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(set_onoff), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x8C080100, // 0000 GETMET R2 R0 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x78060001, // 0002 JMPF R1 #0005 + 0x58140002, // 0003 LDCONST R5 K2 + 0x70020000, // 0004 JMP #0006 + 0x58140003, // 0005 LDCONST R5 K3 + 0x7C080600, // 0006 CALL R2 3 + 0x8C080104, // 0007 GETMET R2 R0 K4 + 0x7C080200, // 0008 CALL R2 1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff_invoke_request, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(command), + /* K4 */ be_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(set_onoff), + /* K7 */ be_nested_str_weak(update_shadow), + /* K8 */ be_const_int(1), + /* K9 */ be_const_int(2), + /* K10 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[42]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x541E0005, // 0004 LDINT R7 6 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0021, // 0006 JMPF R7 #0029 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E0007, // 000A JMPF R7 #0013 + 0x8C1C0106, // 000B GETMET R7 R0 K6 + 0x50240000, // 000C LDBOOL R9 0 0 + 0x7C1C0400, // 000D CALL R7 2 + 0x8C1C0107, // 000E GETMET R7 R0 K7 + 0x7C1C0200, // 000F CALL R7 1 + 0x501C0200, // 0010 LDBOOL R7 1 0 + 0x80040E00, // 0011 RET 1 R7 + 0x70020015, // 0012 JMP #0029 + 0x1C1C0D08, // 0013 EQ R7 R6 K8 + 0x781E0007, // 0014 JMPF R7 #001D + 0x8C1C0106, // 0015 GETMET R7 R0 K6 + 0x50240200, // 0016 LDBOOL R9 1 0 + 0x7C1C0400, // 0017 CALL R7 2 + 0x8C1C0107, // 0018 GETMET R7 R0 K7 + 0x7C1C0200, // 0019 CALL R7 1 + 0x501C0200, // 001A LDBOOL R7 1 0 + 0x80040E00, // 001B RET 1 R7 + 0x7002000B, // 001C JMP #0029 + 0x1C1C0D09, // 001D EQ R7 R6 K9 + 0x781E0009, // 001E JMPF R7 #0029 + 0x8C1C0106, // 001F GETMET R7 R0 K6 + 0x8824010A, // 0020 GETMBR R9 R0 K10 + 0x78260000, // 0021 JMPF R9 #0023 + 0x50240001, // 0022 LDBOOL R9 0 1 + 0x50240200, // 0023 LDBOOL R9 1 0 + 0x7C1C0400, // 0024 CALL R7 2 + 0x8C1C0107, // 0025 GETMET R7 R0 K7 + 0x7C1C0200, // 0026 CALL R7 1 + 0x501C0200, // 0027 LDBOOL R7 1 0 + 0x80040E00, // 0028 RET 1 R7 + 0x80000000, // 0029 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff_read_attribute, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(BOOL), + /* K9 */ be_nested_str_weak(shadow_onoff), + /* K10 */ be_nested_str_weak(U4), + /* K11 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0005, // 0005 LDINT R7 6 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E001B, // 0007 JMPF R7 #0024 + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x1C1C0D06, // 000A EQ R7 R6 K6 + 0x781E0005, // 000B JMPF R7 #0012 + 0x8C1C0907, // 000C GETMET R7 R4 K7 + 0x88240908, // 000D GETMBR R9 R4 K8 + 0x88280109, // 000E GETMBR R10 R0 K9 + 0x7C1C0600, // 000F CALL R7 3 + 0x80040E00, // 0010 RET 1 R7 + 0x70020010, // 0011 JMP #0023 + 0x541EFFFB, // 0012 LDINT R7 65532 + 0x1C1C0C07, // 0013 EQ R7 R6 R7 + 0x781E0005, // 0014 JMPF R7 #001B + 0x8C1C0907, // 0015 GETMET R7 R4 K7 + 0x8824090A, // 0016 GETMBR R9 R4 K10 + 0x58280006, // 0017 LDCONST R10 K6 + 0x7C1C0600, // 0018 CALL R7 3 + 0x80040E00, // 0019 RET 1 R7 + 0x70020007, // 001A JMP #0023 + 0x541EFFFC, // 001B LDINT R7 65533 + 0x1C1C0C07, // 001C EQ R7 R6 R7 + 0x781E0004, // 001D JMPF R7 #0023 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x8824090A, // 001F GETMBR R9 R4 K10 + 0x542A0003, // 0020 LDINT R10 4 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020007, // 0023 JMP #002C + 0x601C0003, // 0024 GETGBL R7 G3 + 0x5C200000, // 0025 MOVE R8 R0 + 0x7C1C0200, // 0026 CALL R7 1 + 0x8C1C0F0B, // 0027 GETMET R7 R7 K11 + 0x5C240200, // 0028 MOVE R9 R1 + 0x5C280400, // 0029 MOVE R10 R2 + 0x7C1C0600, // 002A CALL R7 3 + 0x80040E00, // 002B RET 1 R7 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Bridge_OnOff_update_shadow, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(get_status_11), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(StatusSTS), + /* K3 */ be_nested_str_weak(POWER), + /* K4 */ be_nested_str_weak(ON), + /* K5 */ be_nested_str_weak(shadow_onoff), + /* K6 */ be_nested_str_weak(attribute_updated), + /* K7 */ be_const_int(0), + /* K8 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[34]) { /* code */ + 0x8C040100, // 0000 GETMET R1 R0 K0 + 0x7C040200, // 0001 CALL R1 1 + 0x78060018, // 0002 JMPF R1 #001C + 0x8C080301, // 0003 GETMET R2 R1 K1 + 0x58100002, // 0004 LDCONST R4 K2 + 0x60140013, // 0005 GETGBL R5 G19 + 0x7C140000, // 0006 CALL R5 0 + 0x7C080600, // 0007 CALL R2 3 + 0x5C040400, // 0008 MOVE R1 R2 + 0x8C080301, // 0009 GETMET R2 R1 K1 + 0x58100003, // 000A LDCONST R4 K3 + 0x7C080400, // 000B CALL R2 2 + 0x1C080504, // 000C EQ R2 R2 K4 + 0x880C0105, // 000D GETMBR R3 R0 K5 + 0x4C100000, // 000E LDNIL R4 + 0x200C0604, // 000F NE R3 R3 R4 + 0x780E0009, // 0010 JMPF R3 #001B + 0x880C0105, // 0011 GETMBR R3 R0 K5 + 0x60100017, // 0012 GETGBL R4 G23 + 0x5C140400, // 0013 MOVE R5 R2 + 0x7C100200, // 0014 CALL R4 1 + 0x200C0604, // 0015 NE R3 R3 R4 + 0x780E0003, // 0016 JMPF R3 #001B + 0x8C0C0106, // 0017 GETMET R3 R0 K6 + 0x54160005, // 0018 LDINT R5 6 + 0x58180007, // 0019 LDCONST R6 K7 + 0x7C0C0600, // 001A CALL R3 3 + 0x90020A02, // 001B SETMBR R0 K5 R2 + 0x60080003, // 001C GETGBL R2 G3 + 0x5C0C0000, // 001D MOVE R3 R0 + 0x7C080200, // 001E CALL R2 1 + 0x8C080508, // 001F GETMET R2 R2 K8 + 0x7C080200, // 0020 CALL R2 1 + 0x80000000, // 0021 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_OnOff +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_HTTP; +be_local_class(Matter_Plugin_Bridge_OnOff, + 3, + &be_class_Matter_Plugin_Bridge_HTTP, + be_nested_map(14, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(3, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Bridge_OnOff__X3Clambda_X3E_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_relay) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_update_shadow_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_init_closure) }, + { be_const_key_weak(shadow_onoff, 13), be_const_var(2) }, + { be_const_key_weak(invoke_request, 4), be_const_closure(Matter_Plugin_Bridge_OnOff_invoke_request_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(_X26_X23x1F517_X3B_X20Relay) }, + { be_const_key_weak(tasmota_http, 12), be_const_var(0) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(266, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_read_attribute_closure) }, + { be_const_key_weak(tasmota_relay_index, -1), be_const_var(1) }, + { be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Bridge_OnOff_set_onoff_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_OnOff) +); +/*******************************************************************/ + +void be_load_Matter_Plugin_Bridge_OnOff_class(bvm *vm) { + be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_OnOff); + be_setglobal(vm, "Matter_Plugin_Bridge_OnOff"); + be_pop(vm, 1); +} +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h index 7de68c853..d8782dcac 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Light0.h @@ -6,6 +6,177 @@ extern const bclass be_class_Matter_Plugin_Light0; +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(get), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(power), + /* K4 */ be_nested_str_weak(shadow_onoff), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080301, // 0001 GETMET R2 R1 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C0C0502, // 0003 GETMET R3 R2 K2 + 0x58140003, // 0004 LDCONST R5 K3 + 0x4C180000, // 0005 LDNIL R6 + 0x7C0C0600, // 0006 CALL R3 3 + 0x88100104, // 0007 GETMBR R4 R0 K4 + 0x20100604, // 0008 NE R4 R3 R4 + 0x78120004, // 0009 JMPF R4 #000F + 0x8C100105, // 000A GETMET R4 R0 K5 + 0x541A0005, // 000B LDINT R6 6 + 0x581C0006, // 000C LDCONST R7 K6 + 0x7C100600, // 000D CALL R4 3 + 0x90020803, // 000E SETMBR R0 K4 R3 + 0x60100003, // 000F GETGBL R4 G3 + 0x5C140000, // 0010 MOVE R5 R0 + 0x7C100200, // 0011 CALL R4 1 + 0x8C100907, // 0012 GETMET R4 R4 K7 + 0x7C100200, // 0013 CALL R4 1 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(attribute), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(create_TLV), + /* K8 */ be_nested_str_weak(BOOL), + /* K9 */ be_nested_str_weak(shadow_onoff), + /* K10 */ be_nested_str_weak(U4), + /* K11 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xB8120200, // 0001 GETNGBL R4 K1 + 0x88100902, // 0002 GETMBR R4 R4 K2 + 0x88140503, // 0003 GETMBR R5 R2 K3 + 0x88180504, // 0004 GETMBR R6 R2 K4 + 0x541E0005, // 0005 LDINT R7 6 + 0x1C1C0A07, // 0006 EQ R7 R5 R7 + 0x781E001B, // 0007 JMPF R7 #0024 + 0x8C1C0105, // 0008 GETMET R7 R0 K5 + 0x7C1C0200, // 0009 CALL R7 1 + 0x1C1C0D06, // 000A EQ R7 R6 K6 + 0x781E0005, // 000B JMPF R7 #0012 + 0x8C1C0907, // 000C GETMET R7 R4 K7 + 0x88240908, // 000D GETMBR R9 R4 K8 + 0x88280109, // 000E GETMBR R10 R0 K9 + 0x7C1C0600, // 000F CALL R7 3 + 0x80040E00, // 0010 RET 1 R7 + 0x70020010, // 0011 JMP #0023 + 0x541EFFFB, // 0012 LDINT R7 65532 + 0x1C1C0C07, // 0013 EQ R7 R6 R7 + 0x781E0005, // 0014 JMPF R7 #001B + 0x8C1C0907, // 0015 GETMET R7 R4 K7 + 0x8824090A, // 0016 GETMBR R9 R4 K10 + 0x58280006, // 0017 LDCONST R10 K6 + 0x7C1C0600, // 0018 CALL R7 3 + 0x80040E00, // 0019 RET 1 R7 + 0x70020007, // 001A JMP #0023 + 0x541EFFFC, // 001B LDINT R7 65533 + 0x1C1C0C07, // 001C EQ R7 R6 R7 + 0x781E0004, // 001D JMPF R7 #0023 + 0x8C1C0907, // 001E GETMET R7 R4 K7 + 0x8824090A, // 001F GETMBR R9 R4 K10 + 0x542A0003, // 0020 LDINT R10 4 + 0x7C1C0600, // 0021 CALL R7 3 + 0x80040E00, // 0022 RET 1 R7 + 0x70020007, // 0023 JMP #002C + 0x601C0003, // 0024 GETGBL R7 G3 + 0x5C200000, // 0025 MOVE R8 R0 + 0x7C1C0200, // 0026 CALL R7 1 + 0x8C1C0F0B, // 0027 GETMET R7 R7 K11 + 0x5C240200, // 0028 MOVE R9 R1 + 0x5C280400, // 0029 MOVE R10 R2 + 0x7C1C0600, // 002A CALL R7 3 + 0x80040E00, // 002B RET 1 R7 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_Light0_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: invoke_request ********************************************************************/ @@ -95,177 +266,6 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */ - be_nested_proto( - 11, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(attribute), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(create_TLV), - /* K8 */ be_nested_str_weak(BOOL), - /* K9 */ be_nested_str_weak(shadow_onoff), - /* K10 */ be_nested_str_weak(U4), - /* K11 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xB8120200, // 0001 GETNGBL R4 K1 - 0x88100902, // 0002 GETMBR R4 R4 K2 - 0x88140503, // 0003 GETMBR R5 R2 K3 - 0x88180504, // 0004 GETMBR R6 R2 K4 - 0x541E0005, // 0005 LDINT R7 6 - 0x1C1C0A07, // 0006 EQ R7 R5 R7 - 0x781E001B, // 0007 JMPF R7 #0024 - 0x8C1C0105, // 0008 GETMET R7 R0 K5 - 0x7C1C0200, // 0009 CALL R7 1 - 0x1C1C0D06, // 000A EQ R7 R6 K6 - 0x781E0005, // 000B JMPF R7 #0012 - 0x8C1C0907, // 000C GETMET R7 R4 K7 - 0x88240908, // 000D GETMBR R9 R4 K8 - 0x88280109, // 000E GETMBR R10 R0 K9 - 0x7C1C0600, // 000F CALL R7 3 - 0x80040E00, // 0010 RET 1 R7 - 0x70020010, // 0011 JMP #0023 - 0x541EFFFB, // 0012 LDINT R7 65532 - 0x1C1C0C07, // 0013 EQ R7 R6 R7 - 0x781E0005, // 0014 JMPF R7 #001B - 0x8C1C0907, // 0015 GETMET R7 R4 K7 - 0x8824090A, // 0016 GETMBR R9 R4 K10 - 0x58280006, // 0017 LDCONST R10 K6 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x70020007, // 001A JMP #0023 - 0x541EFFFC, // 001B LDINT R7 65533 - 0x1C1C0C07, // 001C EQ R7 R6 R7 - 0x781E0004, // 001D JMPF R7 #0023 - 0x8C1C0907, // 001E GETMET R7 R4 K7 - 0x8824090A, // 001F GETMBR R9 R4 K10 - 0x542A0003, // 0020 LDINT R10 4 - 0x7C1C0600, // 0021 CALL R7 3 - 0x80040E00, // 0022 RET 1 R7 - 0x70020007, // 0023 JMP #002C - 0x601C0003, // 0024 GETGBL R7 G3 - 0x5C200000, // 0025 MOVE R8 R0 - 0x7C1C0200, // 0026 CALL R7 1 - 0x8C1C0F0B, // 0027 GETMET R7 R7 K11 - 0x5C240200, // 0028 MOVE R9 R1 - 0x5C280400, // 0029 MOVE R10 R2 - 0x7C1C0600, // 002A CALL R7 3 - 0x80040E00, // 002B RET 1 R7 - 0x80000000, // 002C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(get), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(power), - /* K4 */ be_nested_str_weak(shadow_onoff), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080301, // 0001 GETMET R2 R1 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x58140003, // 0004 LDCONST R5 K3 - 0x4C180000, // 0005 LDNIL R6 - 0x7C0C0600, // 0006 CALL R3 3 - 0x88100104, // 0007 GETMBR R4 R0 K4 - 0x20100604, // 0008 NE R4 R3 R4 - 0x78120004, // 0009 JMPF R4 #000F - 0x8C100105, // 000A GETMET R4 R0 K5 - 0x541A0005, // 000B LDINT R6 6 - 0x581C0006, // 000C LDCONST R7 K6 - 0x7C100600, // 000D CALL R4 3 - 0x90020803, // 000E SETMBR R0 K4 R3 - 0x60100003, // 000F GETGBL R4 G3 - 0x5C140000, // 0010 MOVE R5 R0 - 0x7C100200, // 0011 CALL R4 1 - 0x8C100907, // 0012 GETMET R4 R4 K7 - 0x7C100200, // 0013 CALL R4 1 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_Light0_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_onoff), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Light0 ********************************************************************/ @@ -273,17 +273,17 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Light0, 1, &be_class_Matter_Plugin_Device, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) }, - { be_const_key_weak(shadow_onoff, 8), be_const_var(0) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(256, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) }, { be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -294,10 +294,11 @@ be_local_class(Matter_Plugin_Light0, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) }, { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 0), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, + { be_const_key_weak(update_shadow, 1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) }, })), be_str_weak(Matter_Plugin_Light0) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h index 07ce40c5a..4d753eca5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_OnOff.h @@ -33,6 +33,94 @@ be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: init +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_onoff), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(find), + /* K4 */ be_nested_str_weak(ARG), + /* K5 */ be_const_int(0), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x8C100703, // 000A GETMET R4 R3 K3 + 0x88180104, // 000B GETMBR R6 R0 K4 + 0x7C100400, // 000C CALL R4 2 + 0x90020404, // 000D SETMBR R0 K2 R4 + 0x88100102, // 000E GETMBR R4 R0 K2 + 0x4C140000, // 000F LDNIL R5 + 0x1C100805, // 0010 EQ R4 R4 R5 + 0x78120000, // 0011 JMPF R4 #0013 + 0x90020505, // 0012 SETMBR R0 K2 K5 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_onoff +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(set_power), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(set_onoff), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0xB80A0000, // 0000 GETNGBL R2 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x88100102, // 0002 GETMBR R4 R0 K2 + 0x60140017, // 0003 GETGBL R5 G23 + 0x5C180200, // 0004 MOVE R6 R1 + 0x7C140200, // 0005 CALL R5 1 + 0x7C080600, // 0006 CALL R2 3 + 0x8C080103, // 0007 GETMET R2 R0 K3 + 0x7C080200, // 0008 CALL R2 1 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: invoke_request ********************************************************************/ @@ -110,153 +198,6 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: init -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_onoff), - /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(ARG), - /* K5 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x50100000, // 0008 LDBOOL R4 0 0 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x8C100703, // 000A GETMET R4 R3 K3 - 0x88180104, // 000B GETMBR R6 R0 K4 - 0x7C100400, // 000C CALL R4 2 - 0x90020404, // 000D SETMBR R0 K2 R4 - 0x88100102, // 000E GETMBR R4 R0 K2 - 0x4C140000, // 000F LDNIL R5 - 0x1C100805, // 0010 EQ R4 R4 R5 - 0x78120000, // 0011 JMPF R4 #0013 - 0x90020505, // 0012 SETMBR R0 K2 K5 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(get_power), - /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(shadow_onoff), - /* K4 */ be_nested_str_weak(attribute_updated), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x4C080000, // 0004 LDNIL R2 - 0x20080202, // 0005 NE R2 R1 R2 - 0x780A000E, // 0006 JMPF R2 #0016 - 0x88080103, // 0007 GETMBR R2 R0 K3 - 0x4C0C0000, // 0008 LDNIL R3 - 0x20080403, // 0009 NE R2 R2 R3 - 0x780A0009, // 000A JMPF R2 #0015 - 0x88080103, // 000B GETMBR R2 R0 K3 - 0x600C0017, // 000C GETGBL R3 G23 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C0C0200, // 000E CALL R3 1 - 0x20080403, // 000F NE R2 R2 R3 - 0x780A0003, // 0010 JMPF R2 #0015 - 0x8C080104, // 0011 GETMET R2 R0 K4 - 0x54120005, // 0012 LDINT R4 6 - 0x58140005, // 0013 LDCONST R5 K5 - 0x7C080600, // 0014 CALL R2 3 - 0x90020601, // 0015 SETMBR R0 K3 R1 - 0x60080003, // 0016 GETGBL R2 G3 - 0x5C0C0000, // 0017 MOVE R3 R0 - 0x7C080200, // 0018 CALL R2 1 - 0x8C080506, // 0019 GETMET R2 R2 K6 - 0x7C080200, // 001A CALL R2 1 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_onoff -********************************************************************/ -be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(set_power), - /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(set_onoff), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x88100102, // 0002 GETMBR R4 R0 K2 - 0x60140017, // 0003 GETGBL R5 G23 - 0x5C180200, // 0004 MOVE R6 R1 - 0x7C140200, // 0005 CALL R5 1 - 0x7C080600, // 0006 CALL R2 3 - 0x8C080103, // 0007 GETMET R2 R0 K3 - 0x7C080200, // 0008 CALL R2 1 - 0x80000000, // 0009 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -338,6 +279,65 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota), + /* K1 */ be_nested_str_weak(get_power), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(shadow_onoff), + /* K4 */ be_nested_str_weak(attribute_updated), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0xB8060000, // 0000 GETNGBL R1 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x4C080000, // 0004 LDNIL R2 + 0x20080202, // 0005 NE R2 R1 R2 + 0x780A000E, // 0006 JMPF R2 #0016 + 0x88080103, // 0007 GETMBR R2 R0 K3 + 0x4C0C0000, // 0008 LDNIL R3 + 0x20080403, // 0009 NE R2 R2 R3 + 0x780A0009, // 000A JMPF R2 #0015 + 0x88080103, // 000B GETMBR R2 R0 K3 + 0x600C0017, // 000C GETGBL R3 G23 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C0C0200, // 000E CALL R3 1 + 0x20080403, // 000F NE R2 R2 R3 + 0x780A0003, // 0010 JMPF R2 #0015 + 0x8C080104, // 0011 GETMET R2 R0 K4 + 0x54120005, // 0012 LDINT R4 6 + 0x58140005, // 0013 LDCONST R5 K5 + 0x7C080600, // 0014 CALL R2 3 + 0x90020601, // 0015 SETMBR R0 K3 R1 + 0x60080003, // 0016 GETGBL R2 G3 + 0x5C0C0000, // 0017 MOVE R3 R0 + 0x7C080200, // 0018 CALL R2 1 + 0x8C080506, // 0019 GETMET R2 R2 K6 + 0x7C080200, // 001A CALL R2 1 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_OnOff ********************************************************************/ @@ -345,19 +345,9 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_OnOff, 2, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(14, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG, 4), be_nested_str_weak(relay) }, - { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) }, - { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) }, - { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) }, - { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -368,12 +358,23 @@ be_local_class(Matter_Plugin_OnOff, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(set_onoff, 8), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(UPDATE_TIME, 13), be_const_int(250) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) }, + { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) }, + { be_const_key_weak(set_onoff, 12), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) }, + { be_const_key_weak(invoke_request, 4), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) }, + { be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) }, + { be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(266, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) }, })), be_str_weak(Matter_Plugin_OnOff) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h index 53e80ddfa..788358b91 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor.h @@ -30,6 +30,80 @@ be_local_closure(Matter_Plugin_Sensor_pre_value, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(value_changed), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */ + be_nested_proto( + 8, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, /* no sub protos */ + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K1 */ be_nested_str_weak(pre_value), + /* K2 */ be_nested_str_weak(match), + /* K3 */ be_nested_str_weak(shadow_value), + /* K4 */ be_nested_str_weak(value_changed), + }), + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[21]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0011, // 0001 JMPF R2 #0014 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x6010000A, // 0003 GETGBL R4 G10 + 0x88140100, // 0004 GETMBR R5 R0 K0 + 0x8C140B02, // 0005 GETMET R5 R5 K2 + 0x5C1C0200, // 0006 MOVE R7 R1 + 0x7C140400, // 0007 CALL R5 2 + 0x7C100200, // 0008 CALL R4 1 + 0x7C080400, // 0009 CALL R2 2 + 0x4C0C0000, // 000A LDNIL R3 + 0x200C0403, // 000B NE R3 R2 R3 + 0x780E0006, // 000C JMPF R3 #0014 + 0x880C0103, // 000D GETMBR R3 R0 K3 + 0x200C0403, // 000E NE R3 R2 R3 + 0x780E0002, // 000F JMPF R3 #0013 + 0x8C0C0104, // 0010 GETMET R3 R0 K4 + 0x5C140400, // 0011 MOVE R5 R2 + 0x7C0C0400, // 0012 CALL R3 2 + 0x90020602, // 0013 SETMBR R0 K3 R2 + 0x80000000, // 0014 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: init ********************************************************************/ @@ -83,80 +157,6 @@ be_local_closure(Matter_Plugin_Sensor_init, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_sensors -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_parse_sensors, /* name */ - be_nested_proto( - 8, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_sensor_matcher), - /* K1 */ be_nested_str_weak(pre_value), - /* K2 */ be_nested_str_weak(match), - /* K3 */ be_nested_str_weak(shadow_value), - /* K4 */ be_nested_str_weak(value_changed), - }), - be_str_weak(parse_sensors), - &be_const_str_solidified, - ( &(const binstruction[21]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x780A0011, // 0001 JMPF R2 #0014 - 0x8C080101, // 0002 GETMET R2 R0 K1 - 0x6010000A, // 0003 GETGBL R4 G10 - 0x88140100, // 0004 GETMBR R5 R0 K0 - 0x8C140B02, // 0005 GETMET R5 R5 K2 - 0x5C1C0200, // 0006 MOVE R7 R1 - 0x7C140400, // 0007 CALL R5 2 - 0x7C100200, // 0008 CALL R4 1 - 0x7C080400, // 0009 CALL R2 2 - 0x4C0C0000, // 000A LDNIL R3 - 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0006, // 000C JMPF R3 #0014 - 0x880C0103, // 000D GETMBR R3 R0 K3 - 0x200C0403, // 000E NE R3 R2 R3 - 0x780E0002, // 000F JMPF R3 #0013 - 0x8C0C0104, // 0010 GETMET R3 R0 K4 - 0x5C140400, // 0011 MOVE R5 R2 - 0x7C0C0400, // 0012 CALL R3 2 - 0x90020602, // 0013 SETMBR R0 K3 R2 - 0x80000000, // 0014 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -be_local_closure(Matter_Plugin_Sensor_value_changed, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, /* no sub protos */ - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Sensor ********************************************************************/ @@ -164,16 +164,17 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor, 3, &be_class_Matter_Plugin_Device, - be_nested_map(8, + be_nested_map(9, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) }, - { be_const_key_weak(shadow_value, -1), be_const_var(2) }, - { be_const_key_weak(tasmota_sensor_matcher, 6), be_const_var(1) }, - { be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Sensor_init_closure) }, - { be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) }, - { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) }, + { be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) }, { be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) }, + { be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_pre_value_closure) }, { be_const_key_weak(ARG, -1), be_nested_str_weak(filter) }, + { be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_value_changed_closure) }, + { be_const_key_weak(init, 7), be_const_closure(Matter_Plugin_Sensor_init_closure) }, + { be_const_key_weak(parse_sensors, 5), be_const_closure(Matter_Plugin_Sensor_parse_sensors_closure) }, + { be_const_key_weak(shadow_value, -1), be_const_var(2) }, + { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) }, })), be_str_weak(Matter_Plugin_Sensor) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h index 995146e41..179384ac0 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Humidity.h @@ -132,12 +132,17 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */ NULL, /* no const */ be_str_weak(pre_value), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x540E0063, // 0001 LDINT R3 100 - 0x080C0203, // 0002 MUL R3 R1 R3 - 0x7C080200, // 0003 CALL R2 1 - 0x80040400, // 0004 RET 1 R2 + ( &(const binstruction[10]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0004, // 0002 JMPF R2 #0008 + 0x60080009, // 0003 GETGBL R2 G9 + 0x540E0063, // 0004 LDINT R3 100 + 0x080C0203, // 0005 MUL R3 R1 R3 + 0x7C080200, // 0006 CALL R2 1 + 0x70020000, // 0007 JMP #0009 + 0x4C080000, // 0008 LDNIL R2 + 0x80040400, // 0009 RET 1 R2 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h index 13650c269..99cba6068 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Illuminance.h @@ -132,11 +132,16 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */ NULL, /* no const */ be_str_weak(pre_value), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x80040400, // 0003 RET 1 R2 + ( &(const binstruction[ 9]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x60080009, // 0003 GETGBL R2 G9 + 0x5C0C0200, // 0004 MOVE R3 R1 + 0x7C080200, // 0005 CALL R2 1 + 0x70020000, // 0006 JMP #0008 + 0x4C080000, // 0007 LDNIL R2 + 0x80040400, // 0008 RET 1 R2 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h index c36f76084..d3e645510 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Pressure.h @@ -132,11 +132,16 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */ NULL, /* no const */ be_str_weak(pre_value), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x5C0C0200, // 0001 MOVE R3 R1 - 0x7C080200, // 0002 CALL R2 1 - 0x80040400, // 0003 RET 1 R2 + ( &(const binstruction[ 9]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x60080009, // 0003 GETGBL R2 G9 + 0x5C0C0200, // 0004 MOVE R3 R1 + 0x7C080200, // 0005 CALL R2 1 + 0x70020000, // 0006 JMP #0008 + 0x4C080000, // 0007 LDNIL R2 + 0x80040400, // 0008 RET 1 R2 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h index 4fdf3b743..13569d9e4 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Sensor_Temp.h @@ -129,12 +129,17 @@ be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* name */ NULL, /* no const */ be_str_weak(pre_value), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x540E0063, // 0001 LDINT R3 100 - 0x080C0203, // 0002 MUL R3 R1 R3 - 0x7C080200, // 0003 CALL R2 1 - 0x80040400, // 0004 RET 1 R2 + ( &(const binstruction[10]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0004, // 0002 JMPF R2 #0008 + 0x60080009, // 0003 GETGBL R2 G9 + 0x540E0063, // 0004 LDINT R3 100 + 0x080C0203, // 0005 MUL R3 R1 R3 + 0x7C080200, // 0006 CALL R2 1 + 0x70020000, // 0007 JMP #0009 + 0x4C080000, // 0008 LDNIL R2 + 0x80040400, // 0009 RET 1 R2 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h index 189b99c1e..76d72c390 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -19,7 +19,7 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[35]) { /* constants */ + ( &(const bvalue[36]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(content_send), @@ -45,20 +45,21 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */ /* K22 */ be_nested_str_weak(_X3C_X2Fselect_X3E_X3C_X2Ftd_X3E), /* K23 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X26nbsp_X3B_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), /* K24 */ be_const_int(1), - /* K25 */ be_nested_str_weak(get_plugin_class_arg), - /* K26 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E), - /* K27 */ be_nested_str_weak(_CLASSES_TYPES), - /* K28 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), - /* K29 */ be_nested_str_weak(html_escape), - /* K30 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E), - /* K31 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), - /* K32 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E), - /* K33 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E), - /* K34 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K25 */ be_nested_str_weak(plugins_classes), + /* K26 */ be_nested_str_weak(ui_conf_to_string), + /* K27 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X25i_X27_X3E_X3C_X2Ftd_X3E), + /* K28 */ be_nested_str_weak(_CLASSES_TYPES), + /* K29 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X25s_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), + /* K30 */ be_nested_str_weak(html_escape), + /* K31 */ be_nested_str_weak(_X3Ctr_X3E_X3Ctd_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27ep_X2503i_X27_X20maxlength_X3D_X274_X27_X20size_X3D_X273_X27_X20pattern_X3D_X27_X5B0_X2D9_X5D_X7B1_X2C4_X7D_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ftd_X3E), + /* K32 */ be_nested_str_weak(_X3Ctd_X3E_X3Cfont_X20size_X3D_X27_X2D1_X27_X3E_X3Cinput_X20type_X3D_X27text_X27_X20name_X3D_X27arg_X2503i_X27_X20minlength_X3D_X270_X27_X20size_X3D_X278_X27_X20value_X3D_X27_X27_X3E_X3C_X2Ffont_X3E_X3C_X2Ftd_X3E), + /* K33 */ be_nested_str_weak(_X3C_X2Ftable_X3E_X3Cp_X3E_X3C_X2Fp_X3E), + /* K34 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27config_X27_X20class_X3D_X27button_X20bgrn_X27_X3EChange_X20configuration_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E), + /* K35 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E), }), be_str_weak(show_plugins_configuration), &be_const_str_solidified, - ( &(const binstruction[180]) { /* code */ + ( &(const binstruction[181]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0xA40A0200, // 0001 IMPORT R2 K1 0x8C0C0302, // 0002 GETMET R3 R1 K2 @@ -137,7 +138,7 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */ 0x5C180600, // 004B MOVE R6 R3 0x7C140200, // 004C CALL R5 1 0x14140805, // 004D LT R5 R4 R5 - 0x7816003F, // 004E JMPF R5 #008F + 0x78160040, // 004E JMPF R5 #0090 0x94140604, // 004F GETIDX R5 R3 R4 0x8818010A, // 0050 GETMBR R6 R0 K10 0x601C0008, // 0051 GETGBL R7 G8 @@ -154,91 +155,92 @@ be_local_closure(Matter_UI_show_plugins_configuration, /* name */ 0x00100918, // 005C ADD R4 R4 K24 0x7001FFEB, // 005D JMP #004A 0x8820010A, // 005E GETMBR R8 R0 K10 - 0x8C201119, // 005F GETMET R8 R8 K25 - 0x5C280E00, // 0060 MOVE R10 R7 - 0x7C200400, // 0061 CALL R8 2 - 0x78220006, // 0062 JMPF R8 #006A - 0x60240008, // 0063 GETGBL R9 G8 - 0x8C280D0E, // 0064 GETMET R10 R6 K14 - 0x5C301000, // 0065 MOVE R12 R8 - 0x58340014, // 0066 LDCONST R13 K20 - 0x7C280600, // 0067 CALL R10 3 - 0x7C240200, // 0068 CALL R9 1 - 0x70020000, // 0069 JMP #006B - 0x58240014, // 006A LDCONST R9 K20 - 0x8C280302, // 006B GETMET R10 R1 K2 - 0x8C300510, // 006C GETMET R12 R2 K16 - 0x5838001A, // 006D LDCONST R14 K26 - 0x5C3C0800, // 006E MOVE R15 R4 - 0x5C400A00, // 006F MOVE R16 R5 - 0x7C300800, // 0070 CALL R12 4 - 0x7C280400, // 0071 CALL R10 2 - 0x8C280302, // 0072 GETMET R10 R1 K2 - 0x8C300510, // 0073 GETMET R12 R2 K16 - 0x58380012, // 0074 LDCONST R14 K18 - 0x5C3C0800, // 0075 MOVE R15 R4 - 0x7C300600, // 0076 CALL R12 3 - 0x7C280400, // 0077 CALL R10 2 - 0x8C280113, // 0078 GETMET R10 R0 K19 - 0x8C300D0E, // 0079 GETMET R12 R6 K14 - 0x5838000F, // 007A LDCONST R14 K15 - 0x583C0014, // 007B LDCONST R15 K20 - 0x7C300600, // 007C CALL R12 3 - 0x8834011B, // 007D GETMBR R13 R0 K27 - 0x7C280600, // 007E CALL R10 3 - 0x8C280302, // 007F GETMET R10 R1 K2 - 0x8C300510, // 0080 GETMET R12 R2 K16 - 0x58380016, // 0081 LDCONST R14 K22 - 0x7C300400, // 0082 CALL R12 2 - 0x7C280400, // 0083 CALL R10 2 - 0x8C280302, // 0084 GETMET R10 R1 K2 - 0x8C300510, // 0085 GETMET R12 R2 K16 - 0x5838001C, // 0086 LDCONST R14 K28 - 0x5C3C0800, // 0087 MOVE R15 R4 - 0x8C40031D, // 0088 GETMET R16 R1 K29 - 0x5C481200, // 0089 MOVE R18 R9 - 0x7C400400, // 008A CALL R16 2 - 0x7C300800, // 008B CALL R12 4 - 0x7C280400, // 008C CALL R10 2 - 0x00100918, // 008D ADD R4 R4 K24 - 0x7001FFBA, // 008E JMP #004A - 0x8C140302, // 008F GETMET R5 R1 K2 - 0x8C1C0510, // 0090 GETMET R7 R2 K16 - 0x5824001E, // 0091 LDCONST R9 K30 - 0x5C280800, // 0092 MOVE R10 R4 - 0x7C1C0600, // 0093 CALL R7 3 - 0x7C140400, // 0094 CALL R5 2 - 0x8C140302, // 0095 GETMET R5 R1 K2 - 0x8C1C0510, // 0096 GETMET R7 R2 K16 - 0x58240012, // 0097 LDCONST R9 K18 - 0x5C280800, // 0098 MOVE R10 R4 - 0x7C1C0600, // 0099 CALL R7 3 - 0x7C140400, // 009A CALL R5 2 - 0x8C140113, // 009B GETMET R5 R0 K19 - 0x581C0014, // 009C LDCONST R7 K20 - 0x8820011B, // 009D GETMBR R8 R0 K27 - 0x7C140600, // 009E CALL R5 3 - 0x8C140302, // 009F GETMET R5 R1 K2 - 0x8C1C0510, // 00A0 GETMET R7 R2 K16 - 0x58240016, // 00A1 LDCONST R9 K22 - 0x7C1C0400, // 00A2 CALL R7 2 - 0x7C140400, // 00A3 CALL R5 2 - 0x8C140302, // 00A4 GETMET R5 R1 K2 - 0x8C1C0510, // 00A5 GETMET R7 R2 K16 - 0x5824001F, // 00A6 LDCONST R9 K31 - 0x5C280800, // 00A7 MOVE R10 R4 - 0x7C1C0600, // 00A8 CALL R7 3 - 0x7C140400, // 00A9 CALL R5 2 - 0x8C140302, // 00AA GETMET R5 R1 K2 - 0x581C0020, // 00AB LDCONST R7 K32 - 0x7C140400, // 00AC CALL R5 2 - 0x8C140302, // 00AD GETMET R5 R1 K2 - 0x581C0021, // 00AE LDCONST R7 K33 - 0x7C140400, // 00AF CALL R5 2 - 0x8C140302, // 00B0 GETMET R5 R1 K2 - 0x581C0022, // 00B1 LDCONST R7 K34 - 0x7C140400, // 00B2 CALL R5 2 - 0x80000000, // 00B3 RET 0 + 0x88201119, // 005F GETMBR R8 R8 K25 + 0x8C20110E, // 0060 GETMET R8 R8 K14 + 0x5C280E00, // 0061 MOVE R10 R7 + 0x7C200400, // 0062 CALL R8 2 + 0x58240014, // 0063 LDCONST R9 K20 + 0x4C280000, // 0064 LDNIL R10 + 0x2028100A, // 0065 NE R10 R8 R10 + 0x782A0004, // 0066 JMPF R10 #006C + 0x8C28111A, // 0067 GETMET R10 R8 K26 + 0x5C301000, // 0068 MOVE R12 R8 + 0x5C340C00, // 0069 MOVE R13 R6 + 0x7C280600, // 006A CALL R10 3 + 0x5C241400, // 006B MOVE R9 R10 + 0x8C280302, // 006C GETMET R10 R1 K2 + 0x8C300510, // 006D GETMET R12 R2 K16 + 0x5838001B, // 006E LDCONST R14 K27 + 0x5C3C0800, // 006F MOVE R15 R4 + 0x5C400A00, // 0070 MOVE R16 R5 + 0x7C300800, // 0071 CALL R12 4 + 0x7C280400, // 0072 CALL R10 2 + 0x8C280302, // 0073 GETMET R10 R1 K2 + 0x8C300510, // 0074 GETMET R12 R2 K16 + 0x58380012, // 0075 LDCONST R14 K18 + 0x5C3C0800, // 0076 MOVE R15 R4 + 0x7C300600, // 0077 CALL R12 3 + 0x7C280400, // 0078 CALL R10 2 + 0x8C280113, // 0079 GETMET R10 R0 K19 + 0x8C300D0E, // 007A GETMET R12 R6 K14 + 0x5838000F, // 007B LDCONST R14 K15 + 0x583C0014, // 007C LDCONST R15 K20 + 0x7C300600, // 007D CALL R12 3 + 0x8834011C, // 007E GETMBR R13 R0 K28 + 0x7C280600, // 007F CALL R10 3 + 0x8C280302, // 0080 GETMET R10 R1 K2 + 0x8C300510, // 0081 GETMET R12 R2 K16 + 0x58380016, // 0082 LDCONST R14 K22 + 0x7C300400, // 0083 CALL R12 2 + 0x7C280400, // 0084 CALL R10 2 + 0x8C280302, // 0085 GETMET R10 R1 K2 + 0x8C300510, // 0086 GETMET R12 R2 K16 + 0x5838001D, // 0087 LDCONST R14 K29 + 0x5C3C0800, // 0088 MOVE R15 R4 + 0x8C40031E, // 0089 GETMET R16 R1 K30 + 0x5C481200, // 008A MOVE R18 R9 + 0x7C400400, // 008B CALL R16 2 + 0x7C300800, // 008C CALL R12 4 + 0x7C280400, // 008D CALL R10 2 + 0x00100918, // 008E ADD R4 R4 K24 + 0x7001FFB9, // 008F JMP #004A + 0x8C140302, // 0090 GETMET R5 R1 K2 + 0x8C1C0510, // 0091 GETMET R7 R2 K16 + 0x5824001F, // 0092 LDCONST R9 K31 + 0x5C280800, // 0093 MOVE R10 R4 + 0x7C1C0600, // 0094 CALL R7 3 + 0x7C140400, // 0095 CALL R5 2 + 0x8C140302, // 0096 GETMET R5 R1 K2 + 0x8C1C0510, // 0097 GETMET R7 R2 K16 + 0x58240012, // 0098 LDCONST R9 K18 + 0x5C280800, // 0099 MOVE R10 R4 + 0x7C1C0600, // 009A CALL R7 3 + 0x7C140400, // 009B CALL R5 2 + 0x8C140113, // 009C GETMET R5 R0 K19 + 0x581C0014, // 009D LDCONST R7 K20 + 0x8820011C, // 009E GETMBR R8 R0 K28 + 0x7C140600, // 009F CALL R5 3 + 0x8C140302, // 00A0 GETMET R5 R1 K2 + 0x8C1C0510, // 00A1 GETMET R7 R2 K16 + 0x58240016, // 00A2 LDCONST R9 K22 + 0x7C1C0400, // 00A3 CALL R7 2 + 0x7C140400, // 00A4 CALL R5 2 + 0x8C140302, // 00A5 GETMET R5 R1 K2 + 0x8C1C0510, // 00A6 GETMET R7 R2 K16 + 0x58240020, // 00A7 LDCONST R9 K32 + 0x5C280800, // 00A8 MOVE R10 R4 + 0x7C1C0600, // 00A9 CALL R7 3 + 0x7C140400, // 00AA CALL R5 2 + 0x8C140302, // 00AB GETMET R5 R1 K2 + 0x581C0021, // 00AC LDCONST R7 K33 + 0x7C140400, // 00AD CALL R5 2 + 0x8C140302, // 00AE GETMET R5 R1 K2 + 0x581C0022, // 00AF LDCONST R7 K34 + 0x7C140400, // 00B0 CALL R5 2 + 0x8C140302, // 00B1 GETMET R5 R1 K2 + 0x581C0023, // 00B2 LDCONST R7 K35 + 0x7C140400, // 00B3 CALL R5 2 + 0x80000000, // 00B4 RET 0 }) ) ); @@ -658,7 +660,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[72]) { /* constants */ + ( &(const bvalue[71]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(check_privileged_access), /* K2 */ be_nested_str_weak(string), @@ -709,32 +711,31 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ /* K47 */ be_nested_str_weak(plugins_classes), /* K48 */ be_nested_str_weak(find), /* K49 */ be_nested_str_weak(type), - /* K50 */ be_nested_str_weak(ARG), - /* K51 */ be_nested_str_weak(ARG_TYPE), - /* K52 */ be_nested_str_weak(MTR_X3A_X20unknown_X20type_X20_X3D_X20_X25s), - /* K53 */ be_const_int(2), - /* K54 */ be_nested_str_weak(MTR_X3A_X20skipping_X20parameter), - /* K55 */ be_nested_str_weak(MTR_X3A_X20config_X20_X3D_X20_X25s), - /* K56 */ be_nested_str_weak(contains), - /* K57 */ be_nested_str_weak(0), - /* K58 */ be_nested_str_weak(Missing_X20endpoint_X200), - /* K59 */ be_nested_str_weak(MTR_X3A_X20config_X20error_X20_X3D_X20_X25s), - /* K60 */ be_nested_str_weak(plugins_config), - /* K61 */ be_nested_str_weak(content_start), - /* K62 */ be_nested_str_weak(Parameter_X20error), - /* K63 */ be_nested_str_weak(content_send_style), - /* K64 */ be_nested_str_weak(content_send), - /* K65 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EError_X3A_X3C_X2Fb_X3E_X25s_X3C_X2Fp_X3E), - /* K66 */ be_nested_str_weak(html_escape), - /* K67 */ be_nested_str_weak(content_button), - /* K68 */ be_nested_str_weak(BUTTON_CONFIGURATION), - /* K69 */ be_nested_str_weak(content_stop), - /* K70 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), - /* K71 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), + /* K50 */ be_nested_str_weak(ui_string_to_conf), + /* K51 */ be_nested_str_weak(MTR_X3A_X20unknown_X20type_X20_X3D_X20_X25s), + /* K52 */ be_const_int(2), + /* K53 */ be_nested_str_weak(MTR_X3A_X20skipping_X20parameter), + /* K54 */ be_nested_str_weak(MTR_X3A_X20config_X20_X3D_X20_X25s), + /* K55 */ be_nested_str_weak(contains), + /* K56 */ be_nested_str_weak(0), + /* K57 */ be_nested_str_weak(Missing_X20endpoint_X200), + /* K58 */ be_nested_str_weak(MTR_X3A_X20config_X20error_X20_X3D_X20_X25s), + /* K59 */ be_nested_str_weak(plugins_config), + /* K60 */ be_nested_str_weak(content_start), + /* K61 */ be_nested_str_weak(Parameter_X20error), + /* K62 */ be_nested_str_weak(content_send_style), + /* K63 */ be_nested_str_weak(content_send), + /* K64 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EError_X3A_X3C_X2Fb_X3E_X25s_X3C_X2Fp_X3E), + /* K65 */ be_nested_str_weak(html_escape), + /* K66 */ be_nested_str_weak(content_button), + /* K67 */ be_nested_str_weak(BUTTON_CONFIGURATION), + /* K68 */ be_nested_str_weak(content_stop), + /* K69 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s), + /* K70 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E), }), be_str_weak(page_part_ctl), &be_const_str_solidified, - ( &(const binstruction[356]) { /* code */ + ( &(const binstruction[353]) { /* code */ 0xA4060000, // 0000 IMPORT R1 K0 0x8C080301, // 0001 GETMET R2 R1 K1 0x7C080200, // 0002 CALL R2 1 @@ -745,7 +746,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0xA40E0600, // 0007 IMPORT R3 K3 0xA4120800, // 0008 IMPORT R4 K4 0x4C140000, // 0009 LDNIL R5 - 0xA8020139, // 000A EXBLK 0 #0145 + 0xA8020136, // 000A EXBLK 0 #0142 0x8C180305, // 000B GETMET R6 R1 K5 0x58200006, // 000C LDCONST R8 K6 0x7C180400, // 000D CALL R6 2 @@ -796,7 +797,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180315, // 003A GETMET R6 R1 K21 0x58200016, // 003B LDCONST R8 K22 0x7C180400, // 003C CALL R6 2 - 0x700200F1, // 003D JMP #0130 + 0x700200EE, // 003D JMP #012D 0x8C180305, // 003E GETMET R6 R1 K5 0x58200017, // 003F LDCONST R8 K23 0x7C180400, // 0040 CALL R6 2 @@ -821,7 +822,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180315, // 0053 GETMET R6 R1 K21 0x58200016, // 0054 LDCONST R8 K22 0x7C180400, // 0055 CALL R6 2 - 0x700200D8, // 0056 JMP #0130 + 0x700200D5, // 0056 JMP #012D 0x8C180305, // 0057 GETMET R6 R1 K5 0x5820001D, // 0058 LDCONST R8 K29 0x7C180400, // 0059 CALL R6 2 @@ -846,7 +847,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180315, // 006C GETMET R6 R1 K21 0x58200016, // 006D LDCONST R8 K22 0x7C180400, // 006E CALL R6 2 - 0x700200BF, // 006F JMP #0130 + 0x700200BC, // 006F JMP #012D 0x8C180305, // 0070 GETMET R6 R1 K5 0x5820001F, // 0071 LDCONST R8 K31 0x7C180400, // 0072 CALL R6 2 @@ -889,7 +890,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C240315, // 0097 GETMET R9 R1 K21 0x582C0026, // 0098 LDCONST R11 K38 0x7C240400, // 0099 CALL R9 2 - 0x70020094, // 009A JMP #0130 + 0x70020091, // 009A JMP #012D 0x8C180305, // 009B GETMET R6 R1 K5 0x58200027, // 009C LDCONST R8 K39 0x7C180400, // 009D CALL R6 2 @@ -911,11 +912,11 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C180315, // 00AD GETMET R6 R1 K21 0x58200016, // 00AE LDCONST R8 K22 0x7C180400, // 00AF CALL R6 2 - 0x7002007E, // 00B0 JMP #0130 + 0x7002007B, // 00B0 JMP #012D 0x8C180305, // 00B1 GETMET R6 R1 K5 0x58200029, // 00B2 LDCONST R8 K41 0x7C180400, // 00B3 CALL R6 2 - 0x781A007A, // 00B4 JMPF R6 #0130 + 0x781A0077, // 00B4 JMPF R6 #012D 0x60180013, // 00B5 GETGBL R6 G19 0x7C180000, // 00B6 CALL R6 0 0xB81E1000, // 00B7 GETNGBL R7 K8 @@ -934,7 +935,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x8C240305, // 00C4 GETMET R9 R1 K5 0x002E5608, // 00C5 ADD R11 K43 R8 0x7C240400, // 00C6 CALL R9 2 - 0x78260043, // 00C7 JMPF R9 #010C + 0x78260040, // 00C7 JMPF R9 #0109 0x8C24030F, // 00C8 GETMET R9 R1 K15 0x002E5608, // 00C9 ADD R11 K43 R8 0x7C240400, // 00CA CALL R9 2 @@ -958,9 +959,9 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x5840000C, // 00DC LDCONST R16 K12 0x7C340600, // 00DD CALL R13 3 0x2034132E, // 00DE NE R13 R9 K46 - 0x7836001F, // 00DF JMPF R13 #0100 + 0x7836001C, // 00DF JMPF R13 #00FD 0x2034172E, // 00E0 NE R13 R11 K46 - 0x7836001D, // 00E1 JMPF R13 #0100 + 0x7836001A, // 00E1 JMPF R13 #00FD 0x8834010D, // 00E2 GETMBR R13 R0 K13 0x88341B2F, // 00E3 GETMBR R13 R13 K47 0x8C341B30, // 00E4 GETMET R13 R13 K48 @@ -968,129 +969,126 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */ 0x7C340400, // 00E6 CALL R13 2 0x4C380000, // 00E7 LDNIL R14 0x20381A0E, // 00E8 NE R14 R13 R14 - 0x783A000C, // 00E9 JMPF R14 #00F7 + 0x783A0009, // 00E9 JMPF R14 #00F4 0x60380013, // 00EA GETGBL R14 G19 0x7C380000, // 00EB CALL R14 0 0x983A620B, // 00EC SETIDX R14 K49 R11 - 0x883C1B32, // 00ED GETMBR R15 R13 K50 - 0x88401B33, // 00EE GETMBR R16 R13 K51 - 0x78320004, // 00EF JMPF R12 #00F5 - 0x783E0003, // 00F0 JMPF R15 #00F5 - 0x5C442000, // 00F1 MOVE R17 R16 - 0x5C481800, // 00F2 MOVE R18 R12 - 0x7C440200, // 00F3 CALL R17 1 - 0x98381E11, // 00F4 SETIDX R14 R15 R17 - 0x9818120E, // 00F5 SETIDX R6 R9 R14 - 0x70020007, // 00F6 JMP #00FF - 0xB83A1000, // 00F7 GETNGBL R14 K8 - 0x8C381D09, // 00F8 GETMET R14 R14 K9 - 0x8C40050A, // 00F9 GETMET R16 R2 K10 - 0x58480034, // 00FA LDCONST R18 K52 - 0x5C4C1600, // 00FB MOVE R19 R11 - 0x7C400600, // 00FC CALL R16 3 - 0x58440035, // 00FD LDCONST R17 K53 - 0x7C380600, // 00FE CALL R14 3 - 0x70020004, // 00FF JMP #0105 - 0xB8361000, // 0100 GETNGBL R13 K8 - 0x8C341B09, // 0101 GETMET R13 R13 K9 - 0x583C0036, // 0102 LDCONST R15 K54 - 0x58400035, // 0103 LDCONST R16 K53 - 0x7C340600, // 0104 CALL R13 3 - 0x001C0F25, // 0105 ADD R7 R7 K37 - 0x8C34050A, // 0106 GETMET R13 R2 K10 - 0x583C002A, // 0107 LDCONST R15 K42 - 0x5C400E00, // 0108 MOVE R16 R7 - 0x7C340600, // 0109 CALL R13 3 - 0x5C201A00, // 010A MOVE R8 R13 - 0x7001FFB7, // 010B JMP #00C4 - 0xB8261000, // 010C GETNGBL R9 K8 - 0x8C241309, // 010D GETMET R9 R9 K9 - 0x8C2C050A, // 010E GETMET R11 R2 K10 - 0x58340037, // 010F LDCONST R13 K55 - 0x60380008, // 0110 GETGBL R14 G8 - 0x5C3C0C00, // 0111 MOVE R15 R6 - 0x7C380200, // 0112 CALL R14 1 - 0x7C2C0600, // 0113 CALL R11 3 - 0x5830000C, // 0114 LDCONST R12 K12 - 0x7C240600, // 0115 CALL R9 3 - 0x8C240D38, // 0116 GETMET R9 R6 K56 - 0x582C0039, // 0117 LDCONST R11 K57 - 0x7C240400, // 0118 CALL R9 2 - 0x74260000, // 0119 JMPT R9 #011B - 0x5814003A, // 011A LDCONST R5 K58 - 0x78160008, // 011B JMPF R5 #0125 - 0xB8261000, // 011C GETNGBL R9 K8 - 0x8C241309, // 011D GETMET R9 R9 K9 - 0x8C2C050A, // 011E GETMET R11 R2 K10 - 0x5834003B, // 011F LDCONST R13 K59 - 0x5C380A00, // 0120 MOVE R14 R5 - 0x7C2C0600, // 0121 CALL R11 3 - 0x5830000C, // 0122 LDCONST R12 K12 - 0x7C240600, // 0123 CALL R9 3 - 0x7002000A, // 0124 JMP #0130 - 0x8824010D, // 0125 GETMBR R9 R0 K13 - 0x90267806, // 0126 SETMBR R9 K60 R6 + 0x8C3C1B32, // 00ED GETMET R15 R13 K50 + 0x5C441A00, // 00EE MOVE R17 R13 + 0x5C481C00, // 00EF MOVE R18 R14 + 0x5C4C1800, // 00F0 MOVE R19 R12 + 0x7C3C0800, // 00F1 CALL R15 4 + 0x9818120E, // 00F2 SETIDX R6 R9 R14 + 0x70020007, // 00F3 JMP #00FC + 0xB83A1000, // 00F4 GETNGBL R14 K8 + 0x8C381D09, // 00F5 GETMET R14 R14 K9 + 0x8C40050A, // 00F6 GETMET R16 R2 K10 + 0x58480033, // 00F7 LDCONST R18 K51 + 0x5C4C1600, // 00F8 MOVE R19 R11 + 0x7C400600, // 00F9 CALL R16 3 + 0x58440034, // 00FA LDCONST R17 K52 + 0x7C380600, // 00FB CALL R14 3 + 0x70020004, // 00FC JMP #0102 + 0xB8361000, // 00FD GETNGBL R13 K8 + 0x8C341B09, // 00FE GETMET R13 R13 K9 + 0x583C0035, // 00FF LDCONST R15 K53 + 0x58400034, // 0100 LDCONST R16 K52 + 0x7C340600, // 0101 CALL R13 3 + 0x001C0F25, // 0102 ADD R7 R7 K37 + 0x8C34050A, // 0103 GETMET R13 R2 K10 + 0x583C002A, // 0104 LDCONST R15 K42 + 0x5C400E00, // 0105 MOVE R16 R7 + 0x7C340600, // 0106 CALL R13 3 + 0x5C201A00, // 0107 MOVE R8 R13 + 0x7001FFBA, // 0108 JMP #00C4 + 0xB8261000, // 0109 GETNGBL R9 K8 + 0x8C241309, // 010A GETMET R9 R9 K9 + 0x8C2C050A, // 010B GETMET R11 R2 K10 + 0x58340036, // 010C LDCONST R13 K54 + 0x60380008, // 010D GETGBL R14 G8 + 0x5C3C0C00, // 010E MOVE R15 R6 + 0x7C380200, // 010F CALL R14 1 + 0x7C2C0600, // 0110 CALL R11 3 + 0x5830000C, // 0111 LDCONST R12 K12 + 0x7C240600, // 0112 CALL R9 3 + 0x8C240D37, // 0113 GETMET R9 R6 K55 + 0x582C0038, // 0114 LDCONST R11 K56 + 0x7C240400, // 0115 CALL R9 2 + 0x74260000, // 0116 JMPT R9 #0118 + 0x58140039, // 0117 LDCONST R5 K57 + 0x78160008, // 0118 JMPF R5 #0122 + 0xB8261000, // 0119 GETNGBL R9 K8 + 0x8C241309, // 011A GETMET R9 R9 K9 + 0x8C2C050A, // 011B GETMET R11 R2 K10 + 0x5834003A, // 011C LDCONST R13 K58 + 0x5C380A00, // 011D MOVE R14 R5 + 0x7C2C0600, // 011E CALL R11 3 + 0x5830000C, // 011F LDCONST R12 K12 + 0x7C240600, // 0120 CALL R9 3 + 0x7002000A, // 0121 JMP #012D + 0x8824010D, // 0122 GETMBR R9 R0 K13 + 0x90267606, // 0123 SETMBR R9 K59 R6 + 0x8824010D, // 0124 GETMBR R9 R0 K13 + 0x50280200, // 0125 LDBOOL R10 1 0 + 0x9026500A, // 0126 SETMBR R9 K40 R10 0x8824010D, // 0127 GETMBR R9 R0 K13 - 0x50280200, // 0128 LDBOOL R10 1 0 - 0x9026500A, // 0129 SETMBR R9 K40 R10 - 0x8824010D, // 012A GETMBR R9 R0 K13 - 0x8C241314, // 012B GETMET R9 R9 K20 - 0x7C240200, // 012C CALL R9 1 - 0x8C240315, // 012D GETMET R9 R1 K21 - 0x582C0016, // 012E LDCONST R11 K22 - 0x7C240400, // 012F CALL R9 2 - 0x78160011, // 0130 JMPF R5 #0143 - 0x8C18033D, // 0131 GETMET R6 R1 K61 - 0x5820003E, // 0132 LDCONST R8 K62 - 0x7C180400, // 0133 CALL R6 2 - 0x8C18033F, // 0134 GETMET R6 R1 K63 - 0x7C180200, // 0135 CALL R6 1 - 0x8C180340, // 0136 GETMET R6 R1 K64 - 0x8C20050A, // 0137 GETMET R8 R2 K10 - 0x58280041, // 0138 LDCONST R10 K65 - 0x8C2C0342, // 0139 GETMET R11 R1 K66 - 0x5C340A00, // 013A MOVE R13 R5 - 0x7C2C0400, // 013B CALL R11 2 - 0x7C200600, // 013C CALL R8 3 + 0x8C241314, // 0128 GETMET R9 R9 K20 + 0x7C240200, // 0129 CALL R9 1 + 0x8C240315, // 012A GETMET R9 R1 K21 + 0x582C0016, // 012B LDCONST R11 K22 + 0x7C240400, // 012C CALL R9 2 + 0x78160011, // 012D JMPF R5 #0140 + 0x8C18033C, // 012E GETMET R6 R1 K60 + 0x5820003D, // 012F LDCONST R8 K61 + 0x7C180400, // 0130 CALL R6 2 + 0x8C18033E, // 0131 GETMET R6 R1 K62 + 0x7C180200, // 0132 CALL R6 1 + 0x8C18033F, // 0133 GETMET R6 R1 K63 + 0x8C20050A, // 0134 GETMET R8 R2 K10 + 0x58280040, // 0135 LDCONST R10 K64 + 0x8C2C0341, // 0136 GETMET R11 R1 K65 + 0x5C340A00, // 0137 MOVE R13 R5 + 0x7C2C0400, // 0138 CALL R11 2 + 0x7C200600, // 0139 CALL R8 3 + 0x7C180400, // 013A CALL R6 2 + 0x8C180342, // 013B GETMET R6 R1 K66 + 0x88200343, // 013C GETMBR R8 R1 K67 0x7C180400, // 013D CALL R6 2 - 0x8C180343, // 013E GETMET R6 R1 K67 - 0x88200344, // 013F GETMBR R8 R1 K68 - 0x7C180400, // 0140 CALL R6 2 - 0x8C180345, // 0141 GETMET R6 R1 K69 - 0x7C180200, // 0142 CALL R6 1 - 0xA8040001, // 0143 EXBLK 1 1 - 0x7002001D, // 0144 JMP #0163 - 0xAC180002, // 0145 CATCH R6 0 2 - 0x7002001A, // 0146 JMP #0162 - 0xB8221000, // 0147 GETNGBL R8 K8 - 0x8C201109, // 0148 GETMET R8 R8 K9 - 0x8C28050A, // 0149 GETMET R10 R2 K10 - 0x58300046, // 014A LDCONST R12 K70 - 0x5C340C00, // 014B MOVE R13 R6 - 0x5C380E00, // 014C MOVE R14 R7 - 0x7C280800, // 014D CALL R10 4 - 0x582C0035, // 014E LDCONST R11 K53 - 0x7C200600, // 014F CALL R8 3 - 0x8C20033D, // 0150 GETMET R8 R1 K61 - 0x5828003E, // 0151 LDCONST R10 K62 - 0x7C200400, // 0152 CALL R8 2 - 0x8C20033F, // 0153 GETMET R8 R1 K63 - 0x7C200200, // 0154 CALL R8 1 - 0x8C200340, // 0155 GETMET R8 R1 K64 - 0x8C28050A, // 0156 GETMET R10 R2 K10 - 0x58300047, // 0157 LDCONST R12 K71 - 0x5C340C00, // 0158 MOVE R13 R6 - 0x5C380E00, // 0159 MOVE R14 R7 - 0x7C280800, // 015A CALL R10 4 + 0x8C180344, // 013E GETMET R6 R1 K68 + 0x7C180200, // 013F CALL R6 1 + 0xA8040001, // 0140 EXBLK 1 1 + 0x7002001D, // 0141 JMP #0160 + 0xAC180002, // 0142 CATCH R6 0 2 + 0x7002001A, // 0143 JMP #015F + 0xB8221000, // 0144 GETNGBL R8 K8 + 0x8C201109, // 0145 GETMET R8 R8 K9 + 0x8C28050A, // 0146 GETMET R10 R2 K10 + 0x58300045, // 0147 LDCONST R12 K69 + 0x5C340C00, // 0148 MOVE R13 R6 + 0x5C380E00, // 0149 MOVE R14 R7 + 0x7C280800, // 014A CALL R10 4 + 0x582C0034, // 014B LDCONST R11 K52 + 0x7C200600, // 014C CALL R8 3 + 0x8C20033C, // 014D GETMET R8 R1 K60 + 0x5828003D, // 014E LDCONST R10 K61 + 0x7C200400, // 014F CALL R8 2 + 0x8C20033E, // 0150 GETMET R8 R1 K62 + 0x7C200200, // 0151 CALL R8 1 + 0x8C20033F, // 0152 GETMET R8 R1 K63 + 0x8C28050A, // 0153 GETMET R10 R2 K10 + 0x58300046, // 0154 LDCONST R12 K70 + 0x5C340C00, // 0155 MOVE R13 R6 + 0x5C380E00, // 0156 MOVE R14 R7 + 0x7C280800, // 0157 CALL R10 4 + 0x7C200400, // 0158 CALL R8 2 + 0x8C200342, // 0159 GETMET R8 R1 K66 + 0x88280343, // 015A GETMBR R10 R1 K67 0x7C200400, // 015B CALL R8 2 - 0x8C200343, // 015C GETMET R8 R1 K67 - 0x88280344, // 015D GETMBR R10 R1 K68 - 0x7C200400, // 015E CALL R8 2 - 0x8C200345, // 015F GETMET R8 R1 K69 - 0x7C200200, // 0160 CALL R8 1 - 0x70020000, // 0161 JMP #0163 - 0xB0080000, // 0162 RAISE 2 R0 R0 - 0x80000000, // 0163 RET 0 + 0x8C200344, // 015C GETMET R8 R1 K68 + 0x7C200200, // 015D CALL R8 1 + 0x70020000, // 015E JMP #0160 + 0xB0080000, // 015F RAISE 2 R0 R0 + 0x80000000, // 0160 RET 0 }) ) ); @@ -1318,7 +1316,7 @@ be_local_closure(Matter_UI_plugin_option, /* name */ 0, /* has sup protos */ NULL, /* no sub protos */ 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ + ( &(const bvalue[16]) { /* constants */ /* K0 */ be_nested_str_weak(webserver), /* K1 */ be_nested_str_weak(string), /* K2 */ be_nested_str_weak(split), @@ -1327,16 +1325,18 @@ be_local_closure(Matter_UI_plugin_option, /* name */ /* K5 */ be_nested_str_weak(), /* K6 */ be_nested_str_weak(content_send), /* K7 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X3E_X3C_X2Foption_X3E), - /* K8 */ be_nested_str_weak(device), - /* K9 */ be_nested_str_weak(get_plugin_class_displayname), - /* K10 */ be_nested_str_weak(format), - /* K11 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E), - /* K12 */ be_nested_str_weak(_X20selected), - /* K13 */ be_const_int(1), + /* K8 */ be_nested_str_weak(_X2Dhttp), + /* K9 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X27_X20disabled_X3E_X2D_X2D_X2D_X20Tasmota_X20Remote_X20_X2D_X2D_X2D_X3C_X2Foption_X3E), + /* K10 */ be_nested_str_weak(device), + /* K11 */ be_nested_str_weak(get_plugin_class_displayname), + /* K12 */ be_nested_str_weak(format), + /* K13 */ be_nested_str_weak(_X3Coption_X20value_X3D_X27_X25s_X27_X25s_X3E_X25s_X3C_X2Foption_X3E), + /* K14 */ be_nested_str_weak(_X20selected), + /* K15 */ be_const_int(1), }), be_str_weak(plugin_option), &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ + ( &(const binstruction[48]) { /* code */ 0xA40E0000, // 0000 IMPORT R3 K0 0xA4120200, // 0001 IMPORT R4 K1 0x780A0004, // 0002 JMPF R2 #0008 @@ -1352,33 +1352,39 @@ be_local_closure(Matter_UI_plugin_option, /* name */ 0x5C200A00, // 000C MOVE R8 R5 0x7C1C0200, // 000D CALL R7 1 0x141C0C07, // 000E LT R7 R6 R7 - 0x781E0018, // 000F JMPF R7 #0029 + 0x781E001E, // 000F JMPF R7 #002F 0x941C0A06, // 0010 GETIDX R7 R5 R6 0x1C200F05, // 0011 EQ R8 R7 K5 0x78220003, // 0012 JMPF R8 #0017 0x8C200706, // 0013 GETMET R8 R3 K6 0x58280007, // 0014 LDCONST R10 K7 0x7C200400, // 0015 CALL R8 2 - 0x7002000F, // 0016 JMP #0027 - 0x88200108, // 0017 GETMBR R8 R0 K8 - 0x8C201109, // 0018 GETMET R8 R8 K9 - 0x5C280E00, // 0019 MOVE R10 R7 - 0x7C200400, // 001A CALL R8 2 - 0x8C240706, // 001B GETMET R9 R3 K6 - 0x8C2C090A, // 001C GETMET R11 R4 K10 - 0x5834000B, // 001D LDCONST R13 K11 - 0x5C380E00, // 001E MOVE R14 R7 - 0x1C3C0E01, // 001F EQ R15 R7 R1 - 0x783E0001, // 0020 JMPF R15 #0023 - 0x583C000C, // 0021 LDCONST R15 K12 - 0x70020000, // 0022 JMP #0024 - 0x583C0005, // 0023 LDCONST R15 K5 - 0x5C401000, // 0024 MOVE R16 R8 - 0x7C2C0A00, // 0025 CALL R11 5 - 0x7C240400, // 0026 CALL R9 2 - 0x00180D0D, // 0027 ADD R6 R6 K13 - 0x7001FFE1, // 0028 JMP #000B - 0x80000000, // 0029 RET 0 + 0x70020015, // 0016 JMP #002D + 0x1C200F08, // 0017 EQ R8 R7 K8 + 0x78220003, // 0018 JMPF R8 #001D + 0x8C200706, // 0019 GETMET R8 R3 K6 + 0x58280009, // 001A LDCONST R10 K9 + 0x7C200400, // 001B CALL R8 2 + 0x7002000F, // 001C JMP #002D + 0x8820010A, // 001D GETMBR R8 R0 K10 + 0x8C20110B, // 001E GETMET R8 R8 K11 + 0x5C280E00, // 001F MOVE R10 R7 + 0x7C200400, // 0020 CALL R8 2 + 0x8C240706, // 0021 GETMET R9 R3 K6 + 0x8C2C090C, // 0022 GETMET R11 R4 K12 + 0x5834000D, // 0023 LDCONST R13 K13 + 0x5C380E00, // 0024 MOVE R14 R7 + 0x1C3C0E01, // 0025 EQ R15 R7 R1 + 0x783E0001, // 0026 JMPF R15 #0029 + 0x583C000E, // 0027 LDCONST R15 K14 + 0x70020000, // 0028 JMP #002A + 0x583C0005, // 0029 LDCONST R15 K5 + 0x5C401000, // 002A MOVE R16 R8 + 0x7C2C0A00, // 002B CALL R11 5 + 0x7C240400, // 002C CALL R9 2 + 0x00180D0F, // 002D ADD R6 R6 K15 + 0x7001FFDB, // 002E JMP #000B + 0x80000000, // 002F RET 0 }) ) ); @@ -1792,7 +1798,7 @@ be_local_class(Matter_UI, be_nested_map(17, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_weak(show_plugins_configuration, -1), be_const_closure(Matter_UI_show_plugins_configuration_closure) }, - { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity) }, + { be_const_key_weak(_CLASSES_TYPES, 2), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7C_X2Dhttp_X7Chttp_relay) }, { be_const_key_weak(show_fabric_info, 7), be_const_closure(Matter_UI_show_fabric_info_closure) }, { be_const_key_weak(init, -1), be_const_closure(Matter_UI_init_closure) }, { be_const_key_weak(web_add_handler, -1), be_const_closure(Matter_UI_web_add_handler_closure) }, diff --git a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino index 842d8804a..56588d339 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_52_3_berry_tasmota.ino @@ -198,7 +198,7 @@ extern "C" { be_map_insert_int(vm, "frag", ESP_getHeapFragmentation()); // give info about stack size be_map_insert_int(vm, "stack_size", SET_ESP32_STACK_SIZE / 1024); - be_map_insert_int(vm, "stack_low", uxTaskGetStackHighWaterMark(nullptr) / 1024); + be_map_insert_real(vm, "stack_low", ((float)uxTaskGetStackHighWaterMark(nullptr)) / 1024); if (UsePSRAM()) { be_map_insert_int(vm, "psram", ESP.getPsramSize() / 1024); be_map_insert_int(vm, "psram_free", ESP.getFreePsram() / 1024);