Matter support simple Relay on Apple Homekit (#18239)

This commit is contained in:
s-hadinger 2023-03-21 23:23:18 +01:00 committed by GitHub
parent d6ed4adcf6
commit 487ec87e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 8143 additions and 6799 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Support for PMSA003I Air Quality Sensor by Jean-Pierre Deschamps (#18214)
- Support for DingTian virtual switch/button/relay (#18223)
- Berry add `mdns.remove_service()`
- Matter support simple Relay on Apple Homekit
### Breaking Changed

View File

@ -110,8 +110,8 @@ class Matter_Commisioning_Context
# generate 32 bytes random
pbkdfparamresp.responderRandom = crypto.random(32)
pbkdfparamresp.responderSessionId = self.future_local_session_id
pbkdfparamresp.pbkdf_parameters_salt = self.device.salt
pbkdfparamresp.pbkdf_parameters_iterations = self.device.iterations
pbkdfparamresp.pbkdf_parameters_salt = self.device.commissioning_salt
pbkdfparamresp.pbkdf_parameters_iterations = self.device.commissioning_iterations
tasmota.log("MTR: pbkdfparamresp: " + str(matter.inspect(pbkdfparamresp)), 4)
var pbkdfparamresp_raw = pbkdfparamresp.encode()
tasmota.log("MTR: pbkdfparamresp_raw: " + pbkdfparamresp_raw.tohex(), 4)
@ -138,7 +138,8 @@ class Matter_Commisioning_Context
tasmota.log("MTR: spake: " + matter.inspect(self.spake), 4)
# instanciate SPAKE
self.spake = crypto.SPAKE2P_Matter(self.device.w0, self.device.w1, self.device.L)
# for testing purpose, we don't send `w1` to make sure
self.spake = crypto.SPAKE2P_Matter(self.device.commissioning_w0, nil, self.device.commissioning_L)
# compute pB
self.spake.compute_pB(self.y)
self.pB = self.spake.pB
@ -288,7 +289,7 @@ class Matter_Commisioning_Context
session._fabric = fabric
end
if session == nil || session._fabric == nil raise "valuer_error", "StatusReport(GeneralCode: FAILURE, ProtocolId: SECURE_CHANNEL, ProtocolCode: NO_SHARED_TRUST_ROOTS)" end
session.source_node_id = msg.source_node_id
session._source_node_id = msg.source_node_id
session.set_mode_CASE()
if msg.session != session
@ -559,8 +560,9 @@ class Matter_Commisioning_Context
session.close()
session.set_keys(i2r, r2i, ac, created)
# CASE Session completed, persist it
session._breadcrumb = 0 # clear breadcrumb
session.set_persist(true) # keep session on flash
session.set_no_expiration() # never expire
session.persist_to_fabric()

View File

@ -26,6 +26,7 @@ class Matter_Device
static var VENDOR_ID = 0xFFF1
static var PRODUCT_ID = 0x8000
static var FILENAME = "_matter_device.json"
static var PASE_TIMEOUT = 10*60 # default open commissioning window (10 minutes)
var plugins # list of plugins
var udp_server # `matter.UDPServer()` object
var message_handler # `matter.MessageHandler()` object
@ -33,6 +34,13 @@ class Matter_Device
var ui
# Commissioning open
var commissioning_open # timestamp for timeout of commissioning (millis()) or `nil` if closed
var commissioning_iterations # current PBKDF number of iterations
var commissioning_discriminator # current discriminator
var commissioning_salt # current salt
var commissioning_w0 # current w0
# var commissioning_w1 # current w1
var commissioning_L # current L
var commissioning_admin_fabric # the fabric that opened the currint commissioning window, or `nil` for default
# information about the device
var commissioning_instance_wifi # random instance name for commissioning
var commissioning_instance_eth # random instance name for commissioning
@ -40,15 +48,20 @@ class Matter_Device
var hostname_eth # MAC-derived hostname for commissioning
var vendorid
var productid
# MDNS active announces
var mdns_pase_eth # do we have an active PASE mdns announce for eth
var mdns_pase_wifi # do we have an active PASE mdns announce for wifi
# saved in parameters
var discriminator
var passcode
var root_discriminator
var root_passcode
var ipv4only # advertize only IPv4 addresses (no IPv6)
# context for PBKDF
var iterations
var root_iterations
# PBKDF information used only during PASE (freed afterwards)
var salt
var w0, w1, L
var root_salt
var root_w0
# var root_w1
var root_L
#############################################################
def init()
@ -62,9 +75,11 @@ class Matter_Device
self.plugins = []
self.vendorid = self.VENDOR_ID
self.productid = self.PRODUCT_ID
self.iterations = self.PBKDF_ITERATIONS
self.root_iterations = self.PBKDF_ITERATIONS
self.root_salt = crypto.random(16) # bytes("5350414B453250204B65792053616C74")
self.ipv4only = false
self.load_param()
self.commissioning_instance_wifi = crypto.random(8).tohex() # 16 characters random hostname
self.commissioning_instance_eth = crypto.random(8).tohex() # 16 characters random hostname
@ -74,8 +89,8 @@ class Matter_Device
self.ui = matter.UI(self)
# add the default plugin
self.plugins.push(matter.Plugin_Root(self))
self.plugins.push(matter.Plugin_OnOff(self))
self.plugins.push(matter.Plugin_Root(self), 0)
self.plugins.push(matter.Plugin_OnOff(self), 1, 0 #-tasmota relay 1-#)
self.start_mdns_announce_hostnames()
@ -106,23 +121,71 @@ class Matter_Device
#############################################################
# Start Basic Commissioning Window
def init_basic_commissioning()
# compute PBKDF
self.compute_pbkdf(self.passcode)
# if no fabric is configured, automatically open commissioning at restart
if self.sessions.count_active_fabrics() == 0
self.start_basic_commissioning()
self.start_root_basic_commissioning()
end
end
def start_root_basic_commissioning(timeout_s)
if timeout_s == nil timeout_s = self.PASE_TIMEOUT end
# compute PBKDF
self.compute_pbkdf(self.root_passcode, self.root_iterations, self.root_salt)
self.start_basic_commissioning(timeout_s, self.root_iterations, self.root_discriminator, self.root_salt, self.root_w0, #-self.root_w1,-# self.root_L, nil)
end
#####################################################################
# Remove a fabric and clean all corresponding values and MDNS entries
def remove_fabric(fabric)
self.message_handler.im.subs.remove_by_fabric(fabric)
self.sessions.remove_fabric(fabric)
self.sessions.save_fabrics()
# TODO remove MDNS entries
end
#############################################################
# Start Basic Commissioning Window
def start_basic_commissioning()
self.commissioning_open = tasmota.millis() + 10 * 60 * 1000
def start_basic_commissioning(timeout_s, iterations, discriminator, salt, w0, #-w1,-# L, admin_fabric)
self.commissioning_open = tasmota.millis() + timeout_s * 1000
self.commissioning_iterations = iterations
self.commissioning_discriminator = discriminator
self.commissioning_salt = salt
self.commissioning_w0 = w0
# self.commissioning_w1 = w1
self.commissioning_L = L
self.commissioning_admin_fabric = admin_fabric
if tasmota.wifi()['up'] || tasmota.eth()['up']
self.mdns_announce_PASE()
else
tasmota.add_rule("Wifi#Connected", def ()
self.mdns_announce_PASE()
tasmota.remove_rule("Wifi#Connected", "mdns_announce_PASE")
end, "mdns_announce_PASE")
tasmota.add_rule("Eth#Connected", def ()
self.mdns_announce_PASE()
tasmota.remove_rule("Eth#Connected", "mdns_announce_PASE")
end, "mdns_announce_PASE")
end
end
def is_root_commissioning_open()
return self.commissioning_open != nil && self.commissioning_admin_fabric == nil
end
def stop_basic_commissioning()
self.commissioning_open = nil
self.mdns_remove_PASE()
# clear any PBKDF information to free memory
self.commissioning_iterations = nil
self.commissioning_discriminator = nil
self.commissioning_salt = nil
self.commissioning_w0 = nil
# self.commissioning_w1 = nil
self.commissioning_L = nil
self.commissioning_admin_fabric = nil
end
def is_commissioning_open()
return self.commissioning_open != nil
@ -133,27 +196,26 @@ class Matter_Device
#############################################################
# Compute the PBKDF parameters for SPAKE2+
#
# iterations is set to 1000 which is large enough
def compute_pbkdf(passcode_int)
def compute_pbkdf(passcode_int, iterations, salt)
import crypto
import string
self.salt = crypto.random(16) # bytes("5350414B453250204B65792053616C74")
var passcode = bytes().add(passcode_int, 4)
var tv = crypto.PBKDF2_HMAC_SHA256().derive(passcode, self.salt, self.iterations, 80)
var tv = crypto.PBKDF2_HMAC_SHA256().derive(passcode, salt, iterations, 80)
var w0s = tv[0..39]
var w1s = tv[40..79]
self.w0 = crypto.EC_P256().mod(w0s)
self.w1 = crypto.EC_P256().mod(w1s)
self.L = crypto.EC_P256().public_key(self.w1)
self.root_w0 = crypto.EC_P256().mod(w0s)
var w1 = crypto.EC_P256().mod(w1s) # w1 is temporarily computed then discarded
# self.root_w1 = crypto.EC_P256().mod(w1s)
self.root_L = crypto.EC_P256().public_key(w1)
tasmota.log("MTR: ******************************", 4)
tasmota.log("MTR: salt = " + self.salt.tohex(), 4)
tasmota.log("MTR: salt = " + self.root_salt.tohex(), 4)
tasmota.log("MTR: passcode_hex = " + passcode.tohex(), 4)
tasmota.log("MTR: w0 = " + self.w0.tohex(), 4)
tasmota.log("MTR: w1 = " + self.w1.tohex(), 4)
tasmota.log("MTR: L = " + self.L.tohex(), 4)
tasmota.log("MTR: w0 = " + self.root_w0.tohex(), 4)
# tasmota.log("MTR: w1 = " + self.root_w1.tohex(), 4)
tasmota.log("MTR: L = " + self.root_L.tohex(), 4)
tasmota.log("MTR: ******************************", 4)
# show Manual pairing code in logs
@ -162,7 +224,7 @@ class Matter_Device
end
#############################################################
# compute QR Code content
# compute QR Code content - can be done only for root PASE
def compute_qrcode_content()
var raw = bytes().resize(11) # we don't use TLV Data so it's only 88 bits or 11 bytes
# version is `000` dont touch
@ -170,8 +232,8 @@ class Matter_Device
raw.setbits(19, 16, self.productid)
# custom flow = 0 (offset=35, len=2)
raw.setbits(37, 8, 0x04) # already on IP network
raw.setbits(45, 12, self.discriminator & 0xFFF)
raw.setbits(57, 27, self.passcode & 0x7FFFFFF)
raw.setbits(45, 12, self.root_discriminator & 0xFFF)
raw.setbits(57, 27, self.root_passcode & 0x7FFFFFF)
# padding (offset=84 len=4)
return "MT:" + matter.Base38.encode(raw)
end
@ -179,11 +241,12 @@ class Matter_Device
#############################################################
# compute the 11 digits manual pairing code (wihout vendorid nor productid) p.223
# can be done only for root PASE (we need the passcode, but we don't get it with OpenCommissioningWindow command)
def compute_manual_pairing_code()
import string
var digit_1 = (self.discriminator & 0x0FFF) >> 10
var digit_2_6 = ((self.discriminator & 0x0300) << 6) | (self.passcode & 0x3FFF)
var digit_7_10 = (self.passcode >> 14)
var digit_1 = (self.root_discriminator & 0x0FFF) >> 10
var digit_2_6 = ((self.root_discriminator & 0x0300) << 6) | (self.root_passcode & 0x3FFF)
var digit_7_10 = (self.root_passcode >> 14)
var ret = string.format("%1i%05i%04i", digit_1, digit_2_6, digit_7_10)
ret += matter.Verhoeff.checksum(ret)
@ -198,6 +261,12 @@ class Matter_Device
if self.commissioning_open != nil && tasmota.time_reached(self.commissioning_open) # timeout reached, close provisioning
self.commissioning_open = nil
end
# call all plugins
var idx = 0
while idx < size(self.plugins)
self.plugins[idx].every_second()
idx += 1
end
end
#############################################################
@ -257,11 +326,11 @@ class Matter_Device
import mdns
import string
self.stop_basic_commissioning() # close all PASE commissioning information
# clear any PBKDF information to free memory
self.salt = nil
self.w0 = nil
self.w1 = nil
self.L = nil
self.root_w0 = nil
# self.root_w1 = nil
self.root_L = nil
# we keep the PASE session for 1 minute
session.set_expire_in_seconds(60)
@ -456,7 +525,7 @@ class Matter_Device
#
def save_param()
import json
var j = json.dump({'distinguish':self.discriminator, 'passcode':self.passcode, 'ipv4only':self.ipv4only})
var j = json.dump({'distinguish':self.root_discriminator, 'passcode':self.root_passcode, 'ipv4only':self.ipv4only})
try
import string
var f = open(self.FILENAME, "w")
@ -482,8 +551,8 @@ class Matter_Device
import json
var j = json.load(s)
self.discriminator = j.find("distinguish", self.discriminator)
self.passcode = j.find("passcode", self.passcode)
self.root_discriminator = j.find("distinguish", self.root_discriminator)
self.root_passcode = j.find("passcode", self.root_passcode)
self.ipv4only = bool(j.find("ipv4only", false))
except .. as e, m
if e != "io_error"
@ -492,12 +561,12 @@ class Matter_Device
end
var dirty = false
if self.discriminator == nil
self.discriminator = crypto.random(2).get(0,2) & 0xFFF
if self.root_discriminator == nil
self.root_discriminator = crypto.random(2).get(0,2) & 0xFFF
dirty = true
end
if self.passcode == nil
self.passcode = self.PASSCODE_DEFAULT
if self.root_passcode == nil
self.root_passcode = self.PASSCODE_DEFAULT
dirty = true
end
if dirty self.save_param() end
@ -533,112 +602,157 @@ class Matter_Device
# are defined
def start_mdns_announce_hostnames()
if tasmota.wifi()['up']
self._start_mdns_announce(false)
self._mdns_announce_hostname(false)
else
tasmota.add_rule("Wifi#Connected", def ()
self._start_mdns_announce(false)
self._mdns_announce_hostname(false)
tasmota.remove_rule("Wifi#Connected", "matter_mdns_host")
end, "matter_mdns_host")
end
if tasmota.eth()['up']
self._start_mdns_announce(true)
self._mdns_announce_hostname(true)
else
tasmota.add_rule("Eth#Connected", def ()
self._start_mdns_announce(true)
self._mdns_announce_hostname(true)
tasmota.remove_rule("Eth#Connected", "matter_mdns_host")
end, "matter_mdns_host")
end
end
#############################################################
# Start UDP mDNS announcements for commissioning
# Start UDP mDNS announcements hostname
# This announcement is independant from commissioning windows
#
# eth is `true` if ethernet turned up, `false` is wifi turned up
def _start_mdns_announce(is_eth)
def _mdns_announce_hostname(is_eth)
import mdns
import string
mdns.start()
try
if is_eth
# Add Hostname (based on MAC) with IPv4/IPv6 addresses
var eth = tasmota.eth()
self.hostname_eth = string.replace(eth.find("mac"), ':', '')
if !self.ipv4only
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s, %s)", self.hostname_eth, eth.find('ip6local',''), eth.find('ip','')), 3)
mdns.add_hostname(self.hostname_eth, eth.find('ip6local',''), eth.find('ip',''), eth.find('ip6',''))
else
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s)", self.hostname_eth, eth.find('ip','')), 3)
mdns.add_hostname(self.hostname_eth, eth.find('ip',''))
end
else
var wifi = tasmota.wifi()
self.hostname_wifi = string.replace(wifi.find("mac"), ':', '')
if !self.ipv4only
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s, %s)", self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip','')), 3)
mdns.add_hostname(self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip',''), wifi.find('ip6',''))
else
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s)", self.hostname_eth, wifi.find('ip','')), 3)
mdns.add_hostname(self.hostname_wifi, wifi.find('ip',''))
end
end
tasmota.log(string.format("MTR: start mDNS on %s host '%s.local'", is_eth ? "eth" : "wifi", is_eth ? self.hostname_eth : self.hostname_wifi), 2)
except .. as e, m
tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2)
end
self.mdns_announce_op_discovery_all_fabrics()
end
#############################################################
# Announce MDNS for PASE commissioning
#
# eth is `true` if ethernet turned up, `false` is wifi turned up
def mdns_announce_PASE()
import mdns
import string
var services = {
# "VP":str(self.vendorid) + "+" + str(self.productid),
"D": self.discriminator,
"VP":str(self.vendorid) + "+" + str(self.productid),
"D": self.commissioning_discriminator,
"CM":1, # requires passcode
"T":0, # no support for TCP
"SII":5000, "SAI":300
}
# mdns
try
if is_eth
var eth = tasmota.eth()
self.hostname_eth = string.replace(eth.find("mac"), ':', '')
if !self.ipv4only
# mdns.add_hostname(self.hostname_eth, eth.find('ip6local',''), eth.find('ip',''), eth.find('ip6',''))
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s, %s)", self.hostname_eth, eth.find('ip6local',''), eth.find('ip','')), 3)
mdns.add_hostname(self.hostname_eth, eth.find('ip6local',''), eth.find('ip',''))
else
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s)", self.hostname_eth, eth.find('ip','')), 3)
mdns.add_hostname(self.hostname_eth, eth.find('ip',''))
end
if self.hostname_eth
# Add Matter `_matterc._udp` service
tasmota.log(string.format("MTR: calling mdns.add_service(%s, %s, %i, %s, %s, %s)", "_matterc", "_udp", 5540, str(services), self.commissioning_instance_eth, self.hostname_eth), 3)
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_eth, self.hostname_eth)
self.mdns_pase_eth = true
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
is_eth ? self.commissioning_instance_eth : self.commissioning_instance_wifi,
is_eth ? self.hostname_eth : self.hostname_wifi), 2)
tasmota.log(string.format("MTR: announce mDNS on %s '%s' ptr to `%s.local`", "eth", self.commissioning_instance_eth, self.hostname_eth), 2)
# `mdns.add_subtype(service:string, proto:string, instance:string, hostname:string, subtype:string) -> nil`
var subtype = "_L" + str(self.discriminator & 0xFFF)
tasmota.log("MTR: adding subtype: "+subtype, 3)
var subtype = "_L" + str(self.commissioning_discriminator & 0xFFF)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth, subtype)
subtype = "_S" + str((self.discriminator & 0xF00) >> 8)
tasmota.log("MTR: adding subtype: "+subtype, 3)
subtype = "_S" + str((self.commissioning_discriminator & 0xF00) >> 8)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth, subtype)
subtype = "_V" + str(self.vendorid)
tasmota.log("MTR: adding subtype: "+subtype, 3)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth, subtype)
subtype = "_CM1"
tasmota.log("MTR: adding subtype: "+subtype, 3)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth, subtype)
else
var wifi = tasmota.wifi()
self.hostname_wifi = string.replace(wifi.find("mac"), ':', '')
if !self.ipv4only
mdns.add_hostname(self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip',''), wifi.find('ip6',''))
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s, %s)", self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip','')), 3)
mdns.add_hostname(self.hostname_wifi, wifi.find('ip6local',''), wifi.find('ip',''))
else
tasmota.log(string.format("MTR: calling mdns.add_hostname(%s, %s)", self.hostname_eth, wifi.find('ip','')), 3)
mdns.add_hostname(self.hostname_wifi, wifi.find('ip',''))
end
end
if self.hostname_wifi
tasmota.log(string.format("MTR: calling mdns.add_service(%s, %s, %i, %s, %s, %s)", "_matterc", "_udp", 5540, str(services), self.commissioning_instance_wifi, self.hostname_wifi), 3)
mdns.add_service("_matterc", "_udp", 5540, services, self.commissioning_instance_wifi, self.hostname_wifi)
self.mdns_pase_wifi = true
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", is_eth ? "eth" : "wifi",
is_eth ? self.commissioning_instance_eth : self.commissioning_instance_wifi,
is_eth ? self.hostname_eth : self.hostname_wifi), 2)
tasmota.log(string.format("MTR: starting mDNS on %s '%s' ptr to `%s.local`", "wifi", self.commissioning_instance_wifi, self.hostname_wifi), 2)
# `mdns.add_subtype(service:string, proto:string, instance:string, hostname:string, subtype:string) -> nil`
var subtype = "_L" + str(self.discriminator & 0xFFF)
tasmota.log("MTR: adding subtype: "+subtype, 3)
var subtype = "_L" + str(self.commissioning_discriminator & 0xFFF)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi, subtype)
subtype = "_S" + str((self.discriminator & 0xF00) >> 8)
tasmota.log("MTR: adding subtype: "+subtype, 3)
subtype = "_S" + str((self.commissioning_discriminator & 0xF00) >> 8)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi, subtype)
subtype = "_V" + str(self.vendorid)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi, subtype)
# subtype = "_V" + str(self.vendorid)
# tasmota.log("MTR: adding subtype: "+subtype, 3)
# mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi, subtype)
subtype = "_CM1"
tasmota.log("MTR: adding subtype: "+subtype, 3)
tasmota.log("MTR: adding subtype: "+subtype, 2)
mdns.add_subtype("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi, subtype)
end
except .. as e, m
tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2)
end
self.mdns_announce_op_discovery_all_fabrics()
end
#############################################################
# MDNS remove any PASE announce
#
# eth is `true` if ethernet turned up, `false` is wifi turned up
def mdns_remove_PASE()
import mdns
import string
try
if self.mdns_pase_eth
tasmota.log(string.format("MTR: calling mdns.remove_service(%s, %s, %s, %s)", "_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth), 3)
tasmota.log(string.format("MTR: remove mdns on %s '%s'", "eth", self.commissioning_instance_eth), 2)
self.mdns_pase_eth = false
mdns.remove_service("_matterc", "_udp", self.commissioning_instance_eth, self.hostname_eth)
end
if self.mdns_pase_wifi
tasmota.log(string.format("MTR: calling mdns.remove_service(%s, %s, %s, %s)", "_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi), 3)
tasmota.log(string.format("MTR: remove mdns on %s '%s'", "wifi", self.commissioning_instance_wifi), 2)
self.mdns_pase_wifi = false
mdns.remove_service("_matterc", "_udp", self.commissioning_instance_wifi, self.hostname_wifi)
end
except .. as e, m
tasmota.log("MTR: Exception" + str(e) + "|" + str(m), 2)
end
end
#############################################################

View File

@ -273,8 +273,8 @@ class Matter_IM
)
end
tasmota.log("MTR: ReportDataMessage=" + str(ret), 3)
tasmota.log("MTR: ReportDataMessageTLV=" + str(ret.to_TLV()), 3)
# tasmota.log("MTR: ReportDataMessage=" + str(ret), 3)
# tasmota.log("MTR: ReportDataMessageTLV=" + str(ret.to_TLV()), 3)
return ret
end

View File

@ -193,6 +193,12 @@ class Matter_IM_Subscription_Shop
end
end
def remove_by_fabric(fabric)
for session: fabric._sessions
self.remove_by_session(session)
end
end
#############################################################
# dispatch every 250ms click to sub-objects that need it
def every_250ms()

View File

@ -287,7 +287,7 @@ class Matter_Frame
resp.message_counter = self.session.counter_snd.next()
resp.local_session_id = self.session.initiator_session_id
else
resp.message_counter = self.session.__counter_insecure_snd.next()
resp.message_counter = self.session._counter_insecure_snd.next()
resp.local_session_id = 0
end
@ -330,7 +330,7 @@ class Matter_Frame
resp.message_counter = session.counter_snd.next()
resp.local_session_id = session.initiator_session_id
else
resp.message_counter = session.__counter_insecure_snd.next()
resp.message_counter = session._counter_insecure_snd.next()
resp.local_session_id = 0
end

View File

@ -28,15 +28,12 @@ class Matter_MessageHandler
# handlers
var commissioning
var im # handler for Interaction Model
# counters
var counter_rcv # Global Unencrypted Message Counter incoming
#############################################################
def init(device)
self.device = device
self.commissioning = matter.Commisioning_Context(self)
self.im = matter.IM(device)
self.counter_rcv = matter.Counter()
end
#############################################################
@ -61,15 +58,15 @@ class Matter_MessageHandler
#############################################################
### unencrypted session, handled by commissioning
var session = self.device.sessions.find_session_source_id_unsecure(frame.source_node_id, 90) # 90 seconds max
tasmota.log("MTR: find session by source_node_id = " + str(frame.source_node_id) + "session_id = " + str(session.local_session_id), 3)
tasmota.log("MTR: find session by source_node_id = " + str(frame.source_node_id) + " session_id = " + str(session.local_session_id), 3)
if addr session._ip = addr end
if port session._port = port end
session._message_handler = self
frame.session = session
# check if it's a duplicate
if !self.counter_rcv.validate(frame.message_counter, false)
tasmota.log(string.format("MTR: rejected duplicate unencrypted message = %i ref = %i", frame.message_counter, self.counter_rcv.val()), 3)
if !session._counter_insecure_rcv.validate(frame.message_counter, false)
tasmota.log(string.format("MTR: rejected duplicate unencrypted message = %i ref = %i", frame.message_counter, session._counter_insecure_rcv.val()), 3)
return false
end

View File

@ -26,13 +26,21 @@ class Matter_Plugin
static var EMPTY_LIST = []
static var EMPTY_MAP = {}
var device # reference to the `device` global object
var endpoints # list of supported endpoints
var endpoints # list of supported endpoints TODO refactor
var endpoint # current endpoint
var clusters # map from cluster to list of attributes
#############################################################
# MVC Model
#
# Model linking the plugin to the Tasmota behavior
#############################################################
#############################################################
# Constructor
def init(device)
def init(device, endpoint)
self.device = device
self.endpoint = endpoint
self.endpoints = self.EMPTY_LIST
self.clusters = self.EMPTY_LIST
end
@ -68,6 +76,11 @@ class Matter_Plugin
return self.clusters.contains(cluster) && self.endpoints.find(endpoint) != nil
end
#############################################################
# MVC Model
#
# View reading attributes
#############################################################
#############################################################
# read attribute
def read_attribute(session, ctx)
@ -95,12 +108,22 @@ class Matter_Plugin
return nil
end
#############################################################
# MVC Model
#
# Controller write attributes
#############################################################
#############################################################
# write attribute
def write_attribute(session, ctx, write_data)
return nil
end
#############################################################
# MVC Model
#
# Controller invoke request
#############################################################
#############################################################
# invoke command
def invoke_request(session, val, ctx)
@ -113,5 +136,11 @@ class Matter_Plugin
def timed_request(session, val, ctx)
return nil
end
#############################################################
# every_second
def every_second()
end
end
matter.Plugin = Matter_Plugin

View File

@ -32,19 +32,46 @@ class Matter_Plugin_OnOff : Matter_Plugin
0x0004: [0,0xFFFC,0xFFFD], # Groups 1.3 p.21
0x0005: [0,1,2,3,4,5,0xFFFC,0xFFFD], # Scenes 1.4 p.30 - no writable
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
0x0008: [0,15,17,0xFFFC,0xFFFD] # Level Control 1.6 p.57
# 0x0008: [0,15,17,0xFFFC,0xFFFD] # Level Control 1.6 p.57
}
static var TYPES = { 0x010A: 2 } # On/Off Light
var onoff # fake status for now # TODO
var tasmota_relay_index # Relay number in Tasmota (zero based)
var shadow_onoff # fake status for now # TODO
#############################################################
# Constructor
def init(device)
super(self).init(device)
def init(device, endpoint, tasmota_relay_index)
super(self).init(device, endpoint)
self.endpoints = self.ENDPOINTS
self.endpoint = self.ENDPOINTS[0] # TODO refactor endpoint management
self.clusters = self.CLUSTERS
self.onoff = false # fake status for now # TODO
self.get_onoff() # read actual value
if tasmota_relay_index == nil tasmota_relay_index = 0 end
self.tasmota_relay_index = tasmota_relay_index
end
#############################################################
# Model
#
def set_onoff(v)
tasmota.set_power(self.tasmota_relay_index, bool(v))
self.get_onoff()
end
#############################################################
# get_onoff
#
# Update shadow and signal any change
def get_onoff()
var state = tasmota.get_power(self.tasmota_relay_index)
if state != nil
if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
self.onoff_changed() # signal any change
end
self.shadow_onoff = state
end
if self.shadow_onoff == nil self.shadow_onoff = false end # avoid any `nil` value when initializing
return self.shadow_onoff
end
#############################################################
@ -118,7 +145,7 @@ class Matter_Plugin_OnOff : Matter_Plugin
# ====================================================================================================
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
if attribute == 0x0000 # ---------- OnOff / bool ----------
return TLV.create_TLV(TLV.BOOL, self.onoff)
return TLV.create_TLV(TLV.BOOL, self.get_onoff())
elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
return TLV.create_TLV(TLV.U4, 0) # 0 = no Level Control for Lighting
elif attribute == 0xFFFD # ---------- ClusterRevision / u2 ----------
@ -182,16 +209,13 @@ class Matter_Plugin_OnOff : Matter_Plugin
# ====================================================================================================
elif cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
if command == 0x0000 # ---------- Off ----------
if self.onoff self.onoff_changed(ctx) end
self.onoff = false
self.set_onoff(false)
return true
elif command == 0x0001 # ---------- On ----------
if !self.onoff self.onoff_changed(ctx) end
self.onoff = true
self.set_onoff(true)
return true
elif command == 0x0002 # ---------- Toggle ----------
self.onoff_changed(ctx)
self.onoff = !self.onoff
self.set_onoff(!self.get_onoff())
return true
end
# ====================================================================================================
@ -218,10 +242,15 @@ class Matter_Plugin_OnOff : Matter_Plugin
#############################################################
# Signal that onoff attribute changed
def onoff_changed(ctx)
self.attribute_updated(ctx.endpoint, 0x0006, 0x0000)
def onoff_changed()
self.attribute_updated(self.endpoint, 0x0006, 0x0000)
end
#############################################################
# every_second
def every_second()
self.get_onoff() # force reading value and sending subscriptions
end
end
matter.Plugin_OnOff = Matter_Plugin_OnOff

View File

@ -29,7 +29,7 @@ class Matter_Plugin_Root : Matter_Plugin
static var CLUSTERS = {
0x001D: [0,1,2,3], # Descriptor Cluster 9.5 p.453
0x001F: [0,2,3,4], # Access Control Cluster, p.461
0x0028: [0,1,2,3,4,5,6,7,8,9,0x12,0x13],# Basic Information Cluster cluster 11.1 p.565
0x0028: [0,1,2,3,4,5,6,7,8,9,0x0F,0x12,0x13],# Basic Information Cluster cluster 11.1 p.565
# 0x002A: [0,1,2,3], # OTA Software Update Requestor Cluster Definition 11.19.7 p.762
0x002B: [0,1], # Localization Configuration Cluster 11.3 p.580
0x002C: [0,1,2], # Time Format Localization Cluster 11.4 p.581
@ -39,7 +39,7 @@ class Matter_Plugin_Root : Matter_Plugin
0x0033: [0,1,2,8], # General Diagnostics Cluster 11.11 p.642
0x0034: [], # Software Diagnostics Cluster 11.12 p.654
0x0038: [0,1,7], # Time Synchronization 11.16 p.689
0x003C: [], # Administrator Commissioning Cluster 11.18 p.725
0x003C: [0,1,2], # Administrator Commissioning Cluster 11.18 p.725
0x003E: [0,1,2,3,4,5], # Node Operational Credentials Cluster 11.17 p.704
0x003F: [] # Group Key Management Cluster 11.2 p.572
}
@ -47,8 +47,8 @@ class Matter_Plugin_Root : Matter_Plugin
#############################################################
# Constructor
def init(device)
super(self).init(device)
def init(device, endpoint)
super(self).init(device, endpoint)
self.endpoints = self.ENDPOINTS
self.clusters = self.CLUSTERS
end
@ -157,6 +157,7 @@ class Matter_Plugin_Root : Matter_Plugin
var nocs = nocl.add_struct(nil)
nocs.add_TLV(1, TLV.B2, loc_fabric.get_noc()) # NOC
nocs.add_TLV(2, TLV.B2, loc_fabric.get_icac()) # ICAC
nocs.add_TLV(0xFE, TLV.U2, loc_fabric.get_fabric_index()) # Label
end
return nocl
elif attribute == 0x0001 # ---------- Fabrics / list[FabricDescriptorStruct] ----------
@ -166,9 +167,10 @@ class Matter_Plugin_Root : Matter_Plugin
var fab = fabrics.add_struct(nil) # encoding see p.303
fab.add_TLV(1, TLV.B2, root_ca_tlv.findsubval(9)) # RootPublicKey
fab.add_TLV(2, TLV.U2, loc_fabric.get_admin_vendor()) # VendorID
fab.add_TLV(3, TLV.U8, loc_fabric.get_fabric_compressed()) # FabricID
fab.add_TLV(3, TLV.U8, loc_fabric.get_fabric_id()) # FabricID
fab.add_TLV(4, TLV.U8, loc_fabric.get_device_id()) # NodeID
fab.add_TLV(5, TLV.UTF1, loc_fabric.get_fabric_label()) # Label
fab.add_TLV(0xFE, TLV.U2, loc_fabric.get_fabric_index()) # idx
end
return fabrics
elif attribute == 0x0002 # ---------- SupportedFabrics / u1 ----------
@ -179,29 +181,36 @@ class Matter_Plugin_Root : Matter_Plugin
elif attribute == 0x0004 # ---------- TrustedRootCertificates / list[octstr] ----------
# TODO
elif attribute == 0x0005 # ---------- Current­ FabricIndex / u1 ----------
var fabric_active = session._fabric
var fabric_index = 0
var found = false
for fab: self.device.sessions.active_fabrics()
if fab == fabric_active
found = true
break
else
fabric_index += 1
end
end
if !found fabric_index = -1 end
return TLV.create_TLV(TLV.U1, fabric_index + 1) # number of active sessions
return TLV.create_TLV(TLV.U1, session._fabric.get_fabric_index()) # number of active sessions
end
# ====================================================================================================
elif cluster == 0x003C # ========== Administrator Commissioning Cluster 11.18 p.725 ==========
# TODO
if attribute == 0x0000 # ---------- WindowStatus / u8 ----------
var commissioning_open = self.device.is_commissioning_open()
var basic_commissioning = self.device.is_root_commissioning_open()
var val = commissioning_open ? (basic_commissioning ? 2 #-BasicWindowOpen-# : 1 #-EnhancedWindowOpen-#) : 0 #-WindowNotOpen-#
return TLV.create_TLV(TLV.U1, val)
elif attribute == 0x0001 # ---------- AdminFabricIndex / u16 ----------
var admin_fabric = self.device.commissioning_admin_fabric
if admin_fabric != nil
return TLV.create_TLV(TLV.U2, admin_fabric.get_fabric_index())
else
return TLV.create_TLV(TLV.NULL, nil)
end
elif attribute == 0x0002 # ---------- AdminVendorId / u16 ----------
var admin_fabric = self.device.commissioning_admin_fabric
if admin_fabric != nil
return TLV.create_TLV(TLV.U2, admin_fabric.get_admin_vendor())
else
return TLV.create_TLV(TLV.NULL, nil)
end
end
# ====================================================================================================
elif cluster == 0x0028 # ========== Basic Information Cluster cluster 11.1 p.565 ==========
if attribute == 0x0000 # ---------- DataModelRevision / u16 ----------
if attribute == 0x0000 # ---------- DataModelRevision / CommissioningWindowStatus ----------
return TLV.create_TLV(TLV.U2, 0)
elif attribute == 0x0001 # ---------- VendorName / string ----------
return TLV.create_TLV(TLV.UTF1, "Tasmota")
@ -223,6 +232,8 @@ class Matter_Plugin_Root : Matter_Plugin
return TLV.create_TLV(TLV.U2, 1)
elif attribute == 0x000A # ---------- SoftwareVersionString / string ----------
return TLV.create_TLV(TLV.UTF1, tasmota.cmd("Status 2", true)['StatusFWR']['Version'])
elif attribute == 0x000F # ---------- SerialNumber / string ----------
return TLV.create_TLV(TLV.UTF1, tasmota.wifi().find("mac", ""))
elif attribute == 0x0012 # ---------- UniqueID / string 32 max ----------
return TLV.create_TLV(TLV.UTF1, tasmota.wifi().find("mac", ""))
elif attribute == 0x0013 # ---------- CapabilityMinima / CapabilityMinimaStruct ----------
@ -323,6 +334,7 @@ class Matter_Plugin_Root : Matter_Plugin
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
import crypto
import string
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
@ -520,20 +532,61 @@ class Matter_Plugin_Root : Matter_Plugin
elif command == 0x000A # ---------- RemoveFabric ----------
var index = val.findsubval(0) # FabricIndex
var sessions_act = self.device.sessions.sessions_active()
if index >= 1 && index <= size(sessions_act)
var session_deleted = sessions_act[index - 1]
tasmota.log("MTR: removing fabric " + session.get_fabric_id().copy().reverse().tohex())
self.device.sessions.remove_session()
self.device.sessions.save_fabrics()
else
# TODO return error 11 InvalidFabricIndex
for fab: self.device.sessions.active_fabrics()
if fab.get_fabric_index() == index
tasmota.log("MTR: removing fabric " + fab.get_fabric_id().copy().reverse().tohex(), 2)
self.device.remove_fabric(fab)
break
end
end
tasmota.log("MTR: RemoveFabric fabric("+str(index)+") not found", 2)
ctx.status = matter.SUCCESS # OK
return nil # trigger a standalone ack
end
# ====================================================================================================
elif cluster == 0x003C # ========== Administrator Commissioning Cluster 11.18 p.725 ==========
if command == 0x0000 # ---------- OpenCommissioningWindow ----------
var timeout = val.findsubval(0) # CommissioningTimeout u2
var passcode_verifier = val.findsubval(1) # PAKEPasscodeVerifier octstr
var discriminator = val.findsubval(2) # Discriminator u2
var iterations = val.findsubval(3) # Iterations u4
var salt = val.findsubval(4) # Salt octstr
tasmota.log(string.format("MTR: OpenCommissioningWindow(timeout=%i, passcode=%s, discriminator=%i, iterations=%i, salt=%s)",
timeout, passcode_verifier.tohex(), discriminator, iterations, salt.tohex()), 2)
# check values
if timeout == nil || passcode_verifier == nil || discriminator == nil || iterations == nil || salt == nil
ctx.status = matter.INVALID_DATA_TYPE
return nil # trigger a standalone ack
end
if size(passcode_verifier) != 32+65 || size(salt) < 16 || size(salt) > 32
tasmota.log("MTR: wrong size for PAKE parameters")
ctx.status = matter.CONSTRAINT_ERROR
return nil # trigger a standalone ack
end
var w0 = passcode_verifier[0..31]
var L = passcode_verifier[32..]
self.device.start_basic_commissioning(timeout, iterations, discriminator, salt, w0, #-w1,-# L, session.get_fabric())
# TODO announce in MDNS
return true # OK
elif command == 0x0001 # ---------- OpenBasicCommissioningWindow ----------
var commissioning_timeout = val.findsubval(0) # CommissioningTimeout
tasmota.log("MTR: OpenBasicCommissioningWindow commissioning_timeout="+str(commissioning_timeout), 2)
self.device.start_root_basic_commissioning(commissioning_timeout)
return true
elif command == 0x0002 # ---------- RevokeCommissioning ----------
# TODO add checks that the commissioning window was opened by the same fabric
self.device.stop_basic_commissioning()
return true
end
# ====================================================================================================
elif cluster == 0x002A # ========== OTA Software Update Requestor Cluster Definition 11.19.7 p.762 ==========

View File

@ -45,6 +45,8 @@ class Matter_Fabric : Matter_Expirable
var _store # reference back to session store
# timestamp
var created
# fabric-index
var fabric_index # index number for fabrics, starts with `1`
# list of active sessions
var _sessions # only active CASE sessions that need to be persisted
# our own private key
@ -82,6 +84,9 @@ class Matter_Fabric : Matter_Expirable
def get_admin_subject() return self.admin_subject end
def get_admin_vendor() return self.admin_vendor end
def get_ca() return self.root_ca_certificate end
def get_fabric_index() return self.fabric_index end
def set_fabric_index(v) self.fabric_index = v end
#############################################################
# Operational Group Key Derivation, 4.15.2, p.182
@ -136,7 +141,7 @@ class Matter_Fabric : Matter_Expirable
end
#############################################################
# Fabric::to_json()
# Fabric::tojson()
#
# convert a single entry as json
# returns a JSON string
@ -146,6 +151,7 @@ class Matter_Fabric : Matter_Expirable
import string
import introspect
self.persist_pre()
var keys = []
for k : introspect.members(self)
var v = introspect.get(self, k)
@ -171,6 +177,7 @@ class Matter_Fabric : Matter_Expirable
r.push('"_sessions":' + s_list)
end
self.persist_post()
return "{" + r.concat(",") + "}"
end
@ -203,7 +210,7 @@ class Matter_Fabric : Matter_Expirable
introspect.set(self, k, v)
end
end
self.hydrate_post()
return self
end
@ -231,7 +238,7 @@ class Matter_Session : Matter_Expirable
var initiator_session_id # id used to respond to the initiator
var created # timestamp (UTC) when the session was created
var last_used # timestamp (UTC) when the session was last used
var source_node_id # source node if bytes(8) (opt, used only when session is not established)
var _source_node_id # source node if bytes(8) (opt, used only when session is not established)
# session_ids when the session will be active
var __future_initiator_session_id
var __future_local_session_id
@ -244,8 +251,8 @@ class Matter_Session : Matter_Expirable
var _port # port of the last received packet
var _message_handler # pointer to the message handler for this session
# non-session counters
var __counter_insecure_rcv # counter for incoming messages
var __counter_insecure_snd # counter for outgoing messages
var _counter_insecure_rcv # counter for incoming messages
var _counter_insecure_snd # counter for outgoing messages
# encryption keys and challenges
var i2rkey # key initiator to receiver (incoming)
var r2ikey # key receiver to initiator (outgoing)
@ -275,8 +282,8 @@ class Matter_Session : Matter_Expirable
self.initiator_session_id = initiator_session_id
self.counter_rcv = matter.Counter()
self.counter_snd = matter.Counter()
self.__counter_insecure_rcv = matter.Counter()
self.__counter_insecure_snd = matter.Counter()
self._counter_insecure_rcv = matter.Counter()
self._counter_insecure_snd = matter.Counter()
self._breadcrumb = 0
self._exchange_id = crypto.random(2).get(0,2) # generate a random 16 bits number, then increment with rollover
@ -300,6 +307,9 @@ class Matter_Session : Matter_Expirable
def fabric_completed()
self._fabric.set_no_expiration()
self._fabric.set_persist(true)
if (self._fabric.get_fabric_index() == nil)
self._fabric.set_fabric_index(self._store.next_fabric_idx())
end
self._store.add_fabric(self._fabric)
end
@ -324,7 +334,6 @@ class Matter_Session : Matter_Expirable
# close the PASE session, it will be re-opened with a CASE session
self.local_session_id = self.__future_local_session_id
self.initiator_session_id = self.__future_initiator_session_id
self.source_node_id = nil
self.counter_rcv.reset()
self.counter_snd.reset()
self.i2rkey = nil
@ -448,6 +457,7 @@ class Matter_Session : Matter_Expirable
import string
import introspect
self.persist_pre()
var keys = []
for k : introspect.members(self)
var v = introspect.get(self, k)
@ -468,6 +478,7 @@ class Matter_Session : Matter_Expirable
r.push(string.format("%s:%s", json.dump(str(k)), json.dump(v)))
end
self.persist_post()
return "{" + r.concat(",") + "}"
end
@ -501,7 +512,7 @@ class Matter_Session : Matter_Expirable
end
end
end
self.hydrate_post()
return self
end
@ -585,6 +596,12 @@ class Matter_Session_Store
end
end
#############################################################
# remove fabric
def remove_fabric(fabric)
self.fabrics.remove(self.fabrics.find(fabric)) # fail safe
end
#############################################################
# Remove redudant fabric
#
@ -618,6 +635,22 @@ class Matter_Session_Store
return self.fabrics.count_persistables()
end
#############################################################
# Next fabric-idx
#
# starts at `1`, computes the next available fabric-idx
def next_fabric_idx()
self.remove_expired() # clean before
var next_idx = 1
for fab: self.active_fabrics()
var fab_idx = fab.fabric_index
if type(fab_idx) == 'int' && fab_idx >= next_idx
next_idx = fab_idx + 1
end
end
return next_idx
end
#############################################################
# add session
def create_session(local_session_id, initiator_session_id)
@ -661,7 +694,7 @@ class Matter_Session_Store
var sessions = self.sessions
while i < sz
var session = sessions[i]
if session.source_node_id == nodeid
if session._source_node_id == nodeid
session.update()
return session
end
@ -720,7 +753,7 @@ class Matter_Session_Store
var session = self.get_session_by_source_node_id(source_node_id)
if session == nil
session = matter.Session(self, 0, 0)
session.source_node_id = source_node_id
session._source_node_id = source_node_id
self.sessions.push(session)
end
session.set_expire_in_seconds(expire)

View File

@ -107,7 +107,7 @@ class Matter_TLV
#############################################################
# create simple TLV
static def create_TLV(t, value)
if value != nil
if value != nil || t == 0x14 #-t == matter.TLV.NULL-# # put the actual number for performance
var v = _class() # parent is nil
v.typ = t
v.val = value

View File

@ -158,9 +158,9 @@ class Matter_UI
webserver.content_send("<fieldset><legend><b>&nbsp;Matter Passcode&nbsp;</b></legend><p></p>")
webserver.content_send("<form action='/matterc' method='post' >")
webserver.content_send("<p>Passcode:</p>")
webserver.content_send(string.format("<input type='number' min='1' max='99999998' name='passcode' value='%i'>", self.device.passcode))
webserver.content_send(string.format("<input type='number' min='1' max='99999998' name='passcode' value='%i'>", self.device.root_passcode))
webserver.content_send("<p>Distinguish id:</p>")
webserver.content_send(string.format("<input type='number' min='0' max='4095' name='discriminator' value='%i'>", self.device.discriminator))
webserver.content_send(string.format("<input type='number' min='0' max='4095' name='discriminator' value='%i'>", self.device.root_discriminator))
webserver.content_send(string.format("<p><input type='checkbox' name='ipv4'%s>IPv4 only</p>", self.device.ipv4only ? " checked" : ""))
webserver.content_send("<p></p><button name='passcode' class='button bgrn'>Change</button></form></p>")
webserver.content_send("<p></p></fieldset><p></p>")
@ -185,7 +185,7 @@ class Matter_UI
if !first webserver.content_send("<hr>") end
first = false
webserver.content_send(string.format("<fieldset><legend><b>&nbsp;%s&nbsp;</b></legend><p></p>", "&lt;No label&gt;"))
webserver.content_send(string.format("<fieldset><legend><b>&nbsp;#%i %s&nbsp;</b></legend><p></p>", f.get_fabric_index(), "&lt;No label&gt;"))
var fabric_rev = f.get_fabric_id().copy().reverse()
var deviceid_rev = f.get_device_id().copy().reverse()
@ -247,10 +247,10 @@ class Matter_UI
#---------------------------------------------------------------------#
if webserver.has_arg("passcode") || webserver.has_arg("discriminator")
if webserver.has_arg("passcode")
self.device.passcode = int(webserver.arg("passcode"))
self.device.root_passcode = int(webserver.arg("passcode"))
end
if webserver.has_arg("discriminator")
self.device.discriminator = int(webserver.arg("discriminator"))
self.device.root_discriminator = int(webserver.arg("discriminator"))
end
self.device.ipv4only = webserver.arg("ipv4") == 'on'
self.device.save_param()
@ -309,7 +309,7 @@ class Matter_UI
var matter_enabled = tasmota.get_option(matter.MATTER_OPTION)
if matter_enabled
if self.device.commissioning_open
if self.device.is_root_commissioning_open()
self.show_commissioning_info()
end
@ -337,7 +337,7 @@ class Matter_UI
if webserver.has_arg("mtc0") # Close Commissioning
self.device.stop_basic_commissioning()
elif webserver.has_arg("mtc1") # Open Commissioning
self.device.start_basic_commissioning()
self.device.start_root_basic_commissioning()
end
end

View File

@ -1977,7 +1977,7 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
),
}),
1, /* has constants */
( &(const bvalue[26]) { /* constants */
( &(const bvalue[22]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(get_active_endpoints),
/* K2 */ be_nested_str_weak(matter),
@ -2000,14 +2000,10 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
/* K19 */ be_const_int(2),
/* K20 */ be_nested_str_weak(process_attribute_expansion),
/* K21 */ be_nested_str_weak(stop_iteration),
/* K22 */ be_nested_str_weak(MTR_X3A_X20ReportDataMessage_X3D),
/* K23 */ be_const_int(3),
/* K24 */ be_nested_str_weak(MTR_X3A_X20ReportDataMessageTLV_X3D),
/* K25 */ be_nested_str_weak(to_TLV),
}),
be_str_weak(_inner_process_read_request),
&be_const_str_solidified,
( &(const binstruction[104]) { /* code */
( &(const binstruction[87]) { /* code */
0x840C0000, // 0000 CLOSURE R3 P0
0x88100100, // 0001 GETMBR R4 R0 K0
0x8C100901, // 0002 GETMET R4 R4 K1
@ -2093,25 +2089,8 @@ be_local_closure(Matter_IM__inner_process_read_request, /* name */
0x581C0015, // 0052 LDCONST R7 K21
0xAC1C0200, // 0053 CATCH R7 1 0
0xB0080000, // 0054 RAISE 2 R0 R0
0xB81E1A00, // 0055 GETNGBL R7 K13
0x8C1C0F0E, // 0056 GETMET R7 R7 K14
0x60240008, // 0057 GETGBL R9 G8
0x5C280C00, // 0058 MOVE R10 R6
0x7C240200, // 0059 CALL R9 1
0x00262C09, // 005A ADD R9 K22 R9
0x58280017, // 005B LDCONST R10 K23
0x7C1C0600, // 005C CALL R7 3
0xB81E1A00, // 005D GETNGBL R7 K13
0x8C1C0F0E, // 005E GETMET R7 R7 K14
0x60240008, // 005F GETGBL R9 G8
0x8C280D19, // 0060 GETMET R10 R6 K25
0x7C280200, // 0061 CALL R10 1
0x7C240200, // 0062 CALL R9 1
0x00263009, // 0063 ADD R9 K24 R9
0x58280017, // 0064 LDCONST R10 K23
0x7C1C0600, // 0065 CALL R7 3
0xA0000000, // 0066 CLOSE R0
0x80040C00, // 0067 RET 1 R6
0xA0000000, // 0055 CLOSE R0
0x80040C00, // 0056 RET 1 R6
})
)
);

View File

@ -382,51 +382,6 @@ void be_load_Matter_IM_Subscription_class(bvm *vm) {
extern const bclass be_class_Matter_IM_Subscription_Shop;
/********************************************************************
** Solidified function: get_by_id
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_get_by_id, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(subs),
/* K2 */ be_nested_str_weak(subscription_id),
/* K3 */ be_const_int(1),
}),
be_str_weak(get_by_id),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x58080000, // 0000 LDCONST R2 K0
0x600C000C, // 0001 GETGBL R3 G12
0x88100101, // 0002 GETMBR R4 R0 K1
0x7C0C0200, // 0003 CALL R3 1
0x140C0403, // 0004 LT R3 R2 R3
0x780E0009, // 0005 JMPF R3 #0010
0x880C0101, // 0006 GETMBR R3 R0 K1
0x940C0602, // 0007 GETIDX R3 R3 R2
0x880C0702, // 0008 GETMBR R3 R3 K2
0x1C0C0601, // 0009 EQ R3 R3 R1
0x780E0002, // 000A JMPF R3 #000E
0x880C0101, // 000B GETMBR R3 R0 K1
0x940C0602, // 000C GETIDX R3 R3 R2
0x80040600, // 000D RET 1 R3
0x00080503, // 000E ADD R2 R2 K3
0x7001FFF0, // 000F JMP #0001
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: every_250ms
********************************************************************/
@ -510,6 +465,51 @@ be_local_closure(Matter_IM_Subscription_Shop_every_250ms, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: get_by_id
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_get_by_id, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(subs),
/* K2 */ be_nested_str_weak(subscription_id),
/* K3 */ be_const_int(1),
}),
be_str_weak(get_by_id),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x58080000, // 0000 LDCONST R2 K0
0x600C000C, // 0001 GETGBL R3 G12
0x88100101, // 0002 GETMBR R4 R0 K1
0x7C0C0200, // 0003 CALL R3 1
0x140C0403, // 0004 LT R3 R2 R3
0x780E0009, // 0005 JMPF R3 #0010
0x880C0101, // 0006 GETMBR R3 R0 K1
0x940C0602, // 0007 GETIDX R3 R3 R2
0x880C0702, // 0008 GETMBR R3 R3 K2
0x1C0C0601, // 0009 EQ R3 R3 R1
0x780E0002, // 000A JMPF R3 #000E
0x880C0101, // 000B GETMBR R3 R0 K1
0x940C0602, // 000C GETIDX R3 R3 R2
0x80040600, // 000D RET 1 R3
0x00080503, // 000E ADD R2 R2 K3
0x7001FFF0, // 000F JMP #0001
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: new_subscription
********************************************************************/
@ -577,80 +577,6 @@ be_local_closure(Matter_IM_Subscription_Shop_new_subscription, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: attribute_updated_ctx
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_attribute_updated_ctx, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(subs),
/* K2 */ be_nested_str_weak(attribute_updated_ctx),
/* K3 */ be_const_int(1),
}),
be_str_weak(attribute_updated_ctx),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x580C0000, // 0000 LDCONST R3 K0
0x6010000C, // 0001 GETGBL R4 G12
0x88140101, // 0002 GETMBR R5 R0 K1
0x7C100200, // 0003 CALL R4 1
0x14100604, // 0004 LT R4 R3 R4
0x78120007, // 0005 JMPF R4 #000E
0x88100101, // 0006 GETMBR R4 R0 K1
0x94100803, // 0007 GETIDX R4 R4 R3
0x8C100902, // 0008 GETMET R4 R4 K2
0x5C180200, // 0009 MOVE R6 R1
0x5C1C0400, // 000A MOVE R7 R2
0x7C100600, // 000B CALL R4 3
0x000C0703, // 000C ADD R3 R3 K3
0x7001FFF2, // 000D JMP #0001
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_init, /* name */
be_nested_proto(
3, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(im),
/* K1 */ be_nested_str_weak(subs),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x60080012, // 0001 GETGBL R2 G18
0x7C080000, // 0002 CALL R2 0
0x90020202, // 0003 SETMBR R0 K1 R2
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: remove_sub
********************************************************************/
@ -697,6 +623,49 @@ be_local_closure(Matter_IM_Subscription_Shop_remove_sub, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: attribute_updated_ctx
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_attribute_updated_ctx, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(subs),
/* K2 */ be_nested_str_weak(attribute_updated_ctx),
/* K3 */ be_const_int(1),
}),
be_str_weak(attribute_updated_ctx),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x580C0000, // 0000 LDCONST R3 K0
0x6010000C, // 0001 GETGBL R4 G12
0x88140101, // 0002 GETMBR R5 R0 K1
0x7C100200, // 0003 CALL R4 1
0x14100604, // 0004 LT R4 R3 R4
0x78120007, // 0005 JMPF R4 #000E
0x88100101, // 0006 GETMBR R4 R0 K1
0x94100803, // 0007 GETIDX R4 R4 R3
0x8C100902, // 0008 GETMET R4 R4 K2
0x5C180200, // 0009 MOVE R6 R1
0x5C1C0400, // 000A MOVE R7 R2
0x7C100600, // 000B CALL R4 3
0x000C0703, // 000C ADD R3 R3 K3
0x7001FFF2, // 000D JMP #0001
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: remove_by_session
********************************************************************/
@ -745,23 +714,96 @@ be_local_closure(Matter_IM_Subscription_Shop_remove_by_session, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_init, /* name */
be_nested_proto(
3, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(im),
/* K1 */ be_nested_str_weak(subs),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x60080012, // 0001 GETGBL R2 G18
0x7C080000, // 0002 CALL R2 0
0x90020202, // 0003 SETMBR R0 K1 R2
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: remove_by_fabric
********************************************************************/
be_local_closure(Matter_IM_Subscription_Shop_remove_by_fabric, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_sessions),
/* K1 */ be_nested_str_weak(remove_by_session),
/* K2 */ be_nested_str_weak(stop_iteration),
}),
be_str_weak(remove_by_fabric),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0x60080010, // 0000 GETGBL R2 G16
0x880C0300, // 0001 GETMBR R3 R1 K0
0x7C080200, // 0002 CALL R2 1
0xA8020005, // 0003 EXBLK 0 #000A
0x5C0C0400, // 0004 MOVE R3 R2
0x7C0C0000, // 0005 CALL R3 0
0x8C100101, // 0006 GETMET R4 R0 K1
0x5C180600, // 0007 MOVE R6 R3
0x7C100400, // 0008 CALL R4 2
0x7001FFF9, // 0009 JMP #0004
0x58080002, // 000A LDCONST R2 K2
0xAC080200, // 000B CATCH R2 1 0
0xB0080000, // 000C RAISE 2 R0 R0
0x80000000, // 000D RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_IM_Subscription_Shop
********************************************************************/
be_local_class(Matter_IM_Subscription_Shop,
2,
NULL,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(every_250ms, -1), be_const_closure(Matter_IM_Subscription_Shop_every_250ms_closure) },
{ be_const_key_weak(get_by_id, -1), be_const_closure(Matter_IM_Subscription_Shop_get_by_id_closure) },
{ be_const_key_weak(attribute_updated_ctx, -1), be_const_closure(Matter_IM_Subscription_Shop_attribute_updated_ctx_closure) },
{ be_const_key_weak(every_250ms, -1), be_const_closure(Matter_IM_Subscription_Shop_every_250ms_closure) },
{ be_const_key_weak(remove_sub, 1), be_const_closure(Matter_IM_Subscription_Shop_remove_sub_closure) },
{ be_const_key_weak(init, 2), be_const_closure(Matter_IM_Subscription_Shop_init_closure) },
{ be_const_key_weak(remove_sub, -1), be_const_closure(Matter_IM_Subscription_Shop_remove_sub_closure) },
{ be_const_key_weak(new_subscription, 3), be_const_closure(Matter_IM_Subscription_Shop_new_subscription_closure) },
{ be_const_key_weak(subs, -1), be_const_var(0) },
{ be_const_key_weak(im, 7), be_const_var(1) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_IM_Subscription_Shop_init_closure) },
{ be_const_key_weak(subs, 8), be_const_var(0) },
{ be_const_key_weak(im, -1), be_const_var(1) },
{ be_const_key_weak(remove_by_session, -1), be_const_closure(Matter_IM_Subscription_Shop_remove_by_session_closure) },
{ be_const_key_weak(remove_by_fabric, -1), be_const_closure(Matter_IM_Subscription_Shop_remove_by_fabric_closure) },
})),
be_str_weak(Matter_IM_Subscription_Shop)
);

