From 0bcb9815566edd0e9848bdf1bc7f5771d9942c98 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Wed, 5 Jun 2024 23:13:48 +0200 Subject: [PATCH] Matter refactoring of bridged devices (#21575) --- CHANGELOG.md | 1 + .../berry_matter/src/be_matter_module.c | 36 +- .../src/embedded/Matter_HTTP_remote.be | 77 +- .../src/embedded/Matter_Plugin_0.be | 5 +- .../src/embedded/Matter_Plugin_1_Device.be | 227 +- .../embedded/Matter_Plugin_2_Bridge_HTTP.be | 296 --- ...n_2_OnOff.be => Matter_Plugin_2_Light0.be} | 101 +- .../src/embedded/Matter_Plugin_2_Light1.be | 136 +- .../src/embedded/Matter_Plugin_2_Sensor.be | 59 + .../Matter_Plugin_2_Sensor_Contact.be | 43 +- .../Matter_Plugin_2_Sensor_Occupancy.be | 44 +- .../embedded/Matter_Plugin_2_Sensor_OnOff.be | 2 +- .../Matter_Plugin_2_Sensor_Waterleak.be | 50 +- .../embedded/Matter_Plugin_3_Bridge_Light0.be | 156 -- .../embedded/Matter_Plugin_3_Bridge_Sensor.be | 122 - .../Matter_Plugin_3_Bridge_Sensor_Contact.be | 110 - ...Matter_Plugin_3_Bridge_Sensor_Occupancy.be | 114 - ...Matter_Plugin_3_Bridge_Sensor_Waterleak.be | 110 - .../src/embedded/Matter_Plugin_3_Light2.be | 72 +- .../src/embedded/Matter_Plugin_3_Light3.be | 91 +- ...n_3_Light0.be => Matter_Plugin_3_OnOff.be} | 18 +- .../embedded/Matter_Plugin_3_Sensor_Flow.be | 15 + .../Matter_Plugin_3_Sensor_Humidity.be | 16 + .../Matter_Plugin_3_Sensor_Illuminance.be | 16 + .../Matter_Plugin_3_Sensor_Pressure.be | 16 + .../embedded/Matter_Plugin_3_Sensor_Temp.be | 30 +- .../embedded/Matter_Plugin_4_Bridge_Light1.be | 184 -- .../Matter_Plugin_4_Bridge_Sensor_Flow.be | 70 - .../Matter_Plugin_4_Bridge_Sensor_Humidity.be | 70 - ...tter_Plugin_4_Bridge_Sensor_Illuminance.be | 77 - .../Matter_Plugin_4_Bridge_Sensor_Pressure.be | 70 - .../Matter_Plugin_4_Bridge_Sensor_Temp.be | 73 - .../embedded/Matter_Plugin_5_Bridge_Light2.be | 155 -- .../embedded/Matter_Plugin_5_Bridge_Light3.be | 176 -- .../embedded/Matter_Plugin_8_Bridge_Light0.be | 32 + .../embedded/Matter_Plugin_8_Bridge_Light1.be | 34 + .../embedded/Matter_Plugin_8_Bridge_Light2.be | 34 + .../embedded/Matter_Plugin_8_Bridge_Light3.be | 34 + ...Off.be => Matter_Plugin_8_Bridge_OnOff.be} | 0 ...ter_Plugin_8_Bridge_Sensor_Air_Quality.be} | 79 +- .../Matter_Plugin_8_Bridge_Sensor_Contact.be | 36 + .../Matter_Plugin_8_Bridge_Sensor_Flow.be | 30 + .../Matter_Plugin_8_Bridge_Sensor_Humidity.be | 30 + ...tter_Plugin_8_Bridge_Sensor_Illuminance.be | 30 + ...Matter_Plugin_8_Bridge_Sensor_Occupancy.be | 36 + .../Matter_Plugin_8_Bridge_Sensor_Pressure.be | 30 + .../Matter_Plugin_8_Bridge_Sensor_Temp.be | 30 + ...Matter_Plugin_8_Bridge_Sensor_Waterleak.be | 32 + .../embedded/Matter_Plugin_9_Virt_Light0.be | 1 - .../embedded/Matter_Plugin_9_Virt_Light1.be | 1 - .../embedded/Matter_Plugin_9_Virt_Light2.be | 1 - .../embedded/Matter_Plugin_9_Virt_Light3.be | 1 - .../embedded/Matter_Plugin_9_Virt_OnOff.be | 1 - ...Matter_Plugin_9_Virt_Sensor_Air_Quality.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Contact.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Flow.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Humidity.be | 1 - ...Matter_Plugin_9_Virt_Sensor_Illuminance.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Occupancy.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Pressure.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Temp.be | 1 - .../Matter_Plugin_9_Virt_Sensor_Waterleak.be | 1 - .../berry_matter/src/embedded/Matter_UI.be | 26 +- .../solidify/solidified_Matter_HTTP_remote.h | 1538 ++++++------ .../src/solidify/solidified_Matter_Plugin_0.h | 2068 +++++++++-------- .../solidified_Matter_Plugin_1_Device.h | 1237 ++++++++-- .../solidified_Matter_Plugin_2_Bridge_HTTP.h | 934 -------- ....h => solidified_Matter_Plugin_2_Light0.h} | 855 ++++--- .../solidified_Matter_Plugin_2_Light1.h | 1332 ++++++----- .../solidified_Matter_Plugin_2_Sensor.h | 591 +++-- ...olidified_Matter_Plugin_2_Sensor_Contact.h | 581 +++-- ...idified_Matter_Plugin_2_Sensor_Occupancy.h | 681 +++--- .../solidified_Matter_Plugin_2_Sensor_OnOff.h | 2 +- ...idified_Matter_Plugin_2_Sensor_Waterleak.h | 450 ++-- ...solidified_Matter_Plugin_3_Bridge_Light0.h | 574 ----- ...solidified_Matter_Plugin_3_Bridge_Sensor.h | 315 --- ...atter_Plugin_3_Bridge_Sensor_Air_Quality.h | 404 ---- ...ed_Matter_Plugin_3_Bridge_Sensor_Contact.h | 431 ---- ..._Matter_Plugin_3_Bridge_Sensor_Occupancy.h | 452 ---- ..._Matter_Plugin_3_Bridge_Sensor_Waterleak.h | 431 ---- .../solidified_Matter_Plugin_3_Light2.h | 789 ++++--- .../solidified_Matter_Plugin_3_Light3.h | 790 +++++-- ...0.h => solidified_Matter_Plugin_3_OnOff.h} | 20 +- .../solidified_Matter_Plugin_3_Sensor_Flow.h | 57 +- ...lidified_Matter_Plugin_3_Sensor_Humidity.h | 65 +- ...ified_Matter_Plugin_3_Sensor_Illuminance.h | 57 +- ...lidified_Matter_Plugin_3_Sensor_Pressure.h | 57 +- .../solidified_Matter_Plugin_3_Sensor_Temp.h | 110 +- ...solidified_Matter_Plugin_4_Bridge_Light1.h | 648 ------ ...ified_Matter_Plugin_4_Bridge_Sensor_Flow.h | 229 -- ...d_Matter_Plugin_4_Bridge_Sensor_Humidity.h | 237 -- ...atter_Plugin_4_Bridge_Sensor_Illuminance.h | 241 -- ...d_Matter_Plugin_4_Bridge_Sensor_Pressure.h | 228 -- ...ified_Matter_Plugin_4_Bridge_Sensor_Temp.h | 249 -- ...solidified_Matter_Plugin_5_Bridge_Light2.h | 550 ----- ...solidified_Matter_Plugin_5_Bridge_Light3.h | 699 ------ ...solidified_Matter_Plugin_8_Bridge_Light0.h | 25 + ...solidified_Matter_Plugin_8_Bridge_Light1.h | 54 + ...solidified_Matter_Plugin_8_Bridge_Light2.h | 54 + ...solidified_Matter_Plugin_8_Bridge_Light3.h | 54 + ...solidified_Matter_Plugin_8_Bridge_OnOff.h} | 2 +- ...atter_Plugin_8_Bridge_Sensor_Air_Quality.h | 167 ++ ...ed_Matter_Plugin_8_Bridge_Sensor_Contact.h | 26 + ...ified_Matter_Plugin_8_Bridge_Sensor_Flow.h | 24 + ...d_Matter_Plugin_8_Bridge_Sensor_Humidity.h | 24 + ...atter_Plugin_8_Bridge_Sensor_Illuminance.h | 24 + ..._Matter_Plugin_8_Bridge_Sensor_Occupancy.h | 26 + ...d_Matter_Plugin_8_Bridge_Sensor_Pressure.h | 24 + ...ified_Matter_Plugin_8_Bridge_Sensor_Temp.h | 24 + ..._Matter_Plugin_8_Bridge_Sensor_Waterleak.h | 26 + .../src/solidify/solidified_Matter_UI.h | 230 +- .../solidify/solidified_Matter_zz_Device.h | 22 +- 112 files changed, 8951 insertions(+), 13102 deletions(-) delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Bridge_HTTP.be rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_2_OnOff.be => Matter_Plugin_2_Light0.be} (61%) delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Light0.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Contact.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Occupancy.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Waterleak.be rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_3_Light0.be => Matter_Plugin_3_OnOff.be} (69%) delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Light1.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be delete mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light0.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light1.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light2.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light3.be rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_4_Bridge_OnOff.be => Matter_Plugin_8_Bridge_OnOff.be} (100%) rename lib/libesp32/berry_matter/src/embedded/{Matter_Plugin_3_Bridge_Sensor_Air_Quality.be => Matter_Plugin_8_Bridge_Sensor_Air_Quality.be} (55%) create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Contact.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Flow.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Humidity.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Illuminance.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Occupancy.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Pressure.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Temp.be create mode 100644 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Waterleak.be delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_2_OnOff.h => solidified_Matter_Plugin_2_Light0.h} (54%) delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Light0.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_3_Light0.h => solidified_Matter_Plugin_3_OnOff.h} (73%) delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Light1.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h delete mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light0.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light1.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light2.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light3.h rename lib/libesp32/berry_matter/src/solidify/{solidified_Matter_Plugin_4_Bridge_OnOff.h => solidified_Matter_Plugin_8_Bridge_OnOff.h} (98%) create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h create mode 100644 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h diff --git a/CHANGELOG.md b/CHANGELOG.md index 88c52a8ba..e1561c8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file. ### Breaking Changed ### Changed +- Matter refactoring of bridged devices ### Fixed - Berry `input()` returns empty string and does not crash diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c index c87cb24ee..38659c774 100644 --- a/lib/libesp32/berry_matter/src/be_matter_module.c +++ b/lib/libesp32/berry_matter/src/be_matter_module.c @@ -227,11 +227,11 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_1_Root.h" #include "solidify/solidified_Matter_Plugin_1_Aggregator.h" #include "solidify/solidified_Matter_Plugin_1_Device.h" -#include "solidify/solidified_Matter_Plugin_2_OnOff.h" +#include "solidify/solidified_Matter_Plugin_3_OnOff.h" #include "solidify/solidified_Matter_Plugin_9_Virt_OnOff.h" #include "solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h" -#include "solidify/solidified_Matter_Plugin_3_Light0.h" +#include "solidify/solidified_Matter_Plugin_2_Light0.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Light0.h" #include "solidify/solidified_Matter_Plugin_2_Light1.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Light1.h" @@ -259,22 +259,20 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Contact.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Occupancy.h" #include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h" -#include "solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_OnOff.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Light0.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Light1.h" -#include "solidify/solidified_Matter_Plugin_5_Bridge_Light2.h" -#include "solidify/solidified_Matter_Plugin_5_Bridge_Light3.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h" -#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h" -#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Light0.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Light1.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Light2.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Light3.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h" +#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_z_All.h" #include "solidify/solidified_Matter_zz_Device.h" @@ -462,7 +460,7 @@ module matter (scope: global, strings: weak) { // Plugins - only the core classes, all others are taken from `matter_device.plugins_classes` Plugin_Root, class(be_class_Matter_Plugin_Root) // Generic behavior common to all devices Plugin_Aggregator, class(be_class_Matter_Plugin_Aggregator) // Aggregator - Plugin_Bridge_HTTP, class(be_class_Matter_Plugin_Bridge_HTTP) // HTTP bridge superclass + Plugin_Device, class(be_class_Matter_Plugin_Device) // Device } @const_object_info_end */ diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be index b466dc83d..854fb820a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_HTTP_remote.be @@ -49,6 +49,23 @@ class Matter_HTTP_remote : Matter_HTTP_async # `nil` if current request is synchronous var reachable # is the device reachable var reachable_utc # last tick when the reachability was seen (avoids sending superfluous ping commands) + + static var STATUS_PREFIX = [ + "Status", # 0 + "StatusPRM", # 1 + "StatusFWR", # 2 + "StatusLOG", # 3 + "StatusMEM", # 4 + "StatusNET", # 5 + "StatusMQT", # 6 + "StatusTIM", # 7 + nil, # 8 is deprecated and synonym of 10 + "StatusPTH", # 9 + "StatusSNS", # 10 + "StatusSTS", # 11 + "StatusSTK", # 12 + "StatusSHT" # 13 + ] # information gathered about the remote device (name, version...) static var UPDATE_TIME = 5000 # update every 5s until first response @@ -73,9 +90,9 @@ class Matter_HTTP_remote : Matter_HTTP_async self.info = {} if self.device # we need different callbacks per command (don't create a single one for both calls) - self.add_schedule(self.UPDATE_CMD0, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd)) - self.add_schedule(self.UPDATE_CMD2, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd)) - self.add_schedule(self.UPDATE_CMD5, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd)) + self.add_schedule(self.UPDATE_CMD0, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http)) + self.add_schedule(self.UPDATE_CMD2, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http)) + self.add_schedule(self.UPDATE_CMD5, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http)) end end @@ -87,28 +104,40 @@ class Matter_HTTP_remote : Matter_HTTP_async ############################################################# # parse response for `Status` and `Status 2` - def parse_status_response(status, payload, cmd) + # + # Payload can be a string (unparsed) or a map + def parse_status_response_and_call_method(status, payload, cmd, obj, method) if status != nil && status > 0 # device is known to be reachable self.device_is_alive(true) - import json - var j = json.load(payload) - var code = nil # index of Status - if j - # filter - if j.contains("Status") # Status 0 (actually `Status` wihtout any number) - j = j["Status"] - code = 0 - elif j.contains("StatusFWR") # Status 2 - j = j["StatusFWR"] - code = 2 - elif j.contains("StatusNET") # Status 5 - j = j["StatusNET"] - code = 5 + var j = payload + if type(j) == 'string' + import json + j = json.load(j) + end + var code = nil # index of Status, nil of none + if j != nil + + # detect any Status prefix and compute Status + var i = 0 + var prefix_tab = self.STATUS_PREFIX # move to local variable to avoid many dereferencing + while i < size(prefix_tab) + var status_prefix = prefix_tab[i] + if status_prefix != nil + if j.contains(status_prefix) + j = j[status_prefix] + code = i + break + end + end + i = i + 1 end - # convert to shadow values - self.parse_update(j, code) # call parser + + # dispatch to method in charge of converting to shadow values + method(obj, j, code) + else + tasmota.log(f"MTR: *** failed to parse JSON response {payload=}", 3) end end end @@ -116,8 +145,8 @@ class Matter_HTTP_remote : Matter_HTTP_async ############################################################# # Stub for updating shadow values (local copies of what we published to the Matter gateway) # - # This call is synnchronous and blocking. - def parse_update(data, index) + # This call is synchronous and blocking. + def parse_status_http(data, index) var changed = false if index == 0 # Status var device_name = data.find("DeviceName") # we consider 'Tasmota' as the non-information default @@ -254,7 +283,7 @@ class Matter_HTTP_remote : Matter_HTTP_async self.current_cmd = cmd var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+') - tasmota.log(format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 3) + tasmota.log(format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 4) var ret = self.begin(cmd_url) end @@ -273,7 +302,7 @@ class Matter_HTTP_remote : Matter_HTTP_async self.current_cmd = nil var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+') - tasmota.log(format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 3) + tasmota.log(format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 4) var ret = super(self).begin_sync(cmd_url, timeout) var payload_short = (ret) ? ret : 'nil' if size(payload_short) > 30 payload_short = payload_short[0..29] + '...' end diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be index 8f89f7d3f..28716b38a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_0.be @@ -34,6 +34,7 @@ class Matter_Plugin # Behavior of the plugin, frequency at which `update_shadow()` is called static var UPDATE_TIME = 5000 # default is every 5 seconds static var VIRTUAL = false # set to true only for virtual devices + static var BRIDGE = false # set to true only for bridged devices (ESP8266 or OpenBK) var update_next # next timestamp for update # Configuration of the plugin: clusters and type static var CLUSTERS = matter.consolidate_clusters(_class, { @@ -143,14 +144,14 @@ class Matter_Plugin # Returns true if it's a local device, or false for a # remotely device controlled via HTTP def is_local_device() - return true + return !(self.BRIDGE) end ############################################################# # Stub for updating shadow values (local copies of what we published to the Matter gateway) # # This method should collect the data from the local or remote device - # and call `parse_update()` when data is available. + # and call `parse_status()` when data is available. # # TO BE OVERRIDDEN # This call is synnchronous and blocking. diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be index 94d0145bf..8efaad8b7 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_1_Device.be @@ -19,9 +19,23 @@ import matter +#@ solidify:Matter_Plugin_Device.GetOptionReader,weak #@ solidify:Matter_Plugin_Device,weak class Matter_Plugin_Device : Matter_Plugin + # Following arguments are specific to bridge devices + # static var TYPE = "" # name of the plug-in in json + # static var DISPLAY_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 UPDATE_CMD = "Status 11" # command to send for updates + static var PROBE_TIMEOUT = 1700 # timeout of 1800 ms for probing, which gives at least 1s for TCP recovery + static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing + + var http_remote # instance of Matter_HTTP_remote + + # clusters for general devices static var CLUSTERS = matter.consolidate_clusters(_class, { # 0x001D: inherited # Descriptor Cluster 9.5 p.453 0x0039: [3,5,0x0A,0x0F,0x11,0x12], # Bridged Device Basic Information 9.13 p.485 @@ -38,6 +52,18 @@ class Matter_Plugin_Device : Matter_Plugin # var tick # tick value when it was last updated # var node_label # name of the endpoint, used only in bridge mode, "" if none + ############################################################# + # Constructor + def init(device, endpoint, arguments) + super(self).init(device, endpoint, arguments) + + if self.BRIDGE + var addr = arguments.find(self.ARG_HTTP) + self.http_remote = self.device.register_http_remote(addr, self.PROBE_TIMEOUT) + self.register_cmd_cb() + end + end + ############################################################# # read an attribute # @@ -86,24 +112,55 @@ class Matter_Plugin_Device : Matter_Plugin end # ==================================================================================================== - elif cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ========== + elif cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ========== import string if attribute == 0x0003 # ---------- ProductName / string ---------- - return tlv_solo.set(TLV.UTF1, tasmota.cmd("DeviceName", true)['DeviceName']) + if self.BRIDGE + var name = self.http_remote.get_info().find("name") + if name + return tlv_solo.set(TLV.UTF1, name) + else + return tlv_solo.set(TLV.NULL, nil) + end + else + return tlv_solo.set(TLV.UTF1, tasmota.cmd("DeviceName", true)['DeviceName']) + end elif attribute == 0x0005 # ---------- NodeLabel / string ---------- return tlv_solo.set(TLV.UTF1, self.get_name()) elif attribute == 0x000A # ---------- SoftwareVersionString / string ---------- - var version_full = tasmota.cmd("Status 2", true)['StatusFWR']['Version'] - var version_end = string.find(version_full, '(') - if version_end > 0 version_full = version_full[0..version_end - 1] end - return tlv_solo.set(TLV.UTF1, version_full) - elif attribute == 0x000F # ---------- SerialNumber / string ---------- - return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", "")) + if self.BRIDGE + var version_full = self.http_remote.get_info().find("version") + if version_full + var version_end = string.find(version_full, '(') + if version_end > 0 version_full = version_full[0..version_end - 1] end + return tlv_solo.set(TLV.UTF1, version_full) + else + return tlv_solo.set(TLV.NULL, nil) + end + else + var version_full = tasmota.cmd("Status 2", true)['StatusFWR']['Version'] + var version_end = string.find(version_full, '(') + if version_end > 0 version_full = version_full[0..version_end - 1] end + return tlv_solo.set(TLV.UTF1, version_full) + end + elif attribute == 0x000F || attribute == 0x0012 # ---------- SerialNumber / string ---------- + if self.BRIDGE + var mac = self.http_remote.get_info().find("mac") + if mac + return tlv_solo.set(TLV.UTF1, mac) + else + return tlv_solo.set(TLV.NULL, nil) + end + else + return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", "")) + end elif attribute == 0x0011 # ---------- Reachable / bool ---------- - return tlv_solo.set(TLV.BOOL, 1) # by default we are reachable - elif attribute == 0x0012 # ---------- UniqueID / string 32 max ---------- - return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", "")) + if self.BRIDGE + return tlv_solo.set(TLV.BOOL, self.http_remote.reachable) # TODO find a way to do a ping + else + return tlv_solo.set(TLV.BOOL, 1) # by default we are reachable + end end end @@ -213,6 +270,154 @@ class Matter_Plugin_Device : Matter_Plugin return ret end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # register_cmd_cb + # + # Register recurrent command and callback + # Defined as a separate method to allow override + def register_cmd_cb() + self.http_remote.add_schedule(self.UPDATE_CMD, self.UPDATE_TIME, + / status,payload,cmd -> self.parse_http_response(status,payload,cmd)) + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This method should collect the data from the local or remote device + # and call `parse_status(, )` when data is available. + def update_shadow() + if self.BRIDGE && self.tick != self.device.tick # don't force an update if we just received it + var ret = self.call_remote_sync(self.UPDATE_CMD) + if ret + self.parse_http_response(1, ret, self.UPDATE_CMD) + end + end + self.tick = self.device.tick + end + + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + def parse_status(data, index) + end + + ############################################################# + # call_remote_sync + # + # Call a remote Tasmota device, returns Berry native map or nil + # arg can be nil, in this case `cmd` has it all + def call_remote_sync(cmd, arg) + if self.BRIDGE + # if !self.http_remote return nil end + import json + + var retry = 2 # try 2 times if first failed + if arg != nil cmd = cmd + ' ' + str(arg) end + while retry > 0 + var ret = self.http_remote.call_sync(cmd, self.SYNC_TIMEOUT) + if ret != nil + self.http_remote.device_is_alive(true) + var j = json.load(ret) + return j + end + retry -= 1 + tasmota.log("MTR: HTTP GET retrying", 3) + end + self.http_remote.device_is_alive(false) + return nil + end + end + + ############################################################# + # parse_http_response + # + # Parse response from HTTP API and update shadows + # We support: + # `Status 8`: {"StatusSNS":{ [...] }} + # `Status 11`: {"StatusSTS":{ [...] }} + # `Status 13`: {"StatusSHT":{ [...] }} + def parse_http_response(status, payload, cmd) + if self.BRIDGE + self.tick = self.device.tick # avoid new force update in same tick + self.http_remote.parse_status_response_and_call_method(status, payload, cmd, self, self.parse_status) + end + end + + ############################################################# + # every_250ms + # + # check if the timer expired and update_shadow() needs to be called + def every_250ms() + if self.BRIDGE + self.http_remote.scheduler() # defer to HTTP scheduler + # avoid calling update_shadow() since it's not applicable for HTTP remote + else + super(self).every_250ms() + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + static var PREFIX = "| %s " + def web_values() + import webserver + self.web_values_prefix() + webserver.content_send("<-- (" + self.DISPLAY_NAME + ") -->") + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + + # Show on/off value as html + def web_value_onoff(onoff) + var onoff_html = (onoff != nil ? (onoff ? "On" : "Off") : "") + return onoff_html + end + + ############################################################# + # GetOption reader to decode `SetOption` values from `Status 3` + static class GetOptionReader + var flag, flag2, flag3, flag4, flag5, flag6 + + def init(j) + if j == nil raise "value_error", "invalid json" end + var so = j['SetOption'] + self.flag = bytes().fromhex(so[0]).reverse() + self.flag2 = bytes().fromhex(so[1]) + self.flag3 = bytes().fromhex(so[2]).reverse() + self.flag4 = bytes().fromhex(so[3]).reverse() + self.flag5 = bytes().fromhex(so[4]).reverse() + self.flag6 = bytes().fromhex(so[5]).reverse() + end + def getoption(x) + if x < 32 # SetOption0 .. 31 = Settings->flag + return self.flag.getbits(x, 1) + elif x < 50 # SetOption32 .. 49 = Settings->param + return self.flag2.get(x - 32, 1) + elif x < 82 # SetOption50 .. 81 = Settings->flag3 + return self.flag3.getbits(x - 50, 1) + elif x < 114 # SetOption82 .. 113 = Settings->flag4 + return self.flag4.getbits(x - 82, 1) + elif x < 146 # SetOption114 .. 145 = Settings->flag5 + return self.flag5.getbits(x - 114, 1) + elif x < 178 # SetOption146 .. 177 = Settings->flag6 + return self.flag6.getbits(x - 146, 1) + end + end + end + ############################################################# + ############################################################# + ####################################################################### # _parse_sensor_entry: internal helper function # diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Bridge_HTTP.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Bridge_HTTP.be deleted file mode 100644 index 75b2316df..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Bridge_HTTP.be +++ /dev/null @@ -1,296 +0,0 @@ -# -# 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_HTTP.GetOptionReader,weak -#@ 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 DISPLAY_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 UPDATE_CMD = "Status 11" # command to send for updates - static var PROBE_TIMEOUT = 1700 # timeout of 1800 ms for probing, which gives at least 1s for TCP recovery - static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing - # 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], # 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 - - # } - - var http_remote # instance of Matter_HTTP_remote - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - - var addr = arguments.find(self.ARG_HTTP) - self.http_remote = self.device.register_http_remote(addr, self.PROBE_TIMEOUT) - self.register_cmd_cb() - end - - ############################################################# - # is_local_device - # - # Returns true if it's a local device, or false for a - # remotely device controlled via HTTP - def is_local_device() - return false - end - - ############################################################# - # register_cmd_cb - # - # Register recurrent command and callback - # Defined as a separate method to allow override - def register_cmd_cb() - self.http_remote.add_schedule(self.UPDATE_CMD, self.UPDATE_TIME, - / status,payload,cmd -> self.parse_http_response(status,payload,cmd)) - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This method should collect the data from the local or remote device - # and call `parse_update()` when data is available. - def update_shadow() - self.tick = self.device.tick - var ret = self.call_remote_sync(self.UPDATE_CMD) - if ret - self.parse_http_response(1, ret, self.UPDATE_CMD) - end - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # TO BE OVERRIDDEN - def parse_update(data, index) - end - - ############################################################# - # call_remote_sync - # - # Call a remote Tasmota device, returns Berry native map or nil - # arg can be nil, in this case `cmd` has it all - def call_remote_sync(cmd, arg) - # if !self.http_remote return nil end - import json - - var retry = 2 # try 2 times if first failed - if arg != nil cmd = cmd + ' ' + str(arg) end - while retry > 0 - var ret = self.http_remote.call_sync(cmd, self.SYNC_TIMEOUT) - if ret != nil - self.http_remote.device_is_alive(true) - var j = json.load(ret) - return j - end - retry -= 1 - tasmota.log("MTR: HTTP GET retrying", 3) - end - self.http_remote.device_is_alive(false) - return nil - end - - ############################################################# - # parse_http_response - # - # Parse response from HTTP API and update shadows - # We support: - # `Status 8`: {"StatusSNS":{ [...] }} - # `Status 11`: {"StatusSTS":{ [...] }} - # `Status 13`: {"StatusSHT":{ [...] }} - def parse_http_response(status, payload, cmd) - if status > 0 - # device is known to be reachable - self.http_remote.device_is_alive(true) - var tick = self.device.tick - - import json - var j = json.load(payload) - var code = nil # index of Status - if j - # filter - if j.contains("StatusSNS") # Status 8 - j = j["StatusSNS"] - code = 8 - elif j.contains("StatusSTS") # Status 11 - j = j["StatusSTS"] - code = 11 - elif j.contains("StatusSHT") # Status 13 - j = j["StatusSTS"] - code = 13 - end - # convert to shadow values - self.parse_update(j, code) # call parser - end - end - end - - # ############################################################# - # # is_reachable() - # # - # # Pings the device and checks if it's reachable - # def is_reachable_lazy_sync() - # var cur_tick = self.device.tick - # if cur_tick != self.tick - # var ret = self.call_remote_sync("", "") # empty command works as a ping - # self.http_remote.device_is_alive(ret != nil) - # end - # return self.http_remote.reachable - # end - - ############################################################# - # read attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ========== - import string - - if attribute == 0x0003 # ---------- ProductName / string ---------- - var name = self.http_remote.get_info().find("name") - if name - return tlv_solo.set(TLV.UTF1, name) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x000A # ---------- SoftwareVersionString / string ---------- - var version_full = self.http_remote.get_info().find("version") - if version_full - var version_end = string.find(version_full, '(') - if version_end > 0 version_full = version_full[0..version_end - 1] end - return tlv_solo.set(TLV.UTF1, version_full) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x000F || attribute == 0x0012 # ---------- SerialNumber || UniqueID / string ---------- - var mac = self.http_remote.get_info().find("mac") - if mac - return tlv_solo.set(TLV.UTF1, mac) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0011 # ---------- Reachable / bool ---------- - # self.is_reachable_lazy_sync() # Not needed anymore - return tlv_solo.set(TLV.BOOL, self.http_remote.reachable) # TODO find a way to do a ping - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end - - ############################################################# - # every_250ms - # - # check if the timer expired and update_shadow() needs to be called - def every_250ms() - self.http_remote.scheduler() # defer to HTTP scheduler - # avoid calling update_shadow() since it's not applicable for HTTP remote - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - static var PREFIX = "| %s " - def web_values() - import webserver - self.web_values_prefix() - webserver.content_send("<-- (" + self.DISPLAY_NAME + ") -->") - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end - - # Show on/off value as html - def web_value_onoff(onoff) - var onoff_html = (onoff != nil ? (onoff ? "On" : "Off") : "") - return onoff_html - end - - ############################################################# - # GetOption reader to decode `SetOption` values from `Status 3` - static class GetOptionReader - var flag, flag2, flag3, flag4, flag5, flag6 - - def init(j) - if j == nil raise "value_error", "invalid json" end - var so = j['SetOption'] - self.flag = bytes().fromhex(so[0]).reverse() - self.flag2 = bytes().fromhex(so[1]) - self.flag3 = bytes().fromhex(so[2]).reverse() - self.flag4 = bytes().fromhex(so[3]).reverse() - self.flag5 = bytes().fromhex(so[4]).reverse() - self.flag6 = bytes().fromhex(so[5]).reverse() - end - def getoption(x) - if x < 32 # SetOption0 .. 31 = Settings->flag - return self.flag.getbits(x, 1) - elif x < 50 # SetOption32 .. 49 = Settings->param - return self.flag2.get(x - 32, 1) - elif x < 82 # SetOption50 .. 81 = Settings->flag3 - return self.flag3.getbits(x - 50, 1) - elif x < 114 # SetOption82 .. 113 = Settings->flag4 - return self.flag4.getbits(x - 82, 1) - elif x < 146 # SetOption114 .. 145 = Settings->flag5 - return self.flag5.getbits(x - 114, 1) - elif x < 178 # SetOption146 .. 177 = Settings->flag6 - return self.flag6.getbits(x - 146, 1) - end - end - end - - #- Examples - - import json - - var p = '{"SerialLog":2,"WebLog":3,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Livebox-781A",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001800600003C5A0A192800000000","00000080","00006000","00006000","00000020"]}' - var j = json.load(p) - - var gor = matter.Plugin_Bridge_HTTP.GetOptionReader(j) - assert(gor.getoption(151) == 1) - assert(gor.getoption(150) == 0) - assert(gor.getoption(32) == 40) - assert(gor.getoption(37) == 128) - - -# -end -matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light0.be similarity index 61% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light0.be index 0c9dc1edb..348bbc090 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light0.be @@ -1,5 +1,5 @@ # -# Matter_Plugin_OnOff.be - implements the behavior for a Relay (OnOff) +# Matter_Plugin_Light0.be - implements the behavior for a generic Lighting (OnOff only) # # Copyright (C) 2023 Stephan Hadinger & Theo Arends # @@ -21,11 +21,11 @@ import matter # Matter plug-in for core behavior -#@ solidify:Matter_Plugin_OnOff,weak +#@ solidify:Matter_Plugin_Light0,weak -class Matter_Plugin_OnOff : Matter_Plugin_Device - static var TYPE = "relay" # name of the plug-in in json - static var DISPLAY_NAME = "Relay" # display name of the plug-in +class Matter_Plugin_Light0 : Matter_Plugin_Device + static var TYPE = "light0" # name of the plug-in in json + static var DISPLAY_NAME = "Light 0 On" # 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 ARG_HINT = "Relay number" @@ -38,7 +38,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device 0x0006: [0], # On/Off 1.5 p.48 }) static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power") - static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit + static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff # Inherited # var device # reference to the `device` global object @@ -46,8 +46,8 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy # var tick # tick value when it was last updated # var node_label # name of the endpoint, used only in bridge mode, "" if none + var tasmota_relay_index # Relay number in Tasmota (1 based), may be nil for Lights 1/2/3 internal var shadow_onoff # (bool) status of the light power on/off - var tasmota_relay_index # Relay number in Tasmota (zero based) ############################################################# # Constructor @@ -61,21 +61,24 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # # Parse configuration map def parse_configuration(config) - self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, 1)) - if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end + # with Light0 we always need relay number but we don't for Light1/2/3 so self.tasmota_relay_index may be `nil` + self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, nil)) + if (self.tasmota_relay_index != nil && self.tasmota_relay_index <= 0) self.tasmota_relay_index = 1 end end ############################################################# # Update shadow # def update_shadow() - if !self.VIRTUAL - var pow = tasmota.get_power(self.tasmota_relay_index - 1) - if pow != nil - if self.shadow_onoff != bool(pow) - self.attribute_updated(0x0006, 0x0000) + if !self.VIRTUAL && !self.BRIDGE + if (self.tasmota_relay_index != nil) + var pow = tasmota.get_power(self.tasmota_relay_index - 1) + if pow != nil + if self.shadow_onoff != bool(pow) + self.attribute_updated(0x0006, 0x0000) + end + self.shadow_onoff = pow end - self.shadow_onoff = pow end end super(self).update_shadow() @@ -85,14 +88,26 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device # Model # def set_onoff(pow) - if !self.VIRTUAL - tasmota.set_power(self.tasmota_relay_index - 1, bool(pow)) - self.update_shadow() - else + if self.BRIDGE + var ret = self.call_remote_sync("Power" + str(self.tasmota_relay_index), pow ? "1" : "0") + if ret != nil + self.parse_status(ret, 11) # update shadow from return value + # self.tick = self.device.tick # prevent an explicit Status11 for as it is not needed if the subscription update is sent in same tick + end + elif self.VIRTUAL if pow != self.shadow_onoff self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow end + else + if (self.tasmota_relay_index != nil) + tasmota.set_power(self.tasmota_relay_index - 1, bool(pow)) + self.update_shadow() + else + import light + light.set({'power':pow}) + self.update_shadow() + end end end @@ -157,5 +172,51 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + if index == 11 # Status 11 + var state = false + + if self.tasmota_relay_index == 1 && data.contains("POWER") # special case, can be `POWER` or `POWER1` + state = (data.find("POWER") == "ON") + else + state = (data.find("POWER" + str(self.tasmota_relay_index)) == "ON") + end + + if self.shadow_onoff != bool(state) + self.attribute_updated(0x0006, 0x0000) + self.shadow_onoff = state + end + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("%s", self.web_value_onoff(self.shadow_onoff))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Power" + str(self.tasmota_relay_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + end -matter.Plugin_OnOff = Matter_Plugin_OnOff +matter.Plugin_Light0 = Matter_Plugin_Light0 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be index 2b0e42255..c88ec645f 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Light1.be @@ -23,19 +23,19 @@ import matter #@ solidify:Matter_Plugin_Light1,weak -class Matter_Plugin_Light1 : Matter_Plugin_Device +class Matter_Plugin_Light1 : Matter_Plugin_Light0 static var TYPE = "light1" # name of the plug-in in json static var DISPLAY_NAME = "Light 1 Dimmer" # display name of the plug-in - static var UPDATE_TIME = 250 # update every 250ms + # static var UPDATE_TIME = 250 # update every 250ms static var CLUSTERS = matter.consolidate_clusters(_class, { # 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], # On/Off 1.5 p.48 + # 0x0006: [0], # On/Off 1.5 p.48 0x0008: [0,2,3,0x0F,0x11], # Level Control 1.6 p.57 }) - static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power", "Bri") + static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Bri") static var TYPES = { 0x0101: 2 } # Dimmable Light # Inherited @@ -44,22 +44,34 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device # var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy # var tick # tick value when it was last updated # var node_label # name of the endpoint, used only in bridge mode, "" if none - var shadow_onoff # (bool) status of the light power on/off + # var tasmota_relay_index # Relay number in Tasmota (1 based), nil for internal light + # var shadow_onoff # (bool) status of the light power on/off var shadow_bri # (int 0..254) brightness before Gamma correction - as per Matter 255 is not allowed ############################################################# # Constructor def init(device, endpoint, arguments) super(self).init(device, endpoint, arguments) - self.shadow_onoff = false self.shadow_bri = 0 end + ############################################################# + # parse_configuration + # + # Parse configuration map + def parse_configuration(config) + # with Light0 we always need relay number but we don't for Light1/2/3 so self.tasmota_relay_index may be `nil` + if self.BRIDGE + self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, nil)) + if (self.tasmota_relay_index != nil && self.tasmota_relay_index <= 0) self.tasmota_relay_index = 1 end + end + end + ############################################################# # Update shadow # def update_shadow() - if !self.VIRTUAL + if !self.VIRTUAL && !self.BRIDGE import light var light_status = light.get() if light_status != nil @@ -81,19 +93,6 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device super(self).update_shadow() # superclass manages 'power' end - def set_onoff(pow) - if !self.VIRTUAL - import light - light.set({'power':pow}) - self.update_shadow() - else - if pow != self.shadow_onoff - self.attribute_updated(0x0006, 0x0000) - self.shadow_onoff = pow - end - end - end - ############################################################# # Set Bri # @@ -103,16 +102,13 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device if (bri_254 < 0) bri_254 = 0 end if (bri_254 > 254) bri_254 = 254 end pow = (pow != nil) ? bool(pow) : nil # nil or bool - if !self.VIRTUAL - import light - var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255) - if pow == nil - light.set({'bri': bri_255}) - else - light.set({'bri': bri_255, 'power': pow}) + if self.BRIDGE + var dimmer = tasmota.scale_uint(bri_254, 0, 254, 0, 100) + var ret = self.call_remote_sync("Dimmer", str(dimmer)) + if ret != nil + self.parse_status(ret, 11) # update shadow from return value end - self.update_shadow() - else + elif self.VIRTUAL if (pow != nil) && (pow != self.shadow_onoff) self.attribute_updated(0x0006, 0x0000) self.shadow_onoff = pow @@ -121,6 +117,15 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device self.attribute_updated(0x0008, 0x0000) self.shadow_bri = bri_254 end + else + import light + var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255) + if pow == nil + light.set({'bri': bri_255}) + else + light.set({'bri': bri_255, 'power': pow}) + end + self.update_shadow() end end @@ -133,14 +138,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device var attribute = ctx.attribute # ==================================================================================================== - if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - self.update_shadow_lazy() - if attribute == 0x0000 # ---------- OnOff / bool ---------- - return tlv_solo.set(TLV.BOOL, self.shadow_onoff) - end - - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== self.update_shadow_lazy() if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- return tlv_solo.set(TLV.U1, self.shadow_bri) @@ -170,23 +168,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device 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.publish_command('Power', 0) - return true - elif command == 0x0001 # ---------- On ---------- - self.set_onoff(true) - self.publish_command('Power', 1) - return true - elif command == 0x0002 # ---------- Toggle ---------- - self.set_onoff(!self.shadow_onoff) - self.publish_command('Power', self.shadow_onoff ? 1 : 0) - return true - end - # ==================================================================================================== - elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== + if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== self.update_shadow_lazy() if command == 0x0000 # ---------- MoveToLevel ---------- var bri_254 = val.findsubval(0) # Hue 0..254 @@ -236,11 +218,53 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device if val_bri != nil self.set_bri(int(val_bri), val_onoff) return # don't call super() because we already handeld 'Power' - elif val_onoff != nil - self.set_onoff(bool(val_onoff)) end super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + super(self).parse_status(data, index) + + if index == 11 # Status 11 + var dimmer = int(data.find("Dimmer")) # 0..100 + if dimmer != nil + var bri = tasmota.scale_uint(dimmer, 0, 100, 0, 254) + if bri != self.shadow_bri + self.attribute_updated(0x0008, 0x0000) + self.shadow_bri = bri + end + end + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("%s %s", self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer())) + end + + # Show on/off value as html + def web_value_dimmer() + var bri_html = "" + if self.shadow_bri != nil + var bri = tasmota.scale_uint(self.shadow_bri, 0, 254, 0, 100) + bri_html = format("%i%%", bri) + end + return "🔅 " + bri_html; + end + ############################################################# + ############################################################# + end matter.Plugin_Light1 = Matter_Plugin_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be index f2b2e7f3f..2e3f7c18a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor.be @@ -26,11 +26,20 @@ import matter class Matter_Plugin_Sensor : Matter_Plugin_Device static var ARG = "filter" # additional argument name (or empty if none) static var ARG_HINT = "Filter pattern" + static var UPDATE_CMD = "Status 10" # command to send for updates static var UPDATE_TIME = 5000 # update sensor every 5s static var JSON_NAME = "" # Name of the sensor attribute in JSON payloads 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 + + var temp_unit # temperature unit, "C" or "F" + static var TEMP_C = "C" + static var TEMP_F = "F" + var pressure_unit # pressure unit, "hPa" or "mmHg" or "inHg" + static var PRESSURE_HPA = "hPa" + static var PRESSURE_MMHG = "mmHg" + static var PRESSURE_INHG = "inHg" ############################################################# # Constructor @@ -52,6 +61,8 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device if self.tasmota_sensor_filter self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter) end + self.temp_unit = self.TEMP_C + self.pressure_unit = self.PRESSURE_HPA end ############################################################# @@ -106,5 +117,53 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + def parse_status(data, index) + if index == 10 # Status 10 + if data.contains("TempUnit") + self.temp_unit = data["TempUnit"] + end + if data.contains("PressureUnit") + self.pressure_unit = data["PressureUnit"] + end + if self.tasmota_sensor_matcher + var val = self.pre_value(real(self.tasmota_sensor_matcher.match(data))) + if val != nil + if val != self.shadow_value + self.value_changed() + self.shadow_value = val + end + end + end + end + end + + ############################################################# + # Return the first item in the filter + def filter_name_html() + if self.tasmota_sensor_filter + import string + import webserver + return webserver.html_escape(string.split(self.tasmota_sensor_filter, '#')[0]) + end + return "" + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if (!name) name = self.filter_name_html() end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor = Matter_Plugin_Sensor diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be index a6c2f7193..026104263 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Contact.be @@ -63,7 +63,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device if !self.VIRTUAL var switch_str = "Switch" + str(self.tasmota_switch_index) - var j = tasmota.cmd("Status 8", true) + var j = tasmota.cmd("Status 10", true) if j != nil j = j.find("StatusSNS") end if j != nil && j.contains(switch_str) var state = (j.find(switch_str) == "ON") @@ -107,5 +107,46 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + if index == 10 # Status 10 + var state = false + + state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") + + if self.shadow_contact != nil && self.shadow_contact != bool(state) + self.attribute_updated(0x0045, 0x0000) + end + self.shadow_contact = state + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_contact))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Switch" + str(self.tasmota_switch_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# end matter.Plugin_Sensor_Contact = Matter_Plugin_Sensor_Contact diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be index fbc6bf84b..1a48ba716 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Occupancy.be @@ -63,7 +63,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device if !self.VIRTUAL var switch_str = "Switch" + str(self.tasmota_switch_index) - var j = tasmota.cmd("Status 8", true) + var j = tasmota.cmd("Status 10", true) if j != nil j = j.find("StatusSNS") end if j != nil && j.contains(switch_str) var state = (j.find(switch_str) == "ON") @@ -111,5 +111,47 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + if index == 10 # Status 10 + var state = false + + state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") + + if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state) + self.attribute_updated(0x0406, 0x0000) + end + self.shadow_occupancy = state + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Switch" + str(self.tasmota_switch_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Occupancy = Matter_Plugin_Sensor_Occupancy diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be index a2d2af9e6..21e0c779b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_OnOff.be @@ -53,7 +53,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device if !self.VIRTUAL var switch_str = "Switch" + str(self.tasmota_switch_index) - var j = tasmota.cmd("Status 8", true) + var j = tasmota.cmd("Status 10", true) if j != nil j = j.find("StatusSNS") end if j != nil && j.contains(switch_str) var state = (j.find(switch_str) == "ON") diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be index 04e8a4644..680ad5b91 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_2_Sensor_Waterleak.be @@ -64,7 +64,7 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device if !self.VIRTUAL var switch_str = "Switch" + str(self.tasmota_switch_index) - var j = tasmota.cmd("Status 8", true) + var j = tasmota.cmd("Status 10", true) if j != nil j = j.find("StatusSNS") end if j != nil && j.contains(switch_str) var state = (j.find(switch_str) == "ON") @@ -88,11 +88,7 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device # ==================================================================================================== if cluster == 0x0045 # ========== Boolean State ========== if attribute == 0x0000 # ---------- StateValue / bool ---------- - if self.shadow_leak != nil - return tlv_solo.set(TLV.BOOL, self.shadow_leak) - else - return tlv_solo.set(TLV.NULL, nil) - end + return tlv_solo.set(TLV.BOOL, self.shadow_leak) end end @@ -115,5 +111,47 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device super(self).update_virtual(payload_json) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + if index == 10 # Status 10 + var state = false + + state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") + + if self.shadow_leak != nil && self.shadow_leak != bool(state) + self.attribute_updated(0x0045, 0x0000) + end + self.shadow_leak = state + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_leak))) + end + + # Show prefix before web value + def web_values_prefix() + import webserver + var name = self.get_name() + if !name + name = "Switch" + str(self.tasmota_switch_index) + end + webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Waterleak = Matter_Plugin_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Light0.be deleted file mode 100644 index 87c0e22f9..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Light0.be +++ /dev/null @@ -1,156 +0,0 @@ -# -# Matter_Plugin_Bridge_Light0.be - implements the behavior for a remote generic Lighting (OnOff only) 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Light0,weak - -class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Bridge_HTTP - static var TYPE = "http_light0" # name of the plug-in in json - static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in - static var ARG = "relay" # additional argument name (or empty if none) - static var ARG_HINT = "Power number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - # static var UPDATE_TIME = 3000 # update every 3s - # static var UPDATE_CMD = "Status 11" # command to send for updates - static var CLUSTERS = matter.consolidate_clusters(_class, { - # 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], # On/Off 1.5 p.48 - }) - static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff - - var tasmota_relay_index # Relay number in Tasmota (one based) - var shadow_onoff # fake status for now # TODO - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.shadow_onoff = false - self.tasmota_relay_index = int(arguments.find(self.ARG #-'relay'-#, 1)) - if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 11 # Status 11 - var state = false - - if self.tasmota_relay_index == 1 && data.contains("POWER") # special case, can be `POWER` or `POWER1` - state = (data.find("POWER") == "ON") - else - state = (data.find("POWER" + str(self.tasmota_relay_index)) == "ON") - end - - if self.shadow_onoff != nil && self.shadow_onoff != bool(state) - self.attribute_updated(0x0006, 0x0000) - end - self.shadow_onoff = state - end - end - - ############################################################# - # Model - # - def set_onoff(v) - var ret = self.call_remote_sync("Power" + str(self.tasmota_relay_index), v ? "1" : "0") - if ret != nil - self.parse_update(ret, 11) # update shadow from return value - # self.tick = self.device.tick # prevent an explicit Status11 for as it is not needed if the subscription update is sent in same tick - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0006 # ========== On/Off 1.5 p.48 ========== - self.update_shadow_lazy() - if attribute == 0x0000 # ---------- OnOff / bool ---------- - return tlv_solo.set(TLV.BOOL, self.shadow_onoff) - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - 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 ========== - if command == 0x0000 # ---------- Off ---------- - self.set_onoff(false) - self.publish_command('Power', 0) - return true - elif command == 0x0001 # ---------- On ---------- - self.set_onoff(true) - self.publish_command('Power', 1) - return true - elif command == 0x0002 # ---------- Toggle ---------- - self.set_onoff(!self.shadow_onoff) - self.publish_command('Power', self.shadow_onoff ? 1 : 0) - return true - end - end - - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("%s", self.web_value_onoff(self.shadow_onoff))) - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if !name - name = "Power" + str(self.tasmota_relay_index) - end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end - -end -matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor.be deleted file mode 100644 index 301c1c02a..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor.be +++ /dev/null @@ -1,122 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor.be - implements base class for a Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor,weak - -class Matter_Plugin_Bridge_Sensor : Matter_Plugin_Bridge_HTTP - # static var TYPE = "" # name of the plug-in in json - # static var DISPLAY_NAME = "" # display name of the plug-in - static var ARG = "filter" # additional argument name (or empty if none) - static var ARG_HTTP = "url" # domain name - static var ARG_HINT = "Filter pattern" - static var UPDATE_TIME = 5000 # update every 5s - static var UPDATE_CMD = "Status 8" # command to send for updates - static var PROBE_TIMEOUT = 1700 # timeout of 1700 ms for probing, which gives at least 1s for TCP recovery - # static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing - 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 - var temp_unit # temperature unit, "C" or "F" - static var TEMP_C = "C" - static var TEMP_F = "F" - var pressure_unit # pressure unit, "hPa" or "mmHg" or "inHg" - static var PRESSURE_HPA = "hPa" - static var PRESSURE_MMHG = "mmHg" - static var PRESSURE_INHG = "inHg" - - ############################################################# - # parse_configuration - # - # Parse configuration map - def parse_configuration(config) - self.tasmota_sensor_filter = config.find(self.ARG#-'filter'-#) - if self.tasmota_sensor_filter - self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter) - end - self.temp_unit = self.TEMP_C - self.pressure_unit = self.PRESSURE_HPA - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # TO BE OVERRIDDEN - def parse_update(data, index) - if index == 8 # Status 8 - if data.contains("TempUnit") - self.temp_unit = data["TempUnit"] - end - if data.contains("PressureUnit") - self.pressure_unit = data["PressureUnit"] - end - if self.tasmota_sensor_matcher - var val = self.pre_value(real(self.tasmota_sensor_matcher.match(data))) - if val != nil - if val != self.shadow_value - self.value_changed() - self.shadow_value = val - end - end - end - end - end - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - # self.attribute_updated(0x0402, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - return val - end - - ############################################################# - # Return the first item in the filter - def filter_name_html() - if self.tasmota_sensor_filter - import string - import webserver - return webserver.html_escape(string.split(self.tasmota_sensor_filter, '#')[0]) - end - return "" - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if (!name) name = self.filter_name_html() end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end - -end -matter.Plugin_Bridge_Sensor = Matter_Plugin_Bridge_Sensor diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Contact.be deleted file mode 100644 index fe8373987..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Contact.be +++ /dev/null @@ -1,110 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Contact.be - implements Contact Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Contact,weak - -class Matter_Plugin_Bridge_Sensor_Contact : Matter_Plugin_Bridge_HTTP - static var TYPE = "http_contact" # name of the plug-in in json - static var DISPLAY_NAME = "Contact" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 5000 # update every 5s - static var UPDATE_CMD = "Status 8" # command to send for updates - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0045: [0], # Boolean State p.70 - no writable - }) - static var TYPES = { 0x0015: 1 } # Contact Sensor, rev 1 - - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_contact - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.tasmota_switch_index = int(arguments.find(self.ARG #-'switch'-#, 1)) - if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 8 # Status 8 - var state = false - - state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") - - if self.shadow_contact != nil && self.shadow_contact != bool(state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_contact = state - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0045 # ========== Boolean State ========== - if attribute == 0x0000 # ---------- StateValue / bool ---------- - if self.shadow_contact != nil - return tlv_solo.set(TLV.BOOL, self.shadow_contact) - else - return tlv_solo.set(TLV.NULL, nil) - end - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_contact))) - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if !name - name = "Switch" + str(self.tasmota_switch_index) - end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end -end -matter.Plugin_Bridge_Sensor_Contact = Matter_Plugin_Bridge_Sensor_Contact diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Occupancy.be deleted file mode 100644 index 1ed2c5c59..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Occupancy.be +++ /dev/null @@ -1,114 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Occupancy.be - implements base class for a Occupancy Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Occupancy,weak - -class Matter_Plugin_Bridge_Sensor_Occupancy : Matter_Plugin_Bridge_HTTP - static var TYPE = "http_occupancy" # name of the plug-in in json - static var DISPLAY_NAME = "Occupancy" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 5000 # update every 5s - static var UPDATE_CMD = "Status 8" # command to send for updates - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0406: [0,1,2], # Occupancy Sensing p.105 - no writable - }) - static var TYPES = { 0x0107: 2 } # Occupancy Sensor, rev 2 - - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_occupancy - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.tasmota_switch_index = int(arguments.find(self.ARG #-'relay'-#, 1)) - if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 8 # Status 8 - var state = false - - state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") - - if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state) - self.attribute_updated(0x0406, 0x0000) - end - self.shadow_occupancy = state - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0406 # ========== Occupancy Sensing ========== - if attribute == 0x0000 # ---------- Occupancy / U8 ---------- - if self.shadow_occupancy != nil - return tlv_solo.set(TLV.U1, self.shadow_occupancy) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ---------- - return tlv_solo.set(TLV.U1, 3) # physical contact - elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ---------- - return tlv_solo.set(TLV.U1, 0) # unknown - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy))) - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if !name - name = "Switch" + str(self.tasmota_switch_index) - end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end -end -matter.Plugin_Bridge_Sensor_Occupancy = Matter_Plugin_Bridge_Sensor_Occupancy diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Waterleak.be deleted file mode 100644 index aa7c7c7d1..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Waterleak.be +++ /dev/null @@ -1,110 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Waterleak.be - implements Waterleak Sensor via HTTP to Tasmota -# -# Copyright (C) 2024 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Waterleak,weak - -class Matter_Plugin_Bridge_Sensor_Waterleak : Matter_Plugin_Bridge_HTTP - static var TYPE = "http_waterleak" # name of the plug-in in json - static var DISPLAY_NAME = "Waterleak" # display name of the plug-in - static var ARG = "switch" # additional argument name (or empty if none) - static var ARG_HINT = "Switch number" - static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type - static var UPDATE_TIME = 5000 # update every 5s - static var UPDATE_CMD = "Status 8" # command to send for updates - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0045: [0], # Boolean State p.70 - no writable - }) - static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1 - - var tasmota_switch_index # Switch number in Tasmota (one based) - var shadow_Waterleak - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.tasmota_switch_index = int(arguments.find(self.ARG #-'switch'-#, 1)) - if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 8 # Status 8 - var state = false - - state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON") - - if self.shadow_Waterleak != nil && self.shadow_Waterleak != bool(state) - self.attribute_updated(0x0045, 0x0000) - end - self.shadow_Waterleak = state - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0045 # ========== Boolean State ========== - if attribute == 0x0000 # ---------- StateValue / bool ---------- - if self.shadow_Waterleak != nil - return tlv_solo.set(TLV.BOOL, self.shadow_Waterleak) - else - return tlv_solo.set(TLV.NULL, nil) - end - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_Waterleak))) - end - - # Show prefix before web value - def web_values_prefix() - import webserver - var name = self.get_name() - if !name - name = "Switch" + str(self.tasmota_switch_index) - end - webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : "")) - end -end -matter.Plugin_Bridge_Sensor_Waterleak = Matter_Plugin_Bridge_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be index 066d0a850..2458484c4 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light2.be @@ -53,7 +53,9 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 # Constructor def init(device, endpoint, arguments) super(self).init(device, endpoint, arguments) - self.shadow_ct = 325 + if !self.BRIDGE # in BRIDGE mode keep default to nil + self.shadow_ct = 325 + end self.update_ct_minmax() # read SetOption to adjust ct min/max end @@ -61,7 +63,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 # Update shadow # def update_shadow() - if !self.VIRTUAL + if !self.VIRTUAL && !self.BRIDGE import light self.update_ct_minmax() super(self).update_shadow() @@ -96,15 +98,20 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 def set_ct(ct) if ct < self.ct_min ct = self.ct_min end if ct > self.ct_max ct = self.ct_max end - if !self.VIRTUAL - import light - light.set({'ct': ct}) - self.update_shadow() - else + if self.BRIDGE + var ret = self.call_remote_sync("CT", str(ct)) + if ret != nil + self.parse_status(ret, 11) # update shadow from return value + end + elif self.VIRTUAL if ct != self.shadow_ct self.attribute_updated(0x0300, 0x0007) self.shadow_ct = ct end + else + import light + light.set({'ct': ct}) + self.update_shadow() end end @@ -144,7 +151,6 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 # returns a TLV object if successful, contains the response # or an `int` to indicate a status def invoke_request(session, val, ctx) - import light var TLV = matter.TLV var cluster = ctx.cluster var command = ctx.command @@ -154,6 +160,8 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 self.update_shadow_lazy() if command == 0x000A # ---------- MoveToColorTemperature ---------- var ct_in = val.findsubval(0) # CT + if ct_in < self.ct_min ct_in = self.ct_min end + if ct_in > self.ct_max ct_in = self.ct_max end self.set_ct(ct_in) ctx.log = "ct:"+str(ct_in) self.publish_command('CT', ct_in) @@ -187,5 +195,53 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1 super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # TO BE OVERRIDDEN + # This call is synnchronous and blocking. + def parse_status(data, index) + super(self).parse_status(data, index) + + if index == 11 # Status 11 + var ct = int(data.find("CT")) # 153..500 + if ct != nil + if ct != self.shadow_ct + if ct < self.ct_min ct = self.ct_min end + if ct > self.ct_max ct = self.ct_max end + self.attribute_updated(0x0300, 0x0007) + self.shadow_ct = ct + end + end + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("%s %s %s", + self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(), + self.web_value_ct())) + end + + # Show on/off value as html + def web_value_ct() + var ct_html = "" + if self.shadow_ct != nil + var ct_k = (((1000000 / self.shadow_ct) + 25) / 50) * 50 # convert in Kelvin + ct_html = format("%iK", ct_k) + end + return "⚪ " + ct_html; + end + ############################################################# + ############################################################# + end matter.Plugin_Light2 = Matter_Plugin_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be index 5f51f2bdc..bbc4e447a 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light3.be @@ -62,9 +62,9 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 # Update shadow # def update_shadow() - super(self).update_shadow() - if !self.VIRTUAL + if !self.VIRTUAL && !self.BRIDGE import light + super(self).update_shadow() var light_status = light.get() if light_status != nil var hue = light_status.find('hue', nil) @@ -74,6 +74,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end end + else + super(self).update_shadow() end end @@ -93,7 +95,29 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 if sat_254 > 254 sat_254 = 254 end end - if !self.VIRTUAL + if self.BRIDGE + if hue_254 != nil + var hue_360 = tasmota.scale_uint(hue_254, 0, 254, 0, 360) + var ret = self.call_remote_sync("HSBColor1", hue_360) + if ret != nil + self.parse_status(ret, 11) # update shadow from return value + end + end + if sat_254 != nil + var sat_100 = tasmota.scale_uint(sat_254, 0, 254, 0, 100) + var ret = self.call_remote_sync("HSBColor2", sat_100) + if ret != nil + self.parse_status(ret, 11) # update shadow from return value + end + end + elif self.VIRTUAL + if hue_254 != nil + if hue_254 != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue_254 end + end + if sat_254 != nil + if sat_254 != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat_254 end + end + else var hue_360 = (hue_254 != nil) ? tasmota.scale_uint(hue_254, 0, 254, 0, 360) : nil var sat_255 = (sat_254 != nil) ? tasmota.scale_uint(sat_254, 0, 254, 0, 255) : nil @@ -105,13 +129,6 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 light.set({'sat': sat_255}) end self.update_shadow() - else - if hue_254 != nil - if hue_254 != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue_254 end - end - if sat_254 != nil - if sat_254 != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat_254 end - end end end @@ -222,5 +239,59 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1 super(self).update_virtual(payload) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # Stub for updating shadow values (local copies of what we published to the Matter gateway) + # + # This call is synnchronous and blocking. + def parse_status(data, index) + super(self).parse_status(data, index) + + if index == 11 # Status 11 + var hsb = data.find("HSBColor") + if hsb + import string + var hsb_list = string.split(hsb, ",") + var hue = int(hsb_list[0]) + var sat = int(hsb_list[1]) + # dimmer is already available + + if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end + if sat != nil sat = tasmota.scale_uint(sat, 0, 100, 0, 254) else sat = self.shadow_sat end + if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end + if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end + end + end + end + + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("%s %s %s", + self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(), + self.web_value_RGB())) + end + + # Show on/off value as html + def web_value_RGB() + if self.shadow_hue != nil && self.shadow_sat != nil + var l = light_state(3) # RGB virtual light state object + l.set_bri(255) # set full brightness to get full range RGB + l.set_huesat(tasmota.scale_uint(self.shadow_hue, 0, 254, 0, 360), tasmota.scale_uint(self.shadow_sat, 0, 254, 0, 255)) + var rgb_hex = format("#%02X%02X%02X", l.r, l.g, l.b) + var rgb_html = format('%s', rgb_hex, rgb_hex) + return rgb_html + end + return "" + end + ############################################################# + ############################################################# + end matter.Plugin_Light3 = Matter_Plugin_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_OnOff.be similarity index 69% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light0.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_OnOff.be index 9c2108ebf..806bfa875 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Light0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_OnOff.be @@ -1,5 +1,5 @@ # -# Matter_Plugin_Light0.be - implements the behavior for a generic Lighting (OnOff only) +# Matter_Plugin_OnOff.be - implements the behavior for a Relay (OnOff) # # Copyright (C) 2023 Stephan Hadinger & Theo Arends # @@ -21,12 +21,13 @@ import matter # Matter plug-in for core behavior -#@ solidify:Matter_Plugin_Light0,weak +#@ solidify:Matter_Plugin_OnOff,weak -class Matter_Plugin_Light0 : Matter_Plugin_OnOff - static var TYPE = "light0" # name of the plug-in in json - static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in - static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff +class Matter_Plugin_OnOff : Matter_Plugin_Light0 + static var TYPE = "relay" # name of the plug-in in json + static var DISPLAY_NAME = "Relay" # display name of the plug-in + + static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit # Inherited # var device # reference to the `device` global object @@ -34,7 +35,8 @@ class Matter_Plugin_Light0 : Matter_Plugin_OnOff # var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy # var tick # tick value when it was last updated # var node_label # name of the endpoint, used only in bridge mode, "" if none - # var shadow_onoff # (bool) status of the light power on/off + # var shadow_onoff # (bool) status of the light power on/off + # var tasmota_relay_index # Relay number in Tasmota (zero based) end -matter.Plugin_Light0 = Matter_Plugin_Light0 +matter.Plugin_OnOff = Matter_Plugin_OnOff diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Flow.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Flow.be index 9e418d453..cadf46b2b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Flow.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Flow.be @@ -77,5 +77,20 @@ class Matter_Plugin_Sensor_Flow : Matter_Plugin_Sensor return super(self).read_attribute(session, ctx, tlv_solo) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("⛅ %i m³/h", + int(self.shadow_value))) + end + ############################################################# + ############################################################# end matter.Plugin_Sensor_Flow = Matter_Plugin_Sensor_Flow diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be index 94c7d4a90..089a780ef 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Humidity.be @@ -77,5 +77,21 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor return super(self).read_attribute(session, ctx, tlv_solo) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("💧 %2.0f%%", + self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be index ac6144b30..943e7ade2 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Illuminance.be @@ -84,5 +84,21 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor return super(self).read_attribute(session, ctx, tlv_solo) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("🔅 %i lux", + int(self.shadow_value))) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be index b41f21a97..4eb020eb0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Pressure.be @@ -77,5 +77,21 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor return super(self).read_attribute(session, ctx, tlv_solo) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("⛅ %i hPa", + int(self.shadow_value))) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be index a6a540595..aa114a25e 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Sensor_Temp.be @@ -39,10 +39,18 @@ 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) - if tasmota.get_option(8) == 1 # Fahrenheit - val = (val - 32) / 1.8 + # TODO simplify + if self.BRIDGE + if self.temp_unit == self.TEMP_F # Fahrenheit + val = (val - 32) / 1.8 + end + return val != nil ? int(val * 100) : nil + else + if tasmota.get_option(8) == 1 # Fahrenheit + val = (val - 32) / 1.8 + end + return val != nil ? int(val * 100) : nil end - return val != nil ? int(val * 100) : nil end ############################################################# @@ -80,5 +88,21 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor return super(self).read_attribute(session, ctx, tlv_solo) end + ############################################################# + # For Bridge devices + ############################################################# + ############################################################# + # web_values + # + # Show values of the remote device as HTML + def web_values() + import webserver + self.web_values_prefix() # display '| ' and name if present + webserver.content_send(format("☀️ %.1f °C", + self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) + end + ############################################################# + ############################################################# + end matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Light1.be deleted file mode 100644 index e2ada8078..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Light1.be +++ /dev/null @@ -1,184 +0,0 @@ -# -# Matter_Plugin_Bridge_Light1.be - implements the behavior for a remote generic Lighting (Dimmer) 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Light1,weak - -class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Bridge_Light0 - static var TYPE = "http_light1" # name of the plug-in in json - static var DISPLAY_NAME = "Light 1 Dimmer" # 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 = matter.consolidate_clusters(_class, { - # 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: inherited # On/Off 1.5 p.48 - 0x0008: [0,2,3,0x0F,0x11], # Level Control 1.6 p.57 - }) - static var TYPES = { 0x0101: 2 } # Dimmable Light - - var shadow_bri - # var tasmota_relay_index # ingerited - # var shadow_onoff # inherited - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - super(self).parse_update(data, index) - - if index == 11 # Status 11 - var dimmer = int(data.find("Dimmer")) # 0..100 - if dimmer != nil - var bri = tasmota.scale_uint(dimmer, 0, 100, 0, 254) - if bri != self.shadow_bri - self.attribute_updated(0x0008, 0x0000) - self.shadow_bri = bri - end - end - end - end - - ############################################################# - # Model - # - def set_bri(v) - var dimmer = tasmota.scale_uint(v, 0, 254, 0, 100) - var ret = self.call_remote_sync("Dimmer", str(dimmer)) - if ret != nil - self.parse_update(ret, 11) # update shadow from return value - end - end - - ############################################################# - # read an attribute - # - def read_attribute(session, ctx, tlv_solo) - var TLV = matter.TLV - var cluster = ctx.cluster - var attribute = ctx.attribute - - # ==================================================================================================== - if cluster == 0x0008 # ========== Level Control 1.6 p.57 ========== - self.update_shadow_lazy() - if attribute == 0x0000 # ---------- CurrentLevel / u1 ---------- - if self.shadow_bri != nil - return tlv_solo.set(TLV.U1, self.shadow_bri) - else - return tlv_solo.set(TLV.NULL, nil) - end - elif attribute == 0x0002 # ---------- MinLevel / u1 ---------- - return tlv_solo.set(TLV.U1, 0) - elif attribute == 0x0003 # ---------- MaxLevel / u1 ---------- - return tlv_solo.set(TLV.U1, 254) - elif attribute == 0x000F # ---------- Options / map8 ---------- - return tlv_solo.set(TLV.U1, 0) # - elif attribute == 0x0011 # ---------- OnLevel / u1 ---------- - if self.shadow_bri != nil - return tlv_solo.set(TLV.U1, self.shadow_bri) - else - return tlv_solo.set(TLV.NULL, nil) - end - end - - end - return super(self).read_attribute(session, ctx, tlv_solo) - 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 == 0x0008 # ========== Level Control 1.6 p.57 ========== - if command == 0x0000 # ---------- MoveToLevel ---------- - var bri_in = val.findsubval(0) # Hue 0..254 - self.set_bri(bri_in) - ctx.log = "bri:"+str(bri_in) - self.publish_command('Bri', tasmota.scale_uint(bri_in, 0, 254, 0, 255), - 'Dimmer', tasmota.scale_uint(bri_in, 0, 254, 0, 100)) - return true - elif command == 0x0001 # ---------- Move ---------- - # TODO, we don't really support it - return true - elif command == 0x0002 # ---------- Step ---------- - # TODO, we don't really support it - return true - elif command == 0x0003 # ---------- Stop ---------- - # TODO, we don't really support it - return true - elif command == 0x0004 # ---------- MoveToLevelWithOnOff ---------- - var bri_in = val.findsubval(0) # Hue 0..254 - self.set_bri(bri_in) - var onoff = bri_in > 0 - self.set_onoff(onoff) - ctx.log = "bri:"+str(bri_in) - self.publish_command('Bri', tasmota.scale_uint(bri_in, 0, 254, 0, 255), - 'Dimmer', tasmota.scale_uint(bri_in, 0, 254, 0, 100), - 'Power', onoff ? 1 : 0) - return true - elif command == 0x0005 # ---------- MoveWithOnOff ---------- - # TODO, we don't really support it - return true - elif command == 0x0006 # ---------- StepWithOnOff ---------- - # TODO, we don't really support it - return true - elif command == 0x0007 # ---------- StopWithOnOff ---------- - # TODO, we don't really support it - return true - end - - else - return super(self).invoke_request(session, val, ctx) - end - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("%s %s", self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer())) - end - - # Show on/off value as html - def web_value_dimmer() - var bri_html = "" - if self.shadow_bri != nil - var bri = tasmota.scale_uint(self.shadow_bri, 0, 254, 0, 100) - bri_html = format("%i%%", bri) - end - return "🔅 " + bri_html; - end -end -matter.Plugin_Bridge_Light1 = Matter_Plugin_Bridge_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be deleted file mode 100644 index a3e236acd..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Flow.be +++ /dev/null @@ -1,70 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Flow.be - implements base class for a Flow Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Flow,weak - -class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Bridge_Sensor - static var TYPE = "http_flow" # name of the plug-in in json - static var DISPLAY_NAME = "Flow" # display name of the plug-in - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0404: [0,1,2], # Flow Measurement - }) - static var TYPES = { 0x0306: 1 } # Flow Sensor, rev 1 - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - self.attribute_updated(0x0404, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - return val != nil ? int(val * 10) : nil # MeasuredValue represents 10 x flow in m3/h - end - - ############################################################# - # read an attribute - # - static var read_attribute = matter.Plugin_Sensor_Flow.read_attribute - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("⛅ %i m3/h", - int(self.shadow_value))) - end - -end -matter.Plugin_Bridge_Sensor_Flow = Matter_Plugin_Bridge_Sensor_Flow diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be deleted file mode 100644 index d6801ced4..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Humidity.be +++ /dev/null @@ -1,70 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Humidity.be - implements base class for a Humidity Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Humidity,weak - -class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Bridge_Sensor - static var TYPE = "http_humidity" # name of the plug-in in json - static var DISPLAY_NAME = "Humidity" # display name of the plug-in - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0405: [0,1,2], # Humidity Measurement p.102 - no writable - }) - static var TYPES = { 0x0307: 2 } # Humidity Sensor, rev 2 - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - self.attribute_updated(0x0405, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - return val != nil ? int(val * 100) : nil # 1/100th of percentage - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Sensor_Humidity.read_attribute - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("💧 %2.0f%%", - self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) - end - -end -matter.Plugin_Bridge_Sensor_Humidity = Matter_Plugin_Bridge_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be deleted file mode 100644 index df31caec6..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Illuminance.be +++ /dev/null @@ -1,77 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Illuminance.be - implements base class for a Light/Illuminance Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Illuminance,weak - -class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Bridge_Sensor - static var TYPE = "http_illuminance" # name of the plug-in in json - static var DISPLAY_NAME = "Illuminance" # display name of the plug-in - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0400: [0,1,2], # Illuminance Measurement p.95 - no writable - }) - static var TYPES = { 0x0106: 2 } # Illuminance Sensor, rev 2 - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - self.attribute_updated(0x0400, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - if val == nil return nil end - import math - - if val < 0 - return 0 - else - return math.log10(val + 1) * 10000 - end - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Sensor_Illuminance.read_attribute - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("🔅 %ilux", - int(self.shadow_value))) - end - -end -matter.Plugin_Bridge_Sensor_Illuminance = Matter_Plugin_Bridge_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be deleted file mode 100644 index 6b40a7b60..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Pressure.be +++ /dev/null @@ -1,70 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Pressure Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Pressure,weak - -class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Bridge_Sensor - static var TYPE = "http_pressure" # name of the plug-in in json - static var DISPLAY_NAME = "Pressure" # display name of the plug-in - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0403: [0,1,2], # Pressure Measurement - }) - static var TYPES = { 0x0305: 2 } # Temperature Sensor, rev 2 - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - self.attribute_updated(0x0403, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - return val != nil ? int(val) : nil - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Sensor_Pressure.read_attribute - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("⛅ %i hPa", - int(self.shadow_value))) - end - -end -matter.Plugin_Bridge_Sensor_Pressure = Matter_Plugin_Bridge_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be deleted file mode 100644 index daaaaa9f9..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_Sensor_Temp.be +++ /dev/null @@ -1,73 +0,0 @@ -# -# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Temperature Sensor via HTTP to Tasmota -# -# Copyright (C) 2023 Stephan Hadinger & Theo Arends -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Sensor_Temp,weak - -class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Bridge_Sensor - static var TYPE = "http_temperature" # name of the plug-in in json - static var DISPLAY_NAME = "Temperature" # display name of the plug-in - - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x0402: [0,1,2], # Temperature Measurement p.97 - no writable - }) - static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2 - - ############################################################# - # Called when the value changed compared to shadow value - # - # This must be overriden. - # This is where you call `self.attribute_updated(, )` - def value_changed() - self.attribute_updated(0x0402, 0x0000) - end - - ############################################################# - # Pre-process value - # - # This must be overriden. - # This allows to convert the raw sensor value to the target one, typically int - def pre_value(val) - if self.temp_unit == self.TEMP_F # Fahrenheit - val = (val - 32) / 1.8 - end - return val != nil ? int(val * 100) : nil - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Sensor_Temp.read_attribute - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("☀️ %.1f °C", - self.shadow_value != nil ? real(self.shadow_value) / 100 : nil)) - end - -end -matter.Plugin_Bridge_Sensor_Temp = Matter_Plugin_Bridge_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be deleted file mode 100644 index 8d5622315..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light2.be +++ /dev/null @@ -1,155 +0,0 @@ -# -# Matter_Plugin_Bridge_Light2.be - implements the behavior for a remote generic Lighting (CT) 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Light2,weak - -class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1 - static var TYPE = "http_light2" # name of the plug-in in json - static var DISPLAY_NAME = "Light 2 CT" # 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 = matter.consolidate_clusters(_class, { - # 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: inherited # On/Off 1.5 p.48 - # 0x0008: inherited # Level Control 1.6 p.57 - 0x0300: [7,8,0xF,0x400A,0x400B,0x400C], # Color Control 3.2 p.111 - }) - static var TYPES = { 0x010C: 2 } # Dimmable Light - - var shadow_ct - var ct_min, ct_max - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.update_ct_minmax() - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # TO BE OVERRIDDEN - # This call is synnchronous and blocking. - def parse_update(data, index) - super(self).parse_update(data, index) - - if index == 11 # Status 11 - var ct = int(data.find("CT")) # 153..500 - if ct != nil - if ct != self.shadow_ct - if ct < self.ct_min ct = self.ct_min end - if ct > self.ct_max ct = self.ct_max end - self.attribute_updated(0x0300, 0x0007) - self.shadow_ct = ct - end - end - end - end - - ############################################################# - # Update ct_min/max - # - def update_ct_minmax() - var ct_alexa_mode = tasmota.get_option(82) # if set, range is 200..380 instead of 153...500 - self.ct_min = ct_alexa_mode ? 200 : 153 - self.ct_max = ct_alexa_mode ? 380 : 500 - end - - ############################################################# - # Model - # - def set_ct(v) - var ret = self.call_remote_sync("CT", str(v)) - if ret != nil - self.parse_update(ret, 11) # update shadow from return value - end - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Light2.read_attribute - - ############################################################# - # 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 == 0x0300 # ========== Color Control 3.2 p.111 ========== - if command == 0x000A # ---------- MoveToColorTemperature ---------- - var ct_in = val.findsubval(0) # CT - if ct_in < self.ct_min ct_in = self.ct_min end - if ct_in > self.ct_max ct_in = self.ct_max end - self.set_ct(ct_in) - ctx.log = "ct:"+str(ct_in) - self.publish_command('CT', ct_in) - return true - elif command == 0x0047 # ---------- StopMoveStep ---------- - # TODO, we don't really support it - return true - elif command == 0x004B # ---------- MoveColorTemperature ---------- - # TODO, we don't really support it - return true - elif command == 0x004C # ---------- StepColorTemperature ---------- - # TODO, we don't really support it - return true - end - - else - return super(self).invoke_request(session, val, ctx) - end - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("%s %s %s", - self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(), - self.web_value_ct())) - end - - # Show on/off value as html - def web_value_ct() - var ct_html = "" - if self.shadow_ct != nil - var ct_k = (((1000000 / self.shadow_ct) + 25) / 50) * 50 # convert in Kelvin - ct_html = format("%iK", ct_k) - end - return "⚪ " + ct_html; - end -end -matter.Plugin_Bridge_Light2 = Matter_Plugin_Bridge_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be deleted file mode 100644 index 950048118..000000000 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_5_Bridge_Light3.be +++ /dev/null @@ -1,176 +0,0 @@ -# -# Matter_Plugin_Bridge_Light3.be - implements the behavior for a remote generic Lighting (RGB) 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 . -# - -import matter - -# Matter plug-in for core behavior - -#@ solidify:Matter_Plugin_Bridge_Light3,weak - -class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1 - static var TYPE = "http_light3" # name of the plug-in in json - static var DISPLAY_NAME = "Light 3 RGB" # 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 = matter.consolidate_clusters(_class, { - # 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: inherited # On/Off 1.5 p.48 - # 0x0008: inherited # Level Control 1.6 p.57 - 0x0300: [0,1,7,8,0xF,0x4001,0x400A], # Color Control 3.2 p.111 - }) - static var TYPES = { 0x010D: 2 } # Extended Color Light - - var shadow_hue, shadow_sat # 0..254 - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - end - - ############################################################# - # Stub for updating shadow values (local copies of what we published to the Matter gateway) - # - # This call is synnchronous and blocking. - def parse_update(data, index) - super(self).parse_update(data, index) - - if index == 11 # Status 11 - var hsb = data.find("HSBColor") - if hsb - import string - var hsb_list = string.split(hsb, ",") - var hue = int(hsb_list[0]) - var sat = int(hsb_list[1]) - # dimmer is already available - - if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end - if sat != nil sat = tasmota.scale_uint(sat, 0, 100, 0, 254) else sat = self.shadow_sat end - if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end - if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end - end - end - end - - ############################################################# - # Model - # - def set_hue(v) - var hue_360 = tasmota.scale_uint(v, 0, 254, 0, 360) - var ret = self.call_remote_sync("HSBColor1", hue_360) - if ret != nil - self.parse_update(ret, 11) # update shadow from return value - end - end - def set_sat(v) - var sat_100 = tasmota.scale_uint(v, 0, 254, 0, 100) - var ret = self.call_remote_sync("HSBColor2", sat_100) - if ret != nil - self.parse_update(ret, 11) # update shadow from return value - end - end - - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Light3.read_attribute - - ############################################################# - # 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 == 0x0300 # ========== Color Control 3.2 p.111 ========== - if command == 0x0000 # ---------- MoveToHue ---------- - var hue_in = val.findsubval(0) # Hue 0..254 - self.set_hue(hue_in) - ctx.log = "hue:"+str(hue_in) - self.publish_command('Hue', hue_in) - return true - elif command == 0x0001 # ---------- MoveHue ---------- - # TODO, we don't really support it - return true - elif command == 0x0002 # ---------- StepHue ---------- - # TODO, we don't really support it - return true - elif command == 0x0003 # ---------- MoveToSaturation ---------- - var sat_in = val.findsubval(0) # Sat 0..254 - self.set_sat(sat_in) - ctx.log = "sat:"+str(sat_in) - self.publish_command('Sat', sat_in) - return true - elif command == 0x0004 # ---------- MoveSaturation ---------- - # TODO, we don't really support it - return true - elif command == 0x0005 # ---------- StepSaturation ---------- - # TODO, we don't really support it - return true - elif command == 0x0006 # ---------- MoveToHueAndSaturation ---------- - var hue_in = val.findsubval(0) # Hue 0..254 - var sat_in = val.findsubval(1) # Sat 0..254 - self.set_hue(hue_in) - self.set_sat(sat_in) - ctx.log = "hue:"+str(hue_in)+" sat:"+str(sat_in) - self.publish_command('Hue', hue_in, 'Sat', sat_in) - return true - elif command == 0x0047 # ---------- StopMoveStep ---------- - # TODO, we don't really support it - return true - end - - else - return super(self).invoke_request(session, val, ctx) - end - end - - ############################################################# - # web_values - # - # Show values of the remote device as HTML - def web_values() - import webserver - self.web_values_prefix() # display '| ' and name if present - webserver.content_send(format("%s %s %s", - self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(), - self.web_value_RGB())) - end - - # Show on/off value as html - def web_value_RGB() - if self.shadow_hue != nil && self.shadow_sat != nil - var l = light_state(3) # RGB virtual light state object - l.set_bri(255) # set full brightness to get full range RGB - l.set_huesat(tasmota.scale_uint(self.shadow_hue, 0, 254, 0, 360), tasmota.scale_uint(self.shadow_sat, 0, 254, 0, 255)) - var rgb_hex = format("#%02X%02X%02X", l.r, l.g, l.b) - var rgb_html = format('%s', rgb_hex, rgb_hex) - return rgb_html - end - return "" - end -end -matter.Plugin_Bridge_Light3 = Matter_Plugin_Bridge_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light0.be new file mode 100644 index 000000000..e8c444908 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light0.be @@ -0,0 +1,32 @@ +# +# Matter_Plugin_Bridge_Light0.be - implements the behavior for a remote generic Lighting (OnOff only) 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Light0,weak + +class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Light0 + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_light0" # name of the plug-in in json + # static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in + static var UPDATE_TIME = 3000 # update every 3s +end +matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light1.be new file mode 100644 index 000000000..36df0c048 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light1.be @@ -0,0 +1,34 @@ +# +# Matter_Plugin_Bridge_Light1.be - implements the behavior for a remote generic Lighting (Dimmer) 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Light1,weak + +class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Light1 + static var BRIDGE = true + static var TYPE = "http_light1" # name of the plug-in in json + # static var DISPLAY_NAME = "Light 1 Dimmer" # 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 = 3000 # update every 3s +end +matter.Plugin_Bridge_Light1 = Matter_Plugin_Bridge_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light2.be new file mode 100644 index 000000000..85c6ca91d --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light2.be @@ -0,0 +1,34 @@ +# +# Matter_Plugin_Bridge_Light2.be - implements the behavior for a remote generic Lighting (CT) 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Light2,weak + +class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Light2 + static var BRIDGE = true + static var TYPE = "http_light2" # name of the plug-in in json + # static var DISPLAY_NAME = "Light 2 CT" # 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 = 3000 # update every 3s +end +matter.Plugin_Bridge_Light2 = Matter_Plugin_Bridge_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light3.be new file mode 100644 index 000000000..0d41d6721 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Light3.be @@ -0,0 +1,34 @@ +# +# Matter_Plugin_Bridge_Light3.be - implements the behavior for a remote generic Lighting (RGB) 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 . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Light3,weak + +class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Light3 + static var BRIDGE = true + static var TYPE = "http_light3" # name of the plug-in in json + # static var DISPLAY_NAME = "Light 3 RGB" # 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 = 3000 # update every 3s +end +matter.Plugin_Bridge_Light3 = Matter_Plugin_Bridge_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_OnOff.be similarity index 100% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_4_Bridge_OnOff.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_OnOff.be diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Air_Quality.be similarity index 55% rename from lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be rename to lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Air_Quality.be index b0515eb9e..c7a3571f0 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_3_Bridge_Sensor_Air_Quality.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Air_Quality.be @@ -23,69 +23,58 @@ import matter #@ solidify:Matter_Plugin_Bridge_Sensor_Air_Quality,weak -class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Bridge_HTTP +class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality + static var BRIDGE = true static var TYPE = "http_airquality" # name of the plug-in in json - static var DISPLAY_NAME = "Air Quality" # display name of the plug-in - static var ARG = "airquality" # additional argument name (or empty if none) - static var ARG_HINT = "Sensor Model" + # static var DISPLAY_NAME = "Air Quality" # display name of the plug-in + # static var ARG = "airquality" # additional argument name (or empty if none) + # static var ARG_HINT = "Sensor Model" # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type static var UPDATE_TIME = 5000 # update every 5s - static var UPDATE_CMD = "Status 8" # command to send for updates + static var UPDATE_CMD = "Status 10" # command to send for updates - static var CLUSTERS = matter.consolidate_clusters(_class, { - 0x005B: [0], # Air Quality - no writable - 0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement - 0x042C: [0,1,2,8,9], # PM1 Concentration Measurement - 0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement - 0x042D: [0,1,2,8,9], # PM10 Concentration Measurement - 0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement - 0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement - }) + # static var CLUSTERS = matter.consolidate_clusters(_class, { + # 0x005B: [0], # Air Quality - no writable + # 0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement + # 0x042C: [0,1,2,8,9], # PM1 Concentration Measurement + # 0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement + # 0x042D: [0,1,2,8,9], # PM10 Concentration Measurement + # 0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement + # 0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement + # }) - static var TYPES = { 0x002C: 1 } # Air Quality, rev 1 + # static var TYPES = { 0x002C: 1 } # Air Quality, rev 1 - var prefix # key prefix in JSON - var shadow_air_quality # Human readable air quality index + # var prefix # key prefix in JSON + # var shadow_air_quality # Human readable air quality index # 0: Unknown # 1: Good # 4: Poor - # var shadow_pb0_3 - # var shadow_pb0_5 - # var shadow_pb1 - # var shadow_pb2_5 - # var shadow_pb5 - # var shadow_pb10 - var shadow_pm1 - var shadow_pm2_5 - # var shadow_pm5 - var shadow_pm10 - var shadow_co2 - # var shadow_eco2 - var shadow_no2 - var shadow_tvoc - - ############################################################# - # Constructor - def init(device, endpoint, arguments) - super(self).init(device, endpoint, arguments) - self.prefix = str(arguments.find(self.ARG)) - end + # # var shadow_pb0_3 + # # var shadow_pb0_5 + # # var shadow_pb1 + # # var shadow_pb2_5 + # # var shadow_pb5 + # # var shadow_pb10 + # var shadow_pm1 + # var shadow_pm2_5 + # # var shadow_pm5 + # var shadow_pm10 + # var shadow_co2 + # # var shadow_eco2 + # var shadow_no2 + # var shadow_tvoc ############################################################# # Stub for updating shadow values (local copies of what we published to the Matter gateway) # # This call is synnchronous and blocking. - def parse_update(data, index) - if index == 8 # Status 8 + def parse_status(data, index) + if index == 10 # Status 10 var values = data.find(self.prefix) end end - ############################################################# - # read an attribute - # - def read_attribute = matter.Plugin_Sensor_Air_Quality.read_attribute - ############################################################# # web_values # diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Contact.be new file mode 100644 index 000000000..4175ddf53 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Contact.be @@ -0,0 +1,36 @@ +# +# Matter_Plugin_Bridge_Sensor_Contact.be - implements Contact Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Contact,weak + +class Matter_Plugin_Bridge_Sensor_Contact : Matter_Plugin_Sensor_Contact + static var BRIDGE = true + static var TYPE = "http_contact" # name of the plug-in in json + # static var DISPLAY_NAME = "Contact" # display name of the plug-in + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 10" # command to send for updates +end +matter.Plugin_Bridge_Sensor_Contact = Matter_Plugin_Bridge_Sensor_Contact diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Flow.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Flow.be new file mode 100644 index 000000000..5dfc2309c --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Flow.be @@ -0,0 +1,30 @@ +# +# Matter_Plugin_Bridge_Sensor_Flow.be - implements base class for a Flow Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Flow,weak + +class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Sensor_Flow + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_flow" # name of the plug-in in json +end +matter.Plugin_Bridge_Sensor_Flow = Matter_Plugin_Bridge_Sensor_Flow diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Humidity.be new file mode 100644 index 000000000..17a79f087 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Humidity.be @@ -0,0 +1,30 @@ +# +# Matter_Plugin_Bridge_Sensor_Humidity.be - implements base class for a Humidity Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Humidity,weak + +class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Sensor_Humidity + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_humidity" # name of the plug-in in json +end +matter.Plugin_Bridge_Sensor_Humidity = Matter_Plugin_Bridge_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Illuminance.be new file mode 100644 index 000000000..4e1df74c5 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Illuminance.be @@ -0,0 +1,30 @@ +# +# Matter_Plugin_Bridge_Sensor_Illuminance.be - implements base class for a Light/Illuminance Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Illuminance,weak + +class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Sensor_Illuminance + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_illuminance" # name of the plug-in in json +end +matter.Plugin_Bridge_Sensor_Illuminance = Matter_Plugin_Bridge_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Occupancy.be new file mode 100644 index 000000000..06cfe2fb5 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Occupancy.be @@ -0,0 +1,36 @@ +# +# Matter_Plugin_Bridge_Sensor_Occupancy.be - implements base class for a Occupancy Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Occupancy,weak + +class Matter_Plugin_Bridge_Sensor_Occupancy : Matter_Plugin_Sensor_Occupancy + static var BRIDGE = true + static var TYPE = "http_occupancy" # name of the plug-in in json + # static var DISPLAY_NAME = "Occupancy" # display name of the plug-in + # static var ARG = "switch" # additional argument name (or empty if none) + # static var ARG_HINT = "Switch number" + # static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 10" # command to send for updates +end +matter.Plugin_Bridge_Sensor_Occupancy = Matter_Plugin_Bridge_Sensor_Occupancy diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Pressure.be new file mode 100644 index 000000000..978a21dd8 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Pressure.be @@ -0,0 +1,30 @@ +# +# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Pressure Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Pressure,weak + +class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Sensor_Pressure + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_pressure" # name of the plug-in in json +end +matter.Plugin_Bridge_Sensor_Pressure = Matter_Plugin_Bridge_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Temp.be new file mode 100644 index 000000000..a30e6d56f --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Temp.be @@ -0,0 +1,30 @@ +# +# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Temperature Sensor via HTTP to Tasmota +# +# Copyright (C) 2023 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Temp,weak + +class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Sensor_Temp + static var BRIDGE = true # flag as bridged device + static var TYPE = "http_temperature" # name of the plug-in in json +end +matter.Plugin_Bridge_Sensor_Temp = Matter_Plugin_Bridge_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Waterleak.be new file mode 100644 index 000000000..352c61995 --- /dev/null +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_8_Bridge_Sensor_Waterleak.be @@ -0,0 +1,32 @@ +# +# Matter_Plugin_Bridge_Sensor_Waterleak.be - implements Waterleak Sensor via HTTP to Tasmota +# +# Copyright (C) 2024 Stephan Hadinger & Theo Arends +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +import matter + +# Matter plug-in for core behavior + +#@ solidify:Matter_Plugin_Bridge_Sensor_Waterleak,weak + +class Matter_Plugin_Bridge_Sensor_Waterleak : Matter_Plugin_Sensor_Waterleak + static var BRIDGE = true + static var TYPE = "http_waterleak" # name of the plug-in in json + static var UPDATE_TIME = 5000 # update every 5s + static var UPDATE_CMD = "Status 10" # command to send for updates +end +matter.Plugin_Bridge_Sensor_Waterleak = Matter_Plugin_Bridge_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light0.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light0.be index cbe90af7d..65eb8988b 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light0.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light0.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light0 : Matter_Plugin_Light0 static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Light0 = Matter_Plugin_Virt_Light0 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light1.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light1.be index 8697bf2df..be198d422 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light1.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light1.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light1 : Matter_Plugin_Light1 static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Light1 = Matter_Plugin_Virt_Light1 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light2.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light2.be index 20876b842..1a57172fd 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light2.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light2.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light2 : Matter_Plugin_Light2 static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Light2 = Matter_Plugin_Virt_Light2 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light3.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light3.be index 15e7e2ae1..7889545e7 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light3.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Light3.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light3 : Matter_Plugin_Light3 static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Light3 = Matter_Plugin_Virt_Light3 diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_OnOff.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_OnOff.be index d9bb5403b..fa501b373 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_OnOff.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_OnOff.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_OnOff : Matter_Plugin_OnOff static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_OnOff = Matter_Plugin_Virt_OnOff diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be index f969398c3..23218b55d 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Air_Quality.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Air_Quality = Matter_Plugin_Virt_Sensor_Air_Quality diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Contact.be index 0cf722866..af7b4aff1 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Contact.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Contact.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Contact : Matter_Plugin_Sensor_Contact static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Contact = Matter_Plugin_Virt_Sensor_Contact diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Flow.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Flow.be index e915ab77e..e79d85071 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Flow.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Flow.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Flow : Matter_Plugin_Sensor_Flow static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Flow = Matter_Plugin_Virt_Sensor_Flow diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Humidity.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Humidity.be index 0fb033a55..e5644cd57 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Humidity.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Humidity.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Humidity : Matter_Plugin_Sensor_Humidity static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Humidity = Matter_Plugin_Virt_Sensor_Humidity diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Illuminance.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Illuminance.be index 76090f41a..1e44ac7f7 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Illuminance.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Illuminance.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Illuminance : Matter_Plugin_Sensor_Illuminance static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Illuminance = Matter_Plugin_Virt_Sensor_Illuminance diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Occupancy.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Occupancy.be index 9b4f82004..876db5536 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Occupancy.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Occupancy.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Occupancy : Matter_Plugin_Sensor_Occupancy static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Occupancy = Matter_Plugin_Virt_Sensor_Occupancy diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Pressure.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Pressure.be index c661b2b0d..a610f09db 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Pressure.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Pressure.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Pressure : Matter_Plugin_Sensor_Pressure static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Pressure = Matter_Plugin_Virt_Sensor_Pressure diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Temp.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Temp.be index 8ad2b11e3..2b835a4be 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Temp.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Temp.be @@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Temp : Matter_Plugin_Sensor_Temp static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Temp = Matter_Plugin_Virt_Sensor_Temp diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be index a2bde6498..63573b214 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_9_Virt_Sensor_Waterleak.be @@ -30,6 +30,5 @@ class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak static var ARG = "" # no arg for virtual device static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder') static var VIRTUAL = true # virtual device - end matter.Plugin_Virt_Sensor_Waterleak = Matter_Plugin_Virt_Sensor_Waterleak diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be index a325ead88..0b31305b9 100644 --- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be +++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be @@ -559,11 +559,11 @@ class Matter_UI end #---------------------------------------------------------------------- -# - # Generate configuration map from Status 8 and Status 11 + # Generate configuration map from Status 10 and Status 11 # # Returns a list of maps: [ {"type":"temperature", "filter":"ESP32#Temperature"} ] #---------------------------------------------------------------------- -# - def generate_config_from_status(status8, status11) + def generate_config_from_status(status10, status11) var config_list = [] # count `Power` and `Power` @@ -614,7 +614,7 @@ class Matter_UI # detect sensors - config_list += self.device.autoconf_sensors_list(status8) + config_list += self.device.autoconf_sensors_list(status10) return config_list end @@ -627,24 +627,24 @@ class Matter_UI import json if url == '' return end - var timeout = matter.Plugin_Bridge_HTTP.PROBE_TIMEOUT + var timeout = matter.Plugin_Device.PROBE_TIMEOUT var http_remote = matter.HTTP_remote(nil, url, timeout) - # Status 8 - var status8 = http_remote.call_sync('Status 8', timeout) - if status8 != nil status8 = json.load(status8) end - if status8 != nil status8 = status8.find('StatusSNS') end + # Status 10 + var status10 = http_remote.call_sync('Status 10', timeout) + if status10 != nil status10 = json.load(status10) end + if status10 != nil status10 = status10.find('StatusSNS') end # Status 11 var status11 - if status8 != nil + if status10 != nil status11 = http_remote.call_sync('Status 11', timeout) if status11 != nil status11 = json.load(status11) end if status11 != nil status11 = status11.find('StatusSTS') end end - if status8 != nil && status11 != nil - tasmota.log(format("MTR: probed '%s' status8=%s satus11=%s", url, str(status8), str(status11)), 3) + if status10 != nil && status11 != nil + tasmota.log(format("MTR: probed '%s' status10=%s satus11=%s", url, str(status10), str(status11)), 3) - var config_list = self.generate_config_from_status(status8, status11) + var config_list = self.generate_config_from_status(status10, status11) self.show_plugins_hints_js(self._CLASSES_TYPES2) @@ -1028,7 +1028,7 @@ class Matter_UI while idx < size(self.device.plugins) var plg = self.device.plugins[idx] - if isinstance(plg, matter.Plugin_Bridge_HTTP) + if plg.BRIDGE if bridge_plugin_by_host == nil bridge_plugin_by_host = {} end var host = plg.http_remote.addr diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h index 8e516d7ac..3328ff109 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_HTTP_remote.h @@ -7,39 +7,55 @@ extern const bclass be_class_Matter_HTTP_remote; /******************************************************************** -** Solidified function: device_is_alive +** Solidified function: add_schedule ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_device_is_alive, /* name */ +be_local_closure(class_Matter_HTTP_remote_add_schedule, /* name */ be_nested_proto( - 4, /* nstack */ - 2, /* argc */ + 8, /* nstack */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(reachable), - /* K1 */ be_nested_str_weak(reachable_utc), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(rtc_utc), + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(probe_update_time_map), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(probe_next_timestamp_map), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(jitter), + /* K5 */ be_nested_str_weak(add_async_cb), }), - be_str_weak(device_is_alive), + be_str_weak(add_schedule), &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x78060006, // 0000 JMPF R1 #0008 - 0x50080200, // 0001 LDBOOL R2 1 0 - 0x90020002, // 0002 SETMBR R0 K0 R2 - 0xB80A0400, // 0003 GETNGBL R2 K2 - 0x8C080503, // 0004 GETMET R2 R2 K3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020202, // 0006 SETMBR R0 K1 R2 - 0x70020001, // 0007 JMP #000A - 0x50080000, // 0008 LDBOOL R2 0 0 - 0x90020002, // 0009 SETMBR R0 K0 R2 - 0x80000000, // 000A RET 0 + ( &(const binstruction[25]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x5C180200, // 0002 MOVE R6 R1 + 0x7C100400, // 0003 CALL R4 2 + 0x78120003, // 0004 JMPF R4 #0009 + 0x88100100, // 0005 GETMBR R4 R0 K0 + 0x94100801, // 0006 GETIDX R4 R4 R1 + 0x14100404, // 0007 LT R4 R2 R4 + 0x78120007, // 0008 JMPF R4 #0011 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x98100202, // 000A SETIDX R4 R1 R2 + 0x88100102, // 000B GETMBR R4 R0 K2 + 0xB8160600, // 000C GETNGBL R5 K3 + 0x8C140B04, // 000D GETMET R5 R5 K4 + 0x5C1C0400, // 000E MOVE R7 R2 + 0x7C140400, // 000F CALL R5 2 + 0x98100205, // 0010 SETIDX R4 R1 R5 + 0x4C100000, // 0011 LDNIL R4 + 0x20100604, // 0012 NE R4 R3 R4 + 0x78120003, // 0013 JMPF R4 #0018 + 0x8C100105, // 0014 GETMET R4 R0 K5 + 0x5C180600, // 0015 MOVE R6 R3 + 0x5C1C0200, // 0016 MOVE R7 R1 + 0x7C100600, // 0017 CALL R4 3 + 0x80000000, // 0018 RET 0 }) ) ); @@ -47,10 +63,95 @@ be_local_closure(class_Matter_HTTP_remote_device_is_alive, /* name */ /******************************************************************** -** Solidified function: parse_update +** Solidified function: dispatch_cb ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_parse_update, /* name */ +be_local_closure(class_Matter_HTTP_remote_dispatch_cb, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(async_cb_map), + /* K2 */ be_nested_str_weak(keys), + /* K3 */ be_nested_str_weak(current_cmd), + /* K4 */ be_nested_str_weak(stop_iteration), + }), + be_str_weak(dispatch_cb), + &be_const_str_solidified, + ( &(const binstruction[27]) { /* code */ + 0x580C0000, // 0000 LDCONST R3 K0 + 0x60100010, // 0001 GETGBL R4 G16 + 0x88140101, // 0002 GETMBR R5 R0 K1 + 0x8C140B02, // 0003 GETMET R5 R5 K2 + 0x7C140200, // 0004 CALL R5 1 + 0x7C100200, // 0005 CALL R4 1 + 0xA802000F, // 0006 EXBLK 0 #0017 + 0x5C140800, // 0007 MOVE R5 R4 + 0x7C140000, // 0008 CALL R5 0 + 0x88180101, // 0009 GETMBR R6 R0 K1 + 0x94180C05, // 000A GETIDX R6 R6 R5 + 0x881C0103, // 000B GETMBR R7 R0 K3 + 0x1C1C0C07, // 000C EQ R7 R6 R7 + 0x741E0002, // 000D JMPT R7 #0011 + 0x4C1C0000, // 000E LDNIL R7 + 0x1C1C0C07, // 000F EQ R7 R6 R7 + 0x781E0004, // 0010 JMPF R7 #0016 + 0x5C1C0A00, // 0011 MOVE R7 R5 + 0x5C200200, // 0012 MOVE R8 R1 + 0x5C240400, // 0013 MOVE R9 R2 + 0x88280103, // 0014 GETMBR R10 R0 K3 + 0x7C1C0600, // 0015 CALL R7 3 + 0x7001FFEF, // 0016 JMP #0007 + 0x58100004, // 0017 LDCONST R4 K4 + 0xAC100200, // 0018 CATCH R4 1 0 + 0xB0080000, // 0019 RAISE 2 R0 R0 + 0x80000000, // 001A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_info +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_get_info, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(info), + }), + be_str_weak(get_info), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status_http +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_parse_status_http, /* name */ be_nested_proto( 12, /* nstack */ 3, /* argc */ @@ -90,7 +191,7 @@ be_local_closure(class_Matter_HTTP_remote_parse_update, /* name */ /* K26 */ be_nested_str_weak(UPDATE_CMD5), /* K27 */ be_nested_str_weak(info_changed), }), - be_str_weak(parse_update), + be_str_weak(parse_status_http), &be_const_str_solidified, ( &(const binstruction[145]) { /* code */ 0x500C0000, // 0000 LDBOOL R3 0 0 @@ -245,120 +346,67 @@ be_local_closure(class_Matter_HTTP_remote_parse_update, /* name */ /******************************************************************** -** Solidified function: call_sync +** Solidified function: set_info ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_call_sync, /* name */ +be_local_closure(class_Matter_HTTP_remote_set_info, /* name */ be_nested_proto( - 16, /* nstack */ - 3, /* argc */ + 2, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[24]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(webserver), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(wifi), - /* K4 */ be_nested_str_weak(up), - /* K5 */ be_nested_str_weak(eth), - /* K6 */ be_nested_str_weak(current_cmd), - /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), - /* K8 */ be_nested_str_weak(tr), - /* K9 */ be_nested_str_weak(_X20), - /* K10 */ be_nested_str_weak(_X2B), - /* K11 */ be_nested_str_weak(log), - /* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), - /* K13 */ be_nested_str_weak(addr), - /* K14 */ be_nested_str_weak(port), - /* K15 */ be_const_int(3), - /* K16 */ be_nested_str_weak(begin_sync), - /* K17 */ be_nested_str_weak(nil), - /* K18 */ be_const_int(0), - /* K19 */ be_nested_str_weak(_X2E_X2E_X2E), - /* K20 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X2Dresp_X20_X20in_X20_X25i_X20ms_X20from_X20_X25s_X3A_X20_X5B_X25i_X5D_X20_X27_X25s_X27), - /* K21 */ be_nested_str_weak(millis), - /* K22 */ be_nested_str_weak(time_start), - /* K23 */ be_nested_str_weak(payload), + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(info), }), - be_str_weak(call_sync), + be_str_weak(set_info), &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0xA4120200, // 0001 IMPORT R4 K1 - 0xB8160400, // 0002 GETNGBL R5 K2 - 0x8C140B03, // 0003 GETMET R5 R5 K3 - 0x7C140200, // 0004 CALL R5 1 - 0x94140B04, // 0005 GETIDX R5 R5 K4 - 0x74160006, // 0006 JMPT R5 #000E - 0xB8160400, // 0007 GETNGBL R5 K2 - 0x8C140B05, // 0008 GETMET R5 R5 K5 - 0x7C140200, // 0009 CALL R5 1 - 0x94140B04, // 000A GETIDX R5 R5 K4 - 0x74160001, // 000B JMPT R5 #000E - 0x4C140000, // 000C LDNIL R5 - 0x80040A00, // 000D RET 1 R5 - 0x4C140000, // 000E LDNIL R5 - 0x90020C05, // 000F SETMBR R0 K6 R5 - 0x8C140708, // 0010 GETMET R5 R3 K8 - 0x5C1C0200, // 0011 MOVE R7 R1 - 0x58200009, // 0012 LDCONST R8 K9 - 0x5824000A, // 0013 LDCONST R9 K10 - 0x7C140800, // 0014 CALL R5 4 - 0x00160E05, // 0015 ADD R5 K7 R5 - 0xB81A0400, // 0016 GETNGBL R6 K2 - 0x8C180D0B, // 0017 GETMET R6 R6 K11 - 0x60200018, // 0018 GETGBL R8 G24 - 0x5824000C, // 0019 LDCONST R9 K12 - 0x8828010D, // 001A GETMBR R10 R0 K13 - 0x882C010E, // 001B GETMBR R11 R0 K14 - 0x5C300A00, // 001C MOVE R12 R5 - 0x7C200800, // 001D CALL R8 4 - 0x5824000F, // 001E LDCONST R9 K15 - 0x7C180600, // 001F CALL R6 3 - 0x60180003, // 0020 GETGBL R6 G3 - 0x5C1C0000, // 0021 MOVE R7 R0 - 0x7C180200, // 0022 CALL R6 1 - 0x8C180D10, // 0023 GETMET R6 R6 K16 - 0x5C200A00, // 0024 MOVE R8 R5 - 0x5C240400, // 0025 MOVE R9 R2 - 0x7C180600, // 0026 CALL R6 3 - 0x781A0001, // 0027 JMPF R6 #002A - 0x5C1C0C00, // 0028 MOVE R7 R6 - 0x70020000, // 0029 JMP #002B - 0x581C0011, // 002A LDCONST R7 K17 - 0x6020000C, // 002B GETGBL R8 G12 - 0x5C240E00, // 002C MOVE R9 R7 - 0x7C200200, // 002D CALL R8 1 - 0x5426001D, // 002E LDINT R9 30 - 0x24201009, // 002F GT R8 R8 R9 - 0x78220004, // 0030 JMPF R8 #0036 - 0x5422001C, // 0031 LDINT R8 29 - 0x40222408, // 0032 CONNECT R8 K18 R8 - 0x94200E08, // 0033 GETIDX R8 R7 R8 - 0x00201113, // 0034 ADD R8 R8 K19 - 0x5C1C1000, // 0035 MOVE R7 R8 - 0xB8220400, // 0036 GETNGBL R8 K2 - 0x8C20110B, // 0037 GETMET R8 R8 K11 - 0x60280018, // 0038 GETGBL R10 G24 - 0x582C0014, // 0039 LDCONST R11 K20 - 0xB8320400, // 003A GETNGBL R12 K2 - 0x8C301915, // 003B GETMET R12 R12 K21 - 0x7C300200, // 003C CALL R12 1 - 0x88340116, // 003D GETMBR R13 R0 K22 - 0x0430180D, // 003E SUB R12 R12 R13 - 0x8834010D, // 003F GETMBR R13 R0 K13 - 0x6038000C, // 0040 GETGBL R14 G12 - 0x883C0117, // 0041 GETMBR R15 R0 K23 - 0x7C380200, // 0042 CALL R14 1 - 0x5C3C0E00, // 0043 MOVE R15 R7 - 0x7C280A00, // 0044 CALL R10 5 - 0x582C000F, // 0045 LDCONST R11 K15 - 0x7C200600, // 0046 CALL R8 3 - 0x80040C00, // 0047 RET 1 R6 + ( &(const binstruction[ 2]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x80000000, // 0001 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: device_is_alive +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_device_is_alive, /* name */ + be_nested_proto( + 4, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(reachable), + /* K1 */ be_nested_str_weak(reachable_utc), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(rtc_utc), + }), + be_str_weak(device_is_alive), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x78060006, // 0000 JMPF R1 #0008 + 0x50080200, // 0001 LDBOOL R2 1 0 + 0x90020002, // 0002 SETMBR R0 K0 R2 + 0xB80A0400, // 0003 GETNGBL R2 K2 + 0x8C080503, // 0004 GETMET R2 R2 K3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020202, // 0006 SETMBR R0 K1 R2 + 0x70020001, // 0007 JMP #000A + 0x50080000, // 0008 LDBOOL R2 0 0 + 0x90020002, // 0009 SETMBR R0 K0 R2 + 0x80000000, // 000A RET 0 }) ) ); @@ -449,6 +497,113 @@ be_local_closure(class_Matter_HTTP_remote_event_http_finished, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: probe_async +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_probe_async, /* name */ + be_nested_proto( + 12, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[16]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(webserver), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(wifi), + /* K4 */ be_nested_str_weak(up), + /* K5 */ be_nested_str_weak(eth), + /* K6 */ be_nested_str_weak(current_cmd), + /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), + /* K8 */ be_nested_str_weak(tr), + /* K9 */ be_nested_str_weak(_X20), + /* K10 */ be_nested_str_weak(_X2B), + /* K11 */ be_nested_str_weak(log), + /* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20async_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), + /* K13 */ be_nested_str_weak(addr), + /* K14 */ be_nested_str_weak(port), + /* K15 */ be_nested_str_weak(begin), + }), + be_str_weak(probe_async), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0xA40A0000, // 0000 IMPORT R2 K0 + 0xA40E0200, // 0001 IMPORT R3 K1 + 0xB8120400, // 0002 GETNGBL R4 K2 + 0x8C100903, // 0003 GETMET R4 R4 K3 + 0x7C100200, // 0004 CALL R4 1 + 0x94100904, // 0005 GETIDX R4 R4 K4 + 0x74120006, // 0006 JMPT R4 #000E + 0xB8120400, // 0007 GETNGBL R4 K2 + 0x8C100905, // 0008 GETMET R4 R4 K5 + 0x7C100200, // 0009 CALL R4 1 + 0x94100904, // 000A GETIDX R4 R4 K4 + 0x74120001, // 000B JMPT R4 #000E + 0x4C100000, // 000C LDNIL R4 + 0x80040800, // 000D RET 1 R4 + 0x90020C01, // 000E SETMBR R0 K6 R1 + 0x8C100508, // 000F GETMET R4 R2 K8 + 0x5C180200, // 0010 MOVE R6 R1 + 0x581C0009, // 0011 LDCONST R7 K9 + 0x5820000A, // 0012 LDCONST R8 K10 + 0x7C100800, // 0013 CALL R4 4 + 0x00120E04, // 0014 ADD R4 K7 R4 + 0xB8160400, // 0015 GETNGBL R5 K2 + 0x8C140B0B, // 0016 GETMET R5 R5 K11 + 0x601C0018, // 0017 GETGBL R7 G24 + 0x5820000C, // 0018 LDCONST R8 K12 + 0x8824010D, // 0019 GETMBR R9 R0 K13 + 0x8828010E, // 001A GETMBR R10 R0 K14 + 0x5C2C0800, // 001B MOVE R11 R4 + 0x7C1C0800, // 001C CALL R7 4 + 0x54220003, // 001D LDINT R8 4 + 0x7C140600, // 001E CALL R5 3 + 0x8C14010F, // 001F GETMET R5 R0 K15 + 0x5C1C0800, // 0020 MOVE R7 R4 + 0x7C140400, // 0021 CALL R5 2 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: info_changed +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_info_changed, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(save_param), + }), + be_str_weak(info_changed), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x7C040200, // 0002 CALL R1 1 + 0x80000000, // 0003 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: web_last_seen ********************************************************************/ @@ -498,120 +653,313 @@ be_local_closure(class_Matter_HTTP_remote_web_last_seen, /* name */ /******************************************************************** -** Solidified function: event_http_failed +** Solidified function: init ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_event_http_failed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(current_cmd), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20failed), - /* K4 */ be_const_int(3), - /* K5 */ be_nested_str_weak(dispatch_cb), - /* K6 */ be_nested_str_weak(http_status), - }), - be_str_weak(event_http_failed), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060000, // 0003 JMPF R1 #0005 - 0x80000200, // 0004 RET 0 - 0xB8060200, // 0005 GETNGBL R1 K1 - 0x8C040302, // 0006 GETMET R1 R1 K2 - 0x580C0003, // 0007 LDCONST R3 K3 - 0x58100004, // 0008 LDCONST R4 K4 - 0x7C040600, // 0009 CALL R1 3 - 0x8C040105, // 000A GETMET R1 R0 K5 - 0x880C0106, // 000B GETMBR R3 R0 K6 - 0x4C100000, // 000C LDNIL R4 - 0x7C040600, // 000D CALL R1 3 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_status_response -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_parse_status_response, /* name */ +be_local_closure(class_Matter_HTTP_remote_init, /* name */ be_nested_proto( 11, /* nstack */ - 4, /* argc */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 4]) { + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status_response_and_call_method), + /* K1 */ be_nested_str_weak(parse_status_http), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x68200000, // 0005 GETUPV R8 U0 + 0x68240000, // 0006 GETUPV R9 U0 + 0x88241301, // 0007 GETMBR R9 R9 K1 + 0x7C0C0C00, // 0008 CALL R3 6 + 0x80040600, // 0009 RET 1 R3 + }) + ), + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status_response_and_call_method), + /* K1 */ be_nested_str_weak(parse_status_http), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x68200000, // 0005 GETUPV R8 U0 + 0x68240000, // 0006 GETUPV R9 U0 + 0x88241301, // 0007 GETMBR R9 R9 K1 + 0x7C0C0C00, // 0008 CALL R3 6 + 0x80040600, // 0009 RET 1 R3 + }) + ), + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status_response_and_call_method), + /* K1 */ be_nested_str_weak(parse_status_http), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x68200000, // 0005 GETUPV R8 U0 + 0x68240000, // 0006 GETUPV R9 U0 + 0x88241301, // 0007 GETMBR R9 R9 K1 + 0x7C0C0C00, // 0008 CALL R3 6 + 0x80040600, // 0009 RET 1 R3 + }) + ), + &be_class_Matter_HTTP_remote, + }), + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(probe_update_time_map), + /* K2 */ be_nested_str_weak(probe_next_timestamp_map), + /* K3 */ be_nested_str_weak(async_cb_map), + /* K4 */ be_nested_str_weak(current_cmd), + /* K5 */ be_nested_str_weak(reachable), + /* K6 */ be_nested_str_weak(init), + /* K7 */ be_nested_str_weak(info), + /* K8 */ be_nested_str_weak(add_schedule), + /* K9 */ be_nested_str_weak(UPDATE_CMD0), + /* K10 */ be_nested_str_weak(UPDATE_TIME), + /* K11 */ be_nested_str_weak(UPDATE_CMD2), + /* K12 */ be_nested_str_weak(UPDATE_CMD5), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x60140013, // 0001 GETGBL R5 G19 + 0x7C140000, // 0002 CALL R5 0 + 0x90020205, // 0003 SETMBR R0 K1 R5 + 0x60140013, // 0004 GETGBL R5 G19 + 0x7C140000, // 0005 CALL R5 0 + 0x90020405, // 0006 SETMBR R0 K2 R5 + 0x60140013, // 0007 GETGBL R5 G19 + 0x7C140000, // 0008 CALL R5 0 + 0x90020605, // 0009 SETMBR R0 K3 R5 + 0x4C140000, // 000A LDNIL R5 + 0x90020805, // 000B SETMBR R0 K4 R5 + 0x50140000, // 000C LDBOOL R5 0 0 + 0x90020A05, // 000D SETMBR R0 K5 R5 + 0x60140003, // 000E GETGBL R5 G3 + 0x5C180000, // 000F MOVE R6 R0 + 0x7C140200, // 0010 CALL R5 1 + 0x8C140B06, // 0011 GETMET R5 R5 K6 + 0x5C1C0400, // 0012 MOVE R7 R2 + 0x5422004F, // 0013 LDINT R8 80 + 0x5C240600, // 0014 MOVE R9 R3 + 0x5C280800, // 0015 MOVE R10 R4 + 0x7C140A00, // 0016 CALL R5 5 + 0x60140013, // 0017 GETGBL R5 G19 + 0x7C140000, // 0018 CALL R5 0 + 0x90020E05, // 0019 SETMBR R0 K7 R5 + 0x88140100, // 001A GETMBR R5 R0 K0 + 0x7816000E, // 001B JMPF R5 #002B + 0x8C140108, // 001C GETMET R5 R0 K8 + 0x881C0109, // 001D GETMBR R7 R0 K9 + 0x8820010A, // 001E GETMBR R8 R0 K10 + 0x84240000, // 001F CLOSURE R9 P0 + 0x7C140800, // 0020 CALL R5 4 + 0x8C140108, // 0021 GETMET R5 R0 K8 + 0x881C010B, // 0022 GETMBR R7 R0 K11 + 0x8820010A, // 0023 GETMBR R8 R0 K10 + 0x84240001, // 0024 CLOSURE R9 P1 + 0x7C140800, // 0025 CALL R5 4 + 0x8C140108, // 0026 GETMET R5 R0 K8 + 0x881C010C, // 0027 GETMBR R7 R0 K12 + 0x8820010A, // 0028 GETMBR R8 R0 K10 + 0x84240002, // 0029 CLOSURE R9 P2 + 0x7C140800, // 002A CALL R5 4 + 0xA0000000, // 002B CLOSE R0 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: change_schedule +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_change_schedule, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(probe_update_time_map), + /* K1 */ be_nested_str_weak(contains), + /* K2 */ be_nested_str_weak(probe_next_timestamp_map), + /* K3 */ be_nested_str_weak(matter), + /* K4 */ be_nested_str_weak(jitter), + }), + be_str_weak(change_schedule), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x780E0007, // 0004 JMPF R3 #000D + 0x880C0100, // 0005 GETMBR R3 R0 K0 + 0x980C0202, // 0006 SETIDX R3 R1 R2 + 0x880C0102, // 0007 GETMBR R3 R0 K2 + 0xB8120600, // 0008 GETNGBL R4 K3 + 0x8C100904, // 0009 GETMET R4 R4 K4 + 0x5C180400, // 000A MOVE R6 R2 + 0x7C100400, // 000B CALL R4 2 + 0x980C0204, // 000C SETIDX R3 R1 R4 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status_response_and_call_method +********************************************************************/ +extern const bclass be_class_Matter_HTTP_remote; +be_local_closure(class_Matter_HTTP_remote_parse_status_response_and_call_method, /* name */ + be_nested_proto( + 14, /* nstack */ + 6, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_HTTP_remote, + 1, /* has constants */ + ( &(const bvalue[12]) { /* constants */ /* K0 */ be_const_int(0), /* K1 */ be_nested_str_weak(device_is_alive), - /* K2 */ be_nested_str_weak(json), - /* K3 */ be_nested_str_weak(load), - /* K4 */ be_nested_str_weak(contains), - /* K5 */ be_nested_str_weak(Status), - /* K6 */ be_nested_str_weak(StatusFWR), - /* K7 */ be_const_int(2), - /* K8 */ be_nested_str_weak(StatusNET), - /* K9 */ be_nested_str_weak(parse_update), + /* K2 */ be_nested_str_weak(string), + /* K3 */ be_nested_str_weak(json), + /* K4 */ be_nested_str_weak(load), + /* K5 */ be_nested_str_weak(STATUS_PREFIX), + /* K6 */ be_nested_str_weak(contains), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(MTR_X3A_X20_X2A_X2A_X2A_X20failed_X20to_X20parse_X20JSON_X20response_X20payload_X3D_X25s), + /* K11 */ be_const_int(3), }), - be_str_weak(parse_status_response), + be_str_weak(parse_status_response_and_call_method), &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x20100204, // 0001 NE R4 R1 R4 - 0x78120022, // 0002 JMPF R4 #0026 - 0x24100300, // 0003 GT R4 R1 K0 - 0x78120020, // 0004 JMPF R4 #0026 - 0x8C100101, // 0005 GETMET R4 R0 K1 - 0x50180200, // 0006 LDBOOL R6 1 0 - 0x7C100400, // 0007 CALL R4 2 - 0xA4120400, // 0008 IMPORT R4 K2 - 0x8C140903, // 0009 GETMET R5 R4 K3 - 0x5C1C0400, // 000A MOVE R7 R2 - 0x7C140400, // 000B CALL R5 2 - 0x4C180000, // 000C LDNIL R6 - 0x78160017, // 000D JMPF R5 #0026 - 0x8C1C0B04, // 000E GETMET R7 R5 K4 - 0x58240005, // 000F LDCONST R9 K5 - 0x7C1C0400, // 0010 CALL R7 2 - 0x781E0002, // 0011 JMPF R7 #0015 - 0x94140B05, // 0012 GETIDX R5 R5 K5 - 0x58180000, // 0013 LDCONST R6 K0 - 0x7002000C, // 0014 JMP #0022 - 0x8C1C0B04, // 0015 GETMET R7 R5 K4 - 0x58240006, // 0016 LDCONST R9 K6 - 0x7C1C0400, // 0017 CALL R7 2 - 0x781E0002, // 0018 JMPF R7 #001C - 0x94140B06, // 0019 GETIDX R5 R5 K6 - 0x58180007, // 001A LDCONST R6 K7 - 0x70020005, // 001B JMP #0022 - 0x8C1C0B04, // 001C GETMET R7 R5 K4 - 0x58240008, // 001D LDCONST R9 K8 - 0x7C1C0400, // 001E CALL R7 2 - 0x781E0001, // 001F JMPF R7 #0022 - 0x94140B08, // 0020 GETIDX R5 R5 K8 - 0x541A0004, // 0021 LDINT R6 5 - 0x8C1C0109, // 0022 GETMET R7 R0 K9 - 0x5C240A00, // 0023 MOVE R9 R5 - 0x5C280C00, // 0024 MOVE R10 R6 - 0x7C1C0600, // 0025 CALL R7 3 - 0x80000000, // 0026 RET 0 + ( &(const binstruction[58]) { /* code */ + 0x4C180000, // 0000 LDNIL R6 + 0x20180206, // 0001 NE R6 R1 R6 + 0x781A0035, // 0002 JMPF R6 #0039 + 0x24180300, // 0003 GT R6 R1 K0 + 0x781A0033, // 0004 JMPF R6 #0039 + 0x8C180101, // 0005 GETMET R6 R0 K1 + 0x50200200, // 0006 LDBOOL R8 1 0 + 0x7C180400, // 0007 CALL R6 2 + 0x5C180400, // 0008 MOVE R6 R2 + 0x601C0004, // 0009 GETGBL R7 G4 + 0x5C200C00, // 000A MOVE R8 R6 + 0x7C1C0200, // 000B CALL R7 1 + 0x1C1C0F02, // 000C EQ R7 R7 K2 + 0x781E0004, // 000D JMPF R7 #0013 + 0xA41E0600, // 000E IMPORT R7 K3 + 0x8C200F04, // 000F GETMET R8 R7 K4 + 0x5C280C00, // 0010 MOVE R10 R6 + 0x7C200400, // 0011 CALL R8 2 + 0x5C181000, // 0012 MOVE R6 R8 + 0x4C1C0000, // 0013 LDNIL R7 + 0x4C200000, // 0014 LDNIL R8 + 0x20200C08, // 0015 NE R8 R6 R8 + 0x78220019, // 0016 JMPF R8 #0031 + 0x58200000, // 0017 LDCONST R8 K0 + 0x88240105, // 0018 GETMBR R9 R0 K5 + 0x6028000C, // 0019 GETGBL R10 G12 + 0x5C2C1200, // 001A MOVE R11 R9 + 0x7C280200, // 001B CALL R10 1 + 0x1428100A, // 001C LT R10 R8 R10 + 0x782A000C, // 001D JMPF R10 #002B + 0x94281208, // 001E GETIDX R10 R9 R8 + 0x4C2C0000, // 001F LDNIL R11 + 0x202C140B, // 0020 NE R11 R10 R11 + 0x782E0006, // 0021 JMPF R11 #0029 + 0x8C2C0D06, // 0022 GETMET R11 R6 K6 + 0x5C341400, // 0023 MOVE R13 R10 + 0x7C2C0400, // 0024 CALL R11 2 + 0x782E0002, // 0025 JMPF R11 #0029 + 0x94180C0A, // 0026 GETIDX R6 R6 R10 + 0x5C1C1000, // 0027 MOVE R7 R8 + 0x70020001, // 0028 JMP #002B + 0x00201107, // 0029 ADD R8 R8 K7 + 0x7001FFED, // 002A JMP #0019 + 0x5C280A00, // 002B MOVE R10 R5 + 0x5C2C0800, // 002C MOVE R11 R4 + 0x5C300C00, // 002D MOVE R12 R6 + 0x5C340E00, // 002E MOVE R13 R7 + 0x7C280600, // 002F CALL R10 3 + 0x70020007, // 0030 JMP #0039 + 0xB8221000, // 0031 GETNGBL R8 K8 + 0x8C201109, // 0032 GETMET R8 R8 K9 + 0x60280018, // 0033 GETGBL R10 G24 + 0x582C000A, // 0034 LDCONST R11 K10 + 0x5C300400, // 0035 MOVE R12 R2 + 0x7C280400, // 0036 CALL R10 2 + 0x582C000B, // 0037 LDCONST R11 K11 + 0x7C200600, // 0038 CALL R8 3 + 0x80000000, // 0039 RET 0 }) ) ); @@ -619,116 +967,120 @@ be_local_closure(class_Matter_HTTP_remote_parse_status_response, /* name */ /******************************************************************** -** Solidified function: get_info +** Solidified function: call_sync ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_get_info, /* name */ +be_local_closure(class_Matter_HTTP_remote_call_sync, /* name */ be_nested_proto( - 2, /* nstack */ - 1, /* argc */ + 16, /* nstack */ + 3, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(info), + ( &(const bvalue[24]) { /* constants */ + /* K0 */ be_nested_str_weak(string), + /* K1 */ be_nested_str_weak(webserver), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(wifi), + /* K4 */ be_nested_str_weak(up), + /* K5 */ be_nested_str_weak(eth), + /* K6 */ be_nested_str_weak(current_cmd), + /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), + /* K8 */ be_nested_str_weak(tr), + /* K9 */ be_nested_str_weak(_X20), + /* K10 */ be_nested_str_weak(_X2B), + /* K11 */ be_nested_str_weak(log), + /* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), + /* K13 */ be_nested_str_weak(addr), + /* K14 */ be_nested_str_weak(port), + /* K15 */ be_nested_str_weak(begin_sync), + /* K16 */ be_nested_str_weak(nil), + /* K17 */ be_const_int(0), + /* K18 */ be_nested_str_weak(_X2E_X2E_X2E), + /* K19 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20sync_X2Dresp_X20_X20in_X20_X25i_X20ms_X20from_X20_X25s_X3A_X20_X5B_X25i_X5D_X20_X27_X25s_X27), + /* K20 */ be_nested_str_weak(millis), + /* K21 */ be_nested_str_weak(time_start), + /* K22 */ be_nested_str_weak(payload), + /* K23 */ be_const_int(3), }), - be_str_weak(get_info), + be_str_weak(call_sync), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: event_http_timeout -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_event_http_timeout, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(current_cmd), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(log), - /* K3 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20timeout_X20http_status_X3D_X25i_X20phase_X3D_X25i_X20tcp_status_X3D_X25i_X20size_payload_X3D_X25i), - /* K4 */ be_nested_str_weak(http_status), - /* K5 */ be_nested_str_weak(phase), - /* K6 */ be_nested_str_weak(status), - /* K7 */ be_nested_str_weak(payload), - /* K8 */ be_const_int(3), - /* K9 */ be_nested_str_weak(dispatch_cb), - }), - be_str_weak(event_http_timeout), - &be_const_str_solidified, - ( &(const binstruction[23]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060000, // 0003 JMPF R1 #0005 - 0x80000200, // 0004 RET 0 - 0xB8060200, // 0005 GETNGBL R1 K1 - 0x8C040302, // 0006 GETMET R1 R1 K2 - 0x600C0018, // 0007 GETGBL R3 G24 - 0x58100003, // 0008 LDCONST R4 K3 - 0x88140104, // 0009 GETMBR R5 R0 K4 - 0x88180105, // 000A GETMBR R6 R0 K5 - 0x881C0106, // 000B GETMBR R7 R0 K6 - 0x6020000C, // 000C GETGBL R8 G12 - 0x88240107, // 000D GETMBR R9 R0 K7 - 0x7C200200, // 000E CALL R8 1 - 0x7C0C0A00, // 000F CALL R3 5 - 0x58100008, // 0010 LDCONST R4 K8 - 0x7C040600, // 0011 CALL R1 3 - 0x8C040109, // 0012 GETMET R1 R0 K9 - 0x880C0104, // 0013 GETMBR R3 R0 K4 - 0x4C100000, // 0014 LDNIL R4 - 0x7C040600, // 0015 CALL R1 3 - 0x80000000, // 0016 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: info_changed -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_info_changed, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(save_param), - }), - be_str_weak(info_changed), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 + ( &(const binstruction[72]) { /* code */ + 0xA40E0000, // 0000 IMPORT R3 K0 + 0xA4120200, // 0001 IMPORT R4 K1 + 0xB8160400, // 0002 GETNGBL R5 K2 + 0x8C140B03, // 0003 GETMET R5 R5 K3 + 0x7C140200, // 0004 CALL R5 1 + 0x94140B04, // 0005 GETIDX R5 R5 K4 + 0x74160006, // 0006 JMPT R5 #000E + 0xB8160400, // 0007 GETNGBL R5 K2 + 0x8C140B05, // 0008 GETMET R5 R5 K5 + 0x7C140200, // 0009 CALL R5 1 + 0x94140B04, // 000A GETIDX R5 R5 K4 + 0x74160001, // 000B JMPT R5 #000E + 0x4C140000, // 000C LDNIL R5 + 0x80040A00, // 000D RET 1 R5 + 0x4C140000, // 000E LDNIL R5 + 0x90020C05, // 000F SETMBR R0 K6 R5 + 0x8C140708, // 0010 GETMET R5 R3 K8 + 0x5C1C0200, // 0011 MOVE R7 R1 + 0x58200009, // 0012 LDCONST R8 K9 + 0x5824000A, // 0013 LDCONST R9 K10 + 0x7C140800, // 0014 CALL R5 4 + 0x00160E05, // 0015 ADD R5 K7 R5 + 0xB81A0400, // 0016 GETNGBL R6 K2 + 0x8C180D0B, // 0017 GETMET R6 R6 K11 + 0x60200018, // 0018 GETGBL R8 G24 + 0x5824000C, // 0019 LDCONST R9 K12 + 0x8828010D, // 001A GETMBR R10 R0 K13 + 0x882C010E, // 001B GETMBR R11 R0 K14 + 0x5C300A00, // 001C MOVE R12 R5 + 0x7C200800, // 001D CALL R8 4 + 0x54260003, // 001E LDINT R9 4 + 0x7C180600, // 001F CALL R6 3 + 0x60180003, // 0020 GETGBL R6 G3 + 0x5C1C0000, // 0021 MOVE R7 R0 + 0x7C180200, // 0022 CALL R6 1 + 0x8C180D0F, // 0023 GETMET R6 R6 K15 + 0x5C200A00, // 0024 MOVE R8 R5 + 0x5C240400, // 0025 MOVE R9 R2 + 0x7C180600, // 0026 CALL R6 3 + 0x781A0001, // 0027 JMPF R6 #002A + 0x5C1C0C00, // 0028 MOVE R7 R6 + 0x70020000, // 0029 JMP #002B + 0x581C0010, // 002A LDCONST R7 K16 + 0x6020000C, // 002B GETGBL R8 G12 + 0x5C240E00, // 002C MOVE R9 R7 + 0x7C200200, // 002D CALL R8 1 + 0x5426001D, // 002E LDINT R9 30 + 0x24201009, // 002F GT R8 R8 R9 + 0x78220004, // 0030 JMPF R8 #0036 + 0x5422001C, // 0031 LDINT R8 29 + 0x40222208, // 0032 CONNECT R8 K17 R8 + 0x94200E08, // 0033 GETIDX R8 R7 R8 + 0x00201112, // 0034 ADD R8 R8 K18 + 0x5C1C1000, // 0035 MOVE R7 R8 + 0xB8220400, // 0036 GETNGBL R8 K2 + 0x8C20110B, // 0037 GETMET R8 R8 K11 + 0x60280018, // 0038 GETGBL R10 G24 + 0x582C0013, // 0039 LDCONST R11 K19 + 0xB8320400, // 003A GETNGBL R12 K2 + 0x8C301914, // 003B GETMET R12 R12 K20 + 0x7C300200, // 003C CALL R12 1 + 0x88340115, // 003D GETMBR R13 R0 K21 + 0x0430180D, // 003E SUB R12 R12 R13 + 0x8834010D, // 003F GETMBR R13 R0 K13 + 0x6038000C, // 0040 GETGBL R14 G12 + 0x883C0116, // 0041 GETMBR R15 R0 K22 + 0x7C380200, // 0042 CALL R14 1 + 0x5C3C0E00, // 0043 MOVE R15 R7 + 0x7C280A00, // 0044 CALL R10 5 + 0x582C0017, // 0045 LDCONST R11 K23 + 0x7C200600, // 0046 CALL R8 3 + 0x80040C00, // 0047 RET 1 R6 }) ) ); @@ -837,132 +1189,46 @@ be_local_closure(class_Matter_HTTP_remote_scheduler, /* name */ /******************************************************************** -** Solidified function: add_schedule +** Solidified function: event_http_failed ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_add_schedule, /* name */ +be_local_closure(class_Matter_HTTP_remote_event_http_failed, /* name */ be_nested_proto( - 8, /* nstack */ - 4, /* argc */ + 5, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(probe_update_time_map), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(probe_next_timestamp_map), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(jitter), - /* K5 */ be_nested_str_weak(add_async_cb), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(current_cmd), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20failed), + /* K4 */ be_const_int(3), + /* K5 */ be_nested_str_weak(dispatch_cb), + /* K6 */ be_nested_str_weak(http_status), }), - be_str_weak(add_schedule), + be_str_weak(event_http_failed), &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x5C180200, // 0002 MOVE R6 R1 - 0x7C100400, // 0003 CALL R4 2 - 0x78120003, // 0004 JMPF R4 #0009 - 0x88100100, // 0005 GETMBR R4 R0 K0 - 0x94100801, // 0006 GETIDX R4 R4 R1 - 0x14100404, // 0007 LT R4 R2 R4 - 0x78120007, // 0008 JMPF R4 #0011 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x98100202, // 000A SETIDX R4 R1 R2 - 0x88100102, // 000B GETMBR R4 R0 K2 - 0xB8160600, // 000C GETNGBL R5 K3 - 0x8C140B04, // 000D GETMET R5 R5 K4 - 0x5C1C0400, // 000E MOVE R7 R2 - 0x7C140400, // 000F CALL R5 2 - 0x98100205, // 0010 SETIDX R4 R1 R5 - 0x4C100000, // 0011 LDNIL R4 - 0x20100604, // 0012 NE R4 R3 R4 - 0x78120003, // 0013 JMPF R4 #0018 - 0x8C100105, // 0014 GETMET R4 R0 K5 - 0x5C180600, // 0015 MOVE R6 R3 - 0x5C1C0200, // 0016 MOVE R7 R1 - 0x7C100600, // 0017 CALL R4 3 - 0x80000000, // 0018 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: probe_async -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_probe_async, /* name */ - be_nested_proto( - 12, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[17]) { /* constants */ - /* K0 */ be_nested_str_weak(string), - /* K1 */ be_nested_str_weak(webserver), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(wifi), - /* K4 */ be_nested_str_weak(up), - /* K5 */ be_nested_str_weak(eth), - /* K6 */ be_nested_str_weak(current_cmd), - /* K7 */ be_nested_str_weak(_X2Fcm_X3Fcmnd_X3D), - /* K8 */ be_nested_str_weak(tr), - /* K9 */ be_nested_str_weak(_X20), - /* K10 */ be_nested_str_weak(_X2B), - /* K11 */ be_nested_str_weak(log), - /* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20async_X20request_X20_X27http_X3A_X2F_X2F_X25s_X3A_X25i_X25s_X27), - /* K13 */ be_nested_str_weak(addr), - /* K14 */ be_nested_str_weak(port), - /* K15 */ be_const_int(3), - /* K16 */ be_nested_str_weak(begin), - }), - be_str_weak(probe_async), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0xA40A0000, // 0000 IMPORT R2 K0 - 0xA40E0200, // 0001 IMPORT R3 K1 - 0xB8120400, // 0002 GETNGBL R4 K2 - 0x8C100903, // 0003 GETMET R4 R4 K3 - 0x7C100200, // 0004 CALL R4 1 - 0x94100904, // 0005 GETIDX R4 R4 K4 - 0x74120006, // 0006 JMPT R4 #000E - 0xB8120400, // 0007 GETNGBL R4 K2 - 0x8C100905, // 0008 GETMET R4 R4 K5 - 0x7C100200, // 0009 CALL R4 1 - 0x94100904, // 000A GETIDX R4 R4 K4 - 0x74120001, // 000B JMPT R4 #000E + ( &(const binstruction[15]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060000, // 0003 JMPF R1 #0005 + 0x80000200, // 0004 RET 0 + 0xB8060200, // 0005 GETNGBL R1 K1 + 0x8C040302, // 0006 GETMET R1 R1 K2 + 0x580C0003, // 0007 LDCONST R3 K3 + 0x58100004, // 0008 LDCONST R4 K4 + 0x7C040600, // 0009 CALL R1 3 + 0x8C040105, // 000A GETMET R1 R0 K5 + 0x880C0106, // 000B GETMBR R3 R0 K6 0x4C100000, // 000C LDNIL R4 - 0x80040800, // 000D RET 1 R4 - 0x90020C01, // 000E SETMBR R0 K6 R1 - 0x8C100508, // 000F GETMET R4 R2 K8 - 0x5C180200, // 0010 MOVE R6 R1 - 0x581C0009, // 0011 LDCONST R7 K9 - 0x5820000A, // 0012 LDCONST R8 K10 - 0x7C100800, // 0013 CALL R4 4 - 0x00120E04, // 0014 ADD R4 K7 R4 - 0xB8160400, // 0015 GETNGBL R5 K2 - 0x8C140B0B, // 0016 GETMET R5 R5 K11 - 0x601C0018, // 0017 GETGBL R7 G24 - 0x5820000C, // 0018 LDCONST R8 K12 - 0x8824010D, // 0019 GETMBR R9 R0 K13 - 0x8828010E, // 001A GETMBR R10 R0 K14 - 0x5C2C0800, // 001B MOVE R11 R4 - 0x7C1C0800, // 001C CALL R7 4 - 0x5820000F, // 001D LDCONST R8 K15 - 0x7C140600, // 001E CALL R5 3 - 0x8C140110, // 001F GETMET R5 R0 K16 - 0x5C1C0800, // 0020 MOVE R7 R4 - 0x7C140400, // 0021 CALL R5 2 - 0x80000000, // 0022 RET 0 + 0x7C040600, // 000D CALL R1 3 + 0x80000000, // 000E RET 0 }) ) ); @@ -999,291 +1265,57 @@ be_local_closure(class_Matter_HTTP_remote_add_async_cb, /* name */ /******************************************************************** -** Solidified function: set_info +** Solidified function: event_http_timeout ********************************************************************/ extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_set_info, /* name */ +be_local_closure(class_Matter_HTTP_remote_event_http_timeout, /* name */ be_nested_proto( - 2, /* nstack */ - 2, /* argc */ + 10, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_HTTP_remote, 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(info), + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(current_cmd), + /* K1 */ be_nested_str_weak(tasmota), + /* K2 */ be_nested_str_weak(log), + /* K3 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20timeout_X20http_status_X3D_X25i_X20phase_X3D_X25i_X20tcp_status_X3D_X25i_X20size_payload_X3D_X25i), + /* K4 */ be_nested_str_weak(http_status), + /* K5 */ be_nested_str_weak(phase), + /* K6 */ be_nested_str_weak(status), + /* K7 */ be_nested_str_weak(payload), + /* K8 */ be_const_int(3), + /* K9 */ be_nested_str_weak(dispatch_cb), }), - be_str_weak(set_info), + be_str_weak(event_http_timeout), &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x80000000, // 0001 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: dispatch_cb -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_dispatch_cb, /* name */ - be_nested_proto( - 11, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(async_cb_map), - /* K2 */ be_nested_str_weak(keys), - /* K3 */ be_nested_str_weak(current_cmd), - /* K4 */ be_nested_str_weak(stop_iteration), - }), - be_str_weak(dispatch_cb), - &be_const_str_solidified, - ( &(const binstruction[27]) { /* code */ - 0x580C0000, // 0000 LDCONST R3 K0 - 0x60100010, // 0001 GETGBL R4 G16 - 0x88140101, // 0002 GETMBR R5 R0 K1 - 0x8C140B02, // 0003 GETMET R5 R5 K2 - 0x7C140200, // 0004 CALL R5 1 - 0x7C100200, // 0005 CALL R4 1 - 0xA802000F, // 0006 EXBLK 0 #0017 - 0x5C140800, // 0007 MOVE R5 R4 - 0x7C140000, // 0008 CALL R5 0 - 0x88180101, // 0009 GETMBR R6 R0 K1 - 0x94180C05, // 000A GETIDX R6 R6 R5 - 0x881C0103, // 000B GETMBR R7 R0 K3 - 0x1C1C0C07, // 000C EQ R7 R6 R7 - 0x741E0002, // 000D JMPT R7 #0011 - 0x4C1C0000, // 000E LDNIL R7 - 0x1C1C0C07, // 000F EQ R7 R6 R7 - 0x781E0004, // 0010 JMPF R7 #0016 - 0x5C1C0A00, // 0011 MOVE R7 R5 - 0x5C200200, // 0012 MOVE R8 R1 - 0x5C240400, // 0013 MOVE R9 R2 - 0x88280103, // 0014 GETMBR R10 R0 K3 - 0x7C1C0600, // 0015 CALL R7 3 - 0x7001FFEF, // 0016 JMP #0007 - 0x58100004, // 0017 LDCONST R4 K4 - 0xAC100200, // 0018 CATCH R4 1 0 - 0xB0080000, // 0019 RAISE 2 R0 R0 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: change_schedule -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_change_schedule, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_HTTP_remote, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(probe_update_time_map), - /* K1 */ be_nested_str_weak(contains), - /* K2 */ be_nested_str_weak(probe_next_timestamp_map), - /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(jitter), - }), - be_str_weak(change_schedule), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x780E0007, // 0004 JMPF R3 #000D - 0x880C0100, // 0005 GETMBR R3 R0 K0 - 0x980C0202, // 0006 SETIDX R3 R1 R2 - 0x880C0102, // 0007 GETMBR R3 R0 K2 - 0xB8120600, // 0008 GETNGBL R4 K3 - 0x8C100904, // 0009 GETMET R4 R4 K4 - 0x5C180400, // 000A MOVE R6 R2 - 0x7C100400, // 000B CALL R4 2 - 0x980C0204, // 000C SETIDX R3 R1 R4 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_HTTP_remote; -be_local_closure(class_Matter_HTTP_remote_init, /* name */ - be_nested_proto( - 11, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 4]) { - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_status_response), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_status_response), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_status_response), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - &be_class_Matter_HTTP_remote, - }), - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(probe_update_time_map), - /* K2 */ be_nested_str_weak(probe_next_timestamp_map), - /* K3 */ be_nested_str_weak(async_cb_map), - /* K4 */ be_nested_str_weak(current_cmd), - /* K5 */ be_nested_str_weak(reachable), - /* K6 */ be_nested_str_weak(init), - /* K7 */ be_nested_str_weak(info), - /* K8 */ be_nested_str_weak(add_schedule), - /* K9 */ be_nested_str_weak(UPDATE_CMD0), - /* K10 */ be_nested_str_weak(UPDATE_TIME), - /* K11 */ be_nested_str_weak(UPDATE_CMD2), - /* K12 */ be_nested_str_weak(UPDATE_CMD5), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x60140013, // 0001 GETGBL R5 G19 - 0x7C140000, // 0002 CALL R5 0 - 0x90020205, // 0003 SETMBR R0 K1 R5 - 0x60140013, // 0004 GETGBL R5 G19 - 0x7C140000, // 0005 CALL R5 0 - 0x90020405, // 0006 SETMBR R0 K2 R5 - 0x60140013, // 0007 GETGBL R5 G19 - 0x7C140000, // 0008 CALL R5 0 - 0x90020605, // 0009 SETMBR R0 K3 R5 - 0x4C140000, // 000A LDNIL R5 - 0x90020805, // 000B SETMBR R0 K4 R5 - 0x50140000, // 000C LDBOOL R5 0 0 - 0x90020A05, // 000D SETMBR R0 K5 R5 - 0x60140003, // 000E GETGBL R5 G3 - 0x5C180000, // 000F MOVE R6 R0 - 0x7C140200, // 0010 CALL R5 1 - 0x8C140B06, // 0011 GETMET R5 R5 K6 - 0x5C1C0400, // 0012 MOVE R7 R2 - 0x5422004F, // 0013 LDINT R8 80 - 0x5C240600, // 0014 MOVE R9 R3 - 0x5C280800, // 0015 MOVE R10 R4 - 0x7C140A00, // 0016 CALL R5 5 - 0x60140013, // 0017 GETGBL R5 G19 - 0x7C140000, // 0018 CALL R5 0 - 0x90020E05, // 0019 SETMBR R0 K7 R5 - 0x88140100, // 001A GETMBR R5 R0 K0 - 0x7816000E, // 001B JMPF R5 #002B - 0x8C140108, // 001C GETMET R5 R0 K8 - 0x881C0109, // 001D GETMBR R7 R0 K9 - 0x8820010A, // 001E GETMBR R8 R0 K10 - 0x84240000, // 001F CLOSURE R9 P0 - 0x7C140800, // 0020 CALL R5 4 - 0x8C140108, // 0021 GETMET R5 R0 K8 - 0x881C010B, // 0022 GETMBR R7 R0 K11 - 0x8820010A, // 0023 GETMBR R8 R0 K10 - 0x84240001, // 0024 CLOSURE R9 P1 - 0x7C140800, // 0025 CALL R5 4 - 0x8C140108, // 0026 GETMET R5 R0 K8 - 0x881C010C, // 0027 GETMBR R7 R0 K12 - 0x8820010A, // 0028 GETMBR R8 R0 K10 - 0x84240002, // 0029 CLOSURE R9 P2 - 0x7C140800, // 002A CALL R5 4 - 0xA0000000, // 002B CLOSE R0 - 0x80000000, // 002C RET 0 + ( &(const binstruction[23]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060000, // 0003 JMPF R1 #0005 + 0x80000200, // 0004 RET 0 + 0xB8060200, // 0005 GETNGBL R1 K1 + 0x8C040302, // 0006 GETMET R1 R1 K2 + 0x600C0018, // 0007 GETGBL R3 G24 + 0x58100003, // 0008 LDCONST R4 K3 + 0x88140104, // 0009 GETMBR R5 R0 K4 + 0x88180105, // 000A GETMBR R6 R0 K5 + 0x881C0106, // 000B GETMBR R7 R0 K6 + 0x6020000C, // 000C GETGBL R8 G12 + 0x88240107, // 000D GETMBR R9 R0 K7 + 0x7C200200, // 000E CALL R8 1 + 0x7C0C0A00, // 000F CALL R3 5 + 0x58100008, // 0010 LDCONST R4 K8 + 0x7C040600, // 0011 CALL R1 3 + 0x8C040109, // 0012 GETMET R1 R0 K9 + 0x880C0104, // 0013 GETMBR R3 R0 K4 + 0x4C100000, // 0014 LDNIL R4 + 0x7C040600, // 0015 CALL R1 3 + 0x80000000, // 0016 RET 0 }) ) ); @@ -1297,39 +1329,57 @@ extern const bclass be_class_Matter_HTTP_async; be_local_class(Matter_HTTP_remote, 8, &be_class_Matter_HTTP_async, - be_nested_map(31, + be_nested_map(32, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(device_is_alive, -1), be_const_closure(class_Matter_HTTP_remote_device_is_alive_closure) }, - { be_const_key_weak(reachable, 21), be_const_var(5) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_HTTP_remote_parse_update_closure) }, - { be_const_key_weak(UPDATE_TIME, 7), be_const_int(5000) }, - { be_const_key_weak(web_last_seen, 30), be_const_closure(class_Matter_HTTP_remote_web_last_seen_closure) }, - { be_const_key_weak(call_sync, 4), be_const_closure(class_Matter_HTTP_remote_call_sync_closure) }, - { be_const_key_weak(change_schedule, 19), be_const_closure(class_Matter_HTTP_remote_change_schedule_closure) }, - { be_const_key_weak(device, -1), be_const_var(0) }, - { be_const_key_weak(UPDATE_CMD5, -1), be_nested_str_weak(Status_X205) }, - { be_const_key_weak(get_info, 17), be_const_closure(class_Matter_HTTP_remote_get_info_closure) }, - { be_const_key_weak(info, -1), be_const_var(7) }, - { be_const_key_weak(event_http_timeout, -1), be_const_closure(class_Matter_HTTP_remote_event_http_timeout_closure) }, - { be_const_key_weak(info_changed, -1), be_const_closure(class_Matter_HTTP_remote_info_changed_closure) }, { be_const_key_weak(add_schedule, -1), be_const_closure(class_Matter_HTTP_remote_add_schedule_closure) }, + { be_const_key_weak(event_http_timeout, 10), be_const_closure(class_Matter_HTTP_remote_event_http_timeout_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(add_async_cb, 31), be_const_closure(class_Matter_HTTP_remote_add_async_cb_closure) }, + { be_const_key_weak(get_info, -1), be_const_closure(class_Matter_HTTP_remote_get_info_closure) }, + { be_const_key_weak(info, 21), be_const_var(7) }, + { be_const_key_weak(event_http_failed, -1), be_const_closure(class_Matter_HTTP_remote_event_http_failed_closure) }, { be_const_key_weak(UPDATE_TIME2, -1), be_const_int(300000) }, - { be_const_key_weak(scheduler, -1), be_const_closure(class_Matter_HTTP_remote_scheduler_closure) }, - { be_const_key_weak(parse_status_response, 13), be_const_closure(class_Matter_HTTP_remote_parse_status_response_closure) }, - { be_const_key_weak(probe_async, 18), be_const_closure(class_Matter_HTTP_remote_probe_async_closure) }, - { be_const_key_weak(probe_update_time_map, -1), be_const_var(1) }, - { be_const_key_weak(reachable_utc, -1), be_const_var(6) }, - { be_const_key_weak(probe_next_timestamp_map, -1), be_const_var(2) }, - { be_const_key_weak(async_cb_map, -1), be_const_var(3) }, - { be_const_key_weak(current_cmd, -1), be_const_var(4) }, - { be_const_key_weak(set_info, -1), be_const_closure(class_Matter_HTTP_remote_set_info_closure) }, - { be_const_key_weak(dispatch_cb, -1), be_const_closure(class_Matter_HTTP_remote_dispatch_cb_closure) }, - { be_const_key_weak(UPDATE_CMD2, -1), be_nested_str_weak(Status_X202) }, - { be_const_key_weak(UPDATE_CMD0, -1), be_nested_str_weak(Status) }, - { be_const_key_weak(event_http_failed, 3), be_const_closure(class_Matter_HTTP_remote_event_http_failed_closure) }, - { be_const_key_weak(add_async_cb, 6), be_const_closure(class_Matter_HTTP_remote_add_async_cb_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_HTTP_remote_init_closure) }, + { be_const_key_weak(set_info, 2), be_const_closure(class_Matter_HTTP_remote_set_info_closure) }, + { be_const_key_weak(scheduler, 27), be_const_closure(class_Matter_HTTP_remote_scheduler_closure) }, + { be_const_key_weak(web_last_seen, -1), be_const_closure(class_Matter_HTTP_remote_web_last_seen_closure) }, { be_const_key_weak(event_http_finished, -1), be_const_closure(class_Matter_HTTP_remote_event_http_finished_closure) }, + { be_const_key_weak(STATUS_PREFIX, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(14, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Status), + be_nested_str_weak(StatusPRM), + be_nested_str_weak(StatusFWR), + be_nested_str_weak(StatusLOG), + be_nested_str_weak(StatusMEM), + be_nested_str_weak(StatusNET), + be_nested_str_weak(StatusMQT), + be_nested_str_weak(StatusTIM), + be_const_nil(), + be_nested_str_weak(StatusPTH), + be_nested_str_weak(StatusSNS), + be_nested_str_weak(StatusSTS), + be_nested_str_weak(StatusSTK), + be_nested_str_weak(StatusSHT), + })) ) } )) }, + { be_const_key_weak(current_cmd, -1), be_const_var(4) }, + { be_const_key_weak(probe_async, 7), be_const_closure(class_Matter_HTTP_remote_probe_async_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_HTTP_remote_init_closure) }, + { be_const_key_weak(reachable, 1), be_const_var(5) }, + { be_const_key_weak(probe_next_timestamp_map, -1), be_const_var(2) }, + { be_const_key_weak(change_schedule, 15), be_const_closure(class_Matter_HTTP_remote_change_schedule_closure) }, + { be_const_key_weak(device, 18), be_const_var(0) }, + { be_const_key_weak(async_cb_map, -1), be_const_var(3) }, + { be_const_key_weak(reachable_utc, -1), be_const_var(6) }, + { be_const_key_weak(parse_status_response_and_call_method, -1), be_const_closure(class_Matter_HTTP_remote_parse_status_response_and_call_method_closure) }, + { be_const_key_weak(UPDATE_CMD2, -1), be_nested_str_weak(Status_X202) }, + { be_const_key_weak(probe_update_time_map, -1), be_const_var(1) }, + { be_const_key_weak(call_sync, -1), be_const_closure(class_Matter_HTTP_remote_call_sync_closure) }, + { be_const_key_weak(device_is_alive, 9), be_const_closure(class_Matter_HTTP_remote_device_is_alive_closure) }, + { be_const_key_weak(info_changed, -1), be_const_closure(class_Matter_HTTP_remote_info_changed_closure) }, + { be_const_key_weak(parse_status_http, 6), be_const_closure(class_Matter_HTTP_remote_parse_status_http_closure) }, + { be_const_key_weak(dispatch_cb, 3), be_const_closure(class_Matter_HTTP_remote_dispatch_cb_closure) }, + { be_const_key_weak(UPDATE_CMD5, -1), be_nested_str_weak(Status_X205) }, + { be_const_key_weak(UPDATE_CMD0, -1), be_nested_str_weak(Status) }, })), be_str_weak(Matter_HTTP_remote) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h index e22e8111a..4321835ea 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_0.h @@ -7,58 +7,25 @@ extern const bclass be_class_Matter_Plugin; /******************************************************************** -** Solidified function: contains_cluster +** Solidified function: invoke_request ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ +be_local_closure(class_Matter_Plugin_invoke_request, /* name */ be_nested_proto( 5, /* nstack */ - 2, /* argc */ + 4, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(contains), - }), - be_str_weak(contains_cluster), + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x7C080400, // 0003 CALL R2 2 - 0x80040400, // 0004 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: append_state_json -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_append_state_json, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(), - }), - be_str_weak(append_state_json), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80060000, // 0000 RET 1 K0 + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 }) ) ); @@ -124,10 +91,53 @@ be_local_closure(class_Matter_Plugin_state_json, /* name */ /******************************************************************** -** Solidified function: timed_request +** Solidified function: ack_request ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_timed_request, /* name */ +be_local_closure(class_Matter_Plugin_ack_request, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(msg), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(message_handler), + /* K3 */ be_nested_str_weak(im), + /* K4 */ be_nested_str_weak(send_ack_now), + }), + be_str_weak(ack_request), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x88080300, // 0000 GETMBR R2 R1 K0 + 0x4C0C0000, // 0001 LDNIL R3 + 0x200C0403, // 0002 NE R3 R2 R3 + 0x780E0005, // 0003 JMPF R3 #000A + 0x880C0101, // 0004 GETMBR R3 R0 K1 + 0x880C0702, // 0005 GETMBR R3 R3 K2 + 0x880C0703, // 0006 GETMBR R3 R3 K3 + 0x8C0C0704, // 0007 GETMET R3 R3 K4 + 0x5C140400, // 0008 MOVE R5 R2 + 0x7C0C0400, // 0009 CALL R3 2 + 0x4C0C0000, // 000A LDNIL R3 + 0x90060003, // 000B SETMBR R1 K0 R3 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: write_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_write_attribute, /* name */ be_nested_proto( 5, /* nstack */ 4, /* argc */ @@ -138,7 +148,7 @@ be_local_closure(class_Matter_Plugin_timed_request, /* name */ &be_class_Matter_Plugin, 0, /* has constants */ NULL, /* no const */ - be_str_weak(timed_request), + be_str_weak(write_attribute), &be_const_str_solidified, ( &(const binstruction[ 2]) { /* code */ 0x4C100000, // 0000 LDNIL R4 @@ -150,24 +160,117 @@ be_local_closure(class_Matter_Plugin_timed_request, /* name */ /******************************************************************** -** Solidified function: parse_sensors +** Solidified function: consolidate_update_commands ********************************************************************/ extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ +be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ be_nested_proto( 2, /* nstack */ - 2, /* argc */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(parse_sensors), + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), + }), + be_str_weak(consolidate_update_commands), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: append_state_json +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_append_state_json, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(), + }), + be_str_weak(append_state_json), &be_const_str_solidified, ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 + 0x80060000, // 0000 RET 1 K0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_every_250ms, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(update_next), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(jitter), + /* K3 */ be_nested_str_weak(UPDATE_TIME), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(time_reached), + /* K6 */ be_nested_str_weak(tick), + /* K7 */ be_nested_str_weak(device), + /* K8 */ be_nested_str_weak(update_shadow), + /* K9 */ be_nested_str_weak(millis), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x1C040202, // 0002 EQ R1 R1 R2 + 0x78060005, // 0003 JMPF R1 #000A + 0xB8060200, // 0004 GETNGBL R1 K1 + 0x8C040302, // 0005 GETMET R1 R1 K2 + 0x880C0103, // 0006 GETMBR R3 R0 K3 + 0x7C040400, // 0007 CALL R1 2 + 0x90020001, // 0008 SETMBR R0 K0 R1 + 0x70020010, // 0009 JMP #001B + 0xB8060800, // 000A GETNGBL R1 K4 + 0x8C040305, // 000B GETMET R1 R1 K5 + 0x880C0100, // 000C GETMBR R3 R0 K0 + 0x7C040400, // 000D CALL R1 2 + 0x7806000B, // 000E JMPF R1 #001B + 0x88040106, // 000F GETMBR R1 R0 K6 + 0x88080107, // 0010 GETMBR R2 R0 K7 + 0x88080506, // 0011 GETMBR R2 R2 K6 + 0x20040202, // 0012 NE R1 R1 R2 + 0x78060001, // 0013 JMPF R1 #0016 + 0x8C040108, // 0014 GETMET R1 R0 K8 + 0x7C040200, // 0015 CALL R1 1 + 0xB8060800, // 0016 GETNGBL R1 K4 + 0x8C040309, // 0017 GETMET R1 R1 K9 + 0x880C0103, // 0018 GETMBR R3 R0 K3 + 0x7C040400, // 0019 CALL R1 2 + 0x90020001, // 001A SETMBR R0 K0 R1 + 0x80000000, // 001B RET 0 }) ) ); @@ -218,6 +321,392 @@ be_local_closure(class_Matter_Plugin_has, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_shadow_lazy +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(tick), + /* K1 */ be_nested_str_weak(device), + /* K2 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow_lazy), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x88080500, // 0002 GETMBR R2 R2 K0 + 0x20040202, // 0003 NE R1 R1 R2 + 0x78060004, // 0004 JMPF R1 #000A + 0x8C040102, // 0005 GETMET R1 R0 K2 + 0x7C040200, // 0006 CALL R1 1 + 0x88040101, // 0007 GETMBR R1 R0 K1 + 0x88040300, // 0008 GETMBR R1 R1 K0 + 0x90020001, // 0009 SETMBR R0 K0 R1 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_name +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_set_name, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(node_label), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(set_name), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0003, // 0002 JMPF R2 #0007 + 0x8C080101, // 0003 GETMET R2 R0 K1 + 0x54120038, // 0004 LDINT R4 57 + 0x54160004, // 0005 LDINT R5 5 + 0x7C080600, // 0006 CALL R2 3 + 0x90020001, // 0007 SETMBR R0 K0 R1 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040008, // 0000 GETGBL R1 G8 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_update_shadow, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 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: timed_request +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_timed_request, /* name */ + be_nested_proto( + 5, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(timed_request), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C100000, // 0000 LDNIL R4 + 0x80040800, // 0001 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_init, /* name */ + be_nested_proto( + 8, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(endpoint), + /* K2 */ be_nested_str_weak(clusters), + /* K3 */ be_nested_str_weak(consolidate_clusters), + /* K4 */ be_nested_str_weak(parse_configuration), + /* K5 */ be_nested_str_weak(node_label), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(name), + /* K8 */ be_nested_str_weak(), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x90020001, // 0000 SETMBR R0 K0 R1 + 0x90020202, // 0001 SETMBR R0 K1 R2 + 0x8C100103, // 0002 GETMET R4 R0 K3 + 0x7C100200, // 0003 CALL R4 1 + 0x90020404, // 0004 SETMBR R0 K2 R4 + 0x8C100104, // 0005 GETMET R4 R0 K4 + 0x5C180600, // 0006 MOVE R6 R3 + 0x7C100400, // 0007 CALL R4 2 + 0x8C100706, // 0008 GETMET R4 R3 K6 + 0x58180007, // 0009 LDCONST R6 K7 + 0x581C0008, // 000A LDCONST R7 K8 + 0x7C100600, // 000B CALL R4 3 + 0x90020A04, // 000C SETMBR R0 K5 R4 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: is_local_device +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_is_local_device, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + }), + be_str_weak(is_local_device), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060000, // 0001 JMPF R1 #0003 + 0x50040001, // 0002 LDBOOL R1 0 1 + 0x50040200, // 0003 LDBOOL R1 1 0 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_string_to_conf +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_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 */ + &be_class_Matter_Plugin, + 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: get_cluster_list_sorted +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ + be_nested_proto( + 4, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(k2l), + /* K2 */ be_nested_str_weak(clusters), + }), + be_str_weak(get_cluster_list_sorted), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x7C040400, // 0003 CALL R1 2 + 0x80040200, // 0004 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: ui_conf_to_string +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_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 */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_const_class(be_class_Matter_Plugin), + /* K1 */ be_nested_str_weak(ARG), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(), + }), + be_str_weak(ui_conf_to_string), + &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 function: attribute_updated +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ + be_nested_proto( + 10, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(device), + /* K1 */ be_nested_str_weak(attribute_updated), + /* K2 */ be_nested_str_weak(endpoint), + }), + be_str_weak(attribute_updated), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x8C100901, // 0001 GETMET R4 R4 K1 + 0x88180102, // 0002 GETMBR R6 R0 K2 + 0x5C1C0200, // 0003 MOVE R7 R1 + 0x5C200400, // 0004 MOVE R8 R2 + 0x5C240600, // 0005 MOVE R9 R3 + 0x7C100A00, // 0006 CALL R4 5 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_virtual ********************************************************************/ @@ -243,6 +732,434 @@ be_local_closure(class_Matter_Plugin_update_virtual, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: _parse_update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin__parse_update_virtual, /* name */ + be_nested_proto( + 12, /* nstack */ + 7, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(_parse_update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C1C0300, // 0000 GETMET R7 R1 K0 + 0x5C240400, // 0001 MOVE R9 R2 + 0x7C1C0400, // 0002 CALL R7 2 + 0x4C200000, // 0003 LDNIL R8 + 0x20200E08, // 0004 NE R8 R7 R8 + 0x7822000A, // 0005 JMPF R8 #0011 + 0x5C200800, // 0006 MOVE R8 R4 + 0x5C240E00, // 0007 MOVE R9 R7 + 0x7C200200, // 0008 CALL R8 1 + 0x5C1C1000, // 0009 MOVE R7 R8 + 0x20200E03, // 000A NE R8 R7 R3 + 0x78220003, // 000B JMPF R8 #0010 + 0x8C200101, // 000C GETMET R8 R0 K1 + 0x5C280A00, // 000D MOVE R10 R5 + 0x5C2C0C00, // 000E MOVE R11 R6 + 0x7C200600, // 000F CALL R8 3 + 0x80040E00, // 0010 RET 1 R7 + 0x80040600, // 0011 RET 1 R3 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: consolidate_clusters +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(CLUSTERS), + }), + be_str_weak(consolidate_clusters), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_name +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_name, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(node_label), + }), + be_str_weak(get_name), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_endpoint +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ + be_nested_proto( + 2, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(endpoint), + }), + be_str_weak(get_endpoint), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x80040200, // 0001 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: subscribe_event +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(subscribe_event), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_event +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_read_event, /* name */ + be_nested_proto( + 6, /* nstack */ + 5, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(read_event), + &be_const_str_solidified, + ( &(const binstruction[ 2]) { /* code */ + 0x4C140000, // 0000 LDNIL R5 + 0x80040A00, // 0001 RET 1 R5 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_parse_sensors, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: get_attribute_list +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), + }), + be_str_weak(get_attribute_list), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x60140012, // 0003 GETGBL R5 G18 + 0x7C140000, // 0004 CALL R5 0 + 0x7C080600, // 0005 CALL R2 3 + 0x80040400, // 0006 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: publish_command +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_publish_command, /* name */ + be_nested_proto( + 16, /* nstack */ + 7, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(json), + /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), + /* K2 */ be_nested_str_weak(dump), + /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), + /* K4 */ be_nested_str_weak(matter), + /* K5 */ be_nested_str_weak(publish_command), + /* K6 */ be_nested_str_weak(MtrReceived), + /* K7 */ be_nested_str_weak(endpoint), + /* K8 */ be_nested_str_weak(node_label), + }), + be_str_weak(publish_command), + &be_const_str_solidified, + ( &(const binstruction[46]) { /* code */ + 0xA41E0000, // 0000 IMPORT R7 K0 + 0x60200018, // 0001 GETGBL R8 G24 + 0x58240001, // 0002 LDCONST R9 K1 + 0x8C280F02, // 0003 GETMET R10 R7 K2 + 0x5C300200, // 0004 MOVE R12 R1 + 0x7C280400, // 0005 CALL R10 2 + 0x8C2C0F02, // 0006 GETMET R11 R7 K2 + 0x5C340400, // 0007 MOVE R13 R2 + 0x7C2C0400, // 0008 CALL R11 2 + 0x7C200600, // 0009 CALL R8 3 + 0x4C240000, // 000A LDNIL R9 + 0x20240609, // 000B NE R9 R3 R9 + 0x7826000A, // 000C JMPF R9 #0018 + 0x60240018, // 000D GETGBL R9 G24 + 0x58280003, // 000E LDCONST R10 K3 + 0x5C2C1000, // 000F MOVE R11 R8 + 0x8C300F02, // 0010 GETMET R12 R7 K2 + 0x5C380600, // 0011 MOVE R14 R3 + 0x7C300400, // 0012 CALL R12 2 + 0x8C340F02, // 0013 GETMET R13 R7 K2 + 0x5C3C0800, // 0014 MOVE R15 R4 + 0x7C340400, // 0015 CALL R13 2 + 0x7C240800, // 0016 CALL R9 4 + 0x5C201200, // 0017 MOVE R8 R9 + 0x4C240000, // 0018 LDNIL R9 + 0x20240A09, // 0019 NE R9 R5 R9 + 0x7826000A, // 001A JMPF R9 #0026 + 0x60240018, // 001B GETGBL R9 G24 + 0x58280003, // 001C LDCONST R10 K3 + 0x5C2C1000, // 001D MOVE R11 R8 + 0x8C300F02, // 001E GETMET R12 R7 K2 + 0x5C380A00, // 001F MOVE R14 R5 + 0x7C300400, // 0020 CALL R12 2 + 0x8C340F02, // 0021 GETMET R13 R7 K2 + 0x5C3C0C00, // 0022 MOVE R15 R6 + 0x7C340400, // 0023 CALL R13 2 + 0x7C240800, // 0024 CALL R9 4 + 0x5C201200, // 0025 MOVE R8 R9 + 0xB8260800, // 0026 GETNGBL R9 K4 + 0x8C241305, // 0027 GETMET R9 R9 K5 + 0x582C0006, // 0028 LDCONST R11 K6 + 0x88300107, // 0029 GETMBR R12 R0 K7 + 0x88340108, // 002A GETMBR R13 R0 K8 + 0x5C381000, // 002B MOVE R14 R8 + 0x7C240A00, // 002C CALL R9 5 + 0x80000000, // 002D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: contains_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ + be_nested_proto( + 7, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_const_int(0), + /* K3 */ be_const_int(1), + }), + be_str_weak(contains_attribute), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x8C0C0701, // 0001 GETMET R3 R3 K1 + 0x5C140200, // 0002 MOVE R5 R1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x4C100000, // 0004 LDNIL R4 + 0x20100604, // 0005 NE R4 R3 R4 + 0x7812000C, // 0006 JMPF R4 #0014 + 0x58100002, // 0007 LDCONST R4 K2 + 0x6014000C, // 0008 GETGBL R5 G12 + 0x5C180600, // 0009 MOVE R6 R3 + 0x7C140200, // 000A CALL R5 1 + 0x14140805, // 000B LT R5 R4 R5 + 0x78160006, // 000C JMPF R5 #0014 + 0x94140604, // 000D GETIDX R5 R3 R4 + 0x1C140A02, // 000E EQ R5 R5 R2 + 0x78160001, // 000F JMPF R5 #0012 + 0x50140200, // 0010 LDBOOL R5 1 0 + 0x80040A00, // 0011 RET 1 R5 + 0x00100903, // 0012 ADD R4 R4 K3 + 0x7001FFF3, // 0013 JMP #0008 + 0x50100000, // 0014 LDBOOL R4 0 0 + 0x80040800, // 0015 RET 1 R4 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: contains_cluster +********************************************************************/ +extern const bclass be_class_Matter_Plugin; +be_local_closure(class_Matter_Plugin_contains_cluster, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(clusters), + /* K1 */ be_nested_str_weak(contains), + }), + be_str_weak(contains_cluster), + &be_const_str_solidified, + ( &(const binstruction[ 5]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x8C080501, // 0001 GETMET R2 R2 K1 + 0x5C100200, // 0002 MOVE R4 R1 + 0x7C080400, // 0003 CALL R2 2 + 0x80040400, // 0004 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -451,456 +1368,6 @@ be_local_closure(class_Matter_Plugin_read_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: ui_conf_to_string -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_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 */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_const_class(be_class_Matter_Plugin), - /* K1 */ be_nested_str_weak(ARG), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(), - }), - be_str_weak(ui_conf_to_string), - &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 function: ack_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_ack_request, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(msg), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(message_handler), - /* K3 */ be_nested_str_weak(im), - /* K4 */ be_nested_str_weak(send_ack_now), - }), - be_str_weak(ack_request), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88080300, // 0000 GETMBR R2 R1 K0 - 0x4C0C0000, // 0001 LDNIL R3 - 0x200C0403, // 0002 NE R3 R2 R3 - 0x780E0005, // 0003 JMPF R3 #000A - 0x880C0101, // 0004 GETMBR R3 R0 K1 - 0x880C0702, // 0005 GETMBR R3 R3 K2 - 0x880C0703, // 0006 GETMBR R3 R3 K3 - 0x8C0C0704, // 0007 GETMET R3 R3 K4 - 0x5C140400, // 0008 MOVE R5 R2 - 0x7C0C0400, // 0009 CALL R3 2 - 0x4C0C0000, // 000A LDNIL R3 - 0x90060003, // 000B SETMBR R1 K0 R3 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: write_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_write_attribute, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(write_attribute), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_cluster_list_sorted -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_cluster_list_sorted, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(k2l), - /* K2 */ be_nested_str_weak(clusters), - }), - be_str_weak(get_cluster_list_sorted), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x7C040400, // 0003 CALL R1 2 - 0x80040200, // 0004 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_init, /* name */ - be_nested_proto( - 8, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(endpoint), - /* K2 */ be_nested_str_weak(clusters), - /* K3 */ be_nested_str_weak(consolidate_clusters), - /* K4 */ be_nested_str_weak(parse_configuration), - /* K5 */ be_nested_str_weak(node_label), - /* K6 */ be_nested_str_weak(find), - /* K7 */ be_nested_str_weak(name), - /* K8 */ be_nested_str_weak(), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x90020001, // 0000 SETMBR R0 K0 R1 - 0x90020202, // 0001 SETMBR R0 K1 R2 - 0x8C100103, // 0002 GETMET R4 R0 K3 - 0x7C100200, // 0003 CALL R4 1 - 0x90020404, // 0004 SETMBR R0 K2 R4 - 0x8C100104, // 0005 GETMET R4 R0 K4 - 0x5C180600, // 0006 MOVE R6 R3 - 0x7C100400, // 0007 CALL R4 2 - 0x8C100706, // 0008 GETMET R4 R3 K6 - 0x58180007, // 0009 LDCONST R6 K7 - 0x581C0008, // 000A LDCONST R7 K8 - 0x7C100600, // 000B CALL R4 3 - 0x90020A04, // 000C SETMBR R0 K5 R4 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: ui_string_to_conf -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_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 */ - &be_class_Matter_Plugin, - 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: every_250ms -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_every_250ms, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(update_next), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(jitter), - /* K3 */ be_nested_str_weak(UPDATE_TIME), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(time_reached), - /* K6 */ be_nested_str_weak(tick), - /* K7 */ be_nested_str_weak(device), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(millis), - }), - be_str_weak(every_250ms), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x1C040202, // 0002 EQ R1 R1 R2 - 0x78060005, // 0003 JMPF R1 #000A - 0xB8060200, // 0004 GETNGBL R1 K1 - 0x8C040302, // 0005 GETMET R1 R1 K2 - 0x880C0103, // 0006 GETMBR R3 R0 K3 - 0x7C040400, // 0007 CALL R1 2 - 0x90020001, // 0008 SETMBR R0 K0 R1 - 0x70020010, // 0009 JMP #001B - 0xB8060800, // 000A GETNGBL R1 K4 - 0x8C040305, // 000B GETMET R1 R1 K5 - 0x880C0100, // 000C GETMBR R3 R0 K0 - 0x7C040400, // 000D CALL R1 2 - 0x7806000B, // 000E JMPF R1 #001B - 0x88040106, // 000F GETMBR R1 R0 K6 - 0x88080107, // 0010 GETMBR R2 R0 K7 - 0x88080506, // 0011 GETMBR R2 R2 K6 - 0x20040202, // 0012 NE R1 R1 R2 - 0x78060001, // 0013 JMPF R1 #0016 - 0x8C040108, // 0014 GETMET R1 R0 K8 - 0x7C040200, // 0015 CALL R1 1 - 0xB8060800, // 0016 GETNGBL R1 K4 - 0x8C040309, // 0017 GETMET R1 R1 K9 - 0x880C0103, // 0018 GETMBR R3 R0 K3 - 0x7C040400, // 0019 CALL R1 2 - 0x90020001, // 001A SETMBR R0 K0 R1 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_parse_configuration, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: subscribe_event -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_subscribe_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(subscribe_event), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_attribute_list -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_attribute_list, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), - }), - be_str_weak(get_attribute_list), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x60140012, // 0003 GETGBL R5 G18 - 0x7C140000, // 0004 CALL R5 0 - 0x7C080600, // 0005 CALL R2 3 - 0x80040400, // 0006 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: _parse_update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin__parse_update_virtual, /* name */ - be_nested_proto( - 12, /* nstack */ - 7, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(_parse_update_virtual), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C1C0300, // 0000 GETMET R7 R1 K0 - 0x5C240400, // 0001 MOVE R9 R2 - 0x7C1C0400, // 0002 CALL R7 2 - 0x4C200000, // 0003 LDNIL R8 - 0x20200E08, // 0004 NE R8 R7 R8 - 0x7822000A, // 0005 JMPF R8 #0011 - 0x5C200800, // 0006 MOVE R8 R4 - 0x5C240E00, // 0007 MOVE R9 R7 - 0x7C200200, // 0008 CALL R8 1 - 0x5C1C1000, // 0009 MOVE R7 R8 - 0x20200E03, // 000A NE R8 R7 R3 - 0x78220003, // 000B JMPF R8 #0010 - 0x8C200101, // 000C GETMET R8 R0 K1 - 0x5C280A00, // 000D MOVE R10 R5 - 0x5C2C0C00, // 000E MOVE R11 R6 - 0x7C200600, // 000F CALL R8 3 - 0x80040E00, // 0010 RET 1 R7 - 0x80040600, // 0011 RET 1 R3 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_endpoint -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_endpoint, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(endpoint), - }), - be_str_weak(get_endpoint), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: subscribe_attribute ********************************************************************/ @@ -927,513 +1394,59 @@ be_local_closure(class_Matter_Plugin_subscribe_attribute, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: contains_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_contains_attribute, /* name */ - be_nested_proto( - 7, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(clusters), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_const_int(0), - /* K3 */ be_const_int(1), - }), - be_str_weak(contains_attribute), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x880C0100, // 0000 GETMBR R3 R0 K0 - 0x8C0C0701, // 0001 GETMET R3 R3 K1 - 0x5C140200, // 0002 MOVE R5 R1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x4C100000, // 0004 LDNIL R4 - 0x20100604, // 0005 NE R4 R3 R4 - 0x7812000C, // 0006 JMPF R4 #0014 - 0x58100002, // 0007 LDCONST R4 K2 - 0x6014000C, // 0008 GETGBL R5 G12 - 0x5C180600, // 0009 MOVE R6 R3 - 0x7C140200, // 000A CALL R5 1 - 0x14140805, // 000B LT R5 R4 R5 - 0x78160006, // 000C JMPF R5 #0014 - 0x94140604, // 000D GETIDX R5 R3 R4 - 0x1C140A02, // 000E EQ R5 R5 R2 - 0x78160001, // 000F JMPF R5 #0012 - 0x50140200, // 0010 LDBOOL R5 1 0 - 0x80040A00, // 0011 RET 1 R5 - 0x00100903, // 0012 ADD R4 R4 K3 - 0x7001FFF3, // 0013 JMP #0008 - 0x50100000, // 0014 LDBOOL R4 0 0 - 0x80040800, // 0015 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: consolidate_update_commands -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_update_commands, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(UPDATE_COMMANDS), - }), - be_str_weak(consolidate_update_commands), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040008, // 0000 GETGBL R1 G8 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: get_name -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_get_name, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), - }), - be_str_weak(get_name), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: publish_command -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_publish_command, /* name */ - be_nested_proto( - 16, /* nstack */ - 7, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_nested_str_weak(_X25s_X3A_X25s), - /* K2 */ be_nested_str_weak(dump), - /* K3 */ be_nested_str_weak(_X25s_X2C_X25s_X3A_X25s), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(publish_command), - /* K6 */ be_nested_str_weak(MtrReceived), - /* K7 */ be_nested_str_weak(endpoint), - /* K8 */ be_nested_str_weak(node_label), - }), - be_str_weak(publish_command), - &be_const_str_solidified, - ( &(const binstruction[46]) { /* code */ - 0xA41E0000, // 0000 IMPORT R7 K0 - 0x60200018, // 0001 GETGBL R8 G24 - 0x58240001, // 0002 LDCONST R9 K1 - 0x8C280F02, // 0003 GETMET R10 R7 K2 - 0x5C300200, // 0004 MOVE R12 R1 - 0x7C280400, // 0005 CALL R10 2 - 0x8C2C0F02, // 0006 GETMET R11 R7 K2 - 0x5C340400, // 0007 MOVE R13 R2 - 0x7C2C0400, // 0008 CALL R11 2 - 0x7C200600, // 0009 CALL R8 3 - 0x4C240000, // 000A LDNIL R9 - 0x20240609, // 000B NE R9 R3 R9 - 0x7826000A, // 000C JMPF R9 #0018 - 0x60240018, // 000D GETGBL R9 G24 - 0x58280003, // 000E LDCONST R10 K3 - 0x5C2C1000, // 000F MOVE R11 R8 - 0x8C300F02, // 0010 GETMET R12 R7 K2 - 0x5C380600, // 0011 MOVE R14 R3 - 0x7C300400, // 0012 CALL R12 2 - 0x8C340F02, // 0013 GETMET R13 R7 K2 - 0x5C3C0800, // 0014 MOVE R15 R4 - 0x7C340400, // 0015 CALL R13 2 - 0x7C240800, // 0016 CALL R9 4 - 0x5C201200, // 0017 MOVE R8 R9 - 0x4C240000, // 0018 LDNIL R9 - 0x20240A09, // 0019 NE R9 R5 R9 - 0x7826000A, // 001A JMPF R9 #0026 - 0x60240018, // 001B GETGBL R9 G24 - 0x58280003, // 001C LDCONST R10 K3 - 0x5C2C1000, // 001D MOVE R11 R8 - 0x8C300F02, // 001E GETMET R12 R7 K2 - 0x5C380A00, // 001F MOVE R14 R5 - 0x7C300400, // 0020 CALL R12 2 - 0x8C340F02, // 0021 GETMET R13 R7 K2 - 0x5C3C0C00, // 0022 MOVE R15 R6 - 0x7C340400, // 0023 CALL R13 2 - 0x7C240800, // 0024 CALL R9 4 - 0x5C201200, // 0025 MOVE R8 R9 - 0xB8260800, // 0026 GETNGBL R9 K4 - 0x8C241305, // 0027 GETMET R9 R9 K5 - 0x582C0006, // 0028 LDCONST R11 K6 - 0x88300107, // 0029 GETMBR R12 R0 K7 - 0x88340108, // 002A GETMBR R13 R0 K8 - 0x5C381000, // 002B MOVE R14 R8 - 0x7C240A00, // 002C CALL R9 5 - 0x80000000, // 002D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_name -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_set_name, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(node_label), - /* K1 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(set_name), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0003, // 0002 JMPF R2 #0007 - 0x8C080101, // 0003 GETMET R2 R0 K1 - 0x54120038, // 0004 LDINT R4 57 - 0x54160004, // 0005 LDINT R5 5 - 0x7C080600, // 0006 CALL R2 3 - 0x90020001, // 0007 SETMBR R0 K0 R1 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow_lazy -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow_lazy, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow_lazy), - &be_const_str_solidified, - ( &(const binstruction[11]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x88080500, // 0002 GETMBR R2 R2 K0 - 0x20040202, // 0003 NE R1 R1 R2 - 0x78060004, // 0004 JMPF R1 #000A - 0x8C040102, // 0005 GETMET R1 R0 K2 - 0x7C040200, // 0006 CALL R1 1 - 0x88040101, // 0007 GETMBR R1 R0 K1 - 0x88040300, // 0008 GETMBR R1 R1 K0 - 0x90020001, // 0009 SETMBR R0 K0 R1 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_update_shadow, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 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: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_invoke_request, /* name */ - be_nested_proto( - 5, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C100000, // 0000 LDNIL R4 - 0x80040800, // 0001 RET 1 R4 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: attribute_updated -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_attribute_updated, /* name */ - be_nested_proto( - 10, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(device), - /* K1 */ be_nested_str_weak(attribute_updated), - /* K2 */ be_nested_str_weak(endpoint), - }), - be_str_weak(attribute_updated), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88100100, // 0000 GETMBR R4 R0 K0 - 0x8C100901, // 0001 GETMET R4 R4 K1 - 0x88180102, // 0002 GETMBR R6 R0 K2 - 0x5C1C0200, // 0003 MOVE R7 R1 - 0x5C200400, // 0004 MOVE R8 R2 - 0x5C240600, // 0005 MOVE R9 R3 - 0x7C100A00, // 0006 CALL R4 5 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_local_device -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_is_local_device, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(is_local_device), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x50040200, // 0000 LDBOOL R1 1 0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: consolidate_clusters -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_consolidate_clusters, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(CLUSTERS), - }), - be_str_weak(consolidate_clusters), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_event -********************************************************************/ -extern const bclass be_class_Matter_Plugin; -be_local_closure(class_Matter_Plugin_read_event, /* name */ - be_nested_proto( - 6, /* nstack */ - 5, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(read_event), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x4C140000, // 0000 LDNIL R5 - 0x80040A00, // 0001 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin ********************************************************************/ be_local_class(Matter_Plugin, 6, NULL, - be_nested_map(51, + be_nested_map(52, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_read_attribute_closure) }, - { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, - { be_const_key_weak(get_cluster_list_sorted, -1), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, - { be_const_key_weak(state_json, -1), be_const_closure(class_Matter_Plugin_state_json_closure) }, - { be_const_key_weak(read_event, 38), be_const_closure(class_Matter_Plugin_read_event_closure) }, - { be_const_key_weak(timed_request, -1), be_const_closure(class_Matter_Plugin_timed_request_closure) }, - { be_const_key_weak(consolidate_clusters, -1), be_const_closure(class_Matter_Plugin_consolidate_clusters_closure) }, - { be_const_key_weak(has, -1), be_const_closure(class_Matter_Plugin_has_closure) }, - { be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, - { be_const_key_weak(is_local_device, -1), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, - { be_const_key_weak(UPDATE_TIME, 0), be_const_int(5000) }, + { be_const_key_weak(subscribe_attribute, 34), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, + { be_const_key_weak(state_json, 38), be_const_closure(class_Matter_Plugin_state_json_closure) }, + { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, + { be_const_key_weak(device, -1), be_const_var(1) }, { be_const_key_weak(ack_request, -1), be_const_closure(class_Matter_Plugin_ack_request_closure) }, - { be_const_key_weak(get_endpoint, 2), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, - { be_const_key_weak(ui_conf_to_string, 24), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, - { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, - { be_const_key_weak(UPDATE_COMMANDS, 48), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, + { be_const_key_weak(is_local_device, 2), be_const_closure(class_Matter_Plugin_is_local_device_closure) }, + { be_const_key_weak(write_attribute, -1), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, + { be_const_key_weak(BRIDGE, -1), be_const_bool(0) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(CLUSTERS, 51), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(10, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(0), + be_const_int(1), + be_const_int(2), + be_const_int(3), + be_const_int(65528), + be_const_int(65529), + be_const_int(65530), + be_const_int(65531), + be_const_int(65532), + be_const_int(65533), + })) ) } )) }, + })) ) } )) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(0, ( (struct bvalue*) &(const bvalue[]) { })) ) } )) }, - { be_const_key_weak(ui_string_to_conf, -1), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, - { be_const_key_weak(every_250ms, 27), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, - { be_const_key_weak(device, -1), be_const_var(1) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(subscribe_event, -1), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(every_250ms, 0), be_const_closure(class_Matter_Plugin_every_250ms_closure) }, + { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, { be_const_key_weak(get_attribute_list, -1), be_const_closure(class_Matter_Plugin_get_attribute_list_closure) }, - { be_const_key_weak(write_attribute, 39), be_const_closure(class_Matter_Plugin_write_attribute_closure) }, - { be_const_key_weak(contains_attribute, -1), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, - { be_const_key_weak(consolidate_update_commands, 12), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, - { be_const_key_weak(subscribe_attribute, -1), be_const_closure(class_Matter_Plugin_subscribe_attribute_closure) }, - { be_const_key_weak(contains_cluster, 23), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, - { be_const_key_weak(update_next, -1), be_const_var(0) }, + { be_const_key_weak(has, 5), be_const_closure(class_Matter_Plugin_has_closure) }, { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin__X3Clambda_X3E_closure) }, - { be_const_key_weak(get_name, 30), be_const_closure(class_Matter_Plugin_get_name_closure) }, - { be_const_key_weak(update_shadow_lazy, -1), be_const_closure(class_Matter_Plugin_update_shadow_lazy_closure) }, - { be_const_key_weak(TYPE, 34), be_nested_str_weak() }, - { be_const_key_weak(tick, -1), be_const_var(4) }, - { be_const_key_weak(CLUSTER_REVISIONS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(get_cluster_list_sorted, -1), be_const_closure(class_Matter_Plugin_get_cluster_list_sorted_closure) }, + { be_const_key_weak(timed_request, -1), be_const_closure(class_Matter_Plugin_timed_request_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, + { be_const_key_weak(endpoint, 6), be_const_var(2) }, + { be_const_key_weak(attribute_updated, -1), be_const_closure(class_Matter_Plugin_attribute_updated_closure) }, + { be_const_key_weak(clusters, -1), be_const_var(3) }, + { be_const_key_weak(VIRTUAL, 9), be_const_bool(0) }, + { be_const_key_weak(CLUSTER_REVISIONS, 23), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(25, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, -1), be_const_int(5) }, @@ -1462,49 +1475,42 @@ be_local_class(Matter_Plugin, { be_const_key_int(6, -1), be_const_int(5) }, { be_const_key_int(1024, -1), be_const_int(3) }, })) ) } )) }, - { be_const_key_weak(clusters, -1), be_const_var(3) }, - { be_const_key_weak(COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(29, -1), be_const_nil() }, - })) ) } )) }, + { be_const_key_weak(consolidate_update_commands, 17), be_const_closure(class_Matter_Plugin_consolidate_update_commands_closure) }, + { be_const_key_weak(ui_conf_to_string, -1), be_const_static_closure(class_Matter_Plugin_ui_conf_to_string_closure) }, + { be_const_key_weak(_parse_update_virtual, 21), be_const_closure(class_Matter_Plugin__parse_update_virtual_closure) }, + { be_const_key_weak(update_virtual, 36), be_const_closure(class_Matter_Plugin_update_virtual_closure) }, { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) }, - { be_const_key_weak(set_name, -1), be_const_closure(class_Matter_Plugin_set_name_closure) }, - { be_const_key_weak(publish_command, -1), be_const_closure(class_Matter_Plugin_publish_command_closure) }, - { be_const_key_weak(_parse_update_virtual, 47), be_const_closure(class_Matter_Plugin__parse_update_virtual_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, - { be_const_key_weak(parse_sensors, 19), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(VIRTUAL, -1), be_const_bool(0) }, - { be_const_key_weak(DISPLAY_NAME, 10), be_nested_str_weak() }, - { be_const_key_weak(node_label, 9), be_const_var(5) }, { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_parse_configuration_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_init_closure) }, - { be_const_key_weak(endpoint, -1), be_const_var(2) }, + { be_const_key_weak(invoke_request, 27), be_const_closure(class_Matter_Plugin_invoke_request_closure) }, + { be_const_key_weak(node_label, -1), be_const_var(5) }, + { be_const_key_weak(update_shadow, 30), be_const_closure(class_Matter_Plugin_update_shadow_closure) }, + { be_const_key_weak(consolidate_clusters, -1), be_const_closure(class_Matter_Plugin_consolidate_clusters_closure) }, + { be_const_key_weak(get_name, -1), be_const_closure(class_Matter_Plugin_get_name_closure) }, + { be_const_key_weak(update_next, -1), be_const_var(0) }, + { be_const_key_weak(get_endpoint, -1), be_const_closure(class_Matter_Plugin_get_endpoint_closure) }, { be_const_key_weak(FEATURE_MAPS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(2, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(258, -1), be_const_int(5) }, { be_const_key_int(49, -1), be_const_int(4) }, })) ) } )) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak() }, + { be_const_key_weak(subscribe_event, -1), be_const_closure(class_Matter_Plugin_subscribe_event_closure) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, + { be_const_key_weak(read_event, -1), be_const_closure(class_Matter_Plugin_read_event_closure) }, + { be_const_key_weak(COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(29, -1), be_const_nil() }, + })) ) } )) }, + { be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_parse_sensors_closure) }, + { be_const_key_weak(DISPLAY_NAME, 14), be_nested_str_weak() }, + { be_const_key_weak(ui_string_to_conf, 13), be_const_static_closure(class_Matter_Plugin_ui_string_to_conf_closure) }, + { be_const_key_weak(contains_attribute, -1), be_const_closure(class_Matter_Plugin_contains_attribute_closure) }, + { be_const_key_weak(tick, -1), be_const_var(4) }, + { be_const_key_weak(contains_cluster, -1), be_const_closure(class_Matter_Plugin_contains_cluster_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_read_attribute_closure) }, + { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_append_state_json_closure) }, })), be_str_weak(Matter_Plugin) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h index 0cb5a26f7..7c40c1080 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_1_Device.h @@ -4,8 +4,747 @@ \********************************************************************/ #include "be_constobj.h" +extern const bclass be_class_GetOptionReader; + +/******************************************************************** +** Solidified function: getoption +********************************************************************/ +extern const bclass be_class_GetOptionReader; +be_local_closure(class_GetOptionReader_getoption, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_GetOptionReader, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(flag), + /* K1 */ be_nested_str_weak(getbits), + /* K2 */ be_const_int(1), + /* K3 */ be_nested_str_weak(flag2), + /* K4 */ be_nested_str_weak(get), + /* K5 */ be_nested_str_weak(flag3), + /* K6 */ be_nested_str_weak(flag4), + /* K7 */ be_nested_str_weak(flag5), + /* K8 */ be_nested_str_weak(flag6), + }), + be_str_weak(getoption), + &be_const_str_solidified, + ( &(const binstruction[65]) { /* code */ + 0x540A001F, // 0000 LDINT R2 32 + 0x14080202, // 0001 LT R2 R1 R2 + 0x780A0006, // 0002 JMPF R2 #000A + 0x88080100, // 0003 GETMBR R2 R0 K0 + 0x8C080501, // 0004 GETMET R2 R2 K1 + 0x5C100200, // 0005 MOVE R4 R1 + 0x58140002, // 0006 LDCONST R5 K2 + 0x7C080600, // 0007 CALL R2 3 + 0x80040400, // 0008 RET 1 R2 + 0x70020035, // 0009 JMP #0040 + 0x540A0031, // 000A LDINT R2 50 + 0x14080202, // 000B LT R2 R1 R2 + 0x780A0007, // 000C JMPF R2 #0015 + 0x88080103, // 000D GETMBR R2 R0 K3 + 0x8C080504, // 000E GETMET R2 R2 K4 + 0x5412001F, // 000F LDINT R4 32 + 0x04100204, // 0010 SUB R4 R1 R4 + 0x58140002, // 0011 LDCONST R5 K2 + 0x7C080600, // 0012 CALL R2 3 + 0x80040400, // 0013 RET 1 R2 + 0x7002002A, // 0014 JMP #0040 + 0x540A0051, // 0015 LDINT R2 82 + 0x14080202, // 0016 LT R2 R1 R2 + 0x780A0007, // 0017 JMPF R2 #0020 + 0x88080105, // 0018 GETMBR R2 R0 K5 + 0x8C080501, // 0019 GETMET R2 R2 K1 + 0x54120031, // 001A LDINT R4 50 + 0x04100204, // 001B SUB R4 R1 R4 + 0x58140002, // 001C LDCONST R5 K2 + 0x7C080600, // 001D CALL R2 3 + 0x80040400, // 001E RET 1 R2 + 0x7002001F, // 001F JMP #0040 + 0x540A0071, // 0020 LDINT R2 114 + 0x14080202, // 0021 LT R2 R1 R2 + 0x780A0007, // 0022 JMPF R2 #002B + 0x88080106, // 0023 GETMBR R2 R0 K6 + 0x8C080501, // 0024 GETMET R2 R2 K1 + 0x54120051, // 0025 LDINT R4 82 + 0x04100204, // 0026 SUB R4 R1 R4 + 0x58140002, // 0027 LDCONST R5 K2 + 0x7C080600, // 0028 CALL R2 3 + 0x80040400, // 0029 RET 1 R2 + 0x70020014, // 002A JMP #0040 + 0x540A0091, // 002B LDINT R2 146 + 0x14080202, // 002C LT R2 R1 R2 + 0x780A0007, // 002D JMPF R2 #0036 + 0x88080107, // 002E GETMBR R2 R0 K7 + 0x8C080501, // 002F GETMET R2 R2 K1 + 0x54120071, // 0030 LDINT R4 114 + 0x04100204, // 0031 SUB R4 R1 R4 + 0x58140002, // 0032 LDCONST R5 K2 + 0x7C080600, // 0033 CALL R2 3 + 0x80040400, // 0034 RET 1 R2 + 0x70020009, // 0035 JMP #0040 + 0x540A00B1, // 0036 LDINT R2 178 + 0x14080202, // 0037 LT R2 R1 R2 + 0x780A0006, // 0038 JMPF R2 #0040 + 0x88080108, // 0039 GETMBR R2 R0 K8 + 0x8C080501, // 003A GETMET R2 R2 K1 + 0x54120091, // 003B LDINT R4 146 + 0x04100204, // 003C SUB R4 R1 R4 + 0x58140002, // 003D LDCONST R5 K2 + 0x7C080600, // 003E CALL R2 3 + 0x80040400, // 003F RET 1 R2 + 0x80000000, // 0040 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_GetOptionReader; +be_local_closure(class_GetOptionReader_init, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_GetOptionReader, + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(value_error), + /* K1 */ be_nested_str_weak(invalid_X20json), + /* K2 */ be_nested_str_weak(SetOption), + /* K3 */ be_nested_str_weak(flag), + /* K4 */ be_nested_str_weak(fromhex), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(reverse), + /* K7 */ be_nested_str_weak(flag2), + /* K8 */ be_const_int(1), + /* K9 */ be_nested_str_weak(flag3), + /* K10 */ be_const_int(2), + /* K11 */ be_nested_str_weak(flag4), + /* K12 */ be_const_int(3), + /* K13 */ be_nested_str_weak(flag5), + /* K14 */ be_nested_str_weak(flag6), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[54]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x1C080202, // 0001 EQ R2 R1 R2 + 0x780A0000, // 0002 JMPF R2 #0004 + 0xB0060101, // 0003 RAISE 1 K0 K1 + 0x94080302, // 0004 GETIDX R2 R1 K2 + 0x600C0015, // 0005 GETGBL R3 G21 + 0x7C0C0000, // 0006 CALL R3 0 + 0x8C0C0704, // 0007 GETMET R3 R3 K4 + 0x94140505, // 0008 GETIDX R5 R2 K5 + 0x7C0C0400, // 0009 CALL R3 2 + 0x8C0C0706, // 000A GETMET R3 R3 K6 + 0x7C0C0200, // 000B CALL R3 1 + 0x90020603, // 000C SETMBR R0 K3 R3 + 0x600C0015, // 000D GETGBL R3 G21 + 0x7C0C0000, // 000E CALL R3 0 + 0x8C0C0704, // 000F GETMET R3 R3 K4 + 0x94140508, // 0010 GETIDX R5 R2 K8 + 0x7C0C0400, // 0011 CALL R3 2 + 0x90020E03, // 0012 SETMBR R0 K7 R3 + 0x600C0015, // 0013 GETGBL R3 G21 + 0x7C0C0000, // 0014 CALL R3 0 + 0x8C0C0704, // 0015 GETMET R3 R3 K4 + 0x9414050A, // 0016 GETIDX R5 R2 K10 + 0x7C0C0400, // 0017 CALL R3 2 + 0x8C0C0706, // 0018 GETMET R3 R3 K6 + 0x7C0C0200, // 0019 CALL R3 1 + 0x90021203, // 001A SETMBR R0 K9 R3 + 0x600C0015, // 001B GETGBL R3 G21 + 0x7C0C0000, // 001C CALL R3 0 + 0x8C0C0704, // 001D GETMET R3 R3 K4 + 0x9414050C, // 001E GETIDX R5 R2 K12 + 0x7C0C0400, // 001F CALL R3 2 + 0x8C0C0706, // 0020 GETMET R3 R3 K6 + 0x7C0C0200, // 0021 CALL R3 1 + 0x90021603, // 0022 SETMBR R0 K11 R3 + 0x600C0015, // 0023 GETGBL R3 G21 + 0x7C0C0000, // 0024 CALL R3 0 + 0x8C0C0704, // 0025 GETMET R3 R3 K4 + 0x54160003, // 0026 LDINT R5 4 + 0x94140405, // 0027 GETIDX R5 R2 R5 + 0x7C0C0400, // 0028 CALL R3 2 + 0x8C0C0706, // 0029 GETMET R3 R3 K6 + 0x7C0C0200, // 002A CALL R3 1 + 0x90021A03, // 002B SETMBR R0 K13 R3 + 0x600C0015, // 002C GETGBL R3 G21 + 0x7C0C0000, // 002D CALL R3 0 + 0x8C0C0704, // 002E GETMET R3 R3 K4 + 0x54160004, // 002F LDINT R5 5 + 0x94140405, // 0030 GETIDX R5 R2 R5 + 0x7C0C0400, // 0031 CALL R3 2 + 0x8C0C0706, // 0032 GETMET R3 R3 K6 + 0x7C0C0200, // 0033 CALL R3 1 + 0x90021C03, // 0034 SETMBR R0 K14 R3 + 0x80000000, // 0035 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: GetOptionReader +********************************************************************/ +be_local_class(GetOptionReader, + 6, + NULL, + be_nested_map(8, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(flag2, -1), be_const_var(1) }, + { be_const_key_weak(flag4, -1), be_const_var(3) }, + { be_const_key_weak(getoption, -1), be_const_closure(class_GetOptionReader_getoption_closure) }, + { be_const_key_weak(init, 5), be_const_closure(class_GetOptionReader_init_closure) }, + { be_const_key_weak(flag3, -1), be_const_var(2) }, + { be_const_key_weak(flag6, -1), be_const_var(5) }, + { be_const_key_weak(flag5, -1), be_const_var(4) }, + { be_const_key_weak(flag, 0), be_const_var(0) }, + })), + be_str_weak(GetOptionReader) +); + extern const bclass be_class_Matter_Plugin_Device; +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_parse_status, /* name */ + be_nested_proto( + 3, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80000000, // 0000 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: register_cmd_cb +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_register_cmd_cb, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 0, /* varg */ + 1, /* has upvals */ + ( &(const bupvaldesc[ 1]) { /* upvals */ + be_local_const_upval(1, 0), + }), + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 1]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_http_response), + }), + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x680C0000, // 0000 GETUPV R3 U0 + 0x8C0C0700, // 0001 GETMET R3 R3 K0 + 0x5C140000, // 0002 MOVE R5 R0 + 0x5C180200, // 0003 MOVE R6 R1 + 0x5C1C0400, // 0004 MOVE R7 R2 + 0x7C0C0800, // 0005 CALL R3 4 + 0x80040600, // 0006 RET 1 R3 + }) + ), + &be_class_Matter_Plugin_Device, + }), + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(http_remote), + /* K1 */ be_nested_str_weak(add_schedule), + /* K2 */ be_nested_str_weak(UPDATE_CMD), + /* K3 */ be_nested_str_weak(UPDATE_TIME), + }), + be_str_weak(register_cmd_cb), + &be_const_str_solidified, + ( &(const binstruction[ 8]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x8C040301, // 0001 GETMET R1 R1 K1 + 0x880C0102, // 0002 GETMBR R3 R0 K2 + 0x88100103, // 0003 GETMBR R4 R0 K3 + 0x84140000, // 0004 CLOSURE R5 P0 + 0x7C040800, // 0005 CALL R1 4 + 0xA0000000, // 0006 CLOSE R0 + 0x80000000, // 0007 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_web_values, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26lt_X3B_X2D_X2D_X20_X28), + /* K4 */ be_nested_str_weak(DISPLAY_NAME), + /* K5 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[ 9]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x88100104, // 0004 GETMBR R4 R0 K4 + 0x00120604, // 0005 ADD R4 K3 R4 + 0x00100905, // 0006 ADD R4 R4 K5 + 0x7C080400, // 0007 CALL R2 2 + 0x80000000, // 0008 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: every_250ms +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_every_250ms, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(http_remote), + /* K2 */ be_nested_str_weak(scheduler), + /* K3 */ be_nested_str_weak(every_250ms), + }), + be_str_weak(every_250ms), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060003, // 0001 JMPF R1 #0006 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x8C040302, // 0003 GETMET R1 R1 K2 + 0x7C040200, // 0004 CALL R1 1 + 0x70020004, // 0005 JMP #000B + 0x60040003, // 0006 GETGBL R1 G3 + 0x5C080000, // 0007 MOVE R2 R0 + 0x7C040200, // 0008 CALL R1 1 + 0x8C040303, // 0009 GETMET R1 R1 K3 + 0x7C040200, // 000A CALL R1 1 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_onoff +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_web_value_onoff, /* name */ + be_nested_proto( + 3, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E), + /* K1 */ be_nested_str_weak(Off), + /* K2 */ be_nested_str_weak(), + }), + be_str_weak(web_value_onoff), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0004, // 0002 JMPF R2 #0008 + 0x78060001, // 0003 JMPF R1 #0006 + 0x58080000, // 0004 LDCONST R2 K0 + 0x70020000, // 0005 JMP #0007 + 0x58080001, // 0006 LDCONST R2 K1 + 0x70020000, // 0007 JMP #0009 + 0x58080002, // 0008 LDCONST R2 K2 + 0x80040400, // 0009 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_invoke_request, /* name */ + be_nested_proto( + 13, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(command), + /* K4 */ be_const_int(3), + /* K5 */ be_const_int(0), + /* K6 */ be_const_int(1), + /* K7 */ be_nested_str_weak(Matter_TLV_struct), + /* K8 */ be_nested_str_weak(add_TLV), + /* K9 */ be_nested_str_weak(U2), + /* K10 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[51]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x1C1C0B04, // 0004 EQ R7 R5 K4 + 0x781E0016, // 0005 JMPF R7 #001D + 0x1C1C0D05, // 0006 EQ R7 R6 K5 + 0x781E0002, // 0007 JMPF R7 #000B + 0x501C0200, // 0008 LDBOOL R7 1 0 + 0x80040E00, // 0009 RET 1 R7 + 0x70020010, // 000A JMP #001C + 0x1C1C0D06, // 000B EQ R7 R6 K6 + 0x781E0009, // 000C JMPF R7 #0017 + 0x8C1C0907, // 000D GETMET R7 R4 K7 + 0x7C1C0200, // 000E CALL R7 1 + 0x8C200F08, // 000F GETMET R8 R7 K8 + 0x58280005, // 0010 LDCONST R10 K5 + 0x882C0909, // 0011 GETMBR R11 R4 K9 + 0x58300005, // 0012 LDCONST R12 K5 + 0x7C200800, // 0013 CALL R8 4 + 0x900E0705, // 0014 SETMBR R3 K3 K5 + 0x80040E00, // 0015 RET 1 R7 + 0x70020004, // 0016 JMP #001C + 0x541E003F, // 0017 LDINT R7 64 + 0x1C1C0C07, // 0018 EQ R7 R6 R7 + 0x781E0001, // 0019 JMPF R7 #001C + 0x501C0200, // 001A LDBOOL R7 1 0 + 0x80040E00, // 001B RET 1 R7 + 0x70020014, // 001C JMP #0032 + 0x541E0003, // 001D LDINT R7 4 + 0x1C1C0A07, // 001E EQ R7 R5 R7 + 0x781E0002, // 001F JMPF R7 #0023 + 0x501C0200, // 0020 LDBOOL R7 1 0 + 0x80040E00, // 0021 RET 1 R7 + 0x7002000E, // 0022 JMP #0032 + 0x541E0004, // 0023 LDINT R7 5 + 0x1C1C0A07, // 0024 EQ R7 R5 R7 + 0x781E0002, // 0025 JMPF R7 #0029 + 0x501C0200, // 0026 LDBOOL R7 1 0 + 0x80040E00, // 0027 RET 1 R7 + 0x70020008, // 0028 JMP #0032 + 0x601C0003, // 0029 GETGBL R7 G3 + 0x5C200000, // 002A MOVE R8 R0 + 0x7C1C0200, // 002B CALL R7 1 + 0x8C1C0F0A, // 002C GETMET R7 R7 K10 + 0x5C240200, // 002D MOVE R9 R1 + 0x5C280400, // 002E MOVE R10 R2 + 0x5C2C0600, // 002F MOVE R11 R3 + 0x7C1C0800, // 0030 CALL R7 4 + 0x80040E00, // 0031 RET 1 R7 + 0x80000000, // 0032 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_update_shadow, /* name */ + be_nested_proto( + 7, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(tick), + /* K2 */ be_nested_str_weak(device), + /* K3 */ be_nested_str_weak(call_remote_sync), + /* K4 */ be_nested_str_weak(UPDATE_CMD), + /* K5 */ be_nested_str_weak(parse_http_response), + /* K6 */ be_const_int(1), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x7806000D, // 0001 JMPF R1 #0010 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x88080102, // 0003 GETMBR R2 R0 K2 + 0x88080501, // 0004 GETMBR R2 R2 K1 + 0x20040202, // 0005 NE R1 R1 R2 + 0x78060008, // 0006 JMPF R1 #0010 + 0x8C040103, // 0007 GETMET R1 R0 K3 + 0x880C0104, // 0008 GETMBR R3 R0 K4 + 0x7C040400, // 0009 CALL R1 2 + 0x78060004, // 000A JMPF R1 #0010 + 0x8C080105, // 000B GETMET R2 R0 K5 + 0x58100006, // 000C LDCONST R4 K6 + 0x5C140200, // 000D MOVE R5 R1 + 0x88180104, // 000E GETMBR R6 R0 K4 + 0x7C080800, // 000F CALL R2 4 + 0x88040102, // 0010 GETMBR R1 R0 K2 + 0x88040301, // 0011 GETMBR R1 R1 K1 + 0x90020201, // 0012 SETMBR R0 K1 R1 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: call_remote_sync +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_call_remote_sync, /* name */ + be_nested_proto( + 10, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(json), + /* K2 */ be_const_int(2), + /* K3 */ be_nested_str_weak(_X20), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(http_remote), + /* K6 */ be_nested_str_weak(call_sync), + /* K7 */ be_nested_str_weak(SYNC_TIMEOUT), + /* K8 */ be_nested_str_weak(device_is_alive), + /* K9 */ be_nested_str_weak(load), + /* K10 */ be_const_int(1), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(log), + /* K13 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying), + /* K14 */ be_const_int(3), + }), + be_str_weak(call_remote_sync), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x880C0100, // 0000 GETMBR R3 R0 K0 + 0x780E0029, // 0001 JMPF R3 #002C + 0xA40E0200, // 0002 IMPORT R3 K1 + 0x58100002, // 0003 LDCONST R4 K2 + 0x4C140000, // 0004 LDNIL R5 + 0x20140405, // 0005 NE R5 R2 R5 + 0x78160005, // 0006 JMPF R5 #000D + 0x00140303, // 0007 ADD R5 R1 K3 + 0x60180008, // 0008 GETGBL R6 G8 + 0x5C1C0400, // 0009 MOVE R7 R2 + 0x7C180200, // 000A CALL R6 1 + 0x00140A06, // 000B ADD R5 R5 R6 + 0x5C040A00, // 000C MOVE R1 R5 + 0x24140904, // 000D GT R5 R4 K4 + 0x78160016, // 000E JMPF R5 #0026 + 0x88140105, // 000F GETMBR R5 R0 K5 + 0x8C140B06, // 0010 GETMET R5 R5 K6 + 0x5C1C0200, // 0011 MOVE R7 R1 + 0x88200107, // 0012 GETMBR R8 R0 K7 + 0x7C140600, // 0013 CALL R5 3 + 0x4C180000, // 0014 LDNIL R6 + 0x20180A06, // 0015 NE R6 R5 R6 + 0x781A0007, // 0016 JMPF R6 #001F + 0x88180105, // 0017 GETMBR R6 R0 K5 + 0x8C180D08, // 0018 GETMET R6 R6 K8 + 0x50200200, // 0019 LDBOOL R8 1 0 + 0x7C180400, // 001A CALL R6 2 + 0x8C180709, // 001B GETMET R6 R3 K9 + 0x5C200A00, // 001C MOVE R8 R5 + 0x7C180400, // 001D CALL R6 2 + 0x80040C00, // 001E RET 1 R6 + 0x0410090A, // 001F SUB R4 R4 K10 + 0xB81A1600, // 0020 GETNGBL R6 K11 + 0x8C180D0C, // 0021 GETMET R6 R6 K12 + 0x5820000D, // 0022 LDCONST R8 K13 + 0x5824000E, // 0023 LDCONST R9 K14 + 0x7C180600, // 0024 CALL R6 3 + 0x7001FFE6, // 0025 JMP #000D + 0x88140105, // 0026 GETMBR R5 R0 K5 + 0x8C140B08, // 0027 GETMET R5 R5 K8 + 0x501C0000, // 0028 LDBOOL R7 0 0 + 0x7C140400, // 0029 CALL R5 2 + 0x4C140000, // 002A LDNIL R5 + 0x80040A00, // 002B RET 1 R5 + 0x80000000, // 002C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_http_response +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_parse_http_response, /* name */ + be_nested_proto( + 11, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(tick), + /* K2 */ be_nested_str_weak(device), + /* K3 */ be_nested_str_weak(http_remote), + /* K4 */ be_nested_str_weak(parse_status_response_and_call_method), + /* K5 */ be_nested_str_weak(parse_status), + }), + be_str_weak(parse_http_response), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0x88100100, // 0000 GETMBR R4 R0 K0 + 0x7812000A, // 0001 JMPF R4 #000D + 0x88100102, // 0002 GETMBR R4 R0 K2 + 0x88100901, // 0003 GETMBR R4 R4 K1 + 0x90020204, // 0004 SETMBR R0 K1 R4 + 0x88100103, // 0005 GETMBR R4 R0 K3 + 0x8C100904, // 0006 GETMET R4 R4 K4 + 0x5C180200, // 0007 MOVE R6 R1 + 0x5C1C0400, // 0008 MOVE R7 R2 + 0x5C200600, // 0009 MOVE R8 R3 + 0x5C240000, // 000A MOVE R9 R0 + 0x88280105, // 000B GETMBR R10 R0 K5 + 0x7C100C00, // 000C CALL R4 6 + 0x80000000, // 000D RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(PREFIX), + /* K4 */ be_nested_str_weak(html_escape), + /* K5 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C0C0302, // 0003 GETMET R3 R1 K2 + 0x60140018, // 0004 GETGBL R5 G24 + 0x88180103, // 0005 GETMBR R6 R0 K3 + 0x780A0003, // 0006 JMPF R2 #000B + 0x8C1C0304, // 0007 GETMET R7 R1 K4 + 0x5C240400, // 0008 MOVE R9 R2 + 0x7C1C0400, // 0009 CALL R7 2 + 0x70020000, // 000A JMP #000C + 0x581C0005, // 000B LDCONST R7 K5 + 0x7C140400, // 000C CALL R5 2 + 0x7C0C0400, // 000D CALL R3 2 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -20,7 +759,7 @@ be_local_closure(class_Matter_Plugin_Device_read_attribute, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Device, 1, /* has constants */ - ( &(const bvalue[36]) { /* constants */ + ( &(const bvalue[43]) { /* constants */ /* K0 */ be_nested_str_weak(matter), /* K1 */ be_nested_str_weak(TLV), /* K2 */ be_nested_str_weak(cluster), @@ -43,24 +782,31 @@ be_local_closure(class_Matter_Plugin_Device_read_attribute, /* name */ /* K19 */ be_nested_str_weak(device), /* K20 */ be_nested_str_weak(disable_bridge_mode), /* K21 */ be_nested_str_weak(string), - /* K22 */ be_nested_str_weak(UTF1), - /* K23 */ be_nested_str_weak(tasmota), - /* K24 */ be_nested_str_weak(cmd), - /* K25 */ be_nested_str_weak(DeviceName), - /* K26 */ be_nested_str_weak(get_name), - /* K27 */ be_nested_str_weak(Status_X202), - /* K28 */ be_nested_str_weak(StatusFWR), - /* K29 */ be_nested_str_weak(Version), - /* K30 */ be_nested_str_weak(_X28), - /* K31 */ be_nested_str_weak(wifi), - /* K32 */ be_nested_str_weak(mac), - /* K33 */ be_nested_str_weak(), - /* K34 */ be_nested_str_weak(BOOL), - /* K35 */ be_nested_str_weak(read_attribute), + /* K22 */ be_nested_str_weak(BRIDGE), + /* K23 */ be_nested_str_weak(http_remote), + /* K24 */ be_nested_str_weak(get_info), + /* K25 */ be_nested_str_weak(name), + /* K26 */ be_nested_str_weak(UTF1), + /* K27 */ be_nested_str_weak(NULL), + /* K28 */ be_nested_str_weak(tasmota), + /* K29 */ be_nested_str_weak(cmd), + /* K30 */ be_nested_str_weak(DeviceName), + /* K31 */ be_nested_str_weak(get_name), + /* K32 */ be_nested_str_weak(version), + /* K33 */ be_nested_str_weak(_X28), + /* K34 */ be_nested_str_weak(Status_X202), + /* K35 */ be_nested_str_weak(StatusFWR), + /* K36 */ be_nested_str_weak(Version), + /* K37 */ be_nested_str_weak(mac), + /* K38 */ be_nested_str_weak(wifi), + /* K39 */ be_nested_str_weak(), + /* K40 */ be_nested_str_weak(BOOL), + /* K41 */ be_nested_str_weak(reachable), + /* K42 */ be_nested_str_weak(read_attribute), }), be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[189]) { /* code */ + ( &(const binstruction[258]) { /* code */ 0xB8120000, // 0000 GETNGBL R4 K0 0x88100901, // 0001 GETMBR R4 R4 K1 0x88140502, // 0002 GETMBR R5 R2 K2 @@ -82,7 +828,7 @@ be_local_closure(class_Matter_Plugin_Device_read_attribute, /* name */ 0x58280005, // 0012 LDCONST R10 K5 0x7C1C0600, // 0013 CALL R7 3 0x80040E00, // 0014 RET 1 R7 - 0x7002009D, // 0015 JMP #00B4 + 0x700200E2, // 0015 JMP #00F9 0x541E0003, // 0016 LDINT R7 4 0x1C1C0A07, // 0017 EQ R7 R5 R7 0x781E0004, // 0018 JMPF R7 #001E @@ -90,11 +836,11 @@ be_local_closure(class_Matter_Plugin_Device_read_attribute, /* name */ 0x781E0001, // 001A JMPF R7 #001D 0x4C1C0000, // 001B LDNIL R7 0x80040E00, // 001C RET 1 R7 - 0x70020095, // 001D JMP #00B4 + 0x700200DA, // 001D JMP #00F9 0x541E0004, // 001E LDINT R7 5 0x1C1C0A07, // 001F EQ R7 R5 R7 0x781E0000, // 0020 JMPF R7 #0022 - 0x70020091, // 0021 JMP #00B4 + 0x700200D6, // 0021 JMP #00F9 0x541E001C, // 0022 LDINT R7 29 0x1C1C0A07, // 0023 EQ R7 R5 R7 0x781E0034, // 0024 JMPF R7 #005A @@ -150,106 +896,231 @@ be_local_closure(class_Matter_Plugin_Device_read_attribute, /* name */ 0x58380008, // 0056 LDCONST R14 K8 0x7C280800, // 0057 CALL R10 4 0x80040E00, // 0058 RET 1 R7 - 0x70020059, // 0059 JMP #00B4 + 0x7002009E, // 0059 JMP #00F9 0x541E0038, // 005A LDINT R7 57 0x1C1C0A07, // 005B EQ R7 R5 R7 - 0x781E0056, // 005C JMPF R7 #00B4 + 0x781E009B, // 005C JMPF R7 #00F9 0xA41E2A00, // 005D IMPORT R7 K21 0x1C200D04, // 005E EQ R8 R6 K4 - 0x7822000A, // 005F JMPF R8 #006B - 0x8C200706, // 0060 GETMET R8 R3 K6 - 0x88280916, // 0061 GETMBR R10 R4 K22 - 0xB82E2E00, // 0062 GETNGBL R11 K23 - 0x8C2C1718, // 0063 GETMET R11 R11 K24 - 0x58340019, // 0064 LDCONST R13 K25 - 0x50380200, // 0065 LDBOOL R14 1 0 - 0x7C2C0600, // 0066 CALL R11 3 - 0x942C1719, // 0067 GETIDX R11 R11 K25 - 0x7C200600, // 0068 CALL R8 3 - 0x80041000, // 0069 RET 1 R8 - 0x70020048, // 006A JMP #00B4 - 0x54220004, // 006B LDINT R8 5 - 0x1C200C08, // 006C EQ R8 R6 R8 - 0x78220006, // 006D JMPF R8 #0075 - 0x8C200706, // 006E GETMET R8 R3 K6 - 0x88280916, // 006F GETMBR R10 R4 K22 - 0x8C2C011A, // 0070 GETMET R11 R0 K26 - 0x7C2C0200, // 0071 CALL R11 1 - 0x7C200600, // 0072 CALL R8 3 - 0x80041000, // 0073 RET 1 R8 - 0x7002003E, // 0074 JMP #00B4 - 0x54220009, // 0075 LDINT R8 10 - 0x1C200C08, // 0076 EQ R8 R6 R8 - 0x78220015, // 0077 JMPF R8 #008E - 0xB8222E00, // 0078 GETNGBL R8 K23 - 0x8C201118, // 0079 GETMET R8 R8 K24 - 0x5828001B, // 007A LDCONST R10 K27 - 0x502C0200, // 007B LDBOOL R11 1 0 - 0x7C200600, // 007C CALL R8 3 - 0x9420111C, // 007D GETIDX R8 R8 K28 - 0x9420111D, // 007E GETIDX R8 R8 K29 - 0x8C240F11, // 007F GETMET R9 R7 K17 - 0x5C2C1000, // 0080 MOVE R11 R8 - 0x5830001E, // 0081 LDCONST R12 K30 - 0x7C240600, // 0082 CALL R9 3 - 0x24281305, // 0083 GT R10 R9 K5 - 0x782A0002, // 0084 JMPF R10 #0088 - 0x04281308, // 0085 SUB R10 R9 K8 - 0x402A0A0A, // 0086 CONNECT R10 K5 R10 - 0x9420100A, // 0087 GETIDX R8 R8 R10 - 0x8C280706, // 0088 GETMET R10 R3 K6 - 0x88300916, // 0089 GETMBR R12 R4 K22 - 0x5C341000, // 008A MOVE R13 R8 - 0x7C280600, // 008B CALL R10 3 - 0x80041400, // 008C RET 1 R10 - 0x70020025, // 008D JMP #00B4 - 0x5422000E, // 008E LDINT R8 15 - 0x1C200C08, // 008F EQ R8 R6 R8 - 0x7822000B, // 0090 JMPF R8 #009D - 0x8C200706, // 0091 GETMET R8 R3 K6 - 0x88280916, // 0092 GETMBR R10 R4 K22 - 0xB82E2E00, // 0093 GETNGBL R11 K23 - 0x8C2C171F, // 0094 GETMET R11 R11 K31 - 0x7C2C0200, // 0095 CALL R11 1 - 0x8C2C1711, // 0096 GETMET R11 R11 K17 - 0x58340020, // 0097 LDCONST R13 K32 - 0x58380021, // 0098 LDCONST R14 K33 - 0x7C2C0600, // 0099 CALL R11 3 - 0x7C200600, // 009A CALL R8 3 - 0x80041000, // 009B RET 1 R8 - 0x70020016, // 009C JMP #00B4 - 0x54220010, // 009D LDINT R8 17 - 0x1C200C08, // 009E EQ R8 R6 R8 - 0x78220005, // 009F JMPF R8 #00A6 - 0x8C200706, // 00A0 GETMET R8 R3 K6 - 0x88280922, // 00A1 GETMBR R10 R4 K34 - 0x582C0008, // 00A2 LDCONST R11 K8 - 0x7C200600, // 00A3 CALL R8 3 - 0x80041000, // 00A4 RET 1 R8 - 0x7002000D, // 00A5 JMP #00B4 - 0x54220011, // 00A6 LDINT R8 18 - 0x1C200C08, // 00A7 EQ R8 R6 R8 - 0x7822000A, // 00A8 JMPF R8 #00B4 - 0x8C200706, // 00A9 GETMET R8 R3 K6 - 0x88280916, // 00AA GETMBR R10 R4 K22 - 0xB82E2E00, // 00AB GETNGBL R11 K23 - 0x8C2C171F, // 00AC GETMET R11 R11 K31 - 0x7C2C0200, // 00AD CALL R11 1 - 0x8C2C1711, // 00AE GETMET R11 R11 K17 - 0x58340020, // 00AF LDCONST R13 K32 - 0x58380021, // 00B0 LDCONST R14 K33 - 0x7C2C0600, // 00B1 CALL R11 3 - 0x7C200600, // 00B2 CALL R8 3 - 0x80041000, // 00B3 RET 1 R8 - 0x601C0003, // 00B4 GETGBL R7 G3 - 0x5C200000, // 00B5 MOVE R8 R0 - 0x7C1C0200, // 00B6 CALL R7 1 - 0x8C1C0F23, // 00B7 GETMET R7 R7 K35 - 0x5C240200, // 00B8 MOVE R9 R1 - 0x5C280400, // 00B9 MOVE R10 R2 - 0x5C2C0600, // 00BA MOVE R11 R3 - 0x7C1C0800, // 00BB CALL R7 4 - 0x80040E00, // 00BC RET 1 R7 + 0x7822001F, // 005F JMPF R8 #0080 + 0x88200116, // 0060 GETMBR R8 R0 K22 + 0x78220012, // 0061 JMPF R8 #0075 + 0x88200117, // 0062 GETMBR R8 R0 K23 + 0x8C201118, // 0063 GETMET R8 R8 K24 + 0x7C200200, // 0064 CALL R8 1 + 0x8C201111, // 0065 GETMET R8 R8 K17 + 0x58280019, // 0066 LDCONST R10 K25 + 0x7C200400, // 0067 CALL R8 2 + 0x78220005, // 0068 JMPF R8 #006F + 0x8C240706, // 0069 GETMET R9 R3 K6 + 0x882C091A, // 006A GETMBR R11 R4 K26 + 0x5C301000, // 006B MOVE R12 R8 + 0x7C240600, // 006C CALL R9 3 + 0x80041200, // 006D RET 1 R9 + 0x70020004, // 006E JMP #0074 + 0x8C240706, // 006F GETMET R9 R3 K6 + 0x882C091B, // 0070 GETMBR R11 R4 K27 + 0x4C300000, // 0071 LDNIL R12 + 0x7C240600, // 0072 CALL R9 3 + 0x80041200, // 0073 RET 1 R9 + 0x70020009, // 0074 JMP #007F + 0x8C200706, // 0075 GETMET R8 R3 K6 + 0x8828091A, // 0076 GETMBR R10 R4 K26 + 0xB82E3800, // 0077 GETNGBL R11 K28 + 0x8C2C171D, // 0078 GETMET R11 R11 K29 + 0x5834001E, // 0079 LDCONST R13 K30 + 0x50380200, // 007A LDBOOL R14 1 0 + 0x7C2C0600, // 007B CALL R11 3 + 0x942C171E, // 007C GETIDX R11 R11 K30 + 0x7C200600, // 007D CALL R8 3 + 0x80041000, // 007E RET 1 R8 + 0x70020078, // 007F JMP #00F9 + 0x54220004, // 0080 LDINT R8 5 + 0x1C200C08, // 0081 EQ R8 R6 R8 + 0x78220006, // 0082 JMPF R8 #008A + 0x8C200706, // 0083 GETMET R8 R3 K6 + 0x8828091A, // 0084 GETMBR R10 R4 K26 + 0x8C2C011F, // 0085 GETMET R11 R0 K31 + 0x7C2C0200, // 0086 CALL R11 1 + 0x7C200600, // 0087 CALL R8 3 + 0x80041000, // 0088 RET 1 R8 + 0x7002006E, // 0089 JMP #00F9 + 0x54220009, // 008A LDINT R8 10 + 0x1C200C08, // 008B EQ R8 R6 R8 + 0x78220033, // 008C JMPF R8 #00C1 + 0x88200116, // 008D GETMBR R8 R0 K22 + 0x7822001B, // 008E JMPF R8 #00AB + 0x88200117, // 008F GETMBR R8 R0 K23 + 0x8C201118, // 0090 GETMET R8 R8 K24 + 0x7C200200, // 0091 CALL R8 1 + 0x8C201111, // 0092 GETMET R8 R8 K17 + 0x58280020, // 0093 LDCONST R10 K32 + 0x7C200400, // 0094 CALL R8 2 + 0x7822000E, // 0095 JMPF R8 #00A5 + 0x8C240F11, // 0096 GETMET R9 R7 K17 + 0x5C2C1000, // 0097 MOVE R11 R8 + 0x58300021, // 0098 LDCONST R12 K33 + 0x7C240600, // 0099 CALL R9 3 + 0x24281305, // 009A GT R10 R9 K5 + 0x782A0002, // 009B JMPF R10 #009F + 0x04281308, // 009C SUB R10 R9 K8 + 0x402A0A0A, // 009D CONNECT R10 K5 R10 + 0x9420100A, // 009E GETIDX R8 R8 R10 + 0x8C280706, // 009F GETMET R10 R3 K6 + 0x8830091A, // 00A0 GETMBR R12 R4 K26 + 0x5C341000, // 00A1 MOVE R13 R8 + 0x7C280600, // 00A2 CALL R10 3 + 0x80041400, // 00A3 RET 1 R10 + 0x70020004, // 00A4 JMP #00AA + 0x8C240706, // 00A5 GETMET R9 R3 K6 + 0x882C091B, // 00A6 GETMBR R11 R4 K27 + 0x4C300000, // 00A7 LDNIL R12 + 0x7C240600, // 00A8 CALL R9 3 + 0x80041200, // 00A9 RET 1 R9 + 0x70020014, // 00AA JMP #00C0 + 0xB8223800, // 00AB GETNGBL R8 K28 + 0x8C20111D, // 00AC GETMET R8 R8 K29 + 0x58280022, // 00AD LDCONST R10 K34 + 0x502C0200, // 00AE LDBOOL R11 1 0 + 0x7C200600, // 00AF CALL R8 3 + 0x94201123, // 00B0 GETIDX R8 R8 K35 + 0x94201124, // 00B1 GETIDX R8 R8 K36 + 0x8C240F11, // 00B2 GETMET R9 R7 K17 + 0x5C2C1000, // 00B3 MOVE R11 R8 + 0x58300021, // 00B4 LDCONST R12 K33 + 0x7C240600, // 00B5 CALL R9 3 + 0x24281305, // 00B6 GT R10 R9 K5 + 0x782A0002, // 00B7 JMPF R10 #00BB + 0x04281308, // 00B8 SUB R10 R9 K8 + 0x402A0A0A, // 00B9 CONNECT R10 K5 R10 + 0x9420100A, // 00BA GETIDX R8 R8 R10 + 0x8C280706, // 00BB GETMET R10 R3 K6 + 0x8830091A, // 00BC GETMBR R12 R4 K26 + 0x5C341000, // 00BD MOVE R13 R8 + 0x7C280600, // 00BE CALL R10 3 + 0x80041400, // 00BF RET 1 R10 + 0x70020037, // 00C0 JMP #00F9 + 0x5422000E, // 00C1 LDINT R8 15 + 0x1C200C08, // 00C2 EQ R8 R6 R8 + 0x74220002, // 00C3 JMPT R8 #00C7 + 0x54220011, // 00C4 LDINT R8 18 + 0x1C200C08, // 00C5 EQ R8 R6 R8 + 0x78220020, // 00C6 JMPF R8 #00E8 + 0x88200116, // 00C7 GETMBR R8 R0 K22 + 0x78220012, // 00C8 JMPF R8 #00DC + 0x88200117, // 00C9 GETMBR R8 R0 K23 + 0x8C201118, // 00CA GETMET R8 R8 K24 + 0x7C200200, // 00CB CALL R8 1 + 0x8C201111, // 00CC GETMET R8 R8 K17 + 0x58280025, // 00CD LDCONST R10 K37 + 0x7C200400, // 00CE CALL R8 2 + 0x78220005, // 00CF JMPF R8 #00D6 + 0x8C240706, // 00D0 GETMET R9 R3 K6 + 0x882C091A, // 00D1 GETMBR R11 R4 K26 + 0x5C301000, // 00D2 MOVE R12 R8 + 0x7C240600, // 00D3 CALL R9 3 + 0x80041200, // 00D4 RET 1 R9 + 0x70020004, // 00D5 JMP #00DB + 0x8C240706, // 00D6 GETMET R9 R3 K6 + 0x882C091B, // 00D7 GETMBR R11 R4 K27 + 0x4C300000, // 00D8 LDNIL R12 + 0x7C240600, // 00D9 CALL R9 3 + 0x80041200, // 00DA RET 1 R9 + 0x7002000A, // 00DB JMP #00E7 + 0x8C200706, // 00DC GETMET R8 R3 K6 + 0x8828091A, // 00DD GETMBR R10 R4 K26 + 0xB82E3800, // 00DE GETNGBL R11 K28 + 0x8C2C1726, // 00DF GETMET R11 R11 K38 + 0x7C2C0200, // 00E0 CALL R11 1 + 0x8C2C1711, // 00E1 GETMET R11 R11 K17 + 0x58340025, // 00E2 LDCONST R13 K37 + 0x58380027, // 00E3 LDCONST R14 K39 + 0x7C2C0600, // 00E4 CALL R11 3 + 0x7C200600, // 00E5 CALL R8 3 + 0x80041000, // 00E6 RET 1 R8 + 0x70020010, // 00E7 JMP #00F9 + 0x54220010, // 00E8 LDINT R8 17 + 0x1C200C08, // 00E9 EQ R8 R6 R8 + 0x7822000D, // 00EA JMPF R8 #00F9 + 0x88200116, // 00EB GETMBR R8 R0 K22 + 0x78220006, // 00EC JMPF R8 #00F4 + 0x8C200706, // 00ED GETMET R8 R3 K6 + 0x88280928, // 00EE GETMBR R10 R4 K40 + 0x882C0117, // 00EF GETMBR R11 R0 K23 + 0x882C1729, // 00F0 GETMBR R11 R11 K41 + 0x7C200600, // 00F1 CALL R8 3 + 0x80041000, // 00F2 RET 1 R8 + 0x70020004, // 00F3 JMP #00F9 + 0x8C200706, // 00F4 GETMET R8 R3 K6 + 0x88280928, // 00F5 GETMBR R10 R4 K40 + 0x582C0008, // 00F6 LDCONST R11 K8 + 0x7C200600, // 00F7 CALL R8 3 + 0x80041000, // 00F8 RET 1 R8 + 0x601C0003, // 00F9 GETGBL R7 G3 + 0x5C200000, // 00FA MOVE R8 R0 + 0x7C1C0200, // 00FB CALL R7 1 + 0x8C1C0F2A, // 00FC GETMET R7 R7 K42 + 0x5C240200, // 00FD MOVE R9 R1 + 0x5C280400, // 00FE MOVE R10 R2 + 0x5C2C0600, // 00FF MOVE R11 R3 + 0x7C1C0800, // 0100 CALL R7 4 + 0x80040E00, // 0101 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Device; +be_local_closure(class_Matter_Plugin_Device_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Device, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG_HTTP), + /* K4 */ be_nested_str_weak(http_remote), + /* K5 */ be_nested_str_weak(device), + /* K6 */ be_nested_str_weak(register_http_remote), + /* K7 */ be_nested_str_weak(PROBE_TIMEOUT), + /* K8 */ be_nested_str_weak(register_cmd_cb), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* 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 + 0x88100101, // 0008 GETMBR R4 R0 K1 + 0x7812000A, // 0009 JMPF R4 #0015 + 0x8C100702, // 000A GETMET R4 R3 K2 + 0x88180103, // 000B GETMBR R6 R0 K3 + 0x7C100400, // 000C CALL R4 2 + 0x88140105, // 000D GETMBR R5 R0 K5 + 0x8C140B06, // 000E GETMET R5 R5 K6 + 0x5C1C0800, // 000F MOVE R7 R4 + 0x88200107, // 0010 GETMBR R8 R0 K7 + 0x7C140600, // 0011 CALL R5 3 + 0x90020805, // 0012 SETMBR R0 K4 R5 + 0x8C140108, // 0013 GETMET R5 R0 K8 + 0x7C140200, // 0014 CALL R5 1 + 0x80000000, // 0015 RET 0 }) ) ); @@ -521,112 +1392,30 @@ be_local_closure(class_Matter_Plugin_Device__parse_sensor_entry, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; -be_local_closure(class_Matter_Plugin_Device_invoke_request, /* name */ - be_nested_proto( - 13, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Device, - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(command), - /* K4 */ be_const_int(3), - /* K5 */ be_const_int(0), - /* K6 */ be_const_int(1), - /* K7 */ be_nested_str_weak(Matter_TLV_struct), - /* K8 */ be_nested_str_weak(add_TLV), - /* K9 */ be_nested_str_weak(U2), - /* K10 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[51]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x1C1C0B04, // 0004 EQ R7 R5 K4 - 0x781E0016, // 0005 JMPF R7 #001D - 0x1C1C0D05, // 0006 EQ R7 R6 K5 - 0x781E0002, // 0007 JMPF R7 #000B - 0x501C0200, // 0008 LDBOOL R7 1 0 - 0x80040E00, // 0009 RET 1 R7 - 0x70020010, // 000A JMP #001C - 0x1C1C0D06, // 000B EQ R7 R6 K6 - 0x781E0009, // 000C JMPF R7 #0017 - 0x8C1C0907, // 000D GETMET R7 R4 K7 - 0x7C1C0200, // 000E CALL R7 1 - 0x8C200F08, // 000F GETMET R8 R7 K8 - 0x58280005, // 0010 LDCONST R10 K5 - 0x882C0909, // 0011 GETMBR R11 R4 K9 - 0x58300005, // 0012 LDCONST R12 K5 - 0x7C200800, // 0013 CALL R8 4 - 0x900E0705, // 0014 SETMBR R3 K3 K5 - 0x80040E00, // 0015 RET 1 R7 - 0x70020004, // 0016 JMP #001C - 0x541E003F, // 0017 LDINT R7 64 - 0x1C1C0C07, // 0018 EQ R7 R6 R7 - 0x781E0001, // 0019 JMPF R7 #001C - 0x501C0200, // 001A LDBOOL R7 1 0 - 0x80040E00, // 001B RET 1 R7 - 0x70020014, // 001C JMP #0032 - 0x541E0003, // 001D LDINT R7 4 - 0x1C1C0A07, // 001E EQ R7 R5 R7 - 0x781E0002, // 001F JMPF R7 #0023 - 0x501C0200, // 0020 LDBOOL R7 1 0 - 0x80040E00, // 0021 RET 1 R7 - 0x7002000E, // 0022 JMP #0032 - 0x541E0004, // 0023 LDINT R7 5 - 0x1C1C0A07, // 0024 EQ R7 R5 R7 - 0x781E0002, // 0025 JMPF R7 #0029 - 0x501C0200, // 0026 LDBOOL R7 1 0 - 0x80040E00, // 0027 RET 1 R7 - 0x70020008, // 0028 JMP #0032 - 0x601C0003, // 0029 GETGBL R7 G3 - 0x5C200000, // 002A MOVE R8 R0 - 0x7C1C0200, // 002B CALL R7 1 - 0x8C1C0F0A, // 002C GETMET R7 R7 K10 - 0x5C240200, // 002D MOVE R9 R1 - 0x5C280400, // 002E MOVE R10 R2 - 0x5C2C0600, // 002F MOVE R11 R3 - 0x7C1C0800, // 0030 CALL R7 4 - 0x80040E00, // 0031 RET 1 R7 - 0x80000000, // 0032 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified class: Matter_Plugin_Device ********************************************************************/ extern const bclass be_class_Matter_Plugin; be_local_class(Matter_Plugin_Device, - 0, + 1, &be_class_Matter_Plugin, - be_nested_map(7, + be_nested_map(24, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(read_attribute, 1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) }, - { be_const_key_weak(invoke_request, 4), be_const_closure(class_Matter_Plugin_Device_invoke_request_closure) }, - { be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_Device_append_state_json_closure) }, - { be_const_key_weak(NON_BRIDGE_VENDOR, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(2, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(4631), - be_const_int(4993), + { be_const_key_weak(ARG_HTTP, -1), be_nested_str_weak(url) }, + { be_const_key_weak(_parse_sensor_entry, -1), be_const_closure(class_Matter_Plugin_Device__parse_sensor_entry_closure) }, + { be_const_key_weak(TYPES, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(19, -1), be_const_int(1) }, })) ) } )) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(parse_status, 12), be_const_closure(class_Matter_Plugin_Device_parse_status_closure) }, + { be_const_key_weak(http_remote, -1), be_const_var(0) }, + { be_const_key_weak(register_cmd_cb, 6), be_const_closure(class_Matter_Plugin_Device_register_cmd_cb_closure) }, + { be_const_key_weak(GetOptionReader, 16), be_const_class(be_class_GetOptionReader) }, + { be_const_key_weak(append_state_json, 19), be_const_closure(class_Matter_Plugin_Device_append_state_json_closure) }, + { be_const_key_weak(web_values, 22), be_const_closure(class_Matter_Plugin_Device_web_values_closure) }, + { be_const_key_weak(PREFIX, -1), be_nested_str_weak(_X7C_X20_X3Ci_X3E_X25s_X3C_X2Fi_X3E_X20) }, + { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(5, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -699,12 +1488,24 @@ be_local_class(Matter_Plugin_Device, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPES, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(19, -1), be_const_int(1) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Device_invoke_request_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Device_init_closure) }, + { be_const_key_weak(PROBE_TIMEOUT, 20), be_const_int(1700) }, + { be_const_key_weak(SYNC_TIMEOUT, -1), be_const_int(500) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2011) }, + { be_const_key_weak(parse_http_response, -1), be_const_closure(class_Matter_Plugin_Device_parse_http_response_closure) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Device_web_values_prefix_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Device_read_attribute_closure) }, + { be_const_key_weak(call_remote_sync, 21), be_const_closure(class_Matter_Plugin_Device_call_remote_sync_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Device_update_shadow_closure) }, + { be_const_key_weak(web_value_onoff, -1), be_const_closure(class_Matter_Plugin_Device_web_value_onoff_closure) }, + { be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_Plugin_Device_every_250ms_closure) }, + { be_const_key_weak(NON_BRIDGE_VENDOR, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(2, + ( (struct bvalue*) &(const bvalue[]) { + be_const_int(4631), + be_const_int(4993), })) ) } )) }, - { be_const_key_weak(_parse_sensor_entry, -1), be_const_closure(class_Matter_Plugin_Device__parse_sensor_entry_closure) }, })), be_str_weak(Matter_Plugin_Device) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h deleted file mode 100644 index bdbd6be1f..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h +++ /dev/null @@ -1,934 +0,0 @@ -/* Solidification of Matter_Plugin_2_Bridge_HTTP.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_GetOptionReader; - -/******************************************************************** -** Solidified function: getoption -********************************************************************/ -extern const bclass be_class_GetOptionReader; -be_local_closure(class_GetOptionReader_getoption, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_GetOptionReader, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(flag), - /* K1 */ be_nested_str_weak(getbits), - /* K2 */ be_const_int(1), - /* K3 */ be_nested_str_weak(flag2), - /* K4 */ be_nested_str_weak(get), - /* K5 */ be_nested_str_weak(flag3), - /* K6 */ be_nested_str_weak(flag4), - /* K7 */ be_nested_str_weak(flag5), - /* K8 */ be_nested_str_weak(flag6), - }), - be_str_weak(getoption), - &be_const_str_solidified, - ( &(const binstruction[65]) { /* code */ - 0x540A001F, // 0000 LDINT R2 32 - 0x14080202, // 0001 LT R2 R1 R2 - 0x780A0006, // 0002 JMPF R2 #000A - 0x88080100, // 0003 GETMBR R2 R0 K0 - 0x8C080501, // 0004 GETMET R2 R2 K1 - 0x5C100200, // 0005 MOVE R4 R1 - 0x58140002, // 0006 LDCONST R5 K2 - 0x7C080600, // 0007 CALL R2 3 - 0x80040400, // 0008 RET 1 R2 - 0x70020035, // 0009 JMP #0040 - 0x540A0031, // 000A LDINT R2 50 - 0x14080202, // 000B LT R2 R1 R2 - 0x780A0007, // 000C JMPF R2 #0015 - 0x88080103, // 000D GETMBR R2 R0 K3 - 0x8C080504, // 000E GETMET R2 R2 K4 - 0x5412001F, // 000F LDINT R4 32 - 0x04100204, // 0010 SUB R4 R1 R4 - 0x58140002, // 0011 LDCONST R5 K2 - 0x7C080600, // 0012 CALL R2 3 - 0x80040400, // 0013 RET 1 R2 - 0x7002002A, // 0014 JMP #0040 - 0x540A0051, // 0015 LDINT R2 82 - 0x14080202, // 0016 LT R2 R1 R2 - 0x780A0007, // 0017 JMPF R2 #0020 - 0x88080105, // 0018 GETMBR R2 R0 K5 - 0x8C080501, // 0019 GETMET R2 R2 K1 - 0x54120031, // 001A LDINT R4 50 - 0x04100204, // 001B SUB R4 R1 R4 - 0x58140002, // 001C LDCONST R5 K2 - 0x7C080600, // 001D CALL R2 3 - 0x80040400, // 001E RET 1 R2 - 0x7002001F, // 001F JMP #0040 - 0x540A0071, // 0020 LDINT R2 114 - 0x14080202, // 0021 LT R2 R1 R2 - 0x780A0007, // 0022 JMPF R2 #002B - 0x88080106, // 0023 GETMBR R2 R0 K6 - 0x8C080501, // 0024 GETMET R2 R2 K1 - 0x54120051, // 0025 LDINT R4 82 - 0x04100204, // 0026 SUB R4 R1 R4 - 0x58140002, // 0027 LDCONST R5 K2 - 0x7C080600, // 0028 CALL R2 3 - 0x80040400, // 0029 RET 1 R2 - 0x70020014, // 002A JMP #0040 - 0x540A0091, // 002B LDINT R2 146 - 0x14080202, // 002C LT R2 R1 R2 - 0x780A0007, // 002D JMPF R2 #0036 - 0x88080107, // 002E GETMBR R2 R0 K7 - 0x8C080501, // 002F GETMET R2 R2 K1 - 0x54120071, // 0030 LDINT R4 114 - 0x04100204, // 0031 SUB R4 R1 R4 - 0x58140002, // 0032 LDCONST R5 K2 - 0x7C080600, // 0033 CALL R2 3 - 0x80040400, // 0034 RET 1 R2 - 0x70020009, // 0035 JMP #0040 - 0x540A00B1, // 0036 LDINT R2 178 - 0x14080202, // 0037 LT R2 R1 R2 - 0x780A0006, // 0038 JMPF R2 #0040 - 0x88080108, // 0039 GETMBR R2 R0 K8 - 0x8C080501, // 003A GETMET R2 R2 K1 - 0x54120091, // 003B LDINT R4 146 - 0x04100204, // 003C SUB R4 R1 R4 - 0x58140002, // 003D LDCONST R5 K2 - 0x7C080600, // 003E CALL R2 3 - 0x80040400, // 003F RET 1 R2 - 0x80000000, // 0040 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_GetOptionReader; -be_local_closure(class_GetOptionReader_init, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_GetOptionReader, - 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_weak(value_error), - /* K1 */ be_nested_str_weak(invalid_X20json), - /* K2 */ be_nested_str_weak(SetOption), - /* K3 */ be_nested_str_weak(flag), - /* K4 */ be_nested_str_weak(fromhex), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(reverse), - /* K7 */ be_nested_str_weak(flag2), - /* K8 */ be_const_int(1), - /* K9 */ be_nested_str_weak(flag3), - /* K10 */ be_const_int(2), - /* K11 */ be_nested_str_weak(flag4), - /* K12 */ be_const_int(3), - /* K13 */ be_nested_str_weak(flag5), - /* K14 */ be_nested_str_weak(flag6), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[54]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0000, // 0002 JMPF R2 #0004 - 0xB0060101, // 0003 RAISE 1 K0 K1 - 0x94080302, // 0004 GETIDX R2 R1 K2 - 0x600C0015, // 0005 GETGBL R3 G21 - 0x7C0C0000, // 0006 CALL R3 0 - 0x8C0C0704, // 0007 GETMET R3 R3 K4 - 0x94140505, // 0008 GETIDX R5 R2 K5 - 0x7C0C0400, // 0009 CALL R3 2 - 0x8C0C0706, // 000A GETMET R3 R3 K6 - 0x7C0C0200, // 000B CALL R3 1 - 0x90020603, // 000C SETMBR R0 K3 R3 - 0x600C0015, // 000D GETGBL R3 G21 - 0x7C0C0000, // 000E CALL R3 0 - 0x8C0C0704, // 000F GETMET R3 R3 K4 - 0x94140508, // 0010 GETIDX R5 R2 K8 - 0x7C0C0400, // 0011 CALL R3 2 - 0x90020E03, // 0012 SETMBR R0 K7 R3 - 0x600C0015, // 0013 GETGBL R3 G21 - 0x7C0C0000, // 0014 CALL R3 0 - 0x8C0C0704, // 0015 GETMET R3 R3 K4 - 0x9414050A, // 0016 GETIDX R5 R2 K10 - 0x7C0C0400, // 0017 CALL R3 2 - 0x8C0C0706, // 0018 GETMET R3 R3 K6 - 0x7C0C0200, // 0019 CALL R3 1 - 0x90021203, // 001A SETMBR R0 K9 R3 - 0x600C0015, // 001B GETGBL R3 G21 - 0x7C0C0000, // 001C CALL R3 0 - 0x8C0C0704, // 001D GETMET R3 R3 K4 - 0x9414050C, // 001E GETIDX R5 R2 K12 - 0x7C0C0400, // 001F CALL R3 2 - 0x8C0C0706, // 0020 GETMET R3 R3 K6 - 0x7C0C0200, // 0021 CALL R3 1 - 0x90021603, // 0022 SETMBR R0 K11 R3 - 0x600C0015, // 0023 GETGBL R3 G21 - 0x7C0C0000, // 0024 CALL R3 0 - 0x8C0C0704, // 0025 GETMET R3 R3 K4 - 0x54160003, // 0026 LDINT R5 4 - 0x94140405, // 0027 GETIDX R5 R2 R5 - 0x7C0C0400, // 0028 CALL R3 2 - 0x8C0C0706, // 0029 GETMET R3 R3 K6 - 0x7C0C0200, // 002A CALL R3 1 - 0x90021A03, // 002B SETMBR R0 K13 R3 - 0x600C0015, // 002C GETGBL R3 G21 - 0x7C0C0000, // 002D CALL R3 0 - 0x8C0C0704, // 002E GETMET R3 R3 K4 - 0x54160004, // 002F LDINT R5 5 - 0x94140405, // 0030 GETIDX R5 R2 R5 - 0x7C0C0400, // 0031 CALL R3 2 - 0x8C0C0706, // 0032 GETMET R3 R3 K6 - 0x7C0C0200, // 0033 CALL R3 1 - 0x90021C03, // 0034 SETMBR R0 K14 R3 - 0x80000000, // 0035 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: GetOptionReader -********************************************************************/ -be_local_class(GetOptionReader, - 6, - NULL, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(flag2, -1), be_const_var(1) }, - { be_const_key_weak(flag4, -1), be_const_var(3) }, - { be_const_key_weak(getoption, -1), be_const_closure(class_GetOptionReader_getoption_closure) }, - { be_const_key_weak(init, 5), be_const_closure(class_GetOptionReader_init_closure) }, - { be_const_key_weak(flag3, -1), be_const_var(2) }, - { be_const_key_weak(flag6, -1), be_const_var(5) }, - { be_const_key_weak(flag5, -1), be_const_var(4) }, - { be_const_key_weak(flag, 0), be_const_var(0) }, - })), - be_str_weak(GetOptionReader) -); - -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; - -/******************************************************************** -** Solidified function: call_remote_sync -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_call_remote_sync, /* name */ - be_nested_proto( - 10, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(json), - /* K1 */ be_const_int(2), - /* K2 */ be_nested_str_weak(_X20), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(http_remote), - /* K5 */ be_nested_str_weak(call_sync), - /* K6 */ be_nested_str_weak(SYNC_TIMEOUT), - /* K7 */ be_nested_str_weak(device_is_alive), - /* K8 */ be_nested_str_weak(load), - /* K9 */ be_const_int(1), - /* K10 */ be_nested_str_weak(tasmota), - /* K11 */ be_nested_str_weak(log), - /* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying), - /* K13 */ be_const_int(3), - }), - be_str_weak(call_remote_sync), - &be_const_str_solidified, - ( &(const binstruction[42]) { /* code */ - 0xA40E0000, // 0000 IMPORT R3 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x4C140000, // 0002 LDNIL R5 - 0x20140405, // 0003 NE R5 R2 R5 - 0x78160005, // 0004 JMPF R5 #000B - 0x00140302, // 0005 ADD R5 R1 K2 - 0x60180008, // 0006 GETGBL R6 G8 - 0x5C1C0400, // 0007 MOVE R7 R2 - 0x7C180200, // 0008 CALL R6 1 - 0x00140A06, // 0009 ADD R5 R5 R6 - 0x5C040A00, // 000A MOVE R1 R5 - 0x24140903, // 000B GT R5 R4 K3 - 0x78160016, // 000C JMPF R5 #0024 - 0x88140104, // 000D GETMBR R5 R0 K4 - 0x8C140B05, // 000E GETMET R5 R5 K5 - 0x5C1C0200, // 000F MOVE R7 R1 - 0x88200106, // 0010 GETMBR R8 R0 K6 - 0x7C140600, // 0011 CALL R5 3 - 0x4C180000, // 0012 LDNIL R6 - 0x20180A06, // 0013 NE R6 R5 R6 - 0x781A0007, // 0014 JMPF R6 #001D - 0x88180104, // 0015 GETMBR R6 R0 K4 - 0x8C180D07, // 0016 GETMET R6 R6 K7 - 0x50200200, // 0017 LDBOOL R8 1 0 - 0x7C180400, // 0018 CALL R6 2 - 0x8C180708, // 0019 GETMET R6 R3 K8 - 0x5C200A00, // 001A MOVE R8 R5 - 0x7C180400, // 001B CALL R6 2 - 0x80040C00, // 001C RET 1 R6 - 0x04100909, // 001D SUB R4 R4 K9 - 0xB81A1400, // 001E GETNGBL R6 K10 - 0x8C180D0B, // 001F GETMET R6 R6 K11 - 0x5820000C, // 0020 LDCONST R8 K12 - 0x5824000D, // 0021 LDCONST R9 K13 - 0x7C180600, // 0022 CALL R6 3 - 0x7001FFE6, // 0023 JMP #000B - 0x88140104, // 0024 GETMBR R5 R0 K4 - 0x8C140B07, // 0025 GETMET R5 R5 K7 - 0x501C0000, // 0026 LDBOOL R7 0 0 - 0x7C140400, // 0027 CALL R5 2 - 0x4C140000, // 0028 LDNIL R5 - 0x80040A00, // 0029 RET 1 R5 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_value_onoff -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_value_onoff, /* name */ - be_nested_proto( - 3, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E), - /* K1 */ be_nested_str_weak(Off), - /* K2 */ be_nested_str_weak(), - }), - be_str_weak(web_value_onoff), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0004, // 0002 JMPF R2 #0008 - 0x78060001, // 0003 JMPF R1 #0006 - 0x58080000, // 0004 LDCONST R2 K0 - 0x70020000, // 0005 JMP #0007 - 0x58080001, // 0006 LDCONST R2 K1 - 0x70020000, // 0007 JMP #0009 - 0x58080002, // 0008 LDCONST R2 K2 - 0x80040400, // 0009 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_http_response -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_parse_http_response, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(http_remote), - /* K2 */ be_nested_str_weak(device_is_alive), - /* K3 */ be_nested_str_weak(device), - /* K4 */ be_nested_str_weak(tick), - /* K5 */ be_nested_str_weak(json), - /* K6 */ be_nested_str_weak(load), - /* K7 */ be_nested_str_weak(contains), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(StatusSTS), - /* K10 */ be_nested_str_weak(StatusSHT), - /* K11 */ be_nested_str_weak(parse_update), - }), - be_str_weak(parse_http_response), - &be_const_str_solidified, - ( &(const binstruction[39]) { /* code */ - 0x24100300, // 0000 GT R4 R1 K0 - 0x78120023, // 0001 JMPF R4 #0026 - 0x88100101, // 0002 GETMBR R4 R0 K1 - 0x8C100902, // 0003 GETMET R4 R4 K2 - 0x50180200, // 0004 LDBOOL R6 1 0 - 0x7C100400, // 0005 CALL R4 2 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x88100904, // 0007 GETMBR R4 R4 K4 - 0xA4160A00, // 0008 IMPORT R5 K5 - 0x8C180B06, // 0009 GETMET R6 R5 K6 - 0x5C200400, // 000A MOVE R8 R2 - 0x7C180400, // 000B CALL R6 2 - 0x4C1C0000, // 000C LDNIL R7 - 0x781A0017, // 000D JMPF R6 #0026 - 0x8C200D07, // 000E GETMET R8 R6 K7 - 0x58280008, // 000F LDCONST R10 K8 - 0x7C200400, // 0010 CALL R8 2 - 0x78220002, // 0011 JMPF R8 #0015 - 0x94180D08, // 0012 GETIDX R6 R6 K8 - 0x541E0007, // 0013 LDINT R7 8 - 0x7002000C, // 0014 JMP #0022 - 0x8C200D07, // 0015 GETMET R8 R6 K7 - 0x58280009, // 0016 LDCONST R10 K9 - 0x7C200400, // 0017 CALL R8 2 - 0x78220002, // 0018 JMPF R8 #001C - 0x94180D09, // 0019 GETIDX R6 R6 K9 - 0x541E000A, // 001A LDINT R7 11 - 0x70020005, // 001B JMP #0022 - 0x8C200D07, // 001C GETMET R8 R6 K7 - 0x5828000A, // 001D LDCONST R10 K10 - 0x7C200400, // 001E CALL R8 2 - 0x78220001, // 001F JMPF R8 #0022 - 0x94180D09, // 0020 GETIDX R6 R6 K9 - 0x541E000C, // 0021 LDINT R7 13 - 0x8C20010B, // 0022 GETMET R8 R0 K11 - 0x5C280C00, // 0023 MOVE R10 R6 - 0x5C2C0E00, // 0024 MOVE R11 R7 - 0x7C200600, // 0025 CALL R8 3 - 0x80000000, // 0026 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_values, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26lt_X3B_X2D_X2D_X20_X28), - /* K4 */ be_nested_str_weak(DISPLAY_NAME), - /* K5 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x88100104, // 0004 GETMBR R4 R0 K4 - 0x00120604, // 0005 ADD R4 K3 R4 - 0x00100905, // 0006 ADD R4 R4 K5 - 0x7C080400, // 0007 CALL R2 2 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: is_local_device -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_is_local_device, /* name */ - be_nested_proto( - 2, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(is_local_device), - &be_const_str_solidified, - ( &(const binstruction[ 2]) { /* code */ - 0x50040000, // 0000 LDBOOL R1 0 0 - 0x80040200, // 0001 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG_HTTP), - /* K3 */ be_nested_str_weak(http_remote), - /* K4 */ be_nested_str_weak(device), - /* K5 */ be_nested_str_weak(register_http_remote), - /* K6 */ be_nested_str_weak(PROBE_TIMEOUT), - /* K7 */ be_nested_str_weak(register_cmd_cb), - }), - 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 - 0x8C100701, // 0008 GETMET R4 R3 K1 - 0x88180102, // 0009 GETMBR R6 R0 K2 - 0x7C100400, // 000A CALL R4 2 - 0x88140104, // 000B GETMBR R5 R0 K4 - 0x8C140B05, // 000C GETMET R5 R5 K5 - 0x5C1C0800, // 000D MOVE R7 R4 - 0x88200106, // 000E GETMBR R8 R0 K6 - 0x7C140600, // 000F CALL R5 3 - 0x90020605, // 0010 SETMBR R0 K3 R5 - 0x8C140107, // 0011 GETMET R5 R0 K7 - 0x7C140200, // 0012 CALL R5 1 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_parse_update, /* name */ - be_nested_proto( - 3, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80000000, // 0000 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_read_attribute, /* name */ - be_nested_proto( - 14, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[21]) { /* 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_nested_str_weak(string), - /* K5 */ be_const_int(3), - /* K6 */ be_nested_str_weak(http_remote), - /* K7 */ be_nested_str_weak(get_info), - /* K8 */ be_nested_str_weak(find), - /* K9 */ be_nested_str_weak(name), - /* K10 */ be_nested_str_weak(set), - /* K11 */ be_nested_str_weak(UTF1), - /* K12 */ be_nested_str_weak(NULL), - /* K13 */ be_nested_str_weak(version), - /* K14 */ be_nested_str_weak(_X28), - /* K15 */ be_const_int(0), - /* K16 */ be_const_int(1), - /* K17 */ be_nested_str_weak(mac), - /* K18 */ be_nested_str_weak(BOOL), - /* K19 */ be_nested_str_weak(reachable), - /* K20 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[103]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0038, // 0004 LDINT R7 57 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0056, // 0006 JMPF R7 #005E - 0xA41E0800, // 0007 IMPORT R7 K4 - 0x1C200D05, // 0008 EQ R8 R6 K5 - 0x78220012, // 0009 JMPF R8 #001D - 0x88200106, // 000A GETMBR R8 R0 K6 - 0x8C201107, // 000B GETMET R8 R8 K7 - 0x7C200200, // 000C CALL R8 1 - 0x8C201108, // 000D GETMET R8 R8 K8 - 0x58280009, // 000E LDCONST R10 K9 - 0x7C200400, // 000F CALL R8 2 - 0x78220005, // 0010 JMPF R8 #0017 - 0x8C24070A, // 0011 GETMET R9 R3 K10 - 0x882C090B, // 0012 GETMBR R11 R4 K11 - 0x5C301000, // 0013 MOVE R12 R8 - 0x7C240600, // 0014 CALL R9 3 - 0x80041200, // 0015 RET 1 R9 - 0x70020004, // 0016 JMP #001C - 0x8C24070A, // 0017 GETMET R9 R3 K10 - 0x882C090C, // 0018 GETMBR R11 R4 K12 - 0x4C300000, // 0019 LDNIL R12 - 0x7C240600, // 001A CALL R9 3 - 0x80041200, // 001B RET 1 R9 - 0x70020040, // 001C JMP #005E - 0x54220009, // 001D LDINT R8 10 - 0x1C200C08, // 001E EQ R8 R6 R8 - 0x7822001B, // 001F JMPF R8 #003C - 0x88200106, // 0020 GETMBR R8 R0 K6 - 0x8C201107, // 0021 GETMET R8 R8 K7 - 0x7C200200, // 0022 CALL R8 1 - 0x8C201108, // 0023 GETMET R8 R8 K8 - 0x5828000D, // 0024 LDCONST R10 K13 - 0x7C200400, // 0025 CALL R8 2 - 0x7822000E, // 0026 JMPF R8 #0036 - 0x8C240F08, // 0027 GETMET R9 R7 K8 - 0x5C2C1000, // 0028 MOVE R11 R8 - 0x5830000E, // 0029 LDCONST R12 K14 - 0x7C240600, // 002A CALL R9 3 - 0x2428130F, // 002B GT R10 R9 K15 - 0x782A0002, // 002C JMPF R10 #0030 - 0x04281310, // 002D SUB R10 R9 K16 - 0x402A1E0A, // 002E CONNECT R10 K15 R10 - 0x9420100A, // 002F GETIDX R8 R8 R10 - 0x8C28070A, // 0030 GETMET R10 R3 K10 - 0x8830090B, // 0031 GETMBR R12 R4 K11 - 0x5C341000, // 0032 MOVE R13 R8 - 0x7C280600, // 0033 CALL R10 3 - 0x80041400, // 0034 RET 1 R10 - 0x70020004, // 0035 JMP #003B - 0x8C24070A, // 0036 GETMET R9 R3 K10 - 0x882C090C, // 0037 GETMBR R11 R4 K12 - 0x4C300000, // 0038 LDNIL R12 - 0x7C240600, // 0039 CALL R9 3 - 0x80041200, // 003A RET 1 R9 - 0x70020021, // 003B JMP #005E - 0x5422000E, // 003C LDINT R8 15 - 0x1C200C08, // 003D EQ R8 R6 R8 - 0x74220002, // 003E JMPT R8 #0042 - 0x54220011, // 003F LDINT R8 18 - 0x1C200C08, // 0040 EQ R8 R6 R8 - 0x78220012, // 0041 JMPF R8 #0055 - 0x88200106, // 0042 GETMBR R8 R0 K6 - 0x8C201107, // 0043 GETMET R8 R8 K7 - 0x7C200200, // 0044 CALL R8 1 - 0x8C201108, // 0045 GETMET R8 R8 K8 - 0x58280011, // 0046 LDCONST R10 K17 - 0x7C200400, // 0047 CALL R8 2 - 0x78220005, // 0048 JMPF R8 #004F - 0x8C24070A, // 0049 GETMET R9 R3 K10 - 0x882C090B, // 004A GETMBR R11 R4 K11 - 0x5C301000, // 004B MOVE R12 R8 - 0x7C240600, // 004C CALL R9 3 - 0x80041200, // 004D RET 1 R9 - 0x70020004, // 004E JMP #0054 - 0x8C24070A, // 004F GETMET R9 R3 K10 - 0x882C090C, // 0050 GETMBR R11 R4 K12 - 0x4C300000, // 0051 LDNIL R12 - 0x7C240600, // 0052 CALL R9 3 - 0x80041200, // 0053 RET 1 R9 - 0x70020008, // 0054 JMP #005E - 0x54220010, // 0055 LDINT R8 17 - 0x1C200C08, // 0056 EQ R8 R6 R8 - 0x78220005, // 0057 JMPF R8 #005E - 0x8C20070A, // 0058 GETMET R8 R3 K10 - 0x88280912, // 0059 GETMBR R10 R4 K18 - 0x882C0106, // 005A GETMBR R11 R0 K6 - 0x882C1713, // 005B GETMBR R11 R11 K19 - 0x7C200600, // 005C CALL R8 3 - 0x80041000, // 005D RET 1 R8 - 0x601C0003, // 005E GETGBL R7 G3 - 0x5C200000, // 005F MOVE R8 R0 - 0x7C1C0200, // 0060 CALL R7 1 - 0x8C1C0F14, // 0061 GETMET R7 R7 K20 - 0x5C240200, // 0062 MOVE R9 R1 - 0x5C280400, // 0063 MOVE R10 R2 - 0x5C2C0600, // 0064 MOVE R11 R3 - 0x7C1C0800, // 0065 CALL R7 4 - 0x80040E00, // 0066 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(PREFIX), - /* K4 */ be_nested_str_weak(html_escape), - /* K5 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C0C0302, // 0003 GETMET R3 R1 K2 - 0x60140018, // 0004 GETGBL R5 G24 - 0x88180103, // 0005 GETMBR R6 R0 K3 - 0x780A0003, // 0006 JMPF R2 #000B - 0x8C1C0304, // 0007 GETMET R7 R1 K4 - 0x5C240400, // 0008 MOVE R9 R2 - 0x7C1C0400, // 0009 CALL R7 2 - 0x70020000, // 000A JMP #000C - 0x581C0005, // 000B LDCONST R7 K5 - 0x7C140400, // 000C CALL R5 2 - 0x7C0C0400, // 000D CALL R3 2 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: register_cmd_cb -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_register_cmd_cb, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 0, /* varg */ - 1, /* has upvals */ - ( &(const bupvaldesc[ 1]) { /* upvals */ - be_local_const_upval(1, 0), - }), - 0, /* has sup protos */ - NULL, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_http_response), - }), - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x680C0000, // 0000 GETUPV R3 U0 - 0x8C0C0700, // 0001 GETMET R3 R3 K0 - 0x5C140000, // 0002 MOVE R5 R0 - 0x5C180200, // 0003 MOVE R6 R1 - 0x5C1C0400, // 0004 MOVE R7 R2 - 0x7C0C0800, // 0005 CALL R3 4 - 0x80040600, // 0006 RET 1 R3 - }) - ), - &be_class_Matter_Plugin_Bridge_HTTP, - }), - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(http_remote), - /* K1 */ be_nested_str_weak(add_schedule), - /* K2 */ be_nested_str_weak(UPDATE_CMD), - /* K3 */ be_nested_str_weak(UPDATE_TIME), - }), - be_str_weak(register_cmd_cb), - &be_const_str_solidified, - ( &(const binstruction[ 8]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x880C0102, // 0002 GETMBR R3 R0 K2 - 0x88100103, // 0003 GETMBR R4 R0 K3 - 0x84140000, // 0004 CLOSURE R5 P0 - 0x7C040800, // 0005 CALL R1 4 - 0xA0000000, // 0006 CLOSE R0 - 0x80000000, // 0007 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_update_shadow, /* name */ - be_nested_proto( - 7, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tick), - /* K1 */ be_nested_str_weak(device), - /* K2 */ be_nested_str_weak(call_remote_sync), - /* K3 */ be_nested_str_weak(UPDATE_CMD), - /* K4 */ be_nested_str_weak(parse_http_response), - /* K5 */ be_const_int(1), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88040101, // 0000 GETMBR R1 R0 K1 - 0x88040300, // 0001 GETMBR R1 R1 K0 - 0x90020001, // 0002 SETMBR R0 K0 R1 - 0x8C040102, // 0003 GETMET R1 R0 K2 - 0x880C0103, // 0004 GETMBR R3 R0 K3 - 0x7C040400, // 0005 CALL R1 2 - 0x78060004, // 0006 JMPF R1 #000C - 0x8C080104, // 0007 GETMET R2 R0 K4 - 0x58100005, // 0008 LDCONST R4 K5 - 0x5C140200, // 0009 MOVE R5 R1 - 0x88180103, // 000A GETMBR R6 R0 K3 - 0x7C080800, // 000B CALL R2 4 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: every_250ms -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_closure(class_Matter_Plugin_Bridge_HTTP_every_250ms, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_HTTP, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(http_remote), - /* K1 */ be_nested_str_weak(scheduler), - }), - be_str_weak(every_250ms), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x7C040200, // 0002 CALL R1 1 - 0x80000000, // 0003 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_HTTP -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; -be_local_class(Matter_Plugin_Bridge_HTTP, - 1, - &be_class_Matter_Plugin_Device, - be_nested_map(23, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2011) }, - { be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_every_250ms_closure) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak() }, - { be_const_key_weak(call_remote_sync, 22), be_const_closure(class_Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) }, - { be_const_key_weak(web_value_onoff, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_value_onoff_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_update_shadow_closure) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) }, - { be_const_key_weak(GetOptionReader, 5), be_const_class(be_class_GetOptionReader) }, - { be_const_key_weak(parse_http_response, 21), be_const_closure(class_Matter_Plugin_Bridge_HTTP_parse_http_response_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_parse_update_closure) }, - { be_const_key_weak(SYNC_TIMEOUT, 18), be_const_int(500) }, - { be_const_key_weak(is_local_device, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_is_local_device_closure) }, - { be_const_key_weak(PREFIX, 17), be_nested_str_weak(_X7C_X20_X3Ci_X3E_X25s_X3C_X2Fi_X3E_X20) }, - { be_const_key_weak(http_remote, 1), be_const_var(0) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_init_closure) }, - { be_const_key_weak(ARG_HTTP, -1), be_nested_str_weak(url) }, - { be_const_key_weak(DISPLAY_NAME, 9), be_nested_str_weak() }, - { be_const_key_weak(web_values_prefix, 19), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_values_prefix_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_read_attribute_closure) }, - { be_const_key_weak(PROBE_TIMEOUT, -1), be_const_int(1700) }, - { be_const_key_weak(register_cmd_cb, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_register_cmd_cb_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_values_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak() }, - })), - be_str_weak(Matter_Plugin_Bridge_HTTP) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h similarity index 54% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h index 3933c1c2f..71079d66b 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light0.h @@ -1,16 +1,487 @@ -/* Solidification of Matter_Plugin_2_OnOff.h */ +/* Solidification of Matter_Plugin_2_Light0.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ #include "be_constobj.h" -extern const bclass be_class_Matter_Plugin_OnOff; +extern const bclass be_class_Matter_Plugin_Light0; + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_read_attribute, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(set), + /* K7 */ be_nested_str_weak(BOOL), + /* K8 */ be_nested_str_weak(shadow_onoff), + /* K9 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[25]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E0005, // 0004 LDINT R7 6 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0008, // 0006 JMPF R7 #0010 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E0004, // 000A JMPF R7 #0010 + 0x8C1C0706, // 000B GETMET R7 R3 K6 + 0x88240907, // 000C GETMBR R9 R4 K7 + 0x88280108, // 000D GETMBR R10 R0 K8 + 0x7C1C0600, // 000E CALL R7 3 + 0x80040E00, // 000F RET 1 R7 + 0x601C0003, // 0010 GETGBL R7 G3 + 0x5C200000, // 0011 MOVE R8 R0 + 0x7C1C0200, // 0012 CALL R7 1 + 0x8C1C0F09, // 0013 GETMET R7 R7 K9 + 0x5C240200, // 0014 MOVE R9 R1 + 0x5C280400, // 0015 MOVE R10 R2 + 0x5C2C0600, // 0016 MOVE R11 R3 + 0x7C1C0800, // 0017 CALL R7 4 + 0x80040E00, // 0018 RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_update_virtual, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Power), + /* K2 */ be_nested_str_weak(set_onoff), + /* K3 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x8C080300, // 0000 GETMET R2 R1 K0 + 0x58100001, // 0001 LDCONST R4 K1 + 0x7C080400, // 0002 CALL R2 2 + 0x4C0C0000, // 0003 LDNIL R3 + 0x200C0403, // 0004 NE R3 R2 R3 + 0x780E0004, // 0005 JMPF R3 #000B + 0x8C0C0102, // 0006 GETMET R3 R0 K2 + 0x60140017, // 0007 GETGBL R5 G23 + 0x5C180400, // 0008 MOVE R6 R2 + 0x7C140200, // 0009 CALL R5 1 + 0x7C0C0400, // 000A CALL R3 2 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_relay_index), + /* K1 */ be_const_int(1), + /* K2 */ be_nested_str_weak(contains), + /* K3 */ be_nested_str_weak(POWER), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(ON), + /* K6 */ be_nested_str_weak(shadow_onoff), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_const_int(0), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[37]) { /* code */ + 0x540E000A, // 0000 LDINT R3 11 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0020, // 0002 JMPF R3 #0024 + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x88100100, // 0004 GETMBR R4 R0 K0 + 0x1C100901, // 0005 EQ R4 R4 K1 + 0x78120009, // 0006 JMPF R4 #0011 + 0x8C100302, // 0007 GETMET R4 R1 K2 + 0x58180003, // 0008 LDCONST R6 K3 + 0x7C100400, // 0009 CALL R4 2 + 0x78120005, // 000A JMPF R4 #0011 + 0x8C100304, // 000B GETMET R4 R1 K4 + 0x58180003, // 000C LDCONST R6 K3 + 0x7C100400, // 000D CALL R4 2 + 0x1C100905, // 000E EQ R4 R4 K5 + 0x5C0C0800, // 000F MOVE R3 R4 + 0x70020007, // 0010 JMP #0019 + 0x8C100304, // 0011 GETMET R4 R1 K4 + 0x60180008, // 0012 GETGBL R6 G8 + 0x881C0100, // 0013 GETMBR R7 R0 K0 + 0x7C180200, // 0014 CALL R6 1 + 0x001A0606, // 0015 ADD R6 K3 R6 + 0x7C100400, // 0016 CALL R4 2 + 0x1C100905, // 0017 EQ R4 R4 K5 + 0x5C0C0800, // 0018 MOVE R3 R4 + 0x88100106, // 0019 GETMBR R4 R0 K6 + 0x60140017, // 001A GETGBL R5 G23 + 0x5C180600, // 001B MOVE R6 R3 + 0x7C140200, // 001C CALL R5 1 + 0x20100805, // 001D NE R4 R4 R5 + 0x78120004, // 001E JMPF R4 #0024 + 0x8C100107, // 001F GETMET R4 R0 K7 + 0x541A0005, // 0020 LDINT R6 6 + 0x581C0008, // 0021 LDCONST R7 K8 + 0x7C100600, // 0022 CALL R4 3 + 0x90020C03, // 0023 SETMBR R0 K6 R3 + 0x80000000, // 0024 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_relay_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(0), + /* K4 */ be_const_int(1), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x4C180000, // 0003 LDNIL R6 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x4C0C0000, // 0008 LDNIL R3 + 0x20080403, // 0009 NE R2 R2 R3 + 0x780A0003, // 000A JMPF R2 #000F + 0x88080100, // 000B GETMBR R2 R0 K0 + 0x18080503, // 000C LE R2 R2 K3 + 0x780A0000, // 000D JMPF R2 #000F + 0x90020104, // 000E SETMBR R0 K0 K4 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_onoff +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_set_onoff, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(call_remote_sync), + /* K2 */ be_nested_str_weak(Power), + /* K3 */ be_nested_str_weak(tasmota_relay_index), + /* K4 */ be_nested_str_weak(1), + /* K5 */ be_nested_str_weak(0), + /* K6 */ be_nested_str_weak(parse_status), + /* K7 */ be_nested_str_weak(VIRTUAL), + /* K8 */ be_nested_str_weak(shadow_onoff), + /* K9 */ be_nested_str_weak(attribute_updated), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(tasmota), + /* K12 */ be_nested_str_weak(set_power), + /* K13 */ be_const_int(1), + /* K14 */ be_nested_str_weak(update_shadow), + /* K15 */ be_nested_str_weak(light), + /* K16 */ be_nested_str_weak(set), + /* K17 */ be_nested_str_weak(power), + }), + be_str_weak(set_onoff), + &be_const_str_solidified, + ( &(const binstruction[55]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0011, // 0001 JMPF R2 #0014 + 0x8C080101, // 0002 GETMET R2 R0 K1 + 0x60100008, // 0003 GETGBL R4 G8 + 0x88140103, // 0004 GETMBR R5 R0 K3 + 0x7C100200, // 0005 CALL R4 1 + 0x00120404, // 0006 ADD R4 K2 R4 + 0x78060001, // 0007 JMPF R1 #000A + 0x58140004, // 0008 LDCONST R5 K4 + 0x70020000, // 0009 JMP #000B + 0x58140005, // 000A LDCONST R5 K5 + 0x7C080600, // 000B CALL R2 3 + 0x4C0C0000, // 000C LDNIL R3 + 0x200C0403, // 000D NE R3 R2 R3 + 0x780E0003, // 000E JMPF R3 #0013 + 0x8C0C0106, // 000F GETMET R3 R0 K6 + 0x5C140400, // 0010 MOVE R5 R2 + 0x541A000A, // 0011 LDINT R6 11 + 0x7C0C0600, // 0012 CALL R3 3 + 0x70020021, // 0013 JMP #0036 + 0x88080107, // 0014 GETMBR R2 R0 K7 + 0x780A0008, // 0015 JMPF R2 #001F + 0x88080108, // 0016 GETMBR R2 R0 K8 + 0x20080202, // 0017 NE R2 R1 R2 + 0x780A0004, // 0018 JMPF R2 #001E + 0x8C080109, // 0019 GETMET R2 R0 K9 + 0x54120005, // 001A LDINT R4 6 + 0x5814000A, // 001B LDCONST R5 K10 + 0x7C080600, // 001C CALL R2 3 + 0x90021001, // 001D SETMBR R0 K8 R1 + 0x70020016, // 001E JMP #0036 + 0x88080103, // 001F GETMBR R2 R0 K3 + 0x4C0C0000, // 0020 LDNIL R3 + 0x20080403, // 0021 NE R2 R2 R3 + 0x780A000A, // 0022 JMPF R2 #002E + 0xB80A1600, // 0023 GETNGBL R2 K11 + 0x8C08050C, // 0024 GETMET R2 R2 K12 + 0x88100103, // 0025 GETMBR R4 R0 K3 + 0x0410090D, // 0026 SUB R4 R4 K13 + 0x60140017, // 0027 GETGBL R5 G23 + 0x5C180200, // 0028 MOVE R6 R1 + 0x7C140200, // 0029 CALL R5 1 + 0x7C080600, // 002A CALL R2 3 + 0x8C08010E, // 002B GETMET R2 R0 K14 + 0x7C080200, // 002C CALL R2 1 + 0x70020007, // 002D JMP #0036 + 0xA40A1E00, // 002E IMPORT R2 K15 + 0x8C0C0510, // 002F GETMET R3 R2 K16 + 0x60140013, // 0030 GETGBL R5 G19 + 0x7C140000, // 0031 CALL R5 0 + 0x98162201, // 0032 SETIDX R5 K17 R1 + 0x7C0C0400, // 0033 CALL R3 2 + 0x8C0C010E, // 0034 GETMET R3 R0 K14 + 0x7C0C0200, // 0035 CALL R3 1 + 0x80000000, // 0036 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_update_shadow, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(VIRTUAL), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(tasmota_relay_index), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(get_power), + /* K5 */ be_const_int(1), + /* K6 */ be_nested_str_weak(shadow_onoff), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[33]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x74060018, // 0001 JMPT R1 #001B + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x74060016, // 0003 JMPT R1 #001B + 0x88040102, // 0004 GETMBR R1 R0 K2 + 0x4C080000, // 0005 LDNIL R2 + 0x20040202, // 0006 NE R1 R1 R2 + 0x78060012, // 0007 JMPF R1 #001B + 0xB8060600, // 0008 GETNGBL R1 K3 + 0x8C040304, // 0009 GETMET R1 R1 K4 + 0x880C0102, // 000A GETMBR R3 R0 K2 + 0x040C0705, // 000B SUB R3 R3 K5 + 0x7C040400, // 000C CALL R1 2 + 0x4C080000, // 000D LDNIL R2 + 0x20080202, // 000E NE R2 R1 R2 + 0x780A000A, // 000F JMPF R2 #001B + 0x88080106, // 0010 GETMBR R2 R0 K6 + 0x600C0017, // 0011 GETGBL R3 G23 + 0x5C100200, // 0012 MOVE R4 R1 + 0x7C0C0200, // 0013 CALL R3 1 + 0x20080403, // 0014 NE R2 R2 R3 + 0x780A0003, // 0015 JMPF R2 #001A + 0x8C080107, // 0016 GETMET R2 R0 K7 + 0x54120005, // 0017 LDINT R4 6 + 0x58140008, // 0018 LDCONST R5 K8 + 0x7C080600, // 0019 CALL R2 3 + 0x90020C01, // 001A SETMBR R0 K6 R1 + 0x60040003, // 001B GETGBL R1 G3 + 0x5C080000, // 001C MOVE R2 R0 + 0x7C040200, // 001D CALL R1 1 + 0x8C040309, // 001E GETMET R1 R1 K9 + 0x7C040200, // 001F CALL R1 1 + 0x80000000, // 0020 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_web_values, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X25s), + /* K4 */ be_nested_str_weak(web_value_onoff), + /* K5 */ be_nested_str_weak(shadow_onoff), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x8C180104, // 0006 GETMET R6 R0 K4 + 0x88200105, // 0007 GETMBR R8 R0 K5 + 0x7C180400, // 0008 CALL R6 2 + 0x7C100400, // 0009 CALL R4 2 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light0, + 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 ********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_invoke_request, /* name */ be_nested_proto( 11, /* nstack */ 4, /* argc */ @@ -18,7 +489,7 @@ be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, + &be_class_Matter_Plugin_Light0, 1, /* has constants */ ( &(const bvalue[12]) { /* constants */ /* K0 */ be_nested_str_weak(matter), @@ -95,159 +566,10 @@ be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(shadow_onoff), - /* K9 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0005, // 0004 LDINT R7 6 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0008, // 0006 JMPF R7 #0010 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E0004, // 000A JMPF R7 #0010 - 0x8C1C0706, // 000B GETMET R7 R3 K6 - 0x88240907, // 000C GETMBR R9 R4 K7 - 0x88280108, // 000D GETMBR R10 R0 K8 - 0x7C1C0600, // 000E CALL R7 3 - 0x80040E00, // 000F RET 1 R7 - 0x601C0003, // 0010 GETGBL R7 G3 - 0x5C200000, // 0011 MOVE R8 R0 - 0x7C1C0200, // 0012 CALL R7 1 - 0x8C1C0F09, // 0013 GETMET R7 R7 K9 - 0x5C240200, // 0014 MOVE R9 R1 - 0x5C280400, // 0015 MOVE R10 R2 - 0x5C2C0600, // 0016 MOVE R11 R3 - 0x7C1C0800, // 0017 CALL R7 4 - 0x80040E00, // 0018 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_relay_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_update_virtual, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Power), - /* K2 */ be_nested_str_weak(set_onoff), - /* K3 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C080300, // 0000 GETMET R2 R1 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x7C080400, // 0002 CALL R2 2 - 0x4C0C0000, // 0003 LDNIL R3 - 0x200C0403, // 0004 NE R3 R2 R3 - 0x780E0004, // 0005 JMPF R3 #000B - 0x8C0C0102, // 0006 GETMET R3 R0 K2 - 0x60140017, // 0007 GETGBL R5 G23 - 0x5C180400, // 0008 MOVE R6 R2 - 0x7C140200, // 0009 CALL R5 1 - 0x7C0C0400, // 000A CALL R3 2 - 0x600C0003, // 000B GETGBL R3 G3 - 0x5C100000, // 000C MOVE R4 R0 - 0x7C0C0200, // 000D CALL R3 1 - 0x8C0C0703, // 000E GETMET R3 R3 K3 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: ********************************************************************/ -be_local_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E, /* name */ +be_local_closure(class_Matter_Plugin_Light0__X3Clambda_X3E, /* name */ be_nested_proto( 3, /* nstack */ 1, /* argc */ @@ -272,54 +594,53 @@ be_local_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E, /* name */ /******************************************************************** -** Solidified function: set_onoff +** Solidified function: web_values_prefix ********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_set_onoff, /* name */ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_closure(class_Matter_Plugin_Light0_web_values_prefix, /* name */ be_nested_proto( - 7, /* nstack */ - 2, /* argc */ + 10, /* nstack */ + 1, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, + &be_class_Matter_Plugin_Light0, 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(set_power), + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Power), /* K3 */ be_nested_str_weak(tasmota_relay_index), - /* K4 */ be_const_int(1), - /* K5 */ be_nested_str_weak(update_shadow), - /* K6 */ be_nested_str_weak(shadow_onoff), - /* K7 */ be_nested_str_weak(attribute_updated), - /* K8 */ be_const_int(0), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), }), - be_str_weak(set_onoff), + be_str_weak(web_values_prefix), &be_const_str_solidified, ( &(const binstruction[22]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A000A, // 0001 JMPT R2 #000D - 0xB80A0200, // 0002 GETNGBL R2 K1 - 0x8C080502, // 0003 GETMET R2 R2 K2 - 0x88100103, // 0004 GETMBR R4 R0 K3 - 0x04100904, // 0005 SUB R4 R4 K4 - 0x60140017, // 0006 GETGBL R5 G23 - 0x5C180200, // 0007 MOVE R6 R1 - 0x7C140200, // 0008 CALL R5 1 - 0x7C080600, // 0009 CALL R2 3 - 0x8C080105, // 000A GETMET R2 R0 K5 - 0x7C080200, // 000B CALL R2 1 - 0x70020007, // 000C JMP #0015 - 0x88080106, // 000D GETMBR R2 R0 K6 - 0x20080202, // 000E NE R2 R1 R2 - 0x780A0004, // 000F JMPF R2 #0015 - 0x8C080107, // 0010 GETMET R2 R0 K7 - 0x54120005, // 0011 LDINT R4 6 - 0x58140008, // 0012 LDCONST R5 K8 - 0x7C080600, // 0013 CALL R2 3 - 0x90020C01, // 0014 SETMBR R0 K6 R1 + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 0x80000000, // 0015 RET 0 }) ) @@ -328,126 +649,26 @@ be_local_closure(class_Matter_Plugin_OnOff_set_onoff, /* name */ /******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_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 */ - &be_class_Matter_Plugin_OnOff, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(tasmota), - /* K2 */ be_nested_str_weak(get_power), - /* K3 */ be_nested_str_weak(tasmota_relay_index), - /* K4 */ be_const_int(1), - /* 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[27]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x74060012, // 0001 JMPT R1 #0015 - 0xB8060200, // 0002 GETNGBL R1 K1 - 0x8C040302, // 0003 GETMET R1 R1 K2 - 0x880C0103, // 0004 GETMBR R3 R0 K3 - 0x040C0704, // 0005 SUB R3 R3 K4 - 0x7C040400, // 0006 CALL R1 2 - 0x4C080000, // 0007 LDNIL R2 - 0x20080202, // 0008 NE R2 R1 R2 - 0x780A000A, // 0009 JMPF R2 #0015 - 0x88080105, // 000A GETMBR R2 R0 K5 - 0x600C0017, // 000B GETGBL R3 G23 - 0x5C100200, // 000C MOVE R4 R1 - 0x7C0C0200, // 000D CALL R3 1 - 0x20080403, // 000E NE R2 R2 R3 - 0x780A0003, // 000F JMPF R2 #0014 - 0x8C080106, // 0010 GETMET R2 R0 K6 - 0x54120005, // 0011 LDINT R4 6 - 0x58140007, // 0012 LDCONST R5 K7 - 0x7C080600, // 0013 CALL R2 3 - 0x90020A01, // 0014 SETMBR R0 K5 R1 - 0x60040003, // 0015 GETGBL R1 G3 - 0x5C080000, // 0016 MOVE R2 R0 - 0x7C040200, // 0017 CALL R1 1 - 0x8C040308, // 0018 GETMET R1 R1 K8 - 0x7C040200, // 0019 CALL R1 1 - 0x80000000, // 001A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_closure(class_Matter_Plugin_OnOff_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_OnOff, - 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_OnOff +** Solidified class: Matter_Plugin_Light0 ********************************************************************/ extern const bclass be_class_Matter_Plugin_Device; -be_local_class(Matter_Plugin_OnOff, +be_local_class(Matter_Plugin_Light0, 2, &be_class_Matter_Plugin_Device, - be_nested_map(18, + be_nested_map(21, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) }, - { 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(class_Matter_Plugin_Light0_read_attribute_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Light0_update_virtual_closure) }, + { be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) }, + { be_const_key_weak(parse_status, 5), be_const_closure(class_Matter_Plugin_Light0_parse_status_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Light0_parse_configuration_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Power), })) ) } )) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_Light0_set_onoff_closure) }, + { be_const_key_weak(CLUSTERS, 19), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -531,21 +752,25 @@ be_local_class(Matter_Plugin_OnOff, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_OnOff_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 16), be_const_closure(class_Matter_Plugin_OnOff_read_attribute_closure) }, - { be_const_key_weak(parse_configuration, 13), be_const_closure(class_Matter_Plugin_OnOff_parse_configuration_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_OnOff_update_virtual_closure) }, - { be_const_key_weak(DISPLAY_NAME, 14), be_nested_str_weak(Relay) }, - { be_const_key_weak(ARG_TYPE, 12), be_const_static_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light0_init_closure) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light0_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, 8), be_nested_str_weak(Light_X200_X20On) }, + { be_const_key_weak(shadow_onoff, -1), be_const_var(1) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light0_invoke_request_closure) }, { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_OnOff_update_shadow_closure) }, - { be_const_key_weak(ARG_HINT, 11), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_OnOff_init_closure) }, - { be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_OnOff_set_onoff_closure) }, - { be_const_key_weak(tasmota_relay_index, -1), be_const_var(1) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Light0__X3Clambda_X3E_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(256, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light0_update_shadow_closure) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Light0_web_values_prefix_closure) }, })), - be_str_weak(Matter_Plugin_OnOff) + be_str_weak(Matter_Plugin_Light0) ); /********************************************************************/ /* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light1.h index 0eba3d7fe..9ca95cf99 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light1.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Light1.h @@ -6,403 +6,6 @@ extern const bclass be_class_Matter_Plugin_Light1; -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light1; -be_local_closure(class_Matter_Plugin_Light1_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light1, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_onoff), - /* K2 */ be_nested_str_weak(shadow_bri), - /* K3 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* 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 - 0x90020503, // 000A SETMBR R0 K2 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light1; -be_local_closure(class_Matter_Plugin_Light1_invoke_request, /* name */ - be_nested_proto( - 22, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light1, - 1, /* has constants */ - ( &(const bvalue[23]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(command), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(set_onoff), - /* K8 */ be_nested_str_weak(publish_command), - /* K9 */ be_nested_str_weak(Power), - /* K10 */ be_const_int(1), - /* K11 */ be_const_int(2), - /* K12 */ be_nested_str_weak(shadow_onoff), - /* K13 */ be_nested_str_weak(findsubval), - /* K14 */ be_nested_str_weak(set_bri), - /* K15 */ be_nested_str_weak(log), - /* K16 */ be_nested_str_weak(bri_X3A), - /* K17 */ be_nested_str_weak(Bri), - /* K18 */ be_nested_str_weak(Dimmer), - /* K19 */ be_nested_str_weak(tasmota), - /* K20 */ be_nested_str_weak(scale_uint), - /* K21 */ be_const_int(3), - /* K22 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[167]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xB8160200, // 0001 GETNGBL R5 K1 - 0x88140B02, // 0002 GETMBR R5 R5 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x54220005, // 0005 LDINT R8 6 - 0x1C200C08, // 0006 EQ R8 R6 R8 - 0x7822002C, // 0007 JMPF R8 #0035 - 0x8C200105, // 0008 GETMET R8 R0 K5 - 0x7C200200, // 0009 CALL R8 1 - 0x1C200F06, // 000A EQ R8 R7 K6 - 0x78220009, // 000B JMPF R8 #0016 - 0x8C200107, // 000C GETMET R8 R0 K7 - 0x50280000, // 000D LDBOOL R10 0 0 - 0x7C200400, // 000E CALL R8 2 - 0x8C200108, // 000F GETMET R8 R0 K8 - 0x58280009, // 0010 LDCONST R10 K9 - 0x582C0006, // 0011 LDCONST R11 K6 - 0x7C200600, // 0012 CALL R8 3 - 0x50200200, // 0013 LDBOOL R8 1 0 - 0x80041000, // 0014 RET 1 R8 - 0x7002001D, // 0015 JMP #0034 - 0x1C200F0A, // 0016 EQ R8 R7 K10 - 0x78220009, // 0017 JMPF R8 #0022 - 0x8C200107, // 0018 GETMET R8 R0 K7 - 0x50280200, // 0019 LDBOOL R10 1 0 - 0x7C200400, // 001A CALL R8 2 - 0x8C200108, // 001B GETMET R8 R0 K8 - 0x58280009, // 001C LDCONST R10 K9 - 0x582C000A, // 001D LDCONST R11 K10 - 0x7C200600, // 001E CALL R8 3 - 0x50200200, // 001F LDBOOL R8 1 0 - 0x80041000, // 0020 RET 1 R8 - 0x70020011, // 0021 JMP #0034 - 0x1C200F0B, // 0022 EQ R8 R7 K11 - 0x7822000F, // 0023 JMPF R8 #0034 - 0x8C200107, // 0024 GETMET R8 R0 K7 - 0x8828010C, // 0025 GETMBR R10 R0 K12 - 0x782A0000, // 0026 JMPF R10 #0028 - 0x50280001, // 0027 LDBOOL R10 0 1 - 0x50280200, // 0028 LDBOOL R10 1 0 - 0x7C200400, // 0029 CALL R8 2 - 0x8C200108, // 002A GETMET R8 R0 K8 - 0x58280009, // 002B LDCONST R10 K9 - 0x882C010C, // 002C GETMBR R11 R0 K12 - 0x782E0001, // 002D JMPF R11 #0030 - 0x582C000A, // 002E LDCONST R11 K10 - 0x70020000, // 002F JMP #0031 - 0x582C0006, // 0030 LDCONST R11 K6 - 0x7C200600, // 0031 CALL R8 3 - 0x50200200, // 0032 LDBOOL R8 1 0 - 0x80041000, // 0033 RET 1 R8 - 0x70020070, // 0034 JMP #00A6 - 0x54220007, // 0035 LDINT R8 8 - 0x1C200C08, // 0036 EQ R8 R6 R8 - 0x78220064, // 0037 JMPF R8 #009D - 0x8C200105, // 0038 GETMET R8 R0 K5 - 0x7C200200, // 0039 CALL R8 1 - 0x1C200F06, // 003A EQ R8 R7 K6 - 0x7822001A, // 003B JMPF R8 #0057 - 0x8C20050D, // 003C GETMET R8 R2 K13 - 0x58280006, // 003D LDCONST R10 K6 - 0x7C200400, // 003E CALL R8 2 - 0x8C24010E, // 003F GETMET R9 R0 K14 - 0x5C2C1000, // 0040 MOVE R11 R8 - 0x7C240400, // 0041 CALL R9 2 - 0x60240008, // 0042 GETGBL R9 G8 - 0x5C281000, // 0043 MOVE R10 R8 - 0x7C240200, // 0044 CALL R9 1 - 0x00262009, // 0045 ADD R9 K16 R9 - 0x900E1E09, // 0046 SETMBR R3 K15 R9 - 0x8C240108, // 0047 GETMET R9 R0 K8 - 0x582C0011, // 0048 LDCONST R11 K17 - 0x5C301000, // 0049 MOVE R12 R8 - 0x58340012, // 004A LDCONST R13 K18 - 0xB83A2600, // 004B GETNGBL R14 K19 - 0x8C381D14, // 004C GETMET R14 R14 K20 - 0x5C401000, // 004D MOVE R16 R8 - 0x58440006, // 004E LDCONST R17 K6 - 0x544A00FD, // 004F LDINT R18 254 - 0x584C0006, // 0050 LDCONST R19 K6 - 0x54520063, // 0051 LDINT R20 100 - 0x7C380C00, // 0052 CALL R14 6 - 0x7C240A00, // 0053 CALL R9 5 - 0x50240200, // 0054 LDBOOL R9 1 0 - 0x80041200, // 0055 RET 1 R9 - 0x70020044, // 0056 JMP #009C - 0x1C200F0A, // 0057 EQ R8 R7 K10 - 0x78220002, // 0058 JMPF R8 #005C - 0x50200200, // 0059 LDBOOL R8 1 0 - 0x80041000, // 005A RET 1 R8 - 0x7002003F, // 005B JMP #009C - 0x1C200F0B, // 005C EQ R8 R7 K11 - 0x78220002, // 005D JMPF R8 #0061 - 0x50200200, // 005E LDBOOL R8 1 0 - 0x80041000, // 005F RET 1 R8 - 0x7002003A, // 0060 JMP #009C - 0x1C200F15, // 0061 EQ R8 R7 K21 - 0x78220002, // 0062 JMPF R8 #0066 - 0x50200200, // 0063 LDBOOL R8 1 0 - 0x80041000, // 0064 RET 1 R8 - 0x70020035, // 0065 JMP #009C - 0x54220003, // 0066 LDINT R8 4 - 0x1C200E08, // 0067 EQ R8 R7 R8 - 0x78220021, // 0068 JMPF R8 #008B - 0x8C20050D, // 0069 GETMET R8 R2 K13 - 0x58280006, // 006A LDCONST R10 K6 - 0x7C200400, // 006B CALL R8 2 - 0x24241106, // 006C GT R9 R8 K6 - 0x8C28010E, // 006D GETMET R10 R0 K14 - 0x5C301000, // 006E MOVE R12 R8 - 0x5C341200, // 006F MOVE R13 R9 - 0x7C280600, // 0070 CALL R10 3 - 0x60280008, // 0071 GETGBL R10 G8 - 0x5C2C1000, // 0072 MOVE R11 R8 - 0x7C280200, // 0073 CALL R10 1 - 0x002A200A, // 0074 ADD R10 K16 R10 - 0x900E1E0A, // 0075 SETMBR R3 K15 R10 - 0x8C280108, // 0076 GETMET R10 R0 K8 - 0x58300011, // 0077 LDCONST R12 K17 - 0x5C341000, // 0078 MOVE R13 R8 - 0x58380012, // 0079 LDCONST R14 K18 - 0xB83E2600, // 007A GETNGBL R15 K19 - 0x8C3C1F14, // 007B GETMET R15 R15 K20 - 0x5C441000, // 007C MOVE R17 R8 - 0x58480006, // 007D LDCONST R18 K6 - 0x544E00FD, // 007E LDINT R19 254 - 0x58500006, // 007F LDCONST R20 K6 - 0x54560063, // 0080 LDINT R21 100 - 0x7C3C0C00, // 0081 CALL R15 6 - 0x58400009, // 0082 LDCONST R16 K9 - 0x78260001, // 0083 JMPF R9 #0086 - 0x5844000A, // 0084 LDCONST R17 K10 - 0x70020000, // 0085 JMP #0087 - 0x58440006, // 0086 LDCONST R17 K6 - 0x7C280E00, // 0087 CALL R10 7 - 0x50280200, // 0088 LDBOOL R10 1 0 - 0x80041400, // 0089 RET 1 R10 - 0x70020010, // 008A JMP #009C - 0x54220004, // 008B LDINT R8 5 - 0x1C200E08, // 008C EQ R8 R7 R8 - 0x78220002, // 008D JMPF R8 #0091 - 0x50200200, // 008E LDBOOL R8 1 0 - 0x80041000, // 008F RET 1 R8 - 0x7002000A, // 0090 JMP #009C - 0x54220005, // 0091 LDINT R8 6 - 0x1C200E08, // 0092 EQ R8 R7 R8 - 0x78220002, // 0093 JMPF R8 #0097 - 0x50200200, // 0094 LDBOOL R8 1 0 - 0x80041000, // 0095 RET 1 R8 - 0x70020004, // 0096 JMP #009C - 0x54220006, // 0097 LDINT R8 7 - 0x1C200E08, // 0098 EQ R8 R7 R8 - 0x78220001, // 0099 JMPF R8 #009C - 0x50200200, // 009A LDBOOL R8 1 0 - 0x80041000, // 009B RET 1 R8 - 0x70020008, // 009C JMP #00A6 - 0x60200003, // 009D GETGBL R8 G3 - 0x5C240000, // 009E MOVE R9 R0 - 0x7C200200, // 009F CALL R8 1 - 0x8C201116, // 00A0 GETMET R8 R8 K22 - 0x5C280200, // 00A1 MOVE R10 R1 - 0x5C2C0400, // 00A2 MOVE R11 R2 - 0x5C300600, // 00A3 MOVE R12 R3 - 0x7C200800, // 00A4 CALL R8 4 - 0x80041000, // 00A5 RET 1 R8 - 0x80000000, // 00A6 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_onoff -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light1; -be_local_closure(class_Matter_Plugin_Light1_set_onoff, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light1, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(light), - /* K2 */ be_nested_str_weak(set), - /* K3 */ be_nested_str_weak(power), - /* K4 */ be_nested_str_weak(update_shadow), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(attribute_updated), - /* K7 */ be_const_int(0), - }), - be_str_weak(set_onoff), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0008, // 0001 JMPT R2 #000B - 0xA40A0200, // 0002 IMPORT R2 K1 - 0x8C0C0502, // 0003 GETMET R3 R2 K2 - 0x60140013, // 0004 GETGBL R5 G19 - 0x7C140000, // 0005 CALL R5 0 - 0x98160601, // 0006 SETIDX R5 K3 R1 - 0x7C0C0400, // 0007 CALL R3 2 - 0x8C0C0104, // 0008 GETMET R3 R0 K4 - 0x7C0C0200, // 0009 CALL R3 1 - 0x70020007, // 000A JMP #0013 - 0x88080105, // 000B GETMBR R2 R0 K5 - 0x20080202, // 000C NE R2 R1 R2 - 0x780A0004, // 000D JMPF R2 #0013 - 0x8C080106, // 000E GETMET R2 R0 K6 - 0x54120005, // 000F LDINT R4 6 - 0x58140007, // 0010 LDCONST R5 K7 - 0x7C080600, // 0011 CALL R2 3 - 0x90020A01, // 0012 SETMBR R0 K5 R1 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light1; -be_local_closure(class_Matter_Plugin_Light1_update_shadow, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light1, - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(light), - /* K2 */ be_nested_str_weak(get), - /* K3 */ be_nested_str_weak(find), - /* K4 */ be_nested_str_weak(power), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(attribute_updated), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(bri), - /* K9 */ be_nested_str_weak(tasmota), - /* K10 */ be_nested_str_weak(scale_uint), - /* K11 */ be_nested_str_weak(shadow_bri), - /* K12 */ be_nested_str_weak(update_shadow), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[50]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x74060029, // 0001 JMPT R1 #002C - 0xA4060200, // 0002 IMPORT R1 K1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x4C0C0000, // 0005 LDNIL R3 - 0x200C0403, // 0006 NE R3 R2 R3 - 0x780E0023, // 0007 JMPF R3 #002C - 0x8C0C0503, // 0008 GETMET R3 R2 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x4C180000, // 000A LDNIL R6 - 0x7C0C0600, // 000B CALL R3 3 - 0x88100105, // 000C GETMBR R4 R0 K5 - 0x20100604, // 000D NE R4 R3 R4 - 0x78120004, // 000E JMPF R4 #0014 - 0x8C100106, // 000F GETMET R4 R0 K6 - 0x541A0005, // 0010 LDINT R6 6 - 0x581C0007, // 0011 LDCONST R7 K7 - 0x7C100600, // 0012 CALL R4 3 - 0x90020A03, // 0013 SETMBR R0 K5 R3 - 0x8C100503, // 0014 GETMET R4 R2 K3 - 0x58180008, // 0015 LDCONST R6 K8 - 0x4C1C0000, // 0016 LDNIL R7 - 0x7C100600, // 0017 CALL R4 3 - 0x4C140000, // 0018 LDNIL R5 - 0x20140805, // 0019 NE R5 R4 R5 - 0x78160010, // 001A JMPF R5 #002C - 0xB8161200, // 001B GETNGBL R5 K9 - 0x8C140B0A, // 001C GETMET R5 R5 K10 - 0x5C1C0800, // 001D MOVE R7 R4 - 0x58200007, // 001E LDCONST R8 K7 - 0x542600FE, // 001F LDINT R9 255 - 0x58280007, // 0020 LDCONST R10 K7 - 0x542E00FD, // 0021 LDINT R11 254 - 0x7C140C00, // 0022 CALL R5 6 - 0x5C100A00, // 0023 MOVE R4 R5 - 0x8814010B, // 0024 GETMBR R5 R0 K11 - 0x20140805, // 0025 NE R5 R4 R5 - 0x78160004, // 0026 JMPF R5 #002C - 0x8C140106, // 0027 GETMET R5 R0 K6 - 0x541E0007, // 0028 LDINT R7 8 - 0x58200007, // 0029 LDCONST R8 K7 - 0x7C140600, // 002A CALL R5 3 - 0x90021604, // 002B SETMBR R0 K11 R4 - 0x60040003, // 002C GETGBL R1 G3 - 0x5C080000, // 002D MOVE R2 R0 - 0x7C040200, // 002E CALL R1 1 - 0x8C04030C, // 002F GETMET R1 R1 K12 - 0x7C040200, // 0030 CALL R1 1 - 0x80000000, // 0031 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: update_virtual ********************************************************************/ @@ -417,17 +20,16 @@ be_local_closure(class_Matter_Plugin_Light1_update_virtual, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light1, 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ + ( &(const bvalue[ 5]) { /* constants */ /* K0 */ be_nested_str_weak(find), /* K1 */ be_nested_str_weak(Power), /* K2 */ be_nested_str_weak(Bri), /* K3 */ be_nested_str_weak(set_bri), - /* K4 */ be_nested_str_weak(set_onoff), - /* K5 */ be_nested_str_weak(update_virtual), + /* K4 */ be_nested_str_weak(update_virtual), }), be_str_weak(update_virtual), &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ + ( &(const binstruction[23]) { /* code */ 0x8C080300, // 0000 GETMET R2 R1 K0 0x58100001, // 0001 LDCONST R4 K1 0x7C080400, // 0002 CALL R2 2 @@ -436,7 +38,7 @@ be_local_closure(class_Matter_Plugin_Light1_update_virtual, /* name */ 0x7C0C0400, // 0005 CALL R3 2 0x4C100000, // 0006 LDNIL R4 0x20100604, // 0007 NE R4 R3 R4 - 0x78120007, // 0008 JMPF R4 #0011 + 0x78120006, // 0008 JMPF R4 #0010 0x8C100103, // 0009 GETMET R4 R0 K3 0x60180009, // 000A GETGBL R6 G9 0x5C1C0600, // 000B MOVE R7 R3 @@ -444,133 +46,13 @@ be_local_closure(class_Matter_Plugin_Light1_update_virtual, /* name */ 0x5C1C0400, // 000D MOVE R7 R2 0x7C100600, // 000E CALL R4 3 0x80000800, // 000F RET 0 - 0x70020007, // 0010 JMP #0019 - 0x4C100000, // 0011 LDNIL R4 - 0x20100404, // 0012 NE R4 R2 R4 - 0x78120004, // 0013 JMPF R4 #0019 - 0x8C100104, // 0014 GETMET R4 R0 K4 - 0x60180017, // 0015 GETGBL R6 G23 - 0x5C1C0400, // 0016 MOVE R7 R2 - 0x7C180200, // 0017 CALL R6 1 - 0x7C100400, // 0018 CALL R4 2 - 0x60100003, // 0019 GETGBL R4 G3 - 0x5C140000, // 001A MOVE R5 R0 - 0x7C100200, // 001B CALL R4 1 - 0x8C100905, // 001C GETMET R4 R4 K5 - 0x5C180200, // 001D MOVE R6 R1 - 0x7C100400, // 001E CALL R4 2 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light1; -be_local_closure(class_Matter_Plugin_Light1_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light1, - 1, /* has constants */ - ( &(const bvalue[14]) { /* 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_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(shadow_onoff), - /* K9 */ be_nested_str_weak(U1), - /* K10 */ be_nested_str_weak(shadow_bri), - /* K11 */ be_const_int(2), - /* K12 */ be_const_int(3), - /* K13 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[72]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0005, // 0004 LDINT R7 6 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0009, // 0006 JMPF R7 #0011 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E0004, // 000A JMPF R7 #0010 - 0x8C1C0706, // 000B GETMET R7 R3 K6 - 0x88240907, // 000C GETMBR R9 R4 K7 - 0x88280108, // 000D GETMBR R10 R0 K8 - 0x7C1C0600, // 000E CALL R7 3 - 0x80040E00, // 000F RET 1 R7 - 0x7002002D, // 0010 JMP #003F - 0x541E0007, // 0011 LDINT R7 8 - 0x1C1C0A07, // 0012 EQ R7 R5 R7 - 0x781E002A, // 0013 JMPF R7 #003F - 0x8C1C0104, // 0014 GETMET R7 R0 K4 - 0x7C1C0200, // 0015 CALL R7 1 - 0x1C1C0D05, // 0016 EQ R7 R6 K5 - 0x781E0005, // 0017 JMPF R7 #001E - 0x8C1C0706, // 0018 GETMET R7 R3 K6 - 0x88240909, // 0019 GETMBR R9 R4 K9 - 0x8828010A, // 001A GETMBR R10 R0 K10 - 0x7C1C0600, // 001B CALL R7 3 - 0x80040E00, // 001C RET 1 R7 - 0x70020020, // 001D JMP #003F - 0x1C1C0D0B, // 001E EQ R7 R6 K11 - 0x781E0005, // 001F JMPF R7 #0026 - 0x8C1C0706, // 0020 GETMET R7 R3 K6 - 0x88240909, // 0021 GETMBR R9 R4 K9 - 0x58280005, // 0022 LDCONST R10 K5 - 0x7C1C0600, // 0023 CALL R7 3 - 0x80040E00, // 0024 RET 1 R7 - 0x70020018, // 0025 JMP #003F - 0x1C1C0D0C, // 0026 EQ R7 R6 K12 - 0x781E0005, // 0027 JMPF R7 #002E - 0x8C1C0706, // 0028 GETMET R7 R3 K6 - 0x88240909, // 0029 GETMBR R9 R4 K9 - 0x542A00FD, // 002A LDINT R10 254 - 0x7C1C0600, // 002B CALL R7 3 - 0x80040E00, // 002C RET 1 R7 - 0x70020010, // 002D JMP #003F - 0x541E000E, // 002E LDINT R7 15 - 0x1C1C0C07, // 002F EQ R7 R6 R7 - 0x781E0005, // 0030 JMPF R7 #0037 - 0x8C1C0706, // 0031 GETMET R7 R3 K6 - 0x88240909, // 0032 GETMBR R9 R4 K9 - 0x58280005, // 0033 LDCONST R10 K5 - 0x7C1C0600, // 0034 CALL R7 3 - 0x80040E00, // 0035 RET 1 R7 - 0x70020007, // 0036 JMP #003F - 0x541E0010, // 0037 LDINT R7 17 - 0x1C1C0C07, // 0038 EQ R7 R6 R7 - 0x781E0004, // 0039 JMPF R7 #003F - 0x8C1C0706, // 003A GETMET R7 R3 K6 - 0x88240909, // 003B GETMBR R9 R4 K9 - 0x8828010A, // 003C GETMBR R10 R0 K10 - 0x7C1C0600, // 003D CALL R7 3 - 0x80040E00, // 003E RET 1 R7 - 0x601C0003, // 003F GETGBL R7 G3 - 0x5C200000, // 0040 MOVE R8 R0 - 0x7C1C0200, // 0041 CALL R7 1 - 0x8C1C0F0D, // 0042 GETMET R7 R7 K13 - 0x5C240200, // 0043 MOVE R9 R1 - 0x5C280400, // 0044 MOVE R10 R2 - 0x5C2C0600, // 0045 MOVE R11 R3 - 0x7C1C0800, // 0046 CALL R7 4 - 0x80040E00, // 0047 RET 1 R7 + 0x60100003, // 0010 GETGBL R4 G3 + 0x5C140000, // 0011 MOVE R5 R0 + 0x7C100200, // 0012 CALL R4 1 + 0x8C100904, // 0013 GETMET R4 R4 K4 + 0x5C180200, // 0014 MOVE R6 R1 + 0x7C100400, // 0015 CALL R4 2 + 0x80000000, // 0016 RET 0 }) ) ); @@ -591,23 +73,27 @@ be_local_closure(class_Matter_Plugin_Light1_set_bri, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light1, 1, /* has constants */ - ( &(const bvalue[12]) { /* constants */ + ( &(const bvalue[16]) { /* constants */ /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(light), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(scale_uint), - /* K5 */ be_nested_str_weak(set), - /* K6 */ be_nested_str_weak(bri), - /* K7 */ be_nested_str_weak(power), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(shadow_onoff), - /* K10 */ be_nested_str_weak(attribute_updated), - /* K11 */ be_nested_str_weak(shadow_bri), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(scale_uint), + /* K4 */ be_nested_str_weak(call_remote_sync), + /* K5 */ be_nested_str_weak(Dimmer), + /* K6 */ be_nested_str_weak(parse_status), + /* K7 */ be_nested_str_weak(VIRTUAL), + /* K8 */ be_nested_str_weak(shadow_onoff), + /* K9 */ be_nested_str_weak(attribute_updated), + /* K10 */ be_nested_str_weak(shadow_bri), + /* K11 */ be_nested_str_weak(light), + /* K12 */ be_nested_str_weak(set), + /* K13 */ be_nested_str_weak(bri), + /* K14 */ be_nested_str_weak(power), + /* K15 */ be_nested_str_weak(update_shadow), }), be_str_weak(set_bri), &be_const_str_solidified, - ( &(const binstruction[65]) { /* code */ + ( &(const binstruction[89]) { /* code */ 0x140C0300, // 0000 LT R3 R1 K0 0x780E0000, // 0001 JMPF R3 #0003 0x58040000, // 0002 LDCONST R1 K0 @@ -625,54 +111,683 @@ be_local_closure(class_Matter_Plugin_Light1_set_bri, /* name */ 0x4C0C0000, // 000E LDNIL R3 0x5C080600, // 000F MOVE R2 R3 0x880C0101, // 0010 GETMBR R3 R0 K1 - 0x740E001A, // 0011 JMPT R3 #002D - 0xA40E0400, // 0012 IMPORT R3 K2 - 0xB8120600, // 0013 GETNGBL R4 K3 - 0x8C100904, // 0014 GETMET R4 R4 K4 - 0x5C180200, // 0015 MOVE R6 R1 - 0x581C0000, // 0016 LDCONST R7 K0 - 0x542200FD, // 0017 LDINT R8 254 - 0x58240000, // 0018 LDCONST R9 K0 - 0x542A00FE, // 0019 LDINT R10 255 - 0x7C100C00, // 001A CALL R4 6 - 0x4C140000, // 001B LDNIL R5 - 0x1C140405, // 001C EQ R5 R2 R5 - 0x78160005, // 001D JMPF R5 #0024 - 0x8C140705, // 001E GETMET R5 R3 K5 - 0x601C0013, // 001F GETGBL R7 G19 - 0x7C1C0000, // 0020 CALL R7 0 - 0x981E0C04, // 0021 SETIDX R7 K6 R4 - 0x7C140400, // 0022 CALL R5 2 - 0x70020005, // 0023 JMP #002A - 0x8C140705, // 0024 GETMET R5 R3 K5 - 0x601C0013, // 0025 GETGBL R7 G19 - 0x7C1C0000, // 0026 CALL R7 0 - 0x981E0C04, // 0027 SETIDX R7 K6 R4 - 0x981E0E02, // 0028 SETIDX R7 K7 R2 - 0x7C140400, // 0029 CALL R5 2 - 0x8C140108, // 002A GETMET R5 R0 K8 - 0x7C140200, // 002B CALL R5 1 - 0x70020012, // 002C JMP #0040 - 0x4C0C0000, // 002D LDNIL R3 + 0x780E0015, // 0011 JMPF R3 #0028 + 0xB80E0400, // 0012 GETNGBL R3 K2 + 0x8C0C0703, // 0013 GETMET R3 R3 K3 + 0x5C140200, // 0014 MOVE R5 R1 + 0x58180000, // 0015 LDCONST R6 K0 + 0x541E00FD, // 0016 LDINT R7 254 + 0x58200000, // 0017 LDCONST R8 K0 + 0x54260063, // 0018 LDINT R9 100 + 0x7C0C0C00, // 0019 CALL R3 6 + 0x8C100104, // 001A GETMET R4 R0 K4 + 0x58180005, // 001B LDCONST R6 K5 + 0x601C0008, // 001C GETGBL R7 G8 + 0x5C200600, // 001D MOVE R8 R3 + 0x7C1C0200, // 001E CALL R7 1 + 0x7C100600, // 001F CALL R4 3 + 0x4C140000, // 0020 LDNIL R5 + 0x20140805, // 0021 NE R5 R4 R5 + 0x78160003, // 0022 JMPF R5 #0027 + 0x8C140106, // 0023 GETMET R5 R0 K6 + 0x5C1C0800, // 0024 MOVE R7 R4 + 0x5422000A, // 0025 LDINT R8 11 + 0x7C140600, // 0026 CALL R5 3 + 0x7002002F, // 0027 JMP #0058 + 0x880C0107, // 0028 GETMBR R3 R0 K7 + 0x780E0013, // 0029 JMPF R3 #003E + 0x4C0C0000, // 002A LDNIL R3 + 0x200C0403, // 002B NE R3 R2 R3 + 0x780E0007, // 002C JMPF R3 #0035 + 0x880C0108, // 002D GETMBR R3 R0 K8 0x200C0403, // 002E NE R3 R2 R3 - 0x780E0007, // 002F JMPF R3 #0038 - 0x880C0109, // 0030 GETMBR R3 R0 K9 - 0x200C0403, // 0031 NE R3 R2 R3 - 0x780E0004, // 0032 JMPF R3 #0038 - 0x8C0C010A, // 0033 GETMET R3 R0 K10 - 0x54160005, // 0034 LDINT R5 6 - 0x58180000, // 0035 LDCONST R6 K0 - 0x7C0C0600, // 0036 CALL R3 3 - 0x90021202, // 0037 SETMBR R0 K9 R2 - 0x880C010B, // 0038 GETMBR R3 R0 K11 - 0x200C0203, // 0039 NE R3 R1 R3 - 0x780E0004, // 003A JMPF R3 #0040 - 0x8C0C010A, // 003B GETMET R3 R0 K10 - 0x54160007, // 003C LDINT R5 8 - 0x58180000, // 003D LDCONST R6 K0 - 0x7C0C0600, // 003E CALL R3 3 - 0x90021601, // 003F SETMBR R0 K11 R1 - 0x80000000, // 0040 RET 0 + 0x780E0004, // 002F JMPF R3 #0035 + 0x8C0C0109, // 0030 GETMET R3 R0 K9 + 0x54160005, // 0031 LDINT R5 6 + 0x58180000, // 0032 LDCONST R6 K0 + 0x7C0C0600, // 0033 CALL R3 3 + 0x90021002, // 0034 SETMBR R0 K8 R2 + 0x880C010A, // 0035 GETMBR R3 R0 K10 + 0x200C0203, // 0036 NE R3 R1 R3 + 0x780E0004, // 0037 JMPF R3 #003D + 0x8C0C0109, // 0038 GETMET R3 R0 K9 + 0x54160007, // 0039 LDINT R5 8 + 0x58180000, // 003A LDCONST R6 K0 + 0x7C0C0600, // 003B CALL R3 3 + 0x90021401, // 003C SETMBR R0 K10 R1 + 0x70020019, // 003D JMP #0058 + 0xA40E1600, // 003E IMPORT R3 K11 + 0xB8120400, // 003F GETNGBL R4 K2 + 0x8C100903, // 0040 GETMET R4 R4 K3 + 0x5C180200, // 0041 MOVE R6 R1 + 0x581C0000, // 0042 LDCONST R7 K0 + 0x542200FD, // 0043 LDINT R8 254 + 0x58240000, // 0044 LDCONST R9 K0 + 0x542A00FE, // 0045 LDINT R10 255 + 0x7C100C00, // 0046 CALL R4 6 + 0x4C140000, // 0047 LDNIL R5 + 0x1C140405, // 0048 EQ R5 R2 R5 + 0x78160005, // 0049 JMPF R5 #0050 + 0x8C14070C, // 004A GETMET R5 R3 K12 + 0x601C0013, // 004B GETGBL R7 G19 + 0x7C1C0000, // 004C CALL R7 0 + 0x981E1A04, // 004D SETIDX R7 K13 R4 + 0x7C140400, // 004E CALL R5 2 + 0x70020005, // 004F JMP #0056 + 0x8C14070C, // 0050 GETMET R5 R3 K12 + 0x601C0013, // 0051 GETGBL R7 G19 + 0x7C1C0000, // 0052 CALL R7 0 + 0x981E1A04, // 0053 SETIDX R7 K13 R4 + 0x981E1C02, // 0054 SETIDX R7 K14 R2 + 0x7C140400, // 0055 CALL R5 2 + 0x8C14010F, // 0056 GETMET R5 R0 K15 + 0x7C140200, // 0057 CALL R5 1 + 0x80000000, // 0058 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_bri), + /* K2 */ be_const_int(0), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[10]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x90020302, // 0008 SETMBR R0 K1 K2 + 0x80000000, // 0009 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_update_shadow, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(VIRTUAL), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(light), + /* K3 */ be_nested_str_weak(get), + /* K4 */ be_nested_str_weak(find), + /* K5 */ be_nested_str_weak(power), + /* K6 */ be_nested_str_weak(shadow_onoff), + /* K7 */ be_nested_str_weak(attribute_updated), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(bri), + /* K10 */ be_nested_str_weak(tasmota), + /* K11 */ be_nested_str_weak(scale_uint), + /* K12 */ be_nested_str_weak(shadow_bri), + /* K13 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[52]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x7406002B, // 0001 JMPT R1 #002E + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x74060029, // 0003 JMPT R1 #002E + 0xA4060400, // 0004 IMPORT R1 K2 + 0x8C080303, // 0005 GETMET R2 R1 K3 + 0x7C080200, // 0006 CALL R2 1 + 0x4C0C0000, // 0007 LDNIL R3 + 0x200C0403, // 0008 NE R3 R2 R3 + 0x780E0023, // 0009 JMPF R3 #002E + 0x8C0C0504, // 000A GETMET R3 R2 K4 + 0x58140005, // 000B LDCONST R5 K5 + 0x4C180000, // 000C LDNIL R6 + 0x7C0C0600, // 000D CALL R3 3 + 0x88100106, // 000E GETMBR R4 R0 K6 + 0x20100604, // 000F NE R4 R3 R4 + 0x78120004, // 0010 JMPF R4 #0016 + 0x8C100107, // 0011 GETMET R4 R0 K7 + 0x541A0005, // 0012 LDINT R6 6 + 0x581C0008, // 0013 LDCONST R7 K8 + 0x7C100600, // 0014 CALL R4 3 + 0x90020C03, // 0015 SETMBR R0 K6 R3 + 0x8C100504, // 0016 GETMET R4 R2 K4 + 0x58180009, // 0017 LDCONST R6 K9 + 0x4C1C0000, // 0018 LDNIL R7 + 0x7C100600, // 0019 CALL R4 3 + 0x4C140000, // 001A LDNIL R5 + 0x20140805, // 001B NE R5 R4 R5 + 0x78160010, // 001C JMPF R5 #002E + 0xB8161400, // 001D GETNGBL R5 K10 + 0x8C140B0B, // 001E GETMET R5 R5 K11 + 0x5C1C0800, // 001F MOVE R7 R4 + 0x58200008, // 0020 LDCONST R8 K8 + 0x542600FE, // 0021 LDINT R9 255 + 0x58280008, // 0022 LDCONST R10 K8 + 0x542E00FD, // 0023 LDINT R11 254 + 0x7C140C00, // 0024 CALL R5 6 + 0x5C100A00, // 0025 MOVE R4 R5 + 0x8814010C, // 0026 GETMBR R5 R0 K12 + 0x20140805, // 0027 NE R5 R4 R5 + 0x78160004, // 0028 JMPF R5 #002E + 0x8C140107, // 0029 GETMET R5 R0 K7 + 0x541E0007, // 002A LDINT R7 8 + 0x58200008, // 002B LDCONST R8 K8 + 0x7C140600, // 002C CALL R5 3 + 0x90021804, // 002D SETMBR R0 K12 R4 + 0x60040003, // 002E GETGBL R1 G3 + 0x5C080000, // 002F MOVE R2 R0 + 0x7C040200, // 0030 CALL R1 1 + 0x8C04030D, // 0031 GETMET R1 R1 K13 + 0x7C040200, // 0032 CALL R1 1 + 0x80000000, // 0033 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(tasmota_relay_index), + /* K2 */ be_nested_str_weak(find), + /* K3 */ be_nested_str_weak(ARG), + /* K4 */ be_const_int(0), + /* K5 */ be_const_int(1), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A000E, // 0001 JMPF R2 #0011 + 0x60080009, // 0002 GETGBL R2 G9 + 0x8C0C0302, // 0003 GETMET R3 R1 K2 + 0x88140103, // 0004 GETMBR R5 R0 K3 + 0x4C180000, // 0005 LDNIL R6 + 0x7C0C0600, // 0006 CALL R3 3 + 0x7C080200, // 0007 CALL R2 1 + 0x90020202, // 0008 SETMBR R0 K1 R2 + 0x88080101, // 0009 GETMBR R2 R0 K1 + 0x4C0C0000, // 000A LDNIL R3 + 0x20080403, // 000B NE R2 R2 R3 + 0x780A0003, // 000C JMPF R2 #0011 + 0x88080101, // 000D GETMBR R2 R0 K1 + 0x18080504, // 000E LE R2 R2 K4 + 0x780A0000, // 000F JMPF R2 #0011 + 0x90020305, // 0010 SETMBR R0 K1 K5 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_parse_status, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(Dimmer), + /* K3 */ be_nested_str_weak(tasmota), + /* K4 */ be_nested_str_weak(scale_uint), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(shadow_bri), + /* K7 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0017, // 0009 JMPF R3 #0022 + 0x600C0009, // 000A GETGBL R3 G9 + 0x8C100301, // 000B GETMET R4 R1 K1 + 0x58180002, // 000C LDCONST R6 K2 + 0x7C100400, // 000D CALL R4 2 + 0x7C0C0200, // 000E CALL R3 1 + 0x4C100000, // 000F LDNIL R4 + 0x20100604, // 0010 NE R4 R3 R4 + 0x7812000F, // 0011 JMPF R4 #0022 + 0xB8120600, // 0012 GETNGBL R4 K3 + 0x8C100904, // 0013 GETMET R4 R4 K4 + 0x5C180600, // 0014 MOVE R6 R3 + 0x581C0005, // 0015 LDCONST R7 K5 + 0x54220063, // 0016 LDINT R8 100 + 0x58240005, // 0017 LDCONST R9 K5 + 0x542A00FD, // 0018 LDINT R10 254 + 0x7C100C00, // 0019 CALL R4 6 + 0x88140106, // 001A GETMBR R5 R0 K6 + 0x20140805, // 001B NE R5 R4 R5 + 0x78160004, // 001C JMPF R5 #0022 + 0x8C140107, // 001D GETMET R5 R0 K7 + 0x541E0007, // 001E LDINT R7 8 + 0x58200005, // 001F LDCONST R8 K5 + 0x7C140600, // 0020 CALL R5 3 + 0x90020C04, // 0021 SETMBR R0 K6 R4 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: read_attribute +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_read_attribute, /* name */ + be_nested_proto( + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[12]) { /* 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_nested_str_weak(update_shadow_lazy), + /* K5 */ be_const_int(0), + /* K6 */ be_nested_str_weak(set), + /* K7 */ be_nested_str_weak(U1), + /* K8 */ be_nested_str_weak(shadow_bri), + /* K9 */ be_const_int(2), + /* K10 */ be_const_int(3), + /* K11 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), + &be_const_str_solidified, + ( &(const binstruction[59]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E0007, // 0004 LDINT R7 8 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E002A, // 0006 JMPF R7 #0032 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x1C1C0D05, // 0009 EQ R7 R6 K5 + 0x781E0005, // 000A JMPF R7 #0011 + 0x8C1C0706, // 000B GETMET R7 R3 K6 + 0x88240907, // 000C GETMBR R9 R4 K7 + 0x88280108, // 000D GETMBR R10 R0 K8 + 0x7C1C0600, // 000E CALL R7 3 + 0x80040E00, // 000F RET 1 R7 + 0x70020020, // 0010 JMP #0032 + 0x1C1C0D09, // 0011 EQ R7 R6 K9 + 0x781E0005, // 0012 JMPF R7 #0019 + 0x8C1C0706, // 0013 GETMET R7 R3 K6 + 0x88240907, // 0014 GETMBR R9 R4 K7 + 0x58280005, // 0015 LDCONST R10 K5 + 0x7C1C0600, // 0016 CALL R7 3 + 0x80040E00, // 0017 RET 1 R7 + 0x70020018, // 0018 JMP #0032 + 0x1C1C0D0A, // 0019 EQ R7 R6 K10 + 0x781E0005, // 001A JMPF R7 #0021 + 0x8C1C0706, // 001B GETMET R7 R3 K6 + 0x88240907, // 001C GETMBR R9 R4 K7 + 0x542A00FD, // 001D LDINT R10 254 + 0x7C1C0600, // 001E CALL R7 3 + 0x80040E00, // 001F RET 1 R7 + 0x70020010, // 0020 JMP #0032 + 0x541E000E, // 0021 LDINT R7 15 + 0x1C1C0C07, // 0022 EQ R7 R6 R7 + 0x781E0005, // 0023 JMPF R7 #002A + 0x8C1C0706, // 0024 GETMET R7 R3 K6 + 0x88240907, // 0025 GETMBR R9 R4 K7 + 0x58280005, // 0026 LDCONST R10 K5 + 0x7C1C0600, // 0027 CALL R7 3 + 0x80040E00, // 0028 RET 1 R7 + 0x70020007, // 0029 JMP #0032 + 0x541E0010, // 002A LDINT R7 17 + 0x1C1C0C07, // 002B EQ R7 R6 R7 + 0x781E0004, // 002C JMPF R7 #0032 + 0x8C1C0706, // 002D GETMET R7 R3 K6 + 0x88240907, // 002E GETMBR R9 R4 K7 + 0x88280108, // 002F GETMBR R10 R0 K8 + 0x7C1C0600, // 0030 CALL R7 3 + 0x80040E00, // 0031 RET 1 R7 + 0x601C0003, // 0032 GETGBL R7 G3 + 0x5C200000, // 0033 MOVE R8 R0 + 0x7C1C0200, // 0034 CALL R7 1 + 0x8C1C0F0B, // 0035 GETMET R7 R7 K11 + 0x5C240200, // 0036 MOVE R9 R1 + 0x5C280400, // 0037 MOVE R10 R2 + 0x5C2C0600, // 0038 MOVE R11 R3 + 0x7C1C0800, // 0039 CALL R7 4 + 0x80040E00, // 003A RET 1 R7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: invoke_request +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_invoke_request, /* name */ + be_nested_proto( + 22, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[21]) { /* constants */ + /* K0 */ be_nested_str_weak(light), + /* K1 */ be_nested_str_weak(matter), + /* K2 */ be_nested_str_weak(TLV), + /* K3 */ be_nested_str_weak(cluster), + /* K4 */ be_nested_str_weak(command), + /* K5 */ be_nested_str_weak(update_shadow_lazy), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(findsubval), + /* K8 */ be_nested_str_weak(set_bri), + /* K9 */ be_nested_str_weak(log), + /* K10 */ be_nested_str_weak(bri_X3A), + /* K11 */ be_nested_str_weak(publish_command), + /* K12 */ be_nested_str_weak(Bri), + /* K13 */ be_nested_str_weak(Dimmer), + /* K14 */ be_nested_str_weak(tasmota), + /* K15 */ be_nested_str_weak(scale_uint), + /* K16 */ be_const_int(1), + /* K17 */ be_const_int(2), + /* K18 */ be_const_int(3), + /* K19 */ be_nested_str_weak(Power), + /* K20 */ be_nested_str_weak(invoke_request), + }), + be_str_weak(invoke_request), + &be_const_str_solidified, + ( &(const binstruction[119]) { /* code */ + 0xA4120000, // 0000 IMPORT R4 K0 + 0xB8160200, // 0001 GETNGBL R5 K1 + 0x88140B02, // 0002 GETMBR R5 R5 K2 + 0x88180703, // 0003 GETMBR R6 R3 K3 + 0x881C0704, // 0004 GETMBR R7 R3 K4 + 0x54220007, // 0005 LDINT R8 8 + 0x1C200C08, // 0006 EQ R8 R6 R8 + 0x78220064, // 0007 JMPF R8 #006D + 0x8C200105, // 0008 GETMET R8 R0 K5 + 0x7C200200, // 0009 CALL R8 1 + 0x1C200F06, // 000A EQ R8 R7 K6 + 0x7822001A, // 000B JMPF R8 #0027 + 0x8C200507, // 000C GETMET R8 R2 K7 + 0x58280006, // 000D LDCONST R10 K6 + 0x7C200400, // 000E CALL R8 2 + 0x8C240108, // 000F GETMET R9 R0 K8 + 0x5C2C1000, // 0010 MOVE R11 R8 + 0x7C240400, // 0011 CALL R9 2 + 0x60240008, // 0012 GETGBL R9 G8 + 0x5C281000, // 0013 MOVE R10 R8 + 0x7C240200, // 0014 CALL R9 1 + 0x00261409, // 0015 ADD R9 K10 R9 + 0x900E1209, // 0016 SETMBR R3 K9 R9 + 0x8C24010B, // 0017 GETMET R9 R0 K11 + 0x582C000C, // 0018 LDCONST R11 K12 + 0x5C301000, // 0019 MOVE R12 R8 + 0x5834000D, // 001A LDCONST R13 K13 + 0xB83A1C00, // 001B GETNGBL R14 K14 + 0x8C381D0F, // 001C GETMET R14 R14 K15 + 0x5C401000, // 001D MOVE R16 R8 + 0x58440006, // 001E LDCONST R17 K6 + 0x544A00FD, // 001F LDINT R18 254 + 0x584C0006, // 0020 LDCONST R19 K6 + 0x54520063, // 0021 LDINT R20 100 + 0x7C380C00, // 0022 CALL R14 6 + 0x7C240A00, // 0023 CALL R9 5 + 0x50240200, // 0024 LDBOOL R9 1 0 + 0x80041200, // 0025 RET 1 R9 + 0x70020044, // 0026 JMP #006C + 0x1C200F10, // 0027 EQ R8 R7 K16 + 0x78220002, // 0028 JMPF R8 #002C + 0x50200200, // 0029 LDBOOL R8 1 0 + 0x80041000, // 002A RET 1 R8 + 0x7002003F, // 002B JMP #006C + 0x1C200F11, // 002C EQ R8 R7 K17 + 0x78220002, // 002D JMPF R8 #0031 + 0x50200200, // 002E LDBOOL R8 1 0 + 0x80041000, // 002F RET 1 R8 + 0x7002003A, // 0030 JMP #006C + 0x1C200F12, // 0031 EQ R8 R7 K18 + 0x78220002, // 0032 JMPF R8 #0036 + 0x50200200, // 0033 LDBOOL R8 1 0 + 0x80041000, // 0034 RET 1 R8 + 0x70020035, // 0035 JMP #006C + 0x54220003, // 0036 LDINT R8 4 + 0x1C200E08, // 0037 EQ R8 R7 R8 + 0x78220021, // 0038 JMPF R8 #005B + 0x8C200507, // 0039 GETMET R8 R2 K7 + 0x58280006, // 003A LDCONST R10 K6 + 0x7C200400, // 003B CALL R8 2 + 0x24241106, // 003C GT R9 R8 K6 + 0x8C280108, // 003D GETMET R10 R0 K8 + 0x5C301000, // 003E MOVE R12 R8 + 0x5C341200, // 003F MOVE R13 R9 + 0x7C280600, // 0040 CALL R10 3 + 0x60280008, // 0041 GETGBL R10 G8 + 0x5C2C1000, // 0042 MOVE R11 R8 + 0x7C280200, // 0043 CALL R10 1 + 0x002A140A, // 0044 ADD R10 K10 R10 + 0x900E120A, // 0045 SETMBR R3 K9 R10 + 0x8C28010B, // 0046 GETMET R10 R0 K11 + 0x5830000C, // 0047 LDCONST R12 K12 + 0x5C341000, // 0048 MOVE R13 R8 + 0x5838000D, // 0049 LDCONST R14 K13 + 0xB83E1C00, // 004A GETNGBL R15 K14 + 0x8C3C1F0F, // 004B GETMET R15 R15 K15 + 0x5C441000, // 004C MOVE R17 R8 + 0x58480006, // 004D LDCONST R18 K6 + 0x544E00FD, // 004E LDINT R19 254 + 0x58500006, // 004F LDCONST R20 K6 + 0x54560063, // 0050 LDINT R21 100 + 0x7C3C0C00, // 0051 CALL R15 6 + 0x58400013, // 0052 LDCONST R16 K19 + 0x78260001, // 0053 JMPF R9 #0056 + 0x58440010, // 0054 LDCONST R17 K16 + 0x70020000, // 0055 JMP #0057 + 0x58440006, // 0056 LDCONST R17 K6 + 0x7C280E00, // 0057 CALL R10 7 + 0x50280200, // 0058 LDBOOL R10 1 0 + 0x80041400, // 0059 RET 1 R10 + 0x70020010, // 005A JMP #006C + 0x54220004, // 005B LDINT R8 5 + 0x1C200E08, // 005C EQ R8 R7 R8 + 0x78220002, // 005D JMPF R8 #0061 + 0x50200200, // 005E LDBOOL R8 1 0 + 0x80041000, // 005F RET 1 R8 + 0x7002000A, // 0060 JMP #006C + 0x54220005, // 0061 LDINT R8 6 + 0x1C200E08, // 0062 EQ R8 R7 R8 + 0x78220002, // 0063 JMPF R8 #0067 + 0x50200200, // 0064 LDBOOL R8 1 0 + 0x80041000, // 0065 RET 1 R8 + 0x70020004, // 0066 JMP #006C + 0x54220006, // 0067 LDINT R8 7 + 0x1C200E08, // 0068 EQ R8 R7 R8 + 0x78220001, // 0069 JMPF R8 #006C + 0x50200200, // 006A LDBOOL R8 1 0 + 0x80041000, // 006B RET 1 R8 + 0x70020008, // 006C JMP #0076 + 0x60200003, // 006D GETGBL R8 G3 + 0x5C240000, // 006E MOVE R9 R0 + 0x7C200200, // 006F CALL R8 1 + 0x8C201114, // 0070 GETMET R8 R8 K20 + 0x5C280200, // 0071 MOVE R10 R1 + 0x5C2C0400, // 0072 MOVE R11 R2 + 0x5C300600, // 0073 MOVE R12 R3 + 0x7C200800, // 0074 CALL R8 4 + 0x80041000, // 0075 RET 1 R8 + 0x80000000, // 0076 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_dimmer +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_web_value_dimmer, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(shadow_bri), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(scale_uint), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(_X25i_X25_X25), + /* K6 */ be_nested_str_weak(_X26_X23128261_X3B_X20), + }), + be_str_weak(web_value_dimmer), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x20080403, // 0003 NE R2 R2 R3 + 0x780A000C, // 0004 JMPF R2 #0012 + 0xB80A0400, // 0005 GETNGBL R2 K2 + 0x8C080503, // 0006 GETMET R2 R2 K3 + 0x88100101, // 0007 GETMBR R4 R0 K1 + 0x58140004, // 0008 LDCONST R5 K4 + 0x541A00FD, // 0009 LDINT R6 254 + 0x581C0004, // 000A LDCONST R7 K4 + 0x54220063, // 000B LDINT R8 100 + 0x7C080C00, // 000C CALL R2 6 + 0x600C0018, // 000D GETGBL R3 G24 + 0x58100005, // 000E LDCONST R4 K5 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x5C040600, // 0011 MOVE R1 R3 + 0x000A0C01, // 0012 ADD R2 K6 R1 + 0x80040400, // 0013 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_closure(class_Matter_Plugin_Light1_web_values, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light1, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X25s_X20_X25s), + /* K4 */ be_nested_str_weak(web_value_onoff), + /* K5 */ be_nested_str_weak(shadow_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[14]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x8C180104, // 0006 GETMET R6 R0 K4 + 0x88200105, // 0007 GETMBR R8 R0 K5 + 0x7C180400, // 0008 CALL R6 2 + 0x8C1C0106, // 0009 GETMET R7 R0 K6 + 0x7C1C0200, // 000A CALL R7 1 + 0x7C100600, // 000B CALL R4 3 + 0x7C080400, // 000C CALL R2 2 + 0x80000000, // 000D RET 0 }) ) ); @@ -682,28 +797,32 @@ be_local_closure(class_Matter_Plugin_Light1_set_bri, /* name */ /******************************************************************** ** Solidified class: Matter_Plugin_Light1 ********************************************************************/ -extern const bclass be_class_Matter_Plugin_Device; +extern const bclass be_class_Matter_Plugin_Light0; be_local_class(Matter_Plugin_Light1, - 2, - &be_class_Matter_Plugin_Device, - be_nested_map(15, + 1, + &be_class_Matter_Plugin_Light0, + be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_virtual, 1), be_const_closure(class_Matter_Plugin_Light1_update_virtual_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light1_web_values_closure) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Light1_parse_status_closure) }, { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light1_init_closure) }, - { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light1_update_shadow_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light1_invoke_request_closure) }, - { be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_Light1_set_onoff_closure) }, - { be_const_key_weak(TYPE, 10), be_nested_str_weak(light1) }, - { be_const_key_weak(update_virtual, 11), be_const_closure(class_Matter_Plugin_Light1_update_virtual_closure) }, - { be_const_key_weak(UPDATE_TIME, 8), be_const_int(250) }, - { be_const_key_weak(shadow_bri, 1), be_const_var(1) }, { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) }, + { be_const_key_weak(update_shadow, 6), be_const_closure(class_Matter_Plugin_Light1_update_shadow_closure) }, + { be_const_key_weak(shadow_bri, 15), be_const_var(0) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(2, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Power), be_nested_str_weak(Bri), })) ) } )) }, - { be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(invoke_request, 2), be_const_closure(class_Matter_Plugin_Light1_invoke_request_closure) }, + { be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(257, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(CLUSTERS, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(7, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(29, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -802,14 +921,11 @@ be_local_class(Matter_Plugin_Light1, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(257, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(set_bri, 8), be_const_closure(class_Matter_Plugin_Light1_set_bri_closure) }, { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light1_read_attribute_closure) }, - { be_const_key_weak(shadow_onoff, -1), be_const_var(0) }, - { be_const_key_weak(set_bri, -1), be_const_closure(class_Matter_Plugin_Light1_set_bri_closure) }, + { be_const_key_weak(TYPE, 4), be_nested_str_weak(light1) }, + { be_const_key_weak(web_value_dimmer, -1), be_const_closure(class_Matter_Plugin_Light1_web_value_dimmer_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Light1_parse_configuration_closure) }, })), be_str_weak(Matter_Plugin_Light1) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor.h index 82087ee1d..efe206a1c 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor.h @@ -6,6 +6,370 @@ extern const bclass be_class_Matter_Plugin_Sensor; +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_parse_status, /* name */ + be_nested_proto( + 9, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(contains), + /* K1 */ be_nested_str_weak(TempUnit), + /* K2 */ be_nested_str_weak(temp_unit), + /* K3 */ be_nested_str_weak(PressureUnit), + /* K4 */ be_nested_str_weak(pressure_unit), + /* K5 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K6 */ be_nested_str_weak(pre_value), + /* K7 */ be_nested_str_weak(match), + /* K8 */ be_nested_str_weak(shadow_value), + /* K9 */ be_nested_str_weak(value_changed), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E001E, // 0002 JMPF R3 #0022 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x58140001, // 0004 LDCONST R5 K1 + 0x7C0C0400, // 0005 CALL R3 2 + 0x780E0001, // 0006 JMPF R3 #0009 + 0x940C0301, // 0007 GETIDX R3 R1 K1 + 0x90020403, // 0008 SETMBR R0 K2 R3 + 0x8C0C0300, // 0009 GETMET R3 R1 K0 + 0x58140003, // 000A LDCONST R5 K3 + 0x7C0C0400, // 000B CALL R3 2 + 0x780E0001, // 000C JMPF R3 #000F + 0x940C0303, // 000D GETIDX R3 R1 K3 + 0x90020803, // 000E SETMBR R0 K4 R3 + 0x880C0105, // 000F GETMBR R3 R0 K5 + 0x780E0010, // 0010 JMPF R3 #0022 + 0x8C0C0106, // 0011 GETMET R3 R0 K6 + 0x6014000A, // 0012 GETGBL R5 G10 + 0x88180105, // 0013 GETMBR R6 R0 K5 + 0x8C180D07, // 0014 GETMET R6 R6 K7 + 0x5C200200, // 0015 MOVE R8 R1 + 0x7C180400, // 0016 CALL R6 2 + 0x7C140200, // 0017 CALL R5 1 + 0x7C0C0400, // 0018 CALL R3 2 + 0x4C100000, // 0019 LDNIL R4 + 0x20100604, // 001A NE R4 R3 R4 + 0x78120005, // 001B JMPF R4 #0022 + 0x88100108, // 001C GETMBR R4 R0 K8 + 0x20100604, // 001D NE R4 R3 R4 + 0x78120002, // 001E JMPF R4 #0022 + 0x8C100109, // 001F GETMET R4 R0 K9 + 0x7C100200, // 0020 CALL R4 1 + 0x90021003, // 0021 SETMBR R0 K8 R3 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */ + be_nested_proto( + 5, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[11]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_sensor_filter), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(Rule_Matcher), + /* K6 */ be_nested_str_weak(parse), + /* K7 */ be_nested_str_weak(temp_unit), + /* K8 */ be_nested_str_weak(TEMP_C), + /* K9 */ be_nested_str_weak(pressure_unit), + /* K10 */ be_nested_str_weak(PRESSURE_HPA), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[17]) { /* code */ + 0x8C080301, // 0000 GETMET R2 R1 K1 + 0x88100102, // 0001 GETMBR R4 R0 K2 + 0x7C080400, // 0002 CALL R2 2 + 0x90020002, // 0003 SETMBR R0 K0 R2 + 0x88080100, // 0004 GETMBR R2 R0 K0 + 0x780A0005, // 0005 JMPF R2 #000C + 0xB80A0800, // 0006 GETNGBL R2 K4 + 0x88080505, // 0007 GETMBR R2 R2 K5 + 0x8C080506, // 0008 GETMET R2 R2 K6 + 0x88100100, // 0009 GETMBR R4 R0 K0 + 0x7C080400, // 000A CALL R2 2 + 0x90020602, // 000B SETMBR R0 K3 R2 + 0x88080108, // 000C GETMBR R2 R0 K8 + 0x90020E02, // 000D SETMBR R0 K7 R2 + 0x8808010A, // 000E GETMBR R2 R0 K10 + 0x90021202, // 000F SETMBR R0 K9 R2 + 0x80000000, // 0010 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: pre_value +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_pre_value, /* name */ + be_nested_proto( + 2, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(pre_value), + &be_const_str_solidified, + ( &(const binstruction[ 1]) { /* code */ + 0x80040200, // 0000 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_sensors +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_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 */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[ 6]) { /* constants */ + /* K0 */ be_nested_str_weak(VIRTUAL), + /* K1 */ be_nested_str_weak(tasmota_sensor_matcher), + /* K2 */ be_nested_str_weak(pre_value), + /* K3 */ be_nested_str_weak(match), + /* K4 */ be_nested_str_weak(shadow_value), + /* K5 */ be_nested_str_weak(value_changed), + }), + be_str_weak(parse_sensors), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x740A0012, // 0001 JMPT R2 #0015 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x780A0010, // 0003 JMPF R2 #0015 + 0x8C080102, // 0004 GETMET R2 R0 K2 + 0x6010000A, // 0005 GETGBL R4 G10 + 0x88140101, // 0006 GETMBR R5 R0 K1 + 0x8C140B03, // 0007 GETMET R5 R5 K3 + 0x5C1C0200, // 0008 MOVE R7 R1 + 0x7C140400, // 0009 CALL R5 2 + 0x7C100200, // 000A CALL R4 1 + 0x7C080400, // 000B CALL R2 2 + 0x4C0C0000, // 000C LDNIL R3 + 0x200C0403, // 000D NE R3 R2 R3 + 0x780E0005, // 000E JMPF R3 #0015 + 0x880C0104, // 000F GETMBR R3 R0 K4 + 0x200C0403, // 0010 NE R3 R2 R3 + 0x780E0002, // 0011 JMPF R3 #0015 + 0x8C0C0105, // 0012 GETMET R3 R0 K5 + 0x7C0C0200, // 0013 CALL R3 1 + 0x90020802, // 0014 SETMBR R0 K4 R2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: value_changed +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_value_changed, /* name */ + be_nested_proto( + 1, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 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: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(add_read_sensors_schedule), + /* K2 */ be_nested_str_weak(UPDATE_TIME), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* 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 + 0x8C100301, // 0008 GETMET R4 R1 K1 + 0x88180102, // 0009 GETMBR R6 R0 K2 + 0x7C100400, // 000A CALL R4 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: filter_name_html +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_filter_name_html, /* name */ + be_nested_proto( + 9, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_sensor_filter), + /* K1 */ be_nested_str_weak(string), + /* K2 */ be_nested_str_weak(webserver), + /* K3 */ be_nested_str_weak(html_escape), + /* K4 */ be_nested_str_weak(split), + /* K5 */ be_nested_str_weak(_X23), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(filter_name_html), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x78060009, // 0001 JMPF R1 #000C + 0xA4060200, // 0002 IMPORT R1 K1 + 0xA40A0400, // 0003 IMPORT R2 K2 + 0x8C0C0503, // 0004 GETMET R3 R2 K3 + 0x8C140304, // 0005 GETMET R5 R1 K4 + 0x881C0100, // 0006 GETMBR R7 R0 K0 + 0x58200005, // 0007 LDCONST R8 K5 + 0x7C140600, // 0008 CALL R5 3 + 0x94140B06, // 0009 GETIDX R5 R5 K6 + 0x7C0C0400, // 000A CALL R3 2 + 0x80040600, // 000B RET 1 R3 + 0x80060E00, // 000C RET 1 K7 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor; +be_local_closure(class_Matter_Plugin_Sensor_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(filter_name_html), + /* K3 */ be_nested_str_weak(content_send), + /* K4 */ be_nested_str_weak(PREFIX), + /* K5 */ be_nested_str_weak(html_escape), + /* K6 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0002, // 0004 JMPT R3 #0008 + 0x8C0C0102, // 0005 GETMET R3 R0 K2 + 0x7C0C0200, // 0006 CALL R3 1 + 0x5C080600, // 0007 MOVE R2 R3 + 0x8C0C0303, // 0008 GETMET R3 R1 K3 + 0x60140018, // 0009 GETGBL R5 G24 + 0x88180104, // 000A GETMBR R6 R0 K4 + 0x780A0003, // 000B JMPF R2 #0010 + 0x8C1C0305, // 000C GETMET R7 R1 K5 + 0x5C240400, // 000D MOVE R9 R2 + 0x7C1C0400, // 000E CALL R7 2 + 0x70020000, // 000F JMP #0011 + 0x581C0006, // 0010 LDCONST R7 K6 + 0x7C140400, // 0011 CALL R5 2 + 0x7C0C0400, // 0012 CALL R3 2 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_virtual ********************************************************************/ @@ -65,216 +429,39 @@ be_local_closure(class_Matter_Plugin_Sensor_update_virtual, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_sensors -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor; -be_local_closure(class_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 */ - &be_class_Matter_Plugin_Sensor, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(tasmota_sensor_matcher), - /* K2 */ be_nested_str_weak(pre_value), - /* K3 */ be_nested_str_weak(match), - /* K4 */ be_nested_str_weak(shadow_value), - /* K5 */ be_nested_str_weak(value_changed), - }), - be_str_weak(parse_sensors), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x740A0012, // 0001 JMPT R2 #0015 - 0x88080101, // 0002 GETMBR R2 R0 K1 - 0x780A0010, // 0003 JMPF R2 #0015 - 0x8C080102, // 0004 GETMET R2 R0 K2 - 0x6010000A, // 0005 GETGBL R4 G10 - 0x88140101, // 0006 GETMBR R5 R0 K1 - 0x8C140B03, // 0007 GETMET R5 R5 K3 - 0x5C1C0200, // 0008 MOVE R7 R1 - 0x7C140400, // 0009 CALL R5 2 - 0x7C100200, // 000A CALL R4 1 - 0x7C080400, // 000B CALL R2 2 - 0x4C0C0000, // 000C LDNIL R3 - 0x200C0403, // 000D NE R3 R2 R3 - 0x780E0005, // 000E JMPF R3 #0015 - 0x880C0104, // 000F GETMBR R3 R0 K4 - 0x200C0403, // 0010 NE R3 R2 R3 - 0x780E0002, // 0011 JMPF R3 #0015 - 0x8C0C0105, // 0012 GETMET R3 R0 K5 - 0x7C0C0200, // 0013 CALL R3 1 - 0x90020802, // 0014 SETMBR R0 K4 R2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor; -be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_sensor_filter), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_nested_str_weak(tasmota_sensor_matcher), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(Rule_Matcher), - /* K6 */ be_nested_str_weak(parse), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x8C080301, // 0000 GETMET R2 R1 K1 - 0x88100102, // 0001 GETMBR R4 R0 K2 - 0x7C080400, // 0002 CALL R2 2 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x780A0005, // 0005 JMPF R2 #000C - 0xB80A0800, // 0006 GETNGBL R2 K4 - 0x88080505, // 0007 GETMBR R2 R2 K5 - 0x8C080506, // 0008 GETMET R2 R2 K6 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x7C080400, // 000A CALL R2 2 - 0x90020602, // 000B SETMBR R0 K3 R2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor; -be_local_closure(class_Matter_Plugin_Sensor_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(add_read_sensors_schedule), - /* K2 */ be_nested_str_weak(UPDATE_TIME), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* 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 - 0x8C100301, // 0008 GETMET R4 R1 K1 - 0x88180102, // 0009 GETMBR R6 R0 K2 - 0x7C100400, // 000A CALL R4 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor; -be_local_closure(class_Matter_Plugin_Sensor_pre_value, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80040200, // 0000 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor; -be_local_closure(class_Matter_Plugin_Sensor_value_changed, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor, - 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 ********************************************************************/ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor, - 3, + 5, &be_class_Matter_Plugin_Device, - be_nested_map(13, + be_nested_map(24, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG, 1), be_nested_str_weak(filter) }, - { be_const_key_weak(value_changed, -1), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) }, - { be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Filter_X20pattern) }, - { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) }, - { be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) }, - { be_const_key_weak(JSON_NAME, 8), be_nested_str_weak() }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_init_closure) }, - { be_const_key_weak(pre_value, 12), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) }, - { be_const_key_weak(shadow_value, -1), be_const_var(2) }, { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) }, + { be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) }, + { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) }, + { be_const_key_weak(shadow_value, 19), be_const_var(2) }, + { be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_status_closure) }, + { be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) }, + { be_const_key_weak(pre_value, 7), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) }, + { be_const_key_weak(ARG_HINT, 14), be_nested_str_weak(Filter_X20pattern) }, + { be_const_key_weak(tasmota_sensor_filter, 6), be_const_var(0) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) }, + { be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) }, + { be_const_key_weak(parse_configuration, 20), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) }, + { be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) }, + { be_const_key_weak(ARG, 11), be_nested_str_weak(filter) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_web_values_prefix_closure) }, + { be_const_key_weak(filter_name_html, 16), be_const_closure(class_Matter_Plugin_Sensor_filter_name_html_closure) }, + { be_const_key_weak(PRESSURE_HPA, -1), be_nested_str_weak(hPa) }, + { be_const_key_weak(init, 5), be_const_closure(class_Matter_Plugin_Sensor_init_closure) }, + { be_const_key_weak(value_changed, 21), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) }, + { be_const_key_weak(pressure_unit, -1), be_const_var(4) }, + { be_const_key_weak(temp_unit, -1), be_const_var(3) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak() }, })), be_str_weak(Matter_Plugin_Sensor) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h index 9882dd40f..b0f63d3c8 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Contact.h @@ -6,195 +6,6 @@ extern const bclass be_class_Matter_Plugin_Sensor_Contact; -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_contact), - }), - 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: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X208), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_contact), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0044, // 0026 LDINT R6 69 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -263,6 +74,181 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_contact), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(VIRTUAL), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(cmd), + /* K6 */ be_nested_str_weak(Status_X2010), + /* K7 */ be_nested_str_weak(find), + /* K8 */ be_nested_str_weak(StatusSNS), + /* K9 */ be_nested_str_weak(contains), + /* K10 */ be_nested_str_weak(ON), + /* K11 */ be_nested_str_weak(shadow_contact), + /* K12 */ be_nested_str_weak(attribute_updated), + /* K13 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x88040101, // 0005 GETMBR R1 R0 K1 + 0x74060022, // 0006 JMPT R1 #002A + 0x60040008, // 0007 GETGBL R1 G8 + 0x88080103, // 0008 GETMBR R2 R0 K3 + 0x7C040200, // 0009 CALL R1 1 + 0x00060401, // 000A ADD R1 K2 R1 + 0xB80A0800, // 000B GETNGBL R2 K4 + 0x8C080505, // 000C GETMET R2 R2 K5 + 0x58100006, // 000D LDCONST R4 K6 + 0x50140200, // 000E LDBOOL R5 1 0 + 0x7C080600, // 000F CALL R2 3 + 0x4C0C0000, // 0010 LDNIL R3 + 0x200C0403, // 0011 NE R3 R2 R3 + 0x780E0003, // 0012 JMPF R3 #0017 + 0x8C0C0507, // 0013 GETMET R3 R2 K7 + 0x58140008, // 0014 LDCONST R5 K8 + 0x7C0C0400, // 0015 CALL R3 2 + 0x5C080600, // 0016 MOVE R2 R3 + 0x4C0C0000, // 0017 LDNIL R3 + 0x200C0403, // 0018 NE R3 R2 R3 + 0x780E000F, // 0019 JMPF R3 #002A + 0x8C0C0509, // 001A GETMET R3 R2 K9 + 0x5C140200, // 001B MOVE R5 R1 + 0x7C0C0400, // 001C CALL R3 2 + 0x780E000B, // 001D JMPF R3 #002A + 0x8C0C0507, // 001E GETMET R3 R2 K7 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0x1C0C070A, // 0021 EQ R3 R3 K10 + 0x8810010B, // 0022 GETMBR R4 R0 K11 + 0x20100803, // 0023 NE R4 R4 R3 + 0x78120003, // 0024 JMPF R4 #0029 + 0x8C10010C, // 0025 GETMET R4 R0 K12 + 0x541A0044, // 0026 LDINT R6 69 + 0x581C000D, // 0027 LDCONST R7 K13 + 0x7C100600, // 0028 CALL R4 3 + 0x90021603, // 0029 SETMBR R0 K11 R3 + 0x80000000, // 002A RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_virtual ********************************************************************/ @@ -309,6 +295,180 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Switch), + /* K2 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(ON), + /* K4 */ be_nested_str_weak(shadow_contact), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0017, // 0002 JMPF R3 #001B + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x8C100300, // 0004 GETMET R4 R1 K0 + 0x60180008, // 0005 GETGBL R6 G8 + 0x881C0102, // 0006 GETMBR R7 R0 K2 + 0x7C180200, // 0007 CALL R6 1 + 0x001A0206, // 0008 ADD R6 K1 R6 + 0x7C100400, // 0009 CALL R4 2 + 0x1C100903, // 000A EQ R4 R4 K3 + 0x5C0C0800, // 000B MOVE R3 R4 + 0x88100104, // 000C GETMBR R4 R0 K4 + 0x4C140000, // 000D LDNIL R5 + 0x20100805, // 000E NE R4 R4 R5 + 0x78120009, // 000F JMPF R4 #001A + 0x88100104, // 0010 GETMBR R4 R0 K4 + 0x60140017, // 0011 GETGBL R5 G23 + 0x5C180600, // 0012 MOVE R6 R3 + 0x7C140200, // 0013 CALL R5 1 + 0x20100805, // 0014 NE R4 R4 R5 + 0x78120003, // 0015 JMPF R4 #001A + 0x8C100105, // 0016 GETMET R4 R0 K5 + 0x541A0044, // 0017 LDINT R6 69 + 0x581C0006, // 0018 LDCONST R7 K6 + 0x7C100600, // 0019 CALL R4 3 + 0x90020803, // 001A SETMBR R0 K4 R3 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_contact), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Contact, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Contact ********************************************************************/ @@ -316,29 +476,31 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Contact, 2, &be_class_Matter_Plugin_Device, - be_nested_map(16, + be_nested_map(19, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(shadow_contact, -1), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_init_closure) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) }, - { be_const_key_weak(update_shadow, 15), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_shadow_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(21, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(parse_configuration, 7), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Contact), })) ) } )) }, - { be_const_key_weak(ARG, 6), be_nested_str_weak(switch) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) }, - { be_const_key_weak(tasmota_switch_index, 11), be_const_var(0) }, - { be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(21, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_shadow_closure) }, + { be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Contact) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_closure) }, + { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix_closure) }, + { be_const_key_weak(shadow_contact, 4), be_const_var(1) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) }, + { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_status_closure) }, + { be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -422,9 +584,10 @@ be_local_class(Matter_Plugin_Sensor_Contact, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(TYPE, 9), be_nested_str_weak(contact) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration_closure) }, + { be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_init_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Contact) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h index d74be2a22..9d3fe0e4d 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h @@ -6,241 +6,6 @@ extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ - be_nested_proto( - 10, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(val_onoff), - /* K1 */ be_nested_str_weak(_parse_update_virtual), - /* K2 */ be_nested_str_weak(Occupancy), - /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0x8C080101, // 0000 GETMET R2 R0 K1 - 0x5C100200, // 0001 MOVE R4 R1 - 0x58140002, // 0002 LDCONST R5 K2 - 0x88180100, // 0003 GETMBR R6 R0 K0 - 0x601C0017, // 0004 GETGBL R7 G23 - 0x54220405, // 0005 LDINT R8 1030 - 0x58240003, // 0006 LDCONST R9 K3 - 0x7C080E00, // 0007 CALL R2 7 - 0x90020002, // 0008 SETMBR R0 K0 R2 - 0x60080003, // 0009 GETGBL R2 G3 - 0x5C0C0000, // 000A MOVE R3 R0 - 0x7C080200, // 000B CALL R2 1 - 0x8C080504, // 000C GETMET R2 R2 K4 - 0x5C100200, // 000D MOVE R4 R1 - 0x7C080400, // 000E CALL R2 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_occupancy), - }), - 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: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X208), - /* K7 */ be_nested_str_weak(find), - /* K8 */ be_nested_str_weak(StatusSNS), - /* K9 */ be_nested_str_weak(contains), - /* K10 */ be_nested_str_weak(ON), - /* K11 */ be_nested_str_weak(shadow_occupancy), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(0), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[43]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060022, // 0006 JMPT R1 #002A - 0x60040008, // 0007 GETGBL R1 G8 - 0x88080103, // 0008 GETMBR R2 R0 K3 - 0x7C040200, // 0009 CALL R1 1 - 0x00060401, // 000A ADD R1 K2 R1 - 0xB80A0800, // 000B GETNGBL R2 K4 - 0x8C080505, // 000C GETMET R2 R2 K5 - 0x58100006, // 000D LDCONST R4 K6 - 0x50140200, // 000E LDBOOL R5 1 0 - 0x7C080600, // 000F CALL R2 3 - 0x4C0C0000, // 0010 LDNIL R3 - 0x200C0403, // 0011 NE R3 R2 R3 - 0x780E0003, // 0012 JMPF R3 #0017 - 0x8C0C0507, // 0013 GETMET R3 R2 K7 - 0x58140008, // 0014 LDCONST R5 K8 - 0x7C0C0400, // 0015 CALL R3 2 - 0x5C080600, // 0016 MOVE R2 R3 - 0x4C0C0000, // 0017 LDNIL R3 - 0x200C0403, // 0018 NE R3 R2 R3 - 0x780E000F, // 0019 JMPF R3 #002A - 0x8C0C0509, // 001A GETMET R3 R2 K9 - 0x5C140200, // 001B MOVE R5 R1 - 0x7C0C0400, // 001C CALL R3 2 - 0x780E000B, // 001D JMPF R3 #002A - 0x8C0C0507, // 001E GETMET R3 R2 K7 - 0x5C140200, // 001F MOVE R5 R1 - 0x7C0C0400, // 0020 CALL R3 2 - 0x1C0C070A, // 0021 EQ R3 R3 K10 - 0x8810010B, // 0022 GETMBR R4 R0 K11 - 0x20100803, // 0023 NE R4 R4 R3 - 0x78120003, // 0024 JMPF R4 #0029 - 0x8C10010C, // 0025 GETMET R4 R0 K12 - 0x541A0405, // 0026 LDINT R6 1030 - 0x581C000D, // 0027 LDCONST R7 K13 - 0x7C100600, // 0028 CALL R4 3 - 0x90021603, // 0029 SETMBR R0 K11 R3 - 0x80000000, // 002A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: read_attribute ********************************************************************/ @@ -328,6 +93,401 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name /*******************************************************************/ +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(shadow_occupancy), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[11]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x50100000, // 0008 LDBOOL R4 0 0 + 0x90020204, // 0009 SETMBR R0 K1 R4 + 0x80000000, // 000A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[14]) { /* constants */ + /* K0 */ be_nested_str_weak(update_shadow), + /* K1 */ be_nested_str_weak(VIRTUAL), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(cmd), + /* K6 */ be_nested_str_weak(Status_X2010), + /* K7 */ be_nested_str_weak(find), + /* K8 */ be_nested_str_weak(StatusSNS), + /* K9 */ be_nested_str_weak(contains), + /* K10 */ be_nested_str_weak(ON), + /* K11 */ be_nested_str_weak(shadow_occupancy), + /* K12 */ be_nested_str_weak(attribute_updated), + /* K13 */ be_const_int(0), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[43]) { /* code */ + 0x60040003, // 0000 GETGBL R1 G3 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x8C040300, // 0003 GETMET R1 R1 K0 + 0x7C040200, // 0004 CALL R1 1 + 0x88040101, // 0005 GETMBR R1 R0 K1 + 0x74060022, // 0006 JMPT R1 #002A + 0x60040008, // 0007 GETGBL R1 G8 + 0x88080103, // 0008 GETMBR R2 R0 K3 + 0x7C040200, // 0009 CALL R1 1 + 0x00060401, // 000A ADD R1 K2 R1 + 0xB80A0800, // 000B GETNGBL R2 K4 + 0x8C080505, // 000C GETMET R2 R2 K5 + 0x58100006, // 000D LDCONST R4 K6 + 0x50140200, // 000E LDBOOL R5 1 0 + 0x7C080600, // 000F CALL R2 3 + 0x4C0C0000, // 0010 LDNIL R3 + 0x200C0403, // 0011 NE R3 R2 R3 + 0x780E0003, // 0012 JMPF R3 #0017 + 0x8C0C0507, // 0013 GETMET R3 R2 K7 + 0x58140008, // 0014 LDCONST R5 K8 + 0x7C0C0400, // 0015 CALL R3 2 + 0x5C080600, // 0016 MOVE R2 R3 + 0x4C0C0000, // 0017 LDNIL R3 + 0x200C0403, // 0018 NE R3 R2 R3 + 0x780E000F, // 0019 JMPF R3 #002A + 0x8C0C0509, // 001A GETMET R3 R2 K9 + 0x5C140200, // 001B MOVE R5 R1 + 0x7C0C0400, // 001C CALL R3 2 + 0x780E000B, // 001D JMPF R3 #002A + 0x8C0C0507, // 001E GETMET R3 R2 K7 + 0x5C140200, // 001F MOVE R5 R1 + 0x7C0C0400, // 0020 CALL R3 2 + 0x1C0C070A, // 0021 EQ R3 R3 K10 + 0x8810010B, // 0022 GETMBR R4 R0 K11 + 0x20100803, // 0023 NE R4 R4 R3 + 0x78120003, // 0024 JMPF R4 #0029 + 0x8C10010C, // 0025 GETMET R4 R0 K12 + 0x541A0405, // 0026 LDINT R6 1030 + 0x581C000D, // 0027 LDCONST R7 K13 + 0x7C100600, // 0028 CALL R4 3 + 0x90021603, // 0029 SETMBR R0 K11 R3 + 0x80000000, // 002A RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */ + be_nested_proto( + 10, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(val_onoff), + /* K1 */ be_nested_str_weak(_parse_update_virtual), + /* K2 */ be_nested_str_weak(Occupancy), + /* K3 */ be_const_int(0), + /* K4 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0x8C080101, // 0000 GETMET R2 R0 K1 + 0x5C100200, // 0001 MOVE R4 R1 + 0x58140002, // 0002 LDCONST R5 K2 + 0x88180100, // 0003 GETMBR R6 R0 K0 + 0x601C0017, // 0004 GETGBL R7 G23 + 0x54220405, // 0005 LDINT R8 1030 + 0x58240003, // 0006 LDCONST R9 K3 + 0x7C080E00, // 0007 CALL R2 7 + 0x90020002, // 0008 SETMBR R0 K0 R2 + 0x60080003, // 0009 GETGBL R2 G3 + 0x5C0C0000, // 000A MOVE R3 R0 + 0x7C080200, // 000B CALL R2 1 + 0x8C080504, // 000C GETMET R2 R2 K4 + 0x5C100200, // 000D MOVE R4 R1 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Switch), + /* K2 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(ON), + /* K4 */ be_nested_str_weak(shadow_occupancy), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0017, // 0002 JMPF R3 #001B + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x8C100300, // 0004 GETMET R4 R1 K0 + 0x60180008, // 0005 GETGBL R6 G8 + 0x881C0102, // 0006 GETMBR R7 R0 K2 + 0x7C180200, // 0007 CALL R6 1 + 0x001A0206, // 0008 ADD R6 K1 R6 + 0x7C100400, // 0009 CALL R4 2 + 0x1C100903, // 000A EQ R4 R4 K3 + 0x5C0C0800, // 000B MOVE R3 R4 + 0x88100104, // 000C GETMBR R4 R0 K4 + 0x4C140000, // 000D LDNIL R5 + 0x20100805, // 000E NE R4 R4 R5 + 0x78120009, // 000F JMPF R4 #001A + 0x88100104, // 0010 GETMBR R4 R0 K4 + 0x60140017, // 0011 GETGBL R5 G23 + 0x5C180600, // 0012 MOVE R6 R3 + 0x7C140200, // 0013 CALL R5 1 + 0x20100805, // 0014 NE R4 R4 R5 + 0x78120003, // 0015 JMPF R4 #001A + 0x8C100105, // 0016 GETMET R4 R0 K5 + 0x541A0405, // 0017 LDINT R6 1030 + 0x581C0006, // 0018 LDCONST R7 K6 + 0x7C100600, // 0019 CALL R4 3 + 0x90020803, // 001A SETMBR R0 K4 R3 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Occupancy, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_occupancy), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Occupancy ********************************************************************/ @@ -335,18 +495,31 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Occupancy, 2, &be_class_Matter_Plugin_Device, - be_nested_map(16, + be_nested_map(19, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_init_closure) }, - { be_const_key_weak(tasmota_switch_index, 9), be_const_var(0) }, - { be_const_key_weak(update_shadow, 14), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) }, - { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(263, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Occupancy), + })) ) } )) }, { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Occupancy) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_closure) }, + { be_const_key_weak(parse_configuration, 4), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) }, + { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status_closure) }, + { be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -432,20 +605,10 @@ be_local_class(Matter_Plugin_Sensor_Occupancy, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(read_attribute, 4), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(263, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(1, - ( (struct bvalue*) &(const bvalue[]) { - be_nested_str_weak(Occupancy), - })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(occupancy) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) }, - { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, + { be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) }, + { be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_init_closure) }, })), be_str_weak(Matter_Plugin_Sensor_Occupancy) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h index 8934ec9f9..1d82ec3fa 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h @@ -54,7 +54,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow, /* name */ /* K3 */ be_nested_str_weak(tasmota_switch_index), /* K4 */ be_nested_str_weak(tasmota), /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X208), + /* K6 */ be_nested_str_weak(Status_X2010), /* K7 */ be_nested_str_weak(find), /* K8 */ be_nested_str_weak(StatusSNS), /* K9 */ be_nested_str_weak(contains), diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h index a69548646..2973b20d5 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h @@ -7,26 +7,56 @@ extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; /******************************************************************** -** Solidified function: +** Solidified function: read_attribute ********************************************************************/ -be_local_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E, /* name */ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute, /* name */ be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ + 12, /* nstack */ + 4, /* argc */ + 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 9]) { /* constants */ + /* K0 */ be_nested_str_weak(matter), + /* K1 */ be_nested_str_weak(TLV), + /* K2 */ be_nested_str_weak(cluster), + /* K3 */ be_nested_str_weak(attribute), + /* K4 */ be_const_int(0), + /* K5 */ be_nested_str_weak(set), + /* K6 */ be_nested_str_weak(BOOL), + /* K7 */ be_nested_str_weak(shadow_leak), + /* K8 */ be_nested_str_weak(read_attribute), + }), + be_str_weak(read_attribute), &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 + ( &(const binstruction[23]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140502, // 0002 GETMBR R5 R2 K2 + 0x88180503, // 0003 GETMBR R6 R2 K3 + 0x541E0044, // 0004 LDINT R7 69 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0006, // 0006 JMPF R7 #000E + 0x1C1C0D04, // 0007 EQ R7 R6 K4 + 0x781E0004, // 0008 JMPF R7 #000E + 0x8C1C0705, // 0009 GETMET R7 R3 K5 + 0x88240906, // 000A GETMBR R9 R4 K6 + 0x88280107, // 000B GETMBR R10 R0 K7 + 0x7C1C0600, // 000C CALL R7 3 + 0x80040E00, // 000D RET 1 R7 + 0x601C0003, // 000E GETGBL R7 G3 + 0x5C200000, // 000F MOVE R8 R0 + 0x7C1C0200, // 0010 CALL R7 1 + 0x8C1C0F08, // 0011 GETMET R7 R7 K8 + 0x5C240200, // 0012 MOVE R9 R1 + 0x5C280400, // 0013 MOVE R10 R2 + 0x5C2C0600, // 0014 MOVE R11 R3 + 0x7C1C0800, // 0015 CALL R7 4 + 0x80040E00, // 0016 RET 1 R7 }) ) ); @@ -71,6 +101,61 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_init, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values_prefix +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(get_name), + /* K2 */ be_nested_str_weak(Switch), + /* K3 */ be_nested_str_weak(tasmota_switch_index), + /* K4 */ be_nested_str_weak(content_send), + /* K5 */ be_nested_str_weak(PREFIX), + /* K6 */ be_nested_str_weak(html_escape), + /* K7 */ be_nested_str_weak(), + }), + be_str_weak(web_values_prefix), + &be_const_str_solidified, + ( &(const binstruction[22]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x5C0C0400, // 0003 MOVE R3 R2 + 0x740E0004, // 0004 JMPT R3 #000A + 0x600C0008, // 0005 GETGBL R3 G8 + 0x88100103, // 0006 GETMBR R4 R0 K3 + 0x7C0C0200, // 0007 CALL R3 1 + 0x000E0403, // 0008 ADD R3 K2 R3 + 0x5C080600, // 0009 MOVE R2 R3 + 0x8C0C0304, // 000A GETMET R3 R1 K4 + 0x60140018, // 000B GETGBL R5 G24 + 0x88180105, // 000C GETMBR R6 R0 K5 + 0x780A0003, // 000D JMPF R2 #0012 + 0x8C1C0306, // 000E GETMET R7 R1 K6 + 0x5C240400, // 000F MOVE R9 R2 + 0x7C1C0400, // 0010 CALL R7 2 + 0x70020000, // 0011 JMP #0013 + 0x581C0007, // 0012 LDCONST R7 K7 + 0x7C140400, // 0013 CALL R5 2 + 0x7C0C0400, // 0014 CALL R3 2 + 0x80000000, // 0015 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_shadow ********************************************************************/ @@ -92,7 +177,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow, /* name * /* K3 */ be_nested_str_weak(tasmota_switch_index), /* K4 */ be_nested_str_weak(tasmota), /* K5 */ be_nested_str_weak(cmd), - /* K6 */ be_nested_str_weak(Status_X208), + /* K6 */ be_nested_str_weak(Status_X2010), /* K7 */ be_nested_str_weak(find), /* K8 */ be_nested_str_weak(StatusSNS), /* K9 */ be_nested_str_weak(contains), @@ -153,116 +238,6 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow, /* name * /*******************************************************************/ -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_switch_index), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_const_int(1), - /* K4 */ be_const_int(0), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0301, // 0001 GETMET R3 R1 K1 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x58180003, // 0003 LDCONST R6 K3 - 0x7C0C0600, // 0004 CALL R3 3 - 0x7C080200, // 0005 CALL R2 1 - 0x90020002, // 0006 SETMBR R0 K0 R2 - 0x88080100, // 0007 GETMBR R2 R0 K0 - 0x18080504, // 0008 LE R2 R2 K4 - 0x780A0000, // 0009 JMPF R2 #000B - 0x90020103, // 000A SETMBR R0 K0 K3 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_leak), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0044, // 0004 LDINT R7 69 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0010, // 0006 JMPF R7 #0018 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E000E, // 0008 JMPF R7 #0018 - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0005, // 000C JMPF R7 #0013 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x88280105, // 000F GETMBR R10 R0 K5 - 0x7C1C0600, // 0010 CALL R7 3 - 0x80040E00, // 0011 RET 1 R7 - 0x70020004, // 0012 JMP #0018 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240908, // 0014 GETMBR R9 R4 K8 - 0x4C280000, // 0015 LDNIL R10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x601C0003, // 0018 GETGBL R7 G3 - 0x5C200000, // 0019 MOVE R8 R0 - 0x7C1C0200, // 001A CALL R7 1 - 0x8C1C0F09, // 001B GETMET R7 R7 K9 - 0x5C240200, // 001C MOVE R9 R1 - 0x5C280400, // 001D MOVE R10 R2 - 0x5C2C0600, // 001E MOVE R11 R3 - 0x7C1C0800, // 001F CALL R7 4 - 0x80040E00, // 0020 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: update_virtual ********************************************************************/ @@ -319,6 +294,180 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual, /* name /*******************************************************************/ +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(Switch), + /* K2 */ be_nested_str_weak(tasmota_switch_index), + /* K3 */ be_nested_str_weak(ON), + /* K4 */ be_nested_str_weak(shadow_leak), + /* K5 */ be_nested_str_weak(attribute_updated), + /* K6 */ be_const_int(0), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[28]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0017, // 0002 JMPF R3 #001B + 0x500C0000, // 0003 LDBOOL R3 0 0 + 0x8C100300, // 0004 GETMET R4 R1 K0 + 0x60180008, // 0005 GETGBL R6 G8 + 0x881C0102, // 0006 GETMBR R7 R0 K2 + 0x7C180200, // 0007 CALL R6 1 + 0x001A0206, // 0008 ADD R6 K1 R6 + 0x7C100400, // 0009 CALL R4 2 + 0x1C100903, // 000A EQ R4 R4 K3 + 0x5C0C0800, // 000B MOVE R3 R4 + 0x88100104, // 000C GETMBR R4 R0 K4 + 0x4C140000, // 000D LDNIL R5 + 0x20100805, // 000E NE R4 R4 R5 + 0x78120009, // 000F JMPF R4 #001A + 0x88100104, // 0010 GETMBR R4 R0 K4 + 0x60140017, // 0011 GETGBL R5 G23 + 0x5C180600, // 0012 MOVE R6 R3 + 0x7C140200, // 0013 CALL R5 1 + 0x20100805, // 0014 NE R4 R4 R5 + 0x78120003, // 0015 JMPF R4 #001A + 0x8C100105, // 0016 GETMET R4 R0 K5 + 0x541A0044, // 0017 LDINT R6 69 + 0x581C0006, // 0018 LDCONST R7 K6 + 0x7C100600, // 0019 CALL R4 3 + 0x90020803, // 001A SETMBR R0 K4 R3 + 0x80000000, // 001B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_configuration +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration, /* name */ + be_nested_proto( + 7, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(tasmota_switch_index), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(ARG), + /* K3 */ be_const_int(1), + /* K4 */ be_const_int(0), + }), + be_str_weak(parse_configuration), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0301, // 0001 GETMET R3 R1 K1 + 0x88140102, // 0002 GETMBR R5 R0 K2 + 0x58180003, // 0003 LDCONST R6 K3 + 0x7C0C0600, // 0004 CALL R3 3 + 0x7C080200, // 0005 CALL R2 1 + 0x90020002, // 0006 SETMBR R0 K0 R2 + 0x88080100, // 0007 GETMBR R2 R0 K0 + 0x18080504, // 0008 LE R2 R2 K4 + 0x780A0000, // 0009 JMPF R2 #000B + 0x90020103, // 000A SETMBR R0 K0 K3 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Waterleak, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s), + /* K4 */ be_nested_str_weak(tasmota_switch_index), + /* K5 */ be_nested_str_weak(web_value_onoff), + /* K6 */ be_nested_str_weak(shadow_leak), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[13]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x8C1C0105, // 0007 GETMET R7 R0 K5 + 0x88240106, // 0008 GETMBR R9 R0 K6 + 0x7C1C0400, // 0009 CALL R7 2 + 0x7C100600, // 000A CALL R4 3 + 0x7C080400, // 000B CALL R2 2 + 0x80000000, // 000C RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Waterleak ********************************************************************/ @@ -326,18 +475,31 @@ extern const bclass be_class_Matter_Plugin_Device; be_local_class(Matter_Plugin_Sensor_Waterleak, 2, &be_class_Matter_Plugin_Device, - be_nested_map(16, + be_nested_map(19, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(67, -1), be_const_int(1) }, + })) ) } )) }, + { be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) }, + { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(1, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Waterleak), + })) ) } )) }, { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_init_closure) }, - { be_const_key_weak(shadow_leak, 15), be_const_var(1) }, - { be_const_key_weak(update_shadow, 4), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) }, - { be_const_key_weak(ARG, 11), be_nested_str_weak(switch) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) }, - { be_const_key_weak(CLUSTERS, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(shadow_leak, 6), be_const_var(1) }, + { be_const_key_weak(web_values, 18), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_closure) }, + { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration_closure) }, + { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow_closure) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) }, + { be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status_closure) }, + { be_const_key_weak(ARG_HINT, 4), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, + { be_const_key_weak(ARG, 12), be_nested_str_weak(switch) }, + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -421,20 +583,10 @@ be_local_class(Matter_Plugin_Sensor_Waterleak, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(tasmota_switch_index, 9), be_const_var(0) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(1, - ( (struct bvalue*) &(const bvalue[]) { - be_nested_str_weak(Waterleak), - })) ) } )) }, - { be_const_key_weak(read_attribute, 14), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute_closure) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(waterleak) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(67, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration_closure) }, + { be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(waterleak) }, + { be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) }, })), be_str_weak(Matter_Plugin_Sensor_Waterleak) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Light0.h deleted file mode 100644 index fb95b30e9..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Light0.h +++ /dev/null @@ -1,574 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Light0.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Light0; - -/******************************************************************** -** Solidified function: set_onoff -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_set_onoff, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(call_remote_sync), - /* K1 */ be_nested_str_weak(Power), - /* K2 */ be_nested_str_weak(tasmota_relay_index), - /* K3 */ be_nested_str_weak(1), - /* K4 */ be_nested_str_weak(0), - /* K5 */ be_nested_str_weak(parse_update), - }), - be_str_weak(set_onoff), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x60100008, // 0001 GETGBL R4 G8 - 0x88140102, // 0002 GETMBR R5 R0 K2 - 0x7C100200, // 0003 CALL R4 1 - 0x00120204, // 0004 ADD R4 K1 R4 - 0x78060001, // 0005 JMPF R1 #0008 - 0x58140003, // 0006 LDCONST R5 K3 - 0x70020000, // 0007 JMP #0009 - 0x58140004, // 0008 LDCONST R5 K4 - 0x7C080600, // 0009 CALL R2 3 - 0x4C0C0000, // 000A LDNIL R3 - 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0003, // 000C JMPF R3 #0011 - 0x8C0C0105, // 000D GETMET R3 R0 K5 - 0x5C140400, // 000E MOVE R5 R2 - 0x541A000A, // 000F LDINT R6 11 - 0x7C0C0600, // 0010 CALL R3 3 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* 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(1), - /* K6 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* 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 - 0x60100009, // 000A GETGBL R4 G9 - 0x8C140703, // 000B GETMET R5 R3 K3 - 0x881C0104, // 000C GETMBR R7 R0 K4 - 0x58200005, // 000D LDCONST R8 K5 - 0x7C140600, // 000E CALL R5 3 - 0x7C100200, // 000F CALL R4 1 - 0x90020404, // 0010 SETMBR R0 K2 R4 - 0x88100102, // 0011 GETMBR R4 R0 K2 - 0x18100906, // 0012 LE R4 R4 K6 - 0x78120000, // 0013 JMPF R4 #0015 - 0x90020505, // 0014 SETMBR R0 K2 K5 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(shadow_onoff), - /* K9 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[25]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0005, // 0004 LDINT R7 6 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0008, // 0006 JMPF R7 #0010 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E0004, // 000A JMPF R7 #0010 - 0x8C1C0706, // 000B GETMET R7 R3 K6 - 0x88240907, // 000C GETMBR R9 R4 K7 - 0x88280108, // 000D GETMBR R10 R0 K8 - 0x7C1C0600, // 000E CALL R7 3 - 0x80040E00, // 000F RET 1 R7 - 0x601C0003, // 0010 GETGBL R7 G3 - 0x5C200000, // 0011 MOVE R8 R0 - 0x7C1C0200, // 0012 CALL R7 1 - 0x8C1C0F09, // 0013 GETMET R7 R7 K9 - 0x5C240200, // 0014 MOVE R9 R1 - 0x5C280400, // 0015 MOVE R10 R2 - 0x5C2C0600, // 0016 MOVE R11 R3 - 0x7C1C0800, // 0017 CALL R7 4 - 0x80040E00, // 0018 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Bridge_Light0__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_parse_update, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_relay_index), - /* K1 */ be_const_int(1), - /* K2 */ be_nested_str_weak(contains), - /* K3 */ be_nested_str_weak(POWER), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(ON), - /* K6 */ be_nested_str_weak(shadow_onoff), - /* K7 */ be_nested_str_weak(attribute_updated), - /* K8 */ be_const_int(0), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[41]) { /* code */ - 0x540E000A, // 0000 LDINT R3 11 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0024, // 0002 JMPF R3 #0028 - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x88100100, // 0004 GETMBR R4 R0 K0 - 0x1C100901, // 0005 EQ R4 R4 K1 - 0x78120009, // 0006 JMPF R4 #0011 - 0x8C100302, // 0007 GETMET R4 R1 K2 - 0x58180003, // 0008 LDCONST R6 K3 - 0x7C100400, // 0009 CALL R4 2 - 0x78120005, // 000A JMPF R4 #0011 - 0x8C100304, // 000B GETMET R4 R1 K4 - 0x58180003, // 000C LDCONST R6 K3 - 0x7C100400, // 000D CALL R4 2 - 0x1C100905, // 000E EQ R4 R4 K5 - 0x5C0C0800, // 000F MOVE R3 R4 - 0x70020007, // 0010 JMP #0019 - 0x8C100304, // 0011 GETMET R4 R1 K4 - 0x60180008, // 0012 GETGBL R6 G8 - 0x881C0100, // 0013 GETMBR R7 R0 K0 - 0x7C180200, // 0014 CALL R6 1 - 0x001A0606, // 0015 ADD R6 K3 R6 - 0x7C100400, // 0016 CALL R4 2 - 0x1C100905, // 0017 EQ R4 R4 K5 - 0x5C0C0800, // 0018 MOVE R3 R4 - 0x88100106, // 0019 GETMBR R4 R0 K6 - 0x4C140000, // 001A LDNIL R5 - 0x20100805, // 001B NE R4 R4 R5 - 0x78120009, // 001C JMPF R4 #0027 - 0x88100106, // 001D GETMBR R4 R0 K6 - 0x60140017, // 001E GETGBL R5 G23 - 0x5C180600, // 001F MOVE R6 R3 - 0x7C140200, // 0020 CALL R5 1 - 0x20100805, // 0021 NE R4 R4 R5 - 0x78120003, // 0022 JMPF R4 #0027 - 0x8C100107, // 0023 GETMET R4 R0 K7 - 0x541A0005, // 0024 LDINT R6 6 - 0x581C0008, // 0025 LDCONST R7 K8 - 0x7C100600, // 0026 CALL R4 3 - 0x90020C03, // 0027 SETMBR R0 K6 R3 - 0x80000000, // 0028 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_invoke_request, /* name */ - be_nested_proto( - 11, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(command), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(set_onoff), - /* K6 */ be_nested_str_weak(publish_command), - /* K7 */ be_nested_str_weak(Power), - /* 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[50]) { /* 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 - 0x781E0029, // 0006 JMPF R7 #0031 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0009, // 0008 JMPF R7 #0013 - 0x8C1C0105, // 0009 GETMET R7 R0 K5 - 0x50240000, // 000A LDBOOL R9 0 0 - 0x7C1C0400, // 000B CALL R7 2 - 0x8C1C0106, // 000C GETMET R7 R0 K6 - 0x58240007, // 000D LDCONST R9 K7 - 0x58280004, // 000E LDCONST R10 K4 - 0x7C1C0600, // 000F CALL R7 3 - 0x501C0200, // 0010 LDBOOL R7 1 0 - 0x80040E00, // 0011 RET 1 R7 - 0x7002001D, // 0012 JMP #0031 - 0x1C1C0D08, // 0013 EQ R7 R6 K8 - 0x781E0009, // 0014 JMPF R7 #001F - 0x8C1C0105, // 0015 GETMET R7 R0 K5 - 0x50240200, // 0016 LDBOOL R9 1 0 - 0x7C1C0400, // 0017 CALL R7 2 - 0x8C1C0106, // 0018 GETMET R7 R0 K6 - 0x58240007, // 0019 LDCONST R9 K7 - 0x58280008, // 001A LDCONST R10 K8 - 0x7C1C0600, // 001B CALL R7 3 - 0x501C0200, // 001C LDBOOL R7 1 0 - 0x80040E00, // 001D RET 1 R7 - 0x70020011, // 001E JMP #0031 - 0x1C1C0D09, // 001F EQ R7 R6 K9 - 0x781E000F, // 0020 JMPF R7 #0031 - 0x8C1C0105, // 0021 GETMET R7 R0 K5 - 0x8824010A, // 0022 GETMBR R9 R0 K10 - 0x78260000, // 0023 JMPF R9 #0025 - 0x50240001, // 0024 LDBOOL R9 0 1 - 0x50240200, // 0025 LDBOOL R9 1 0 - 0x7C1C0400, // 0026 CALL R7 2 - 0x8C1C0106, // 0027 GETMET R7 R0 K6 - 0x58240007, // 0028 LDCONST R9 K7 - 0x8828010A, // 0029 GETMBR R10 R0 K10 - 0x782A0001, // 002A JMPF R10 #002D - 0x58280008, // 002B LDCONST R10 K8 - 0x70020000, // 002C JMP #002E - 0x58280004, // 002D LDCONST R10 K4 - 0x7C1C0600, // 002E CALL R7 3 - 0x501C0200, // 002F LDBOOL R7 1 0 - 0x80040E00, // 0030 RET 1 R7 - 0x80000000, // 0031 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_web_values, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X25s), - /* K4 */ be_nested_str_weak(web_value_onoff), - /* K5 */ be_nested_str_weak(shadow_onoff), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x8C180104, // 0006 GETMET R6 R0 K4 - 0x88200105, // 0007 GETMBR R8 R0 K5 - 0x7C180400, // 0008 CALL R6 2 - 0x7C100400, // 0009 CALL R4 2 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_closure(class_Matter_Plugin_Bridge_Light0_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light0, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(Power), - /* K3 */ be_nested_str_weak(tasmota_relay_index), - /* K4 */ be_nested_str_weak(content_send), - /* K5 */ be_nested_str_weak(PREFIX), - /* K6 */ be_nested_str_weak(html_escape), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0004, // 0004 JMPT R3 #000A - 0x600C0008, // 0005 GETGBL R3 G8 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0403, // 0008 ADD R3 K2 R3 - 0x5C080600, // 0009 MOVE R2 R3 - 0x8C0C0304, // 000A GETMET R3 R1 K4 - 0x60140018, // 000B GETGBL R5 G24 - 0x88180105, // 000C GETMBR R6 R0 K5 - 0x780A0003, // 000D JMPF R2 #0012 - 0x8C1C0306, // 000E GETMET R7 R1 K6 - 0x5C240400, // 000F MOVE R9 R2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020000, // 0011 JMP #0013 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x7C140400, // 0013 CALL R5 2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Light0 -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Light0, - 2, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(shadow_onoff, 5), be_const_var(1) }, - { be_const_key_weak(tasmota_relay_index, 4), be_const_var(0) }, - { be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_set_onoff_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_init_closure) }, - { be_const_key_weak(web_values_prefix, 9), be_const_closure(class_Matter_Plugin_Bridge_Light0_web_values_prefix_closure) }, - { be_const_key_weak(web_values, 15), be_const_closure(class_Matter_Plugin_Bridge_Light0_web_values_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_parse_update_closure) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Power_X3Cx_X3E_X20number) }, - { be_const_key_weak(read_attribute, 12), be_const_closure(class_Matter_Plugin_Bridge_Light0_read_attribute_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_invoke_request_closure) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Light_X200_X20On) }, - { 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(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Bridge_Light0__X3Clambda_X3E_closure) }, - })), - be_str_weak(Matter_Plugin_Bridge_Light0) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h deleted file mode 100644 index 3263e3908..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h +++ /dev/null @@ -1,315 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Sensor.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; - -/******************************************************************** -** Solidified function: parse_configuration -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_parse_configuration, /* name */ - be_nested_proto( - 5, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 1, /* has constants */ - ( &(const bvalue[11]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_sensor_filter), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(ARG), - /* K3 */ be_nested_str_weak(tasmota_sensor_matcher), - /* K4 */ be_nested_str_weak(tasmota), - /* K5 */ be_nested_str_weak(Rule_Matcher), - /* K6 */ be_nested_str_weak(parse), - /* K7 */ be_nested_str_weak(temp_unit), - /* K8 */ be_nested_str_weak(TEMP_C), - /* K9 */ be_nested_str_weak(pressure_unit), - /* K10 */ be_nested_str_weak(PRESSURE_HPA), - }), - be_str_weak(parse_configuration), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x8C080301, // 0000 GETMET R2 R1 K1 - 0x88100102, // 0001 GETMBR R4 R0 K2 - 0x7C080400, // 0002 CALL R2 2 - 0x90020002, // 0003 SETMBR R0 K0 R2 - 0x88080100, // 0004 GETMBR R2 R0 K0 - 0x780A0005, // 0005 JMPF R2 #000C - 0xB80A0800, // 0006 GETNGBL R2 K4 - 0x88080505, // 0007 GETMBR R2 R2 K5 - 0x8C080506, // 0008 GETMET R2 R2 K6 - 0x88100100, // 0009 GETMBR R4 R0 K0 - 0x7C080400, // 000A CALL R2 2 - 0x90020602, // 000B SETMBR R0 K3 R2 - 0x88080108, // 000C GETMBR R2 R0 K8 - 0x90020E02, // 000D SETMBR R0 K7 R2 - 0x8808010A, // 000E GETMBR R2 R0 K10 - 0x90021202, // 000F SETMBR R0 K9 R2 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_value_changed, /* name */ - be_nested_proto( - 1, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 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: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(filter_name_html), - /* K3 */ be_nested_str_weak(content_send), - /* K4 */ be_nested_str_weak(PREFIX), - /* K5 */ be_nested_str_weak(html_escape), - /* K6 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0002, // 0004 JMPT R3 #0008 - 0x8C0C0102, // 0005 GETMET R3 R0 K2 - 0x7C0C0200, // 0006 CALL R3 1 - 0x5C080600, // 0007 MOVE R2 R3 - 0x8C0C0303, // 0008 GETMET R3 R1 K3 - 0x60140018, // 0009 GETGBL R5 G24 - 0x88180104, // 000A GETMBR R6 R0 K4 - 0x780A0003, // 000B JMPF R2 #0010 - 0x8C1C0305, // 000C GETMET R7 R1 K5 - 0x5C240400, // 000D MOVE R9 R2 - 0x7C1C0400, // 000E CALL R7 2 - 0x70020000, // 000F JMP #0011 - 0x581C0006, // 0010 LDCONST R7 K6 - 0x7C140400, // 0011 CALL R5 2 - 0x7C0C0400, // 0012 CALL R3 2 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_parse_update, /* name */ - be_nested_proto( - 9, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(contains), - /* K1 */ be_nested_str_weak(TempUnit), - /* K2 */ be_nested_str_weak(temp_unit), - /* K3 */ be_nested_str_weak(PressureUnit), - /* K4 */ be_nested_str_weak(pressure_unit), - /* K5 */ be_nested_str_weak(tasmota_sensor_matcher), - /* K6 */ be_nested_str_weak(pre_value), - /* K7 */ be_nested_str_weak(match), - /* K8 */ be_nested_str_weak(shadow_value), - /* K9 */ be_nested_str_weak(value_changed), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E001E, // 0002 JMPF R3 #0022 - 0x8C0C0300, // 0003 GETMET R3 R1 K0 - 0x58140001, // 0004 LDCONST R5 K1 - 0x7C0C0400, // 0005 CALL R3 2 - 0x780E0001, // 0006 JMPF R3 #0009 - 0x940C0301, // 0007 GETIDX R3 R1 K1 - 0x90020403, // 0008 SETMBR R0 K2 R3 - 0x8C0C0300, // 0009 GETMET R3 R1 K0 - 0x58140003, // 000A LDCONST R5 K3 - 0x7C0C0400, // 000B CALL R3 2 - 0x780E0001, // 000C JMPF R3 #000F - 0x940C0303, // 000D GETIDX R3 R1 K3 - 0x90020803, // 000E SETMBR R0 K4 R3 - 0x880C0105, // 000F GETMBR R3 R0 K5 - 0x780E0010, // 0010 JMPF R3 #0022 - 0x8C0C0106, // 0011 GETMET R3 R0 K6 - 0x6014000A, // 0012 GETGBL R5 G10 - 0x88180105, // 0013 GETMBR R6 R0 K5 - 0x8C180D07, // 0014 GETMET R6 R6 K7 - 0x5C200200, // 0015 MOVE R8 R1 - 0x7C180400, // 0016 CALL R6 2 - 0x7C140200, // 0017 CALL R5 1 - 0x7C0C0400, // 0018 CALL R3 2 - 0x4C100000, // 0019 LDNIL R4 - 0x20100604, // 001A NE R4 R3 R4 - 0x78120005, // 001B JMPF R4 #0022 - 0x88100108, // 001C GETMBR R4 R0 K8 - 0x20100604, // 001D NE R4 R3 R4 - 0x78120002, // 001E JMPF R4 #0022 - 0x8C100109, // 001F GETMET R4 R0 K9 - 0x7C100200, // 0020 CALL R4 1 - 0x90021003, // 0021 SETMBR R0 K8 R3 - 0x80000000, // 0022 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: filter_name_html -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_filter_name_html, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota_sensor_filter), - /* K1 */ be_nested_str_weak(string), - /* K2 */ be_nested_str_weak(webserver), - /* K3 */ be_nested_str_weak(html_escape), - /* K4 */ be_nested_str_weak(split), - /* K5 */ be_nested_str_weak(_X23), - /* K6 */ be_const_int(0), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(filter_name_html), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x78060009, // 0001 JMPF R1 #000C - 0xA4060200, // 0002 IMPORT R1 K1 - 0xA40A0400, // 0003 IMPORT R2 K2 - 0x8C0C0503, // 0004 GETMET R3 R2 K3 - 0x8C140304, // 0005 GETMET R5 R1 K4 - 0x881C0100, // 0006 GETMBR R7 R0 K0 - 0x58200005, // 0007 LDCONST R8 K5 - 0x7C140600, // 0008 CALL R5 3 - 0x94140B06, // 0009 GETIDX R5 R5 K6 - 0x7C0C0400, // 000A CALL R3 2 - 0x80040600, // 000B RET 1 R3 - 0x80060E00, // 000C RET 1 K7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_pre_value, /* name */ - be_nested_proto( - 2, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[ 1]) { /* code */ - 0x80040200, // 0000 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Sensor, - 5, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(22, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Filter_X20pattern) }, - { be_const_key_weak(shadow_value, -1), be_const_var(2) }, - { be_const_key_weak(pre_value, 10), be_const_closure(class_Matter_Plugin_Bridge_Sensor_pre_value_closure) }, - { be_const_key_weak(ARG_HTTP, -1), be_nested_str_weak(url) }, - { be_const_key_weak(pressure_unit, -1), be_const_var(4) }, - { be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(filter) }, - { be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) }, - { be_const_key_weak(value_changed, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_value_changed_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_parse_update_closure) }, - { be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) }, - { be_const_key_weak(temp_unit, 4), be_const_var(3) }, - { be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) }, - { be_const_key_weak(PRESSURE_HPA, 18), be_nested_str_weak(hPa) }, - { be_const_key_weak(PROBE_TIMEOUT, 16), be_const_int(1700) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_web_values_prefix_closure) }, - { be_const_key_weak(UPDATE_CMD, 13), be_nested_str_weak(Status_X208) }, - { be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) }, - { be_const_key_weak(filter_name_html, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_filter_name_html_closure) }, - { be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) }, - { be_const_key_weak(parse_configuration, 2), be_const_closure(class_Matter_Plugin_Bridge_Sensor_parse_configuration_closure) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h deleted file mode 100644 index fa6b7f956..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h +++ /dev/null @@ -1,404 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Sensor_Air_Quality.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Air_Quality' -extern bclosure *class_Matter_Plugin_Sensor_Air_Quality_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 1, /* has sup protos */ - ( &(const struct bproto*[ 2]) { - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(content_send), - /* K2 */ be_nested_str_weak(_X25s_X20_X25i_X20), - }), - be_str_weak(web_values_single), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0007, // 0002 JMPF R2 #000B - 0xA40A0000, // 0003 IMPORT R2 K0 - 0x8C0C0501, // 0004 GETMET R3 R2 K1 - 0x60140018, // 0005 GETGBL R5 G24 - 0x58180002, // 0006 LDCONST R6 K2 - 0x5C1C0000, // 0007 MOVE R7 R0 - 0x5C200200, // 0008 MOVE R8 R1 - 0x7C140600, // 0009 CALL R5 3 - 0x7C0C0400, // 000A CALL R3 2 - 0x80000000, // 000B RET 0 - }) - ), - &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, - }), - 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_weak(web_values_prefix), - /* K1 */ be_nested_str_weak(Air), - /* K2 */ be_nested_str_weak(shadow_air_quality), - /* K3 */ be_nested_str_weak(PM1), - /* K4 */ be_nested_str_weak(shadow_pm1), - /* K5 */ be_nested_str_weak(PM2_X2E5), - /* K6 */ be_nested_str_weak(shadow_pm2_5), - /* K7 */ be_nested_str_weak(PM10), - /* K8 */ be_nested_str_weak(shadow_pm10), - /* K9 */ be_nested_str_weak(CO2), - /* K10 */ be_nested_str_weak(shadow_co2), - /* K11 */ be_nested_str_weak(NO2), - /* K12 */ be_nested_str_weak(shadow_no2), - /* K13 */ be_nested_str_weak(TVOC), - /* K14 */ be_nested_str_weak(shadow_tvoc), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[32]) { /* code */ - 0x84040000, // 0000 CLOSURE R1 P0 - 0x8C080100, // 0001 GETMET R2 R0 K0 - 0x7C080200, // 0002 CALL R2 1 - 0x5C080200, // 0003 MOVE R2 R1 - 0x580C0001, // 0004 LDCONST R3 K1 - 0x88100102, // 0005 GETMBR R4 R0 K2 - 0x7C080400, // 0006 CALL R2 2 - 0x5C080200, // 0007 MOVE R2 R1 - 0x580C0003, // 0008 LDCONST R3 K3 - 0x88100104, // 0009 GETMBR R4 R0 K4 - 0x7C080400, // 000A CALL R2 2 - 0x5C080200, // 000B MOVE R2 R1 - 0x580C0005, // 000C LDCONST R3 K5 - 0x88100106, // 000D GETMBR R4 R0 K6 - 0x7C080400, // 000E CALL R2 2 - 0x5C080200, // 000F MOVE R2 R1 - 0x580C0007, // 0010 LDCONST R3 K7 - 0x88100108, // 0011 GETMBR R4 R0 K8 - 0x7C080400, // 0012 CALL R2 2 - 0x5C080200, // 0013 MOVE R2 R1 - 0x580C0009, // 0014 LDCONST R3 K9 - 0x8810010A, // 0015 GETMBR R4 R0 K10 - 0x7C080400, // 0016 CALL R2 2 - 0x5C080200, // 0017 MOVE R2 R1 - 0x580C000B, // 0018 LDCONST R3 K11 - 0x8810010C, // 0019 GETMBR R4 R0 K12 - 0x7C080400, // 001A CALL R2 2 - 0x5C080200, // 001B MOVE R2 R1 - 0x580C000D, // 001C LDCONST R3 K13 - 0x8810010E, // 001D GETMBR R4 R0 K14 - 0x7C080400, // 001E CALL R2 2 - 0x80000000, // 001F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(prefix), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(ARG), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x60100008, // 0008 GETGBL R4 G8 - 0x8C140702, // 0009 GETMET R5 R3 K2 - 0x881C0103, // 000A GETMBR R7 R0 K3 - 0x7C140400, // 000B CALL R5 2 - 0x7C100200, // 000C CALL R4 1 - 0x90020204, // 000D SETMBR R0 K1 R4 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update, /* name */ - be_nested_proto( - 6, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(prefix), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[ 7]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0002, // 0002 JMPF R3 #0006 - 0x8C0C0300, // 0003 GETMET R3 R1 K0 - 0x88140101, // 0004 GETMBR R5 R0 K1 - 0x7C0C0400, // 0005 CALL R3 2 - 0x80000000, // 0006 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Air_Quality -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Sensor_Air_Quality, - 8, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(20, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) }, - { be_const_key_weak(shadow_tvoc, 8), be_const_var(7) }, - { be_const_key_weak(shadow_pm10, 7), be_const_var(4) }, - { be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) }, - { be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Sensor_X20Model) }, - { be_const_key_weak(shadow_co2, -1), be_const_var(5) }, - { be_const_key_weak(parse_update, 18), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) }, - { be_const_key_weak(prefix, 13), 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(44, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values_closure) }, - { be_const_key_weak(shadow_pm1, 11), be_const_var(2) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_airquality) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(12, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(8), - be_const_int(9), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init_closure) }, - { be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) }, - { be_const_key_weak(shadow_no2, 4), be_const_var(6) }, - { be_const_key_weak(shadow_air_quality, -1), be_const_var(1) }, - { be_const_key_weak(ARG, 0), be_nested_str_weak(airquality) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Air_Quality) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h deleted file mode 100644 index 5f27166aa..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h +++ /dev/null @@ -1,431 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Sensor_Contact.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(tasmota_switch_index), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(ARG), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x60100009, // 0008 GETGBL R4 G9 - 0x8C140702, // 0009 GETMET R5 R3 K2 - 0x881C0103, // 000A GETMBR R7 R0 K3 - 0x58200004, // 000B LDCONST R8 K4 - 0x7C140600, // 000C CALL R5 3 - 0x7C100200, // 000D CALL R4 1 - 0x90020204, // 000E SETMBR R0 K1 R4 - 0x88100101, // 000F GETMBR R4 R0 K1 - 0x18100905, // 0010 LE R4 R4 K5 - 0x78120000, // 0011 JMPF R4 #0013 - 0x90020304, // 0012 SETMBR R0 K1 K4 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(content_send), - /* K5 */ be_nested_str_weak(PREFIX), - /* K6 */ be_nested_str_weak(html_escape), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0004, // 0004 JMPT R3 #000A - 0x600C0008, // 0005 GETGBL R3 G8 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0403, // 0008 ADD R3 K2 R3 - 0x5C080600, // 0009 MOVE R2 R3 - 0x8C0C0304, // 000A GETMET R3 R1 K4 - 0x60140018, // 000B GETGBL R5 G24 - 0x88180105, // 000C GETMBR R6 R0 K5 - 0x780A0003, // 000D JMPF R2 #0012 - 0x8C1C0306, // 000E GETMET R7 R1 K6 - 0x5C240400, // 000F MOVE R9 R2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020000, // 0011 JMP #0013 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x7C140400, // 0013 CALL R5 2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_parse_update, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Switch), - /* K2 */ be_nested_str_weak(tasmota_switch_index), - /* K3 */ be_nested_str_weak(ON), - /* K4 */ be_nested_str_weak(shadow_contact), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0017, // 0002 JMPF R3 #001B - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x8C100300, // 0004 GETMET R4 R1 K0 - 0x60180008, // 0005 GETGBL R6 G8 - 0x881C0102, // 0006 GETMBR R7 R0 K2 - 0x7C180200, // 0007 CALL R6 1 - 0x001A0206, // 0008 ADD R6 K1 R6 - 0x7C100400, // 0009 CALL R4 2 - 0x1C100903, // 000A EQ R4 R4 K3 - 0x5C0C0800, // 000B MOVE R3 R4 - 0x88100104, // 000C GETMBR R4 R0 K4 - 0x4C140000, // 000D LDNIL R5 - 0x20100805, // 000E NE R4 R4 R5 - 0x78120009, // 000F JMPF R4 #001A - 0x88100104, // 0010 GETMBR R4 R0 K4 - 0x60140017, // 0011 GETGBL R5 G23 - 0x5C180600, // 0012 MOVE R6 R3 - 0x7C140200, // 0013 CALL R5 1 - 0x20100805, // 0014 NE R4 R4 R5 - 0x78120003, // 0015 JMPF R4 #001A - 0x8C100105, // 0016 GETMET R4 R0 K5 - 0x541A0044, // 0017 LDINT R6 69 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020803, // 001A SETMBR R0 K4 R3 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_contact), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0044, // 0004 LDINT R7 69 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0010, // 0006 JMPF R7 #0018 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E000E, // 0008 JMPF R7 #0018 - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0005, // 000C JMPF R7 #0013 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x88280105, // 000F GETMBR R10 R0 K5 - 0x7C1C0600, // 0010 CALL R7 3 - 0x80040E00, // 0011 RET 1 R7 - 0x70020004, // 0012 JMP #0018 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240908, // 0014 GETMBR R9 R4 K8 - 0x4C280000, // 0015 LDNIL R10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x601C0003, // 0018 GETGBL R7 G3 - 0x5C200000, // 0019 MOVE R8 R0 - 0x7C1C0200, // 001A CALL R7 1 - 0x8C1C0F09, // 001B GETMET R7 R7 K9 - 0x5C240200, // 001C MOVE R9 R1 - 0x5C280400, // 001D MOVE R10 R2 - 0x5C2C0600, // 001E MOVE R11 R3 - 0x7C1C0800, // 001F CALL R7 4 - 0x80040E00, // 0020 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Contact, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_contact), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Contact -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Sensor_Contact, - 2, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, 4), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(shadow_contact, -1), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_init_closure) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_prefix_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(parse_update, 11), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_parse_update_closure) }, - { be_const_key_weak(read_attribute, 12), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_read_attribute_closure) }, - { be_const_key_weak(CLUSTERS, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(TYPES, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(21, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(TYPE, 6), be_nested_str_weak(http_contact) }, - { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) }, - { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Contact) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h deleted file mode 100644 index d4ff1c804..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h +++ /dev/null @@ -1,452 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Sensor_Occupancy.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 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 -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(tasmota_switch_index), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(ARG), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x60100009, // 0008 GETGBL R4 G9 - 0x8C140702, // 0009 GETMET R5 R3 K2 - 0x881C0103, // 000A GETMBR R7 R0 K3 - 0x58200004, // 000B LDCONST R8 K4 - 0x7C140600, // 000C CALL R5 3 - 0x7C100200, // 000D CALL R4 1 - 0x90020204, // 000E SETMBR R0 K1 R4 - 0x88100101, // 000F GETMBR R4 R0 K1 - 0x18100905, // 0010 LE R4 R4 K5 - 0x78120000, // 0011 JMPF R4 #0013 - 0x90020304, // 0012 SETMBR R0 K1 K4 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_parse_update, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Switch), - /* K2 */ be_nested_str_weak(tasmota_switch_index), - /* K3 */ be_nested_str_weak(ON), - /* K4 */ be_nested_str_weak(shadow_occupancy), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0017, // 0002 JMPF R3 #001B - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x8C100300, // 0004 GETMET R4 R1 K0 - 0x60180008, // 0005 GETGBL R6 G8 - 0x881C0102, // 0006 GETMBR R7 R0 K2 - 0x7C180200, // 0007 CALL R6 1 - 0x001A0206, // 0008 ADD R6 K1 R6 - 0x7C100400, // 0009 CALL R4 2 - 0x1C100903, // 000A EQ R4 R4 K3 - 0x5C0C0800, // 000B MOVE R3 R4 - 0x88100104, // 000C GETMBR R4 R0 K4 - 0x4C140000, // 000D LDNIL R5 - 0x20100805, // 000E NE R4 R4 R5 - 0x78120009, // 000F JMPF R4 #001A - 0x88100104, // 0010 GETMBR R4 R0 K4 - 0x60140017, // 0011 GETGBL R5 G23 - 0x5C180600, // 0012 MOVE R6 R3 - 0x7C140200, // 0013 CALL R5 1 - 0x20100805, // 0014 NE R4 R4 R5 - 0x78120003, // 0015 JMPF R4 #001A - 0x8C100105, // 0016 GETMET R4 R0 K5 - 0x541A0405, // 0017 LDINT R6 1030 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020803, // 001A SETMBR R0 K4 R3 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(content_send), - /* K5 */ be_nested_str_weak(PREFIX), - /* K6 */ be_nested_str_weak(html_escape), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0004, // 0004 JMPT R3 #000A - 0x600C0008, // 0005 GETGBL R3 G8 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0403, // 0008 ADD R3 K2 R3 - 0x5C080600, // 0009 MOVE R2 R3 - 0x8C0C0304, // 000A GETMET R3 R1 K4 - 0x60140018, // 000B GETGBL R5 G24 - 0x88180105, // 000C GETMBR R6 R0 K5 - 0x780A0003, // 000D JMPF R2 #0012 - 0x8C1C0306, // 000E GETMET R7 R1 K6 - 0x5C240400, // 000F MOVE R9 R2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020000, // 0011 JMP #0013 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x7C140400, // 0013 CALL R5 2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_occupancy), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(U1), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_const_int(1), - /* K10 */ be_const_int(3), - /* K11 */ be_const_int(2), - /* K12 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[49]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0405, // 0004 LDINT R7 1030 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0020, // 0006 JMPF R7 #0028 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E000F, // 0008 JMPF R7 #0019 - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0005, // 000C JMPF R7 #0013 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x88280105, // 000F GETMBR R10 R0 K5 - 0x7C1C0600, // 0010 CALL R7 3 - 0x80040E00, // 0011 RET 1 R7 - 0x70020004, // 0012 JMP #0018 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240908, // 0014 GETMBR R9 R4 K8 - 0x4C280000, // 0015 LDNIL R10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x7002000E, // 0018 JMP #0028 - 0x1C1C0D09, // 0019 EQ R7 R6 K9 - 0x781E0005, // 001A JMPF R7 #0021 - 0x8C1C0706, // 001B GETMET R7 R3 K6 - 0x88240907, // 001C GETMBR R9 R4 K7 - 0x5828000A, // 001D LDCONST R10 K10 - 0x7C1C0600, // 001E CALL R7 3 - 0x80040E00, // 001F RET 1 R7 - 0x70020006, // 0020 JMP #0028 - 0x1C1C0D0B, // 0021 EQ R7 R6 K11 - 0x781E0004, // 0022 JMPF R7 #0028 - 0x8C1C0706, // 0023 GETMET R7 R3 K6 - 0x88240907, // 0024 GETMBR R9 R4 K7 - 0x58280004, // 0025 LDCONST R10 K4 - 0x7C1C0600, // 0026 CALL R7 3 - 0x80040E00, // 0027 RET 1 R7 - 0x601C0003, // 0028 GETGBL R7 G3 - 0x5C200000, // 0029 MOVE R8 R0 - 0x7C1C0200, // 002A CALL R7 1 - 0x8C1C0F0C, // 002B GETMET R7 R7 K12 - 0x5C240200, // 002C MOVE R9 R1 - 0x5C280400, // 002D MOVE R10 R2 - 0x5C2C0600, // 002E MOVE R11 R3 - 0x7C1C0800, // 002F CALL R7 4 - 0x80040E00, // 0030 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Occupancy, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_occupancy), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Occupancy -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Sensor_Occupancy, - 2, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, 12), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(shadow_occupancy, -1), be_const_var(1) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_init_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) }, - { be_const_key_weak(TYPES, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(263, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(parse_update, 14), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_parse_update_closure) }, - { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1030, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_read_attribute_closure) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_prefix_closure) }, - { be_const_key_weak(TYPE, 5), be_nested_str_weak(http_occupancy) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(UPDATE_CMD, 2), be_nested_str_weak(Status_X208) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Occupancy) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h deleted file mode 100644 index 48d9a153b..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h +++ /dev/null @@ -1,431 +0,0 @@ -/* Solidification of Matter_Plugin_3_Bridge_Sensor_Waterleak.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; - -/******************************************************************** -** Solidified function: -********************************************************************/ -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak__X3Clambda_X3E, /* name */ - be_nested_proto( - 3, /* nstack */ - 1, /* argc */ - 0, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - NULL, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(_X3Clambda_X3E), - &be_const_str_solidified, - ( &(const binstruction[ 4]) { /* code */ - 0x60040009, // 0000 GETGBL R1 G9 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x80040200, // 0003 RET 1 R1 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values_prefix -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_prefix, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(get_name), - /* K2 */ be_nested_str_weak(Switch), - /* K3 */ be_nested_str_weak(tasmota_switch_index), - /* K4 */ be_nested_str_weak(content_send), - /* K5 */ be_nested_str_weak(PREFIX), - /* K6 */ be_nested_str_weak(html_escape), - /* K7 */ be_nested_str_weak(), - }), - be_str_weak(web_values_prefix), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x5C0C0400, // 0003 MOVE R3 R2 - 0x740E0004, // 0004 JMPT R3 #000A - 0x600C0008, // 0005 GETGBL R3 G8 - 0x88100103, // 0006 GETMBR R4 R0 K3 - 0x7C0C0200, // 0007 CALL R3 1 - 0x000E0403, // 0008 ADD R3 K2 R3 - 0x5C080600, // 0009 MOVE R2 R3 - 0x8C0C0304, // 000A GETMET R3 R1 K4 - 0x60140018, // 000B GETGBL R5 G24 - 0x88180105, // 000C GETMBR R6 R0 K5 - 0x780A0003, // 000D JMPF R2 #0012 - 0x8C1C0306, // 000E GETMET R7 R1 K6 - 0x5C240400, // 000F MOVE R9 R2 - 0x7C1C0400, // 0010 CALL R7 2 - 0x70020000, // 0011 JMP #0013 - 0x581C0007, // 0012 LDCONST R7 K7 - 0x7C140400, // 0013 CALL R5 2 - 0x7C0C0400, // 0014 CALL R3 2 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(tasmota_switch_index), - /* K2 */ be_nested_str_weak(find), - /* K3 */ be_nested_str_weak(ARG), - /* K4 */ be_const_int(1), - /* K5 */ be_const_int(0), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x60100009, // 0008 GETGBL R4 G9 - 0x8C140702, // 0009 GETMET R5 R3 K2 - 0x881C0103, // 000A GETMBR R7 R0 K3 - 0x58200004, // 000B LDCONST R8 K4 - 0x7C140600, // 000C CALL R5 3 - 0x7C100200, // 000D CALL R4 1 - 0x90020204, // 000E SETMBR R0 K1 R4 - 0x88100101, // 000F GETMBR R4 R0 K1 - 0x18100905, // 0010 LE R4 R4 K5 - 0x78120000, // 0011 JMPF R4 #0013 - 0x90020304, // 0012 SETMBR R0 K1 K4 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s), - /* K4 */ be_nested_str_weak(tasmota_switch_index), - /* K5 */ be_nested_str_weak(web_value_onoff), - /* K6 */ be_nested_str_weak(shadow_Waterleak), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x8C1C0105, // 0007 GETMET R7 R0 K5 - 0x88240106, // 0008 GETMBR R9 R0 K6 - 0x7C1C0400, // 0009 CALL R7 2 - 0x7C100600, // 000A CALL R4 3 - 0x7C080400, // 000B CALL R2 2 - 0x80000000, // 000C RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_parse_update, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(Switch), - /* K2 */ be_nested_str_weak(tasmota_switch_index), - /* K3 */ be_nested_str_weak(ON), - /* K4 */ be_nested_str_weak(shadow_Waterleak), - /* K5 */ be_nested_str_weak(attribute_updated), - /* K6 */ be_const_int(0), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x540E0007, // 0000 LDINT R3 8 - 0x1C0C0403, // 0001 EQ R3 R2 R3 - 0x780E0017, // 0002 JMPF R3 #001B - 0x500C0000, // 0003 LDBOOL R3 0 0 - 0x8C100300, // 0004 GETMET R4 R1 K0 - 0x60180008, // 0005 GETGBL R6 G8 - 0x881C0102, // 0006 GETMBR R7 R0 K2 - 0x7C180200, // 0007 CALL R6 1 - 0x001A0206, // 0008 ADD R6 K1 R6 - 0x7C100400, // 0009 CALL R4 2 - 0x1C100903, // 000A EQ R4 R4 K3 - 0x5C0C0800, // 000B MOVE R3 R4 - 0x88100104, // 000C GETMBR R4 R0 K4 - 0x4C140000, // 000D LDNIL R5 - 0x20100805, // 000E NE R4 R4 R5 - 0x78120009, // 000F JMPF R4 #001A - 0x88100104, // 0010 GETMBR R4 R0 K4 - 0x60140017, // 0011 GETGBL R5 G23 - 0x5C180600, // 0012 MOVE R6 R3 - 0x7C140200, // 0013 CALL R5 1 - 0x20100805, // 0014 NE R4 R4 R5 - 0x78120003, // 0015 JMPF R4 #001A - 0x8C100105, // 0016 GETMET R4 R0 K5 - 0x541A0044, // 0017 LDINT R6 69 - 0x581C0006, // 0018 LDCONST R7 K6 - 0x7C100600, // 0019 CALL R4 3 - 0x90020803, // 001A SETMBR R0 K4 R3 - 0x80000000, // 001B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Waterleak, - 1, /* has constants */ - ( &(const bvalue[10]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(shadow_Waterleak), - /* K6 */ be_nested_str_weak(set), - /* K7 */ be_nested_str_weak(BOOL), - /* K8 */ be_nested_str_weak(NULL), - /* K9 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[33]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0044, // 0004 LDINT R7 69 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0010, // 0006 JMPF R7 #0018 - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E000E, // 0008 JMPF R7 #0018 - 0x881C0105, // 0009 GETMBR R7 R0 K5 - 0x4C200000, // 000A LDNIL R8 - 0x201C0E08, // 000B NE R7 R7 R8 - 0x781E0005, // 000C JMPF R7 #0013 - 0x8C1C0706, // 000D GETMET R7 R3 K6 - 0x88240907, // 000E GETMBR R9 R4 K7 - 0x88280105, // 000F GETMBR R10 R0 K5 - 0x7C1C0600, // 0010 CALL R7 3 - 0x80040E00, // 0011 RET 1 R7 - 0x70020004, // 0012 JMP #0018 - 0x8C1C0706, // 0013 GETMET R7 R3 K6 - 0x88240908, // 0014 GETMBR R9 R4 K8 - 0x4C280000, // 0015 LDNIL R10 - 0x7C1C0600, // 0016 CALL R7 3 - 0x80040E00, // 0017 RET 1 R7 - 0x601C0003, // 0018 GETGBL R7 G3 - 0x5C200000, // 0019 MOVE R8 R0 - 0x7C1C0200, // 001A CALL R7 1 - 0x8C1C0F09, // 001B GETMET R7 R7 K9 - 0x5C240200, // 001C MOVE R9 R1 - 0x5C280400, // 001D MOVE R10 R2 - 0x5C2C0600, // 001E MOVE R11 R3 - 0x7C1C0800, // 001F CALL R7 4 - 0x80040E00, // 0020 RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Waterleak -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_HTTP; -be_local_class(Matter_Plugin_Bridge_Sensor_Waterleak, - 2, - &be_class_Matter_Plugin_Bridge_HTTP, - be_nested_map(16, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak__X3Clambda_X3E_closure) }, - { be_const_key_weak(ARG_HINT, 2), be_nested_str_weak(Switch_X3Cx_X3E_X20number) }, - { be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_prefix_closure) }, - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_init_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) }, - { be_const_key_weak(TYPES, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(67, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(ARG, -1), be_nested_str_weak(switch) }, - { be_const_key_weak(parse_update, 12), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_parse_update_closure) }, - { be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_read_attribute_closure) }, - { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, - { be_const_key_weak(TYPE, 5), be_nested_str_weak(http_waterleak) }, - { be_const_key_weak(shadow_Waterleak, -1), be_const_var(1) }, - { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Waterleak) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h index c69dec160..c6db3cd7e 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light2.h @@ -7,40 +7,81 @@ extern const bclass be_class_Matter_Plugin_Light2; /******************************************************************** -** Solidified function: init +** Solidified function: set_ct ********************************************************************/ extern const bclass be_class_Matter_Plugin_Light2; -be_local_closure(class_Matter_Plugin_Light2_init, /* name */ +be_local_closure(class_Matter_Plugin_Light2_set_ct, /* name */ be_nested_proto( - 9, /* nstack */ - 4, /* argc */ + 7, /* nstack */ + 2, /* argc */ 2, /* varg */ 0, /* has upvals */ NULL, /* no upvals */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light2, 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(shadow_ct), - /* K2 */ be_nested_str_weak(update_ct_minmax), + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(ct_min), + /* K1 */ be_nested_str_weak(ct_max), + /* K2 */ be_nested_str_weak(BRIDGE), + /* K3 */ be_nested_str_weak(call_remote_sync), + /* K4 */ be_nested_str_weak(CT), + /* K5 */ be_nested_str_weak(parse_status), + /* K6 */ be_nested_str_weak(VIRTUAL), + /* K7 */ be_nested_str_weak(shadow_ct), + /* K8 */ be_nested_str_weak(attribute_updated), + /* K9 */ be_nested_str_weak(light), + /* K10 */ be_nested_str_weak(set), + /* K11 */ be_nested_str_weak(ct), + /* K12 */ be_nested_str_weak(update_shadow), }), - be_str_weak(init), + be_str_weak(set_ct), &be_const_str_solidified, - ( &(const binstruction[13]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x54120144, // 0008 LDINT R4 325 - 0x90020204, // 0009 SETMBR R0 K1 R4 - 0x8C100102, // 000A GETMET R4 R0 K2 - 0x7C100200, // 000B CALL R4 1 - 0x80000000, // 000C RET 0 + ( &(const binstruction[44]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x14080202, // 0001 LT R2 R1 R2 + 0x780A0000, // 0002 JMPF R2 #0004 + 0x88040100, // 0003 GETMBR R1 R0 K0 + 0x88080101, // 0004 GETMBR R2 R0 K1 + 0x24080202, // 0005 GT R2 R1 R2 + 0x780A0000, // 0006 JMPF R2 #0008 + 0x88040101, // 0007 GETMBR R1 R0 K1 + 0x88080102, // 0008 GETMBR R2 R0 K2 + 0x780A000D, // 0009 JMPF R2 #0018 + 0x8C080103, // 000A GETMET R2 R0 K3 + 0x58100004, // 000B LDCONST R4 K4 + 0x60140008, // 000C GETGBL R5 G8 + 0x5C180200, // 000D MOVE R6 R1 + 0x7C140200, // 000E CALL R5 1 + 0x7C080600, // 000F CALL R2 3 + 0x4C0C0000, // 0010 LDNIL R3 + 0x200C0403, // 0011 NE R3 R2 R3 + 0x780E0003, // 0012 JMPF R3 #0017 + 0x8C0C0105, // 0013 GETMET R3 R0 K5 + 0x5C140400, // 0014 MOVE R5 R2 + 0x541A000A, // 0015 LDINT R6 11 + 0x7C0C0600, // 0016 CALL R3 3 + 0x70020012, // 0017 JMP #002B + 0x88080106, // 0018 GETMBR R2 R0 K6 + 0x780A0008, // 0019 JMPF R2 #0023 + 0x88080107, // 001A GETMBR R2 R0 K7 + 0x20080202, // 001B NE R2 R1 R2 + 0x780A0004, // 001C JMPF R2 #0022 + 0x8C080108, // 001D GETMET R2 R0 K8 + 0x541202FF, // 001E LDINT R4 768 + 0x54160006, // 001F LDINT R5 7 + 0x7C080600, // 0020 CALL R2 3 + 0x90020E01, // 0021 SETMBR R0 K7 R1 + 0x70020007, // 0022 JMP #002B + 0xA40A1200, // 0023 IMPORT R2 K9 + 0x8C0C050A, // 0024 GETMET R3 R2 K10 + 0x60140013, // 0025 GETGBL R5 G19 + 0x7C140000, // 0026 CALL R5 0 + 0x98161601, // 0027 SETIDX R5 K11 R1 + 0x7C0C0400, // 0028 CALL R3 2 + 0x8C0C010C, // 0029 GETMET R3 R0 K12 + 0x7C0C0200, // 002A CALL R3 1 + 0x80000000, // 002B RET 0 }) ) ); @@ -53,7 +94,7 @@ be_local_closure(class_Matter_Plugin_Light2_init, /* name */ extern const bclass be_class_Matter_Plugin_Light2; be_local_closure(class_Matter_Plugin_Light2_invoke_request, /* name */ be_nested_proto( - 13, /* nstack */ + 12, /* nstack */ 4, /* argc */ 2, /* varg */ 0, /* has upvals */ @@ -61,265 +102,92 @@ be_local_closure(class_Matter_Plugin_Light2_invoke_request, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light2, 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(light), - /* K1 */ be_nested_str_weak(matter), - /* K2 */ be_nested_str_weak(TLV), - /* K3 */ be_nested_str_weak(cluster), - /* K4 */ be_nested_str_weak(command), - /* K5 */ be_nested_str_weak(update_shadow_lazy), - /* K6 */ be_nested_str_weak(findsubval), - /* K7 */ be_const_int(0), - /* K8 */ be_nested_str_weak(set_ct), - /* K9 */ be_nested_str_weak(log), - /* K10 */ be_nested_str_weak(ct_X3A), - /* K11 */ be_nested_str_weak(publish_command), - /* K12 */ be_nested_str_weak(CT), - /* K13 */ be_nested_str_weak(invoke_request), + ( &(const bvalue[15]) { /* 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_nested_str_weak(findsubval), + /* K6 */ be_const_int(0), + /* K7 */ be_nested_str_weak(ct_min), + /* K8 */ be_nested_str_weak(ct_max), + /* K9 */ be_nested_str_weak(set_ct), + /* K10 */ be_nested_str_weak(log), + /* K11 */ be_nested_str_weak(ct_X3A), + /* K12 */ be_nested_str_weak(publish_command), + /* K13 */ be_nested_str_weak(CT), + /* K14 */ be_nested_str_weak(invoke_request), }), be_str_weak(invoke_request), &be_const_str_solidified, - ( &(const binstruction[59]) { /* code */ - 0xA4120000, // 0000 IMPORT R4 K0 - 0xB8160200, // 0001 GETNGBL R5 K1 - 0x88140B02, // 0002 GETMBR R5 R5 K2 + ( &(const binstruction[66]) { /* code */ + 0xB8120000, // 0000 GETNGBL R4 K0 + 0x88100901, // 0001 GETMBR R4 R4 K1 + 0x88140702, // 0002 GETMBR R5 R3 K2 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x881C0704, // 0004 GETMBR R7 R3 K4 - 0x542202FF, // 0005 LDINT R8 768 - 0x1C200C08, // 0006 EQ R8 R6 R8 - 0x78220028, // 0007 JMPF R8 #0031 - 0x8C200105, // 0008 GETMET R8 R0 K5 - 0x7C200200, // 0009 CALL R8 1 - 0x54220009, // 000A LDINT R8 10 - 0x1C200E08, // 000B EQ R8 R7 R8 - 0x78220011, // 000C JMPF R8 #001F - 0x8C200506, // 000D GETMET R8 R2 K6 - 0x58280007, // 000E LDCONST R10 K7 - 0x7C200400, // 000F CALL R8 2 - 0x8C240108, // 0010 GETMET R9 R0 K8 - 0x5C2C1000, // 0011 MOVE R11 R8 - 0x7C240400, // 0012 CALL R9 2 - 0x60240008, // 0013 GETGBL R9 G8 - 0x5C281000, // 0014 MOVE R10 R8 - 0x7C240200, // 0015 CALL R9 1 - 0x00261409, // 0016 ADD R9 K10 R9 - 0x900E1209, // 0017 SETMBR R3 K9 R9 - 0x8C24010B, // 0018 GETMET R9 R0 K11 - 0x582C000C, // 0019 LDCONST R11 K12 - 0x5C301000, // 001A MOVE R12 R8 - 0x7C240600, // 001B CALL R9 3 - 0x50240200, // 001C LDBOOL R9 1 0 - 0x80041200, // 001D RET 1 R9 - 0x70020010, // 001E JMP #0030 - 0x54220046, // 001F LDINT R8 71 - 0x1C200E08, // 0020 EQ R8 R7 R8 - 0x78220002, // 0021 JMPF R8 #0025 - 0x50200200, // 0022 LDBOOL R8 1 0 - 0x80041000, // 0023 RET 1 R8 - 0x7002000A, // 0024 JMP #0030 - 0x5422004A, // 0025 LDINT R8 75 - 0x1C200E08, // 0026 EQ R8 R7 R8 - 0x78220002, // 0027 JMPF R8 #002B - 0x50200200, // 0028 LDBOOL R8 1 0 - 0x80041000, // 0029 RET 1 R8 - 0x70020004, // 002A JMP #0030 - 0x5422004B, // 002B LDINT R8 76 - 0x1C200E08, // 002C EQ R8 R7 R8 - 0x78220001, // 002D JMPF R8 #0030 - 0x50200200, // 002E LDBOOL R8 1 0 - 0x80041000, // 002F RET 1 R8 - 0x70020008, // 0030 JMP #003A - 0x60200003, // 0031 GETGBL R8 G3 - 0x5C240000, // 0032 MOVE R9 R0 - 0x7C200200, // 0033 CALL R8 1 - 0x8C20110D, // 0034 GETMET R8 R8 K13 - 0x5C280200, // 0035 MOVE R10 R1 - 0x5C2C0400, // 0036 MOVE R11 R2 - 0x5C300600, // 0037 MOVE R12 R3 - 0x7C200800, // 0038 CALL R8 4 - 0x80041000, // 0039 RET 1 R8 - 0x80000000, // 003A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_shadow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light2; -be_local_closure(class_Matter_Plugin_Light2_update_shadow, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light2, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(VIRTUAL), - /* K1 */ be_nested_str_weak(light), - /* K2 */ be_nested_str_weak(update_ct_minmax), - /* K3 */ be_nested_str_weak(update_shadow), - /* K4 */ be_nested_str_weak(get), - /* K5 */ be_nested_str_weak(find), - /* K6 */ be_nested_str_weak(ct), - /* K7 */ be_nested_str_weak(shadow_ct), - /* K8 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(update_shadow), - &be_const_str_solidified, - ( &(const binstruction[38]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x7406001D, // 0001 JMPT R1 #0020 - 0xA4060200, // 0002 IMPORT R1 K1 - 0x8C080102, // 0003 GETMET R2 R0 K2 - 0x7C080200, // 0004 CALL R2 1 - 0x60080003, // 0005 GETGBL R2 G3 - 0x5C0C0000, // 0006 MOVE R3 R0 - 0x7C080200, // 0007 CALL R2 1 - 0x8C080503, // 0008 GETMET R2 R2 K3 - 0x7C080200, // 0009 CALL R2 1 - 0x8C080304, // 000A GETMET R2 R1 K4 - 0x7C080200, // 000B CALL R2 1 - 0x4C0C0000, // 000C LDNIL R3 - 0x200C0403, // 000D NE R3 R2 R3 - 0x780E000F, // 000E JMPF R3 #001F - 0x8C0C0505, // 000F GETMET R3 R2 K5 - 0x58140006, // 0010 LDCONST R5 K6 - 0x4C180000, // 0011 LDNIL R6 - 0x7C0C0600, // 0012 CALL R3 3 - 0x4C100000, // 0013 LDNIL R4 - 0x1C100604, // 0014 EQ R4 R3 R4 - 0x78120000, // 0015 JMPF R4 #0017 - 0x880C0107, // 0016 GETMBR R3 R0 K7 - 0x88100107, // 0017 GETMBR R4 R0 K7 - 0x20100604, // 0018 NE R4 R3 R4 - 0x78120004, // 0019 JMPF R4 #001F - 0x8C100108, // 001A GETMET R4 R0 K8 - 0x541A02FF, // 001B LDINT R6 768 - 0x541E0006, // 001C LDINT R7 7 - 0x7C100600, // 001D CALL R4 3 - 0x90020E03, // 001E SETMBR R0 K7 R3 - 0x70020004, // 001F JMP #0025 - 0x60040003, // 0020 GETGBL R1 G3 - 0x5C080000, // 0021 MOVE R2 R0 - 0x7C040200, // 0022 CALL R1 1 - 0x8C040303, // 0023 GETMET R1 R1 K3 - 0x7C040200, // 0024 CALL R1 1 - 0x80000000, // 0025 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: update_virtual -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light2; -be_local_closure(class_Matter_Plugin_Light2_update_virtual, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light2, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(find), - /* K1 */ be_nested_str_weak(CT), - /* K2 */ be_nested_str_weak(set_ct), - /* K3 */ be_nested_str_weak(update_virtual), - }), - be_str_weak(update_virtual), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x60080009, // 0000 GETGBL R2 G9 - 0x8C0C0300, // 0001 GETMET R3 R1 K0 - 0x58140001, // 0002 LDCONST R5 K1 - 0x7C0C0400, // 0003 CALL R3 2 - 0x7C080200, // 0004 CALL R2 1 - 0x4C0C0000, // 0005 LDNIL R3 - 0x200C0403, // 0006 NE R3 R2 R3 - 0x780E0002, // 0007 JMPF R3 #000B - 0x8C0C0102, // 0008 GETMET R3 R0 K2 - 0x5C140400, // 0009 MOVE R5 R2 - 0x7C0C0400, // 000A CALL R3 2 - 0x600C0003, // 000B GETGBL R3 G3 - 0x5C100000, // 000C MOVE R4 R0 - 0x7C0C0200, // 000D CALL R3 1 - 0x8C0C0703, // 000E GETMET R3 R3 K3 - 0x5C140200, // 000F MOVE R5 R1 - 0x7C0C0400, // 0010 CALL R3 2 - 0x80000000, // 0011 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_ct -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light2; -be_local_closure(class_Matter_Plugin_Light2_set_ct, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light2, - 1, /* has constants */ - ( &(const bvalue[ 9]) { /* constants */ - /* K0 */ be_nested_str_weak(ct_min), - /* K1 */ be_nested_str_weak(ct_max), - /* K2 */ be_nested_str_weak(VIRTUAL), - /* K3 */ be_nested_str_weak(light), - /* K4 */ be_nested_str_weak(set), - /* K5 */ be_nested_str_weak(ct), - /* K6 */ be_nested_str_weak(update_shadow), - /* K7 */ be_nested_str_weak(shadow_ct), - /* K8 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(set_ct), - &be_const_str_solidified, - ( &(const binstruction[28]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x14080202, // 0001 LT R2 R1 R2 - 0x780A0000, // 0002 JMPF R2 #0004 - 0x88040100, // 0003 GETMBR R1 R0 K0 - 0x88080101, // 0004 GETMBR R2 R0 K1 - 0x24080202, // 0005 GT R2 R1 R2 - 0x780A0000, // 0006 JMPF R2 #0008 - 0x88040101, // 0007 GETMBR R1 R0 K1 - 0x88080102, // 0008 GETMBR R2 R0 K2 - 0x740A0008, // 0009 JMPT R2 #0013 - 0xA40A0600, // 000A IMPORT R2 K3 - 0x8C0C0504, // 000B GETMET R3 R2 K4 - 0x60140013, // 000C GETGBL R5 G19 - 0x7C140000, // 000D CALL R5 0 - 0x98160A01, // 000E SETIDX R5 K5 R1 - 0x7C0C0400, // 000F CALL R3 2 - 0x8C0C0106, // 0010 GETMET R3 R0 K6 - 0x7C0C0200, // 0011 CALL R3 1 - 0x70020007, // 0012 JMP #001B - 0x88080107, // 0013 GETMBR R2 R0 K7 - 0x20080202, // 0014 NE R2 R1 R2 - 0x780A0004, // 0015 JMPF R2 #001B - 0x8C080108, // 0016 GETMET R2 R0 K8 - 0x541202FF, // 0017 LDINT R4 768 - 0x54160006, // 0018 LDINT R5 7 - 0x7C080600, // 0019 CALL R2 3 - 0x90020E01, // 001A SETMBR R0 K7 R1 - 0x80000000, // 001B RET 0 + 0x541E02FF, // 0004 LDINT R7 768 + 0x1C1C0A07, // 0005 EQ R7 R5 R7 + 0x781E0030, // 0006 JMPF R7 #0038 + 0x8C1C0104, // 0007 GETMET R7 R0 K4 + 0x7C1C0200, // 0008 CALL R7 1 + 0x541E0009, // 0009 LDINT R7 10 + 0x1C1C0C07, // 000A EQ R7 R6 R7 + 0x781E0019, // 000B JMPF R7 #0026 + 0x8C1C0505, // 000C GETMET R7 R2 K5 + 0x58240006, // 000D LDCONST R9 K6 + 0x7C1C0400, // 000E CALL R7 2 + 0x88200107, // 000F GETMBR R8 R0 K7 + 0x14200E08, // 0010 LT R8 R7 R8 + 0x78220000, // 0011 JMPF R8 #0013 + 0x881C0107, // 0012 GETMBR R7 R0 K7 + 0x88200108, // 0013 GETMBR R8 R0 K8 + 0x24200E08, // 0014 GT R8 R7 R8 + 0x78220000, // 0015 JMPF R8 #0017 + 0x881C0108, // 0016 GETMBR R7 R0 K8 + 0x8C200109, // 0017 GETMET R8 R0 K9 + 0x5C280E00, // 0018 MOVE R10 R7 + 0x7C200400, // 0019 CALL R8 2 + 0x60200008, // 001A GETGBL R8 G8 + 0x5C240E00, // 001B MOVE R9 R7 + 0x7C200200, // 001C CALL R8 1 + 0x00221608, // 001D ADD R8 K11 R8 + 0x900E1408, // 001E SETMBR R3 K10 R8 + 0x8C20010C, // 001F GETMET R8 R0 K12 + 0x5828000D, // 0020 LDCONST R10 K13 + 0x5C2C0E00, // 0021 MOVE R11 R7 + 0x7C200600, // 0022 CALL R8 3 + 0x50200200, // 0023 LDBOOL R8 1 0 + 0x80041000, // 0024 RET 1 R8 + 0x70020010, // 0025 JMP #0037 + 0x541E0046, // 0026 LDINT R7 71 + 0x1C1C0C07, // 0027 EQ R7 R6 R7 + 0x781E0002, // 0028 JMPF R7 #002C + 0x501C0200, // 0029 LDBOOL R7 1 0 + 0x80040E00, // 002A RET 1 R7 + 0x7002000A, // 002B JMP #0037 + 0x541E004A, // 002C LDINT R7 75 + 0x1C1C0C07, // 002D EQ R7 R6 R7 + 0x781E0002, // 002E JMPF R7 #0032 + 0x501C0200, // 002F LDBOOL R7 1 0 + 0x80040E00, // 0030 RET 1 R7 + 0x70020004, // 0031 JMP #0037 + 0x541E004B, // 0032 LDINT R7 76 + 0x1C1C0C07, // 0033 EQ R7 R6 R7 + 0x781E0001, // 0034 JMPF R7 #0037 + 0x501C0200, // 0035 LDBOOL R7 1 0 + 0x80040E00, // 0036 RET 1 R7 + 0x70020008, // 0037 JMP #0041 + 0x601C0003, // 0038 GETGBL R7 G3 + 0x5C200000, // 0039 MOVE R8 R0 + 0x7C1C0200, // 003A CALL R7 1 + 0x8C1C0F0E, // 003B GETMET R7 R7 K14 + 0x5C240200, // 003C MOVE R9 R1 + 0x5C280400, // 003D MOVE R10 R2 + 0x5C2C0600, // 003E MOVE R11 R3 + 0x7C1C0800, // 003F CALL R7 4 + 0x80040E00, // 0040 RET 1 R7 + 0x80000000, // 0041 RET 0 }) ) ); @@ -437,6 +305,53 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: update_virtual +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_update_virtual, /* name */ + be_nested_proto( + 6, /* nstack */ + 2, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(CT), + /* K2 */ be_nested_str_weak(set_ct), + /* K3 */ be_nested_str_weak(update_virtual), + }), + be_str_weak(update_virtual), + &be_const_str_solidified, + ( &(const binstruction[18]) { /* code */ + 0x60080009, // 0000 GETGBL R2 G9 + 0x8C0C0300, // 0001 GETMET R3 R1 K0 + 0x58140001, // 0002 LDCONST R5 K1 + 0x7C0C0400, // 0003 CALL R3 2 + 0x7C080200, // 0004 CALL R2 1 + 0x4C0C0000, // 0005 LDNIL R3 + 0x200C0403, // 0006 NE R3 R2 R3 + 0x780E0002, // 0007 JMPF R3 #000B + 0x8C0C0102, // 0008 GETMET R3 R0 K2 + 0x5C140400, // 0009 MOVE R5 R2 + 0x7C0C0400, // 000A CALL R3 2 + 0x600C0003, // 000B GETGBL R3 G3 + 0x5C100000, // 000C MOVE R4 R0 + 0x7C0C0200, // 000D CALL R3 1 + 0x8C0C0703, // 000E GETMET R3 R3 K3 + 0x5C140200, // 000F MOVE R5 R1 + 0x7C0C0400, // 0010 CALL R3 2 + 0x80000000, // 0011 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified function: update_ct_minmax ********************************************************************/ @@ -481,6 +396,291 @@ be_local_closure(class_Matter_Plugin_Light2_update_ct_minmax, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: init +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_init, /* name */ + be_nested_proto( + 9, /* nstack */ + 4, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[ 4]) { /* constants */ + /* K0 */ be_nested_str_weak(init), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(shadow_ct), + /* K3 */ be_nested_str_weak(update_ct_minmax), + }), + be_str_weak(init), + &be_const_str_solidified, + ( &(const binstruction[15]) { /* code */ + 0x60100003, // 0000 GETGBL R4 G3 + 0x5C140000, // 0001 MOVE R5 R0 + 0x7C100200, // 0002 CALL R4 1 + 0x8C100900, // 0003 GETMET R4 R4 K0 + 0x5C180200, // 0004 MOVE R6 R1 + 0x5C1C0400, // 0005 MOVE R7 R2 + 0x5C200600, // 0006 MOVE R8 R3 + 0x7C100800, // 0007 CALL R4 4 + 0x88100101, // 0008 GETMBR R4 R0 K1 + 0x74120001, // 0009 JMPT R4 #000C + 0x54120144, // 000A LDINT R4 325 + 0x90020404, // 000B SETMBR R0 K2 R4 + 0x8C100103, // 000C GETMET R4 R0 K3 + 0x7C100200, // 000D CALL R4 1 + 0x80000000, // 000E RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), + /* K4 */ be_nested_str_weak(web_value_onoff), + /* K5 */ be_nested_str_weak(shadow_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + /* K7 */ be_nested_str_weak(web_value_ct), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x8C180104, // 0006 GETMET R6 R0 K4 + 0x88200105, // 0007 GETMBR R8 R0 K5 + 0x7C180400, // 0008 CALL R6 2 + 0x8C1C0106, // 0009 GETMET R7 R0 K6 + 0x7C1C0200, // 000A CALL R7 1 + 0x8C200107, // 000B GETMET R8 R0 K7 + 0x7C200200, // 000C CALL R8 1 + 0x7C100800, // 000D CALL R4 4 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_parse_status, /* name */ + be_nested_proto( + 8, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(CT), + /* K3 */ be_nested_str_weak(shadow_ct), + /* K4 */ be_nested_str_weak(ct_min), + /* K5 */ be_nested_str_weak(ct_max), + /* K6 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[35]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E0017, // 0009 JMPF R3 #0022 + 0x600C0009, // 000A GETGBL R3 G9 + 0x8C100301, // 000B GETMET R4 R1 K1 + 0x58180002, // 000C LDCONST R6 K2 + 0x7C100400, // 000D CALL R4 2 + 0x7C0C0200, // 000E CALL R3 1 + 0x4C100000, // 000F LDNIL R4 + 0x20100604, // 0010 NE R4 R3 R4 + 0x7812000F, // 0011 JMPF R4 #0022 + 0x88100103, // 0012 GETMBR R4 R0 K3 + 0x20100604, // 0013 NE R4 R3 R4 + 0x7812000C, // 0014 JMPF R4 #0022 + 0x88100104, // 0015 GETMBR R4 R0 K4 + 0x14100604, // 0016 LT R4 R3 R4 + 0x78120000, // 0017 JMPF R4 #0019 + 0x880C0104, // 0018 GETMBR R3 R0 K4 + 0x88100105, // 0019 GETMBR R4 R0 K5 + 0x24100604, // 001A GT R4 R3 R4 + 0x78120000, // 001B JMPF R4 #001D + 0x880C0105, // 001C GETMBR R3 R0 K5 + 0x8C100106, // 001D GETMET R4 R0 K6 + 0x541A02FF, // 001E LDINT R6 768 + 0x541E0006, // 001F LDINT R7 7 + 0x7C100600, // 0020 CALL R4 3 + 0x90020603, // 0021 SETMBR R0 K3 R3 + 0x80000000, // 0022 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_ct +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_web_value_ct, /* name */ + be_nested_proto( + 6, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(), + /* K1 */ be_nested_str_weak(shadow_ct), + /* K2 */ be_const_int(1000000), + /* K3 */ be_nested_str_weak(_X25iK), + /* K4 */ be_nested_str_weak(_X26_X239898_X3B_X20), + }), + be_str_weak(web_value_ct), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0x58040000, // 0000 LDCONST R1 K0 + 0x88080101, // 0001 GETMBR R2 R0 K1 + 0x4C0C0000, // 0002 LDNIL R3 + 0x20080403, // 0003 NE R2 R2 R3 + 0x780A000C, // 0004 JMPF R2 #0012 + 0x88080101, // 0005 GETMBR R2 R0 K1 + 0x0C0A0402, // 0006 DIV R2 K2 R2 + 0x540E0018, // 0007 LDINT R3 25 + 0x00080403, // 0008 ADD R2 R2 R3 + 0x540E0031, // 0009 LDINT R3 50 + 0x0C080403, // 000A DIV R2 R2 R3 + 0x540E0031, // 000B LDINT R3 50 + 0x08080403, // 000C MUL R2 R2 R3 + 0x600C0018, // 000D GETGBL R3 G24 + 0x58100003, // 000E LDCONST R4 K3 + 0x5C140400, // 000F MOVE R5 R2 + 0x7C0C0400, // 0010 CALL R3 2 + 0x5C040600, // 0011 MOVE R1 R3 + 0x000A0801, // 0012 ADD R2 K4 R1 + 0x80040400, // 0013 RET 1 R2 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: update_shadow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_closure(class_Matter_Plugin_Light2_update_shadow, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light2, + 1, /* has constants */ + ( &(const bvalue[10]) { /* constants */ + /* K0 */ be_nested_str_weak(VIRTUAL), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(light), + /* K3 */ be_nested_str_weak(update_ct_minmax), + /* K4 */ be_nested_str_weak(update_shadow), + /* K5 */ be_nested_str_weak(get), + /* K6 */ be_nested_str_weak(find), + /* K7 */ be_nested_str_weak(ct), + /* K8 */ be_nested_str_weak(shadow_ct), + /* K9 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(update_shadow), + &be_const_str_solidified, + ( &(const binstruction[40]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x7406001F, // 0001 JMPT R1 #0022 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x7406001D, // 0003 JMPT R1 #0022 + 0xA4060400, // 0004 IMPORT R1 K2 + 0x8C080103, // 0005 GETMET R2 R0 K3 + 0x7C080200, // 0006 CALL R2 1 + 0x60080003, // 0007 GETGBL R2 G3 + 0x5C0C0000, // 0008 MOVE R3 R0 + 0x7C080200, // 0009 CALL R2 1 + 0x8C080504, // 000A GETMET R2 R2 K4 + 0x7C080200, // 000B CALL R2 1 + 0x8C080305, // 000C GETMET R2 R1 K5 + 0x7C080200, // 000D CALL R2 1 + 0x4C0C0000, // 000E LDNIL R3 + 0x200C0403, // 000F NE R3 R2 R3 + 0x780E000F, // 0010 JMPF R3 #0021 + 0x8C0C0506, // 0011 GETMET R3 R2 K6 + 0x58140007, // 0012 LDCONST R5 K7 + 0x4C180000, // 0013 LDNIL R6 + 0x7C0C0600, // 0014 CALL R3 3 + 0x4C100000, // 0015 LDNIL R4 + 0x1C100604, // 0016 EQ R4 R3 R4 + 0x78120000, // 0017 JMPF R4 #0019 + 0x880C0108, // 0018 GETMBR R3 R0 K8 + 0x88100108, // 0019 GETMBR R4 R0 K8 + 0x20100604, // 001A NE R4 R3 R4 + 0x78120004, // 001B JMPF R4 #0021 + 0x8C100109, // 001C GETMET R4 R0 K9 + 0x541A02FF, // 001D LDINT R6 768 + 0x541E0006, // 001E LDINT R7 7 + 0x7C100600, // 001F CALL R4 3 + 0x90021003, // 0020 SETMBR R0 K8 R3 + 0x70020004, // 0021 JMP #0027 + 0x60040003, // 0022 GETGBL R1 G3 + 0x5C080000, // 0023 MOVE R2 R0 + 0x7C040200, // 0024 CALL R1 1 + 0x8C040304, // 0025 GETMET R1 R1 K4 + 0x7C040200, // 0026 CALL R1 1 + 0x80000000, // 0027 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light2 ********************************************************************/ @@ -488,29 +688,23 @@ extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light2, 3, &be_class_Matter_Plugin_Light1, - be_nested_map(15, + be_nested_map(18, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light2_init_closure) }, - { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light2_invoke_request_closure) }, - { be_const_key_weak(ct_max, -1), be_const_var(2) }, - { be_const_key_weak(update_shadow, 10), be_const_closure(class_Matter_Plugin_Light2_update_shadow_closure) }, - { be_const_key_weak(update_virtual, 8), be_const_closure(class_Matter_Plugin_Light2_update_virtual_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X202_X20CT) }, - { be_const_key_weak(set_ct, -1), be_const_closure(class_Matter_Plugin_Light2_set_ct_closure) }, + { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light2_update_shadow_closure) }, + { be_const_key_weak(set_ct, 13), be_const_closure(class_Matter_Plugin_Light2_set_ct_closure) }, { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(268, -1), be_const_int(2) }, })) ) } )) }, - { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + { be_const_key_weak(UPDATE_COMMANDS, 17), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(3, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Power), be_nested_str_weak(Bri), be_nested_str_weak(CT), })) ) } )) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -624,10 +818,19 @@ be_local_class(Matter_Plugin_Light2, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Light2_update_ct_minmax_closure) }, - { be_const_key_weak(read_attribute, 11), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) }, - { be_const_key_weak(ct_min, -1), be_const_var(1) }, + { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light2_invoke_request_closure) }, + { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) }, + { be_const_key_weak(shadow_ct, 0), be_const_var(0) }, + { be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Light2_update_virtual_closure) }, + { be_const_key_weak(DISPLAY_NAME, 16), be_nested_str_weak(Light_X202_X20CT) }, + { be_const_key_weak(web_value_ct, 11), be_const_closure(class_Matter_Plugin_Light2_web_value_ct_closure) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Light2_parse_status_closure) }, { be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) }, + { be_const_key_weak(ct_min, 12), be_const_var(1) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light2_web_values_closure) }, + { be_const_key_weak(init, 10), be_const_closure(class_Matter_Plugin_Light2_init_closure) }, + { be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Light2_update_ct_minmax_closure) }, + { be_const_key_weak(ct_max, -1), be_const_var(2) }, })), be_str_weak(Matter_Plugin_Light2) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h index 8df599ab7..254d280dc 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light3.h @@ -63,148 +63,6 @@ be_local_closure(class_Matter_Plugin_Light3_update_virtual, /* name */ /*******************************************************************/ -/******************************************************************** -** Solidified function: set_hue_sat -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Light3; -be_local_closure(class_Matter_Plugin_Light3_set_hue_sat, /* name */ - be_nested_proto( - 11, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Light3, - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_const_int(0), - /* K1 */ be_nested_str_weak(VIRTUAL), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(scale_uint), - /* K4 */ be_nested_str_weak(light), - /* K5 */ be_nested_str_weak(set), - /* K6 */ be_nested_str_weak(hue), - /* K7 */ be_nested_str_weak(sat), - /* K8 */ be_nested_str_weak(update_shadow), - /* K9 */ be_nested_str_weak(shadow_hue), - /* K10 */ be_nested_str_weak(attribute_updated), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_const_int(1), - }), - be_str_weak(set_hue_sat), - &be_const_str_solidified, - ( &(const binstruction[104]) { /* code */ - 0x4C0C0000, // 0000 LDNIL R3 - 0x200C0203, // 0001 NE R3 R1 R3 - 0x780E0006, // 0002 JMPF R3 #000A - 0x140C0300, // 0003 LT R3 R1 K0 - 0x780E0000, // 0004 JMPF R3 #0006 - 0x58040000, // 0005 LDCONST R1 K0 - 0x540E00FD, // 0006 LDINT R3 254 - 0x240C0203, // 0007 GT R3 R1 R3 - 0x780E0000, // 0008 JMPF R3 #000A - 0x540600FD, // 0009 LDINT R1 254 - 0x4C0C0000, // 000A LDNIL R3 - 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0006, // 000C JMPF R3 #0014 - 0x140C0500, // 000D LT R3 R2 K0 - 0x780E0000, // 000E JMPF R3 #0010 - 0x58080000, // 000F LDCONST R2 K0 - 0x540E00FD, // 0010 LDINT R3 254 - 0x240C0403, // 0011 GT R3 R2 R3 - 0x780E0000, // 0012 JMPF R3 #0014 - 0x540A00FD, // 0013 LDINT R2 254 - 0x880C0101, // 0014 GETMBR R3 R0 K1 - 0x740E003A, // 0015 JMPT R3 #0051 - 0x4C0C0000, // 0016 LDNIL R3 - 0x200C0203, // 0017 NE R3 R1 R3 - 0x780E0008, // 0018 JMPF R3 #0022 - 0xB80E0400, // 0019 GETNGBL R3 K2 - 0x8C0C0703, // 001A GETMET R3 R3 K3 - 0x5C140200, // 001B MOVE R5 R1 - 0x58180000, // 001C LDCONST R6 K0 - 0x541E00FD, // 001D LDINT R7 254 - 0x58200000, // 001E LDCONST R8 K0 - 0x54260167, // 001F LDINT R9 360 - 0x7C0C0C00, // 0020 CALL R3 6 - 0x70020000, // 0021 JMP #0023 - 0x4C0C0000, // 0022 LDNIL R3 - 0x4C100000, // 0023 LDNIL R4 - 0x20100404, // 0024 NE R4 R2 R4 - 0x78120008, // 0025 JMPF R4 #002F - 0xB8120400, // 0026 GETNGBL R4 K2 - 0x8C100903, // 0027 GETMET R4 R4 K3 - 0x5C180400, // 0028 MOVE R6 R2 - 0x581C0000, // 0029 LDCONST R7 K0 - 0x542200FD, // 002A LDINT R8 254 - 0x58240000, // 002B LDCONST R9 K0 - 0x542A00FE, // 002C LDINT R10 255 - 0x7C100C00, // 002D CALL R4 6 - 0x70020000, // 002E JMP #0030 - 0x4C100000, // 002F LDNIL R4 - 0x4C140000, // 0030 LDNIL R5 - 0x20140605, // 0031 NE R5 R3 R5 - 0x7816000A, // 0032 JMPF R5 #003E - 0x4C140000, // 0033 LDNIL R5 - 0x20140805, // 0034 NE R5 R4 R5 - 0x78160007, // 0035 JMPF R5 #003E - 0xB8160800, // 0036 GETNGBL R5 K4 - 0x8C140B05, // 0037 GETMET R5 R5 K5 - 0x601C0013, // 0038 GETGBL R7 G19 - 0x7C1C0000, // 0039 CALL R7 0 - 0x981E0C03, // 003A SETIDX R7 K6 R3 - 0x981E0E04, // 003B SETIDX R7 K7 R4 - 0x7C140400, // 003C CALL R5 2 - 0x7002000F, // 003D JMP #004E - 0x4C140000, // 003E LDNIL R5 - 0x20140605, // 003F NE R5 R3 R5 - 0x78160006, // 0040 JMPF R5 #0048 - 0xB8160800, // 0041 GETNGBL R5 K4 - 0x8C140B05, // 0042 GETMET R5 R5 K5 - 0x601C0013, // 0043 GETGBL R7 G19 - 0x7C1C0000, // 0044 CALL R7 0 - 0x981E0C03, // 0045 SETIDX R7 K6 R3 - 0x7C140400, // 0046 CALL R5 2 - 0x70020005, // 0047 JMP #004E - 0xB8160800, // 0048 GETNGBL R5 K4 - 0x8C140B05, // 0049 GETMET R5 R5 K5 - 0x601C0013, // 004A GETGBL R7 G19 - 0x7C1C0000, // 004B CALL R7 0 - 0x981E0E04, // 004C SETIDX R7 K7 R4 - 0x7C140400, // 004D CALL R5 2 - 0x8C140108, // 004E GETMET R5 R0 K8 - 0x7C140200, // 004F CALL R5 1 - 0x70020015, // 0050 JMP #0067 - 0x4C0C0000, // 0051 LDNIL R3 - 0x200C0203, // 0052 NE R3 R1 R3 - 0x780E0007, // 0053 JMPF R3 #005C - 0x880C0109, // 0054 GETMBR R3 R0 K9 - 0x200C0203, // 0055 NE R3 R1 R3 - 0x780E0004, // 0056 JMPF R3 #005C - 0x8C0C010A, // 0057 GETMET R3 R0 K10 - 0x541602FF, // 0058 LDINT R5 768 - 0x58180000, // 0059 LDCONST R6 K0 - 0x7C0C0600, // 005A CALL R3 3 - 0x90021201, // 005B SETMBR R0 K9 R1 - 0x4C0C0000, // 005C LDNIL R3 - 0x200C0403, // 005D NE R3 R2 R3 - 0x780E0007, // 005E JMPF R3 #0067 - 0x880C010B, // 005F GETMBR R3 R0 K11 - 0x200C0403, // 0060 NE R3 R2 R3 - 0x780E0004, // 0061 JMPF R3 #0067 - 0x8C0C010A, // 0062 GETMET R3 R0 K10 - 0x541602FF, // 0063 LDINT R5 768 - 0x5818000C, // 0064 LDCONST R6 K12 - 0x7C0C0600, // 0065 CALL R3 3 - 0x90021602, // 0066 SETMBR R0 K11 R2 - 0x80000000, // 0067 RET 0 - }) - ) -); -/*******************************************************************/ - - /******************************************************************** ** Solidified function: invoke_request ********************************************************************/ @@ -426,91 +284,487 @@ be_local_closure(class_Matter_Plugin_Light3_update_shadow, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Light3, 1, /* has constants */ - ( &(const bvalue[14]) { /* constants */ - /* K0 */ be_nested_str_weak(update_shadow), - /* K1 */ be_nested_str_weak(VIRTUAL), + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(VIRTUAL), + /* K1 */ be_nested_str_weak(BRIDGE), /* K2 */ be_nested_str_weak(light), - /* K3 */ be_nested_str_weak(get), - /* K4 */ be_nested_str_weak(find), - /* K5 */ be_nested_str_weak(hue), - /* K6 */ be_nested_str_weak(sat), - /* K7 */ be_nested_str_weak(tasmota), - /* K8 */ be_nested_str_weak(scale_uint), - /* K9 */ be_const_int(0), - /* K10 */ be_nested_str_weak(shadow_hue), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_nested_str_weak(attribute_updated), - /* K13 */ be_const_int(1), + /* K3 */ be_nested_str_weak(update_shadow), + /* K4 */ be_nested_str_weak(get), + /* K5 */ be_nested_str_weak(find), + /* K6 */ be_nested_str_weak(hue), + /* K7 */ be_nested_str_weak(sat), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(scale_uint), + /* K10 */ be_const_int(0), + /* K11 */ be_nested_str_weak(shadow_hue), + /* K12 */ be_nested_str_weak(shadow_sat), + /* K13 */ be_nested_str_weak(attribute_updated), + /* K14 */ be_const_int(1), }), be_str_weak(update_shadow), &be_const_str_solidified, - ( &(const binstruction[66]) { /* code */ - 0x60040003, // 0000 GETGBL R1 G3 - 0x5C080000, // 0001 MOVE R2 R0 - 0x7C040200, // 0002 CALL R1 1 - 0x8C040300, // 0003 GETMET R1 R1 K0 - 0x7C040200, // 0004 CALL R1 1 - 0x88040101, // 0005 GETMBR R1 R0 K1 - 0x74060039, // 0006 JMPT R1 #0041 - 0xA4060400, // 0007 IMPORT R1 K2 - 0x8C080303, // 0008 GETMET R2 R1 K3 + ( &(const binstruction[74]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x74060041, // 0001 JMPT R1 #0044 + 0x88040101, // 0002 GETMBR R1 R0 K1 + 0x7406003F, // 0003 JMPT R1 #0044 + 0xA4060400, // 0004 IMPORT R1 K2 + 0x60080003, // 0005 GETGBL R2 G3 + 0x5C0C0000, // 0006 MOVE R3 R0 + 0x7C080200, // 0007 CALL R2 1 + 0x8C080503, // 0008 GETMET R2 R2 K3 0x7C080200, // 0009 CALL R2 1 + 0x8C080304, // 000A GETMET R2 R1 K4 + 0x7C080200, // 000B CALL R2 1 + 0x4C0C0000, // 000C LDNIL R3 + 0x200C0403, // 000D NE R3 R2 R3 + 0x780E0033, // 000E JMPF R3 #0043 + 0x8C0C0505, // 000F GETMET R3 R2 K5 + 0x58140006, // 0010 LDCONST R5 K6 + 0x4C180000, // 0011 LDNIL R6 + 0x7C0C0600, // 0012 CALL R3 3 + 0x8C100505, // 0013 GETMET R4 R2 K5 + 0x58180007, // 0014 LDCONST R6 K7 + 0x4C1C0000, // 0015 LDNIL R7 + 0x7C100600, // 0016 CALL R4 3 + 0x4C140000, // 0017 LDNIL R5 + 0x20140605, // 0018 NE R5 R3 R5 + 0x78160009, // 0019 JMPF R5 #0024 + 0xB8161000, // 001A GETNGBL R5 K8 + 0x8C140B09, // 001B GETMET R5 R5 K9 + 0x5C1C0600, // 001C MOVE R7 R3 + 0x5820000A, // 001D LDCONST R8 K10 + 0x54260167, // 001E LDINT R9 360 + 0x5828000A, // 001F LDCONST R10 K10 + 0x542E00FD, // 0020 LDINT R11 254 + 0x7C140C00, // 0021 CALL R5 6 + 0x5C0C0A00, // 0022 MOVE R3 R5 + 0x70020000, // 0023 JMP #0025 + 0x880C010B, // 0024 GETMBR R3 R0 K11 + 0x4C140000, // 0025 LDNIL R5 + 0x20140805, // 0026 NE R5 R4 R5 + 0x78160009, // 0027 JMPF R5 #0032 + 0xB8161000, // 0028 GETNGBL R5 K8 + 0x8C140B09, // 0029 GETMET R5 R5 K9 + 0x5C1C0800, // 002A MOVE R7 R4 + 0x5820000A, // 002B LDCONST R8 K10 + 0x542600FE, // 002C LDINT R9 255 + 0x5828000A, // 002D LDCONST R10 K10 + 0x542E00FD, // 002E LDINT R11 254 + 0x7C140C00, // 002F CALL R5 6 + 0x5C100A00, // 0030 MOVE R4 R5 + 0x70020000, // 0031 JMP #0033 + 0x8810010C, // 0032 GETMBR R4 R0 K12 + 0x8814010B, // 0033 GETMBR R5 R0 K11 + 0x20140605, // 0034 NE R5 R3 R5 + 0x78160004, // 0035 JMPF R5 #003B + 0x8C14010D, // 0036 GETMET R5 R0 K13 + 0x541E02FF, // 0037 LDINT R7 768 + 0x5820000A, // 0038 LDCONST R8 K10 + 0x7C140600, // 0039 CALL R5 3 + 0x90021603, // 003A SETMBR R0 K11 R3 + 0x8814010C, // 003B GETMBR R5 R0 K12 + 0x20140805, // 003C NE R5 R4 R5 + 0x78160004, // 003D JMPF R5 #0043 + 0x8C14010D, // 003E GETMET R5 R0 K13 + 0x541E02FF, // 003F LDINT R7 768 + 0x5820000E, // 0040 LDCONST R8 K14 + 0x7C140600, // 0041 CALL R5 3 + 0x90021804, // 0042 SETMBR R0 K12 R4 + 0x70020004, // 0043 JMP #0049 + 0x60040003, // 0044 GETGBL R1 G3 + 0x5C080000, // 0045 MOVE R2 R0 + 0x7C040200, // 0046 CALL R1 1 + 0x8C040303, // 0047 GETMET R1 R1 K3 + 0x7C040200, // 0048 CALL R1 1 + 0x80000000, // 0049 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_value_RGB +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light3; +be_local_closure(class_Matter_Plugin_Light3_web_value_RGB, /* name */ + be_nested_proto( + 12, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light3, + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(shadow_hue), + /* K1 */ be_nested_str_weak(shadow_sat), + /* K2 */ be_nested_str_weak(light_state), + /* K3 */ be_const_int(3), + /* K4 */ be_nested_str_weak(set_bri), + /* K5 */ be_nested_str_weak(set_huesat), + /* K6 */ be_nested_str_weak(tasmota), + /* K7 */ be_nested_str_weak(scale_uint), + /* K8 */ be_const_int(0), + /* K9 */ be_nested_str_weak(_X23_X2502X_X2502X_X2502X), + /* K10 */ be_nested_str_weak(r), + /* K11 */ be_nested_str_weak(g), + /* K12 */ be_nested_str_weak(b), + /* K13 */ be_nested_str_weak(_X3Ci_X20class_X3D_X22bxm_X22_X20style_X3D_X22_X2D_X2Dcl_X3A_X25s_X22_X3E_X3C_X2Fi_X3E_X25s), + /* K14 */ be_nested_str_weak(), + }), + be_str_weak(web_value_RGB), + &be_const_str_solidified, + ( &(const binstruction[45]) { /* code */ + 0x88040100, // 0000 GETMBR R1 R0 K0 + 0x4C080000, // 0001 LDNIL R2 + 0x20040202, // 0002 NE R1 R1 R2 + 0x78060027, // 0003 JMPF R1 #002C + 0x88040101, // 0004 GETMBR R1 R0 K1 + 0x4C080000, // 0005 LDNIL R2 + 0x20040202, // 0006 NE R1 R1 R2 + 0x78060023, // 0007 JMPF R1 #002C + 0xB8060400, // 0008 GETNGBL R1 K2 + 0x58080003, // 0009 LDCONST R2 K3 + 0x7C040200, // 000A CALL R1 1 + 0x8C080304, // 000B GETMET R2 R1 K4 + 0x541200FE, // 000C LDINT R4 255 + 0x7C080400, // 000D CALL R2 2 + 0x8C080305, // 000E GETMET R2 R1 K5 + 0xB8120C00, // 000F GETNGBL R4 K6 + 0x8C100907, // 0010 GETMET R4 R4 K7 + 0x88180100, // 0011 GETMBR R6 R0 K0 + 0x581C0008, // 0012 LDCONST R7 K8 + 0x542200FD, // 0013 LDINT R8 254 + 0x58240008, // 0014 LDCONST R9 K8 + 0x542A0167, // 0015 LDINT R10 360 + 0x7C100C00, // 0016 CALL R4 6 + 0xB8160C00, // 0017 GETNGBL R5 K6 + 0x8C140B07, // 0018 GETMET R5 R5 K7 + 0x881C0101, // 0019 GETMBR R7 R0 K1 + 0x58200008, // 001A LDCONST R8 K8 + 0x542600FD, // 001B LDINT R9 254 + 0x58280008, // 001C LDCONST R10 K8 + 0x542E00FE, // 001D LDINT R11 255 + 0x7C140C00, // 001E CALL R5 6 + 0x7C080600, // 001F CALL R2 3 + 0x60080018, // 0020 GETGBL R2 G24 + 0x580C0009, // 0021 LDCONST R3 K9 + 0x8810030A, // 0022 GETMBR R4 R1 K10 + 0x8814030B, // 0023 GETMBR R5 R1 K11 + 0x8818030C, // 0024 GETMBR R6 R1 K12 + 0x7C080800, // 0025 CALL R2 4 + 0x600C0018, // 0026 GETGBL R3 G24 + 0x5810000D, // 0027 LDCONST R4 K13 + 0x5C140400, // 0028 MOVE R5 R2 + 0x5C180400, // 0029 MOVE R6 R2 + 0x7C0C0600, // 002A CALL R3 3 + 0x80040600, // 002B RET 1 R3 + 0x80061C00, // 002C RET 1 K14 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: set_hue_sat +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light3; +be_local_closure(class_Matter_Plugin_Light3_set_hue_sat, /* name */ + be_nested_proto( + 11, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light3, + 1, /* has constants */ + ( &(const bvalue[18]) { /* constants */ + /* K0 */ be_const_int(0), + /* K1 */ be_nested_str_weak(BRIDGE), + /* K2 */ be_nested_str_weak(tasmota), + /* K3 */ be_nested_str_weak(scale_uint), + /* K4 */ be_nested_str_weak(call_remote_sync), + /* K5 */ be_nested_str_weak(HSBColor1), + /* K6 */ be_nested_str_weak(parse_status), + /* K7 */ be_nested_str_weak(HSBColor2), + /* K8 */ be_nested_str_weak(VIRTUAL), + /* K9 */ be_nested_str_weak(shadow_hue), + /* K10 */ be_nested_str_weak(attribute_updated), + /* K11 */ be_nested_str_weak(shadow_sat), + /* K12 */ be_const_int(1), + /* K13 */ be_nested_str_weak(light), + /* K14 */ be_nested_str_weak(set), + /* K15 */ be_nested_str_weak(hue), + /* K16 */ be_nested_str_weak(sat), + /* K17 */ be_nested_str_weak(update_shadow), + }), + be_str_weak(set_hue_sat), + &be_const_str_solidified, + ( &(const binstruction[151]) { /* code */ + 0x4C0C0000, // 0000 LDNIL R3 + 0x200C0203, // 0001 NE R3 R1 R3 + 0x780E0006, // 0002 JMPF R3 #000A + 0x140C0300, // 0003 LT R3 R1 K0 + 0x780E0000, // 0004 JMPF R3 #0006 + 0x58040000, // 0005 LDCONST R1 K0 + 0x540E00FD, // 0006 LDINT R3 254 + 0x240C0203, // 0007 GT R3 R1 R3 + 0x780E0000, // 0008 JMPF R3 #000A + 0x540600FD, // 0009 LDINT R1 254 0x4C0C0000, // 000A LDNIL R3 0x200C0403, // 000B NE R3 R2 R3 - 0x780E0033, // 000C JMPF R3 #0041 - 0x8C0C0504, // 000D GETMET R3 R2 K4 - 0x58140005, // 000E LDCONST R5 K5 - 0x4C180000, // 000F LDNIL R6 - 0x7C0C0600, // 0010 CALL R3 3 - 0x8C100504, // 0011 GETMET R4 R2 K4 - 0x58180006, // 0012 LDCONST R6 K6 - 0x4C1C0000, // 0013 LDNIL R7 - 0x7C100600, // 0014 CALL R4 3 - 0x4C140000, // 0015 LDNIL R5 - 0x20140605, // 0016 NE R5 R3 R5 - 0x78160009, // 0017 JMPF R5 #0022 - 0xB8160E00, // 0018 GETNGBL R5 K7 - 0x8C140B08, // 0019 GETMET R5 R5 K8 - 0x5C1C0600, // 001A MOVE R7 R3 - 0x58200009, // 001B LDCONST R8 K9 - 0x54260167, // 001C LDINT R9 360 - 0x58280009, // 001D LDCONST R10 K9 - 0x542E00FD, // 001E LDINT R11 254 - 0x7C140C00, // 001F CALL R5 6 - 0x5C0C0A00, // 0020 MOVE R3 R5 - 0x70020000, // 0021 JMP #0023 - 0x880C010A, // 0022 GETMBR R3 R0 K10 - 0x4C140000, // 0023 LDNIL R5 - 0x20140805, // 0024 NE R5 R4 R5 - 0x78160009, // 0025 JMPF R5 #0030 - 0xB8160E00, // 0026 GETNGBL R5 K7 - 0x8C140B08, // 0027 GETMET R5 R5 K8 - 0x5C1C0800, // 0028 MOVE R7 R4 - 0x58200009, // 0029 LDCONST R8 K9 - 0x542600FE, // 002A LDINT R9 255 - 0x58280009, // 002B LDCONST R10 K9 - 0x542E00FD, // 002C LDINT R11 254 - 0x7C140C00, // 002D CALL R5 6 - 0x5C100A00, // 002E MOVE R4 R5 - 0x70020000, // 002F JMP #0031 - 0x8810010B, // 0030 GETMBR R4 R0 K11 - 0x8814010A, // 0031 GETMBR R5 R0 K10 - 0x20140605, // 0032 NE R5 R3 R5 - 0x78160004, // 0033 JMPF R5 #0039 - 0x8C14010C, // 0034 GETMET R5 R0 K12 - 0x541E02FF, // 0035 LDINT R7 768 - 0x58200009, // 0036 LDCONST R8 K9 - 0x7C140600, // 0037 CALL R5 3 - 0x90021403, // 0038 SETMBR R0 K10 R3 - 0x8814010B, // 0039 GETMBR R5 R0 K11 - 0x20140805, // 003A NE R5 R4 R5 - 0x78160004, // 003B JMPF R5 #0041 - 0x8C14010C, // 003C GETMET R5 R0 K12 - 0x541E02FF, // 003D LDINT R7 768 - 0x5820000D, // 003E LDCONST R8 K13 - 0x7C140600, // 003F CALL R5 3 - 0x90021604, // 0040 SETMBR R0 K11 R4 - 0x80000000, // 0041 RET 0 + 0x780E0006, // 000C JMPF R3 #0014 + 0x140C0500, // 000D LT R3 R2 K0 + 0x780E0000, // 000E JMPF R3 #0010 + 0x58080000, // 000F LDCONST R2 K0 + 0x540E00FD, // 0010 LDINT R3 254 + 0x240C0403, // 0011 GT R3 R2 R3 + 0x780E0000, // 0012 JMPF R3 #0014 + 0x540A00FD, // 0013 LDINT R2 254 + 0x880C0101, // 0014 GETMBR R3 R0 K1 + 0x780E002C, // 0015 JMPF R3 #0043 + 0x4C0C0000, // 0016 LDNIL R3 + 0x200C0203, // 0017 NE R3 R1 R3 + 0x780E0012, // 0018 JMPF R3 #002C + 0xB80E0400, // 0019 GETNGBL R3 K2 + 0x8C0C0703, // 001A GETMET R3 R3 K3 + 0x5C140200, // 001B MOVE R5 R1 + 0x58180000, // 001C LDCONST R6 K0 + 0x541E00FD, // 001D LDINT R7 254 + 0x58200000, // 001E LDCONST R8 K0 + 0x54260167, // 001F LDINT R9 360 + 0x7C0C0C00, // 0020 CALL R3 6 + 0x8C100104, // 0021 GETMET R4 R0 K4 + 0x58180005, // 0022 LDCONST R6 K5 + 0x5C1C0600, // 0023 MOVE R7 R3 + 0x7C100600, // 0024 CALL R4 3 + 0x4C140000, // 0025 LDNIL R5 + 0x20140805, // 0026 NE R5 R4 R5 + 0x78160003, // 0027 JMPF R5 #002C + 0x8C140106, // 0028 GETMET R5 R0 K6 + 0x5C1C0800, // 0029 MOVE R7 R4 + 0x5422000A, // 002A LDINT R8 11 + 0x7C140600, // 002B CALL R5 3 + 0x4C0C0000, // 002C LDNIL R3 + 0x200C0403, // 002D NE R3 R2 R3 + 0x780E0012, // 002E JMPF R3 #0042 + 0xB80E0400, // 002F GETNGBL R3 K2 + 0x8C0C0703, // 0030 GETMET R3 R3 K3 + 0x5C140400, // 0031 MOVE R5 R2 + 0x58180000, // 0032 LDCONST R6 K0 + 0x541E00FD, // 0033 LDINT R7 254 + 0x58200000, // 0034 LDCONST R8 K0 + 0x54260063, // 0035 LDINT R9 100 + 0x7C0C0C00, // 0036 CALL R3 6 + 0x8C100104, // 0037 GETMET R4 R0 K4 + 0x58180007, // 0038 LDCONST R6 K7 + 0x5C1C0600, // 0039 MOVE R7 R3 + 0x7C100600, // 003A CALL R4 3 + 0x4C140000, // 003B LDNIL R5 + 0x20140805, // 003C NE R5 R4 R5 + 0x78160003, // 003D JMPF R5 #0042 + 0x8C140106, // 003E GETMET R5 R0 K6 + 0x5C1C0800, // 003F MOVE R7 R4 + 0x5422000A, // 0040 LDINT R8 11 + 0x7C140600, // 0041 CALL R5 3 + 0x70020052, // 0042 JMP #0096 + 0x880C0108, // 0043 GETMBR R3 R0 K8 + 0x780E0016, // 0044 JMPF R3 #005C + 0x4C0C0000, // 0045 LDNIL R3 + 0x200C0203, // 0046 NE R3 R1 R3 + 0x780E0007, // 0047 JMPF R3 #0050 + 0x880C0109, // 0048 GETMBR R3 R0 K9 + 0x200C0203, // 0049 NE R3 R1 R3 + 0x780E0004, // 004A JMPF R3 #0050 + 0x8C0C010A, // 004B GETMET R3 R0 K10 + 0x541602FF, // 004C LDINT R5 768 + 0x58180000, // 004D LDCONST R6 K0 + 0x7C0C0600, // 004E CALL R3 3 + 0x90021201, // 004F SETMBR R0 K9 R1 + 0x4C0C0000, // 0050 LDNIL R3 + 0x200C0403, // 0051 NE R3 R2 R3 + 0x780E0007, // 0052 JMPF R3 #005B + 0x880C010B, // 0053 GETMBR R3 R0 K11 + 0x200C0403, // 0054 NE R3 R2 R3 + 0x780E0004, // 0055 JMPF R3 #005B + 0x8C0C010A, // 0056 GETMET R3 R0 K10 + 0x541602FF, // 0057 LDINT R5 768 + 0x5818000C, // 0058 LDCONST R6 K12 + 0x7C0C0600, // 0059 CALL R3 3 + 0x90021602, // 005A SETMBR R0 K11 R2 + 0x70020039, // 005B JMP #0096 + 0x4C0C0000, // 005C LDNIL R3 + 0x200C0203, // 005D NE R3 R1 R3 + 0x780E0008, // 005E JMPF R3 #0068 + 0xB80E0400, // 005F GETNGBL R3 K2 + 0x8C0C0703, // 0060 GETMET R3 R3 K3 + 0x5C140200, // 0061 MOVE R5 R1 + 0x58180000, // 0062 LDCONST R6 K0 + 0x541E00FD, // 0063 LDINT R7 254 + 0x58200000, // 0064 LDCONST R8 K0 + 0x54260167, // 0065 LDINT R9 360 + 0x7C0C0C00, // 0066 CALL R3 6 + 0x70020000, // 0067 JMP #0069 + 0x4C0C0000, // 0068 LDNIL R3 + 0x4C100000, // 0069 LDNIL R4 + 0x20100404, // 006A NE R4 R2 R4 + 0x78120008, // 006B JMPF R4 #0075 + 0xB8120400, // 006C GETNGBL R4 K2 + 0x8C100903, // 006D GETMET R4 R4 K3 + 0x5C180400, // 006E MOVE R6 R2 + 0x581C0000, // 006F LDCONST R7 K0 + 0x542200FD, // 0070 LDINT R8 254 + 0x58240000, // 0071 LDCONST R9 K0 + 0x542A00FE, // 0072 LDINT R10 255 + 0x7C100C00, // 0073 CALL R4 6 + 0x70020000, // 0074 JMP #0076 + 0x4C100000, // 0075 LDNIL R4 + 0x4C140000, // 0076 LDNIL R5 + 0x20140605, // 0077 NE R5 R3 R5 + 0x7816000A, // 0078 JMPF R5 #0084 + 0x4C140000, // 0079 LDNIL R5 + 0x20140805, // 007A NE R5 R4 R5 + 0x78160007, // 007B JMPF R5 #0084 + 0xB8161A00, // 007C GETNGBL R5 K13 + 0x8C140B0E, // 007D GETMET R5 R5 K14 + 0x601C0013, // 007E GETGBL R7 G19 + 0x7C1C0000, // 007F CALL R7 0 + 0x981E1E03, // 0080 SETIDX R7 K15 R3 + 0x981E2004, // 0081 SETIDX R7 K16 R4 + 0x7C140400, // 0082 CALL R5 2 + 0x7002000F, // 0083 JMP #0094 + 0x4C140000, // 0084 LDNIL R5 + 0x20140605, // 0085 NE R5 R3 R5 + 0x78160006, // 0086 JMPF R5 #008E + 0xB8161A00, // 0087 GETNGBL R5 K13 + 0x8C140B0E, // 0088 GETMET R5 R5 K14 + 0x601C0013, // 0089 GETGBL R7 G19 + 0x7C1C0000, // 008A CALL R7 0 + 0x981E1E03, // 008B SETIDX R7 K15 R3 + 0x7C140400, // 008C CALL R5 2 + 0x70020005, // 008D JMP #0094 + 0xB8161A00, // 008E GETNGBL R5 K13 + 0x8C140B0E, // 008F GETMET R5 R5 K14 + 0x601C0013, // 0090 GETGBL R7 G19 + 0x7C1C0000, // 0091 CALL R7 0 + 0x981E2004, // 0092 SETIDX R7 K16 R4 + 0x7C140400, // 0093 CALL R5 2 + 0x8C140111, // 0094 GETMET R5 R0 K17 + 0x7C140200, // 0095 CALL R5 1 + 0x80000000, // 0096 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light3; +be_local_closure(class_Matter_Plugin_Light3_parse_status, /* name */ + be_nested_proto( + 15, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light3, + 1, /* has constants */ + ( &(const bvalue[13]) { /* constants */ + /* K0 */ be_nested_str_weak(parse_status), + /* K1 */ be_nested_str_weak(find), + /* K2 */ be_nested_str_weak(HSBColor), + /* K3 */ be_nested_str_weak(string), + /* K4 */ be_nested_str_weak(split), + /* K5 */ be_nested_str_weak(_X2C), + /* K6 */ be_const_int(0), + /* K7 */ be_const_int(1), + /* K8 */ be_nested_str_weak(tasmota), + /* K9 */ be_nested_str_weak(scale_uint), + /* K10 */ be_nested_str_weak(shadow_hue), + /* K11 */ be_nested_str_weak(shadow_sat), + /* K12 */ be_nested_str_weak(attribute_updated), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[70]) { /* code */ + 0x600C0003, // 0000 GETGBL R3 G3 + 0x5C100000, // 0001 MOVE R4 R0 + 0x7C0C0200, // 0002 CALL R3 1 + 0x8C0C0700, // 0003 GETMET R3 R3 K0 + 0x5C140200, // 0004 MOVE R5 R1 + 0x5C180400, // 0005 MOVE R6 R2 + 0x7C0C0600, // 0006 CALL R3 3 + 0x540E000A, // 0007 LDINT R3 11 + 0x1C0C0403, // 0008 EQ R3 R2 R3 + 0x780E003A, // 0009 JMPF R3 #0045 + 0x8C0C0301, // 000A GETMET R3 R1 K1 + 0x58140002, // 000B LDCONST R5 K2 + 0x7C0C0400, // 000C CALL R3 2 + 0x780E0036, // 000D JMPF R3 #0045 + 0xA4120600, // 000E IMPORT R4 K3 + 0x8C140904, // 000F GETMET R5 R4 K4 + 0x5C1C0600, // 0010 MOVE R7 R3 + 0x58200005, // 0011 LDCONST R8 K5 + 0x7C140600, // 0012 CALL R5 3 + 0x60180009, // 0013 GETGBL R6 G9 + 0x941C0B06, // 0014 GETIDX R7 R5 K6 + 0x7C180200, // 0015 CALL R6 1 + 0x601C0009, // 0016 GETGBL R7 G9 + 0x94200B07, // 0017 GETIDX R8 R5 K7 + 0x7C1C0200, // 0018 CALL R7 1 + 0x4C200000, // 0019 LDNIL R8 + 0x20200C08, // 001A NE R8 R6 R8 + 0x78220009, // 001B JMPF R8 #0026 + 0xB8221000, // 001C GETNGBL R8 K8 + 0x8C201109, // 001D GETMET R8 R8 K9 + 0x5C280C00, // 001E MOVE R10 R6 + 0x582C0006, // 001F LDCONST R11 K6 + 0x54320167, // 0020 LDINT R12 360 + 0x58340006, // 0021 LDCONST R13 K6 + 0x543A00FD, // 0022 LDINT R14 254 + 0x7C200C00, // 0023 CALL R8 6 + 0x5C181000, // 0024 MOVE R6 R8 + 0x70020000, // 0025 JMP #0027 + 0x8818010A, // 0026 GETMBR R6 R0 K10 + 0x4C200000, // 0027 LDNIL R8 + 0x20200E08, // 0028 NE R8 R7 R8 + 0x78220009, // 0029 JMPF R8 #0034 + 0xB8221000, // 002A GETNGBL R8 K8 + 0x8C201109, // 002B GETMET R8 R8 K9 + 0x5C280E00, // 002C MOVE R10 R7 + 0x582C0006, // 002D LDCONST R11 K6 + 0x54320063, // 002E LDINT R12 100 + 0x58340006, // 002F LDCONST R13 K6 + 0x543A00FD, // 0030 LDINT R14 254 + 0x7C200C00, // 0031 CALL R8 6 + 0x5C1C1000, // 0032 MOVE R7 R8 + 0x70020000, // 0033 JMP #0035 + 0x881C010B, // 0034 GETMBR R7 R0 K11 + 0x8820010A, // 0035 GETMBR R8 R0 K10 + 0x20200C08, // 0036 NE R8 R6 R8 + 0x78220004, // 0037 JMPF R8 #003D + 0x8C20010C, // 0038 GETMET R8 R0 K12 + 0x542A02FF, // 0039 LDINT R10 768 + 0x582C0006, // 003A LDCONST R11 K6 + 0x7C200600, // 003B CALL R8 3 + 0x90021406, // 003C SETMBR R0 K10 R6 + 0x8820010B, // 003D GETMBR R8 R0 K11 + 0x20200E08, // 003E NE R8 R7 R8 + 0x78220004, // 003F JMPF R8 #0045 + 0x8C20010C, // 0040 GETMET R8 R0 K12 + 0x542A02FF, // 0041 LDINT R10 768 + 0x582C0007, // 0042 LDCONST R11 K7 + 0x7C200600, // 0043 CALL R8 3 + 0x90021607, // 0044 SETMBR R0 K11 R7 + 0x80000000, // 0045 RET 0 }) ) ); @@ -652,6 +906,55 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light3; +be_local_closure(class_Matter_Plugin_Light3_web_values, /* name */ + be_nested_proto( + 10, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Light3, + 1, /* has constants */ + ( &(const bvalue[ 8]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), + /* K4 */ be_nested_str_weak(web_value_onoff), + /* K5 */ be_nested_str_weak(shadow_onoff), + /* K6 */ be_nested_str_weak(web_value_dimmer), + /* K7 */ be_nested_str_weak(web_value_RGB), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[16]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x8C180104, // 0006 GETMET R6 R0 K4 + 0x88200105, // 0007 GETMBR R8 R0 K5 + 0x7C180400, // 0008 CALL R6 2 + 0x8C1C0106, // 0009 GETMET R7 R0 K6 + 0x7C1C0200, // 000A CALL R7 1 + 0x8C200107, // 000B GETMET R8 R0 K7 + 0x7C200200, // 000C CALL R8 1 + 0x7C100800, // 000D CALL R4 4 + 0x7C080400, // 000E CALL R2 2 + 0x80000000, // 000F RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Light3 ********************************************************************/ @@ -659,19 +962,30 @@ extern const bclass be_class_Matter_Plugin_Light1; be_local_class(Matter_Plugin_Light3, 2, &be_class_Matter_Plugin_Light1, - be_nested_map(13, + be_nested_map(16, ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(update_virtual, 1), be_const_closure(class_Matter_Plugin_Light3_update_virtual_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light3_web_values_closure) }, + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + be_const_map( * be_nested_map(1, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_int(269, -1), be_const_int(2) }, + })) ) } )) }, + { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light3_init_closure) }, { be_const_key_weak(shadow_hue, -1), be_const_var(0) }, - { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, - { be_const_key_weak(update_virtual, 8), be_const_closure(class_Matter_Plugin_Light3_update_virtual_closure) }, { be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light3_update_shadow_closure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light3_invoke_request_closure) }, - { be_const_key_weak(init, 9), be_const_closure(class_Matter_Plugin_Light3_init_closure) }, - { be_const_key_weak(set_hue_sat, 3), be_const_closure(class_Matter_Plugin_Light3_set_hue_sat_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) }, { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X203_X20RGB) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(UPDATE_COMMANDS, 15), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { + be_const_list( * be_nested_list(4, + ( (struct bvalue*) &(const bvalue[]) { + be_nested_str_weak(Power), + be_nested_str_weak(Bri), + be_nested_str_weak(Hue), + be_nested_str_weak(Sat), + })) ) } )) }, + { be_const_key_weak(read_attribute, 2), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) }, + { be_const_key_weak(set_hue_sat, -1), be_const_closure(class_Matter_Plugin_Light3_set_hue_sat_closure) }, + { be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(8, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { @@ -787,19 +1101,11 @@ be_local_class(Matter_Plugin_Light3, be_const_int(65533), })) ) } )) }, })) ) } )) }, - { be_const_key_weak(UPDATE_COMMANDS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(4, - ( (struct bvalue*) &(const bvalue[]) { - be_nested_str_weak(Power), - be_nested_str_weak(Bri), - be_nested_str_weak(Hue), - be_nested_str_weak(Sat), - })) ) } )) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(269, -1), be_const_int(2) }, - })) ) } )) }, + { be_const_key_weak(invoke_request, 12), be_const_closure(class_Matter_Plugin_Light3_invoke_request_closure) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Light3_parse_status_closure) }, + { be_const_key_weak(TYPE, 6), be_nested_str_weak(light3) }, + { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, + { be_const_key_weak(web_value_RGB, -1), be_const_closure(class_Matter_Plugin_Light3_web_value_RGB_closure) }, })), be_str_weak(Matter_Plugin_Light3) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_OnOff.h similarity index 73% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light0.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_OnOff.h index 4ede0e4d9..17b0381a3 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Light0.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_OnOff.h @@ -1,29 +1,29 @@ -/* Solidification of Matter_Plugin_3_Light0.h */ +/* Solidification of Matter_Plugin_3_OnOff.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ #include "be_constobj.h" -extern const bclass be_class_Matter_Plugin_Light0; +extern const bclass be_class_Matter_Plugin_OnOff; /******************************************************************** -** Solidified class: Matter_Plugin_Light0 +** Solidified class: Matter_Plugin_OnOff ********************************************************************/ -extern const bclass be_class_Matter_Plugin_OnOff; -be_local_class(Matter_Plugin_Light0, +extern const bclass be_class_Matter_Plugin_Light0; +be_local_class(Matter_Plugin_OnOff, 0, - &be_class_Matter_Plugin_OnOff, + &be_class_Matter_Plugin_Light0, be_nested_map(3, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X200_X20On) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Relay) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) }, { 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_int(266, -1), be_const_int(2) }, })) ) } )) }, })), - be_str_weak(Matter_Plugin_Light0) + be_str_weak(Matter_Plugin_OnOff) ); /********************************************************************/ /* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Flow.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Flow.h index 97cae5f0b..dafda9e24 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Flow.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Flow.h @@ -160,6 +160,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Flow_pre_value, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Flow; +be_local_closure(class_Matter_Plugin_Sensor_Flow_web_values, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Flow, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20m_X26sup3_X3B_X2Fh), + /* K4 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x60180009, // 0006 GETGBL R6 G9 + 0x881C0104, // 0007 GETMBR R7 R0 K4 + 0x7C180200, // 0008 CALL R6 1 + 0x7C100400, // 0009 CALL R4 2 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Flow ********************************************************************/ @@ -167,23 +209,20 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Flow, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Flow) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(flow) }, - { be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { 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(774, -1), be_const_int(1) }, })) ) } )) }, + { be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Flow_value_changed_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Flow), })) ) } )) }, - { be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Flow_value_changed_closure) }, - { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Flow) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -270,7 +309,11 @@ be_local_class(Matter_Plugin_Sensor_Flow, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Flow) }, { be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Flow) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(flow) }, })), be_str_weak(Matter_Plugin_Sensor_Flow) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h index c2d3fc521..fde45bb62 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h @@ -160,6 +160,56 @@ be_local_closure(class_Matter_Plugin_Sensor_Humidity_pre_value, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Humidity; +be_local_closure(class_Matter_Plugin_Sensor_Humidity_web_values, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Humidity, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26_X23x1F4A7_X3B_X20_X252_X2E0f_X25_X25), + /* K4 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x4C1C0000, // 0007 LDNIL R7 + 0x20180C07, // 0008 NE R6 R6 R7 + 0x781A0005, // 0009 JMPF R6 #0010 + 0x6018000A, // 000A GETGBL R6 G10 + 0x881C0104, // 000B GETMBR R7 R0 K4 + 0x7C180200, // 000C CALL R6 1 + 0x541E0063, // 000D LDINT R7 100 + 0x0C180C07, // 000E DIV R6 R6 R7 + 0x70020000, // 000F JMP #0011 + 0x4C180000, // 0010 LDNIL R6 + 0x7C100400, // 0011 CALL R4 2 + 0x7C080400, // 0012 CALL R2 2 + 0x80000000, // 0013 RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Humidity ********************************************************************/ @@ -167,23 +217,20 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Humidity, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Humidity) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) }, - { be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(775, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Humidity_value_changed_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Humidity), })) ) } )) }, - { be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_value_changed_closure) }, - { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Humidity) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -270,7 +317,11 @@ be_local_class(Matter_Plugin_Sensor_Humidity, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Humidity) }, { be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Humidity) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(humidity) }, })), be_str_weak(Matter_Plugin_Sensor_Humidity) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h index aea99a7cb..147369bde 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Illuminance.h @@ -172,6 +172,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Illuminance_pre_value, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Illuminance; +be_local_closure(class_Matter_Plugin_Sensor_Illuminance_web_values, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Illuminance, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26_X23128261_X3B_X20_X25i_X20lux), + /* K4 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x60180009, // 0006 GETGBL R6 G9 + 0x881C0104, // 0007 GETMBR R7 R0 K4 + 0x7C180200, // 0008 CALL R6 1 + 0x7C100400, // 0009 CALL R4 2 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Illuminance ********************************************************************/ @@ -179,23 +221,20 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Illuminance, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Illuminance) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) }, - { be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(262, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_value_changed_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Illuminance), })) ) } )) }, - { be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_value_changed_closure) }, - { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Illuminance) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -282,7 +321,11 @@ be_local_class(Matter_Plugin_Sensor_Illuminance, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Illuminance) }, { be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Illuminance) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(illuminance) }, })), be_str_weak(Matter_Plugin_Sensor_Illuminance) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h index 245a4b5f1..a14b2f339 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Pressure.h @@ -159,6 +159,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Pressure_pre_value, /* name */ /*******************************************************************/ +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Pressure; +be_local_closure(class_Matter_Plugin_Sensor_Pressure_web_values, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Pressure, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20hPa), + /* K4 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x60180009, // 0006 GETGBL R6 G9 + 0x881C0104, // 0007 GETMBR R7 R0 K4 + 0x7C180200, // 0008 CALL R6 1 + 0x7C100400, // 0009 CALL R4 2 + 0x7C080400, // 000A CALL R2 2 + 0x80000000, // 000B RET 0 + }) + ) +); +/*******************************************************************/ + + /******************************************************************** ** Solidified class: Matter_Plugin_Sensor_Pressure ********************************************************************/ @@ -166,23 +208,20 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Pressure, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Pressure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) }, - { be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(773, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Pressure_value_changed_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Pressure), })) ) } )) }, - { be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_value_changed_closure) }, - { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Pressure) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -269,7 +308,11 @@ be_local_class(Matter_Plugin_Sensor_Pressure, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Pressure) }, { be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Pressure) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(pressure) }, })), be_str_weak(Matter_Plugin_Sensor_Pressure) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h index 785235cd0..d0b9e7473 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_3_Sensor_Temp.h @@ -138,20 +138,23 @@ be_local_closure(class_Matter_Plugin_Sensor_Temp_pre_value, /* name */ 0, /* has sup protos */ &be_class_Matter_Plugin_Sensor_Temp, 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(get_option), - /* K2 */ be_const_int(1), + ( &(const bvalue[ 7]) { /* constants */ + /* K0 */ be_nested_str_weak(BRIDGE), + /* K1 */ be_nested_str_weak(temp_unit), + /* K2 */ be_nested_str_weak(TEMP_F), /* K3 */ be_const_real_hex(0x3FE66666), + /* K4 */ be_nested_str_weak(tasmota), + /* K5 */ be_nested_str_weak(get_option), + /* K6 */ be_const_int(1), }), be_str_weak(pre_value), &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x54120007, // 0002 LDINT R4 8 - 0x7C080400, // 0003 CALL R2 2 - 0x1C080502, // 0004 EQ R2 R2 K2 + ( &(const binstruction[42]) { /* code */ + 0x88080100, // 0000 GETMBR R2 R0 K0 + 0x780A0012, // 0001 JMPF R2 #0015 + 0x88080101, // 0002 GETMBR R2 R0 K1 + 0x880C0102, // 0003 GETMBR R3 R0 K2 + 0x1C080403, // 0004 EQ R2 R2 R3 0x780A0003, // 0005 JMPF R2 #000A 0x540A001F, // 0006 LDINT R2 32 0x04080202, // 0007 SUB R2 R1 R2 @@ -167,6 +170,78 @@ be_local_closure(class_Matter_Plugin_Sensor_Temp_pre_value, /* name */ 0x70020000, // 0011 JMP #0013 0x4C080000, // 0012 LDNIL R2 0x80040400, // 0013 RET 1 R2 + 0x70020013, // 0014 JMP #0029 + 0xB80A0800, // 0015 GETNGBL R2 K4 + 0x8C080505, // 0016 GETMET R2 R2 K5 + 0x54120007, // 0017 LDINT R4 8 + 0x7C080400, // 0018 CALL R2 2 + 0x1C080506, // 0019 EQ R2 R2 K6 + 0x780A0003, // 001A JMPF R2 #001F + 0x540A001F, // 001B LDINT R2 32 + 0x04080202, // 001C SUB R2 R1 R2 + 0x0C080503, // 001D DIV R2 R2 K3 + 0x5C040400, // 001E MOVE R1 R2 + 0x4C080000, // 001F LDNIL R2 + 0x20080202, // 0020 NE R2 R1 R2 + 0x780A0004, // 0021 JMPF R2 #0027 + 0x60080009, // 0022 GETGBL R2 G9 + 0x540E0063, // 0023 LDINT R3 100 + 0x080C0203, // 0024 MUL R3 R1 R3 + 0x7C080200, // 0025 CALL R2 1 + 0x70020000, // 0026 JMP #0028 + 0x4C080000, // 0027 LDNIL R2 + 0x80040400, // 0028 RET 1 R2 + 0x80000000, // 0029 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Temp; +be_local_closure(class_Matter_Plugin_Sensor_Temp_web_values, /* name */ + be_nested_proto( + 8, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Sensor_Temp, + 1, /* has constants */ + ( &(const bvalue[ 5]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(web_values_prefix), + /* K2 */ be_nested_str_weak(content_send), + /* K3 */ be_nested_str_weak(_X26_X23x2600_X3B_X26_X23xFE0F_X3B_X20_X25_X2E1f_X20_XC2_XB0C), + /* K4 */ be_nested_str_weak(shadow_value), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[20]) { /* code */ + 0xA4060000, // 0000 IMPORT R1 K0 + 0x8C080101, // 0001 GETMET R2 R0 K1 + 0x7C080200, // 0002 CALL R2 1 + 0x8C080302, // 0003 GETMET R2 R1 K2 + 0x60100018, // 0004 GETGBL R4 G24 + 0x58140003, // 0005 LDCONST R5 K3 + 0x88180104, // 0006 GETMBR R6 R0 K4 + 0x4C1C0000, // 0007 LDNIL R7 + 0x20180C07, // 0008 NE R6 R6 R7 + 0x781A0005, // 0009 JMPF R6 #0010 + 0x6018000A, // 000A GETGBL R6 G10 + 0x881C0104, // 000B GETMBR R7 R0 K4 + 0x7C180200, // 000C CALL R6 1 + 0x541E0063, // 000D LDINT R7 100 + 0x0C180C07, // 000E DIV R6 R6 R7 + 0x70020000, // 000F JMP #0011 + 0x4C180000, // 0010 LDNIL R6 + 0x7C100400, // 0011 CALL R4 2 + 0x7C080400, // 0012 CALL R2 2 + 0x80000000, // 0013 RET 0 }) ) ); @@ -180,23 +255,20 @@ extern const bclass be_class_Matter_Plugin_Sensor; be_local_class(Matter_Plugin_Sensor_Temp, 0, &be_class_Matter_Plugin_Sensor, - be_nested_map(9, + be_nested_map(10, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Temperature) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) }, - { be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { + { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(1, ( (struct bmapnode*) &(const bmapnode[]) { { be_const_key_int(770, -1), be_const_int(2) }, })) ) } )) }, + { be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Temp_value_changed_closure) }, + { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) }, { be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { be_const_list( * be_nested_list(1, ( (struct bvalue*) &(const bvalue[]) { be_nested_str_weak(Temperature), })) ) } )) }, - { be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_value_changed_closure) }, - { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Temperature) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) }, { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(6, ( (struct bmapnode*) &(const bmapnode[]) { @@ -283,7 +355,11 @@ be_local_class(Matter_Plugin_Sensor_Temp, be_const_int(65533), })) ) } )) }, })) ) } )) }, + { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Temperature) }, { be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_pre_value_closure) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_web_values_closure) }, + { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Temperature) }, + { be_const_key_weak(TYPE, 3), be_nested_str_weak(temperature) }, })), be_str_weak(Matter_Plugin_Sensor_Temp) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Light1.h deleted file mode 100644 index ce56fbb49..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Light1.h +++ /dev/null @@ -1,648 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Light1.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Light1; - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_invoke_request, /* name */ - be_nested_proto( - 21, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[20]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(command), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(findsubval), - /* K6 */ be_nested_str_weak(set_bri), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(bri_X3A), - /* K9 */ be_nested_str_weak(publish_command), - /* K10 */ be_nested_str_weak(Bri), - /* K11 */ be_nested_str_weak(tasmota), - /* K12 */ be_nested_str_weak(scale_uint), - /* K13 */ be_nested_str_weak(Dimmer), - /* K14 */ be_const_int(1), - /* K15 */ be_const_int(2), - /* K16 */ be_const_int(3), - /* K17 */ be_nested_str_weak(set_onoff), - /* K18 */ be_nested_str_weak(Power), - /* K19 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[132]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x541E0007, // 0004 LDINT R7 8 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0072, // 0006 JMPF R7 #007A - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0021, // 0008 JMPF R7 #002B - 0x8C1C0505, // 0009 GETMET R7 R2 K5 - 0x58240004, // 000A LDCONST R9 K4 - 0x7C1C0400, // 000B CALL R7 2 - 0x8C200106, // 000C GETMET R8 R0 K6 - 0x5C280E00, // 000D MOVE R10 R7 - 0x7C200400, // 000E CALL R8 2 - 0x60200008, // 000F GETGBL R8 G8 - 0x5C240E00, // 0010 MOVE R9 R7 - 0x7C200200, // 0011 CALL R8 1 - 0x00221008, // 0012 ADD R8 K8 R8 - 0x900E0E08, // 0013 SETMBR R3 K7 R8 - 0x8C200109, // 0014 GETMET R8 R0 K9 - 0x5828000A, // 0015 LDCONST R10 K10 - 0xB82E1600, // 0016 GETNGBL R11 K11 - 0x8C2C170C, // 0017 GETMET R11 R11 K12 - 0x5C340E00, // 0018 MOVE R13 R7 - 0x58380004, // 0019 LDCONST R14 K4 - 0x543E00FD, // 001A LDINT R15 254 - 0x58400004, // 001B LDCONST R16 K4 - 0x544600FE, // 001C LDINT R17 255 - 0x7C2C0C00, // 001D CALL R11 6 - 0x5830000D, // 001E LDCONST R12 K13 - 0xB8361600, // 001F GETNGBL R13 K11 - 0x8C341B0C, // 0020 GETMET R13 R13 K12 - 0x5C3C0E00, // 0021 MOVE R15 R7 - 0x58400004, // 0022 LDCONST R16 K4 - 0x544600FD, // 0023 LDINT R17 254 - 0x58480004, // 0024 LDCONST R18 K4 - 0x544E0063, // 0025 LDINT R19 100 - 0x7C340C00, // 0026 CALL R13 6 - 0x7C200A00, // 0027 CALL R8 5 - 0x50200200, // 0028 LDBOOL R8 1 0 - 0x80041000, // 0029 RET 1 R8 - 0x7002004D, // 002A JMP #0079 - 0x1C1C0D0E, // 002B EQ R7 R6 K14 - 0x781E0002, // 002C JMPF R7 #0030 - 0x501C0200, // 002D LDBOOL R7 1 0 - 0x80040E00, // 002E RET 1 R7 - 0x70020048, // 002F JMP #0079 - 0x1C1C0D0F, // 0030 EQ R7 R6 K15 - 0x781E0002, // 0031 JMPF R7 #0035 - 0x501C0200, // 0032 LDBOOL R7 1 0 - 0x80040E00, // 0033 RET 1 R7 - 0x70020043, // 0034 JMP #0079 - 0x1C1C0D10, // 0035 EQ R7 R6 K16 - 0x781E0002, // 0036 JMPF R7 #003A - 0x501C0200, // 0037 LDBOOL R7 1 0 - 0x80040E00, // 0038 RET 1 R7 - 0x7002003E, // 0039 JMP #0079 - 0x541E0003, // 003A LDINT R7 4 - 0x1C1C0C07, // 003B EQ R7 R6 R7 - 0x781E002A, // 003C JMPF R7 #0068 - 0x8C1C0505, // 003D GETMET R7 R2 K5 - 0x58240004, // 003E LDCONST R9 K4 - 0x7C1C0400, // 003F CALL R7 2 - 0x8C200106, // 0040 GETMET R8 R0 K6 - 0x5C280E00, // 0041 MOVE R10 R7 - 0x7C200400, // 0042 CALL R8 2 - 0x24200F04, // 0043 GT R8 R7 K4 - 0x8C240111, // 0044 GETMET R9 R0 K17 - 0x5C2C1000, // 0045 MOVE R11 R8 - 0x7C240400, // 0046 CALL R9 2 - 0x60240008, // 0047 GETGBL R9 G8 - 0x5C280E00, // 0048 MOVE R10 R7 - 0x7C240200, // 0049 CALL R9 1 - 0x00261009, // 004A ADD R9 K8 R9 - 0x900E0E09, // 004B SETMBR R3 K7 R9 - 0x8C240109, // 004C GETMET R9 R0 K9 - 0x582C000A, // 004D LDCONST R11 K10 - 0xB8321600, // 004E GETNGBL R12 K11 - 0x8C30190C, // 004F GETMET R12 R12 K12 - 0x5C380E00, // 0050 MOVE R14 R7 - 0x583C0004, // 0051 LDCONST R15 K4 - 0x544200FD, // 0052 LDINT R16 254 - 0x58440004, // 0053 LDCONST R17 K4 - 0x544A00FE, // 0054 LDINT R18 255 - 0x7C300C00, // 0055 CALL R12 6 - 0x5834000D, // 0056 LDCONST R13 K13 - 0xB83A1600, // 0057 GETNGBL R14 K11 - 0x8C381D0C, // 0058 GETMET R14 R14 K12 - 0x5C400E00, // 0059 MOVE R16 R7 - 0x58440004, // 005A LDCONST R17 K4 - 0x544A00FD, // 005B LDINT R18 254 - 0x584C0004, // 005C LDCONST R19 K4 - 0x54520063, // 005D LDINT R20 100 - 0x7C380C00, // 005E CALL R14 6 - 0x583C0012, // 005F LDCONST R15 K18 - 0x78220001, // 0060 JMPF R8 #0063 - 0x5840000E, // 0061 LDCONST R16 K14 - 0x70020000, // 0062 JMP #0064 - 0x58400004, // 0063 LDCONST R16 K4 - 0x7C240E00, // 0064 CALL R9 7 - 0x50240200, // 0065 LDBOOL R9 1 0 - 0x80041200, // 0066 RET 1 R9 - 0x70020010, // 0067 JMP #0079 - 0x541E0004, // 0068 LDINT R7 5 - 0x1C1C0C07, // 0069 EQ R7 R6 R7 - 0x781E0002, // 006A JMPF R7 #006E - 0x501C0200, // 006B LDBOOL R7 1 0 - 0x80040E00, // 006C RET 1 R7 - 0x7002000A, // 006D JMP #0079 - 0x541E0005, // 006E LDINT R7 6 - 0x1C1C0C07, // 006F EQ R7 R6 R7 - 0x781E0002, // 0070 JMPF R7 #0074 - 0x501C0200, // 0071 LDBOOL R7 1 0 - 0x80040E00, // 0072 RET 1 R7 - 0x70020004, // 0073 JMP #0079 - 0x541E0006, // 0074 LDINT R7 7 - 0x1C1C0C07, // 0075 EQ R7 R6 R7 - 0x781E0001, // 0076 JMPF R7 #0079 - 0x501C0200, // 0077 LDBOOL R7 1 0 - 0x80040E00, // 0078 RET 1 R7 - 0x70020008, // 0079 JMP #0083 - 0x601C0003, // 007A GETGBL R7 G3 - 0x5C200000, // 007B MOVE R8 R0 - 0x7C1C0200, // 007C CALL R7 1 - 0x8C1C0F13, // 007D GETMET R7 R7 K19 - 0x5C240200, // 007E MOVE R9 R1 - 0x5C280400, // 007F MOVE R10 R2 - 0x5C2C0600, // 0080 MOVE R11 R3 - 0x7C1C0800, // 0081 CALL R7 4 - 0x80040E00, // 0082 RET 1 R7 - 0x80000000, // 0083 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: read_attribute -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_read_attribute, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(attribute), - /* K4 */ be_nested_str_weak(update_shadow_lazy), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(shadow_bri), - /* K7 */ be_nested_str_weak(set), - /* K8 */ be_nested_str_weak(U1), - /* K9 */ be_nested_str_weak(NULL), - /* K10 */ be_const_int(2), - /* K11 */ be_const_int(3), - /* K12 */ be_nested_str_weak(read_attribute), - }), - be_str_weak(read_attribute), - &be_const_str_solidified, - ( &(const binstruction[79]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140502, // 0002 GETMBR R5 R2 K2 - 0x88180503, // 0003 GETMBR R6 R2 K3 - 0x541E0007, // 0004 LDINT R7 8 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E003E, // 0006 JMPF R7 #0046 - 0x8C1C0104, // 0007 GETMET R7 R0 K4 - 0x7C1C0200, // 0008 CALL R7 1 - 0x1C1C0D05, // 0009 EQ R7 R6 K5 - 0x781E000F, // 000A JMPF R7 #001B - 0x881C0106, // 000B GETMBR R7 R0 K6 - 0x4C200000, // 000C LDNIL R8 - 0x201C0E08, // 000D NE R7 R7 R8 - 0x781E0005, // 000E JMPF R7 #0015 - 0x8C1C0707, // 000F GETMET R7 R3 K7 - 0x88240908, // 0010 GETMBR R9 R4 K8 - 0x88280106, // 0011 GETMBR R10 R0 K6 - 0x7C1C0600, // 0012 CALL R7 3 - 0x80040E00, // 0013 RET 1 R7 - 0x70020004, // 0014 JMP #001A - 0x8C1C0707, // 0015 GETMET R7 R3 K7 - 0x88240909, // 0016 GETMBR R9 R4 K9 - 0x4C280000, // 0017 LDNIL R10 - 0x7C1C0600, // 0018 CALL R7 3 - 0x80040E00, // 0019 RET 1 R7 - 0x7002002A, // 001A JMP #0046 - 0x1C1C0D0A, // 001B EQ R7 R6 K10 - 0x781E0005, // 001C JMPF R7 #0023 - 0x8C1C0707, // 001D GETMET R7 R3 K7 - 0x88240908, // 001E GETMBR R9 R4 K8 - 0x58280005, // 001F LDCONST R10 K5 - 0x7C1C0600, // 0020 CALL R7 3 - 0x80040E00, // 0021 RET 1 R7 - 0x70020022, // 0022 JMP #0046 - 0x1C1C0D0B, // 0023 EQ R7 R6 K11 - 0x781E0005, // 0024 JMPF R7 #002B - 0x8C1C0707, // 0025 GETMET R7 R3 K7 - 0x88240908, // 0026 GETMBR R9 R4 K8 - 0x542A00FD, // 0027 LDINT R10 254 - 0x7C1C0600, // 0028 CALL R7 3 - 0x80040E00, // 0029 RET 1 R7 - 0x7002001A, // 002A JMP #0046 - 0x541E000E, // 002B LDINT R7 15 - 0x1C1C0C07, // 002C EQ R7 R6 R7 - 0x781E0005, // 002D JMPF R7 #0034 - 0x8C1C0707, // 002E GETMET R7 R3 K7 - 0x88240908, // 002F GETMBR R9 R4 K8 - 0x58280005, // 0030 LDCONST R10 K5 - 0x7C1C0600, // 0031 CALL R7 3 - 0x80040E00, // 0032 RET 1 R7 - 0x70020011, // 0033 JMP #0046 - 0x541E0010, // 0034 LDINT R7 17 - 0x1C1C0C07, // 0035 EQ R7 R6 R7 - 0x781E000E, // 0036 JMPF R7 #0046 - 0x881C0106, // 0037 GETMBR R7 R0 K6 - 0x4C200000, // 0038 LDNIL R8 - 0x201C0E08, // 0039 NE R7 R7 R8 - 0x781E0005, // 003A JMPF R7 #0041 - 0x8C1C0707, // 003B GETMET R7 R3 K7 - 0x88240908, // 003C GETMBR R9 R4 K8 - 0x88280106, // 003D GETMBR R10 R0 K6 - 0x7C1C0600, // 003E CALL R7 3 - 0x80040E00, // 003F RET 1 R7 - 0x70020004, // 0040 JMP #0046 - 0x8C1C0707, // 0041 GETMET R7 R3 K7 - 0x88240909, // 0042 GETMBR R9 R4 K9 - 0x4C280000, // 0043 LDNIL R10 - 0x7C1C0600, // 0044 CALL R7 3 - 0x80040E00, // 0045 RET 1 R7 - 0x601C0003, // 0046 GETGBL R7 G3 - 0x5C200000, // 0047 MOVE R8 R0 - 0x7C1C0200, // 0048 CALL R7 1 - 0x8C1C0F0C, // 0049 GETMET R7 R7 K12 - 0x5C240200, // 004A MOVE R9 R1 - 0x5C280400, // 004B MOVE R10 R2 - 0x5C2C0600, // 004C MOVE R11 R3 - 0x7C1C0800, // 004D CALL R7 4 - 0x80040E00, // 004E RET 1 R7 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_web_values, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X25s_X20_X25s), - /* K4 */ be_nested_str_weak(web_value_onoff), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(web_value_dimmer), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x8C180104, // 0006 GETMET R6 R0 K4 - 0x88200105, // 0007 GETMBR R8 R0 K5 - 0x7C180400, // 0008 CALL R6 2 - 0x8C1C0106, // 0009 GETMET R7 R0 K6 - 0x7C1C0200, // 000A CALL R7 1 - 0x7C100600, // 000B CALL R4 3 - 0x7C080400, // 000C CALL R2 2 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_bri -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_set_bri, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(scale_uint), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(call_remote_sync), - /* K4 */ be_nested_str_weak(Dimmer), - /* K5 */ be_nested_str_weak(parse_update), - }), - be_str_weak(set_bri), - &be_const_str_solidified, - ( &(const binstruction[22]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x58140002, // 0003 LDCONST R5 K2 - 0x541A00FD, // 0004 LDINT R6 254 - 0x581C0002, // 0005 LDCONST R7 K2 - 0x54220063, // 0006 LDINT R8 100 - 0x7C080C00, // 0007 CALL R2 6 - 0x8C0C0103, // 0008 GETMET R3 R0 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x60180008, // 000A GETGBL R6 G8 - 0x5C1C0400, // 000B MOVE R7 R2 - 0x7C180200, // 000C CALL R6 1 - 0x7C0C0600, // 000D CALL R3 3 - 0x4C100000, // 000E LDNIL R4 - 0x20100604, // 000F NE R4 R3 R4 - 0x78120003, // 0010 JMPF R4 #0015 - 0x8C100105, // 0011 GETMET R4 R0 K5 - 0x5C180600, // 0012 MOVE R6 R3 - 0x541E000A, // 0013 LDINT R7 11 - 0x7C100600, // 0014 CALL R4 3 - 0x80000000, // 0015 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_parse_update, /* name */ - be_nested_proto( - 11, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_update), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(Dimmer), - /* K3 */ be_nested_str_weak(tasmota), - /* K4 */ be_nested_str_weak(scale_uint), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(shadow_bri), - /* K7 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0x600C0003, // 0000 GETGBL R3 G3 - 0x5C100000, // 0001 MOVE R4 R0 - 0x7C0C0200, // 0002 CALL R3 1 - 0x8C0C0700, // 0003 GETMET R3 R3 K0 - 0x5C140200, // 0004 MOVE R5 R1 - 0x5C180400, // 0005 MOVE R6 R2 - 0x7C0C0600, // 0006 CALL R3 3 - 0x540E000A, // 0007 LDINT R3 11 - 0x1C0C0403, // 0008 EQ R3 R2 R3 - 0x780E0017, // 0009 JMPF R3 #0022 - 0x600C0009, // 000A GETGBL R3 G9 - 0x8C100301, // 000B GETMET R4 R1 K1 - 0x58180002, // 000C LDCONST R6 K2 - 0x7C100400, // 000D CALL R4 2 - 0x7C0C0200, // 000E CALL R3 1 - 0x4C100000, // 000F LDNIL R4 - 0x20100604, // 0010 NE R4 R3 R4 - 0x7812000F, // 0011 JMPF R4 #0022 - 0xB8120600, // 0012 GETNGBL R4 K3 - 0x8C100904, // 0013 GETMET R4 R4 K4 - 0x5C180600, // 0014 MOVE R6 R3 - 0x581C0005, // 0015 LDCONST R7 K5 - 0x54220063, // 0016 LDINT R8 100 - 0x58240005, // 0017 LDCONST R9 K5 - 0x542A00FD, // 0018 LDINT R10 254 - 0x7C100C00, // 0019 CALL R4 6 - 0x88140106, // 001A GETMBR R5 R0 K6 - 0x20140805, // 001B NE R5 R4 R5 - 0x78160004, // 001C JMPF R5 #0022 - 0x8C140107, // 001D GETMET R5 R0 K7 - 0x541E0007, // 001E LDINT R7 8 - 0x58200005, // 001F LDCONST R8 K5 - 0x7C140600, // 0020 CALL R5 3 - 0x90020C04, // 0021 SETMBR R0 K6 R4 - 0x80000000, // 0022 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_value_dimmer -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_closure(class_Matter_Plugin_Bridge_Light1_web_value_dimmer, /* name */ - be_nested_proto( - 9, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light1, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(), - /* K1 */ be_nested_str_weak(shadow_bri), - /* K2 */ be_nested_str_weak(tasmota), - /* K3 */ be_nested_str_weak(scale_uint), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(_X25i_X25_X25), - /* K6 */ be_nested_str_weak(_X26_X23128261_X3B_X20), - }), - be_str_weak(web_value_dimmer), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x20080403, // 0003 NE R2 R2 R3 - 0x780A000C, // 0004 JMPF R2 #0012 - 0xB80A0400, // 0005 GETNGBL R2 K2 - 0x8C080503, // 0006 GETMET R2 R2 K3 - 0x88100101, // 0007 GETMBR R4 R0 K1 - 0x58140004, // 0008 LDCONST R5 K4 - 0x541A00FD, // 0009 LDINT R6 254 - 0x581C0004, // 000A LDCONST R7 K4 - 0x54220063, // 000B LDINT R8 100 - 0x7C080C00, // 000C CALL R2 6 - 0x600C0018, // 000D GETGBL R3 G24 - 0x58100005, // 000E LDCONST R4 K5 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x5C040600, // 0011 MOVE R1 R3 - 0x000A0C01, // 0012 ADD R2 K6 R1 - 0x80040400, // 0013 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Light1 -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light0; -be_local_class(Matter_Plugin_Bridge_Light1, - 1, - &be_class_Matter_Plugin_Bridge_Light0, - be_nested_map(11, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(web_value_dimmer, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_web_value_dimmer_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_parse_update_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light1) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_read_attribute_closure) }, - { be_const_key_weak(TYPES, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(257, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(shadow_bri, -1), be_const_var(0) }, - { be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(7, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(29, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(8, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(2), - be_const_int(3), - be_const_int(15), - be_const_int(17), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(set_bri, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_set_bri_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) }, - { be_const_key_weak(web_values, 1), be_const_closure(class_Matter_Plugin_Bridge_Light1_web_values_closure) }, - { be_const_key_weak(invoke_request, 0), be_const_closure(class_Matter_Plugin_Bridge_Light1_invoke_request_closure) }, - })), - be_str_weak(Matter_Plugin_Bridge_Light1) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h deleted file mode 100644 index b8f7cb5b0..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h +++ /dev/null @@ -1,229 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Sensor_Flow.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Flow, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[10]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x20080202, // 0001 NE R2 R1 R2 - 0x780A0004, // 0002 JMPF R2 #0008 - 0x60080009, // 0003 GETGBL R2 G9 - 0x540E0009, // 0004 LDINT R3 10 - 0x080C0203, // 0005 MUL R3 R1 R3 - 0x7C080200, // 0006 CALL R2 1 - 0x70020000, // 0007 JMP #0009 - 0x4C080000, // 0008 LDNIL R2 - 0x80040400, // 0009 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Flow, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E0403, // 0001 LDINT R3 1028 - 0x58100001, // 0002 LDCONST R4 K1 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Flow' -extern bclosure *class_Matter_Plugin_Sensor_Flow_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_web_values, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Flow, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20m3_X2Fh), - /* K4 */ be_nested_str_weak(shadow_value), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x60180009, // 0006 GETGBL R6 G9 - 0x881C0104, // 0007 GETMBR R7 R0 K4 - 0x7C180200, // 0008 CALL R6 1 - 0x7C100400, // 0009 CALL R4 2 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Flow -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_class(Matter_Plugin_Bridge_Sensor_Flow, - 0, - &be_class_Matter_Plugin_Bridge_Sensor, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_pre_value_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_web_values_closure) }, - { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(774, -1), be_const_int(1) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_static_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) }, - { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed_closure) }, - { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Flow) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_flow) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1028, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Flow) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h deleted file mode 100644 index 0c1681ff3..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h +++ /dev/null @@ -1,237 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Sensor_Humidity.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Humidity, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Humidity, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E0404, // 0001 LDINT R3 1029 - 0x58100001, // 0002 LDCONST R4 K1 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Humidity' -extern bclosure *class_Matter_Plugin_Sensor_Humidity_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_web_values, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Humidity, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26_X23x1F4A7_X3B_X20_X252_X2E0f_X25_X25), - /* K4 */ be_nested_str_weak(shadow_value), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x4C1C0000, // 0007 LDNIL R7 - 0x20180C07, // 0008 NE R6 R6 R7 - 0x781A0005, // 0009 JMPF R6 #0010 - 0x6018000A, // 000A GETGBL R6 G10 - 0x881C0104, // 000B GETMBR R7 R0 K4 - 0x7C180200, // 000C CALL R6 1 - 0x541E0063, // 000D LDINT R7 100 - 0x0C180C07, // 000E DIV R6 R6 R7 - 0x70020000, // 000F JMP #0011 - 0x4C180000, // 0010 LDNIL R6 - 0x7C100400, // 0011 CALL R4 2 - 0x7C080400, // 0012 CALL R2 2 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Humidity -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_class(Matter_Plugin_Bridge_Sensor_Humidity, - 0, - &be_class_Matter_Plugin_Bridge_Sensor, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_pre_value_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_web_values_closure) }, - { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(775, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) }, - { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed_closure) }, - { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Humidity) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_humidity) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1029, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Humidity) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h deleted file mode 100644 index 49558b390..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h +++ /dev/null @@ -1,241 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Sensor_Illuminance.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_pre_value, /* name */ - be_nested_proto( - 6, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Illuminance, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(math), - /* K1 */ be_const_int(0), - /* K2 */ be_nested_str_weak(log10), - /* K3 */ be_const_int(1), - }), - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[17]) { /* code */ - 0x4C080000, // 0000 LDNIL R2 - 0x1C080202, // 0001 EQ R2 R1 R2 - 0x780A0001, // 0002 JMPF R2 #0005 - 0x4C080000, // 0003 LDNIL R2 - 0x80040400, // 0004 RET 1 R2 - 0xA40A0000, // 0005 IMPORT R2 K0 - 0x140C0301, // 0006 LT R3 R1 K1 - 0x780E0001, // 0007 JMPF R3 #000A - 0x80060200, // 0008 RET 1 K1 - 0x70020005, // 0009 JMP #0010 - 0x8C0C0502, // 000A GETMET R3 R2 K2 - 0x00140303, // 000B ADD R5 R1 K3 - 0x7C0C0400, // 000C CALL R3 2 - 0x5412270F, // 000D LDINT R4 10000 - 0x080C0604, // 000E MUL R3 R3 R4 - 0x80040600, // 000F RET 1 R3 - 0x80000000, // 0010 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Illuminance, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E03FF, // 0001 LDINT R3 1024 - 0x58100001, // 0002 LDCONST R4 K1 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Illuminance' -extern bclosure *class_Matter_Plugin_Sensor_Illuminance_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_web_values, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Illuminance, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26_X23128261_X3B_X20_X25ilux), - /* K4 */ be_nested_str_weak(shadow_value), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x60180009, // 0006 GETGBL R6 G9 - 0x881C0104, // 0007 GETMBR R7 R0 K4 - 0x7C180200, // 0008 CALL R6 1 - 0x7C100400, // 0009 CALL R4 2 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Illuminance -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance, - 0, - &be_class_Matter_Plugin_Bridge_Sensor, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_pre_value_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_web_values_closure) }, - { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(262, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) }, - { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed_closure) }, - { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Illuminance) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_illuminance) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1024, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Illuminance) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h deleted file mode 100644 index 4a8cf45cd..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h +++ /dev/null @@ -1,228 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Sensor_Pressure.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Pressure, - 0, /* has constants */ - NULL, /* no const */ - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(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 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Pressure, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E0402, // 0001 LDINT R3 1027 - 0x58100001, // 0002 LDCONST R4 K1 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Pressure' -extern bclosure *class_Matter_Plugin_Sensor_Pressure_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_web_values, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Pressure, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20hPa), - /* K4 */ be_nested_str_weak(shadow_value), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[12]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x60180009, // 0006 GETGBL R6 G9 - 0x881C0104, // 0007 GETMBR R7 R0 K4 - 0x7C180200, // 0008 CALL R6 1 - 0x7C100400, // 0009 CALL R4 2 - 0x7C080400, // 000A CALL R2 2 - 0x80000000, // 000B RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Pressure -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_class(Matter_Plugin_Bridge_Sensor_Pressure, - 0, - &be_class_Matter_Plugin_Bridge_Sensor, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_pre_value_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_web_values_closure) }, - { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(773, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) }, - { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed_closure) }, - { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Pressure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_pressure) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(1027, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Pressure) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h deleted file mode 100644 index 001b3984d..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h +++ /dev/null @@ -1,249 +0,0 @@ -/* Solidification of Matter_Plugin_4_Bridge_Sensor_Temp.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; - -/******************************************************************** -** Solidified function: pre_value -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_pre_value, /* name */ - be_nested_proto( - 4, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Temp, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(temp_unit), - /* K1 */ be_nested_str_weak(TEMP_F), - /* K2 */ be_const_real_hex(0x3FE66666), - }), - be_str_weak(pre_value), - &be_const_str_solidified, - ( &(const binstruction[18]) { /* code */ - 0x88080100, // 0000 GETMBR R2 R0 K0 - 0x880C0101, // 0001 GETMBR R3 R0 K1 - 0x1C080403, // 0002 EQ R2 R2 R3 - 0x780A0003, // 0003 JMPF R2 #0008 - 0x540A001F, // 0004 LDINT R2 32 - 0x04080202, // 0005 SUB R2 R1 R2 - 0x0C080502, // 0006 DIV R2 R2 K2 - 0x5C040400, // 0007 MOVE R1 R2 - 0x4C080000, // 0008 LDNIL R2 - 0x20080202, // 0009 NE R2 R1 R2 - 0x780A0004, // 000A JMPF R2 #0010 - 0x60080009, // 000B GETGBL R2 G9 - 0x540E0063, // 000C LDINT R3 100 - 0x080C0203, // 000D MUL R3 R1 R3 - 0x7C080200, // 000E CALL R2 1 - 0x70020000, // 000F JMP #0011 - 0x4C080000, // 0010 LDNIL R2 - 0x80040400, // 0011 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: value_changed -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed, /* name */ - be_nested_proto( - 5, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Temp, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(attribute_updated), - /* K1 */ be_const_int(0), - }), - be_str_weak(value_changed), - &be_const_str_solidified, - ( &(const binstruction[ 5]) { /* code */ - 0x8C040100, // 0000 GETMET R1 R0 K0 - 0x540E0401, // 0001 LDINT R3 1026 - 0x58100001, // 0002 LDCONST R4 K1 - 0x7C040600, // 0003 CALL R1 3 - 0x80000000, // 0004 RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Temp' -extern bclosure *class_Matter_Plugin_Sensor_Temp_read_attribute; - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; -be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_web_values, /* name */ - be_nested_proto( - 8, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Sensor_Temp, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X26_X23x2600_X3B_X26_X23xFE0F_X3B_X20_X25_X2E1f_X20_XC2_XB0C), - /* K4 */ be_nested_str_weak(shadow_value), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x88180104, // 0006 GETMBR R6 R0 K4 - 0x4C1C0000, // 0007 LDNIL R7 - 0x20180C07, // 0008 NE R6 R6 R7 - 0x781A0005, // 0009 JMPF R6 #0010 - 0x6018000A, // 000A GETGBL R6 G10 - 0x881C0104, // 000B GETMBR R7 R0 K4 - 0x7C180200, // 000C CALL R6 1 - 0x541E0063, // 000D LDINT R7 100 - 0x0C180C07, // 000E DIV R6 R6 R7 - 0x70020000, // 000F JMP #0011 - 0x4C180000, // 0010 LDNIL R6 - 0x7C100400, // 0011 CALL R4 2 - 0x7C080400, // 0012 CALL R2 2 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Sensor_Temp -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Sensor; -be_local_class(Matter_Plugin_Bridge_Sensor_Temp, - 0, - &be_class_Matter_Plugin_Bridge_Sensor, - be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_pre_value_closure) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_web_values_closure) }, - { be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(770, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) }, - { be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed_closure) }, - { be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Temperature) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_temperature) }, - { be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(6, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(9, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - })), - be_str_weak(Matter_Plugin_Bridge_Sensor_Temp) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h deleted file mode 100644 index 703f9b595..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light2.h +++ /dev/null @@ -1,550 +0,0 @@ -/* Solidification of Matter_Plugin_5_Bridge_Light2.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Light2; - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 2]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - /* K1 */ be_nested_str_weak(update_ct_minmax), - }), - 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 - 0x8C100101, // 0008 GETMET R4 R0 K1 - 0x7C100200, // 0009 CALL R4 1 - 0x80000000, // 000A RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_parse_update, /* name */ - be_nested_proto( - 8, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 7]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_update), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(CT), - /* K3 */ be_nested_str_weak(shadow_ct), - /* K4 */ be_nested_str_weak(ct_min), - /* K5 */ be_nested_str_weak(ct_max), - /* K6 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[35]) { /* code */ - 0x600C0003, // 0000 GETGBL R3 G3 - 0x5C100000, // 0001 MOVE R4 R0 - 0x7C0C0200, // 0002 CALL R3 1 - 0x8C0C0700, // 0003 GETMET R3 R3 K0 - 0x5C140200, // 0004 MOVE R5 R1 - 0x5C180400, // 0005 MOVE R6 R2 - 0x7C0C0600, // 0006 CALL R3 3 - 0x540E000A, // 0007 LDINT R3 11 - 0x1C0C0403, // 0008 EQ R3 R2 R3 - 0x780E0017, // 0009 JMPF R3 #0022 - 0x600C0009, // 000A GETGBL R3 G9 - 0x8C100301, // 000B GETMET R4 R1 K1 - 0x58180002, // 000C LDCONST R6 K2 - 0x7C100400, // 000D CALL R4 2 - 0x7C0C0200, // 000E CALL R3 1 - 0x4C100000, // 000F LDNIL R4 - 0x20100604, // 0010 NE R4 R3 R4 - 0x7812000F, // 0011 JMPF R4 #0022 - 0x88100103, // 0012 GETMBR R4 R0 K3 - 0x20100604, // 0013 NE R4 R3 R4 - 0x7812000C, // 0014 JMPF R4 #0022 - 0x88100104, // 0015 GETMBR R4 R0 K4 - 0x14100604, // 0016 LT R4 R3 R4 - 0x78120000, // 0017 JMPF R4 #0019 - 0x880C0104, // 0018 GETMBR R3 R0 K4 - 0x88100105, // 0019 GETMBR R4 R0 K5 - 0x24100604, // 001A GT R4 R3 R4 - 0x78120000, // 001B JMPF R4 #001D - 0x880C0105, // 001C GETMBR R3 R0 K5 - 0x8C100106, // 001D GETMET R4 R0 K6 - 0x541A02FF, // 001E LDINT R6 768 - 0x541E0006, // 001F LDINT R7 7 - 0x7C100600, // 0020 CALL R4 3 - 0x90020603, // 0021 SETMBR R0 K3 R3 - 0x80000000, // 0022 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), - /* K4 */ be_nested_str_weak(web_value_onoff), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(web_value_dimmer), - /* K7 */ be_nested_str_weak(web_value_ct), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x8C180104, // 0006 GETMET R6 R0 K4 - 0x88200105, // 0007 GETMBR R8 R0 K5 - 0x7C180400, // 0008 CALL R6 2 - 0x8C1C0106, // 0009 GETMET R7 R0 K6 - 0x7C1C0200, // 000A CALL R7 1 - 0x8C200107, // 000B GETMET R8 R0 K7 - 0x7C200200, // 000C CALL R8 1 - 0x7C100800, // 000D CALL R4 4 - 0x7C080400, // 000E CALL R2 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_value_ct -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_web_value_ct, /* name */ - be_nested_proto( - 6, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 5]) { /* constants */ - /* K0 */ be_nested_str_weak(), - /* K1 */ be_nested_str_weak(shadow_ct), - /* K2 */ be_const_int(1000000), - /* K3 */ be_nested_str_weak(_X25iK), - /* K4 */ be_nested_str_weak(_X26_X239898_X3B_X20), - }), - be_str_weak(web_value_ct), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0x58040000, // 0000 LDCONST R1 K0 - 0x88080101, // 0001 GETMBR R2 R0 K1 - 0x4C0C0000, // 0002 LDNIL R3 - 0x20080403, // 0003 NE R2 R2 R3 - 0x780A000C, // 0004 JMPF R2 #0012 - 0x88080101, // 0005 GETMBR R2 R0 K1 - 0x0C0A0402, // 0006 DIV R2 K2 R2 - 0x540E0018, // 0007 LDINT R3 25 - 0x00080403, // 0008 ADD R2 R2 R3 - 0x540E0031, // 0009 LDINT R3 50 - 0x0C080403, // 000A DIV R2 R2 R3 - 0x540E0031, // 000B LDINT R3 50 - 0x08080403, // 000C MUL R2 R2 R3 - 0x600C0018, // 000D GETGBL R3 G24 - 0x58100003, // 000E LDCONST R4 K3 - 0x5C140400, // 000F MOVE R5 R2 - 0x7C0C0400, // 0010 CALL R3 2 - 0x5C040600, // 0011 MOVE R1 R3 - 0x000A0801, // 0012 ADD R2 K4 R1 - 0x80040400, // 0013 RET 1 R2 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_ct -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_set_ct, /* name */ - be_nested_proto( - 7, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 3]) { /* constants */ - /* K0 */ be_nested_str_weak(call_remote_sync), - /* K1 */ be_nested_str_weak(CT), - /* K2 */ be_nested_str_weak(parse_update), - }), - be_str_weak(set_ct), - &be_const_str_solidified, - ( &(const binstruction[14]) { /* code */ - 0x8C080100, // 0000 GETMET R2 R0 K0 - 0x58100001, // 0001 LDCONST R4 K1 - 0x60140008, // 0002 GETGBL R5 G8 - 0x5C180200, // 0003 MOVE R6 R1 - 0x7C140200, // 0004 CALL R5 1 - 0x7C080600, // 0005 CALL R2 3 - 0x4C0C0000, // 0006 LDNIL R3 - 0x200C0403, // 0007 NE R3 R2 R3 - 0x780E0003, // 0008 JMPF R3 #000D - 0x8C0C0102, // 0009 GETMET R3 R0 K2 - 0x5C140400, // 000A MOVE R5 R2 - 0x541A000A, // 000B LDINT R6 11 - 0x7C0C0600, // 000C CALL R3 3 - 0x80000000, // 000D RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_invoke_request, /* name */ - be_nested_proto( - 12, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[14]) { /* 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(findsubval), - /* K5 */ be_const_int(0), - /* K6 */ be_nested_str_weak(ct_min), - /* K7 */ be_nested_str_weak(ct_max), - /* K8 */ be_nested_str_weak(set_ct), - /* K9 */ be_nested_str_weak(log), - /* K10 */ be_nested_str_weak(ct_X3A), - /* K11 */ be_nested_str_weak(publish_command), - /* K12 */ be_nested_str_weak(CT), - /* K13 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[64]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x541E02FF, // 0004 LDINT R7 768 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E002E, // 0006 JMPF R7 #0036 - 0x541E0009, // 0007 LDINT R7 10 - 0x1C1C0C07, // 0008 EQ R7 R6 R7 - 0x781E0019, // 0009 JMPF R7 #0024 - 0x8C1C0504, // 000A GETMET R7 R2 K4 - 0x58240005, // 000B LDCONST R9 K5 - 0x7C1C0400, // 000C CALL R7 2 - 0x88200106, // 000D GETMBR R8 R0 K6 - 0x14200E08, // 000E LT R8 R7 R8 - 0x78220000, // 000F JMPF R8 #0011 - 0x881C0106, // 0010 GETMBR R7 R0 K6 - 0x88200107, // 0011 GETMBR R8 R0 K7 - 0x24200E08, // 0012 GT R8 R7 R8 - 0x78220000, // 0013 JMPF R8 #0015 - 0x881C0107, // 0014 GETMBR R7 R0 K7 - 0x8C200108, // 0015 GETMET R8 R0 K8 - 0x5C280E00, // 0016 MOVE R10 R7 - 0x7C200400, // 0017 CALL R8 2 - 0x60200008, // 0018 GETGBL R8 G8 - 0x5C240E00, // 0019 MOVE R9 R7 - 0x7C200200, // 001A CALL R8 1 - 0x00221408, // 001B ADD R8 K10 R8 - 0x900E1208, // 001C SETMBR R3 K9 R8 - 0x8C20010B, // 001D GETMET R8 R0 K11 - 0x5828000C, // 001E LDCONST R10 K12 - 0x5C2C0E00, // 001F MOVE R11 R7 - 0x7C200600, // 0020 CALL R8 3 - 0x50200200, // 0021 LDBOOL R8 1 0 - 0x80041000, // 0022 RET 1 R8 - 0x70020010, // 0023 JMP #0035 - 0x541E0046, // 0024 LDINT R7 71 - 0x1C1C0C07, // 0025 EQ R7 R6 R7 - 0x781E0002, // 0026 JMPF R7 #002A - 0x501C0200, // 0027 LDBOOL R7 1 0 - 0x80040E00, // 0028 RET 1 R7 - 0x7002000A, // 0029 JMP #0035 - 0x541E004A, // 002A LDINT R7 75 - 0x1C1C0C07, // 002B EQ R7 R6 R7 - 0x781E0002, // 002C JMPF R7 #0030 - 0x501C0200, // 002D LDBOOL R7 1 0 - 0x80040E00, // 002E RET 1 R7 - 0x70020004, // 002F JMP #0035 - 0x541E004B, // 0030 LDINT R7 76 - 0x1C1C0C07, // 0031 EQ R7 R6 R7 - 0x781E0001, // 0032 JMPF R7 #0035 - 0x501C0200, // 0033 LDBOOL R7 1 0 - 0x80040E00, // 0034 RET 1 R7 - 0x70020008, // 0035 JMP #003F - 0x601C0003, // 0036 GETGBL R7 G3 - 0x5C200000, // 0037 MOVE R8 R0 - 0x7C1C0200, // 0038 CALL R7 1 - 0x8C1C0F0D, // 0039 GETMET R7 R7 K13 - 0x5C240200, // 003A MOVE R9 R1 - 0x5C280400, // 003B MOVE R10 R2 - 0x5C2C0600, // 003C MOVE R11 R3 - 0x7C1C0800, // 003D CALL R7 4 - 0x80040E00, // 003E RET 1 R7 - 0x80000000, // 003F RET 0 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light2' -extern bclosure *class_Matter_Plugin_Light2_read_attribute; - -/******************************************************************** -** Solidified function: update_ct_minmax -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light2; -be_local_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax, /* name */ - be_nested_proto( - 4, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light2, - 1, /* has constants */ - ( &(const bvalue[ 4]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(get_option), - /* K2 */ be_nested_str_weak(ct_min), - /* K3 */ be_nested_str_weak(ct_max), - }), - be_str_weak(update_ct_minmax), - &be_const_str_solidified, - ( &(const binstruction[15]) { /* code */ - 0xB8060000, // 0000 GETNGBL R1 K0 - 0x8C040301, // 0001 GETMET R1 R1 K1 - 0x540E0051, // 0002 LDINT R3 82 - 0x7C040400, // 0003 CALL R1 2 - 0x78060001, // 0004 JMPF R1 #0007 - 0x540A00C7, // 0005 LDINT R2 200 - 0x70020000, // 0006 JMP #0008 - 0x540A0098, // 0007 LDINT R2 153 - 0x90020402, // 0008 SETMBR R0 K2 R2 - 0x78060001, // 0009 JMPF R1 #000C - 0x540A017B, // 000A LDINT R2 380 - 0x70020000, // 000B JMP #000D - 0x540A01F3, // 000C LDINT R2 500 - 0x90020602, // 000D SETMBR R0 K3 R2 - 0x80000000, // 000E RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Light2 -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_class(Matter_Plugin_Bridge_Light2, - 3, - &be_class_Matter_Plugin_Bridge_Light1, - be_nested_map(15, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_init_closure) }, - { be_const_key_weak(parse_update, 9), be_const_closure(class_Matter_Plugin_Bridge_Light2_parse_update_closure) }, - { be_const_key_weak(web_values, 11), be_const_closure(class_Matter_Plugin_Bridge_Light2_web_values_closure) }, - { be_const_key_weak(ct_max, -1), be_const_var(2) }, - { be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(2), - be_const_int(3), - be_const_int(15), - be_const_int(17), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(7), - be_const_int(8), - be_const_int(15), - be_const_int(16394), - be_const_int(16395), - be_const_int(16396), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(268, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(web_value_ct, 8), be_const_closure(class_Matter_Plugin_Bridge_Light2_web_value_ct_closure) }, - { be_const_key_weak(set_ct, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_set_ct_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X202_X20CT) }, - { be_const_key_weak(shadow_ct, -1), be_const_var(0) }, - { be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax_closure) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_invoke_request_closure) }, - { be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) }, - { be_const_key_weak(ct_min, -1), be_const_var(1) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light2) }, - })), - be_str_weak(Matter_Plugin_Bridge_Light2) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h deleted file mode 100644 index 31cbfdca5..000000000 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_5_Bridge_Light3.h +++ /dev/null @@ -1,699 +0,0 @@ -/* Solidification of Matter_Plugin_5_Bridge_Light3.h */ -/********************************************************************\ -* Generated code, don't edit * -\********************************************************************/ -#include "be_constobj.h" - -extern const bclass be_class_Matter_Plugin_Bridge_Light3; - -/******************************************************************** -** Solidified function: set_sat -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_set_sat, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(scale_uint), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(call_remote_sync), - /* K4 */ be_nested_str_weak(HSBColor2), - /* K5 */ be_nested_str_weak(parse_update), - }), - be_str_weak(set_sat), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x58140002, // 0003 LDCONST R5 K2 - 0x541A00FD, // 0004 LDINT R6 254 - 0x581C0002, // 0005 LDCONST R7 K2 - 0x54220063, // 0006 LDINT R8 100 - 0x7C080C00, // 0007 CALL R2 6 - 0x8C0C0103, // 0008 GETMET R3 R0 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x5C180400, // 000A MOVE R6 R2 - 0x7C0C0600, // 000B CALL R3 3 - 0x4C100000, // 000C LDNIL R4 - 0x20100604, // 000D NE R4 R3 R4 - 0x78120003, // 000E JMPF R4 #0013 - 0x8C100105, // 000F GETMET R4 R0 K5 - 0x5C180600, // 0010 MOVE R6 R3 - 0x541E000A, // 0011 LDINT R7 11 - 0x7C100600, // 0012 CALL R4 3 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: parse_update -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_parse_update, /* name */ - be_nested_proto( - 15, /* nstack */ - 3, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[13]) { /* constants */ - /* K0 */ be_nested_str_weak(parse_update), - /* K1 */ be_nested_str_weak(find), - /* K2 */ be_nested_str_weak(HSBColor), - /* K3 */ be_nested_str_weak(string), - /* K4 */ be_nested_str_weak(split), - /* K5 */ be_nested_str_weak(_X2C), - /* K6 */ be_const_int(0), - /* K7 */ be_const_int(1), - /* K8 */ be_nested_str_weak(tasmota), - /* K9 */ be_nested_str_weak(scale_uint), - /* K10 */ be_nested_str_weak(shadow_hue), - /* K11 */ be_nested_str_weak(shadow_sat), - /* K12 */ be_nested_str_weak(attribute_updated), - }), - be_str_weak(parse_update), - &be_const_str_solidified, - ( &(const binstruction[70]) { /* code */ - 0x600C0003, // 0000 GETGBL R3 G3 - 0x5C100000, // 0001 MOVE R4 R0 - 0x7C0C0200, // 0002 CALL R3 1 - 0x8C0C0700, // 0003 GETMET R3 R3 K0 - 0x5C140200, // 0004 MOVE R5 R1 - 0x5C180400, // 0005 MOVE R6 R2 - 0x7C0C0600, // 0006 CALL R3 3 - 0x540E000A, // 0007 LDINT R3 11 - 0x1C0C0403, // 0008 EQ R3 R2 R3 - 0x780E003A, // 0009 JMPF R3 #0045 - 0x8C0C0301, // 000A GETMET R3 R1 K1 - 0x58140002, // 000B LDCONST R5 K2 - 0x7C0C0400, // 000C CALL R3 2 - 0x780E0036, // 000D JMPF R3 #0045 - 0xA4120600, // 000E IMPORT R4 K3 - 0x8C140904, // 000F GETMET R5 R4 K4 - 0x5C1C0600, // 0010 MOVE R7 R3 - 0x58200005, // 0011 LDCONST R8 K5 - 0x7C140600, // 0012 CALL R5 3 - 0x60180009, // 0013 GETGBL R6 G9 - 0x941C0B06, // 0014 GETIDX R7 R5 K6 - 0x7C180200, // 0015 CALL R6 1 - 0x601C0009, // 0016 GETGBL R7 G9 - 0x94200B07, // 0017 GETIDX R8 R5 K7 - 0x7C1C0200, // 0018 CALL R7 1 - 0x4C200000, // 0019 LDNIL R8 - 0x20200C08, // 001A NE R8 R6 R8 - 0x78220009, // 001B JMPF R8 #0026 - 0xB8221000, // 001C GETNGBL R8 K8 - 0x8C201109, // 001D GETMET R8 R8 K9 - 0x5C280C00, // 001E MOVE R10 R6 - 0x582C0006, // 001F LDCONST R11 K6 - 0x54320167, // 0020 LDINT R12 360 - 0x58340006, // 0021 LDCONST R13 K6 - 0x543A00FD, // 0022 LDINT R14 254 - 0x7C200C00, // 0023 CALL R8 6 - 0x5C181000, // 0024 MOVE R6 R8 - 0x70020000, // 0025 JMP #0027 - 0x8818010A, // 0026 GETMBR R6 R0 K10 - 0x4C200000, // 0027 LDNIL R8 - 0x20200E08, // 0028 NE R8 R7 R8 - 0x78220009, // 0029 JMPF R8 #0034 - 0xB8221000, // 002A GETNGBL R8 K8 - 0x8C201109, // 002B GETMET R8 R8 K9 - 0x5C280E00, // 002C MOVE R10 R7 - 0x582C0006, // 002D LDCONST R11 K6 - 0x54320063, // 002E LDINT R12 100 - 0x58340006, // 002F LDCONST R13 K6 - 0x543A00FD, // 0030 LDINT R14 254 - 0x7C200C00, // 0031 CALL R8 6 - 0x5C1C1000, // 0032 MOVE R7 R8 - 0x70020000, // 0033 JMP #0035 - 0x881C010B, // 0034 GETMBR R7 R0 K11 - 0x8820010A, // 0035 GETMBR R8 R0 K10 - 0x20200C08, // 0036 NE R8 R6 R8 - 0x78220004, // 0037 JMPF R8 #003D - 0x8C20010C, // 0038 GETMET R8 R0 K12 - 0x542A02FF, // 0039 LDINT R10 768 - 0x582C0006, // 003A LDCONST R11 K6 - 0x7C200600, // 003B CALL R8 3 - 0x90021406, // 003C SETMBR R0 K10 R6 - 0x8820010B, // 003D GETMBR R8 R0 K11 - 0x20200E08, // 003E NE R8 R7 R8 - 0x78220004, // 003F JMPF R8 #0045 - 0x8C20010C, // 0040 GETMET R8 R0 K12 - 0x542A02FF, // 0041 LDINT R10 768 - 0x582C0007, // 0042 LDCONST R11 K7 - 0x7C200600, // 0043 CALL R8 3 - 0x90021607, // 0044 SETMBR R0 K11 R7 - 0x80000000, // 0045 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_values -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_web_values, /* name */ - be_nested_proto( - 10, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[ 8]) { /* constants */ - /* K0 */ be_nested_str_weak(webserver), - /* K1 */ be_nested_str_weak(web_values_prefix), - /* K2 */ be_nested_str_weak(content_send), - /* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s), - /* K4 */ be_nested_str_weak(web_value_onoff), - /* K5 */ be_nested_str_weak(shadow_onoff), - /* K6 */ be_nested_str_weak(web_value_dimmer), - /* K7 */ be_nested_str_weak(web_value_RGB), - }), - be_str_weak(web_values), - &be_const_str_solidified, - ( &(const binstruction[16]) { /* code */ - 0xA4060000, // 0000 IMPORT R1 K0 - 0x8C080101, // 0001 GETMET R2 R0 K1 - 0x7C080200, // 0002 CALL R2 1 - 0x8C080302, // 0003 GETMET R2 R1 K2 - 0x60100018, // 0004 GETGBL R4 G24 - 0x58140003, // 0005 LDCONST R5 K3 - 0x8C180104, // 0006 GETMET R6 R0 K4 - 0x88200105, // 0007 GETMBR R8 R0 K5 - 0x7C180400, // 0008 CALL R6 2 - 0x8C1C0106, // 0009 GETMET R7 R0 K6 - 0x7C1C0200, // 000A CALL R7 1 - 0x8C200107, // 000B GETMET R8 R0 K7 - 0x7C200200, // 000C CALL R8 1 - 0x7C100800, // 000D CALL R4 4 - 0x7C080400, // 000E CALL R2 2 - 0x80000000, // 000F RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: web_value_RGB -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB, /* name */ - be_nested_proto( - 12, /* nstack */ - 1, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[15]) { /* constants */ - /* K0 */ be_nested_str_weak(shadow_hue), - /* K1 */ be_nested_str_weak(shadow_sat), - /* K2 */ be_nested_str_weak(light_state), - /* K3 */ be_const_int(3), - /* K4 */ be_nested_str_weak(set_bri), - /* K5 */ be_nested_str_weak(set_huesat), - /* K6 */ be_nested_str_weak(tasmota), - /* K7 */ be_nested_str_weak(scale_uint), - /* K8 */ be_const_int(0), - /* K9 */ be_nested_str_weak(_X23_X2502X_X2502X_X2502X), - /* K10 */ be_nested_str_weak(r), - /* K11 */ be_nested_str_weak(g), - /* K12 */ be_nested_str_weak(b), - /* K13 */ be_nested_str_weak(_X3Ci_X20class_X3D_X22bxm_X22_X20style_X3D_X22_X2D_X2Dcl_X3A_X25s_X22_X3E_X3C_X2Fi_X3E_X25s), - /* K14 */ be_nested_str_weak(), - }), - be_str_weak(web_value_RGB), - &be_const_str_solidified, - ( &(const binstruction[45]) { /* code */ - 0x88040100, // 0000 GETMBR R1 R0 K0 - 0x4C080000, // 0001 LDNIL R2 - 0x20040202, // 0002 NE R1 R1 R2 - 0x78060027, // 0003 JMPF R1 #002C - 0x88040101, // 0004 GETMBR R1 R0 K1 - 0x4C080000, // 0005 LDNIL R2 - 0x20040202, // 0006 NE R1 R1 R2 - 0x78060023, // 0007 JMPF R1 #002C - 0xB8060400, // 0008 GETNGBL R1 K2 - 0x58080003, // 0009 LDCONST R2 K3 - 0x7C040200, // 000A CALL R1 1 - 0x8C080304, // 000B GETMET R2 R1 K4 - 0x541200FE, // 000C LDINT R4 255 - 0x7C080400, // 000D CALL R2 2 - 0x8C080305, // 000E GETMET R2 R1 K5 - 0xB8120C00, // 000F GETNGBL R4 K6 - 0x8C100907, // 0010 GETMET R4 R4 K7 - 0x88180100, // 0011 GETMBR R6 R0 K0 - 0x581C0008, // 0012 LDCONST R7 K8 - 0x542200FD, // 0013 LDINT R8 254 - 0x58240008, // 0014 LDCONST R9 K8 - 0x542A0167, // 0015 LDINT R10 360 - 0x7C100C00, // 0016 CALL R4 6 - 0xB8160C00, // 0017 GETNGBL R5 K6 - 0x8C140B07, // 0018 GETMET R5 R5 K7 - 0x881C0101, // 0019 GETMBR R7 R0 K1 - 0x58200008, // 001A LDCONST R8 K8 - 0x542600FD, // 001B LDINT R9 254 - 0x58280008, // 001C LDCONST R10 K8 - 0x542E00FE, // 001D LDINT R11 255 - 0x7C140C00, // 001E CALL R5 6 - 0x7C080600, // 001F CALL R2 3 - 0x60080018, // 0020 GETGBL R2 G24 - 0x580C0009, // 0021 LDCONST R3 K9 - 0x8810030A, // 0022 GETMBR R4 R1 K10 - 0x8814030B, // 0023 GETMBR R5 R1 K11 - 0x8818030C, // 0024 GETMBR R6 R1 K12 - 0x7C080800, // 0025 CALL R2 4 - 0x600C0018, // 0026 GETGBL R3 G24 - 0x5810000D, // 0027 LDCONST R4 K13 - 0x5C140400, // 0028 MOVE R5 R2 - 0x5C180400, // 0029 MOVE R6 R2 - 0x7C0C0600, // 002A CALL R3 3 - 0x80040600, // 002B RET 1 R3 - 0x80061C00, // 002C RET 1 K14 - }) - ) -); -/*******************************************************************/ - -// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light3' -extern bclosure *class_Matter_Plugin_Light3_read_attribute; - -/******************************************************************** -** Solidified function: invoke_request -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_invoke_request, /* name */ - be_nested_proto( - 15, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[19]) { /* constants */ - /* K0 */ be_nested_str_weak(matter), - /* K1 */ be_nested_str_weak(TLV), - /* K2 */ be_nested_str_weak(cluster), - /* K3 */ be_nested_str_weak(command), - /* K4 */ be_const_int(0), - /* K5 */ be_nested_str_weak(findsubval), - /* K6 */ be_nested_str_weak(set_hue), - /* K7 */ be_nested_str_weak(log), - /* K8 */ be_nested_str_weak(hue_X3A), - /* K9 */ be_nested_str_weak(publish_command), - /* K10 */ be_nested_str_weak(Hue), - /* K11 */ be_const_int(1), - /* K12 */ be_const_int(2), - /* K13 */ be_const_int(3), - /* K14 */ be_nested_str_weak(set_sat), - /* K15 */ be_nested_str_weak(sat_X3A), - /* K16 */ be_nested_str_weak(Sat), - /* K17 */ be_nested_str_weak(_X20sat_X3A), - /* K18 */ be_nested_str_weak(invoke_request), - }), - be_str_weak(invoke_request), - &be_const_str_solidified, - ( &(const binstruction[119]) { /* code */ - 0xB8120000, // 0000 GETNGBL R4 K0 - 0x88100901, // 0001 GETMBR R4 R4 K1 - 0x88140702, // 0002 GETMBR R5 R3 K2 - 0x88180703, // 0003 GETMBR R6 R3 K3 - 0x541E02FF, // 0004 LDINT R7 768 - 0x1C1C0A07, // 0005 EQ R7 R5 R7 - 0x781E0065, // 0006 JMPF R7 #006D - 0x1C1C0D04, // 0007 EQ R7 R6 K4 - 0x781E0011, // 0008 JMPF R7 #001B - 0x8C1C0505, // 0009 GETMET R7 R2 K5 - 0x58240004, // 000A LDCONST R9 K4 - 0x7C1C0400, // 000B CALL R7 2 - 0x8C200106, // 000C GETMET R8 R0 K6 - 0x5C280E00, // 000D MOVE R10 R7 - 0x7C200400, // 000E CALL R8 2 - 0x60200008, // 000F GETGBL R8 G8 - 0x5C240E00, // 0010 MOVE R9 R7 - 0x7C200200, // 0011 CALL R8 1 - 0x00221008, // 0012 ADD R8 K8 R8 - 0x900E0E08, // 0013 SETMBR R3 K7 R8 - 0x8C200109, // 0014 GETMET R8 R0 K9 - 0x5828000A, // 0015 LDCONST R10 K10 - 0x5C2C0E00, // 0016 MOVE R11 R7 - 0x7C200600, // 0017 CALL R8 3 - 0x50200200, // 0018 LDBOOL R8 1 0 - 0x80041000, // 0019 RET 1 R8 - 0x70020050, // 001A JMP #006C - 0x1C1C0D0B, // 001B EQ R7 R6 K11 - 0x781E0002, // 001C JMPF R7 #0020 - 0x501C0200, // 001D LDBOOL R7 1 0 - 0x80040E00, // 001E RET 1 R7 - 0x7002004B, // 001F JMP #006C - 0x1C1C0D0C, // 0020 EQ R7 R6 K12 - 0x781E0002, // 0021 JMPF R7 #0025 - 0x501C0200, // 0022 LDBOOL R7 1 0 - 0x80040E00, // 0023 RET 1 R7 - 0x70020046, // 0024 JMP #006C - 0x1C1C0D0D, // 0025 EQ R7 R6 K13 - 0x781E0011, // 0026 JMPF R7 #0039 - 0x8C1C0505, // 0027 GETMET R7 R2 K5 - 0x58240004, // 0028 LDCONST R9 K4 - 0x7C1C0400, // 0029 CALL R7 2 - 0x8C20010E, // 002A GETMET R8 R0 K14 - 0x5C280E00, // 002B MOVE R10 R7 - 0x7C200400, // 002C CALL R8 2 - 0x60200008, // 002D GETGBL R8 G8 - 0x5C240E00, // 002E MOVE R9 R7 - 0x7C200200, // 002F CALL R8 1 - 0x00221E08, // 0030 ADD R8 K15 R8 - 0x900E0E08, // 0031 SETMBR R3 K7 R8 - 0x8C200109, // 0032 GETMET R8 R0 K9 - 0x58280010, // 0033 LDCONST R10 K16 - 0x5C2C0E00, // 0034 MOVE R11 R7 - 0x7C200600, // 0035 CALL R8 3 - 0x50200200, // 0036 LDBOOL R8 1 0 - 0x80041000, // 0037 RET 1 R8 - 0x70020032, // 0038 JMP #006C - 0x541E0003, // 0039 LDINT R7 4 - 0x1C1C0C07, // 003A EQ R7 R6 R7 - 0x781E0002, // 003B JMPF R7 #003F - 0x501C0200, // 003C LDBOOL R7 1 0 - 0x80040E00, // 003D RET 1 R7 - 0x7002002C, // 003E JMP #006C - 0x541E0004, // 003F LDINT R7 5 - 0x1C1C0C07, // 0040 EQ R7 R6 R7 - 0x781E0002, // 0041 JMPF R7 #0045 - 0x501C0200, // 0042 LDBOOL R7 1 0 - 0x80040E00, // 0043 RET 1 R7 - 0x70020026, // 0044 JMP #006C - 0x541E0005, // 0045 LDINT R7 6 - 0x1C1C0C07, // 0046 EQ R7 R6 R7 - 0x781E001E, // 0047 JMPF R7 #0067 - 0x8C1C0505, // 0048 GETMET R7 R2 K5 - 0x58240004, // 0049 LDCONST R9 K4 - 0x7C1C0400, // 004A CALL R7 2 - 0x8C200505, // 004B GETMET R8 R2 K5 - 0x5828000B, // 004C LDCONST R10 K11 - 0x7C200400, // 004D CALL R8 2 - 0x8C240106, // 004E GETMET R9 R0 K6 - 0x5C2C0E00, // 004F MOVE R11 R7 - 0x7C240400, // 0050 CALL R9 2 - 0x8C24010E, // 0051 GETMET R9 R0 K14 - 0x5C2C1000, // 0052 MOVE R11 R8 - 0x7C240400, // 0053 CALL R9 2 - 0x60240008, // 0054 GETGBL R9 G8 - 0x5C280E00, // 0055 MOVE R10 R7 - 0x7C240200, // 0056 CALL R9 1 - 0x00261009, // 0057 ADD R9 K8 R9 - 0x00241311, // 0058 ADD R9 R9 K17 - 0x60280008, // 0059 GETGBL R10 G8 - 0x5C2C1000, // 005A MOVE R11 R8 - 0x7C280200, // 005B CALL R10 1 - 0x0024120A, // 005C ADD R9 R9 R10 - 0x900E0E09, // 005D SETMBR R3 K7 R9 - 0x8C240109, // 005E GETMET R9 R0 K9 - 0x582C000A, // 005F LDCONST R11 K10 - 0x5C300E00, // 0060 MOVE R12 R7 - 0x58340010, // 0061 LDCONST R13 K16 - 0x5C381000, // 0062 MOVE R14 R8 - 0x7C240A00, // 0063 CALL R9 5 - 0x50240200, // 0064 LDBOOL R9 1 0 - 0x80041200, // 0065 RET 1 R9 - 0x70020004, // 0066 JMP #006C - 0x541E0046, // 0067 LDINT R7 71 - 0x1C1C0C07, // 0068 EQ R7 R6 R7 - 0x781E0001, // 0069 JMPF R7 #006C - 0x501C0200, // 006A LDBOOL R7 1 0 - 0x80040E00, // 006B RET 1 R7 - 0x70020008, // 006C JMP #0076 - 0x601C0003, // 006D GETGBL R7 G3 - 0x5C200000, // 006E MOVE R8 R0 - 0x7C1C0200, // 006F CALL R7 1 - 0x8C1C0F12, // 0070 GETMET R7 R7 K18 - 0x5C240200, // 0071 MOVE R9 R1 - 0x5C280400, // 0072 MOVE R10 R2 - 0x5C2C0600, // 0073 MOVE R11 R3 - 0x7C1C0800, // 0074 CALL R7 4 - 0x80040E00, // 0075 RET 1 R7 - 0x80000000, // 0076 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: set_hue -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_set_hue, /* name */ - be_nested_proto( - 9, /* nstack */ - 2, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[ 6]) { /* constants */ - /* K0 */ be_nested_str_weak(tasmota), - /* K1 */ be_nested_str_weak(scale_uint), - /* K2 */ be_const_int(0), - /* K3 */ be_nested_str_weak(call_remote_sync), - /* K4 */ be_nested_str_weak(HSBColor1), - /* K5 */ be_nested_str_weak(parse_update), - }), - be_str_weak(set_hue), - &be_const_str_solidified, - ( &(const binstruction[20]) { /* code */ - 0xB80A0000, // 0000 GETNGBL R2 K0 - 0x8C080501, // 0001 GETMET R2 R2 K1 - 0x5C100200, // 0002 MOVE R4 R1 - 0x58140002, // 0003 LDCONST R5 K2 - 0x541A00FD, // 0004 LDINT R6 254 - 0x581C0002, // 0005 LDCONST R7 K2 - 0x54220167, // 0006 LDINT R8 360 - 0x7C080C00, // 0007 CALL R2 6 - 0x8C0C0103, // 0008 GETMET R3 R0 K3 - 0x58140004, // 0009 LDCONST R5 K4 - 0x5C180400, // 000A MOVE R6 R2 - 0x7C0C0600, // 000B CALL R3 3 - 0x4C100000, // 000C LDNIL R4 - 0x20100604, // 000D NE R4 R3 R4 - 0x78120003, // 000E JMPF R4 #0013 - 0x8C100105, // 000F GETMET R4 R0 K5 - 0x5C180600, // 0010 MOVE R6 R3 - 0x541E000A, // 0011 LDINT R7 11 - 0x7C100600, // 0012 CALL R4 3 - 0x80000000, // 0013 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified function: init -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light3; -be_local_closure(class_Matter_Plugin_Bridge_Light3_init, /* name */ - be_nested_proto( - 9, /* nstack */ - 4, /* argc */ - 2, /* varg */ - 0, /* has upvals */ - NULL, /* no upvals */ - 0, /* has sup protos */ - &be_class_Matter_Plugin_Bridge_Light3, - 1, /* has constants */ - ( &(const bvalue[ 1]) { /* constants */ - /* K0 */ be_nested_str_weak(init), - }), - be_str_weak(init), - &be_const_str_solidified, - ( &(const binstruction[ 9]) { /* code */ - 0x60100003, // 0000 GETGBL R4 G3 - 0x5C140000, // 0001 MOVE R5 R0 - 0x7C100200, // 0002 CALL R4 1 - 0x8C100900, // 0003 GETMET R4 R4 K0 - 0x5C180200, // 0004 MOVE R6 R1 - 0x5C1C0400, // 0005 MOVE R7 R2 - 0x5C200600, // 0006 MOVE R8 R3 - 0x7C100800, // 0007 CALL R4 4 - 0x80000000, // 0008 RET 0 - }) - ) -); -/*******************************************************************/ - - -/******************************************************************** -** Solidified class: Matter_Plugin_Bridge_Light3 -********************************************************************/ -extern const bclass be_class_Matter_Plugin_Bridge_Light1; -be_local_class(Matter_Plugin_Bridge_Light3, - 2, - &be_class_Matter_Plugin_Bridge_Light1, - be_nested_map(14, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(set_sat, 6), be_const_closure(class_Matter_Plugin_Bridge_Light3_set_sat_closure) }, - { be_const_key_weak(init, 8), be_const_closure(class_Matter_Plugin_Bridge_Light3_init_closure) }, - { be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_parse_update_closure) }, - { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light3) }, - { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_web_values_closure) }, - { be_const_key_weak(web_value_RGB, 1), be_const_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB_closure) }, - { be_const_key_weak(CLUSTERS, 13), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(8, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(11, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(2), - be_const_int(3), - be_const_int(15), - be_const_int(17), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(3), - be_const_int(5), - be_const_int(10), - be_const_int(15), - be_const_int(17), - be_const_int(18), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(10, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(8, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(5, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(12, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(2), - be_const_int(3), - be_const_int(4), - be_const_int(5), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(7, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - { be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, { - be_const_list( * be_nested_list(13, - ( (struct bvalue*) &(const bvalue[]) { - be_const_int(0), - be_const_int(1), - be_const_int(7), - be_const_int(8), - be_const_int(15), - be_const_int(16385), - be_const_int(16394), - be_const_int(65528), - be_const_int(65529), - be_const_int(65530), - be_const_int(65531), - be_const_int(65532), - be_const_int(65533), - })) ) } )) }, - })) ) } )) }, - { be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_invoke_request_closure) }, - { be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X203_X20RGB) }, - { be_const_key_weak(set_hue, 11), be_const_closure(class_Matter_Plugin_Bridge_Light3_set_hue_closure) }, - { be_const_key_weak(shadow_hue, 9), be_const_var(0) }, - { be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { - be_const_map( * be_nested_map(1, - ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_int(269, -1), be_const_int(2) }, - })) ) } )) }, - { be_const_key_weak(shadow_sat, -1), be_const_var(1) }, - { be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) }, - })), - be_str_weak(Matter_Plugin_Bridge_Light3) -); -/********************************************************************/ -/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light0.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light0.h new file mode 100644 index 000000000..de83054ba --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light0.h @@ -0,0 +1,25 @@ +/* Solidification of Matter_Plugin_8_Bridge_Light0.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light0; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light0 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light0; +be_local_class(Matter_Plugin_Bridge_Light0, + 0, + &be_class_Matter_Plugin_Light0, + be_nested_map(3, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) }, + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light0) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light1.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light1.h new file mode 100644 index 000000000..cd50b370a --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light1.h @@ -0,0 +1,54 @@ +/* Solidification of Matter_Plugin_8_Bridge_Light1.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light1; + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Bridge_Light1__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light1 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light1; +be_local_class(Matter_Plugin_Bridge_Light1, + 0, + &be_class_Matter_Plugin_Light1, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light1) }, + { be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) }, + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light1__X3Clambda_X3E_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light1) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light2.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light2.h new file mode 100644 index 000000000..e21b658e0 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light2.h @@ -0,0 +1,54 @@ +/* Solidification of Matter_Plugin_8_Bridge_Light2.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light2; + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Bridge_Light2__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light2 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light2; +be_local_class(Matter_Plugin_Bridge_Light2, + 0, + &be_class_Matter_Plugin_Light2, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light2) }, + { be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) }, + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light2__X3Clambda_X3E_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light2) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light3.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light3.h new file mode 100644 index 000000000..ef62d3a68 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Light3.h @@ -0,0 +1,54 @@ +/* Solidification of Matter_Plugin_8_Bridge_Light3.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Light3; + +/******************************************************************** +** Solidified function: +********************************************************************/ +be_local_closure(class_Matter_Plugin_Bridge_Light3__X3Clambda_X3E, /* name */ + be_nested_proto( + 3, /* nstack */ + 1, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 0, /* has constants */ + NULL, /* no const */ + be_str_weak(_X3Clambda_X3E), + &be_const_str_solidified, + ( &(const binstruction[ 4]) { /* code */ + 0x60040009, // 0000 GETGBL R1 G9 + 0x5C080000, // 0001 MOVE R2 R0 + 0x7C040200, // 0002 CALL R1 1 + 0x80040200, // 0003 RET 1 R1 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Light3 +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Light3; +be_local_class(Matter_Plugin_Bridge_Light3, + 0, + &be_class_Matter_Plugin_Light3, + be_nested_map(5, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light3) }, + { be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) }, + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(ARG, -1), be_nested_str_weak(relay) }, + { be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light3__X3Clambda_X3E_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Light3) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_OnOff.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h similarity index 98% rename from lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_OnOff.h rename to lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h index 7e53d6f4c..7ac5d5852 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_4_Bridge_OnOff.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h @@ -1,4 +1,4 @@ -/* Solidification of Matter_Plugin_4_Bridge_OnOff.h */ +/* Solidification of Matter_Plugin_8_Bridge_OnOff.h */ /********************************************************************\ * Generated code, don't edit * \********************************************************************/ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h new file mode 100644 index 000000000..70f535d0f --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h @@ -0,0 +1,167 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Air_Quality.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; + +/******************************************************************** +** Solidified function: parse_status +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_status, /* name */ + be_nested_proto( + 6, /* nstack */ + 3, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, + 1, /* has constants */ + ( &(const bvalue[ 2]) { /* constants */ + /* K0 */ be_nested_str_weak(find), + /* K1 */ be_nested_str_weak(prefix), + }), + be_str_weak(parse_status), + &be_const_str_solidified, + ( &(const binstruction[ 7]) { /* code */ + 0x540E0009, // 0000 LDINT R3 10 + 0x1C0C0403, // 0001 EQ R3 R2 R3 + 0x780E0002, // 0002 JMPF R3 #0006 + 0x8C0C0300, // 0003 GETMET R3 R1 K0 + 0x88140101, // 0004 GETMBR R5 R0 K1 + 0x7C0C0400, // 0005 CALL R3 2 + 0x80000000, // 0006 RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified function: web_values +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality; +be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values, /* name */ + be_nested_proto( + 5, /* nstack */ + 1, /* argc */ + 2, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 1, /* has sup protos */ + ( &(const struct bproto*[ 2]) { + be_nested_proto( + 9, /* nstack */ + 2, /* argc */ + 0, /* varg */ + 0, /* has upvals */ + NULL, /* no upvals */ + 0, /* has sup protos */ + NULL, + 1, /* has constants */ + ( &(const bvalue[ 3]) { /* constants */ + /* K0 */ be_nested_str_weak(webserver), + /* K1 */ be_nested_str_weak(content_send), + /* K2 */ be_nested_str_weak(_X25s_X20_X25i_X20), + }), + be_str_weak(web_values_single), + &be_const_str_solidified, + ( &(const binstruction[12]) { /* code */ + 0x4C080000, // 0000 LDNIL R2 + 0x20080202, // 0001 NE R2 R1 R2 + 0x780A0007, // 0002 JMPF R2 #000B + 0xA40A0000, // 0003 IMPORT R2 K0 + 0x8C0C0501, // 0004 GETMET R3 R2 K1 + 0x60140018, // 0005 GETGBL R5 G24 + 0x58180002, // 0006 LDCONST R6 K2 + 0x5C1C0000, // 0007 MOVE R7 R0 + 0x5C200200, // 0008 MOVE R8 R1 + 0x7C140600, // 0009 CALL R5 3 + 0x7C0C0400, // 000A CALL R3 2 + 0x80000000, // 000B RET 0 + }) + ), + &be_class_Matter_Plugin_Bridge_Sensor_Air_Quality, + }), + 1, /* has constants */ + ( &(const bvalue[15]) { /* constants */ + /* K0 */ be_nested_str_weak(web_values_prefix), + /* K1 */ be_nested_str_weak(Air), + /* K2 */ be_nested_str_weak(shadow_air_quality), + /* K3 */ be_nested_str_weak(PM1), + /* K4 */ be_nested_str_weak(shadow_pm1), + /* K5 */ be_nested_str_weak(PM2_X2E5), + /* K6 */ be_nested_str_weak(shadow_pm2_5), + /* K7 */ be_nested_str_weak(PM10), + /* K8 */ be_nested_str_weak(shadow_pm10), + /* K9 */ be_nested_str_weak(CO2), + /* K10 */ be_nested_str_weak(shadow_co2), + /* K11 */ be_nested_str_weak(NO2), + /* K12 */ be_nested_str_weak(shadow_no2), + /* K13 */ be_nested_str_weak(TVOC), + /* K14 */ be_nested_str_weak(shadow_tvoc), + }), + be_str_weak(web_values), + &be_const_str_solidified, + ( &(const binstruction[32]) { /* code */ + 0x84040000, // 0000 CLOSURE R1 P0 + 0x8C080100, // 0001 GETMET R2 R0 K0 + 0x7C080200, // 0002 CALL R2 1 + 0x5C080200, // 0003 MOVE R2 R1 + 0x580C0001, // 0004 LDCONST R3 K1 + 0x88100102, // 0005 GETMBR R4 R0 K2 + 0x7C080400, // 0006 CALL R2 2 + 0x5C080200, // 0007 MOVE R2 R1 + 0x580C0003, // 0008 LDCONST R3 K3 + 0x88100104, // 0009 GETMBR R4 R0 K4 + 0x7C080400, // 000A CALL R2 2 + 0x5C080200, // 000B MOVE R2 R1 + 0x580C0005, // 000C LDCONST R3 K5 + 0x88100106, // 000D GETMBR R4 R0 K6 + 0x7C080400, // 000E CALL R2 2 + 0x5C080200, // 000F MOVE R2 R1 + 0x580C0007, // 0010 LDCONST R3 K7 + 0x88100108, // 0011 GETMBR R4 R0 K8 + 0x7C080400, // 0012 CALL R2 2 + 0x5C080200, // 0013 MOVE R2 R1 + 0x580C0009, // 0014 LDCONST R3 K9 + 0x8810010A, // 0015 GETMBR R4 R0 K10 + 0x7C080400, // 0016 CALL R2 2 + 0x5C080200, // 0017 MOVE R2 R1 + 0x580C000B, // 0018 LDCONST R3 K11 + 0x8810010C, // 0019 GETMBR R4 R0 K12 + 0x7C080400, // 001A CALL R2 2 + 0x5C080200, // 001B MOVE R2 R1 + 0x580C000D, // 001C LDCONST R3 K13 + 0x8810010E, // 001D GETMBR R4 R0 K14 + 0x7C080400, // 001E CALL R2 2 + 0x80000000, // 001F RET 0 + }) + ) +); +/*******************************************************************/ + + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Air_Quality +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Air_Quality; +be_local_class(Matter_Plugin_Bridge_Sensor_Air_Quality, + 0, + &be_class_Matter_Plugin_Sensor_Air_Quality, + be_nested_map(6, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_airquality) }, + { be_const_key_weak(BRIDGE, 4), be_const_bool(1) }, + { be_const_key_weak(UPDATE_CMD, 5), be_nested_str_weak(Status_X2010) }, + { be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values_closure) }, + { be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_status_closure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Air_Quality) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h new file mode 100644 index 000000000..170284b74 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h @@ -0,0 +1,26 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Contact.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Contact +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Contact; +be_local_class(Matter_Plugin_Bridge_Sensor_Contact, + 0, + &be_class_Matter_Plugin_Sensor_Contact, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, 2), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_contact) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Contact) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h new file mode 100644 index 000000000..08ef3a345 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h @@ -0,0 +1,24 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Flow.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Flow +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Flow; +be_local_class(Matter_Plugin_Bridge_Sensor_Flow, + 0, + &be_class_Matter_Plugin_Sensor_Flow, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_flow) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Flow) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h new file mode 100644 index 000000000..878f9629c --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h @@ -0,0 +1,24 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Humidity.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Humidity +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Humidity; +be_local_class(Matter_Plugin_Bridge_Sensor_Humidity, + 0, + &be_class_Matter_Plugin_Sensor_Humidity, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_humidity) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Humidity) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h new file mode 100644 index 000000000..6ef7a803f --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h @@ -0,0 +1,24 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Illuminance.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Illuminance +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Illuminance; +be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance, + 0, + &be_class_Matter_Plugin_Sensor_Illuminance, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_illuminance) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Illuminance) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h new file mode 100644 index 000000000..a72539571 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h @@ -0,0 +1,26 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Occupancy.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Occupancy +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Occupancy; +be_local_class(Matter_Plugin_Bridge_Sensor_Occupancy, + 0, + &be_class_Matter_Plugin_Sensor_Occupancy, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, 2), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_occupancy) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Occupancy) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h new file mode 100644 index 000000000..e6d246669 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h @@ -0,0 +1,24 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Pressure.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Pressure +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Pressure; +be_local_class(Matter_Plugin_Bridge_Sensor_Pressure, + 0, + &be_class_Matter_Plugin_Sensor_Pressure, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_pressure) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Pressure) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h new file mode 100644 index 000000000..04a2b8f81 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h @@ -0,0 +1,24 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Temp.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Temp +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Temp; +be_local_class(Matter_Plugin_Bridge_Sensor_Temp, + 0, + &be_class_Matter_Plugin_Sensor_Temp, + be_nested_map(2, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, -1), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_temperature) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Temp) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h new file mode 100644 index 000000000..40ceb74e5 --- /dev/null +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h @@ -0,0 +1,26 @@ +/* Solidification of Matter_Plugin_8_Bridge_Sensor_Waterleak.h */ +/********************************************************************\ +* Generated code, don't edit * +\********************************************************************/ +#include "be_constobj.h" + +extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak; + +/******************************************************************** +** Solidified class: Matter_Plugin_Bridge_Sensor_Waterleak +********************************************************************/ +extern const bclass be_class_Matter_Plugin_Sensor_Waterleak; +be_local_class(Matter_Plugin_Bridge_Sensor_Waterleak, + 0, + &be_class_Matter_Plugin_Sensor_Waterleak, + be_nested_map(4, + ( (struct bmapnode*) &(const bmapnode[]) { + { be_const_key_weak(BRIDGE, 2), be_const_bool(1) }, + { be_const_key_weak(TYPE, -1), be_nested_str_weak(http_waterleak) }, + { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) }, + { be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) }, + })), + be_str_weak(Matter_Plugin_Bridge_Sensor_Waterleak) +); +/********************************************************************/ +/* End of solidification */ diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h index 4ed01b4c6..d53f5099f 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h @@ -1148,11 +1148,11 @@ be_local_closure(class_Matter_UI_show_remote_autoconf, /* name */ /* K1 */ be_nested_str_weak(json), /* K2 */ be_nested_str_weak(), /* K3 */ be_nested_str_weak(matter), - /* K4 */ be_nested_str_weak(Plugin_Bridge_HTTP), + /* K4 */ be_nested_str_weak(Plugin_Device), /* K5 */ be_nested_str_weak(PROBE_TIMEOUT), /* K6 */ be_nested_str_weak(HTTP_remote), /* K7 */ be_nested_str_weak(call_sync), - /* K8 */ be_nested_str_weak(Status_X208), + /* K8 */ be_nested_str_weak(Status_X2010), /* K9 */ be_nested_str_weak(load), /* K10 */ be_nested_str_weak(find), /* K11 */ be_nested_str_weak(StatusSNS), @@ -1160,7 +1160,7 @@ be_local_closure(class_Matter_UI_show_remote_autoconf, /* name */ /* K13 */ be_nested_str_weak(StatusSTS), /* K14 */ be_nested_str_weak(tasmota), /* K15 */ be_nested_str_weak(log), - /* K16 */ be_nested_str_weak(MTR_X3A_X20probed_X20_X27_X25s_X27_X20status8_X3D_X25s_X20satus11_X3D_X25s), + /* K16 */ be_nested_str_weak(MTR_X3A_X20probed_X20_X27_X25s_X27_X20status10_X3D_X25s_X20satus11_X3D_X25s), /* K17 */ be_const_int(3), /* K18 */ be_nested_str_weak(generate_config_from_status), /* K19 */ be_nested_str_weak(show_plugins_hints_js), @@ -1827,16 +1827,16 @@ be_local_closure(class_Matter_UI_show_bridge_status, /* name */ /* K1 */ be_nested_str_weak(plugins), /* K2 */ be_nested_str_weak(webserver), /* K3 */ be_const_int(0), - /* K4 */ be_nested_str_weak(matter), - /* K5 */ be_nested_str_weak(Plugin_Bridge_HTTP), - /* K6 */ be_nested_str_weak(http_remote), - /* K7 */ be_nested_str_weak(addr), - /* K8 */ be_nested_str_weak(contains), - /* K9 */ be_nested_str_weak(push), - /* K10 */ be_const_int(1), - /* K11 */ be_nested_str_weak(content_send), - /* K12 */ be_nested_str_weak(_X3Chr_X3E), - /* K13 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E), + /* K4 */ be_nested_str_weak(BRIDGE), + /* K5 */ be_nested_str_weak(http_remote), + /* K6 */ be_nested_str_weak(addr), + /* K7 */ be_nested_str_weak(contains), + /* K8 */ be_nested_str_weak(push), + /* K9 */ be_const_int(1), + /* K10 */ be_nested_str_weak(content_send), + /* K11 */ be_nested_str_weak(_X3Chr_X3E), + /* K12 */ be_nested_str_weak(_X3Ctable_X20style_X3D_X27width_X3A100_X25_X27_X3E), + /* K13 */ be_nested_str_weak(matter), /* K14 */ be_nested_str_weak(_STYLESHEET), /* K15 */ be_nested_str_weak(k2l), /* K16 */ be_nested_str_weak(html_escape), @@ -1853,7 +1853,7 @@ be_local_closure(class_Matter_UI_show_bridge_status, /* name */ }), be_str_weak(show_bridge_status), &be_const_str_solidified, - ( &(const binstruction[122]) { /* code */ + ( &(const binstruction[118]) { /* code */ 0x88040100, // 0000 GETMBR R1 R0 K0 0x88040301, // 0001 GETMBR R1 R1 K1 0x4C080000, // 0002 LDNIL R2 @@ -1868,114 +1868,110 @@ be_local_closure(class_Matter_UI_show_bridge_status, /* name */ 0x88140B01, // 000B GETMBR R5 R5 K1 0x7C100200, // 000C CALL R4 1 0x14100604, // 000D LT R4 R3 R4 - 0x7812001D, // 000E JMPF R4 #002D + 0x78120019, // 000E JMPF R4 #0029 0x88100100, // 000F GETMBR R4 R0 K0 0x88100901, // 0010 GETMBR R4 R4 K1 0x94100803, // 0011 GETIDX R4 R4 R3 - 0x6014000F, // 0012 GETGBL R5 G15 - 0x5C180800, // 0013 MOVE R6 R4 - 0xB81E0800, // 0014 GETNGBL R7 K4 - 0x881C0F05, // 0015 GETMBR R7 R7 K5 - 0x7C140400, // 0016 CALL R5 2 - 0x78160012, // 0017 JMPF R5 #002B - 0x4C140000, // 0018 LDNIL R5 - 0x1C140405, // 0019 EQ R5 R2 R5 - 0x78160002, // 001A JMPF R5 #001E - 0x60140013, // 001B GETGBL R5 G19 - 0x7C140000, // 001C CALL R5 0 - 0x5C080A00, // 001D MOVE R2 R5 - 0x88140906, // 001E GETMBR R5 R4 K6 - 0x88140B07, // 001F GETMBR R5 R5 K7 - 0x8C180508, // 0020 GETMET R6 R2 K8 - 0x5C200A00, // 0021 MOVE R8 R5 - 0x7C180400, // 0022 CALL R6 2 - 0x741A0002, // 0023 JMPT R6 #0027 - 0x60180012, // 0024 GETGBL R6 G18 - 0x7C180000, // 0025 CALL R6 0 - 0x98080A06, // 0026 SETIDX R2 R5 R6 - 0x94180405, // 0027 GETIDX R6 R2 R5 - 0x8C180D09, // 0028 GETMET R6 R6 K9 - 0x5C200800, // 0029 MOVE R8 R4 - 0x7C180400, // 002A CALL R6 2 - 0x000C070A, // 002B ADD R3 R3 K10 - 0x7001FFDB, // 002C JMP #0009 - 0x4C100000, // 002D LDNIL R4 - 0x1C100404, // 002E EQ R4 R2 R4 - 0x78120000, // 002F JMPF R4 #0031 - 0x80000800, // 0030 RET 0 - 0x8C10030B, // 0031 GETMET R4 R1 K11 - 0x5818000C, // 0032 LDCONST R6 K12 - 0x7C100400, // 0033 CALL R4 2 - 0x8C10030B, // 0034 GETMET R4 R1 K11 - 0x5818000D, // 0035 LDCONST R6 K13 + 0x88140904, // 0012 GETMBR R5 R4 K4 + 0x78160012, // 0013 JMPF R5 #0027 + 0x4C140000, // 0014 LDNIL R5 + 0x1C140405, // 0015 EQ R5 R2 R5 + 0x78160002, // 0016 JMPF R5 #001A + 0x60140013, // 0017 GETGBL R5 G19 + 0x7C140000, // 0018 CALL R5 0 + 0x5C080A00, // 0019 MOVE R2 R5 + 0x88140905, // 001A GETMBR R5 R4 K5 + 0x88140B06, // 001B GETMBR R5 R5 K6 + 0x8C180507, // 001C GETMET R6 R2 K7 + 0x5C200A00, // 001D MOVE R8 R5 + 0x7C180400, // 001E CALL R6 2 + 0x741A0002, // 001F JMPT R6 #0023 + 0x60180012, // 0020 GETGBL R6 G18 + 0x7C180000, // 0021 CALL R6 0 + 0x98080A06, // 0022 SETIDX R2 R5 R6 + 0x94180405, // 0023 GETIDX R6 R2 R5 + 0x8C180D08, // 0024 GETMET R6 R6 K8 + 0x5C200800, // 0025 MOVE R8 R4 + 0x7C180400, // 0026 CALL R6 2 + 0x000C0709, // 0027 ADD R3 R3 K9 + 0x7001FFDF, // 0028 JMP #0009 + 0x4C100000, // 0029 LDNIL R4 + 0x1C100404, // 002A EQ R4 R2 R4 + 0x78120000, // 002B JMPF R4 #002D + 0x80000800, // 002C RET 0 + 0x8C10030A, // 002D GETMET R4 R1 K10 + 0x5818000B, // 002E LDCONST R6 K11 + 0x7C100400, // 002F CALL R4 2 + 0x8C10030A, // 0030 GETMET R4 R1 K10 + 0x5818000C, // 0031 LDCONST R6 K12 + 0x7C100400, // 0032 CALL R4 2 + 0x8C10030A, // 0033 GETMET R4 R1 K10 + 0xB81A1A00, // 0034 GETNGBL R6 K13 + 0x88180D0E, // 0035 GETMBR R6 R6 K14 0x7C100400, // 0036 CALL R4 2 - 0x8C10030B, // 0037 GETMET R4 R1 K11 - 0xB81A0800, // 0038 GETNGBL R6 K4 - 0x88180D0E, // 0039 GETMBR R6 R6 K14 - 0x7C100400, // 003A CALL R4 2 - 0x60100010, // 003B GETGBL R4 G16 - 0x88140100, // 003C GETMBR R5 R0 K0 - 0x8C140B0F, // 003D GETMET R5 R5 K15 - 0x5C1C0400, // 003E MOVE R7 R2 - 0x7C140400, // 003F CALL R5 2 - 0x7C100200, // 0040 CALL R4 1 - 0xA8020030, // 0041 EXBLK 0 #0073 - 0x5C140800, // 0042 MOVE R5 R4 - 0x7C140000, // 0043 CALL R5 0 - 0x8C180310, // 0044 GETMET R6 R1 K16 - 0x5C200A00, // 0045 MOVE R8 R5 - 0x7C180400, // 0046 CALL R6 2 - 0x8C1C0310, // 0047 GETMET R7 R1 K16 - 0x88240100, // 0048 GETMBR R9 R0 K0 - 0x8C241311, // 0049 GETMET R9 R9 K17 - 0x5C2C0A00, // 004A MOVE R11 R5 - 0x7C240400, // 004B CALL R9 2 - 0x8C241312, // 004C GETMET R9 R9 K18 - 0x582C0013, // 004D LDCONST R11 K19 - 0x5C300A00, // 004E MOVE R12 R5 - 0x7C240600, // 004F CALL R9 3 - 0x7C1C0400, // 0050 CALL R7 2 - 0x8C20030B, // 0051 GETMET R8 R1 K11 - 0x60280018, // 0052 GETGBL R10 G24 - 0x582C0014, // 0053 LDCONST R11 K20 - 0x5C300C00, // 0054 MOVE R12 R6 - 0x5C340C00, // 0055 MOVE R13 R6 - 0x5C380E00, // 0056 MOVE R14 R7 - 0x7C280800, // 0057 CALL R10 4 - 0x7C200400, // 0058 CALL R8 2 - 0x94200405, // 0059 GETIDX R8 R2 R5 - 0x94201103, // 005A GETIDX R8 R8 K3 - 0x88201106, // 005B GETMBR R8 R8 K6 - 0x8C24030B, // 005C GETMET R9 R1 K11 - 0x8C2C1115, // 005D GETMET R11 R8 K21 - 0x7C2C0200, // 005E CALL R11 1 - 0x7C240400, // 005F CALL R9 2 - 0x60240010, // 0060 GETGBL R9 G16 - 0x94280405, // 0061 GETIDX R10 R2 R5 - 0x7C240200, // 0062 CALL R9 1 - 0xA802000A, // 0063 EXBLK 0 #006F - 0x5C281200, // 0064 MOVE R10 R9 - 0x7C280000, // 0065 CALL R10 0 - 0x8C2C030B, // 0066 GETMET R11 R1 K11 - 0x58340016, // 0067 LDCONST R13 K22 - 0x7C2C0400, // 0068 CALL R11 2 - 0x8C2C1517, // 0069 GETMET R11 R10 K23 - 0x7C2C0200, // 006A CALL R11 1 - 0x8C2C030B, // 006B GETMET R11 R1 K11 - 0x58340018, // 006C LDCONST R13 K24 - 0x7C2C0400, // 006D CALL R11 2 - 0x7001FFF4, // 006E JMP #0064 - 0x58240019, // 006F LDCONST R9 K25 - 0xAC240200, // 0070 CATCH R9 1 0 + 0x60100010, // 0037 GETGBL R4 G16 + 0x88140100, // 0038 GETMBR R5 R0 K0 + 0x8C140B0F, // 0039 GETMET R5 R5 K15 + 0x5C1C0400, // 003A MOVE R7 R2 + 0x7C140400, // 003B CALL R5 2 + 0x7C100200, // 003C CALL R4 1 + 0xA8020030, // 003D EXBLK 0 #006F + 0x5C140800, // 003E MOVE R5 R4 + 0x7C140000, // 003F CALL R5 0 + 0x8C180310, // 0040 GETMET R6 R1 K16 + 0x5C200A00, // 0041 MOVE R8 R5 + 0x7C180400, // 0042 CALL R6 2 + 0x8C1C0310, // 0043 GETMET R7 R1 K16 + 0x88240100, // 0044 GETMBR R9 R0 K0 + 0x8C241311, // 0045 GETMET R9 R9 K17 + 0x5C2C0A00, // 0046 MOVE R11 R5 + 0x7C240400, // 0047 CALL R9 2 + 0x8C241312, // 0048 GETMET R9 R9 K18 + 0x582C0013, // 0049 LDCONST R11 K19 + 0x5C300A00, // 004A MOVE R12 R5 + 0x7C240600, // 004B CALL R9 3 + 0x7C1C0400, // 004C CALL R7 2 + 0x8C20030A, // 004D GETMET R8 R1 K10 + 0x60280018, // 004E GETGBL R10 G24 + 0x582C0014, // 004F LDCONST R11 K20 + 0x5C300C00, // 0050 MOVE R12 R6 + 0x5C340C00, // 0051 MOVE R13 R6 + 0x5C380E00, // 0052 MOVE R14 R7 + 0x7C280800, // 0053 CALL R10 4 + 0x7C200400, // 0054 CALL R8 2 + 0x94200405, // 0055 GETIDX R8 R2 R5 + 0x94201103, // 0056 GETIDX R8 R8 K3 + 0x88201105, // 0057 GETMBR R8 R8 K5 + 0x8C24030A, // 0058 GETMET R9 R1 K10 + 0x8C2C1115, // 0059 GETMET R11 R8 K21 + 0x7C2C0200, // 005A CALL R11 1 + 0x7C240400, // 005B CALL R9 2 + 0x60240010, // 005C GETGBL R9 G16 + 0x94280405, // 005D GETIDX R10 R2 R5 + 0x7C240200, // 005E CALL R9 1 + 0xA802000A, // 005F EXBLK 0 #006B + 0x5C281200, // 0060 MOVE R10 R9 + 0x7C280000, // 0061 CALL R10 0 + 0x8C2C030A, // 0062 GETMET R11 R1 K10 + 0x58340016, // 0063 LDCONST R13 K22 + 0x7C2C0400, // 0064 CALL R11 2 + 0x8C2C1517, // 0065 GETMET R11 R10 K23 + 0x7C2C0200, // 0066 CALL R11 1 + 0x8C2C030A, // 0067 GETMET R11 R1 K10 + 0x58340018, // 0068 LDCONST R13 K24 + 0x7C2C0400, // 0069 CALL R11 2 + 0x7001FFF4, // 006A JMP #0060 + 0x58240019, // 006B LDCONST R9 K25 + 0xAC240200, // 006C CATCH R9 1 0 + 0xB0080000, // 006D RAISE 2 R0 R0 + 0x7001FFCE, // 006E JMP #003E + 0x58100019, // 006F LDCONST R4 K25 + 0xAC100200, // 0070 CATCH R4 1 0 0xB0080000, // 0071 RAISE 2 R0 R0 - 0x7001FFCE, // 0072 JMP #0042 - 0x58100019, // 0073 LDCONST R4 K25 - 0xAC100200, // 0074 CATCH R4 1 0 - 0xB0080000, // 0075 RAISE 2 R0 R0 - 0x8C10030B, // 0076 GETMET R4 R1 K11 - 0x5818001A, // 0077 LDCONST R6 K26 - 0x7C100400, // 0078 CALL R4 2 - 0x80000000, // 0079 RET 0 + 0x8C10030A, // 0072 GETMET R4 R1 K10 + 0x5818001A, // 0073 LDCONST R6 K26 + 0x7C100400, // 0074 CALL R4 2 + 0x80000000, // 0075 RET 0 }) ) ); diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h index b1ad4546f..28b846893 100644 --- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h +++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_zz_Device.h @@ -6286,7 +6286,7 @@ be_local_class(Matter_Device, { be_const_key_weak(plugins_classes, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, { be_const_map( * be_nested_map(47, ( (struct bmapnode*) &(const bmapnode[]) { - { be_const_key_weak(v_waterleak, 43), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, + { be_const_key_weak(v_waterleak, 26), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) }, { be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) }, { be_const_key_weak(waterleak, -1), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) }, { be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) }, @@ -6300,36 +6300,36 @@ be_local_class(Matter_Device, { be_const_key_weak(v_illuminance, 24), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) }, { be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) }, { be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) }, - { be_const_key_weak(http_light1, 26), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, + { be_const_key_weak(http_light1, 39), be_const_class(be_class_Matter_Plugin_Bridge_Light1) }, { be_const_key_weak(http_light0, 6), be_const_class(be_class_Matter_Plugin_Bridge_Light0) }, { be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) }, { be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) }, { be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) }, - { be_const_key_weak(contact, 10), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, + { be_const_key_weak(light1, 10), be_const_class(be_class_Matter_Plugin_Light1) }, { be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) }, { be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) }, { be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) }, { be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) }, { be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) }, { be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) }, - { be_const_key_weak(http_illuminance, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, + { be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, { be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) }, { be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) }, { be_const_key_weak(v_contact, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) }, - { be_const_key_weak(flow, 34), be_const_class(be_class_Matter_Plugin_Sensor_Flow) }, + { be_const_key_weak(illuminance, 34), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, { be_const_key_weak(shutter, 5), be_const_class(be_class_Matter_Plugin_Shutter) }, { be_const_key_weak(v_pressure, 2), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) }, { be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) }, - { be_const_key_weak(v_light2, 39), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, + { be_const_key_weak(v_light2, 40), be_const_class(be_class_Matter_Plugin_Virt_Light2) }, { be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) }, - { be_const_key_weak(v_airquality, 42), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) }, + { be_const_key_weak(v_airquality, 43), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) }, { be_const_key_weak(light2, 3), be_const_class(be_class_Matter_Plugin_Light2) }, { be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) }, - { be_const_key_weak(illuminance, 40), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) }, - { be_const_key_weak(relay, -1), be_const_class(be_class_Matter_Plugin_OnOff) }, + { be_const_key_weak(http_illuminance, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) }, + { be_const_key_weak(relay, 42), be_const_class(be_class_Matter_Plugin_OnOff) }, { be_const_key_weak(v_light0, -1), be_const_class(be_class_Matter_Plugin_Virt_Light0) }, - { be_const_key_weak(light1, -1), be_const_class(be_class_Matter_Plugin_Light1) }, - { be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) }, + { be_const_key_weak(flow, -1), be_const_class(be_class_Matter_Plugin_Sensor_Flow) }, + { be_const_key_weak(contact, -1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) }, { be_const_key_weak(http_waterleak, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) }, { be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) }, { be_const_key_weak(root, 29), be_const_class(be_class_Matter_Plugin_Root) },