View File

@ -404,7 +404,7 @@ be_local_closure(Matter_Frame_build_response, /* name */
/* K13 */ be_nested_str_weak(message_counter),
/* K14 */ be_nested_str_weak(counter_snd),
/* K15 */ be_nested_str_weak(next),
/* K16 */ be_nested_str_weak(__counter_insecure_snd),
/* K16 */ be_nested_str_weak(_counter_insecure_snd),
/* K17 */ be_nested_str_weak(x_flag_i),
/* K18 */ be_nested_str_weak(opcode),
/* K19 */ be_nested_str_weak(exchange_id),
@ -551,7 +551,7 @@ be_local_closure(Matter_Frame_initiate_response, /* name */
/* K13 */ be_nested_str_weak(counter_snd),
/* K14 */ be_nested_str_weak(next),
/* K15 */ be_nested_str_weak(local_session_id),
/* K16 */ be_nested_str_weak(__counter_insecure_snd),
/* K16 */ be_nested_str_weak(_counter_insecure_snd),
/* K17 */ be_nested_str_weak(x_flag_i),
/* K18 */ be_const_int(1),
/* K19 */ be_nested_str_weak(opcode),

View File

@ -6,179 +6,6 @@
extern const bclass be_class_Matter_MessageHandler;
/********************************************************************
** Solidified function: send_response
********************************************************************/
be_local_closure(Matter_MessageHandler_send_response, /* name */
be_nested_proto(
11, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(msg_send),
}),
be_str_weak(send_response),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
0x88140100, // 0000 GETMBR R5 R0 K0
0x8C140B01, // 0001 GETMET R5 R5 K1
0x5C1C0200, // 0002 MOVE R7 R1
0x5C200400, // 0003 MOVE R8 R2
0x5C240600, // 0004 MOVE R9 R3
0x5C280800, // 0005 MOVE R10 R4
0x7C140A00, // 0006 CALL R5 5
0x80000000, // 0007 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_MessageHandler_init, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(commissioning),
/* K2 */ be_nested_str_weak(matter),
/* K3 */ be_nested_str_weak(Commisioning_Context),
/* K4 */ be_nested_str_weak(im),
/* K5 */ be_nested_str_weak(IM),
/* K6 */ be_nested_str_weak(counter_rcv),
/* K7 */ be_nested_str_weak(Counter),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0xB80A0400, // 0001 GETNGBL R2 K2
0x8C080503, // 0002 GETMET R2 R2 K3
0x5C100000, // 0003 MOVE R4 R0
0x7C080400, // 0004 CALL R2 2
0x90020202, // 0005 SETMBR R0 K1 R2
0xB80A0400, // 0006 GETNGBL R2 K2
0x8C080505, // 0007 GETMET R2 R2 K5
0x5C100200, // 0008 MOVE R4 R1
0x7C080400, // 0009 CALL R2 2
0x90020802, // 000A SETMBR R0 K4 R2
0xB80A0400, // 000B GETNGBL R2 K2
0x8C080507, // 000C GETMET R2 R2 K7
0x7C080200, // 000D CALL R2 1
0x90020C02, // 000E SETMBR R0 K6 R2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: every_second
********************************************************************/
be_local_closure(Matter_MessageHandler_every_second, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(commissioning),
/* K1 */ be_nested_str_weak(every_second),
/* K2 */ be_nested_str_weak(im),
}),
be_str_weak(every_second),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
0x88040102, // 0003 GETMBR R1 R0 K2
0x8C040301, // 0004 GETMET R1 R1 K1
0x7C040200, // 0005 CALL R1 1
0x80000000, // 0006 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: add_session
********************************************************************/
be_local_closure(Matter_MessageHandler_add_session, /* name */
be_nested_proto(
15, /* nstack */
7, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
/* K3 */ be_nested_str_weak(format),
/* K4 */ be_nested_str_weak(MTR_X3A_X20add_session_X20local_session_id_X3D_X25i_X20initiator_session_id_X3D_X25i),
/* K5 */ be_const_int(3),
/* K6 */ be_nested_str_weak(device),
/* K7 */ be_nested_str_weak(sessions),
/* K8 */ be_nested_str_weak(create_session),
/* K9 */ be_nested_str_weak(set_keys),
}),
be_str_weak(add_session),
&be_const_str_solidified,
( &(const binstruction[23]) { /* code */
0xA41E0000, // 0000 IMPORT R7 K0
0xB8220200, // 0001 GETNGBL R8 K1
0x8C201102, // 0002 GETMET R8 R8 K2
0x8C280F03, // 0003 GETMET R10 R7 K3
0x58300004, // 0004 LDCONST R12 K4
0x5C340200, // 0005 MOVE R13 R1
0x5C380400, // 0006 MOVE R14 R2
0x7C280800, // 0007 CALL R10 4
0x582C0005, // 0008 LDCONST R11 K5
0x7C200600, // 0009 CALL R8 3
0x88200106, // 000A GETMBR R8 R0 K6
0x88201107, // 000B GETMBR R8 R8 K7
0x8C201108, // 000C GETMET R8 R8 K8
0x5C280200, // 000D MOVE R10 R1
0x5C2C0400, // 000E MOVE R11 R2
0x7C200600, // 000F CALL R8 3
0x8C241109, // 0010 GETMET R9 R8 K9
0x5C2C0600, // 0011 MOVE R11 R3
0x5C300800, // 0012 MOVE R12 R4
0x5C340A00, // 0013 MOVE R13 R5
0x5C380C00, // 0014 MOVE R14 R6
0x7C240A00, // 0015 CALL R9 5
0x80000000, // 0016 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: msg_received
********************************************************************/
@ -192,7 +19,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[71]) { /* constants */
( &(const bvalue[72]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
@ -209,13 +36,13 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
/* K13 */ be_nested_str_weak(find_session_source_id_unsecure),
/* K14 */ be_nested_str_weak(source_node_id),
/* K15 */ be_nested_str_weak(MTR_X3A_X20find_X20session_X20by_X20source_node_id_X20_X3D_X20),
/* K16 */ be_nested_str_weak(session_id_X20_X3D_X20),
/* K16 */ be_nested_str_weak(_X20session_id_X20_X3D_X20),
/* K17 */ be_const_int(3),
/* K18 */ be_nested_str_weak(_ip),
/* K19 */ be_nested_str_weak(_port),
/* K20 */ be_nested_str_weak(_message_handler),
/* K21 */ be_nested_str_weak(session),
/* K22 */ be_nested_str_weak(counter_rcv),
/* K22 */ be_nested_str_weak(_counter_insecure_rcv),
/* K23 */ be_nested_str_weak(validate),
/* K24 */ be_nested_str_weak(message_counter),
/* K25 */ be_nested_str_weak(format),
@ -236,34 +63,35 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
/* K40 */ be_nested_str_weak(MTR_X3A_X20unknown_X20local_session_id_X3D),
/* K41 */ be_nested_str_weak(MTR_X3A_X20frame_X3D),
/* K42 */ be_nested_str_weak(inspect),
/* K43 */ be_nested_str_weak(MTR_X3A_X20rejected_X20duplicate_X20encrypted_X20message_X20_X3D_X20),
/* K44 */ be_nested_str_weak(_X20counter_X3D),
/* K45 */ be_nested_str_weak(decrypt),
/* K46 */ be_nested_str_weak(raw),
/* K47 */ be_nested_str_weak(payload_idx),
/* K48 */ be_const_int(1),
/* K49 */ be_nested_str_weak(MTR_X3A_X20idx_X3D_X25i_X20clear_X3D_X25s),
/* K50 */ be_nested_str_weak(MTR_X3A_X20decrypted_X20message_X3A_X20protocol_id_X3A),
/* K51 */ be_nested_str_weak(protocol_id),
/* K52 */ be_nested_str_weak(_X20opcode_X3D),
/* K53 */ be_nested_str_weak(_X20exchange_id_X3D),
/* K54 */ be_nested_str_weak(exchange_id),
/* K55 */ be_nested_str_weak(MTR_X3A_X20PROTOCOL_ID_SECURE_CHANNEL_X20),
/* K56 */ be_nested_str_weak(im),
/* K57 */ be_nested_str_weak(process_incoming_ack),
/* K58 */ be_nested_str_weak(send_enqueued),
/* K59 */ be_nested_str_weak(x_flag_r),
/* K60 */ be_nested_str_weak(build_standalone_ack),
/* K61 */ be_nested_str_weak(encode),
/* K62 */ be_nested_str_weak(encrypt),
/* K63 */ be_nested_str_weak(send_response),
/* K64 */ be_nested_str_weak(remote_ip),
/* K65 */ be_nested_str_weak(remote_port),
/* K66 */ be_nested_str_weak(MTR_X3A_X20ignoring_X20unhandled_X20protocol_id_X3A),
/* K67 */ be_nested_str_weak(MTR_X3A_X20MessageHandler_X3A_X3Amsg_received_X20exception_X3A_X20),
/* K68 */ be_nested_str_weak(_X3B),
/* K69 */ be_nested_str_weak(debug),
/* K70 */ be_nested_str_weak(traceback),
/* K43 */ be_nested_str_weak(counter_rcv),
/* K44 */ be_nested_str_weak(MTR_X3A_X20rejected_X20duplicate_X20encrypted_X20message_X20_X3D_X20),
/* K45 */ be_nested_str_weak(_X20counter_X3D),
/* K46 */ be_nested_str_weak(decrypt),
/* K47 */ be_nested_str_weak(raw),
/* K48 */ be_nested_str_weak(payload_idx),
/* K49 */ be_const_int(1),
/* K50 */ be_nested_str_weak(MTR_X3A_X20idx_X3D_X25i_X20clear_X3D_X25s),
/* K51 */ be_nested_str_weak(MTR_X3A_X20decrypted_X20message_X3A_X20protocol_id_X3A),
/* K52 */ be_nested_str_weak(protocol_id),
/* K53 */ be_nested_str_weak(_X20opcode_X3D),
/* K54 */ be_nested_str_weak(_X20exchange_id_X3D),
/* K55 */ be_nested_str_weak(exchange_id),
/* K56 */ be_nested_str_weak(MTR_X3A_X20PROTOCOL_ID_SECURE_CHANNEL_X20),
/* K57 */ be_nested_str_weak(im),
/* K58 */ be_nested_str_weak(process_incoming_ack),
/* K59 */ be_nested_str_weak(send_enqueued),
/* K60 */ be_nested_str_weak(x_flag_r),
/* K61 */ be_nested_str_weak(build_standalone_ack),
/* K62 */ be_nested_str_weak(encode),
/* K63 */ be_nested_str_weak(encrypt),
/* K64 */ be_nested_str_weak(send_response),
/* K65 */ be_nested_str_weak(remote_ip),
/* K66 */ be_nested_str_weak(remote_port),
/* K67 */ be_nested_str_weak(MTR_X3A_X20ignoring_X20unhandled_X20protocol_id_X3A),
/* K68 */ be_nested_str_weak(MTR_X3A_X20MessageHandler_X3A_X3Amsg_received_X20exception_X3A_X20),
/* K69 */ be_nested_str_weak(_X3B),
/* K70 */ be_nested_str_weak(debug),
/* K71 */ be_nested_str_weak(traceback),
}),
be_str_weak(msg_received),
&be_const_str_solidified,
@ -323,7 +151,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x90222603, // 0034 SETMBR R8 K19 R3
0x90222800, // 0035 SETMBR R8 K20 R0
0x901A2A08, // 0036 SETMBR R6 K21 R8
0x88240116, // 0037 GETMBR R9 R0 K22
0x88241116, // 0037 GETMBR R9 R8 K22
0x8C241317, // 0038 GETMET R9 R9 K23
0x882C0D18, // 0039 GETMBR R11 R6 K24
0x50300000, // 003A LDBOOL R12 0 0
@ -334,7 +162,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x8C2C0919, // 003F GETMET R11 R4 K25
0x5834001A, // 0040 LDCONST R13 K26
0x88380D18, // 0041 GETMBR R14 R6 K24
0x883C0116, // 0042 GETMBR R15 R0 K22
0x883C1116, // 0042 GETMBR R15 R8 K22
0x8C3C1F1B, // 0043 GETMET R15 R15 K27
0x7C3C0200, // 0044 CALL R15 1
0x7C2C0800, // 0045 CALL R11 4
@ -429,7 +257,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x90222603, // 009E SETMBR R8 K19 R3
0x90222800, // 009F SETMBR R8 K20 R0
0x901A2A08, // 00A0 SETMBR R6 K21 R8
0x88241116, // 00A1 GETMBR R9 R8 K22
0x8824112B, // 00A1 GETMBR R9 R8 K43
0x8C241317, // 00A2 GETMET R9 R9 K23
0x882C0D18, // 00A3 GETMBR R11 R6 K24
0x50300200, // 00A4 LDBOOL R12 1 0
@ -440,10 +268,10 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x602C0008, // 00A9 GETGBL R11 G8
0x88300D18, // 00AA GETMBR R12 R6 K24
0x7C2C0200, // 00AB CALL R11 1
0x002E560B, // 00AC ADD R11 K43 R11
0x002C172C, // 00AD ADD R11 R11 K44
0x002E580B, // 00AC ADD R11 K44 R11
0x002C172D, // 00AD ADD R11 R11 K45
0x60300008, // 00AE GETGBL R12 G8
0x88341116, // 00AF GETMBR R13 R8 K22
0x8834112B, // 00AF GETMBR R13 R8 K43
0x8C341B1B, // 00B0 GETMET R13 R13 K27
0x7C340200, // 00B1 CALL R13 1
0x7C300200, // 00B2 CALL R12 1
@ -453,27 +281,27 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x50240000, // 00B6 LDBOOL R9 0 0
0xA8040001, // 00B7 EXBLK 1 1
0x80041200, // 00B8 RET 1 R9
0x8C240D2D, // 00B9 GETMET R9 R6 K45
0x8C240D2E, // 00B9 GETMET R9 R6 K46
0x7C240200, // 00BA CALL R9 1
0x5C281200, // 00BB MOVE R10 R9
0x742A0002, // 00BC JMPT R10 #00C0
0x50280000, // 00BD LDBOOL R10 0 0
0xA8040001, // 00BE EXBLK 1 1
0x80041400, // 00BF RET 1 R10
0x88280D2F, // 00C0 GETMBR R10 R6 K47
0x04281530, // 00C1 SUB R10 R10 K48
0x88280D30, // 00C0 GETMBR R10 R6 K48
0x04281531, // 00C1 SUB R10 R10 K49
0x402A120A, // 00C2 CONNECT R10 K9 R10
0x882C0D2E, // 00C3 GETMBR R11 R6 K46
0x882C0D2F, // 00C3 GETMBR R11 R6 K47
0x9428160A, // 00C4 GETIDX R10 R11 R10
0x901A5C0A, // 00C5 SETMBR R6 K46 R10
0x88280D2E, // 00C6 GETMBR R10 R6 K46
0x901A5E0A, // 00C5 SETMBR R6 K47 R10
0x88280D2F, // 00C6 GETMBR R10 R6 K47
0x40281409, // 00C7 CONNECT R10 R10 R9
0xB82A0200, // 00C8 GETNGBL R10 K1
0x8C281502, // 00C9 GETMET R10 R10 K2
0x8C300919, // 00CA GETMET R12 R4 K25
0x58380031, // 00CB LDCONST R14 K49
0x883C0D2F, // 00CC GETMBR R15 R6 K47
0x88400D2E, // 00CD GETMBR R16 R6 K46
0x58380032, // 00CB LDCONST R14 K50
0x883C0D30, // 00CC GETMBR R15 R6 K48
0x88400D2F, // 00CD GETMBR R16 R6 K47
0x8C402104, // 00CE GETMET R16 R16 K4
0x7C400200, // 00CF CALL R16 1
0x7C300800, // 00D0 CALL R12 4
@ -484,17 +312,17 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0xB82A0200, // 00D5 GETNGBL R10 K1
0x8C281502, // 00D6 GETMET R10 R10 K2
0x60300008, // 00D7 GETGBL R12 G8
0x88340D33, // 00D8 GETMBR R13 R6 K51
0x88340D34, // 00D8 GETMBR R13 R6 K52
0x7C300200, // 00D9 CALL R12 1
0x0032640C, // 00DA ADD R12 K50 R12
0x00301934, // 00DB ADD R12 R12 K52
0x0032660C, // 00DA ADD R12 K51 R12
0x00301935, // 00DB ADD R12 R12 K53
0x60340008, // 00DC GETGBL R13 G8
0x88380D1F, // 00DD GETMBR R14 R6 K31
0x7C340200, // 00DE CALL R13 1
0x0030180D, // 00DF ADD R12 R12 R13
0x00301935, // 00E0 ADD R12 R12 K53
0x00301936, // 00E0 ADD R12 R12 K54
0x60340008, // 00E1 GETGBL R13 G8
0x88380D36, // 00E2 GETMBR R14 R6 K54
0x88380D37, // 00E2 GETMBR R14 R6 K55
0x543EFFFE, // 00E3 LDINT R15 65535
0x2C381C0F, // 00E4 AND R14 R14 R15
0x7C340200, // 00E5 CALL R13 1
@ -505,7 +333,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x8C28151D, // 00EA GETMET R10 R10 K29
0x88300D1E, // 00EB GETMBR R12 R6 K30
0x7C280400, // 00EC CALL R10 2
0x88280D33, // 00ED GETMBR R10 R6 K51
0x88280D34, // 00ED GETMBR R10 R6 K52
0x1C2C1509, // 00EE EQ R11 R10 K9
0x782E0018, // 00EF JMPF R11 #0109
0xB82E0200, // 00F0 GETNGBL R11 K1
@ -514,50 +342,50 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x8C341B2A, // 00F3 GETMET R13 R13 K42
0x5C3C0C00, // 00F4 MOVE R15 R6
0x7C340400, // 00F5 CALL R13 2
0x00366E0D, // 00F6 ADD R13 K55 R13
0x0036700D, // 00F6 ADD R13 K56 R13
0x58380011, // 00F7 LDCONST R14 K17
0x7C2C0600, // 00F8 CALL R11 3
0x882C0D1F, // 00F9 GETMBR R11 R6 K31
0x5432000F, // 00FA LDINT R12 16
0x1C2C160C, // 00FB EQ R11 R11 R12
0x782E0009, // 00FC JMPF R11 #0107
0x882C0138, // 00FD GETMBR R11 R0 K56
0x8C2C1739, // 00FE GETMET R11 R11 K57
0x882C0139, // 00FD GETMBR R11 R0 K57
0x8C2C173A, // 00FE GETMET R11 R11 K58
0x5C340C00, // 00FF MOVE R13 R6
0x7C2C0400, // 0100 CALL R11 2
0x5C141600, // 0101 MOVE R5 R11
0x78160003, // 0102 JMPF R5 #0107
0x882C0138, // 0103 GETMBR R11 R0 K56
0x8C2C173A, // 0104 GETMET R11 R11 K58
0x882C0139, // 0103 GETMBR R11 R0 K57
0x8C2C173B, // 0104 GETMET R11 R11 K59
0x5C340000, // 0105 MOVE R13 R0
0x7C2C0400, // 0106 CALL R11 2
0x50140200, // 0107 LDBOOL R5 1 0
0x70020024, // 0108 JMP #012E
0x1C2C1530, // 0109 EQ R11 R10 K48
0x1C2C1531, // 0109 EQ R11 R10 K49
0x782E001A, // 010A JMPF R11 #0126
0x882C0138, // 010B GETMBR R11 R0 K56
0x882C0139, // 010B GETMBR R11 R0 K57
0x8C2C1725, // 010C GETMET R11 R11 K37
0x5C340C00, // 010D MOVE R13 R6
0x7C2C0400, // 010E CALL R11 2
0x5C141600, // 010F MOVE R5 R11
0x78160004, // 0110 JMPF R5 #0116
0x882C0138, // 0111 GETMBR R11 R0 K56
0x8C2C173A, // 0112 GETMET R11 R11 K58
0x882C0139, // 0111 GETMBR R11 R0 K57
0x8C2C173B, // 0112 GETMET R11 R11 K59
0x5C340000, // 0113 MOVE R13 R0
0x7C2C0400, // 0114 CALL R11 2
0x7002000D, // 0115 JMP #0124
0x882C0D3B, // 0116 GETMBR R11 R6 K59
0x882C0D3C, // 0116 GETMBR R11 R6 K60
0x782E000B, // 0117 JMPF R11 #0124
0x8C2C0D3C, // 0118 GETMET R11 R6 K60
0x8C2C0D3D, // 0118 GETMET R11 R6 K61
0x7C2C0200, // 0119 CALL R11 1
0x8C30173D, // 011A GETMET R12 R11 K61
0x8C30173E, // 011A GETMET R12 R11 K62
0x7C300200, // 011B CALL R12 1
0x8C30173E, // 011C GETMET R12 R11 K62
0x8C30173F, // 011C GETMET R12 R11 K63
0x7C300200, // 011D CALL R12 1
0x8C30013F, // 011E GETMET R12 R0 K63
0x8838172E, // 011F GETMBR R14 R11 K46
0x883C1740, // 0120 GETMBR R15 R11 K64
0x88401741, // 0121 GETMBR R16 R11 K65
0x8C300140, // 011E GETMET R12 R0 K64
0x8838172F, // 011F GETMBR R14 R11 K47
0x883C1741, // 0120 GETMBR R15 R11 K65
0x88401742, // 0121 GETMBR R16 R11 K66
0x88441718, // 0122 GETMBR R17 R11 K24
0x7C300A00, // 0123 CALL R12 5
0x50140200, // 0124 LDBOOL R5 1 0
@ -567,7 +395,7 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x60340008, // 0128 GETGBL R13 G8
0x5C381400, // 0129 MOVE R14 R10
0x7C340200, // 012A CALL R13 1
0x0036840D, // 012B ADD R13 K66 R13
0x0036860D, // 012B ADD R13 K67 R13
0x58380011, // 012C LDCONST R14 K17
0x7C2C0600, // 012D CALL R11 3
0xA8040001, // 012E EXBLK 1 1
@ -581,15 +409,15 @@ be_local_closure(Matter_MessageHandler_msg_received, /* name */
0x60280008, // 0136 GETGBL R10 G8
0x5C2C0C00, // 0137 MOVE R11 R6
0x7C280200, // 0138 CALL R10 1
0x002A860A, // 0139 ADD R10 K67 R10
0x00281544, // 013A ADD R10 R10 K68
0x002A880A, // 0139 ADD R10 K68 R10
0x00281545, // 013A ADD R10 R10 K69
0x602C0008, // 013B GETGBL R11 G8
0x5C300E00, // 013C MOVE R12 R7
0x7C2C0200, // 013D CALL R11 1
0x0028140B, // 013E ADD R10 R10 R11
0x7C200400, // 013F CALL R8 2
0xA4228A00, // 0140 IMPORT R8 K69
0x8C241146, // 0141 GETMET R9 R8 K70
0xA4228C00, // 0140 IMPORT R8 K70
0x8C241147, // 0141 GETMET R9 R8 K71
0x7C240200, // 0142 CALL R9 1
0x50240000, // 0143 LDBOOL R9 0 0
0x80041200, // 0144 RET 1 R9
@ -632,23 +460,189 @@ be_local_closure(Matter_MessageHandler_every_250ms, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: every_second
********************************************************************/
be_local_closure(Matter_MessageHandler_every_second, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(commissioning),
/* K1 */ be_nested_str_weak(every_second),
/* K2 */ be_nested_str_weak(im),
}),
be_str_weak(every_second),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
0x88040102, // 0003 GETMBR R1 R0 K2
0x8C040301, // 0004 GETMET R1 R1 K1
0x7C040200, // 0005 CALL R1 1
0x80000000, // 0006 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_MessageHandler_init, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(commissioning),
/* K2 */ be_nested_str_weak(matter),
/* K3 */ be_nested_str_weak(Commisioning_Context),
/* K4 */ be_nested_str_weak(im),
/* K5 */ be_nested_str_weak(IM),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0xB80A0400, // 0001 GETNGBL R2 K2
0x8C080503, // 0002 GETMET R2 R2 K3
0x5C100000, // 0003 MOVE R4 R0
0x7C080400, // 0004 CALL R2 2
0x90020202, // 0005 SETMBR R0 K1 R2
0xB80A0400, // 0006 GETNGBL R2 K2
0x8C080505, // 0007 GETMET R2 R2 K5
0x5C100200, // 0008 MOVE R4 R1
0x7C080400, // 0009 CALL R2 2
0x90020802, // 000A SETMBR R0 K4 R2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: add_session
********************************************************************/
be_local_closure(Matter_MessageHandler_add_session, /* name */
be_nested_proto(
15, /* nstack */
7, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(string),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(log),
/* K3 */ be_nested_str_weak(format),
/* K4 */ be_nested_str_weak(MTR_X3A_X20add_session_X20local_session_id_X3D_X25i_X20initiator_session_id_X3D_X25i),
/* K5 */ be_const_int(3),
/* K6 */ be_nested_str_weak(device),
/* K7 */ be_nested_str_weak(sessions),
/* K8 */ be_nested_str_weak(create_session),
/* K9 */ be_nested_str_weak(set_keys),
}),
be_str_weak(add_session),
&be_const_str_solidified,
( &(const binstruction[23]) { /* code */
0xA41E0000, // 0000 IMPORT R7 K0
0xB8220200, // 0001 GETNGBL R8 K1
0x8C201102, // 0002 GETMET R8 R8 K2
0x8C280F03, // 0003 GETMET R10 R7 K3
0x58300004, // 0004 LDCONST R12 K4
0x5C340200, // 0005 MOVE R13 R1
0x5C380400, // 0006 MOVE R14 R2
0x7C280800, // 0007 CALL R10 4
0x582C0005, // 0008 LDCONST R11 K5
0x7C200600, // 0009 CALL R8 3
0x88200106, // 000A GETMBR R8 R0 K6
0x88201107, // 000B GETMBR R8 R8 K7
0x8C201108, // 000C GETMET R8 R8 K8
0x5C280200, // 000D MOVE R10 R1
0x5C2C0400, // 000E MOVE R11 R2
0x7C200600, // 000F CALL R8 3
0x8C241109, // 0010 GETMET R9 R8 K9
0x5C2C0600, // 0011 MOVE R11 R3
0x5C300800, // 0012 MOVE R12 R4
0x5C340A00, // 0013 MOVE R13 R5
0x5C380C00, // 0014 MOVE R14 R6
0x7C240A00, // 0015 CALL R9 5
0x80000000, // 0016 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: send_response
********************************************************************/
be_local_closure(Matter_MessageHandler_send_response, /* name */
be_nested_proto(
11, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(msg_send),
}),
be_str_weak(send_response),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
0x88140100, // 0000 GETMBR R5 R0 K0
0x8C140B01, // 0001 GETMET R5 R5 K1
0x5C1C0200, // 0002 MOVE R7 R1
0x5C200400, // 0003 MOVE R8 R2
0x5C240600, // 0004 MOVE R9 R3
0x5C280800, // 0005 MOVE R10 R4
0x7C140A00, // 0006 CALL R5 5
0x80000000, // 0007 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_MessageHandler
********************************************************************/
be_local_class(Matter_MessageHandler,
4,
3,
NULL,
be_nested_map(10,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(commissioning, 2), be_const_var(1) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(every_250ms, -1), be_const_closure(Matter_MessageHandler_every_250ms_closure) },
{ be_const_key_weak(counter_rcv, -1), be_const_var(3) },
{ be_const_key_weak(add_session, -1), be_const_closure(Matter_MessageHandler_add_session_closure) },
{ be_const_key_weak(init, 9), be_const_closure(Matter_MessageHandler_init_closure) },
{ be_const_key_weak(im, 4), be_const_var(2) },
{ be_const_key_weak(send_response, 6), be_const_closure(Matter_MessageHandler_send_response_closure) },
{ be_const_key_weak(send_response, 5), be_const_closure(Matter_MessageHandler_send_response_closure) },
{ be_const_key_weak(msg_received, -1), be_const_closure(Matter_MessageHandler_msg_received_closure) },
{ be_const_key_weak(every_250ms, -1), be_const_closure(Matter_MessageHandler_every_250ms_closure) },
{ be_const_key_weak(commissioning, 8), be_const_var(1) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_MessageHandler_init_closure) },
{ be_const_key_weak(device, 4), be_const_var(0) },
{ be_const_key_weak(im, 0), be_const_var(2) },
{ be_const_key_weak(add_session, -1), be_const_closure(Matter_MessageHandler_add_session_closure) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_MessageHandler_every_second_closure) },
})),
be_str_weak(Matter_MessageHandler)

View File

@ -32,33 +32,24 @@ be_local_closure(Matter_Plugin_read_attribute, /* name */
/********************************************************************
** Solidified function: attribute_updated
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_local_closure(Matter_Plugin_invoke_request, /* name */
be_nested_proto(
11, /* nstack */
5, /* argc */
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(attribute_updated),
0, /* has constants */
NULL, /* no const */
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
0x88140100, // 0000 GETMBR R5 R0 K0
0x8C140B01, // 0001 GETMET R5 R5 K1
0x5C1C0200, // 0002 MOVE R7 R1
0x5C200400, // 0003 MOVE R8 R2
0x5C240600, // 0004 MOVE R9 R3
0x5C280800, // 0005 MOVE R10 R4
0x7C140A00, // 0006 CALL R5 5
0x80000000, // 0007 RET 0
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
@ -66,33 +57,23 @@ be_local_closure(Matter_Plugin_attribute_updated, /* name */
/********************************************************************
** Solidified function: init
** Solidified function: every_second
********************************************************************/
be_local_closure(Matter_Plugin_init, /* name */
be_local_closure(Matter_Plugin_every_second, /* name */
be_nested_proto(
3, /* nstack */
2, /* argc */
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(endpoints),
/* K2 */ be_nested_str_weak(EMPTY_LIST),
/* K3 */ be_nested_str_weak(clusters),
}),
be_str_weak(init),
0, /* has constants */
NULL, /* no const */
be_str_weak(every_second),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x88080102, // 0001 GETMBR R2 R0 K2
0x90020202, // 0002 SETMBR R0 K1 R2
0x88080102, // 0003 GETMBR R2 R0 K2
0x90020602, // 0004 SETMBR R0 K3 R2
0x80000000, // 0005 RET 0
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
@ -124,6 +105,212 @@ be_local_closure(Matter_Plugin_subscribe_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: subscribe_event
********************************************************************/
be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(subscribe_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_event
********************************************************************/
be_local_closure(Matter_Plugin_read_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(read_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: has
********************************************************************/
be_local_closure(Matter_Plugin_has, /* name */
be_nested_proto(
6, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
/* K1 */ be_nested_str_weak(contains),
/* K2 */ be_nested_str_weak(endpoints),
/* K3 */ be_nested_str_weak(find),
}),
be_str_weak(has),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x880C0100, // 0000 GETMBR R3 R0 K0
0x8C0C0701, // 0001 GETMET R3 R3 K1
0x5C140200, // 0002 MOVE R5 R1
0x7C0C0400, // 0003 CALL R3 2
0x780E0006, // 0004 JMPF R3 #000C
0x880C0102, // 0005 GETMBR R3 R0 K2
0x8C0C0703, // 0006 GETMET R3 R3 K3
0x5C140400, // 0007 MOVE R5 R2
0x7C0C0400, // 0008 CALL R3 2
0x4C100000, // 0009 LDNIL R4
0x200C0604, // 000A NE R3 R3 R4
0x740E0000, // 000B JMPT R3 #000D
0x500C0001, // 000C LDBOOL R3 0 1
0x500C0200, // 000D LDBOOL R3 1 0
0x80040600, // 000E RET 1 R3
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_init, /* name */
be_nested_proto(
4, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(endpoint),
/* K2 */ be_nested_str_weak(endpoints),
/* K3 */ be_nested_str_weak(EMPTY_LIST),
/* K4 */ be_nested_str_weak(clusters),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x90020001, // 0000 SETMBR R0 K0 R1
0x90020202, // 0001 SETMBR R0 K1 R2
0x880C0103, // 0002 GETMBR R3 R0 K3
0x90020403, // 0003 SETMBR R0 K2 R3
0x880C0103, // 0004 GETMBR R3 R0 K3
0x90020803, // 0005 SETMBR R0 K4 R3
0x80000000, // 0006 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: write_attribute
********************************************************************/
be_local_closure(Matter_Plugin_write_attribute, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: timed_request
********************************************************************/
be_local_closure(Matter_Plugin_timed_request, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(timed_request),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_endpoints
********************************************************************/
be_local_closure(Matter_Plugin_get_endpoints, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(endpoints),
}),
be_str_weak(get_endpoints),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_cluster_list
********************************************************************/
@ -198,194 +385,33 @@ be_local_closure(Matter_Plugin_get_cluster_map, /* name */
/********************************************************************
** Solidified function: invoke_request
** Solidified function: attribute_updated
********************************************************************/
be_local_closure(Matter_Plugin_invoke_request, /* name */
be_local_closure(Matter_Plugin_attribute_updated, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_endpoints
********************************************************************/
be_local_closure(Matter_Plugin_get_endpoints, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(endpoints),
}),
be_str_weak(get_endpoints),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: subscribe_event
********************************************************************/
be_local_closure(Matter_Plugin_subscribe_event, /* name */
be_nested_proto(
6, /* nstack */
11, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(subscribe_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: write_attribute
********************************************************************/
be_local_closure(Matter_Plugin_write_attribute, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(write_attribute),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: has
********************************************************************/
be_local_closure(Matter_Plugin_has, /* name */
be_nested_proto(
6, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(clusters),
/* K1 */ be_nested_str_weak(contains),
/* K2 */ be_nested_str_weak(endpoints),
/* K3 */ be_nested_str_weak(find),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(device),
/* K1 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(has),
be_str_weak(attribute_updated),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x880C0100, // 0000 GETMBR R3 R0 K0
0x8C0C0701, // 0001 GETMET R3 R3 K1
0x5C140200, // 0002 MOVE R5 R1
0x7C0C0400, // 0003 CALL R3 2
0x780E0006, // 0004 JMPF R3 #000C
0x880C0102, // 0005 GETMBR R3 R0 K2
0x8C0C0703, // 0006 GETMET R3 R3 K3
0x5C140400, // 0007 MOVE R5 R2
0x7C0C0400, // 0008 CALL R3 2
0x4C100000, // 0009 LDNIL R4
0x200C0604, // 000A NE R3 R3 R4
0x740E0000, // 000B JMPT R3 #000D
0x500C0001, // 000C LDBOOL R3 0 1
0x500C0200, // 000D LDBOOL R3 1 0
0x80040600, // 000E RET 1 R3
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_event
********************************************************************/
be_local_closure(Matter_Plugin_read_event, /* name */
be_nested_proto(
6, /* nstack */
5, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(read_event),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C140000, // 0000 LDNIL R5
0x80040A00, // 0001 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: timed_request
********************************************************************/
be_local_closure(Matter_Plugin_timed_request, /* name */
be_nested_proto(
5, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(timed_request),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x4C100000, // 0000 LDNIL R4
0x80040800, // 0001 RET 1 R4
( &(const binstruction[ 8]) { /* code */
0x88140100, // 0000 GETMBR R5 R0 K0
0x8C140B01, // 0001 GETMET R5 R5 K1
0x5C1C0200, // 0002 MOVE R7 R1
0x5C200400, // 0003 MOVE R8 R2
0x5C240600, // 0004 MOVE R9 R3
0x5C280800, // 0005 MOVE R10 R4
0x7C140A00, // 0006 CALL R5 5
0x80000000, // 0007 RET 0
})
)
);
@ -429,35 +455,37 @@ be_local_closure(Matter_Plugin_get_attribute_list, /* name */
** Solidified class: Matter_Plugin
********************************************************************/
be_local_class(Matter_Plugin,
3,
4,
NULL,
be_nested_map(19,
be_nested_map(21,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_read_attribute_closure) },
{ be_const_key_weak(get_attribute_list, 13), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_every_second_closure) },
{ be_const_key_weak(subscribe_attribute, 9), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(endpoint, 20), be_const_var(2) },
{ be_const_key_weak(EMPTY_LIST, -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(clusters, 9), be_const_var(2) },
{ be_const_key_weak(get_endpoints, -1), be_const_closure(Matter_Plugin_get_endpoints_closure) },
{ be_const_key_weak(subscribe_attribute, -1), be_const_closure(Matter_Plugin_subscribe_attribute_closure) },
{ be_const_key_weak(get_cluster_list, 3), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
{ be_const_key_weak(EMPTY_MAP, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(attribute_updated, 2), be_const_closure(Matter_Plugin_attribute_updated_closure) },
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
{ be_const_key_weak(EMPTY_MAP, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(0,
( (struct bmapnode*) &(const bmapnode[]) {
})) ) } )) },
{ be_const_key_weak(subscribe_event, -1), be_const_closure(Matter_Plugin_subscribe_event_closure) },
{ be_const_key_weak(endpoints, 18), be_const_var(1) },
{ be_const_key_weak(invoke_request, 7), be_const_closure(Matter_Plugin_invoke_request_closure) },
{ be_const_key_weak(write_attribute, -1), be_const_closure(Matter_Plugin_write_attribute_closure) },
{ be_const_key_weak(attribute_updated, 14), be_const_closure(Matter_Plugin_attribute_updated_closure) },
{ be_const_key_weak(init, 2), be_const_closure(Matter_Plugin_init_closure) },
{ be_const_key_weak(has, -1), be_const_closure(Matter_Plugin_has_closure) },
{ be_const_key_weak(device, -1), be_const_var(0) },
{ be_const_key_weak(read_event, 6), be_const_closure(Matter_Plugin_read_event_closure) },
{ be_const_key_weak(get_attribute_list, -1), be_const_closure(Matter_Plugin_get_attribute_list_closure) },
{ be_const_key_weak(get_cluster_map, -1), be_const_closure(Matter_Plugin_get_cluster_map_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_init_closure) },
{ be_const_key_weak(get_cluster_map, 17), be_const_closure(Matter_Plugin_get_cluster_map_closure) },
{ be_const_key_weak(invoke_request, 18), be_const_closure(Matter_Plugin_invoke_request_closure) },
{ be_const_key_weak(read_event, 1), be_const_closure(Matter_Plugin_read_event_closure) },
{ be_const_key_weak(get_cluster_list, -1), be_const_closure(Matter_Plugin_get_cluster_list_closure) },
{ be_const_key_weak(get_endpoints, -1), be_const_closure(Matter_Plugin_get_endpoints_closure) },
{ be_const_key_weak(timed_request, -1), be_const_closure(Matter_Plugin_timed_request_closure) },
{ be_const_key_weak(clusters, -1), be_const_var(3) },
{ be_const_key_weak(endpoints, -1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin)
);

View File

@ -11,8 +11,8 @@ extern const bclass be_class_Matter_Plugin_OnOff;
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
@ -27,11 +27,11 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
be_str_weak(onoff_changed),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x88100301, // 0001 GETMBR R4 R1 K1
0x54160005, // 0002 LDINT R5 6
0x58180002, // 0003 LDCONST R6 K2
0x7C080800, // 0004 CALL R2 4
0x8C040100, // 0000 GETMET R1 R0 K0
0x880C0101, // 0001 GETMBR R3 R0 K1
0x54120005, // 0002 LDINT R4 6
0x58140002, // 0003 LDCONST R5 K2
0x7C040800, // 0004 CALL R1 4
0x80000000, // 0005 RET 0
})
)
@ -39,177 +39,67 @@ be_local_closure(Matter_Plugin_OnOff_onoff_changed, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(3),
/* K5 */ be_const_int(0),
/* K6 */ be_const_int(1),
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
/* K8 */ be_nested_str_weak(add_TLV),
/* K9 */ be_nested_str_weak(U2),
/* K10 */ be_nested_str_weak(onoff),
/* K11 */ be_nested_str_weak(onoff_changed),
/* K12 */ be_const_int(2),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[128]) { /* 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
0x70020061, // 001C JMP #007F
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
0x7002005B, // 0022 JMP #007F
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
0x70020055, // 0028 JMP #007F
0x541E0005, // 0029 LDINT R7 6
0x1C1C0A07, // 002A EQ R7 R5 R7
0x781E0024, // 002B JMPF R7 #0051
0x1C1C0D05, // 002C EQ R7 R6 K5
0x781E0009, // 002D JMPF R7 #0038
0x881C010A, // 002E GETMBR R7 R0 K10
0x781E0002, // 002F JMPF R7 #0033
0x8C1C010B, // 0030 GETMET R7 R0 K11
0x5C240600, // 0031 MOVE R9 R3
0x7C1C0400, // 0032 CALL R7 2
0x501C0000, // 0033 LDBOOL R7 0 0
0x90021407, // 0034 SETMBR R0 K10 R7
0x501C0200, // 0035 LDBOOL R7 1 0
0x80040E00, // 0036 RET 1 R7
0x70020017, // 0037 JMP #0050
0x1C1C0D06, // 0038 EQ R7 R6 K6
0x781E0009, // 0039 JMPF R7 #0044
0x881C010A, // 003A GETMBR R7 R0 K10
0x741E0002, // 003B JMPT R7 #003F
0x8C1C010B, // 003C GETMET R7 R0 K11
0x5C240600, // 003D MOVE R9 R3
0x7C1C0400, // 003E CALL R7 2
0x501C0200, // 003F LDBOOL R7 1 0
0x90021407, // 0040 SETMBR R0 K10 R7
0x501C0200, // 0041 LDBOOL R7 1 0
0x80040E00, // 0042 RET 1 R7
0x7002000B, // 0043 JMP #0050
0x1C1C0D0C, // 0044 EQ R7 R6 K12
0x781E0009, // 0045 JMPF R7 #0050
0x8C1C010B, // 0046 GETMET R7 R0 K11
0x5C240600, // 0047 MOVE R9 R3
0x7C1C0400, // 0048 CALL R7 2
0x881C010A, // 0049 GETMBR R7 R0 K10
0x781E0000, // 004A JMPF R7 #004C
0x501C0001, // 004B LDBOOL R7 0 1
0x501C0200, // 004C LDBOOL R7 1 0
0x90021407, // 004D SETMBR R0 K10 R7
0x501C0200, // 004E LDBOOL R7 1 0
0x80040E00, // 004F RET 1 R7
0x7002002D, // 0050 JMP #007F
0x541E0007, // 0051 LDINT R7 8
0x1C1C0A07, // 0052 EQ R7 R5 R7
0x781E002A, // 0053 JMPF R7 #007F
0x1C1C0D05, // 0054 EQ R7 R6 K5
0x781E0002, // 0055 JMPF R7 #0059
0x501C0200, // 0056 LDBOOL R7 1 0
0x80040E00, // 0057 RET 1 R7
0x70020025, // 0058 JMP #007F
0x1C1C0D06, // 0059 EQ R7 R6 K6
0x781E0002, // 005A JMPF R7 #005E
0x501C0200, // 005B LDBOOL R7 1 0
0x80040E00, // 005C RET 1 R7
0x70020020, // 005D JMP #007F
0x1C1C0D0C, // 005E EQ R7 R6 K12
0x781E0002, // 005F JMPF R7 #0063
0x501C0200, // 0060 LDBOOL R7 1 0
0x80040E00, // 0061 RET 1 R7
0x7002001B, // 0062 JMP #007F
0x1C1C0D04, // 0063 EQ R7 R6 K4
0x781E0002, // 0064 JMPF R7 #0068
0x501C0200, // 0065 LDBOOL R7 1 0
0x80040E00, // 0066 RET 1 R7
0x70020016, // 0067 JMP #007F
0x541E0003, // 0068 LDINT R7 4
0x1C1C0C07, // 0069 EQ R7 R6 R7
0x781E0002, // 006A JMPF R7 #006E
0x501C0200, // 006B LDBOOL R7 1 0
0x80040E00, // 006C RET 1 R7
0x70020010, // 006D JMP #007F
0x541E0004, // 006E LDINT R7 5
0x1C1C0C07, // 006F EQ R7 R6 R7
0x781E0002, // 0070 JMPF R7 #0074
0x501C0200, // 0071 LDBOOL R7 1 0
0x80040E00, // 0072 RET 1 R7
0x7002000A, // 0073 JMP #007F
0x541E0005, // 0074 LDINT R7 6
0x1C1C0C07, // 0075 EQ R7 R6 R7
0x781E0002, // 0076 JMPF R7 #007A
0x501C0200, // 0077 LDBOOL R7 1 0
0x80040E00, // 0078 RET 1 R7
0x70020004, // 0079 JMP #007F
0x541E0006, // 007A LDINT R7 7
0x1C1C0C07, // 007B EQ R7 R6 R7
0x781E0001, // 007C JMPF R7 #007F
0x501C0200, // 007D LDBOOL R7 1 0
0x80040E00, // 007E RET 1 R7
0x80000000, // 007F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
5, /* nstack */
8, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(endpoints),
/* K2 */ be_nested_str_weak(ENDPOINTS),
/* K3 */ be_nested_str_weak(endpoint),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(clusters),
/* K6 */ be_nested_str_weak(CLUSTERS),
/* K7 */ be_nested_str_weak(get_onoff),
/* K8 */ be_nested_str_weak(tasmota_relay_index),
}),
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
0x7C100600, // 0006 CALL R4 3
0x88100102, // 0007 GETMBR R4 R0 K2
0x90020204, // 0008 SETMBR R0 K1 R4
0x88100102, // 0009 GETMBR R4 R0 K2
0x94100904, // 000A GETIDX R4 R4 K4
0x90020604, // 000B SETMBR R0 K3 R4
0x88100106, // 000C GETMBR R4 R0 K6
0x90020A04, // 000D SETMBR R0 K5 R4
0x8C100107, // 000E GETMET R4 R0 K7
0x7C100200, // 000F CALL R4 1
0x4C100000, // 0010 LDNIL R4
0x1C100604, // 0011 EQ R4 R3 R4
0x78120000, // 0012 JMPF R4 #0014
0x580C0004, // 0013 LDCONST R3 K4
0x90021003, // 0014 SETMBR R0 K8 R3
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
@ -217,30 +107,82 @@ be_local_closure(Matter_Plugin_OnOff_init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(endpoints),
/* K2 */ be_nested_str_weak(ENDPOINTS),
/* K3 */ be_nested_str_weak(clusters),
/* K4 */ be_nested_str_weak(CLUSTERS),
/* K5 */ be_nested_str_weak(onoff),
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(set_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(init),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x60080003, // 0000 GETGBL R2 G3
0x5C0C0000, // 0001 MOVE R3 R0
0x7C080200, // 0002 CALL R2 1
0x8C080500, // 0003 GETMET R2 R2 K0
0x5C100200, // 0004 MOVE R4 R1
0x7C080400, // 0005 CALL R2 2
0x88080102, // 0006 GETMBR R2 R0 K2
0x90020202, // 0007 SETMBR R0 K1 R2
0x88080104, // 0008 GETMBR R2 R0 K4
0x90020602, // 0009 SETMBR R0 K3 R2
0x50080000, // 000A LDBOOL R2 0 0
0x90020A02, // 000B SETMBR R0 K5 R2
0x80000000, // 000C RET 0
( &(const binstruction[10]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x88100102, // 0002 GETMBR R4 R0 K2
0x60140017, // 0003 GETGBL R5 G23
0x5C180200, // 0004 MOVE R6 R1
0x7C140200, // 0005 CALL R5 1
0x7C080600, // 0006 CALL R2 3
0x8C080103, // 0007 GETMET R2 R0 K3
0x7C080200, // 0008 CALL R2 1
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: get_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_get_onoff, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(shadow_onoff),
/* K4 */ be_nested_str_weak(onoff_changed),
}),
be_str_weak(get_onoff),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x880C0102, // 0002 GETMBR R3 R0 K2
0x7C040400, // 0003 CALL R1 2
0x4C080000, // 0004 LDNIL R2
0x20080202, // 0005 NE R2 R1 R2
0x780A000C, // 0006 JMPF R2 #0014
0x88080103, // 0007 GETMBR R2 R0 K3
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
0x780A0007, // 000A JMPF R2 #0013
0x88080103, // 000B GETMBR R2 R0 K3
0x600C0017, // 000C GETGBL R3 G23
0x5C100200, // 000D MOVE R4 R1
0x7C0C0200, // 000E CALL R3 1
0x20080403, // 000F NE R2 R2 R3
0x780A0001, // 0010 JMPF R2 #0013
0x8C080104, // 0011 GETMET R2 R0 K4
0x7C080200, // 0012 CALL R2 1
0x90020601, // 0013 SETMBR R0 K3 R1
0x88080103, // 0014 GETMBR R2 R0 K3
0x4C0C0000, // 0015 LDNIL R3
0x1C080403, // 0016 EQ R2 R2 R3
0x780A0001, // 0017 JMPF R2 #001A
0x50080000, // 0018 LDBOOL R2 0 0
0x90020602, // 0019 SETMBR R0 K3 R2
0x88080103, // 001A GETMBR R2 R0 K3
0x80040400, // 001B RET 1 R2
})
)
);
@ -282,11 +224,11 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
/* K18 */ be_nested_str_weak(create_TLV),
/* K19 */ be_nested_str_weak(U1),
/* K20 */ be_nested_str_weak(BOOL),
/* K21 */ be_nested_str_weak(onoff),
/* K21 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[255]) { /* code */
( &(const binstruction[256]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0xB8120200, // 0001 GETNGBL R4 K1
0x88100902, // 0002 GETMBR R4 R4 K2
@ -382,7 +324,7 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
0x5828000C, // 005C LDCONST R10 K12
0x7C1C0600, // 005D CALL R7 3
0x80040E00, // 005E RET 1 R7
0x7002009D, // 005F JMP #00FE
0x7002009E, // 005F JMP #00FF
0x1C1C0B11, // 0060 EQ R7 R5 K17
0x781E0021, // 0061 JMPF R7 #0084
0x1C1C0D05, // 0062 EQ R7 R6 K5
@ -418,7 +360,7 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
0x542A0003, // 0080 LDINT R10 4
0x7C1C0600, // 0081 CALL R7 3
0x80040E00, // 0082 RET 1 R7
0x70020079, // 0083 JMP #00FE
0x7002007A, // 0083 JMP #00FF
0x541E0003, // 0084 LDINT R7 4
0x1C1C0A07, // 0085 EQ R7 R5 R7
0x781E0016, // 0086 JMPF R7 #009E
@ -444,7 +386,7 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
0x542A0003, // 009A LDINT R10 4
0x7C1C0600, // 009B CALL R7 3
0x80040E00, // 009C RET 1 R7
0x7002005F, // 009D JMP #00FE
0x70020060, // 009D JMP #00FF
0x541E0004, // 009E LDINT R7 5
0x1C1C0A07, // 009F EQ R7 R5 R7
0x781E0011, // 00A0 JMPF R7 #00B3
@ -465,83 +407,268 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
0x542A0003, // 00AF LDINT R10 4
0x7C1C0600, // 00B0 CALL R7 3
0x80040E00, // 00B1 RET 1 R7
0x7002004A, // 00B2 JMP #00FE
0x7002004B, // 00B2 JMP #00FF
0x541E0005, // 00B3 LDINT R7 6
0x1C1C0A07, // 00B4 EQ R7 R5 R7
0x781E0019, // 00B5 JMPF R7 #00D0
0x781E001A, // 00B5 JMPF R7 #00D1
0x1C1C0D05, // 00B6 EQ R7 R6 K5
0x781E0005, // 00B7 JMPF R7 #00BE
0x781E0006, // 00B7 JMPF R7 #00BF
0x8C1C0912, // 00B8 GETMET R7 R4 K18
0x88240914, // 00B9 GETMBR R9 R4 K20
0x88280115, // 00BA GETMBR R10 R0 K21
0x7C1C0600, // 00BB CALL R7 3
0x80040E00, // 00BC RET 1 R7
0x70020010, // 00BD JMP #00CF
0x541EFFFB, // 00BE LDINT R7 65532
0x1C1C0C07, // 00BF EQ R7 R6 R7
0x781E0005, // 00C0 JMPF R7 #00C7
0x8C1C0912, // 00C1 GETMET R7 R4 K18
0x8824090F, // 00C2 GETMBR R9 R4 K15
0x58280005, // 00C3 LDCONST R10 K5
0x7C1C0600, // 00C4 CALL R7 3
0x80040E00, // 00C5 RET 1 R7
0x70020007, // 00C6 JMP #00CF
0x541EFFFC, // 00C7 LDINT R7 65533
0x1C1C0C07, // 00C8 EQ R7 R6 R7
0x781E0004, // 00C9 JMPF R7 #00CF
0x8C1C0912, // 00CA GETMET R7 R4 K18
0x8824090F, // 00CB GETMBR R9 R4 K15
0x542A0003, // 00CC LDINT R10 4
0x7C1C0600, // 00CD CALL R7 3
0x80040E00, // 00CE RET 1 R7
0x7002002D, // 00CF JMP #00FE
0x541E0007, // 00D0 LDINT R7 8
0x1C1C0A07, // 00D1 EQ R7 R5 R7
0x781E002A, // 00D2 JMPF R7 #00FE
0x1C1C0D05, // 00D3 EQ R7 R6 K5
0x781E0005, // 00D4 JMPF R7 #00DB
0x8C1C0912, // 00D5 GETMET R7 R4 K18
0x88240913, // 00D6 GETMBR R9 R4 K19
0x542A0087, // 00D7 LDINT R10 136
0x7C1C0600, // 00D8 CALL R7 3
0x80040E00, // 00D9 RET 1 R7
0x70020022, // 00DA JMP #00FE
0x541E000E, // 00DB LDINT R7 15
0x1C1C0C07, // 00DC EQ R7 R6 R7
0x781E0005, // 00DD JMPF R7 #00E4
0x8C1C0912, // 00DE GETMET R7 R4 K18
0x88240913, // 00DF GETMBR R9 R4 K19
0x58280005, // 00E0 LDCONST R10 K5
0x7C1C0600, // 00E1 CALL R7 3
0x80040E00, // 00E2 RET 1 R7
0x70020019, // 00E3 JMP #00FE
0x541E000F, // 00E4 LDINT R7 16
0x1C1C0C07, // 00E5 EQ R7 R6 R7
0x781E0005, // 00E6 JMPF R7 #00ED
0x8C1C0912, // 00E7 GETMET R7 R4 K18
0x88240913, // 00E8 GETMBR R9 R4 K19
0x5828000C, // 00E9 LDCONST R10 K12
0x7C1C0600, // 00EA CALL R7 3
0x80040E00, // 00EB RET 1 R7
0x70020010, // 00EC JMP #00FE
0x541EFFFB, // 00ED LDINT R7 65532
0x1C1C0C07, // 00EE EQ R7 R6 R7
0x781E0005, // 00EF JMPF R7 #00F6
0x8C1C0912, // 00F0 GETMET R7 R4 K18
0x8824090F, // 00F1 GETMBR R9 R4 K15
0x58280005, // 00F2 LDCONST R10 K5
0x7C1C0600, // 00F3 CALL R7 3
0x80040E00, // 00F4 RET 1 R7
0x70020007, // 00F5 JMP #00FE
0x541EFFFC, // 00F6 LDINT R7 65533
0x1C1C0C07, // 00F7 EQ R7 R6 R7
0x781E0004, // 00F8 JMPF R7 #00FE
0x8C1C0912, // 00F9 GETMET R7 R4 K18
0x8824090F, // 00FA GETMBR R9 R4 K15
0x542A0003, // 00FB LDINT R10 4
0x7C1C0600, // 00FC CALL R7 3
0x80040E00, // 00FD RET 1 R7
0x80000000, // 00FE RET 0
0x8C280115, // 00BA GETMET R10 R0 K21
0x7C280200, // 00BB CALL R10 1
0x7C1C0600, // 00BC CALL R7 3
0x80040E00, // 00BD RET 1 R7
0x70020010, // 00BE JMP #00D0
0x541EFFFB, // 00BF LDINT R7 65532
0x1C1C0C07, // 00C0 EQ R7 R6 R7
0x781E0005, // 00C1 JMPF R7 #00C8
0x8C1C0912, // 00C2 GETMET R7 R4 K18
0x8824090F, // 00C3 GETMBR R9 R4 K15
0x58280005, // 00C4 LDCONST R10 K5
0x7C1C0600, // 00C5 CALL R7 3
0x80040E00, // 00C6 RET 1 R7
0x70020007, // 00C7 JMP #00D0
0x541EFFFC, // 00C8 LDINT R7 65533
0x1C1C0C07, // 00C9 EQ R7 R6 R7
0x781E0004, // 00CA JMPF R7 #00D0
0x8C1C0912, // 00CB GETMET R7 R4 K18
0x8824090F, // 00CC GETMBR R9 R4 K15
0x542A0003, // 00CD LDINT R10 4
0x7C1C0600, // 00CE CALL R7 3
0x80040E00, // 00CF RET 1 R7
0x7002002D, // 00D0 JMP #00FF
0x541E0007, // 00D1 LDINT R7 8
0x1C1C0A07, // 00D2 EQ R7 R5 R7
0x781E002A, // 00D3 JMPF R7 #00FF
0x1C1C0D05, // 00D4 EQ R7 R6 K5
0x781E0005, // 00D5 JMPF R7 #00DC
0x8C1C0912, // 00D6 GETMET R7 R4 K18
0x88240913, // 00D7 GETMBR R9 R4 K19
0x542A0087, // 00D8 LDINT R10 136
0x7C1C0600, // 00D9 CALL R7 3
0x80040E00, // 00DA RET 1 R7
0x70020022, // 00DB JMP #00FF
0x541E000E, // 00DC LDINT R7 15
0x1C1C0C07, // 00DD EQ R7 R6 R7
0x781E0005, // 00DE JMPF R7 #00E5
0x8C1C0912, // 00DF GETMET R7 R4 K18
0x88240913, // 00E0 GETMBR R9 R4 K19
0x58280005, // 00E1 LDCONST R10 K5
0x7C1C0600, // 00E2 CALL R7 3
0x80040E00, // 00E3 RET 1 R7
0x70020019, // 00E4 JMP #00FF
0x541E000F, // 00E5 LDINT R7 16
0x1C1C0C07, // 00E6 EQ R7 R6 R7
0x781E0005, // 00E7 JMPF R7 #00EE
0x8C1C0912, // 00E8 GETMET R7 R4 K18
0x88240913, // 00E9 GETMBR R9 R4 K19
0x5828000C, // 00EA LDCONST R10 K12
0x7C1C0600, // 00EB CALL R7 3
0x80040E00, // 00EC RET 1 R7
0x70020010, // 00ED JMP #00FF
0x541EFFFB, // 00EE LDINT R7 65532
0x1C1C0C07, // 00EF EQ R7 R6 R7
0x781E0005, // 00F0 JMPF R7 #00F7
0x8C1C0912, // 00F1 GETMET R7 R4 K18
0x8824090F, // 00F2 GETMBR R9 R4 K15
0x58280005, // 00F3 LDCONST R10 K5
0x7C1C0600, // 00F4 CALL R7 3
0x80040E00, // 00F5 RET 1 R7
0x70020007, // 00F6 JMP #00FF
0x541EFFFC, // 00F7 LDINT R7 65533
0x1C1C0C07, // 00F8 EQ R7 R6 R7
0x781E0004, // 00F9 JMPF R7 #00FF
0x8C1C0912, // 00FA GETMET R7 R4 K18
0x8824090F, // 00FB GETMBR R9 R4 K15
0x542A0003, // 00FC LDINT R10 4
0x7C1C0600, // 00FD CALL R7 3
0x80040E00, // 00FE RET 1 R7
0x80000000, // 00FF RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: every_second
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_every_second, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(every_second),
&be_const_str_solidified,
( &(const binstruction[ 3]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0x80000000, // 0002 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(3),
/* K5 */ be_const_int(0),
/* K6 */ be_const_int(1),
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
/* K8 */ be_nested_str_weak(add_TLV),
/* K9 */ be_nested_str_weak(U2),
/* K10 */ be_nested_str_weak(set_onoff),
/* K11 */ be_const_int(2),
/* K12 */ be_nested_str_weak(get_onoff),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[119]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x1C1C0B04, // 0004 EQ R7 R5 K4
0x781E0016, // 0005 JMPF R7 #001D
0x1C1C0D05, // 0006 EQ R7 R6 K5
0x781E0002, // 0007 JMPF R7 #000B
0x501C0200, // 0008 LDBOOL R7 1 0
0x80040E00, // 0009 RET 1 R7
0x70020010, // 000A JMP #001C
0x1C1C0D06, // 000B EQ R7 R6 K6
0x781E0009, // 000C JMPF R7 #0017
0x8C1C0907, // 000D GETMET R7 R4 K7
0x7C1C0200, // 000E CALL R7 1
0x8C200F08, // 000F GETMET R8 R7 K8
0x58280005, // 0010 LDCONST R10 K5
0x882C0909, // 0011 GETMBR R11 R4 K9
0x58300005, // 0012 LDCONST R12 K5
0x7C200800, // 0013 CALL R8 4
0x900E0705, // 0014 SETMBR R3 K3 K5
0x80040E00, // 0015 RET 1 R7
0x70020004, // 0016 JMP #001C
0x541E003F, // 0017 LDINT R7 64
0x1C1C0C07, // 0018 EQ R7 R6 R7
0x781E0001, // 0019 JMPF R7 #001C
0x501C0200, // 001A LDBOOL R7 1 0
0x80040E00, // 001B RET 1 R7
0x70020058, // 001C JMP #0076
0x541E0003, // 001D LDINT R7 4
0x1C1C0A07, // 001E EQ R7 R5 R7
0x781E0002, // 001F JMPF R7 #0023
0x501C0200, // 0020 LDBOOL R7 1 0
0x80040E00, // 0021 RET 1 R7
0x70020052, // 0022 JMP #0076
0x541E0004, // 0023 LDINT R7 5
0x1C1C0A07, // 0024 EQ R7 R5 R7
0x781E0002, // 0025 JMPF R7 #0029
0x501C0200, // 0026 LDBOOL R7 1 0
0x80040E00, // 0027 RET 1 R7
0x7002004C, // 0028 JMP #0076
0x541E0005, // 0029 LDINT R7 6
0x1C1C0A07, // 002A EQ R7 R5 R7
0x781E001B, // 002B JMPF R7 #0048
0x1C1C0D05, // 002C EQ R7 R6 K5
0x781E0005, // 002D JMPF R7 #0034
0x8C1C010A, // 002E GETMET R7 R0 K10
0x50240000, // 002F LDBOOL R9 0 0
0x7C1C0400, // 0030 CALL R7 2
0x501C0200, // 0031 LDBOOL R7 1 0
0x80040E00, // 0032 RET 1 R7
0x70020012, // 0033 JMP #0047
0x1C1C0D06, // 0034 EQ R7 R6 K6
0x781E0005, // 0035 JMPF R7 #003C
0x8C1C010A, // 0036 GETMET R7 R0 K10
0x50240200, // 0037 LDBOOL R9 1 0
0x7C1C0400, // 0038 CALL R7 2
0x501C0200, // 0039 LDBOOL R7 1 0
0x80040E00, // 003A RET 1 R7
0x7002000A, // 003B JMP #0047
0x1C1C0D0B, // 003C EQ R7 R6 K11
0x781E0008, // 003D JMPF R7 #0047
0x8C1C010A, // 003E GETMET R7 R0 K10
0x8C24010C, // 003F GETMET R9 R0 K12
0x7C240200, // 0040 CALL R9 1
0x78260000, // 0041 JMPF R9 #0043
0x50240001, // 0042 LDBOOL R9 0 1
0x50240200, // 0043 LDBOOL R9 1 0
0x7C1C0400, // 0044 CALL R7 2
0x501C0200, // 0045 LDBOOL R7 1 0
0x80040E00, // 0046 RET 1 R7
0x7002002D, // 0047 JMP #0076
0x541E0007, // 0048 LDINT R7 8
0x1C1C0A07, // 0049 EQ R7 R5 R7
0x781E002A, // 004A JMPF R7 #0076
0x1C1C0D05, // 004B EQ R7 R6 K5
0x781E0002, // 004C JMPF R7 #0050
0x501C0200, // 004D LDBOOL R7 1 0
0x80040E00, // 004E RET 1 R7
0x70020025, // 004F JMP #0076
0x1C1C0D06, // 0050 EQ R7 R6 K6
0x781E0002, // 0051 JMPF R7 #0055
0x501C0200, // 0052 LDBOOL R7 1 0
0x80040E00, // 0053 RET 1 R7
0x70020020, // 0054 JMP #0076
0x1C1C0D0B, // 0055 EQ R7 R6 K11
0x781E0002, // 0056 JMPF R7 #005A
0x501C0200, // 0057 LDBOOL R7 1 0
0x80040E00, // 0058 RET 1 R7
0x7002001B, // 0059 JMP #0076
0x1C1C0D04, // 005A EQ R7 R6 K4
0x781E0002, // 005B JMPF R7 #005F
0x501C0200, // 005C LDBOOL R7 1 0
0x80040E00, // 005D RET 1 R7
0x70020016, // 005E JMP #0076
0x541E0003, // 005F LDINT R7 4
0x1C1C0C07, // 0060 EQ R7 R6 R7
0x781E0002, // 0061 JMPF R7 #0065
0x501C0200, // 0062 LDBOOL R7 1 0
0x80040E00, // 0063 RET 1 R7
0x70020010, // 0064 JMP #0076
0x541E0004, // 0065 LDINT R7 5
0x1C1C0C07, // 0066 EQ R7 R6 R7
0x781E0002, // 0067 JMPF R7 #006B
0x501C0200, // 0068 LDBOOL R7 1 0
0x80040E00, // 0069 RET 1 R7
0x7002000A, // 006A JMP #0076
0x541E0005, // 006B LDINT R7 6
0x1C1C0C07, // 006C EQ R7 R6 R7
0x781E0002, // 006D JMPF R7 #0071
0x501C0200, // 006E LDBOOL R7 1 0
0x80040E00, // 006F RET 1 R7
0x70020004, // 0070 JMP #0076
0x541E0006, // 0071 LDINT R7 7
0x1C1C0C07, // 0072 EQ R7 R6 R7
0x781E0001, // 0073 JMPF R7 #0076
0x501C0200, // 0074 LDBOOL R7 1 0
0x80040E00, // 0075 RET 1 R7
0x80000000, // 0076 RET 0
})
)
);
@ -553,28 +680,40 @@ be_local_closure(Matter_Plugin_OnOff_read_attribute, /* name */
********************************************************************/
extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_OnOff,
1,
2,
&be_class_Matter_Plugin,
be_nested_map(8,
be_nested_map(12,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 6), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(TYPES, 0), 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(266, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
{ be_const_key_weak(onoff, -1), be_const_var(0) },
{ be_const_key_weak(ENDPOINTS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
{ be_const_key_weak(ENDPOINTS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(1),
})) ) } )) },
{ be_const_key_weak(onoff_changed, 7), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
{ be_const_key_weak(onoff_changed, 0), be_const_closure(Matter_Plugin_OnOff_onoff_changed_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
{ be_const_key_weak(set_onoff, 8), be_const_closure(Matter_Plugin_OnOff_set_onoff_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,
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, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
@ -591,15 +730,6 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(3),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(8, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(5,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(15),
be_const_int(17),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(4,
@ -609,26 +739,18 @@ be_local_class(Matter_Plugin_OnOff,
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_key_int(4, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(every_second, -1), be_const_closure(Matter_Plugin_OnOff_every_second_closure) },
{ be_const_key_weak(get_onoff, 7), be_const_closure(Matter_Plugin_OnOff_get_onoff_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
);

View File

@ -53,17 +53,20 @@ be_local_closure(Matter_TLV_item_create_TLV, /* name */
}),
be_str_weak(create_TLV),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
( &(const binstruction[13]) { /* code */
0x58080000, // 0000 LDCONST R2 K0
0x4C0C0000, // 0001 LDNIL R3
0x200C0203, // 0002 NE R3 R1 R3
0x780E0004, // 0003 JMPF R3 #0009
0x5C0C0400, // 0004 MOVE R3 R2
0x7C0C0000, // 0005 CALL R3 0
0x900E0200, // 0006 SETMBR R3 K1 R0
0x900E0401, // 0007 SETMBR R3 K2 R1
0x80040600, // 0008 RET 1 R3
0x80000000, // 0009 RET 0
0x740E0002, // 0003 JMPT R3 #0007
0x540E0013, // 0004 LDINT R3 20
0x1C0C0003, // 0005 EQ R3 R0 R3
0x780E0004, // 0006 JMPF R3 #000C
0x5C0C0400, // 0007 MOVE R3 R2
0x7C0C0000, // 0008 CALL R3 0
0x900E0200, // 0009 SETMBR R3 K1 R0
0x900E0401, // 000A SETMBR R3 K2 R1
0x80040600, // 000B RET 1 R3
0x80000000, // 000C RET 0
})
)
);

View File

@ -19,7 +19,7 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[28]) { /* constants */
( &(const bvalue[29]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(content_send),
@ -33,25 +33,26 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
/* K10 */ be_nested_str_weak(persistables),
/* K11 */ be_nested_str_weak(_X3Chr_X3E),
/* K12 */ be_nested_str_weak(format),
/* K13 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
/* K14 */ be_nested_str_weak(_X26lt_X3BNo_X20label_X26gt_X3B),
/* K15 */ be_nested_str_weak(get_fabric_id),
/* K16 */ be_nested_str_weak(copy),
/* K17 */ be_nested_str_weak(reverse),
/* K18 */ be_nested_str_weak(get_device_id),
/* K19 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E),
/* K20 */ be_nested_str_weak(tohex),
/* K21 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B),
/* K22 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20),
/* K23 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
/* K24 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25s_X27_X3E),
/* K25 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
/* K26 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
/* K27 */ be_nested_str_weak(stop_iteration),
/* K13 */ be_nested_str_weak(_X3Cfieldset_X3E_X3Clegend_X3E_X3Cb_X3E_X26nbsp_X3B_X23_X25i_X20_X25s_X26nbsp_X3B_X3C_X2Fb_X3E_X3C_X2Flegend_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
/* K14 */ be_nested_str_weak(get_fabric_index),
/* K15 */ be_nested_str_weak(_X26lt_X3BNo_X20label_X26gt_X3B),
/* K16 */ be_nested_str_weak(get_fabric_id),
/* K17 */ be_nested_str_weak(copy),
/* K18 */ be_nested_str_weak(reverse),
/* K19 */ be_nested_str_weak(get_device_id),
/* K20 */ be_nested_str_weak(Fabric_X3A_X20_X25s_X3Cbr_X3E),
/* K21 */ be_nested_str_weak(tohex),
/* K22 */ be_nested_str_weak(Device_X3A_X20_X25s_X3Cbr_X3E_X26nbsp_X3B),
/* K23 */ be_nested_str_weak(_X3Cform_X20action_X3D_X27_X2Fmatterc_X27_X20method_X3D_X27post_X27_X20),
/* K24 */ be_nested_str_weak(onsubmit_X3D_X27return_X20confirm_X28_X22This_X20will_X20cause_X20a_X20restart_X2E_X22_X29_X3B_X27_X3E),
/* K25 */ be_nested_str_weak(_X3Cinput_X20name_X3D_X27del_fabric_X27_X20type_X3D_X27hidden_X27_X20value_X3D_X27_X25s_X27_X3E),
/* K26 */ be_nested_str_weak(_X3Cbutton_X20name_X3D_X27del_X27_X20class_X3D_X27button_X20bgrn_X27_X3EDelete_X20Fabric_X3C_X2Fbutton_X3E_X3C_X2Fform_X3E_X3C_X2Fp_X3E),
/* K27 */ be_nested_str_weak(_X3Cp_X3E_X3C_X2Fp_X3E_X3C_X2Ffieldset_X3E_X3Cp_X3E_X3C_X2Fp_X3E),
/* K28 */ be_nested_str_weak(stop_iteration),
}),
be_str_weak(show_fabric_info),
&be_const_str_solidified,
( &(const binstruction[95]) { /* code */
( &(const binstruction[97]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xA40E0200, // 0001 IMPORT R3 K1
0x8C100502, // 0002 GETMET R4 R2 K2
@ -70,7 +71,7 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
0x8C100502, // 000F GETMET R4 R2 K2
0x58180008, // 0010 LDCONST R6 K8
0x7C100400, // 0011 CALL R4 2
0x70020047, // 0012 JMP #005B
0x70020049, // 0012 JMP #005D
0x50100200, // 0013 LDBOOL R4 1 0
0x60140010, // 0014 GETGBL R5 G16
0x88180105, // 0015 GETMBR R6 R0 K5
@ -79,7 +80,7 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
0x8C180D0A, // 0018 GETMET R6 R6 K10
0x7C180200, // 0019 CALL R6 1
0x7C140200, // 001A CALL R5 1
0xA802003B, // 001B EXBLK 0 #0058
0xA802003D, // 001B EXBLK 0 #005A
0x5C180A00, // 001C MOVE R6 R5
0x7C180000, // 001D CALL R6 0
0x5C1C0800, // 001E MOVE R7 R4
@ -91,62 +92,64 @@ be_local_closure(Matter_UI_show_fabric_info, /* name */
0x8C1C0502, // 0024 GETMET R7 R2 K2
0x8C24070C, // 0025 GETMET R9 R3 K12
0x582C000D, // 0026 LDCONST R11 K13
0x5830000E, // 0027 LDCONST R12 K14
0x7C240600, // 0028 CALL R9 3
0x7C1C0400, // 0029 CALL R7 2
0x8C1C0D0F, // 002A GETMET R7 R6 K15
0x7C1C0200, // 002B CALL R7 1
0x8C1C0F10, // 002C GETMET R7 R7 K16
0x8C300D0E, // 0027 GETMET R12 R6 K14
0x7C300200, // 0028 CALL R12 1
0x5834000F, // 0029 LDCONST R13 K15
0x7C240800, // 002A CALL R9 4
0x7C1C0400, // 002B CALL R7 2
0x8C1C0D10, // 002C GETMET R7 R6 K16
0x7C1C0200, // 002D CALL R7 1
0x8C1C0F11, // 002E GETMET R7 R7 K17
0x7C1C0200, // 002F CALL R7 1
0x8C200D12, // 0030 GETMET R8 R6 K18
0x7C200200, // 0031 CALL R8 1
0x8C201110, // 0032 GETMET R8 R8 K16
0x8C1C0F12, // 0030 GETMET R7 R7 K18
0x7C1C0200, // 0031 CALL R7 1
0x8C200D13, // 0032 GETMET R8 R6 K19
0x7C200200, // 0033 CALL R8 1
0x8C201111, // 0034 GETMET R8 R8 K17
0x7C200200, // 0035 CALL R8 1
0x8C240502, // 0036 GETMET R9 R2 K2
0x8C2C070C, // 0037 GETMET R11 R3 K12
0x58340013, // 0038 LDCONST R13 K19
0x8C380F14, // 0039 GETMET R14 R7 K20
0x7C380200, // 003A CALL R14 1
0x7C2C0600, // 003B CALL R11 3
0x7C240400, // 003C CALL R9 2
0x8C240502, // 003D GETMET R9 R2 K2
0x8C2C070C, // 003E GETMET R11 R3 K12
0x58340015, // 003F LDCONST R13 K21
0x8C381114, // 0040 GETMET R14 R8 K20
0x7C380200, // 0041 CALL R14 1
0x7C2C0600, // 0042 CALL R11 3
0x7C240400, // 0043 CALL R9 2
0x8C240502, // 0044 GETMET R9 R2 K2
0x582C0016, // 0045 LDCONST R11 K22
0x7C240400, // 0046 CALL R9 2
0x8C240502, // 0047 GETMET R9 R2 K2
0x582C0017, // 0048 LDCONST R11 K23
0x7C240400, // 0049 CALL R9 2
0x8C240502, // 004A GETMET R9 R2 K2
0x8C2C070C, // 004B GETMET R11 R3 K12
0x58340018, // 004C LDCONST R13 K24
0x8C380F14, // 004D GETMET R14 R7 K20
0x7C380200, // 004E CALL R14 1
0x7C2C0600, // 004F CALL R11 3
0x7C240400, // 0050 CALL R9 2
0x8C240502, // 0051 GETMET R9 R2 K2
0x582C0019, // 0052 LDCONST R11 K25
0x7C240400, // 0053 CALL R9 2
0x8C240502, // 0054 GETMET R9 R2 K2
0x582C001A, // 0055 LDCONST R11 K26
0x7C240400, // 0056 CALL R9 2
0x7001FFC3, // 0057 JMP #001C
0x5814001B, // 0058 LDCONST R5 K27
0xAC140200, // 0059 CATCH R5 1 0
0xB0080000, // 005A RAISE 2 R0 R0
0x8C100502, // 005B GETMET R4 R2 K2
0x5818001A, // 005C LDCONST R6 K26
0x7C100400, // 005D CALL R4 2
0x80000000, // 005E RET 0
0x8C201112, // 0036 GETMET R8 R8 K18
0x7C200200, // 0037 CALL R8 1
0x8C240502, // 0038 GETMET R9 R2 K2
0x8C2C070C, // 0039 GETMET R11 R3 K12
0x58340014, // 003A LDCONST R13 K20
0x8C380F15, // 003B GETMET R14 R7 K21
0x7C380200, // 003C CALL R14 1
0x7C2C0600, // 003D CALL R11 3
0x7C240400, // 003E CALL R9 2
0x8C240502, // 003F GETMET R9 R2 K2
0x8C2C070C, // 0040 GETMET R11 R3 K12
0x58340016, // 0041 LDCONST R13 K22
0x8C381115, // 0042 GETMET R14 R8 K21
0x7C380200, // 0043 CALL R14 1
0x7C2C0600, // 0044 CALL R11 3
0x7C240400, // 0045 CALL R9 2
0x8C240502, // 0046 GETMET R9 R2 K2
0x582C0017, // 0047 LDCONST R11 K23
0x7C240400, // 0048 CALL R9 2
0x8C240502, // 0049 GETMET R9 R2 K2
0x582C0018, // 004A LDCONST R11 K24
0x7C240400, // 004B CALL R9 2
0x8C240502, // 004C GETMET R9 R2 K2
0x8C2C070C, // 004D GETMET R11 R3 K12
0x58340019, // 004E LDCONST R13 K25
0x8C380F15, // 004F GETMET R14 R7 K21
0x7C380200, // 0050 CALL R14 1
0x7C2C0600, // 0051 CALL R11 3
0x7C240400, // 0052 CALL R9 2
0x8C240502, // 0053 GETMET R9 R2 K2
0x582C001A, // 0054 LDCONST R11 K26
0x7C240400, // 0055 CALL R9 2
0x8C240502, // 0056 GETMET R9 R2 K2
0x582C001B, // 0057 LDCONST R11 K27
0x7C240400, // 0058 CALL R9 2
0x7001FFC1, // 0059 JMP #001C
0x5814001C, // 005A LDCONST R5 K28
0xAC140200, // 005B CATCH R5 1 0
0xB0080000, // 005C RAISE 2 R0 R0
0x8C100502, // 005D GETMET R4 R2 K2
0x5818001B, // 005E LDCONST R6 K27
0x7C100400, // 005F CALL R4 2
0x80000000, // 0060 RET 0
})
)
);
@ -166,7 +169,7 @@ be_local_closure(Matter_UI_web_sensor, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[24]) { /* constants */
( &(const bvalue[25]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(tasmota),
@ -174,7 +177,7 @@ be_local_closure(Matter_UI_web_sensor, /* name */
/* K4 */ be_nested_str_weak(matter),
/* K5 */ be_nested_str_weak(MATTER_OPTION),
/* K6 */ be_nested_str_weak(device),
/* K7 */ be_nested_str_weak(commissioning_open),
/* K7 */ be_nested_str_weak(is_root_commissioning_open),
/* K8 */ be_nested_str_weak(show_commissioning_info),
/* K9 */ be_nested_str_weak(sessions),
/* K10 */ be_nested_str_weak(count_active_fabrics),
@ -188,13 +191,14 @@ be_local_closure(Matter_UI_web_sensor, /* name */
/* K18 */ be_nested_str_weak(s),
/* K19 */ be_nested_str_weak(),
/* K20 */ be_nested_str_weak(_X3Cbutton_X20onclick_X3D_X27la_X28_X22_X26mtc_X25i_X3D1_X22_X29_X3B_X27_X3E),
/* K21 */ be_nested_str_weak(_LOGO),
/* K22 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E),
/* K23 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E),
/* K21 */ be_nested_str_weak(commissioning_open),
/* K22 */ be_nested_str_weak(_LOGO),
/* K23 */ be_nested_str_weak(_X20Open_X20Commissioning_X3C_X2Fbutton_X3E),
/* K24 */ be_nested_str_weak(_X20Close_X20Commissioning_X3C_X2Fbutton_X3E),
}),
be_str_weak(web_sensor),
&be_const_str_solidified,
( &(const binstruction[71]) { /* code */
( &(const binstruction[72]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0xA40A0200, // 0001 IMPORT R2 K1
0xB80E0400, // 0002 GETNGBL R3 K2
@ -202,70 +206,71 @@ be_local_closure(Matter_UI_web_sensor, /* name */
0xB8160800, // 0004 GETNGBL R5 K4
0x88140B05, // 0005 GETMBR R5 R5 K5
0x7C0C0400, // 0006 CALL R3 2
0x780E003D, // 0007 JMPF R3 #0046
0x780E003E, // 0007 JMPF R3 #0047
0x88100106, // 0008 GETMBR R4 R0 K6
0x88100907, // 0009 GETMBR R4 R4 K7
0x78120001, // 000A JMPF R4 #000D
0x8C100108, // 000B GETMET R4 R0 K8
0x7C100200, // 000C CALL R4 1
0x88100106, // 000D GETMBR R4 R0 K6
0x88100909, // 000E GETMBR R4 R4 K9
0x8C10090A, // 000F GETMET R4 R4 K10
0x7C100200, // 0010 CALL R4 1
0x1C14090B, // 0011 EQ R5 R4 K11
0x78160006, // 0012 JMPF R5 #001A
0x8C14030C, // 0013 GETMET R5 R1 K12
0x8C1C050D, // 0014 GETMET R7 R2 K13
0x5824000E, // 0015 LDCONST R9 K14
0x5828000F, // 0016 LDCONST R10 K15
0x7C1C0600, // 0017 CALL R7 3
0x7C140400, // 0018 CALL R5 2
0x7002000E, // 0019 JMP #0029
0x24140910, // 001A GT R5 R4 K16
0x8C18030C, // 001B GETMET R6 R1 K12
0x8C20050D, // 001C GETMET R8 R2 K13
0x5828000E, // 001D LDCONST R10 K14
0x602C0008, // 001E GETGBL R11 G8
0x5C300800, // 001F MOVE R12 R4
0x7C2C0200, // 0020 CALL R11 1
0x002C1711, // 0021 ADD R11 R11 K17
0x78160001, // 0022 JMPF R5 #0025
0x58300012, // 0023 LDCONST R12 K18
0x70020000, // 0024 JMP #0026
0x58300013, // 0025 LDCONST R12 K19
0x002C160C, // 0026 ADD R11 R11 R12
0x7C200600, // 0027 CALL R8 3
0x7C180400, // 0028 CALL R6 2
0x8C14030C, // 0029 GETMET R5 R1 K12
0x8C1C050D, // 002A GETMET R7 R2 K13
0x58240014, // 002B LDCONST R9 K20
0x88280106, // 002C GETMBR R10 R0 K6
0x88281507, // 002D GETMBR R10 R10 K7
0x4C2C0000, // 002E LDNIL R11
0x1C28140B, // 002F EQ R10 R10 R11
0x782A0001, // 0030 JMPF R10 #0033
0x58280010, // 0031 LDCONST R10 K16
0x70020000, // 0032 JMP #0034
0x5828000B, // 0033 LDCONST R10 K11
0x7C1C0600, // 0034 CALL R7 3
0x7C140400, // 0035 CALL R5 2
0x8C14030C, // 0036 GETMET R5 R1 K12
0xB81E0800, // 0037 GETNGBL R7 K4
0x881C0F15, // 0038 GETMBR R7 R7 K21
0x7C140400, // 0039 CALL R5 2
0x88140106, // 003A GETMBR R5 R0 K6
0x88140B07, // 003B GETMBR R5 R5 K7
0x4C180000, // 003C LDNIL R6
0x1C140A06, // 003D EQ R5 R5 R6
0x78160003, // 003E JMPF R5 #0043
0x8C14030C, // 003F GETMET R5 R1 K12
0x581C0016, // 0040 LDCONST R7 K22
0x7C140400, // 0041 CALL R5 2
0x70020002, // 0042 JMP #0046
0x8C14030C, // 0043 GETMET R5 R1 K12
0x581C0017, // 0044 LDCONST R7 K23
0x7C140400, // 0045 CALL R5 2
0x80000000, // 0046 RET 0
0x8C100907, // 0009 GETMET R4 R4 K7
0x7C100200, // 000A CALL R4 1
0x78120001, // 000B JMPF R4 #000E
0x8C100108, // 000C GETMET R4 R0 K8
0x7C100200, // 000D CALL R4 1
0x88100106, // 000E GETMBR R4 R0 K6
0x88100909, // 000F GETMBR R4 R4 K9
0x8C10090A, // 0010 GETMET R4 R4 K10
0x7C100200, // 0011 CALL R4 1
0x1C14090B, // 0012 EQ R5 R4 K11
0x78160006, // 0013 JMPF R5 #001B
0x8C14030C, // 0014 GETMET R5 R1 K12
0x8C1C050D, // 0015 GETMET R7 R2 K13
0x5824000E, // 0016 LDCONST R9 K14
0x5828000F, // 0017 LDCONST R10 K15
0x7C1C0600, // 0018 CALL R7 3
0x7C140400, // 0019 CALL R5 2
0x7002000E, // 001A JMP #002A
0x24140910, // 001B GT R5 R4 K16
0x8C18030C, // 001C GETMET R6 R1 K12
0x8C20050D, // 001D GETMET R8 R2 K13
0x5828000E, // 001E LDCONST R10 K14
0x602C0008, // 001F GETGBL R11 G8
0x5C300800, // 0020 MOVE R12 R4
0x7C2C0200, // 0021 CALL R11 1
0x002C1711, // 0022 ADD R11 R11 K17
0x78160001, // 0023 JMPF R5 #0026
0x58300012, // 0024 LDCONST R12 K18
0x70020000, // 0025 JMP #0027
0x58300013, // 0026 LDCONST R12 K19
0x002C160C, // 0027 ADD R11 R11 R12
0x7C200600, // 0028 CALL R8 3
0x7C180400, // 0029 CALL R6 2
0x8C14030C, // 002A GETMET R5 R1 K12
0x8C1C050D, // 002B GETMET R7 R2 K13
0x58240014, // 002C LDCONST R9 K20
0x88280106, // 002D GETMBR R10 R0 K6
0x88281515, // 002E GETMBR R10 R10 K21
0x4C2C0000, // 002F LDNIL R11
0x1C28140B, // 0030 EQ R10 R10 R11
0x782A0001, // 0031 JMPF R10 #0034
0x58280010, // 0032 LDCONST R10 K16
0x70020000, // 0033 JMP #0035
0x5828000B, // 0034 LDCONST R10 K11
0x7C1C0600, // 0035 CALL R7 3
0x7C140400, // 0036 CALL R5 2
0x8C14030C, // 0037 GETMET R5 R1 K12
0xB81E0800, // 0038 GETNGBL R7 K4
0x881C0F16, // 0039 GETMBR R7 R7 K22
0x7C140400, // 003A CALL R5 2
0x88140106, // 003B GETMBR R5 R0 K6
0x88140B15, // 003C GETMBR R5 R5 K21
0x4C180000, // 003D LDNIL R6
0x1C140A06, // 003E EQ R5 R5 R6
0x78160003, // 003F JMPF R5 #0044
0x8C14030C, // 0040 GETMET R5 R1 K12
0x581C0017, // 0041 LDCONST R7 K23
0x7C140400, // 0042 CALL R5 2
0x70020002, // 0043 JMP #0047
0x8C14030C, // 0044 GETMET R5 R1 K12
0x581C0018, // 0045 LDCONST R7 K24
0x7C140400, // 0046 CALL R5 2
0x80000000, // 0047 RET 0
})
)
);
@ -292,7 +297,7 @@ be_local_closure(Matter_UI_web_get_arg, /* name */
/* K3 */ be_nested_str_weak(device),
/* K4 */ be_nested_str_weak(stop_basic_commissioning),
/* K5 */ be_nested_str_weak(mtc1),
/* K6 */ be_nested_str_weak(start_basic_commissioning),
/* K6 */ be_nested_str_weak(start_root_basic_commissioning),
}),
be_str_weak(web_get_arg),
&be_const_str_solidified,
@ -734,10 +739,10 @@ be_local_closure(Matter_UI_show_passcode_form, /* name */
/* K6 */ be_nested_str_weak(format),
/* K7 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X271_X27_X20max_X3D_X2799999998_X27_X20name_X3D_X27passcode_X27_X20value_X3D_X27_X25i_X27_X3E),
/* K8 */ be_nested_str_weak(device),
/* K9 */ be_nested_str_weak(passcode),
/* K9 */ be_nested_str_weak(root_passcode),
/* K10 */ be_nested_str_weak(_X3Cp_X3EDistinguish_X20id_X3A_X3C_X2Fp_X3E),
/* K11 */ be_nested_str_weak(_X3Cinput_X20type_X3D_X27number_X27_X20min_X3D_X270_X27_X20max_X3D_X274095_X27_X20name_X3D_X27discriminator_X27_X20value_X3D_X27_X25i_X27_X3E),
/* K12 */ be_nested_str_weak(discriminator),
/* K12 */ be_nested_str_weak(root_discriminator),
/* K13 */ be_nested_str_weak(_X3Cp_X3E_X3Cinput_X20type_X3D_X27checkbox_X27_X20name_X3D_X27ipv4_X27_X25s_X3EIPv4_X20only_X3C_X2Fp_X3E),
/* K14 */ be_nested_str_weak(ipv4only),
/* K15 */ be_nested_str_weak(_X20checked),
@ -999,7 +1004,7 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[49]) { /* constants */
( &(const bvalue[51]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(check_privileged_access),
/* K2 */ be_nested_str_weak(string),
@ -1010,45 +1015,47 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
/* K7 */ be_nested_str_weak(passcode),
/* K8 */ be_nested_str_weak(discriminator),
/* K9 */ be_nested_str_weak(device),
/* K10 */ be_nested_str_weak(arg),
/* K11 */ be_nested_str_weak(ipv4only),
/* K12 */ be_nested_str_weak(ipv4),
/* K13 */ be_nested_str_weak(on),
/* K14 */ be_nested_str_weak(save_param),
/* K15 */ be_nested_str_weak(redirect),
/* K16 */ be_nested_str_weak(_X2F_X3Frst_X3D),
/* K17 */ be_nested_str_weak(enable),
/* K18 */ be_nested_str_weak(tasmota),
/* K19 */ be_nested_str_weak(cmd),
/* K20 */ be_nested_str_weak(SetOption),
/* K21 */ be_nested_str_weak(matter),
/* K22 */ be_nested_str_weak(MATTER_OPTION),
/* K23 */ be_nested_str_weak(_X201),
/* K24 */ be_nested_str_weak(disable),
/* K25 */ be_nested_str_weak(_X200),
/* K26 */ be_nested_str_weak(del_fabric),
/* K27 */ be_const_int(0),
/* K28 */ be_nested_str_weak(sessions),
/* K29 */ be_nested_str_weak(fabrics),
/* K30 */ be_nested_str_weak(get_fabric_id),
/* K31 */ be_nested_str_weak(copy),
/* K32 */ be_nested_str_weak(reverse),
/* K33 */ be_nested_str_weak(tohex),
/* K34 */ be_nested_str_weak(remove),
/* K35 */ be_const_int(1),
/* K36 */ be_nested_str_weak(save_fabrics),
/* K37 */ be_nested_str_weak(log),
/* K38 */ be_nested_str_weak(format),
/* K39 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
/* K40 */ be_const_int(2),
/* K41 */ be_nested_str_weak(content_start),
/* K42 */ be_nested_str_weak(Parameter_X20error),
/* K43 */ be_nested_str_weak(content_send_style),
/* K44 */ be_nested_str_weak(content_send),
/* K45 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
/* K46 */ be_nested_str_weak(content_button),
/* K47 */ be_nested_str_weak(BUTTON_MANAGEMENT),
/* K48 */ be_nested_str_weak(content_stop),
/* K10 */ be_nested_str_weak(root_passcode),
/* K11 */ be_nested_str_weak(arg),
/* K12 */ be_nested_str_weak(root_discriminator),
/* K13 */ be_nested_str_weak(ipv4only),
/* K14 */ be_nested_str_weak(ipv4),
/* K15 */ be_nested_str_weak(on),
/* K16 */ be_nested_str_weak(save_param),
/* K17 */ be_nested_str_weak(redirect),
/* K18 */ be_nested_str_weak(_X2F_X3Frst_X3D),
/* K19 */ be_nested_str_weak(enable),
/* K20 */ be_nested_str_weak(tasmota),
/* K21 */ be_nested_str_weak(cmd),
/* K22 */ be_nested_str_weak(SetOption),
/* K23 */ be_nested_str_weak(matter),
/* K24 */ be_nested_str_weak(MATTER_OPTION),
/* K25 */ be_nested_str_weak(_X201),
/* K26 */ be_nested_str_weak(disable),
/* K27 */ be_nested_str_weak(_X200),
/* K28 */ be_nested_str_weak(del_fabric),
/* K29 */ be_const_int(0),
/* K30 */ be_nested_str_weak(sessions),
/* K31 */ be_nested_str_weak(fabrics),
/* K32 */ be_nested_str_weak(get_fabric_id),
/* K33 */ be_nested_str_weak(copy),
/* K34 */ be_nested_str_weak(reverse),
/* K35 */ be_nested_str_weak(tohex),
/* K36 */ be_nested_str_weak(remove),
/* K37 */ be_const_int(1),
/* K38 */ be_nested_str_weak(save_fabrics),
/* K39 */ be_nested_str_weak(log),
/* K40 */ be_nested_str_weak(format),
/* K41 */ be_nested_str_weak(BRY_X3A_X20Exception_X3E_X20_X27_X25s_X27_X20_X2D_X20_X25s),
/* K42 */ be_const_int(2),
/* K43 */ be_nested_str_weak(content_start),
/* K44 */ be_nested_str_weak(Parameter_X20error),
/* K45 */ be_nested_str_weak(content_send_style),
/* K46 */ be_nested_str_weak(content_send),
/* K47 */ be_nested_str_weak(_X3Cp_X20style_X3D_X27width_X3A340px_X3B_X27_X3E_X3Cb_X3EException_X3A_X3C_X2Fb_X3E_X3Cbr_X3E_X27_X25s_X27_X3Cbr_X3E_X25s_X3C_X2Fp_X3E),
/* K48 */ be_nested_str_weak(content_button),
/* K49 */ be_nested_str_weak(BUTTON_MANAGEMENT),
/* K50 */ be_nested_str_weak(content_stop),
}),
be_str_weak(page_part_ctl),
&be_const_str_solidified,
@ -1079,80 +1086,80 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x781A0006, // 0017 JMPF R6 #001F
0x88180109, // 0018 GETMBR R6 R0 K9
0x601C0009, // 0019 GETGBL R7 G9
0x8C20030A, // 001A GETMET R8 R1 K10
0x8C20030B, // 001A GETMET R8 R1 K11
0x58280007, // 001B LDCONST R10 K7
0x7C200400, // 001C CALL R8 2
0x7C1C0200, // 001D CALL R7 1
0x901A0E07, // 001E SETMBR R6 K7 R7
0x901A1407, // 001E SETMBR R6 K10 R7
0x8C180306, // 001F GETMET R6 R1 K6
0x58200008, // 0020 LDCONST R8 K8
0x7C180400, // 0021 CALL R6 2
0x781A0006, // 0022 JMPF R6 #002A
0x88180109, // 0023 GETMBR R6 R0 K9
0x601C0009, // 0024 GETGBL R7 G9
0x8C20030A, // 0025 GETMET R8 R1 K10
0x8C20030B, // 0025 GETMET R8 R1 K11
0x58280008, // 0026 LDCONST R10 K8
0x7C200400, // 0027 CALL R8 2
0x7C1C0200, // 0028 CALL R7 1
0x901A1007, // 0029 SETMBR R6 K8 R7
0x901A1807, // 0029 SETMBR R6 K12 R7
0x88180109, // 002A GETMBR R6 R0 K9
0x8C1C030A, // 002B GETMET R7 R1 K10
0x5824000C, // 002C LDCONST R9 K12
0x8C1C030B, // 002B GETMET R7 R1 K11
0x5824000E, // 002C LDCONST R9 K14
0x7C1C0400, // 002D CALL R7 2
0x1C1C0F0D, // 002E EQ R7 R7 K13
0x901A1607, // 002F SETMBR R6 K11 R7
0x1C1C0F0F, // 002E EQ R7 R7 K15
0x901A1A07, // 002F SETMBR R6 K13 R7
0x88180109, // 0030 GETMBR R6 R0 K9
0x8C180D0E, // 0031 GETMET R6 R6 K14
0x8C180D10, // 0031 GETMET R6 R6 K16
0x7C180200, // 0032 CALL R6 1
0x8C18030F, // 0033 GETMET R6 R1 K15
0x58200010, // 0034 LDCONST R8 K16
0x8C180311, // 0033 GETMET R6 R1 K17
0x58200012, // 0034 LDCONST R8 K18
0x7C180400, // 0035 CALL R6 2
0x7002004C, // 0036 JMP #0084
0x8C180306, // 0037 GETMET R6 R1 K6
0x58200011, // 0038 LDCONST R8 K17
0x58200013, // 0038 LDCONST R8 K19
0x7C180400, // 0039 CALL R6 2
0x781A000C, // 003A JMPF R6 #0048
0xB81A2400, // 003B GETNGBL R6 K18
0x8C180D13, // 003C GETMET R6 R6 K19
0xB81A2800, // 003B GETNGBL R6 K20
0x8C180D15, // 003C GETMET R6 R6 K21
0x60200008, // 003D GETGBL R8 G8
0xB8262A00, // 003E GETNGBL R9 K21
0x88241316, // 003F GETMBR R9 R9 K22
0xB8262E00, // 003E GETNGBL R9 K23
0x88241318, // 003F GETMBR R9 R9 K24
0x7C200200, // 0040 CALL R8 1
0x00222808, // 0041 ADD R8 K20 R8
0x00201117, // 0042 ADD R8 R8 K23
0x00222C08, // 0041 ADD R8 K22 R8
0x00201119, // 0042 ADD R8 R8 K25
0x7C180400, // 0043 CALL R6 2
0x8C18030F, // 0044 GETMET R6 R1 K15
0x58200010, // 0045 LDCONST R8 K16
0x8C180311, // 0044 GETMET R6 R1 K17
0x58200012, // 0045 LDCONST R8 K18
0x7C180400, // 0046 CALL R6 2
0x7002003B, // 0047 JMP #0084
0x8C180306, // 0048 GETMET R6 R1 K6
0x58200018, // 0049 LDCONST R8 K24
0x5820001A, // 0049 LDCONST R8 K26
0x7C180400, // 004A CALL R6 2
0x781A000C, // 004B JMPF R6 #0059
0xB81A2400, // 004C GETNGBL R6 K18
0x8C180D13, // 004D GETMET R6 R6 K19
0xB81A2800, // 004C GETNGBL R6 K20
0x8C180D15, // 004D GETMET R6 R6 K21
0x60200008, // 004E GETGBL R8 G8
0xB8262A00, // 004F GETNGBL R9 K21
0x88241316, // 0050 GETMBR R9 R9 K22
0xB8262E00, // 004F GETNGBL R9 K23
0x88241318, // 0050 GETMBR R9 R9 K24
0x7C200200, // 0051 CALL R8 1
0x00222808, // 0052 ADD R8 K20 R8
0x00201119, // 0053 ADD R8 R8 K25
0x00222C08, // 0052 ADD R8 K22 R8
0x0020111B, // 0053 ADD R8 R8 K27
0x7C180400, // 0054 CALL R6 2
0x8C18030F, // 0055 GETMET R6 R1 K15
0x58200010, // 0056 LDCONST R8 K16
0x8C180311, // 0055 GETMET R6 R1 K17
0x58200012, // 0056 LDCONST R8 K18
0x7C180400, // 0057 CALL R6 2
0x7002002A, // 0058 JMP #0084
0x8C180306, // 0059 GETMET R6 R1 K6
0x5820001A, // 005A LDCONST R8 K26
0x5820001C, // 005A LDCONST R8 K28
0x7C180400, // 005B CALL R6 2
0x781A0026, // 005C JMPF R6 #0084
0x8C18030A, // 005D GETMET R6 R1 K10
0x5820001A, // 005E LDCONST R8 K26
0x8C18030B, // 005D GETMET R6 R1 K11
0x5820001C, // 005E LDCONST R8 K28
0x7C180400, // 005F CALL R6 2
0x581C001B, // 0060 LDCONST R7 K27
0x581C001D, // 0060 LDCONST R7 K29
0x88200109, // 0061 GETMBR R8 R0 K9
0x8820111C, // 0062 GETMBR R8 R8 K28
0x8820111D, // 0063 GETMBR R8 R8 K29
0x8820111E, // 0062 GETMBR R8 R8 K30
0x8820111F, // 0063 GETMBR R8 R8 K31
0x50240000, // 0064 LDBOOL R9 0 0
0x6028000C, // 0065 GETGBL R10 G12
0x5C2C1000, // 0066 MOVE R11 R8
@ -1160,60 +1167,60 @@ be_local_closure(Matter_UI_page_part_ctl, /* name */
0x14280E0A, // 0068 LT R10 R7 R10
0x782A0011, // 0069 JMPF R10 #007C
0x94281007, // 006A GETIDX R10 R8 R7
0x8C28151E, // 006B GETMET R10 R10 K30
0x8C281520, // 006B GETMET R10 R10 K32
0x7C280200, // 006C CALL R10 1
0x8C28151F, // 006D GETMET R10 R10 K31
0x8C281521, // 006D GETMET R10 R10 K33
0x7C280200, // 006E CALL R10 1
0x8C281520, // 006F GETMET R10 R10 K32
0x8C281522, // 006F GETMET R10 R10 K34
0x7C280200, // 0070 CALL R10 1
0x8C281521, // 0071 GETMET R10 R10 K33
0x8C281523, // 0071 GETMET R10 R10 K35
0x7C280200, // 0072 CALL R10 1
0x1C2C1406, // 0073 EQ R11 R10 R6
0x782E0004, // 0074 JMPF R11 #007A
0x8C2C1122, // 0075 GETMET R11 R8 K34
0x8C2C1124, // 0075 GETMET R11 R8 K36
0x5C340E00, // 0076 MOVE R13 R7
0x7C2C0400, // 0077 CALL R11 2
0x50240200, // 0078 LDBOOL R9 1 0
0x70020000, // 0079 JMP #007B
0x001C0F23, // 007A ADD R7 R7 K35
0x001C0F25, // 007A ADD R7 R7 K37
0x7001FFE8, // 007B JMP #0065
0x78260003, // 007C JMPF R9 #0081
0x88280109, // 007D GETMBR R10 R0 K9
0x8828151C, // 007E GETMBR R10 R10 K28
0x8C281524, // 007F GETMET R10 R10 K36
0x8828151E, // 007E GETMBR R10 R10 K30
0x8C281526, // 007F GETMET R10 R10 K38
0x7C280200, // 0080 CALL R10 1
0x8C28030F, // 0081 GETMET R10 R1 K15
0x58300010, // 0082 LDCONST R12 K16
0x8C280311, // 0081 GETMET R10 R1 K17
0x58300012, // 0082 LDCONST R12 K18
0x7C280400, // 0083 CALL R10 2
0xA8040001, // 0084 EXBLK 1 1
0x7002001D, // 0085 JMP #00A4
0xAC180002, // 0086 CATCH R6 0 2
0x7002001A, // 0087 JMP #00A3
0xB8222400, // 0088 GETNGBL R8 K18
0x8C201125, // 0089 GETMET R8 R8 K37
0x8C280526, // 008A GETMET R10 R2 K38
0x58300027, // 008B LDCONST R12 K39
0xB8222800, // 0088 GETNGBL R8 K20
0x8C201127, // 0089 GETMET R8 R8 K39
0x8C280528, // 008A GETMET R10 R2 K40
0x58300029, // 008B LDCONST R12 K41
0x5C340C00, // 008C MOVE R13 R6
0x5C380E00, // 008D MOVE R14 R7
0x7C280800, // 008E CALL R10 4
0x582C0028, // 008F LDCONST R11 K40
0x582C002A, // 008F LDCONST R11 K42
0x7C200600, // 0090 CALL R8 3
0x8C200329, // 0091 GETMET R8 R1 K41
0x5828002A, // 0092 LDCONST R10 K42
0x8C20032B, // 0091 GETMET R8 R1 K43
0x5828002C, // 0092 LDCONST R10 K44
0x7C200400, // 0093 CALL R8 2
0x8C20032B, // 0094 GETMET R8 R1 K43
0x8C20032D, // 0094 GETMET R8 R1 K45
0x7C200200, // 0095 CALL R8 1
0x8C20032C, // 0096 GETMET R8 R1 K44
0x8C280526, // 0097 GETMET R10 R2 K38
0x5830002D, // 0098 LDCONST R12 K45
0x8C20032E, // 0096 GETMET R8 R1 K46
0x8C280528, // 0097 GETMET R10 R2 K40
0x5830002F, // 0098 LDCONST R12 K47
0x5C340C00, // 0099 MOVE R13 R6
0x5C380E00, // 009A MOVE R14 R7
0x7C280800, // 009B CALL R10 4
0x7C200400, // 009C CALL R8 2
0x8C20032E, // 009D GETMET R8 R1 K46
0x8828032F, // 009E GETMBR R10 R1 K47
0x8C200330, // 009D GETMET R8 R1 K48
0x88280331, // 009E GETMBR R10 R1 K49
0x7C200400, // 009F CALL R8 2
0x8C200330, // 00A0 GETMET R8 R1 K48
0x8C200332, // 00A0 GETMET R8 R1 K50
0x7C200200, // 00A1 CALL R8 1
0x70020000, // 00A2 JMP #00A4
0xB0080000, // 00A3 RAISE 2 R0 R0