Matter virtual lights (#19511)

This commit is contained in:
s-hadinger 2023-09-13 22:49:46 +02:00 committed by GitHub
parent 156f1988b2
commit 00bd97fdc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 10255 additions and 8874 deletions

View File

@ -220,7 +220,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_9_Virt_Light1.h"
#include "solidify/solidified_Matter_Plugin_4_Light2.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Light2.h"
#include "solidify/solidified_Matter_Plugin_3_Light3.h"
#include "solidify/solidified_Matter_Plugin_4_Light3.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Light3.h"
#include "solidify/solidified_Matter_Plugin_2_Shutter.h"
#include "solidify/solidified_Matter_Plugin_3_ShutterTilt.h"
@ -296,6 +296,7 @@ module matter (scope: global, strings: weak) {
jitter, closure(matter_jitter_closure)
inspect, closure(matter_inspect_closure)
consolidate_clusters, closure(matter_consolidate_clusters_closure)
UC_LIST, closure(matter_UC_LIST_closure)
Profiler, class(be_class_Matter_Profiler)
// Status codes

View File

@ -102,3 +102,14 @@ def consolidate_clusters(cl, m)
return ret
end
matter.consolidate_clusters = consolidate_clusters
#############################################################
# consolidate_update_commands_list
#
# Build a consolidated list and remove duplicates
#@ solidify:matter.UC_LIST,weak
def UC_LIST(cl, *l)
var uc_parent = super(cl).UPDATE_COMMANDS
return uc_parent + l
end
matter.UC_LIST = UC_LIST

View File

@ -1532,6 +1532,7 @@ class Matter_Device
def register_commands()
tasmota.add_cmd("MtrJoin", /cmd_found, idx, payload, payload_json -> self.MtrJoin(cmd_found, idx, payload, payload_json))
tasmota.add_cmd("MtrUpdate", /cmd_found, idx, payload, payload_json -> self.MtrUpdate(cmd_found, idx, payload, payload_json))
tasmota.add_cmd("MtrInfo", /cmd_found, idx, payload, payload_json -> self.MtrInfo(cmd_found, idx, payload, payload_json))
end
#####################################################################
@ -1553,47 +1554,111 @@ class Matter_Device
# `MtrUpdate`
#
# MtrUpdate {"ep":1, "Power":1}
# MtrUpdate {"Name":"ep1", "Power":1}
# MtrUpdate {"Name":"My_virtual_light", "Power":1}
# MtrUpdate {"name":"ep1", "power":1}
# MtrUpdate {"Name":"Light0", "Power":0}
# MtrUpdate {"Name":"Light0", "Power":1}
# MtrUpdate {"Name":"Light1", "Power":0}
# MtrUpdate {"Name":"Light1", "Power":1,"Bri":55}
# MtrUpdate {"Name":"Light2", "Power":0}
# MtrUpdate {"Name":"Light2", "Power":1, "CT":400, "Bri":20}
# MtrUpdate {"Name":"Light3", "Power":0}
# MtrUpdate {"Name":"Light3", "Power":1, "Bri":20, "Hue":85, "Sat":200}
#
def MtrUpdate(cmd_found, idx, payload, payload_json)
if payload_json == nil return tasmota.resp_cmnd("Invalid JSON") end
if payload_json == nil return tasmota.resp_cmnd_str("Invalid JSON") end
var key_i
if (key_i := tasmota.find_key_i(payload_json, 'Device')) != nil
var pl = self.find_plugin_by_name_or_ep(payload[key_i])
if (pl == nil) return tasmota.resp_cmnd("Invalid Device") end
if (!pl.virtual) return tasmota.resp_cmnd("Device is not virtual") end
# find endpoint (plugin) by name
# can be:
# - integer: endpoint number
# - "ep<n>": endpoint number
# - "<name>": friendly name for endpoint
var key_ep = tasmota.find_key_i(payload_json, 'Ep')
var key_name = tasmota.find_key_i(payload_json, 'Name')
if key_ep || key_name
var pl = nil # plugin instance
if key_ep
var ep = int(payload_json[key_ep])
if ep <= 0 return tasmota.resp_cmnd_str("Invalid 'Ep' attribute") end
pl = self.find_plugin_by_endpoint(ep)
payload_json.remove(key_ep)
end
if key_name
if pl == nil
pl = self.find_plugin_by_friendly_name(payload_json[key_name])
end
payload_json.remove(key_name)
end
if (pl == nil) return tasmota.resp_cmnd_str("Invalid Device") end
if (!pl.virtual) return tasmota.resp_cmnd_str("Device is not virtual") end
# filter parameter accedpted by plugin, and rename with canonical
# Ex: {"power":1,"HUE":2} becomes {"Power":1,"Hue":2}
var uc = pl.consolidate_update_commands()
# check that all commands are in the list of supported commands
var cmd_cleaned = {}
for k: payload_json.keys()
var cleaned_command_idx = tasmota.find_list_i(uc, k)
if (cleaned_command_idx == nil)
tasmota.resp_cmnd_str(f"Invalid command '{payload_json[k]}'")
return
end
cmd_cleaned[uc[cleaned_command_idx]] = payload_json[k]
end
# call plug-in
pl.update_virtual(cmd_cleaned)
var state_json = pl.state_json()
if state_json
var cmnd_status = f'{{"{cmd_found}":{state_json}}}'
return tasmota.resp_cmnd(cmnd_status)
else
return tasmota.resp_cmnd_done()
end
end
tasmota.resp_cmnd_str("Missing 'Device' attribute")
end
#####################################################################
# `MtrInfo`
#
# MtrInfo 9
def MtrInfo(cmd_found, idx, payload, payload_json)
if payload == ""
# dump all devices
end
if payload == ""
# dump all
for pl: self.plugins
self.MtrInfo_one(pl.endpoint)
end
elif type(payload_json) == 'int'
# try ep number
self.MtrInfo_one(payload_json)
else
# try by name
var pl = self.find_plugin_by_friendly_name(payload)
if pl != nil
self.MtrInfo_one(pl.endpoint)
end
end
tasmota.resp_cmnd_done()
end
#####################################################################
# find_plugin_by_name_or_ep
#
# `name`can be:
# - integer: endpoint number
# - "ep<n>": endpoint number
# - "<name>": friendly name for endpoint
def find_plugin_by_name_or_ep(name)
if type(name) == 'int'
if (name > 0) return self.find_plugin_by_endpoint(name) end
elif type(name) == 'string'
if name[0..1] == "ep"
var ep_num = int(name[2..])
if ep_num > 0 return self.find_plugin_by_endpoint(ep_num) end
else
return self.find_plugin_by_friendly_name(name)
end
# output for a single endpoint
def MtrInfo_one(ep)
var pl = self.find_plugin_by_endpoint(ep)
if pl == nil return end # abort
var state_json = pl.state_json()
if state_json
var mtr_info = f'{{"' 'MtrInfo"' ':{state_json}}}'
# publish
# tasmota.publish_rule(mtr_info)
tasmota.publish_result(mtr_info, "")
end
return nil # invalid type
end
end
matter.Device = Matter_Device

View File

@ -39,11 +39,14 @@ class Matter_Plugin
0x001D: [0,1,2,3,0xFFFC,0xFFFD], # Descriptor Cluster 9.5 p.453
0x0039: [0x11], # Bridged Device Basic Information 9.13 p.485
}
# Accepted Update commands for virtual devices
static var UPDATE_COMMANDS = []
var device # reference to the `device` global object
var endpoint # current endpoint
var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
var tick # tick value when it was last updated
var node_label # name of the endpoint, used only in bridge mode, "" if none
var virtual # (bool) is the device pure virtual (i.e. not related to a device implementation by Tasmota)
#############################################################
# MVC Model
@ -63,6 +66,7 @@ class Matter_Plugin
self.clusters = self.consolidate_clusters()
self.parse_configuration(config)
self.node_label = config.find("name", "")
self.virtual = false
end
# proxy for the same method in IM
@ -149,6 +153,14 @@ class Matter_Plugin
# return ret
end
#############################################################
# consolidate_update_commands
#
# Return consolidated "update commands" for this class
def consolidate_update_commands()
return self.UPDATE_COMMANDS
end
#############################################################
# Publish to MQTT a command received from controller
#
@ -370,6 +382,41 @@ class Matter_Plugin
return conf
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# Takes the JSON string prefix
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return ""
end
# This is to be called by matter_device to get the full state JSON
# including "Ep":<ep>,"Name"="<friendly_name"
def state_json()
import json
var ep_name = self.node_label ? f',"Name":{json.dump(self.node_label)}' : ""
var state = self.append_state_json()
if state
var ret = f'{{"Ep":{self.endpoint:i}{ep_name}{state}}}'
return ret
else
return nil
end
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
# The map is pre-cleaned and contains only keys declared in
# `self.UPDATE_COMMANDS` with the adequate case
# (no need to handle case-insensitive)
def update_virtual(payload_json)
# pass
end
end
matter.Plugin = Matter_Plugin

View File

@ -37,14 +37,7 @@ class Matter_Plugin_Device : Matter_Plugin
# var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
# var tick # tick value when it was last updated
# var node_label # name of the endpoint, used only in bridge mode, "" if none
var virtual # (bool) is the device pure virtual (i.e. not related to a device implementation by Tasmota)
#############################################################
# Constructor
def init(device, endpoint, config)
self.virtual = config.find("virtual", false)
super(self).init(device, endpoint, config)
end
# var virtual # (bool) is the device pure virtual (i.e. not related to a device implementation by Tasmota)
#############################################################
# read an attribute
@ -179,13 +172,5 @@ class Matter_Plugin_Device : Matter_Plugin
end
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
# pass
end
end
matter.Plugin_Device = Matter_Plugin_Device

View File

@ -35,6 +35,7 @@ class Matter_Plugin_Light0 : Matter_Plugin_Device
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power")
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
# Inherited
@ -145,12 +146,21 @@ class Matter_Plugin_Light0 : Matter_Plugin_Device
return m.find(key_i)
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Power":{int(self.shadow_onoff)}'
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_onoff = self.find_val_i(payload_json, 'Power')
var val_onoff = payload_json.find("Power")
if val_onoff != nil
self.set_onoff(bool(val_onoff))
end

View File

@ -37,6 +37,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0,0xFFFC,0xFFFD], # On/Off 1.5 p.48
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power")
static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit
# Inherited
@ -149,5 +150,27 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# Takes the JSON string prefix
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Power":{int(self.shadow_onoff)}'
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_onoff = payload_json.find("Power")
if val_onoff != nil
self.set_onoff(bool(val_onoff))
end
super(self).update_virtual(payload_json)
end
end
matter.Plugin_OnOff = Matter_Plugin_OnOff

View File

@ -225,5 +225,14 @@ class Matter_Plugin_Shutter : Matter_Plugin_Device
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json(payload_str)
return f',"ShutterPos":{self.shadow_shutter_pos},"ShutterTarget":{self.shadow_shutter_target}'
end
end
matter.Plugin_Shutter = Matter_Plugin_Shutter

View File

@ -34,6 +34,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
# 0x0006: inherited # On/Off 1.5 p.48
0x0008: [0,2,3,0x0F,0x11,0xFFFC,0xFFFD], # Level Control 1.6 p.57
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Bri")
static var TYPES = { 0x0101: 2 } # Dimmable Light
# Inherited
@ -82,6 +83,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
def set_bri(bri_254, pow)
if (bri_254 < 0) bri_254 = 0 end
if (bri_254 > 254) bri_254 = 254 end
pow = (pow != nil) ? bool(pow) : nil # nil or bool
if !self.virtual
import light
var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255)
@ -187,5 +189,29 @@ class Matter_Plugin_Light1 : Matter_Plugin_Light0
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# Takes the JSON string prefix
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri}'
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_onoff = payload_json.find("Power")
var val_bri = payload_json.find("Bri")
if val_bri != nil
self.set_bri(int(val_bri), val_onoff)
return # don't call super() because we already handeld 'Power'
end
super(self).update_virtual(payload_json)
end
end
matter.Plugin_Light1 = Matter_Plugin_Light1

View File

@ -96,5 +96,14 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Contact":{int(self.shadow_contact)}'
end
end
matter.Plugin_Sensor_Contact = Matter_Plugin_Sensor_Contact

View File

@ -80,5 +80,14 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Humidity":{self.shadow_value}'
end
end
matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity

View File

@ -87,5 +87,14 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Illuminance":{self.shadow_value}'
end
end
matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance

View File

@ -97,5 +97,14 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Occupancy":{int(self.shadow_occupancy)}'
end
end
matter.Plugin_Sensor_Occupancy = Matter_Plugin_Sensor_Occupancy

View File

@ -88,5 +88,14 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"OnOff":{int(self.shadow_onoff)}'
end
end
matter.Plugin_Sensor_OnOff = Matter_Plugin_Sensor_OnOff

View File

@ -80,5 +80,14 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Pressure":{self.shadow_value}'
end
end
matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure

View File

@ -83,5 +83,14 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
end
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json()
return f',"Temperature":{self.shadow_value}'
end
end
matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp

View File

@ -165,7 +165,13 @@ class Matter_Plugin_ShutterTilt : Matter_Plugin_Shutter
end
#############################################################
# parse sensor inherited
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json(payload_str)
return f',"ShutterPos":{self.shadow_shutter_pos},"ShutterTarget":{self.shadow_shutter_target},"ShutterTilt":{self.shadow_shutter_tilt}'
end
end
matter.Plugin_ShutterTilt = Matter_Plugin_ShutterTilt

View File

@ -35,6 +35,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# 0x0008: inherited # Level Control 1.6 p.57
0x0300: [7,8,0xF,0x400B,0x400C,0xFFFC,0xFFFD], # Color Control 3.2 p.111
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "CT")
static var TYPES = { 0x010C: 2 } # Color Temperature Light
# Inherited
@ -174,5 +175,26 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json(payload_str)
return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri},"CT":{self.shadow_ct}'
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_ct = int(payload_json.find("CT")) # int or nil
if (val_ct != nil)
self.set_ct(val_ct)
end
super(self).update_virtual(payload_json)
end
end
matter.Plugin_Light2 = Matter_Plugin_Light2

View File

@ -35,6 +35,7 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
# 0x0008: inherited # Level Control 1.6 p.57
0x0300: [0,1,7,8,0xF,0x4001,0x400A,0xFFFC,0xFFFD],# Color Control 3.2 p.111
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Hue", "Sat")
static var TYPES = { 0x010D: 2 } # Extended Color Light
# Inherited
@ -211,5 +212,28 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
end
#############################################################
# append_state_json
#
# Output the current state in JSON
# Takes the JSON string prefix
# New values need to be appended with `,"key":value` (including prefix comma)
def append_state_json(payload_str)
return f',"Power":{int(self.shadow_onoff)},"Bri":{self.shadow_bri},"Hue":{self.shadow_hue},"Sat":{self.shadow_sat}'
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_hue = int(payload_json.find("Hue")) # int or nil
var val_sat = int(payload_json.find("Sat")) # int or nil
if (val_hue != nil) || (val_sat != nil)
self.set_hue_sat(val_hue, val_sat)
end
super(self).update_virtual(payload_json)
end
end
matter.Plugin_Light3 = Matter_Plugin_Light3

View File

@ -34,6 +34,7 @@ import matter
class Matter_UI
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
"|temperature|pressure|illuminance|humidity|occupancy|onoff|contact"
"|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3"
# static var _CLASSES_HTTP = "-http"
static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3"
"|http_temperature|http_pressure|http_illuminance|http_humidity"

View File

@ -301,5 +301,36 @@ be_local_closure(matter_consolidate_clusters, /* name */
);
/*******************************************************************/
/********************************************************************
** Solidified function: UC_LIST
********************************************************************/
be_local_closure(matter_UC_LIST, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
1, /* 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(UPDATE_COMMANDS),
}),
be_str_weak(UC_LIST),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0x60080003, // 0000 GETGBL R2 G3
0x5C0C0000, // 0001 MOVE R3 R0
0x7C080200, // 0002 CALL R2 1
0x88080500, // 0003 GETMBR R2 R2 K0
0x000C0401, // 0004 ADD R3 R2 R1
0x80040600, // 0005 RET 1 R3
})
)
);
/*******************************************************************/
/********************************************************************/
/* End of solidification */

View File

@ -7,35 +7,11 @@
extern const bclass be_class_Matter_Plugin_Device;
/********************************************************************
** Solidified function: update_virtual
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Device_update_virtual, /* name */
be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Device_init, /* name */
be_nested_proto(
9, /* nstack */
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@ -43,28 +19,73 @@ be_local_closure(Matter_Plugin_Device_init, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(init),
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(3),
/* K5 */ be_const_int(0),
/* K6 */ be_const_int(1),
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
/* K8 */ be_nested_str_weak(add_TLV),
/* K9 */ be_nested_str_weak(U2),
/* K10 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(init),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0x8C100701, // 0000 GETMET R4 R3 K1
0x58180000, // 0001 LDCONST R6 K0
0x501C0000, // 0002 LDBOOL R7 0 0
0x7C100600, // 0003 CALL R4 3
0x90020004, // 0004 SETMBR R0 K0 R4
0x60100003, // 0005 GETGBL R4 G3
0x5C140000, // 0006 MOVE R5 R0
0x7C100200, // 0007 CALL R4 1
0x8C100902, // 0008 GETMET R4 R4 K2
0x5C180200, // 0009 MOVE R6 R1
0x5C1C0400, // 000A MOVE R7 R2
0x5C200600, // 000B MOVE R8 R3
0x7C100800, // 000C CALL R4 4
0x80000000, // 000D RET 0
( &(const binstruction[51]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x1C1C0B04, // 0004 EQ R7 R5 K4
0x781E0016, // 0005 JMPF R7 #001D
0x1C1C0D05, // 0006 EQ R7 R6 K5
0x781E0002, // 0007 JMPF R7 #000B
0x501C0200, // 0008 LDBOOL R7 1 0
0x80040E00, // 0009 RET 1 R7
0x70020010, // 000A JMP #001C
0x1C1C0D06, // 000B EQ R7 R6 K6
0x781E0009, // 000C JMPF R7 #0017
0x8C1C0907, // 000D GETMET R7 R4 K7
0x7C1C0200, // 000E CALL R7 1
0x8C200F08, // 000F GETMET R8 R7 K8
0x58280005, // 0010 LDCONST R10 K5
0x882C0909, // 0011 GETMBR R11 R4 K9
0x58300005, // 0012 LDCONST R12 K5
0x7C200800, // 0013 CALL R8 4
0x900E0705, // 0014 SETMBR R3 K3 K5
0x80040E00, // 0015 RET 1 R7
0x70020004, // 0016 JMP #001C
0x541E003F, // 0017 LDINT R7 64
0x1C1C0C07, // 0018 EQ R7 R6 R7
0x781E0001, // 0019 JMPF R7 #001C
0x501C0200, // 001A LDBOOL R7 1 0
0x80040E00, // 001B RET 1 R7
0x70020014, // 001C JMP #0032
0x541E0003, // 001D LDINT R7 4
0x1C1C0A07, // 001E EQ R7 R5 R7
0x781E0002, // 001F JMPF R7 #0023
0x501C0200, // 0020 LDBOOL R7 1 0
0x80040E00, // 0021 RET 1 R7
0x7002000E, // 0022 JMP #0032
0x541E0004, // 0023 LDINT R7 5
0x1C1C0A07, // 0024 EQ R7 R5 R7
0x781E0002, // 0025 JMPF R7 #0029
0x501C0200, // 0026 LDBOOL R7 1 0
0x80040E00, // 0027 RET 1 R7
0x70020008, // 0028 JMP #0032
0x601C0003, // 0029 GETGBL R7 G3
0x5C200000, // 002A MOVE R8 R0
0x7C1C0200, // 002B CALL R7 1
0x8C1C0F0A, // 002C GETMET R7 R7 K10
0x5C240200, // 002D MOVE R9 R1
0x5C280400, // 002E MOVE R10 R2
0x5C2C0600, // 002F MOVE R11 R3
0x7C1C0800, // 0030 CALL R7 4
0x80040E00, // 0031 RET 1 R7
0x80000000, // 0032 RET 0
})
)
);
@ -396,110 +417,27 @@ be_local_closure(Matter_Plugin_Device_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Device_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(3),
/* K5 */ be_const_int(0),
/* K6 */ be_const_int(1),
/* K7 */ be_nested_str_weak(Matter_TLV_struct),
/* K8 */ be_nested_str_weak(add_TLV),
/* K9 */ be_nested_str_weak(U2),
/* K10 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[51]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x1C1C0B04, // 0004 EQ R7 R5 K4
0x781E0016, // 0005 JMPF R7 #001D
0x1C1C0D05, // 0006 EQ R7 R6 K5
0x781E0002, // 0007 JMPF R7 #000B
0x501C0200, // 0008 LDBOOL R7 1 0
0x80040E00, // 0009 RET 1 R7
0x70020010, // 000A JMP #001C
0x1C1C0D06, // 000B EQ R7 R6 K6
0x781E0009, // 000C JMPF R7 #0017
0x8C1C0907, // 000D GETMET R7 R4 K7
0x7C1C0200, // 000E CALL R7 1
0x8C200F08, // 000F GETMET R8 R7 K8
0x58280005, // 0010 LDCONST R10 K5
0x882C0909, // 0011 GETMBR R11 R4 K9
0x58300005, // 0012 LDCONST R12 K5
0x7C200800, // 0013 CALL R8 4
0x900E0705, // 0014 SETMBR R3 K3 K5
0x80040E00, // 0015 RET 1 R7
0x70020004, // 0016 JMP #001C
0x541E003F, // 0017 LDINT R7 64
0x1C1C0C07, // 0018 EQ R7 R6 R7
0x781E0001, // 0019 JMPF R7 #001C
0x501C0200, // 001A LDBOOL R7 1 0
0x80040E00, // 001B RET 1 R7
0x70020014, // 001C JMP #0032
0x541E0003, // 001D LDINT R7 4
0x1C1C0A07, // 001E EQ R7 R5 R7
0x781E0002, // 001F JMPF R7 #0023
0x501C0200, // 0020 LDBOOL R7 1 0
0x80040E00, // 0021 RET 1 R7
0x7002000E, // 0022 JMP #0032
0x541E0004, // 0023 LDINT R7 5
0x1C1C0A07, // 0024 EQ R7 R5 R7
0x781E0002, // 0025 JMPF R7 #0029
0x501C0200, // 0026 LDBOOL R7 1 0
0x80040E00, // 0027 RET 1 R7
0x70020008, // 0028 JMP #0032
0x601C0003, // 0029 GETGBL R7 G3
0x5C200000, // 002A MOVE R8 R0
0x7C1C0200, // 002B CALL R7 1
0x8C1C0F0A, // 002C GETMET R7 R7 K10
0x5C240200, // 002D MOVE R9 R1
0x5C280400, // 002E MOVE R10 R2
0x5C2C0600, // 002F MOVE R11 R3
0x7C1C0800, // 0030 CALL R7 4
0x80040E00, // 0031 RET 1 R7
0x80000000, // 0032 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Device
********************************************************************/
extern const bclass be_class_Matter_Plugin;
be_local_class(Matter_Plugin_Device,
1,
0,
&be_class_Matter_Plugin,
be_nested_map(8,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Device_update_virtual_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 5), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
{ be_const_key_weak(init, 1), be_const_closure(Matter_Plugin_Device_init_closure) },
{ be_const_key_weak(virtual, -1), be_const_var(0) },
{ be_const_key_weak(TYPES, 6), 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(19, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Device_read_attribute_closure) },
{ be_const_key_weak(invoke_request, 1), be_const_closure(Matter_Plugin_Device_invoke_request_closure) },
{ be_const_key_weak(NON_BRIDGE_VENDOR, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(2,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(4631),
be_const_int(4993),
})) ) } )) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(5,
@ -552,12 +490,6 @@ be_local_class(Matter_Plugin_Device,
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(NON_BRIDGE_VENDOR, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(2,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(4631),
be_const_int(4993),
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Device)

View File

@ -7,37 +7,36 @@
extern const bclass be_class_Matter_Plugin_Light0;
/********************************************************************
** Solidified function: find_val_i
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light0_find_val_i, /* name */
be_local_closure(Matter_Plugin_Light0_init, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
4, /* varg */
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_class(be_class_Matter_Plugin_Light0),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(find_key_i),
/* K3 */ be_nested_str_weak(find),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(find_val_i),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x58080000, // 0000 LDCONST R2 K0
0xB80E0200, // 0001 GETNGBL R3 K1
0x8C0C0702, // 0002 GETMET R3 R3 K2
0x5C140000, // 0003 MOVE R5 R0
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x7C0C0600, // 0005 CALL R3 3
0x8C100103, // 0006 GETMET R4 R0 K3
0x5C180600, // 0007 MOVE R6 R3
0x7C100400, // 0008 CALL R4 2
0x80040800, // 0009 RET 1 R4
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
@ -45,98 +44,32 @@ be_local_closure(Matter_Plugin_Light0_find_val_i, /* name */
/********************************************************************
** Solidified function: set_onoff
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Light0_set_onoff, /* name */
be_local_closure(Matter_Plugin_Light0_append_state_json, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
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[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(light),
/* K2 */ be_nested_str_weak(set),
/* K3 */ be_nested_str_weak(power),
/* K4 */ be_nested_str_weak(update_shadow),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(attribute_updated),
/* K7 */ be_const_int(0),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(set_onoff),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0008, // 0001 JMPT R2 #000B
0xA40A0200, // 0002 IMPORT R2 K1
0x8C0C0502, // 0003 GETMET R3 R2 K2
0x60140013, // 0004 GETGBL R5 G19
0x7C140000, // 0005 CALL R5 0
0x98160601, // 0006 SETIDX R5 K3 R1
0x7C0C0400, // 0007 CALL R3 2
0x8C0C0104, // 0008 GETMET R3 R0 K4
0x7C0C0200, // 0009 CALL R3 1
0x70020007, // 000A JMP #0013
0x88080105, // 000B GETMBR R2 R0 K5
0x20080202, // 000C NE R2 R1 R2
0x780A0004, // 000D JMPF R2 #0013
0x8C080106, // 000E GETMET R2 R0 K6
0x54120005, // 000F LDINT R4 6
0x58140007, // 0010 LDCONST R5 K7
0x7C080600, // 0011 CALL R2 3
0x90020A01, // 0012 SETMBR R0 K5 R1
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_Light0_update_virtual, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find_val_i),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(set_onoff),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[19]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x5C100200, // 0001 MOVE R4 R1
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x4C0C0000, // 0004 LDNIL R3
0x200C0403, // 0005 NE R3 R2 R3
0x780E0004, // 0006 JMPF R3 #000C
0x8C0C0102, // 0007 GETMET R3 R0 K2
0x60140017, // 0008 GETGBL R5 G23
0x5C180400, // 0009 MOVE R6 R2
0x7C140200, // 000A CALL R5 1
0x7C0C0400, // 000B CALL R3 2
0x600C0003, // 000C GETGBL R3 G3
0x5C100000, // 000D MOVE R4 R0
0x7C0C0200, // 000E CALL R3 1
0x8C0C0703, // 000F GETMET R3 R3 K3
0x5C140200, // 0010 MOVE R5 R1
0x7C0C0400, // 0011 CALL R3 2
0x80000000, // 0012 RET 0
( &(const binstruction[ 7]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x7C040400, // 0005 CALL R1 2
0x80040200, // 0006 RET 1 R1
})
)
);
@ -234,36 +167,51 @@ be_local_closure(Matter_Plugin_Light0_invoke_request, /* name */
/********************************************************************
** Solidified function: init
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_Light0_init, /* name */
be_local_closure(Matter_Plugin_Light0_set_onoff, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(light),
/* K2 */ be_nested_str_weak(set),
/* K3 */ be_nested_str_weak(power),
/* K4 */ be_nested_str_weak(update_shadow),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(attribute_updated),
/* K7 */ be_const_int(0),
}),
be_str_weak(init),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
( &(const binstruction[20]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0008, // 0001 JMPT R2 #000B
0xA40A0200, // 0002 IMPORT R2 K1
0x8C0C0502, // 0003 GETMET R3 R2 K2
0x60140013, // 0004 GETGBL R5 G19
0x7C140000, // 0005 CALL R5 0
0x98160601, // 0006 SETIDX R5 K3 R1
0x7C0C0400, // 0007 CALL R3 2
0x8C0C0104, // 0008 GETMET R3 R0 K4
0x7C0C0200, // 0009 CALL R3 1
0x70020007, // 000A JMP #0013
0x88080105, // 000B GETMBR R2 R0 K5
0x20080202, // 000C NE R2 R1 R2
0x780A0004, // 000D JMPF R2 #0013
0x8C080106, // 000E GETMET R2 R0 K6
0x54120005, // 000F LDINT R4 6
0x58140007, // 0010 LDCONST R5 K7
0x7C080600, // 0011 CALL R2 3
0x90020A01, // 0012 SETMBR R0 K5 R1
0x80000000, // 0013 RET 0
})
)
);
@ -329,6 +277,52 @@ be_local_closure(Matter_Plugin_Light0_update_shadow, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_Light0_update_virtual, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(set_onoff),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x58100001, // 0001 LDCONST R4 K1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E0004, // 0005 JMPF R3 #000B
0x8C0C0102, // 0006 GETMET R3 R0 K2
0x60140017, // 0007 GETGBL R5 G23
0x5C180400, // 0008 MOVE R6 R2
0x7C140200, // 0009 CALL R5 1
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -409,6 +403,44 @@ be_local_closure(Matter_Plugin_Light0_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: find_val_i
********************************************************************/
be_local_closure(Matter_Plugin_Light0_find_val_i, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
4, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_const_class(be_class_Matter_Plugin_Light0),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(find_key_i),
/* K3 */ be_nested_str_weak(find),
}),
be_str_weak(find_val_i),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x58080000, // 0000 LDCONST R2 K0
0xB80E0200, // 0001 GETNGBL R3 K1
0x8C0C0702, // 0002 GETMET R3 R3 K2
0x5C140000, // 0003 MOVE R5 R0
0x5C180200, // 0004 MOVE R6 R1
0x7C0C0600, // 0005 CALL R3 3
0x8C100103, // 0006 GETMET R4 R0 K3
0x5C180600, // 0007 MOVE R6 R3
0x7C100400, // 0008 CALL R4 2
0x80040800, // 0009 RET 1 R4
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light0
********************************************************************/
@ -416,19 +448,28 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Light0,
1,
&be_class_Matter_Plugin_Device,
be_nested_map(13,
be_nested_map(15,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
{ be_const_key_weak(find_val_i, 4), be_const_static_closure(Matter_Plugin_Light0_find_val_i_closure) },
{ be_const_key_weak(read_attribute, 8), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(update_virtual, 1), be_const_closure(Matter_Plugin_Light0_update_virtual_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light0_init_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light0_append_state_json_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light0_invoke_request_closure) },
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_Light0_set_onoff_closure) },
{ be_const_key_weak(update_shadow, 11), be_const_closure(Matter_Plugin_Light0_update_shadow_closure) },
{ be_const_key_weak(update_virtual, 7), be_const_closure(Matter_Plugin_Light0_update_virtual_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
})) ) } )) },
{ be_const_key_weak(NAME, 8), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
{ be_const_key_weak(CLUSTERS, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -487,12 +528,9 @@ be_local_class(Matter_Plugin_Light0,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(set_onoff, 3), be_const_closure(Matter_Plugin_Light0_set_onoff_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
{ be_const_key_weak(find_val_i, -1), be_const_static_closure(Matter_Plugin_Light0_find_val_i_closure) },
})),
be_str_weak(Matter_Plugin_Light0)
);

View File

@ -6,43 +6,6 @@
extern const bclass be_class_Matter_Plugin_OnOff;
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@ -131,129 +94,6 @@ be_local_closure(Matter_Plugin_OnOff_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(set_power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_const_int(1),
/* K5 */ be_nested_str_weak(update_shadow),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
}),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A000A, // 0001 JMPT R2 #000D
0xB80A0200, // 0002 GETNGBL R2 K1
0x8C080502, // 0003 GETMET R2 R2 K2
0x88100103, // 0004 GETMBR R4 R0 K3
0x04100904, // 0005 SUB R4 R4 K4
0x60140017, // 0006 GETGBL R5 G23
0x5C180200, // 0007 MOVE R6 R1
0x7C140200, // 0008 CALL R5 1
0x7C080600, // 0009 CALL R2 3
0x8C080105, // 000A GETMET R2 R0 K5
0x7C080200, // 000B CALL R2 1
0x70020007, // 000C JMP #0015
0x88080106, // 000D GETMBR R2 R0 K6
0x20080202, // 000E NE R2 R1 R2
0x780A0004, // 000F JMPF R2 #0015
0x8C080107, // 0010 GETMET R2 R0 K7
0x54120005, // 0011 LDINT R4 6
0x58140008, // 0012 LDCONST R5 K8
0x7C080600, // 0013 CALL R2 3
0x90020C01, // 0014 SETMBR R0 K6 R1
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -394,6 +234,245 @@ be_local_closure(Matter_Plugin_OnOff_update_shadow, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_update_virtual, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(set_onoff),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x58100001, // 0001 LDCONST R4 K1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E0004, // 0005 JMPF R3 #000B
0x8C0C0102, // 0006 GETMET R3 R0 K2
0x60140017, // 0007 GETGBL R5 G23
0x5C180400, // 0008 MOVE R6 R2
0x7C140200, // 0009 CALL R5 1
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(set_power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_const_int(1),
/* K5 */ be_nested_str_weak(update_shadow),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
}),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A000A, // 0001 JMPT R2 #000D
0xB80A0200, // 0002 GETNGBL R2 K1
0x8C080502, // 0003 GETMET R2 R2 K2
0x88100103, // 0004 GETMBR R4 R0 K3
0x04100904, // 0005 SUB R4 R4 K4
0x60140017, // 0006 GETGBL R5 G23
0x5C180200, // 0007 MOVE R6 R1
0x7C140200, // 0008 CALL R5 1
0x7C080600, // 0009 CALL R2 3
0x8C080105, // 000A GETMET R2 R0 K5
0x7C080200, // 000B CALL R2 1
0x70020007, // 000C JMP #0015
0x88080106, // 000D GETMBR R2 R0 K6
0x20080202, // 000E NE R2 R1 R2
0x780A0004, // 000F JMPF R2 #0015
0x8C080107, // 0010 GETMET R2 R0 K7
0x54120005, // 0011 LDINT R4 6
0x58140008, // 0012 LDCONST R5 K8
0x7C080600, // 0013 CALL R2 3
0x90020C01, // 0014 SETMBR R0 K6 R1
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_OnOff_append_state_json, /* 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[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x7C040400, // 0005 CALL R1 2
0x80040200, // 0006 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
@ -401,19 +480,21 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_OnOff,
1,
&be_class_Matter_Plugin_Device,
be_nested_map(15,
be_nested_map(18,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, 14), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(update_shadow, 10), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
{ be_const_key_weak(ARG_TYPE, 1), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(tasmota_relay_index, 13), be_const_var(0) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(NAME, 7), be_nested_str_weak(Relay) },
{ be_const_key_weak(CLUSTERS, 11), 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(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
})) ) } )) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -472,14 +553,19 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(parse_configuration, 8), be_const_closure(Matter_Plugin_OnOff_parse_configuration_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_OnOff_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 16), be_const_closure(Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(update_shadow, 14), be_const_closure(Matter_Plugin_OnOff_update_shadow_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_OnOff_update_virtual_closure) },
{ be_const_key_weak(ARG_HINT, 11), be_nested_str_weak(Relay_X3Cx_X3E_X20number) },
{ be_const_key_weak(ARG_TYPE, 13), be_const_static_closure(Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Relay) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_OnOff_append_state_json_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_OnOff_parse_configuration_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(set_onoff, -1), be_const_closure(Matter_Plugin_OnOff_set_onoff_closure) },
{ be_const_key_weak(tasmota_relay_index, -1), be_const_var(0) },
})),
be_str_weak(Matter_Plugin_OnOff)
);

View File

@ -6,6 +6,47 @@
extern const bclass be_class_Matter_Plugin_Shutter;
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_parse_configuration, /* 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[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_shutter_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(shadow_shutter_inverted),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x8C080301, // 0000 GETMET R2 R1 K1
0x88100102, // 0001 GETMBR R4 R0 K2
0x7C080400, // 0002 CALL R2 2
0x90020002, // 0003 SETMBR R0 K0 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x4C0C0000, // 0005 LDNIL R3
0x1C080403, // 0006 EQ R2 R2 R3
0x780A0000, // 0007 JMPF R2 #0009
0x90020103, // 0008 SETMBR R0 K0 K3
0x5409FFFE, // 0009 LDINT R2 -1
0x90020802, // 000A SETMBR R0 K4 R2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -201,88 +242,26 @@ be_local_closure(Matter_Plugin_Shutter_read_attribute, /* name */
/********************************************************************
** Solidified function: parse_sensors
** Solidified function: <lambda>
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */
be_nested_proto(
11, /* nstack */
2, /* argc */
2, /* varg */
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[12]) { /* constants */
/* K0 */ be_nested_str_weak(Shutter),
/* K1 */ be_nested_str_weak(tasmota_shutter_index),
/* K2 */ be_const_int(1),
/* K3 */ be_nested_str_weak(contains),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(Position),
/* K6 */ be_nested_str_weak(shadow_shutter_pos),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_nested_str_weak(Direction),
/* K9 */ be_nested_str_weak(shadow_shutter_direction),
/* K10 */ be_nested_str_weak(Target),
/* K11 */ be_nested_str_weak(shadow_shutter_target),
}),
be_str_weak(parse_sensors),
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[53]) { /* code */
0x60080008, // 0000 GETGBL R2 G8
0x880C0101, // 0001 GETMBR R3 R0 K1
0x000C0702, // 0002 ADD R3 R3 K2
0x7C080200, // 0003 CALL R2 1
0x000A0002, // 0004 ADD R2 K0 R2
0x8C0C0303, // 0005 GETMET R3 R1 K3
0x5C140400, // 0006 MOVE R5 R2
0x7C0C0400, // 0007 CALL R3 2
0x780E002A, // 0008 JMPF R3 #0034
0x940C0202, // 0009 GETIDX R3 R1 R2
0x8C100704, // 000A GETMET R4 R3 K4
0x58180005, // 000B LDCONST R6 K5
0x7C100400, // 000C CALL R4 2
0x4C140000, // 000D LDNIL R5
0x20140805, // 000E NE R5 R4 R5
0x78160007, // 000F JMPF R5 #0018
0x88140106, // 0010 GETMBR R5 R0 K6
0x20140805, // 0011 NE R5 R4 R5
0x78160003, // 0012 JMPF R5 #0017
0x8C140107, // 0013 GETMET R5 R0 K7
0x541E0101, // 0014 LDINT R7 258
0x5422000D, // 0015 LDINT R8 14
0x7C140600, // 0016 CALL R5 3
0x90020C04, // 0017 SETMBR R0 K6 R4
0x8C140704, // 0018 GETMET R5 R3 K4
0x581C0008, // 0019 LDCONST R7 K8
0x7C140400, // 001A CALL R5 2
0x4C180000, // 001B LDNIL R6
0x20180A06, // 001C NE R6 R5 R6
0x781A0007, // 001D JMPF R6 #0026
0x88180109, // 001E GETMBR R6 R0 K9
0x20180A06, // 001F NE R6 R5 R6
0x781A0003, // 0020 JMPF R6 #0025
0x8C180107, // 0021 GETMET R6 R0 K7
0x54220101, // 0022 LDINT R8 258
0x54260009, // 0023 LDINT R9 10
0x7C180600, // 0024 CALL R6 3
0x90021205, // 0025 SETMBR R0 K9 R5
0x8C180704, // 0026 GETMET R6 R3 K4
0x5820000A, // 0027 LDCONST R8 K10
0x7C180400, // 0028 CALL R6 2
0x4C1C0000, // 0029 LDNIL R7
0x201C0C07, // 002A NE R7 R6 R7
0x781E0007, // 002B JMPF R7 #0034
0x881C010B, // 002C GETMBR R7 R0 K11
0x201C0C07, // 002D NE R7 R6 R7
0x781E0003, // 002E JMPF R7 #0033
0x8C1C0107, // 002F GETMET R7 R0 K7
0x54260101, // 0030 LDINT R9 258
0x542A000A, // 0031 LDINT R10 11
0x7C1C0600, // 0032 CALL R7 3
0x90021606, // 0033 SETMBR R0 K11 R6
0x80000000, // 0034 RET 0
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
@ -290,52 +269,32 @@ be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
/********************************************************************
** Solidified function: update_shadow
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */
be_local_closure(Matter_Plugin_Shutter_append_state_json, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(update_inverted),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(cmd),
/* K3 */ be_nested_str_weak(ShutterPosition),
/* K4 */ be_nested_str_weak(tasmota_shutter_index),
/* K5 */ be_const_int(1),
/* K6 */ be_nested_str_weak(parse_sensors),
/* K7 */ be_nested_str_weak(update_shadow),
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22ShutterPos_X22_X3A_X25s_X2C_X22ShutterTarget_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_shutter_pos),
/* K2 */ be_nested_str_weak(shadow_shutter_target),
}),
be_str_weak(update_shadow),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[21]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0xB8060200, // 0002 GETNGBL R1 K1
0x8C040302, // 0003 GETMET R1 R1 K2
0x600C0008, // 0004 GETGBL R3 G8
0x88100104, // 0005 GETMBR R4 R0 K4
0x00100905, // 0006 ADD R4 R4 K5
0x7C0C0200, // 0007 CALL R3 1
0x000E0603, // 0008 ADD R3 K3 R3
0x50100200, // 0009 LDBOOL R4 1 0
0x7C040600, // 000A CALL R1 3
0x78060002, // 000B JMPF R1 #000F
0x8C080106, // 000C GETMET R2 R0 K6
0x5C100200, // 000D MOVE R4 R1
0x7C080400, // 000E CALL R2 2
0x60080003, // 000F GETGBL R2 G3
0x5C0C0000, // 0010 MOVE R3 R0
0x7C080200, // 0011 CALL R2 1
0x8C080507, // 0012 GETMET R2 R2 K7
0x7C080200, // 0013 CALL R2 1
0x80000000, // 0014 RET 0
( &(const binstruction[ 6]) { /* code */
0x60080018, // 0000 GETGBL R2 G24
0x580C0000, // 0001 LDCONST R3 K0
0x88100101, // 0002 GETMBR R4 R0 K1
0x88140102, // 0003 GETMBR R5 R0 K2
0x7C080600, // 0004 CALL R2 3
0x80040400, // 0005 RET 1 R2
})
)
);
@ -506,47 +465,6 @@ be_local_closure(Matter_Plugin_Shutter_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_parse_configuration, /* 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[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_shutter_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(shadow_shutter_inverted),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x8C080301, // 0000 GETMET R2 R1 K1
0x88100102, // 0001 GETMBR R4 R0 K2
0x7C080400, // 0002 CALL R2 2
0x90020002, // 0003 SETMBR R0 K0 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x4C0C0000, // 0005 LDNIL R3
0x1C080403, // 0006 EQ R2 R2 R3
0x780A0000, // 0007 JMPF R2 #0009
0x90020103, // 0008 SETMBR R0 K0 K3
0x5409FFFE, // 0009 LDINT R2 -1
0x90020802, // 000A SETMBR R0 K4 R2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_inverted
********************************************************************/
@ -620,26 +538,141 @@ be_local_closure(Matter_Plugin_Shutter_update_inverted, /* name */
/********************************************************************
** Solidified function: <lambda>
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Shutter__X3Clambda_X3E, /* name */
be_local_closure(Matter_Plugin_Shutter_update_shadow, /* name */
be_nested_proto(
3, /* nstack */
5, /* nstack */
1, /* argc */
0, /* varg */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(update_inverted),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(cmd),
/* K3 */ be_nested_str_weak(ShutterPosition),
/* K4 */ be_nested_str_weak(tasmota_shutter_index),
/* K5 */ be_const_int(1),
/* K6 */ be_nested_str_weak(parse_sensors),
/* K7 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
( &(const binstruction[21]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x7C040200, // 0001 CALL R1 1
0xB8060200, // 0002 GETNGBL R1 K1
0x8C040302, // 0003 GETMET R1 R1 K2
0x600C0008, // 0004 GETGBL R3 G8
0x88100104, // 0005 GETMBR R4 R0 K4
0x00100905, // 0006 ADD R4 R4 K5
0x7C0C0200, // 0007 CALL R3 1
0x000E0603, // 0008 ADD R3 K3 R3
0x50100200, // 0009 LDBOOL R4 1 0
0x7C040600, // 000A CALL R1 3
0x78060002, // 000B JMPF R1 #000F
0x8C080106, // 000C GETMET R2 R0 K6
0x5C100200, // 000D MOVE R4 R1
0x7C080400, // 000E CALL R2 2
0x60080003, // 000F GETGBL R2 G3
0x5C0C0000, // 0010 MOVE R3 R0
0x7C080200, // 0011 CALL R2 1
0x8C080507, // 0012 GETMET R2 R2 K7
0x7C080200, // 0013 CALL R2 1
0x80000000, // 0014 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
be_local_closure(Matter_Plugin_Shutter_parse_sensors, /* name */
be_nested_proto(
11, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[12]) { /* constants */
/* K0 */ be_nested_str_weak(Shutter),
/* K1 */ be_nested_str_weak(tasmota_shutter_index),
/* K2 */ be_const_int(1),
/* K3 */ be_nested_str_weak(contains),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(Position),
/* K6 */ be_nested_str_weak(shadow_shutter_pos),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_nested_str_weak(Direction),
/* K9 */ be_nested_str_weak(shadow_shutter_direction),
/* K10 */ be_nested_str_weak(Target),
/* K11 */ be_nested_str_weak(shadow_shutter_target),
}),
be_str_weak(parse_sensors),
&be_const_str_solidified,
( &(const binstruction[53]) { /* code */
0x60080008, // 0000 GETGBL R2 G8
0x880C0101, // 0001 GETMBR R3 R0 K1
0x000C0702, // 0002 ADD R3 R3 K2
0x7C080200, // 0003 CALL R2 1
0x000A0002, // 0004 ADD R2 K0 R2
0x8C0C0303, // 0005 GETMET R3 R1 K3
0x5C140400, // 0006 MOVE R5 R2
0x7C0C0400, // 0007 CALL R3 2
0x780E002A, // 0008 JMPF R3 #0034
0x940C0202, // 0009 GETIDX R3 R1 R2
0x8C100704, // 000A GETMET R4 R3 K4
0x58180005, // 000B LDCONST R6 K5
0x7C100400, // 000C CALL R4 2
0x4C140000, // 000D LDNIL R5
0x20140805, // 000E NE R5 R4 R5
0x78160007, // 000F JMPF R5 #0018
0x88140106, // 0010 GETMBR R5 R0 K6
0x20140805, // 0011 NE R5 R4 R5
0x78160003, // 0012 JMPF R5 #0017
0x8C140107, // 0013 GETMET R5 R0 K7
0x541E0101, // 0014 LDINT R7 258
0x5422000D, // 0015 LDINT R8 14
0x7C140600, // 0016 CALL R5 3
0x90020C04, // 0017 SETMBR R0 K6 R4
0x8C140704, // 0018 GETMET R5 R3 K4
0x581C0008, // 0019 LDCONST R7 K8
0x7C140400, // 001A CALL R5 2
0x4C180000, // 001B LDNIL R6
0x20180A06, // 001C NE R6 R5 R6
0x781A0007, // 001D JMPF R6 #0026
0x88180109, // 001E GETMBR R6 R0 K9
0x20180A06, // 001F NE R6 R5 R6
0x781A0003, // 0020 JMPF R6 #0025
0x8C180107, // 0021 GETMET R6 R0 K7
0x54220101, // 0022 LDINT R8 258
0x54260009, // 0023 LDINT R9 10
0x7C180600, // 0024 CALL R6 3
0x90021205, // 0025 SETMBR R0 K9 R5
0x8C180704, // 0026 GETMET R6 R3 K4
0x5820000A, // 0027 LDCONST R8 K10
0x7C180400, // 0028 CALL R6 2
0x4C1C0000, // 0029 LDNIL R7
0x201C0C07, // 002A NE R7 R6 R7
0x781E0007, // 002B JMPF R7 #0034
0x881C010B, // 002C GETMBR R7 R0 K11
0x201C0C07, // 002D NE R7 R6 R7
0x781E0003, // 002E JMPF R7 #0033
0x8C1C0107, // 002F GETMET R7 R0 K7
0x54260101, // 0030 LDINT R9 258
0x542A000A, // 0031 LDINT R10 11
0x7C1C0600, // 0032 CALL R7 3
0x90021606, // 0033 SETMBR R0 K11 R6
0x80000000, // 0034 RET 0
})
)
);
@ -653,16 +686,24 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Shutter,
6,
&be_class_Matter_Plugin_Device,
be_nested_map(19,
be_nested_map(20,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) },
{ be_const_key_weak(shadow_shutter_pos, 18), be_const_var(1) },
{ be_const_key_weak(tasmota_shutter_index, -1), be_const_var(0) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Shutter_parse_sensors_closure) },
{ be_const_key_weak(shadow_shutter_direction, -1), be_const_var(4) },
{ be_const_key_weak(shadow_shutter_target, -1), be_const_var(2) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Shutter_read_attribute_closure) },
{ be_const_key_weak(shadow_shutter_direction, 3), be_const_var(4) },
{ be_const_key_weak(shadow_shutter_pos, 0), be_const_var(1) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_closure) },
{ be_const_key_weak(shadow_shutter_inverted, 1), be_const_var(5) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Shutter_append_state_json_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Shutter_invoke_request_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_Shutter_parse_sensors_closure) },
{ be_const_key_weak(parse_configuration, 17), be_const_closure(Matter_Plugin_Shutter_parse_configuration_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(514, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(shadow_shutter_target, -1), be_const_var(2) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -729,20 +770,13 @@ be_local_class(Matter_Plugin_Shutter,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(update_shadow, 5), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) },
{ be_const_key_weak(NAME, 6), be_nested_str_weak(Shutter) },
{ be_const_key_weak(tasmota_shutter_index, 11), be_const_var(0) },
{ be_const_key_weak(NAME, 12), be_nested_str_weak(Shutter) },
{ be_const_key_weak(shadow_shutter_tilt, -1), be_const_var(3) },
{ be_const_key_weak(update_inverted, 8), be_const_closure(Matter_Plugin_Shutter_update_inverted_closure) },
{ be_const_key_weak(update_shadow, 18), be_const_closure(Matter_Plugin_Shutter_update_shadow_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(shutter) },
{ be_const_key_weak(shadow_shutter_inverted, -1), be_const_var(5) },
{ be_const_key_weak(ARG, 7), be_nested_str_weak(shutter) },
{ be_const_key_weak(shadow_shutter_tilt, 8), be_const_var(3) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Shutter_parse_configuration_closure) },
{ be_const_key_weak(update_inverted, -1), be_const_closure(Matter_Plugin_Shutter_update_inverted_closure) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Shutter__X3Clambda_X3E_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(514, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(shutter) },
})),
be_str_weak(Matter_Plugin_Shutter)
);

View File

@ -35,7 +35,7 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */
}),
be_str_weak(set_bri),
&be_const_str_solidified,
( &(const binstruction[56]) { /* code */
( &(const binstruction[65]) { /* code */
0x140C0300, // 0000 LT R3 R1 K0
0x780E0000, // 0001 JMPF R3 #0003
0x58040000, // 0002 LDCONST R1 K0
@ -43,55 +43,64 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */
0x240C0203, // 0004 GT R3 R1 R3
0x780E0000, // 0005 JMPF R3 #0007
0x540600FD, // 0006 LDINT R1 254
0x880C0101, // 0007 GETMBR R3 R0 K1
0x740E001A, // 0008 JMPT R3 #0024
0xA40E0400, // 0009 IMPORT R3 K2
0xB8120600, // 000A GETNGBL R4 K3
0x8C100904, // 000B GETMET R4 R4 K4
0x5C180200, // 000C MOVE R6 R1
0x581C0000, // 000D LDCONST R7 K0
0x542200FD, // 000E LDINT R8 254
0x58240000, // 000F LDCONST R9 K0
0x542A00FE, // 0010 LDINT R10 255
0x7C100C00, // 0011 CALL R4 6
0x4C140000, // 0012 LDNIL R5
0x1C140405, // 0013 EQ R5 R2 R5
0x78160005, // 0014 JMPF R5 #001B
0x8C140705, // 0015 GETMET R5 R3 K5
0x601C0013, // 0016 GETGBL R7 G19
0x7C1C0000, // 0017 CALL R7 0
0x981E0C04, // 0018 SETIDX R7 K6 R4
0x7C140400, // 0019 CALL R5 2
0x70020005, // 001A JMP #0021
0x8C140705, // 001B GETMET R5 R3 K5
0x601C0013, // 001C GETGBL R7 G19
0x7C1C0000, // 001D CALL R7 0
0x981E0C04, // 001E SETIDX R7 K6 R4
0x981E0E02, // 001F SETIDX R7 K7 R2
0x7C140400, // 0020 CALL R5 2
0x8C140108, // 0021 GETMET R5 R0 K8
0x7C140200, // 0022 CALL R5 1
0x70020012, // 0023 JMP #0037
0x4C0C0000, // 0024 LDNIL R3
0x200C0403, // 0025 NE R3 R2 R3
0x780E0007, // 0026 JMPF R3 #002F
0x880C0109, // 0027 GETMBR R3 R0 K9
0x200C0403, // 0028 NE R3 R2 R3
0x780E0004, // 0029 JMPF R3 #002F
0x8C0C010A, // 002A GETMET R3 R0 K10
0x54160005, // 002B LDINT R5 6
0x58180000, // 002C LDCONST R6 K0
0x7C0C0600, // 002D CALL R3 3
0x90021202, // 002E SETMBR R0 K9 R2
0x880C010B, // 002F GETMBR R3 R0 K11
0x200C0203, // 0030 NE R3 R1 R3
0x780E0004, // 0031 JMPF R3 #0037
0x8C0C010A, // 0032 GETMET R3 R0 K10
0x54160007, // 0033 LDINT R5 8
0x58180000, // 0034 LDCONST R6 K0
0x7C0C0600, // 0035 CALL R3 3
0x90021601, // 0036 SETMBR R0 K11 R1
0x80000000, // 0037 RET 0
0x4C0C0000, // 0007 LDNIL R3
0x200C0403, // 0008 NE R3 R2 R3
0x780E0003, // 0009 JMPF R3 #000E
0x600C0017, // 000A GETGBL R3 G23
0x5C100400, // 000B MOVE R4 R2
0x7C0C0200, // 000C CALL R3 1
0x70020000, // 000D JMP #000F
0x4C0C0000, // 000E LDNIL R3
0x5C080600, // 000F MOVE R2 R3
0x880C0101, // 0010 GETMBR R3 R0 K1
0x740E001A, // 0011 JMPT R3 #002D
0xA40E0400, // 0012 IMPORT R3 K2
0xB8120600, // 0013 GETNGBL R4 K3
0x8C100904, // 0014 GETMET R4 R4 K4
0x5C180200, // 0015 MOVE R6 R1
0x581C0000, // 0016 LDCONST R7 K0
0x542200FD, // 0017 LDINT R8 254
0x58240000, // 0018 LDCONST R9 K0
0x542A00FE, // 0019 LDINT R10 255
0x7C100C00, // 001A CALL R4 6
0x4C140000, // 001B LDNIL R5
0x1C140405, // 001C EQ R5 R2 R5
0x78160005, // 001D JMPF R5 #0024
0x8C140705, // 001E GETMET R5 R3 K5
0x601C0013, // 001F GETGBL R7 G19
0x7C1C0000, // 0020 CALL R7 0
0x981E0C04, // 0021 SETIDX R7 K6 R4
0x7C140400, // 0022 CALL R5 2
0x70020005, // 0023 JMP #002A
0x8C140705, // 0024 GETMET R5 R3 K5
0x601C0013, // 0025 GETGBL R7 G19
0x7C1C0000, // 0026 CALL R7 0
0x981E0C04, // 0027 SETIDX R7 K6 R4
0x981E0E02, // 0028 SETIDX R7 K7 R2
0x7C140400, // 0029 CALL R5 2
0x8C140108, // 002A GETMET R5 R0 K8
0x7C140200, // 002B CALL R5 1
0x70020012, // 002C JMP #0040
0x4C0C0000, // 002D LDNIL R3
0x200C0403, // 002E NE R3 R2 R3
0x780E0007, // 002F JMPF R3 #0038
0x880C0109, // 0030 GETMBR R3 R0 K9
0x200C0403, // 0031 NE R3 R2 R3
0x780E0004, // 0032 JMPF R3 #0038
0x8C0C010A, // 0033 GETMET R3 R0 K10
0x54160005, // 0034 LDINT R5 6
0x58180000, // 0035 LDCONST R6 K0
0x7C0C0600, // 0036 CALL R3 3
0x90021202, // 0037 SETMBR R0 K9 R2
0x880C010B, // 0038 GETMBR R3 R0 K11
0x200C0203, // 0039 NE R3 R1 R3
0x780E0004, // 003A JMPF R3 #0040
0x8C0C010A, // 003B GETMET R3 R0 K10
0x54160007, // 003C LDINT R5 8
0x58180000, // 003D LDCONST R6 K0
0x7C0C0600, // 003E CALL R3 3
0x90021601, // 003F SETMBR R0 K11 R1
0x80000000, // 0040 RET 0
})
)
);
@ -99,226 +108,51 @@ be_local_closure(Matter_Plugin_Light1_set_bri, /* name */
/********************************************************************
** Solidified function: read_attribute
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
be_local_closure(Matter_Plugin_Light1_update_virtual, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
8, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_nested_str_weak(shadow_bri),
/* K9 */ be_const_int(2),
/* K10 */ be_const_int(3),
/* K11 */ be_nested_str_weak(U4),
/* K12 */ be_const_int(1),
/* K13 */ be_nested_str_weak(read_attribute),
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(Bri),
/* K3 */ be_nested_str_weak(set_bri),
/* K4 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(read_attribute),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[79]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0007, // 0004 LDINT R7 8
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E003D, // 0006 JMPF R7 #0045
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E0005, // 000A JMPF R7 #0011
0x8C1C0706, // 000B GETMET R7 R3 K6
0x88240907, // 000C GETMBR R9 R4 K7
0x88280108, // 000D GETMBR R10 R0 K8
0x7C1C0600, // 000E CALL R7 3
0x80040E00, // 000F RET 1 R7
0x70020032, // 0010 JMP #0044
0x1C1C0D09, // 0011 EQ R7 R6 K9
0x781E0005, // 0012 JMPF R7 #0019
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240907, // 0014 GETMBR R9 R4 K7
0x58280005, // 0015 LDCONST R10 K5
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x7002002A, // 0018 JMP #0044
0x1C1C0D0A, // 0019 EQ R7 R6 K10
0x781E0005, // 001A JMPF R7 #0021
0x8C1C0706, // 001B GETMET R7 R3 K6
0x88240907, // 001C GETMBR R9 R4 K7
0x542A00FD, // 001D LDINT R10 254
0x7C1C0600, // 001E CALL R7 3
0x80040E00, // 001F RET 1 R7
0x70020022, // 0020 JMP #0044
0x541E000E, // 0021 LDINT R7 15
0x1C1C0C07, // 0022 EQ R7 R6 R7
0x781E0005, // 0023 JMPF R7 #002A
0x8C1C0706, // 0024 GETMET R7 R3 K6
0x88240907, // 0025 GETMBR R9 R4 K7
0x58280005, // 0026 LDCONST R10 K5
0x7C1C0600, // 0027 CALL R7 3
0x80040E00, // 0028 RET 1 R7
0x70020019, // 0029 JMP #0044
0x541E0010, // 002A LDINT R7 17
0x1C1C0C07, // 002B EQ R7 R6 R7
0x781E0005, // 002C JMPF R7 #0033
0x8C1C0706, // 002D GETMET R7 R3 K6
0x88240907, // 002E GETMBR R9 R4 K7
0x88280108, // 002F GETMBR R10 R0 K8
0x7C1C0600, // 0030 CALL R7 3
0x80040E00, // 0031 RET 1 R7
0x70020010, // 0032 JMP #0044
0x541EFFFB, // 0033 LDINT R7 65532
0x1C1C0C07, // 0034 EQ R7 R6 R7
0x781E0005, // 0035 JMPF R7 #003C
0x8C1C0706, // 0036 GETMET R7 R3 K6
0x8824090B, // 0037 GETMBR R9 R4 K11
0x5828000C, // 0038 LDCONST R10 K12
0x7C1C0600, // 0039 CALL R7 3
0x80040E00, // 003A RET 1 R7
0x70020007, // 003B JMP #0044
0x541EFFFC, // 003C LDINT R7 65533
0x1C1C0C07, // 003D EQ R7 R6 R7
0x781E0004, // 003E JMPF R7 #0044
0x8C1C0706, // 003F GETMET R7 R3 K6
0x8824090B, // 0040 GETMBR R9 R4 K11
0x542A0004, // 0041 LDINT R10 5
0x7C1C0600, // 0042 CALL R7 3
0x80040E00, // 0043 RET 1 R7
0x70020008, // 0044 JMP #004E
0x601C0003, // 0045 GETGBL R7 G3
0x5C200000, // 0046 MOVE R8 R0
0x7C1C0200, // 0047 CALL R7 1
0x8C1C0F0D, // 0048 GETMET R7 R7 K13
0x5C240200, // 0049 MOVE R9 R1
0x5C280400, // 004A MOVE R10 R2
0x5C2C0600, // 004B MOVE R11 R3
0x7C1C0800, // 004C CALL R7 4
0x80040E00, // 004D RET 1 R7
0x80000000, // 004E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
be_nested_proto(
11, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(light),
/* K2 */ be_nested_str_weak(get),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(bri),
/* K5 */ be_nested_str_weak(tasmota),
/* K6 */ be_nested_str_weak(scale_uint),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(shadow_bri),
/* K9 */ be_nested_str_weak(attribute_updated),
/* K10 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[38]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x7406001D, // 0001 JMPT R1 #0020
0xA4060200, // 0002 IMPORT R1 K1
0x8C080302, // 0003 GETMET R2 R1 K2
0x7C080200, // 0004 CALL R2 1
0x4C0C0000, // 0005 LDNIL R3
0x200C0403, // 0006 NE R3 R2 R3
0x780E0017, // 0007 JMPF R3 #0020
0x8C0C0503, // 0008 GETMET R3 R2 K3
0x58140004, // 0009 LDCONST R5 K4
0x4C180000, // 000A LDNIL R6
0x7C0C0600, // 000B CALL R3 3
0x4C100000, // 000C LDNIL R4
0x20100604, // 000D NE R4 R3 R4
0x78120010, // 000E JMPF R4 #0020
0xB8120A00, // 000F GETNGBL R4 K5
0x8C100906, // 0010 GETMET R4 R4 K6
0x5C180600, // 0011 MOVE R6 R3
0x581C0007, // 0012 LDCONST R7 K7
0x542200FE, // 0013 LDINT R8 255
0x58240007, // 0014 LDCONST R9 K7
0x542A00FD, // 0015 LDINT R10 254
0x7C100C00, // 0016 CALL R4 6
0x5C0C0800, // 0017 MOVE R3 R4
0x88100108, // 0018 GETMBR R4 R0 K8
0x20100604, // 0019 NE R4 R3 R4
0x78120004, // 001A JMPF R4 #0020
0x8C100109, // 001B GETMET R4 R0 K9
0x541A0007, // 001C LDINT R6 8
0x581C0007, // 001D LDCONST R7 K7
0x7C100600, // 001E CALL R4 3
0x90021003, // 001F SETMBR R0 K8 R3
0x60040003, // 0020 GETGBL R1 G3
0x5C080000, // 0021 MOVE R2 R0
0x7C040200, // 0022 CALL R1 1
0x8C04030A, // 0023 GETMET R1 R1 K10
0x7C040200, // 0024 CALL R1 1
0x80000000, // 0025 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light1_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_bri),
/* K2 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x80000000, // 0009 RET 0
( &(const binstruction[23]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x58100001, // 0001 LDCONST R4 K1
0x7C080400, // 0002 CALL R2 2
0x8C0C0300, // 0003 GETMET R3 R1 K0
0x58140002, // 0004 LDCONST R5 K2
0x7C0C0400, // 0005 CALL R3 2
0x4C100000, // 0006 LDNIL R4
0x20100604, // 0007 NE R4 R3 R4
0x78120006, // 0008 JMPF R4 #0010
0x8C100103, // 0009 GETMET R4 R0 K3
0x60180009, // 000A GETGBL R6 G9
0x5C1C0600, // 000B MOVE R7 R3
0x7C180200, // 000C CALL R6 1
0x5C1C0400, // 000D MOVE R7 R2
0x7C100600, // 000E CALL R4 3
0x80000800, // 000F RET 0
0x60100003, // 0010 GETGBL R4 G3
0x5C140000, // 0011 MOVE R5 R0
0x7C100200, // 0012 CALL R4 1
0x8C100904, // 0013 GETMET R4 R4 K4
0x5C180200, // 0014 MOVE R6 R1
0x7C100400, // 0015 CALL R4 2
0x80000000, // 0016 RET 0
})
)
);
@ -489,6 +323,268 @@ be_local_closure(Matter_Plugin_Light1_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(Matter_Plugin_Light1_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_bri),
/* K2 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x90020302, // 0008 SETMBR R0 K1 K2
0x80000000, // 0009 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light1_update_shadow, /* name */
be_nested_proto(
11, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(virtual),
/* K1 */ be_nested_str_weak(light),
/* K2 */ be_nested_str_weak(get),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(bri),
/* K5 */ be_nested_str_weak(tasmota),
/* K6 */ be_nested_str_weak(scale_uint),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(shadow_bri),
/* K9 */ be_nested_str_weak(attribute_updated),
/* K10 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[38]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x7406001D, // 0001 JMPT R1 #0020
0xA4060200, // 0002 IMPORT R1 K1
0x8C080302, // 0003 GETMET R2 R1 K2
0x7C080200, // 0004 CALL R2 1
0x4C0C0000, // 0005 LDNIL R3
0x200C0403, // 0006 NE R3 R2 R3
0x780E0017, // 0007 JMPF R3 #0020
0x8C0C0503, // 0008 GETMET R3 R2 K3
0x58140004, // 0009 LDCONST R5 K4
0x4C180000, // 000A LDNIL R6
0x7C0C0600, // 000B CALL R3 3
0x4C100000, // 000C LDNIL R4
0x20100604, // 000D NE R4 R3 R4
0x78120010, // 000E JMPF R4 #0020
0xB8120A00, // 000F GETNGBL R4 K5
0x8C100906, // 0010 GETMET R4 R4 K6
0x5C180600, // 0011 MOVE R6 R3
0x581C0007, // 0012 LDCONST R7 K7
0x542200FE, // 0013 LDINT R8 255
0x58240007, // 0014 LDCONST R9 K7
0x542A00FD, // 0015 LDINT R10 254
0x7C100C00, // 0016 CALL R4 6
0x5C0C0800, // 0017 MOVE R3 R4
0x88100108, // 0018 GETMBR R4 R0 K8
0x20100604, // 0019 NE R4 R3 R4
0x78120004, // 001A JMPF R4 #0020
0x8C100109, // 001B GETMET R4 R0 K9
0x541A0007, // 001C LDINT R6 8
0x581C0007, // 001D LDCONST R7 K7
0x7C100600, // 001E CALL R4 3
0x90021003, // 001F SETMBR R0 K8 R3
0x60040003, // 0020 GETGBL R1 G3
0x5C080000, // 0021 MOVE R2 R0
0x7C040200, // 0022 CALL R1 1
0x8C04030A, // 0023 GETMET R1 R1 K10
0x7C040200, // 0024 CALL R1 1
0x80000000, // 0025 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Light1_append_state_json, /* 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[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
/* K2 */ be_nested_str_weak(shadow_bri),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x88100102, // 0005 GETMBR R4 R0 K2
0x7C040600, // 0006 CALL R1 3
0x80040200, // 0007 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
be_local_closure(Matter_Plugin_Light1_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_nested_str_weak(shadow_bri),
/* K9 */ be_const_int(2),
/* K10 */ be_const_int(3),
/* K11 */ be_nested_str_weak(U4),
/* K12 */ be_const_int(1),
/* K13 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[79]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0007, // 0004 LDINT R7 8
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E003D, // 0006 JMPF R7 #0045
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E0005, // 000A JMPF R7 #0011
0x8C1C0706, // 000B GETMET R7 R3 K6
0x88240907, // 000C GETMBR R9 R4 K7
0x88280108, // 000D GETMBR R10 R0 K8
0x7C1C0600, // 000E CALL R7 3
0x80040E00, // 000F RET 1 R7
0x70020032, // 0010 JMP #0044
0x1C1C0D09, // 0011 EQ R7 R6 K9
0x781E0005, // 0012 JMPF R7 #0019
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240907, // 0014 GETMBR R9 R4 K7
0x58280005, // 0015 LDCONST R10 K5
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x7002002A, // 0018 JMP #0044
0x1C1C0D0A, // 0019 EQ R7 R6 K10
0x781E0005, // 001A JMPF R7 #0021
0x8C1C0706, // 001B GETMET R7 R3 K6
0x88240907, // 001C GETMBR R9 R4 K7
0x542A00FD, // 001D LDINT R10 254
0x7C1C0600, // 001E CALL R7 3
0x80040E00, // 001F RET 1 R7
0x70020022, // 0020 JMP #0044
0x541E000E, // 0021 LDINT R7 15
0x1C1C0C07, // 0022 EQ R7 R6 R7
0x781E0005, // 0023 JMPF R7 #002A
0x8C1C0706, // 0024 GETMET R7 R3 K6
0x88240907, // 0025 GETMBR R9 R4 K7
0x58280005, // 0026 LDCONST R10 K5
0x7C1C0600, // 0027 CALL R7 3
0x80040E00, // 0028 RET 1 R7
0x70020019, // 0029 JMP #0044
0x541E0010, // 002A LDINT R7 17
0x1C1C0C07, // 002B EQ R7 R6 R7
0x781E0005, // 002C JMPF R7 #0033
0x8C1C0706, // 002D GETMET R7 R3 K6
0x88240907, // 002E GETMBR R9 R4 K7
0x88280108, // 002F GETMBR R10 R0 K8
0x7C1C0600, // 0030 CALL R7 3
0x80040E00, // 0031 RET 1 R7
0x70020010, // 0032 JMP #0044
0x541EFFFB, // 0033 LDINT R7 65532
0x1C1C0C07, // 0034 EQ R7 R6 R7
0x781E0005, // 0035 JMPF R7 #003C
0x8C1C0706, // 0036 GETMET R7 R3 K6
0x8824090B, // 0037 GETMBR R9 R4 K11
0x5828000C, // 0038 LDCONST R10 K12
0x7C1C0600, // 0039 CALL R7 3
0x80040E00, // 003A RET 1 R7
0x70020007, // 003B JMP #0044
0x541EFFFC, // 003C LDINT R7 65533
0x1C1C0C07, // 003D EQ R7 R6 R7
0x781E0004, // 003E JMPF R7 #0044
0x8C1C0706, // 003F GETMET R7 R3 K6
0x8824090B, // 0040 GETMBR R9 R4 K11
0x542A0004, // 0041 LDINT R10 5
0x7C1C0600, // 0042 CALL R7 3
0x80040E00, // 0043 RET 1 R7
0x70020008, // 0044 JMP #004E
0x601C0003, // 0045 GETGBL R7 G3
0x5C200000, // 0046 MOVE R8 R0
0x7C1C0200, // 0047 CALL R7 1
0x8C1C0F0D, // 0048 GETMET R7 R7 K13
0x5C240200, // 0049 MOVE R9 R1
0x5C280400, // 004A MOVE R10 R2
0x5C2C0600, // 004B MOVE R11 R3
0x7C1C0800, // 004C CALL R7 4
0x80040E00, // 004D RET 1 R7
0x80000000, // 004E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light1
********************************************************************/
@ -496,15 +592,17 @@ extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_Light1,
1,
&be_class_Matter_Plugin_Light0,
be_nested_map(10,
be_nested_map(13,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(shadow_bri, 6), be_const_var(0) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light1_update_virtual_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light1_read_attribute_closure) },
{ be_const_key_weak(TYPE, 0), be_nested_str_weak(light1) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light1_append_state_json_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
{ be_const_key_weak(set_bri, 4), be_const_closure(Matter_Plugin_Light1_set_bri_closure) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
{ be_const_key_weak(shadow_bri, -1), be_const_var(0) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) },
{ be_const_key_weak(CLUSTERS, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(7,
@ -576,11 +674,17 @@ be_local_class(Matter_Plugin_Light1,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light1_init_closure) },
{ be_const_key_weak(TYPE, 8), be_nested_str_weak(light1) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light1_invoke_request_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light1_update_shadow_closure) },
{ be_const_key_weak(set_bri, 1), be_const_closure(Matter_Plugin_Light1_set_bri_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(2,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
})) ) } )) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Light1)
);

View File

@ -33,6 +33,88 @@ be_local_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(json),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(cmd),
/* K4 */ be_nested_str_weak(Status_X208),
/* K5 */ be_nested_str_weak(load),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(Switch),
/* K8 */ be_nested_str_weak(tasmota_switch_index),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_contact),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[45]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0xA4060200, // 0005 IMPORT R1 K1
0xB80A0400, // 0006 GETNGBL R2 K2
0x8C080503, // 0007 GETMET R2 R2 K3
0x58100004, // 0008 LDCONST R4 K4
0x50140200, // 0009 LDBOOL R5 1 0
0x7C080600, // 000A CALL R2 3
0x4C0C0000, // 000B LDNIL R3
0x200C0403, // 000C NE R3 R2 R3
0x780E001D, // 000D JMPF R3 #002C
0x8C0C0305, // 000E GETMET R3 R1 K5
0x5C140400, // 000F MOVE R5 R2
0x7C0C0400, // 0010 CALL R3 2
0x4C100000, // 0011 LDNIL R4
0x20100604, // 0012 NE R4 R3 R4
0x78120017, // 0013 JMPF R4 #002C
0x50100000, // 0014 LDBOOL R4 0 0
0x8C140706, // 0015 GETMET R5 R3 K6
0x601C0008, // 0016 GETGBL R7 G8
0x88200108, // 0017 GETMBR R8 R0 K8
0x7C1C0200, // 0018 CALL R7 1
0x001E0E07, // 0019 ADD R7 K7 R7
0x7C140400, // 001A CALL R5 2
0x1C140B09, // 001B EQ R5 R5 K9
0x5C100A00, // 001C MOVE R4 R5
0x8814010A, // 001D GETMBR R5 R0 K10
0x4C180000, // 001E LDNIL R6
0x20140A06, // 001F NE R5 R5 R6
0x78160009, // 0020 JMPF R5 #002B
0x8814010A, // 0021 GETMBR R5 R0 K10
0x60180017, // 0022 GETGBL R6 G23
0x5C1C0800, // 0023 MOVE R7 R4
0x7C180200, // 0024 CALL R6 1
0x20140A06, // 0025 NE R5 R5 R6
0x78160003, // 0026 JMPF R5 #002B
0x8C14010B, // 0027 GETMET R5 R0 K11
0x541E0044, // 0028 LDINT R7 69
0x5820000C, // 0029 LDCONST R8 K12
0x7C140600, // 002A CALL R5 3
0x90021404, // 002B SETMBR R0 K10 R4
0x80000000, // 002C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
@ -164,11 +246,11 @@ be_local_closure(Matter_Plugin_Sensor_Contact_read_attribute, /* name */
/********************************************************************
** Solidified function: update_shadow
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */
be_local_closure(Matter_Plugin_Sensor_Contact_append_state_json, /* name */
be_nested_proto(
9, /* nstack */
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -176,69 +258,20 @@ be_local_closure(Matter_Plugin_Sensor_Contact_update_shadow, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(json),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(cmd),
/* K4 */ be_nested_str_weak(Status_X208),
/* K5 */ be_nested_str_weak(load),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(Switch),
/* K8 */ be_nested_str_weak(tasmota_switch_index),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_contact),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Contact_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_contact),
}),
be_str_weak(update_shadow),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[45]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0xA4060200, // 0005 IMPORT R1 K1
0xB80A0400, // 0006 GETNGBL R2 K2
0x8C080503, // 0007 GETMET R2 R2 K3
0x58100004, // 0008 LDCONST R4 K4
0x50140200, // 0009 LDBOOL R5 1 0
0x7C080600, // 000A CALL R2 3
0x4C0C0000, // 000B LDNIL R3
0x200C0403, // 000C NE R3 R2 R3
0x780E001D, // 000D JMPF R3 #002C
0x8C0C0305, // 000E GETMET R3 R1 K5
0x5C140400, // 000F MOVE R5 R2
0x7C0C0400, // 0010 CALL R3 2
0x4C100000, // 0011 LDNIL R4
0x20100604, // 0012 NE R4 R3 R4
0x78120017, // 0013 JMPF R4 #002C
0x50100000, // 0014 LDBOOL R4 0 0
0x8C140706, // 0015 GETMET R5 R3 K6
0x601C0008, // 0016 GETGBL R7 G8
0x88200108, // 0017 GETMBR R8 R0 K8
0x7C1C0200, // 0018 CALL R7 1
0x001E0E07, // 0019 ADD R7 K7 R7
0x7C140400, // 001A CALL R5 2
0x1C140B09, // 001B EQ R5 R5 K9
0x5C100A00, // 001C MOVE R4 R5
0x8814010A, // 001D GETMBR R5 R0 K10
0x4C180000, // 001E LDNIL R6
0x20140A06, // 001F NE R5 R5 R6
0x78160009, // 0020 JMPF R5 #002B
0x8814010A, // 0021 GETMBR R5 R0 K10
0x60180017, // 0022 GETGBL R6 G23
0x5C1C0800, // 0023 MOVE R7 R4
0x7C180200, // 0024 CALL R6 1
0x20140A06, // 0025 NE R5 R5 R6
0x78160003, // 0026 JMPF R5 #002B
0x8C14010B, // 0027 GETMET R5 R0 K11
0x541E0044, // 0028 LDINT R7 69
0x5820000C, // 0029 LDCONST R8 K12
0x7C140600, // 002A CALL R5 3
0x90021404, // 002B SETMBR R0 K10 R4
0x80000000, // 002C RET 0
( &(const binstruction[ 7]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x7C040400, // 0005 CALL R1 2
0x80040200, // 0006 RET 1 R1
})
)
);
@ -252,18 +285,24 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Contact,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(13,
be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_contact, 5), be_const_var(1) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(shadow_contact, -1), be_const_var(1) },
{ be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) },
{ be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(ARG_HINT, 1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Contact) },
{ be_const_key_weak(parse_configuration, 8), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) },
{ be_const_key_weak(append_state_json, 9), be_const_closure(Matter_Plugin_Sensor_Contact_append_state_json_closure) },
{ be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Contact_parse_configuration_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Contact_update_shadow_closure) },
{ be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Contact) },
{ be_const_key_weak(tasmota_switch_index, 13), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(ARG_HINT, 6), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -323,12 +362,7 @@ be_local_class(Matter_Plugin_Sensor_Contact,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_Contact_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Contact)
);

View File

@ -6,6 +6,101 @@
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0004, // 0002 JMPF R2 #0008
0x60080009, // 0003 GETGBL R2 G9
0x540E0063, // 0004 LDINT R3 100
0x080C0203, // 0005 MUL R3 R1 R3
0x7C080200, // 0006 CALL R2 1
0x70020000, // 0007 JMP #0009
0x4C080000, // 0008 LDNIL R2
0x80040400, // 0009 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120404, // 0001 LDINT R4 1029
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_append_state_json, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Humidity_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x880C0101, // 0002 GETMBR R3 R0 K1
0x7C040400, // 0003 CALL R1 2
0x80040200, // 0004 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -115,70 +210,6 @@ be_local_closure(Matter_Plugin_Sensor_Humidity_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0004, // 0002 JMPF R2 #0008
0x60080009, // 0003 GETGBL R2 G9
0x540E0063, // 0004 LDINT R3 100
0x080C0203, // 0005 MUL R3 R1 R3
0x7C080200, // 0006 CALL R2 1
0x70020000, // 0007 JMP #0009
0x4C080000, // 0008 LDNIL R2
0x80040400, // 0009 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Humidity_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120404, // 0001 LDINT R4 1029
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Humidity
********************************************************************/
@ -186,11 +217,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(7,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Humidity_append_state_json_closure) },
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -251,14 +287,10 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(humidity) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
{ be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_value_changed_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);

View File

@ -6,6 +6,113 @@
extern const bclass be_class_Matter_Plugin_Sensor_Illuminance;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(math),
/* K1 */ be_const_int(0),
/* K2 */ be_nested_str_weak(log10),
/* K3 */ be_const_int(1),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x1C080202, // 0001 EQ R2 R1 R2
0x780A0001, // 0002 JMPF R2 #0005
0x4C080000, // 0003 LDNIL R2
0x80040400, // 0004 RET 1 R2
0xA40A0000, // 0005 IMPORT R2 K0
0x140C0301, // 0006 LT R3 R1 K1
0x780E0001, // 0007 JMPF R3 #000A
0x80060200, // 0008 RET 1 K1
0x70020005, // 0009 JMP #0010
0x8C0C0502, // 000A GETMET R3 R2 K2
0x00140303, // 000B ADD R5 R1 K3
0x7C0C0400, // 000C CALL R3 2
0x5412270F, // 000D LDINT R4 10000
0x080C0604, // 000E MUL R3 R3 R4
0x80040600, // 000F RET 1 R3
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x541203FF, // 0001 LDINT R4 1024
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_append_state_json, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Illuminance_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x880C0101, // 0002 GETMBR R3 R0 K1
0x7C040400, // 0003 CALL R1 2
0x80040200, // 0004 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -115,82 +222,6 @@ be_local_closure(Matter_Plugin_Sensor_Illuminance_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(math),
/* K1 */ be_const_int(0),
/* K2 */ be_nested_str_weak(log10),
/* K3 */ be_const_int(1),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x1C080202, // 0001 EQ R2 R1 R2
0x780A0001, // 0002 JMPF R2 #0005
0x4C080000, // 0003 LDNIL R2
0x80040400, // 0004 RET 1 R2
0xA40A0000, // 0005 IMPORT R2 K0
0x140C0301, // 0006 LT R3 R1 K1
0x780E0001, // 0007 JMPF R3 #000A
0x80060200, // 0008 RET 1 K1
0x70020005, // 0009 JMP #0010
0x8C0C0502, // 000A GETMET R3 R2 K2
0x00140303, // 000B ADD R5 R1 K3
0x7C0C0400, // 000C CALL R3 2
0x5412270F, // 000D LDINT R4 10000
0x080C0604, // 000E MUL R3 R3 R4
0x80040600, // 000F RET 1 R3
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Illuminance_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x541203FF, // 0001 LDINT R4 1024
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Illuminance
********************************************************************/
@ -198,11 +229,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(7,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Illuminance_append_state_json_closure) },
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -263,14 +299,10 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(illuminance) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
{ be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Illuminance)
);

View File

@ -6,6 +6,39 @@
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Occupancy_append_state_json, /* 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[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Occupancy_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x7C040400, // 0005 CALL R1 2
0x80040200, // 0006 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
@ -74,6 +107,84 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name *
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(cmd),
/* K5 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(StatusSNS),
/* K8 */ be_nested_str_weak(contains),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_occupancy),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x60040008, // 0005 GETGBL R1 G8
0x88080102, // 0006 GETMBR R2 R0 K2
0x7C040200, // 0007 CALL R1 1
0x00060201, // 0008 ADD R1 K1 R1
0xB80A0600, // 0009 GETNGBL R2 K3
0x8C080504, // 000A GETMET R2 R2 K4
0x58100005, // 000B LDCONST R4 K5
0x50140200, // 000C LDBOOL R5 1 0
0x7C080600, // 000D CALL R2 3
0x4C0C0000, // 000E LDNIL R3
0x200C0403, // 000F NE R3 R2 R3
0x780E0003, // 0010 JMPF R3 #0015
0x8C0C0506, // 0011 GETMET R3 R2 K6
0x58140007, // 0012 LDCONST R5 K7
0x7C0C0400, // 0013 CALL R3 2
0x5C080600, // 0014 MOVE R2 R3
0x4C0C0000, // 0015 LDNIL R3
0x200C0403, // 0016 NE R3 R2 R3
0x780E000F, // 0017 JMPF R3 #0028
0x8C0C0508, // 0018 GETMET R3 R2 K8
0x5C140200, // 0019 MOVE R5 R1
0x7C0C0400, // 001A CALL R3 2
0x780E000B, // 001B JMPF R3 #0028
0x8C0C0506, // 001C GETMET R3 R2 K6
0x5C140200, // 001D MOVE R5 R1
0x7C0C0400, // 001E CALL R3 2
0x1C0C0709, // 001F EQ R3 R3 K9
0x8810010A, // 0020 GETMBR R4 R0 K10
0x20100803, // 0021 NE R4 R4 R3
0x78120003, // 0022 JMPF R4 #0027
0x8C10010B, // 0023 GETMET R4 R0 K11
0x541A0405, // 0024 LDINT R6 1030
0x581C000C, // 0025 LDCONST R7 K12
0x7C100600, // 0026 CALL R4 3
0x90021403, // 0027 SETMBR R0 K10 R3
0x80000000, // 0028 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -181,84 +292,6 @@ be_local_closure(Matter_Plugin_Sensor_Occupancy_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(cmd),
/* K5 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(StatusSNS),
/* K8 */ be_nested_str_weak(contains),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_occupancy),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x60040008, // 0005 GETGBL R1 G8
0x88080102, // 0006 GETMBR R2 R0 K2
0x7C040200, // 0007 CALL R1 1
0x00060201, // 0008 ADD R1 K1 R1
0xB80A0600, // 0009 GETNGBL R2 K3
0x8C080504, // 000A GETMET R2 R2 K4
0x58100005, // 000B LDCONST R4 K5
0x50140200, // 000C LDBOOL R5 1 0
0x7C080600, // 000D CALL R2 3
0x4C0C0000, // 000E LDNIL R3
0x200C0403, // 000F NE R3 R2 R3
0x780E0003, // 0010 JMPF R3 #0015
0x8C0C0506, // 0011 GETMET R3 R2 K6
0x58140007, // 0012 LDCONST R5 K7
0x7C0C0400, // 0013 CALL R3 2
0x5C080600, // 0014 MOVE R2 R3
0x4C0C0000, // 0015 LDNIL R3
0x200C0403, // 0016 NE R3 R2 R3
0x780E000F, // 0017 JMPF R3 #0028
0x8C0C0508, // 0018 GETMET R3 R2 K8
0x5C140200, // 0019 MOVE R5 R1
0x7C0C0400, // 001A CALL R3 2
0x780E000B, // 001B JMPF R3 #0028
0x8C0C0506, // 001C GETMET R3 R2 K6
0x5C140200, // 001D MOVE R5 R1
0x7C0C0400, // 001E CALL R3 2
0x1C0C0709, // 001F EQ R3 R3 K9
0x8810010A, // 0020 GETMBR R4 R0 K10
0x20100803, // 0021 NE R4 R4 R3
0x78120003, // 0022 JMPF R4 #0027
0x8C10010B, // 0023 GETMET R4 R0 K11
0x541A0405, // 0024 LDINT R6 1030
0x581C000C, // 0025 LDCONST R7 K12
0x7C100600, // 0026 CALL R4 3
0x90021403, // 0027 SETMBR R0 K10 R3
0x80000000, // 0028 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Occupancy
********************************************************************/
@ -266,19 +299,9 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Occupancy,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(13,
be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) },
{ be_const_key_weak(ARG_HINT, 1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) },
{ be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) },
{ be_const_key_weak(shadow_occupancy, 8), be_const_var(1) },
{ be_const_key_weak(update_shadow, 5), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) },
{ be_const_key_weak(NAME, 6), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -339,12 +362,23 @@ be_local_class(Matter_Plugin_Sensor_Occupancy,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, 9), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_append_state_json_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_read_attribute_closure) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_Occupancy_update_shadow_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(tasmota_switch_index, 12), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(263, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(parse_configuration, 6), be_const_closure(Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) },
{ be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) },
{ be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin_Sensor_Occupancy)
);

View File

@ -33,6 +33,84 @@ be_local_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(cmd),
/* K5 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(StatusSNS),
/* K8 */ be_nested_str_weak(contains),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_onoff),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x60040008, // 0005 GETGBL R1 G8
0x88080102, // 0006 GETMBR R2 R0 K2
0x7C040200, // 0007 CALL R1 1
0x00060201, // 0008 ADD R1 K1 R1
0xB80A0600, // 0009 GETNGBL R2 K3
0x8C080504, // 000A GETMET R2 R2 K4
0x58100005, // 000B LDCONST R4 K5
0x50140200, // 000C LDBOOL R5 1 0
0x7C080600, // 000D CALL R2 3
0x4C0C0000, // 000E LDNIL R3
0x200C0403, // 000F NE R3 R2 R3
0x780E0003, // 0010 JMPF R3 #0015
0x8C0C0506, // 0011 GETMET R3 R2 K6
0x58140007, // 0012 LDCONST R5 K7
0x7C0C0400, // 0013 CALL R3 2
0x5C080600, // 0014 MOVE R2 R3
0x4C0C0000, // 0015 LDNIL R3
0x200C0403, // 0016 NE R3 R2 R3
0x780E000F, // 0017 JMPF R3 #0028
0x8C0C0508, // 0018 GETMET R3 R2 K8
0x5C140200, // 0019 MOVE R5 R1
0x7C0C0400, // 001A CALL R3 2
0x780E000B, // 001B JMPF R3 #0028
0x8C0C0506, // 001C GETMET R3 R2 K6
0x5C140200, // 001D MOVE R5 R1
0x7C0C0400, // 001E CALL R3 2
0x1C0C0709, // 001F EQ R3 R3 K9
0x8810010A, // 0020 GETMBR R4 R0 K10
0x20100803, // 0021 NE R4 R4 R3
0x78120003, // 0022 JMPF R4 #0027
0x8C10010B, // 0023 GETMET R4 R0 K11
0x541A0005, // 0024 LDINT R6 6
0x581C000C, // 0025 LDCONST R7 K12
0x7C100600, // 0026 CALL R4 3
0x90021403, // 0027 SETMBR R0 K10 R3
0x80000000, // 0028 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
@ -155,11 +233,11 @@ be_local_closure(Matter_Plugin_Sensor_OnOff_read_attribute, /* name */
/********************************************************************
** Solidified function: update_shadow
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */
be_local_closure(Matter_Plugin_Sensor_OnOff_append_state_json, /* name */
be_nested_proto(
8, /* nstack */
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -167,65 +245,20 @@ be_local_closure(Matter_Plugin_Sensor_OnOff_update_shadow, /* name */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(cmd),
/* K5 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(StatusSNS),
/* K8 */ be_nested_str_weak(contains),
/* K9 */ be_nested_str_weak(ON),
/* K10 */ be_nested_str_weak(shadow_onoff),
/* K11 */ be_nested_str_weak(attribute_updated),
/* K12 */ be_const_int(0),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22OnOff_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(update_shadow),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x60040008, // 0005 GETGBL R1 G8
0x88080102, // 0006 GETMBR R2 R0 K2
0x7C040200, // 0007 CALL R1 1
0x00060201, // 0008 ADD R1 K1 R1
0xB80A0600, // 0009 GETNGBL R2 K3
0x8C080504, // 000A GETMET R2 R2 K4
0x58100005, // 000B LDCONST R4 K5
0x50140200, // 000C LDBOOL R5 1 0
0x7C080600, // 000D CALL R2 3
0x4C0C0000, // 000E LDNIL R3
0x200C0403, // 000F NE R3 R2 R3
0x780E0003, // 0010 JMPF R3 #0015
0x8C0C0506, // 0011 GETMET R3 R2 K6
0x58140007, // 0012 LDCONST R5 K7
0x7C0C0400, // 0013 CALL R3 2
0x5C080600, // 0014 MOVE R2 R3
0x4C0C0000, // 0015 LDNIL R3
0x200C0403, // 0016 NE R3 R2 R3
0x780E000F, // 0017 JMPF R3 #0028
0x8C0C0508, // 0018 GETMET R3 R2 K8
0x5C140200, // 0019 MOVE R5 R1
0x7C0C0400, // 001A CALL R3 2
0x780E000B, // 001B JMPF R3 #0028
0x8C0C0506, // 001C GETMET R3 R2 K6
0x5C140200, // 001D MOVE R5 R1
0x7C0C0400, // 001E CALL R3 2
0x1C0C0709, // 001F EQ R3 R3 K9
0x8810010A, // 0020 GETMBR R4 R0 K10
0x20100803, // 0021 NE R4 R4 R3
0x78120003, // 0022 JMPF R4 #0027
0x8C10010B, // 0023 GETMET R4 R0 K11
0x541A0005, // 0024 LDINT R6 6
0x581C000C, // 0025 LDCONST R7 K12
0x7C100600, // 0026 CALL R4 3
0x90021403, // 0027 SETMBR R0 K10 R3
0x80000000, // 0028 RET 0
( &(const binstruction[ 7]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x600C0009, // 0002 GETGBL R3 G9
0x88100101, // 0003 GETMBR R4 R0 K1
0x7C0C0200, // 0004 CALL R3 1
0x7C040400, // 0005 CALL R1 2
0x80040200, // 0006 RET 1 R1
})
)
);
@ -239,19 +272,9 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_OnOff,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(13,
be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, 8), be_nested_str_weak(switch) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) },
{ be_const_key_weak(ARG_TYPE, 1), be_const_static_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_update_shadow_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(OnOff_X20Sensor) },
{ be_const_key_weak(parse_configuration, 5), be_const_closure(Matter_Plugin_Sensor_OnOff_parse_configuration_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -310,12 +333,23 @@ be_local_class(Matter_Plugin_Sensor_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Sensor_OnOff_read_attribute_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) },
{ be_const_key_weak(append_state_json, 12), be_const_closure(Matter_Plugin_Sensor_OnOff_append_state_json_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_read_attribute_closure) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_update_shadow_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(OnOff_X20Sensor) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(Matter_Plugin_Sensor_OnOff_parse_configuration_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(2128, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(tasmota_switch_index, 13), be_const_var(0) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_OnOff)
);

View File

@ -6,6 +6,100 @@
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0003, // 0002 JMPF R2 #0007
0x60080009, // 0003 GETGBL R2 G9
0x5C0C0200, // 0004 MOVE R3 R1
0x7C080200, // 0005 CALL R2 1
0x70020000, // 0006 JMP #0008
0x4C080000, // 0007 LDNIL R2
0x80040400, // 0008 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120402, // 0001 LDINT R4 1027
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_append_state_json, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Pressure_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x880C0101, // 0002 GETMBR R3 R0 K1
0x7C040400, // 0003 CALL R1 2
0x80040200, // 0004 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -115,69 +209,6 @@ be_local_closure(Matter_Plugin_Sensor_Pressure_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0003, // 0002 JMPF R2 #0007
0x60080009, // 0003 GETGBL R2 G9
0x5C0C0200, // 0004 MOVE R3 R1
0x7C080200, // 0005 CALL R2 1
0x70020000, // 0006 JMP #0008
0x4C080000, // 0007 LDNIL R2
0x80040400, // 0008 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Pressure_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120402, // 0001 LDINT R4 1027
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Pressure
********************************************************************/
@ -185,11 +216,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(7,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Pressure_append_state_json_closure) },
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -250,14 +286,10 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(pressure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
{ be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_value_changed_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);

View File

@ -6,6 +6,116 @@
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* 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_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_const_int(1),
/* K3 */ be_const_real_hex(0x3FE66666),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x54120007, // 0002 LDINT R4 8
0x7C080400, // 0003 CALL R2 2
0x1C080502, // 0004 EQ R2 R2 K2
0x780A0003, // 0005 JMPF R2 #000A
0x540A001F, // 0006 LDINT R2 32
0x04080202, // 0007 SUB R2 R1 R2
0x0C080503, // 0008 DIV R2 R2 K3
0x5C040400, // 0009 MOVE R1 R2
0x4C080000, // 000A LDNIL R2
0x20080202, // 000B NE R2 R1 R2
0x780A0004, // 000C JMPF R2 #0012
0x60080009, // 000D GETGBL R2 G9
0x540E0063, // 000E LDINT R3 100
0x080C0203, // 000F MUL R3 R1 R3
0x7C080200, // 0010 CALL R2 1
0x70020000, // 0011 JMP #0013
0x4C080000, // 0012 LDNIL R2
0x80040400, // 0013 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120401, // 0001 LDINT R4 1026
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_append_state_json, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Temperature_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x60040018, // 0000 GETGBL R1 G24
0x58080000, // 0001 LDCONST R2 K0
0x880C0101, // 0002 GETMBR R3 R0 K1
0x7C040400, // 0003 CALL R1 2
0x80040200, // 0004 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -112,85 +222,6 @@ be_local_closure(Matter_Plugin_Sensor_Temp_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_pre_value, /* 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_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_const_int(1),
/* K3 */ be_const_real_hex(0x3FE66666),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x54120007, // 0002 LDINT R4 8
0x7C080400, // 0003 CALL R2 2
0x1C080502, // 0004 EQ R2 R2 K2
0x780A0003, // 0005 JMPF R2 #000A
0x540A001F, // 0006 LDINT R2 32
0x04080202, // 0007 SUB R2 R1 R2
0x0C080503, // 0008 DIV R2 R2 K3
0x5C040400, // 0009 MOVE R1 R2
0x4C080000, // 000A LDNIL R2
0x20080202, // 000B NE R2 R1 R2
0x780A0004, // 000C JMPF R2 #0012
0x60080009, // 000D GETGBL R2 G9
0x540E0063, // 000E LDINT R3 100
0x080C0203, // 000F MUL R3 R1 R3
0x7C080200, // 0010 CALL R2 1
0x70020000, // 0011 JMP #0013
0x4C080000, // 0012 LDNIL R2
0x80040400, // 0013 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
be_local_closure(Matter_Plugin_Sensor_Temp_value_changed, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x54120401, // 0001 LDINT R4 1026
0x58140001, // 0002 LDCONST R5 K1
0x7C080600, // 0003 CALL R2 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Temp
********************************************************************/
@ -198,11 +229,16 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Temp,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(7,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(read_attribute, 2), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(pre_value, 4), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(pre_value, -1), be_const_closure(Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Sensor_Temp_append_state_json_closure) },
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -263,14 +299,10 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(temperature) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
{ be_const_key_weak(value_changed, 4), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(value_changed, -1), be_const_closure(Matter_Plugin_Sensor_Temp_value_changed_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Sensor_Temp_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);

View File

@ -76,132 +76,6 @@ be_local_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
be_nested_proto(
18, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[23]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(update_tilt_min_max),
/* K9 */ be_nested_str_weak(tilt_min),
/* K10 */ be_nested_str_weak(tilt_max),
/* K11 */ be_nested_str_weak(tasmota),
/* K12 */ be_nested_str_weak(scale_uint),
/* K13 */ be_nested_str_weak(cmd),
/* K14 */ be_nested_str_weak(ShutterTilt),
/* K15 */ be_nested_str_weak(tasmota_shutter_index),
/* K16 */ be_const_int(1),
/* K17 */ be_nested_str_weak(_X20),
/* K18 */ be_nested_str_weak(update_shadow),
/* K19 */ be_nested_str_weak(log),
/* K20 */ be_nested_str_weak(tilt_X25_X3A),
/* K21 */ be_nested_str_weak(tilt_X25_X28no_tilt_support_X29_X3A),
/* K22 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[79]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220101, // 0005 LDINT R8 258
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822003D, // 0007 JMPF R8 #0046
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220007, // 000A LDINT R8 8
0x1C200E08, // 000B EQ R8 R7 R8
0x78220038, // 000C JMPF R8 #0046
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x4C240000, // 0010 LDNIL R9
0x20241009, // 0011 NE R9 R8 R9
0x78260030, // 0012 JMPF R9 #0044
0x8C240108, // 0013 GETMET R9 R0 K8
0x7C240200, // 0014 CALL R9 1
0x88240109, // 0015 GETMBR R9 R0 K9
0x4C280000, // 0016 LDNIL R10
0x2024120A, // 0017 NE R9 R9 R10
0x78260025, // 0018 JMPF R9 #003F
0x8824010A, // 0019 GETMBR R9 R0 K10
0x4C280000, // 001A LDNIL R10
0x2024120A, // 001B NE R9 R9 R10
0x78260021, // 001C JMPF R9 #003F
0x88240109, // 001D GETMBR R9 R0 K9
0xB82A1600, // 001E GETNGBL R10 K11
0x8C28150C, // 001F GETMET R10 R10 K12
0x5C301000, // 0020 MOVE R12 R8
0x58340007, // 0021 LDCONST R13 K7
0x543A270F, // 0022 LDINT R14 10000
0x583C0007, // 0023 LDCONST R15 K7
0x8840010A, // 0024 GETMBR R16 R0 K10
0x88440109, // 0025 GETMBR R17 R0 K9
0x04402011, // 0026 SUB R16 R16 R17
0x7C280C00, // 0027 CALL R10 6
0x0024120A, // 0028 ADD R9 R9 R10
0xB82A1600, // 0029 GETNGBL R10 K11
0x8C28150D, // 002A GETMET R10 R10 K13
0x60300008, // 002B GETGBL R12 G8
0x8834010F, // 002C GETMBR R13 R0 K15
0x00341B10, // 002D ADD R13 R13 K16
0x7C300200, // 002E CALL R12 1
0x00321C0C, // 002F ADD R12 K14 R12
0x00301911, // 0030 ADD R12 R12 K17
0x60340008, // 0031 GETGBL R13 G8
0x5C381200, // 0032 MOVE R14 R9
0x7C340200, // 0033 CALL R13 1
0x0030180D, // 0034 ADD R12 R12 R13
0x50340000, // 0035 LDBOOL R13 0 0
0x7C280600, // 0036 CALL R10 3
0x8C280112, // 0037 GETMET R10 R0 K18
0x7C280200, // 0038 CALL R10 1
0x60280008, // 0039 GETGBL R10 G8
0x5C2C1000, // 003A MOVE R11 R8
0x7C280200, // 003B CALL R10 1
0x002A280A, // 003C ADD R10 K20 R10
0x900E260A, // 003D SETMBR R3 K19 R10
0x70020004, // 003E JMP #0044
0x60240008, // 003F GETGBL R9 G8
0x5C281000, // 0040 MOVE R10 R8
0x7C240200, // 0041 CALL R9 1
0x00262A09, // 0042 ADD R9 K21 R9
0x900E2609, // 0043 SETMBR R3 K19 R9
0x50240200, // 0044 LDBOOL R9 1 0
0x80041200, // 0045 RET 1 R9
0x60200003, // 0046 GETGBL R8 G3
0x5C240000, // 0047 MOVE R9 R0
0x7C200200, // 0048 CALL R8 1
0x8C201116, // 0049 GETMET R8 R8 K22
0x5C280200, // 004A MOVE R10 R1
0x5C2C0400, // 004B MOVE R11 R2
0x5C300600, // 004C MOVE R12 R3
0x7C200800, // 004D CALL R8 4
0x80041000, // 004E RET 1 R8
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -359,6 +233,167 @@ be_local_closure(Matter_Plugin_ShutterTilt_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_append_state_json, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22ShutterPos_X22_X3A_X25s_X2C_X22ShutterTarget_X22_X3A_X25s_X2C_X22ShutterTilt_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_shutter_pos),
/* K2 */ be_nested_str_weak(shadow_shutter_target),
/* K3 */ be_nested_str_weak(shadow_shutter_tilt),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x60080018, // 0000 GETGBL R2 G24
0x580C0000, // 0001 LDCONST R3 K0
0x88100101, // 0002 GETMBR R4 R0 K1
0x88140102, // 0003 GETMBR R5 R0 K2
0x88180103, // 0004 GETMBR R6 R0 K3
0x7C080800, // 0005 CALL R2 4
0x80040400, // 0006 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_ShutterTilt_invoke_request, /* name */
be_nested_proto(
18, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[23]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(update_tilt_min_max),
/* K9 */ be_nested_str_weak(tilt_min),
/* K10 */ be_nested_str_weak(tilt_max),
/* K11 */ be_nested_str_weak(tasmota),
/* K12 */ be_nested_str_weak(scale_uint),
/* K13 */ be_nested_str_weak(cmd),
/* K14 */ be_nested_str_weak(ShutterTilt),
/* K15 */ be_nested_str_weak(tasmota_shutter_index),
/* K16 */ be_const_int(1),
/* K17 */ be_nested_str_weak(_X20),
/* K18 */ be_nested_str_weak(update_shadow),
/* K19 */ be_nested_str_weak(log),
/* K20 */ be_nested_str_weak(tilt_X25_X3A),
/* K21 */ be_nested_str_weak(tilt_X25_X28no_tilt_support_X29_X3A),
/* K22 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[79]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x54220101, // 0005 LDINT R8 258
0x1C200C08, // 0006 EQ R8 R6 R8
0x7822003D, // 0007 JMPF R8 #0046
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220007, // 000A LDINT R8 8
0x1C200E08, // 000B EQ R8 R7 R8
0x78220038, // 000C JMPF R8 #0046
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x4C240000, // 0010 LDNIL R9
0x20241009, // 0011 NE R9 R8 R9
0x78260030, // 0012 JMPF R9 #0044
0x8C240108, // 0013 GETMET R9 R0 K8
0x7C240200, // 0014 CALL R9 1
0x88240109, // 0015 GETMBR R9 R0 K9
0x4C280000, // 0016 LDNIL R10
0x2024120A, // 0017 NE R9 R9 R10
0x78260025, // 0018 JMPF R9 #003F
0x8824010A, // 0019 GETMBR R9 R0 K10
0x4C280000, // 001A LDNIL R10
0x2024120A, // 001B NE R9 R9 R10
0x78260021, // 001C JMPF R9 #003F
0x88240109, // 001D GETMBR R9 R0 K9
0xB82A1600, // 001E GETNGBL R10 K11
0x8C28150C, // 001F GETMET R10 R10 K12
0x5C301000, // 0020 MOVE R12 R8
0x58340007, // 0021 LDCONST R13 K7
0x543A270F, // 0022 LDINT R14 10000
0x583C0007, // 0023 LDCONST R15 K7
0x8840010A, // 0024 GETMBR R16 R0 K10
0x88440109, // 0025 GETMBR R17 R0 K9
0x04402011, // 0026 SUB R16 R16 R17
0x7C280C00, // 0027 CALL R10 6
0x0024120A, // 0028 ADD R9 R9 R10
0xB82A1600, // 0029 GETNGBL R10 K11
0x8C28150D, // 002A GETMET R10 R10 K13
0x60300008, // 002B GETGBL R12 G8
0x8834010F, // 002C GETMBR R13 R0 K15
0x00341B10, // 002D ADD R13 R13 K16
0x7C300200, // 002E CALL R12 1
0x00321C0C, // 002F ADD R12 K14 R12
0x00301911, // 0030 ADD R12 R12 K17
0x60340008, // 0031 GETGBL R13 G8
0x5C381200, // 0032 MOVE R14 R9
0x7C340200, // 0033 CALL R13 1
0x0030180D, // 0034 ADD R12 R12 R13
0x50340000, // 0035 LDBOOL R13 0 0
0x7C280600, // 0036 CALL R10 3
0x8C280112, // 0037 GETMET R10 R0 K18
0x7C280200, // 0038 CALL R10 1
0x60280008, // 0039 GETGBL R10 G8
0x5C2C1000, // 003A MOVE R11 R8
0x7C280200, // 003B CALL R10 1
0x002A280A, // 003C ADD R10 K20 R10
0x900E260A, // 003D SETMBR R3 K19 R10
0x70020004, // 003E JMP #0044
0x60240008, // 003F GETGBL R9 G8
0x5C281000, // 0040 MOVE R10 R8
0x7C240200, // 0041 CALL R9 1
0x00262A09, // 0042 ADD R9 K21 R9
0x900E2609, // 0043 SETMBR R3 K19 R9
0x50240200, // 0044 LDBOOL R9 1 0
0x80041200, // 0045 RET 1 R9
0x60200003, // 0046 GETGBL R8 G3
0x5C240000, // 0047 MOVE R9 R0
0x7C200200, // 0048 CALL R8 1
0x8C201116, // 0049 GETMET R8 R8 K22
0x5C280200, // 004A MOVE R10 R1
0x5C2C0400, // 004B MOVE R11 R2
0x5C300600, // 004C MOVE R12 R3
0x7C200800, // 004D CALL R8 4
0x80041000, // 004E RET 1 R8
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
@ -430,13 +465,13 @@ extern const bclass be_class_Matter_Plugin_Shutter;
be_local_class(Matter_Plugin_ShutterTilt,
2,
&be_class_Matter_Plugin_Shutter,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_tilt_min_max, -1), be_const_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(shutter_X2Btilt) },
{ be_const_key_weak(update_tilt_min_max, 0), be_const_closure(Matter_Plugin_ShutterTilt_update_tilt_min_max_closure) },
{ be_const_key_weak(parse_sensors, 7), be_const_closure(Matter_Plugin_ShutterTilt_parse_sensors_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(Matter_Plugin_ShutterTilt_parse_sensors_closure) },
{ be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(258, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -506,10 +541,11 @@ be_local_class(Matter_Plugin_ShutterTilt,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(tilt_min, -1), be_const_var(0) },
{ be_const_key_weak(append_state_json, 3), be_const_closure(Matter_Plugin_ShutterTilt_append_state_json_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_ShutterTilt_invoke_request_closure) },
{ be_const_key_weak(tilt_min, 2), be_const_var(0) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_ShutterTilt_read_attribute_closure) },
{ be_const_key_weak(tilt_max, -1), be_const_var(1) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Shutter_X20_X2B_X20Tilt) },
{ be_const_key_weak(tilt_max, 1), be_const_var(1) },
})),
be_str_weak(Matter_Plugin_ShutterTilt)
);

View File

@ -6,6 +6,89 @@
extern const bclass be_class_Matter_Plugin_Light2;
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_Light2_update_virtual, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(CT),
/* K2 */ be_nested_str_weak(set_ct),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0300, // 0001 GETMET R3 R1 K0
0x58140001, // 0002 LDCONST R5 K1
0x7C0C0400, // 0003 CALL R3 2
0x7C080200, // 0004 CALL R2 1
0x4C0C0000, // 0005 LDNIL R3
0x200C0403, // 0006 NE R3 R2 R3
0x780E0002, // 0007 JMPF R3 #000B
0x8C0C0102, // 0008 GETMET R3 R0 K2
0x5C140400, // 0009 MOVE R5 R2
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Light2_append_state_json, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s_X2C_X22CT_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
/* K2 */ be_nested_str_weak(shadow_bri),
/* K3 */ be_nested_str_weak(shadow_ct),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x60080018, // 0000 GETGBL R2 G24
0x580C0000, // 0001 LDCONST R3 K0
0x60100009, // 0002 GETGBL R4 G9
0x88140101, // 0003 GETMBR R5 R0 K1
0x7C100200, // 0004 CALL R4 1
0x88140102, // 0005 GETMBR R5 R0 K2
0x88180103, // 0006 GETMBR R6 R0 K3
0x7C080800, // 0007 CALL R2 4
0x80040400, // 0008 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
@ -107,146 +190,6 @@ be_local_closure(Matter_Plugin_Light2_set_ct, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_ct_minmax
********************************************************************/
be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
be_nested_proto(
4, /* 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(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_nested_str_weak(ct_min),
/* K3 */ be_nested_str_weak(ct_max),
}),
be_str_weak(update_ct_minmax),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x540E0051, // 0002 LDINT R3 82
0x7C040400, // 0003 CALL R1 2
0x78060001, // 0004 JMPF R1 #0007
0x540A00C7, // 0005 LDINT R2 200
0x70020000, // 0006 JMP #0008
0x540A0098, // 0007 LDINT R2 153
0x90020402, // 0008 SETMBR R0 K2 R2
0x78060001, // 0009 JMPF R1 #000C
0x540A017B, // 000A LDINT R2 380
0x70020000, // 000B JMP #000D
0x540A01F3, // 000C LDINT R2 500
0x90020602, // 000D SETMBR R0 K3 R2
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Light2_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[14]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(set_ct),
/* K9 */ be_nested_str_weak(log),
/* K10 */ be_nested_str_weak(ct_X3A),
/* K11 */ be_nested_str_weak(publish_command),
/* K12 */ be_nested_str_weak(CT),
/* K13 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[59]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
0x78220028, // 0007 JMPF R8 #0031
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220009, // 000A LDINT R8 10
0x1C200E08, // 000B EQ R8 R7 R8
0x78220011, // 000C JMPF R8 #001F
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x8C240108, // 0010 GETMET R9 R0 K8
0x5C2C1000, // 0011 MOVE R11 R8
0x7C240400, // 0012 CALL R9 2
0x60240008, // 0013 GETGBL R9 G8
0x5C281000, // 0014 MOVE R10 R8
0x7C240200, // 0015 CALL R9 1
0x00261409, // 0016 ADD R9 K10 R9
0x900E1209, // 0017 SETMBR R3 K9 R9
0x8C24010B, // 0018 GETMET R9 R0 K11
0x582C000C, // 0019 LDCONST R11 K12
0x5C301000, // 001A MOVE R12 R8
0x7C240600, // 001B CALL R9 3
0x50240200, // 001C LDBOOL R9 1 0
0x80041200, // 001D RET 1 R9
0x70020010, // 001E JMP #0030
0x54220046, // 001F LDINT R8 71
0x1C200E08, // 0020 EQ R8 R7 R8
0x78220002, // 0021 JMPF R8 #0025
0x50200200, // 0022 LDBOOL R8 1 0
0x80041000, // 0023 RET 1 R8
0x7002000A, // 0024 JMP #0030
0x5422004A, // 0025 LDINT R8 75
0x1C200E08, // 0026 EQ R8 R7 R8
0x78220002, // 0027 JMPF R8 #002B
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x70020004, // 002A JMP #0030
0x5422004B, // 002B LDINT R8 76
0x1C200E08, // 002C EQ R8 R7 R8
0x78220001, // 002D JMPF R8 #0030
0x50200200, // 002E LDBOOL R8 1 0
0x80041000, // 002F RET 1 R8
0x70020008, // 0030 JMP #003A
0x60200003, // 0031 GETGBL R8 G3
0x5C240000, // 0032 MOVE R9 R0
0x7C200200, // 0033 CALL R8 1
0x8C20110D, // 0034 GETMET R8 R8 K13
0x5C280200, // 0035 MOVE R10 R1
0x5C2C0400, // 0036 MOVE R11 R2
0x5C300600, // 0037 MOVE R12 R3
0x7C200800, // 0038 CALL R8 4
0x80041000, // 0039 RET 1 R8
0x80000000, // 003A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
@ -429,6 +372,146 @@ be_local_closure(Matter_Plugin_Light2_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
be_local_closure(Matter_Plugin_Light2_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[14]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(set_ct),
/* K9 */ be_nested_str_weak(log),
/* K10 */ be_nested_str_weak(ct_X3A),
/* K11 */ be_nested_str_weak(publish_command),
/* K12 */ be_nested_str_weak(CT),
/* K13 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[59]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
0x78220028, // 0007 JMPF R8 #0031
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220009, // 000A LDINT R8 10
0x1C200E08, // 000B EQ R8 R7 R8
0x78220011, // 000C JMPF R8 #001F
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x8C240108, // 0010 GETMET R9 R0 K8
0x5C2C1000, // 0011 MOVE R11 R8
0x7C240400, // 0012 CALL R9 2
0x60240008, // 0013 GETGBL R9 G8
0x5C281000, // 0014 MOVE R10 R8
0x7C240200, // 0015 CALL R9 1
0x00261409, // 0016 ADD R9 K10 R9
0x900E1209, // 0017 SETMBR R3 K9 R9
0x8C24010B, // 0018 GETMET R9 R0 K11
0x582C000C, // 0019 LDCONST R11 K12
0x5C301000, // 001A MOVE R12 R8
0x7C240600, // 001B CALL R9 3
0x50240200, // 001C LDBOOL R9 1 0
0x80041200, // 001D RET 1 R9
0x70020010, // 001E JMP #0030
0x54220046, // 001F LDINT R8 71
0x1C200E08, // 0020 EQ R8 R7 R8
0x78220002, // 0021 JMPF R8 #0025
0x50200200, // 0022 LDBOOL R8 1 0
0x80041000, // 0023 RET 1 R8
0x7002000A, // 0024 JMP #0030
0x5422004A, // 0025 LDINT R8 75
0x1C200E08, // 0026 EQ R8 R7 R8
0x78220002, // 0027 JMPF R8 #002B
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x70020004, // 002A JMP #0030
0x5422004B, // 002B LDINT R8 76
0x1C200E08, // 002C EQ R8 R7 R8
0x78220001, // 002D JMPF R8 #0030
0x50200200, // 002E LDBOOL R8 1 0
0x80041000, // 002F RET 1 R8
0x70020008, // 0030 JMP #003A
0x60200003, // 0031 GETGBL R8 G3
0x5C240000, // 0032 MOVE R9 R0
0x7C200200, // 0033 CALL R8 1
0x8C20110D, // 0034 GETMET R8 R8 K13
0x5C280200, // 0035 MOVE R10 R1
0x5C2C0400, // 0036 MOVE R11 R2
0x5C300600, // 0037 MOVE R12 R3
0x7C200800, // 0038 CALL R8 4
0x80041000, // 0039 RET 1 R8
0x80000000, // 003A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_ct_minmax
********************************************************************/
be_local_closure(Matter_Plugin_Light2_update_ct_minmax, /* name */
be_nested_proto(
4, /* 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(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_nested_str_weak(ct_min),
/* K3 */ be_nested_str_weak(ct_max),
}),
be_str_weak(update_ct_minmax),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x540E0051, // 0002 LDINT R3 82
0x7C040400, // 0003 CALL R1 2
0x78060001, // 0004 JMPF R1 #0007
0x540A00C7, // 0005 LDINT R2 200
0x70020000, // 0006 JMP #0008
0x540A0098, // 0007 LDINT R2 153
0x90020402, // 0008 SETMBR R0 K2 R2
0x78060001, // 0009 JMPF R1 #000C
0x540A017B, // 000A LDINT R2 380
0x70020000, // 000B JMP #000D
0x540A01F3, // 000C LDINT R2 500
0x90020602, // 000D SETMBR R0 K3 R2
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light2
********************************************************************/
@ -436,19 +519,27 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light2,
3,
&be_class_Matter_Plugin_Light1,
be_nested_map(13,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ct_min, -1), be_const_var(1) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) },
{ be_const_key_weak(set_ct, -1), be_const_closure(Matter_Plugin_Light2_set_ct_closure) },
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
{ be_const_key_weak(update_ct_minmax, 8), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light2_update_virtual_closure) },
{ be_const_key_weak(ct_min, 8), be_const_var(1) },
{ be_const_key_weak(append_state_json, -1), be_const_closure(Matter_Plugin_Light2_append_state_json_closure) },
{ be_const_key_weak(init, 4), be_const_closure(Matter_Plugin_Light2_init_closure) },
{ be_const_key_weak(set_ct, -1), be_const_closure(Matter_Plugin_Light2_set_ct_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light2_update_shadow_closure) },
{ be_const_key_weak(ct_max, 1), be_const_var(2) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X202_X20CT) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
be_nested_str_weak(CT),
})) ) } )) },
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) },
{ be_const_key_weak(read_attribute, 12), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light2_invoke_request_closure) },
{ be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -529,12 +620,13 @@ be_local_class(Matter_Plugin_Light2,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(shadow_ct, 9), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
})),
be_str_weak(Matter_Plugin_Light2)
);

View File

@ -1,4 +1,4 @@
/* Solidification of Matter_Plugin_3_Light3.h */
/* Solidification of Matter_Plugin_4_Light3.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
@ -151,140 +151,38 @@ be_local_closure(Matter_Plugin_Light3_read_attribute, /* name */
/********************************************************************
** Solidified function: set_hue_sat
** Solidified function: append_state_json
********************************************************************/
be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */
be_local_closure(Matter_Plugin_Light3_append_state_json, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
8, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(virtual),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(scale_uint),
/* K4 */ be_nested_str_weak(light),
/* K5 */ be_nested_str_weak(set),
/* K6 */ be_nested_str_weak(hue),
/* K7 */ be_nested_str_weak(sat),
/* K8 */ be_nested_str_weak(update_shadow),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(attribute_updated),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_const_int(1),
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22Power_X22_X3A_X25s_X2C_X22Bri_X22_X3A_X25s_X2C_X22Hue_X22_X3A_X25s_X2C_X22Sat_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
/* K2 */ be_nested_str_weak(shadow_bri),
/* K3 */ be_nested_str_weak(shadow_hue),
/* K4 */ be_nested_str_weak(shadow_sat),
}),
be_str_weak(set_hue_sat),
be_str_weak(append_state_json),
&be_const_str_solidified,
( &(const binstruction[104]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x200C0203, // 0001 NE R3 R1 R3
0x780E0006, // 0002 JMPF R3 #000A
0x140C0300, // 0003 LT R3 R1 K0
0x780E0000, // 0004 JMPF R3 #0006
0x58040000, // 0005 LDCONST R1 K0
0x540E00FD, // 0006 LDINT R3 254
0x240C0203, // 0007 GT R3 R1 R3
0x780E0000, // 0008 JMPF R3 #000A
0x540600FD, // 0009 LDINT R1 254
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0006, // 000C JMPF R3 #0014
0x140C0500, // 000D LT R3 R2 K0
0x780E0000, // 000E JMPF R3 #0010
0x58080000, // 000F LDCONST R2 K0
0x540E00FD, // 0010 LDINT R3 254
0x240C0403, // 0011 GT R3 R2 R3
0x780E0000, // 0012 JMPF R3 #0014
0x540A00FD, // 0013 LDINT R2 254
0x880C0101, // 0014 GETMBR R3 R0 K1
0x740E003A, // 0015 JMPT R3 #0051
0x4C0C0000, // 0016 LDNIL R3
0x200C0203, // 0017 NE R3 R1 R3
0x780E0008, // 0018 JMPF R3 #0022
0xB80E0400, // 0019 GETNGBL R3 K2
0x8C0C0703, // 001A GETMET R3 R3 K3
0x5C140200, // 001B MOVE R5 R1
0x58180000, // 001C LDCONST R6 K0
0x541E00FD, // 001D LDINT R7 254
0x58200000, // 001E LDCONST R8 K0
0x54260167, // 001F LDINT R9 360
0x7C0C0C00, // 0020 CALL R3 6
0x70020000, // 0021 JMP #0023
0x4C0C0000, // 0022 LDNIL R3
0x4C100000, // 0023 LDNIL R4
0x20100404, // 0024 NE R4 R2 R4
0x78120008, // 0025 JMPF R4 #002F
0xB8120400, // 0026 GETNGBL R4 K2
0x8C100903, // 0027 GETMET R4 R4 K3
0x5C180400, // 0028 MOVE R6 R2
0x581C0000, // 0029 LDCONST R7 K0
0x542200FD, // 002A LDINT R8 254
0x58240000, // 002B LDCONST R9 K0
0x542A00FE, // 002C LDINT R10 255
0x7C100C00, // 002D CALL R4 6
0x70020000, // 002E JMP #0030
0x4C100000, // 002F LDNIL R4
0x4C140000, // 0030 LDNIL R5
0x20140605, // 0031 NE R5 R3 R5
0x7816000A, // 0032 JMPF R5 #003E
0x4C140000, // 0033 LDNIL R5
0x20140805, // 0034 NE R5 R4 R5
0x78160007, // 0035 JMPF R5 #003E
0xB8160800, // 0036 GETNGBL R5 K4
0x8C140B05, // 0037 GETMET R5 R5 K5
0x601C0013, // 0038 GETGBL R7 G19
0x7C1C0000, // 0039 CALL R7 0
0x981E0C03, // 003A SETIDX R7 K6 R3
0x981E0E04, // 003B SETIDX R7 K7 R4
0x7C140400, // 003C CALL R5 2
0x7002000F, // 003D JMP #004E
0x4C140000, // 003E LDNIL R5
0x20140605, // 003F NE R5 R3 R5
0x78160006, // 0040 JMPF R5 #0048
0xB8160800, // 0041 GETNGBL R5 K4
0x8C140B05, // 0042 GETMET R5 R5 K5
0x601C0013, // 0043 GETGBL R7 G19
0x7C1C0000, // 0044 CALL R7 0
0x981E0C03, // 0045 SETIDX R7 K6 R3
0x7C140400, // 0046 CALL R5 2
0x70020005, // 0047 JMP #004E
0xB8160800, // 0048 GETNGBL R5 K4
0x8C140B05, // 0049 GETMET R5 R5 K5
0x601C0013, // 004A GETGBL R7 G19
0x7C1C0000, // 004B CALL R7 0
0x981E0E04, // 004C SETIDX R7 K7 R4
0x7C140400, // 004D CALL R5 2
0x8C140108, // 004E GETMET R5 R0 K8
0x7C140200, // 004F CALL R5 1
0x70020015, // 0050 JMP #0067
0x4C0C0000, // 0051 LDNIL R3
0x200C0203, // 0052 NE R3 R1 R3
0x780E0007, // 0053 JMPF R3 #005C
0x880C0109, // 0054 GETMBR R3 R0 K9
0x200C0203, // 0055 NE R3 R1 R3
0x780E0004, // 0056 JMPF R3 #005C
0x8C0C010A, // 0057 GETMET R3 R0 K10
0x541602FF, // 0058 LDINT R5 768
0x58180000, // 0059 LDCONST R6 K0
0x7C0C0600, // 005A CALL R3 3
0x90021201, // 005B SETMBR R0 K9 R1
0x4C0C0000, // 005C LDNIL R3
0x200C0403, // 005D NE R3 R2 R3
0x780E0007, // 005E JMPF R3 #0067
0x880C010B, // 005F GETMBR R3 R0 K11
0x200C0403, // 0060 NE R3 R2 R3
0x780E0004, // 0061 JMPF R3 #0067
0x8C0C010A, // 0062 GETMET R3 R0 K10
0x541602FF, // 0063 LDINT R5 768
0x5818000C, // 0064 LDCONST R6 K12
0x7C0C0600, // 0065 CALL R3 3
0x90021602, // 0066 SETMBR R0 K11 R2
0x80000000, // 0067 RET 0
( &(const binstruction[10]) { /* code */
0x60080018, // 0000 GETGBL R2 G24
0x580C0000, // 0001 LDCONST R3 K0
0x60100009, // 0002 GETGBL R4 G9
0x88140101, // 0003 GETMBR R5 R0 K1
0x7C100200, // 0004 CALL R4 1
0x88140102, // 0005 GETMBR R5 R0 K2
0x88180103, // 0006 GETMBR R6 R0 K3
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C080A00, // 0008 CALL R2 5
0x80040400, // 0009 RET 1 R2
})
)
);
@ -292,103 +190,55 @@ be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */
/********************************************************************
** Solidified function: update_shadow
** Solidified function: update_virtual
********************************************************************/
be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
be_local_closure(Matter_Plugin_Light3_update_virtual, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
8, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(virtual),
/* K2 */ be_nested_str_weak(light),
/* K3 */ be_nested_str_weak(get),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(hue),
/* K6 */ be_nested_str_weak(sat),
/* K7 */ be_nested_str_weak(tasmota),
/* K8 */ be_nested_str_weak(scale_uint),
/* K9 */ be_const_int(0),
/* K10 */ be_nested_str_weak(shadow_hue),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(1),
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Hue),
/* K2 */ be_nested_str_weak(Sat),
/* K3 */ be_nested_str_weak(set_hue_sat),
/* K4 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_shadow),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[66]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060039, // 0006 JMPT R1 #0041
0xA4060400, // 0007 IMPORT R1 K2
0x8C080303, // 0008 GETMET R2 R1 K3
0x7C080200, // 0009 CALL R2 1
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0033, // 000C JMPF R3 #0041
0x8C0C0504, // 000D GETMET R3 R2 K4
0x58140005, // 000E LDCONST R5 K5
0x4C180000, // 000F LDNIL R6
0x7C0C0600, // 0010 CALL R3 3
0x8C100504, // 0011 GETMET R4 R2 K4
0x58180006, // 0012 LDCONST R6 K6
0x4C1C0000, // 0013 LDNIL R7
0x7C100600, // 0014 CALL R4 3
0x4C140000, // 0015 LDNIL R5
0x20140605, // 0016 NE R5 R3 R5
0x78160009, // 0017 JMPF R5 #0022
0xB8160E00, // 0018 GETNGBL R5 K7
0x8C140B08, // 0019 GETMET R5 R5 K8
0x5C1C0600, // 001A MOVE R7 R3
0x58200009, // 001B LDCONST R8 K9
0x54260167, // 001C LDINT R9 360
0x58280009, // 001D LDCONST R10 K9
0x542E00FD, // 001E LDINT R11 254
0x7C140C00, // 001F CALL R5 6
0x5C0C0A00, // 0020 MOVE R3 R5
0x70020000, // 0021 JMP #0023
0x880C010A, // 0022 GETMBR R3 R0 K10
0x4C140000, // 0023 LDNIL R5
0x20140805, // 0024 NE R5 R4 R5
0x78160009, // 0025 JMPF R5 #0030
0xB8160E00, // 0026 GETNGBL R5 K7
0x8C140B08, // 0027 GETMET R5 R5 K8
0x5C1C0800, // 0028 MOVE R7 R4
0x58200009, // 0029 LDCONST R8 K9
0x542600FE, // 002A LDINT R9 255
0x58280009, // 002B LDCONST R10 K9
0x542E00FD, // 002C LDINT R11 254
0x7C140C00, // 002D CALL R5 6
0x5C100A00, // 002E MOVE R4 R5
0x70020000, // 002F JMP #0031
0x8810010B, // 0030 GETMBR R4 R0 K11
0x8814010A, // 0031 GETMBR R5 R0 K10
0x20140605, // 0032 NE R5 R3 R5
0x78160004, // 0033 JMPF R5 #0039
0x8C14010C, // 0034 GETMET R5 R0 K12
0x541E02FF, // 0035 LDINT R7 768
0x58200009, // 0036 LDCONST R8 K9
0x7C140600, // 0037 CALL R5 3
0x90021403, // 0038 SETMBR R0 K10 R3
0x8814010B, // 0039 GETMBR R5 R0 K11
0x20140805, // 003A NE R5 R4 R5
0x78160004, // 003B JMPF R5 #0041
0x8C14010C, // 003C GETMET R5 R0 K12
0x541E02FF, // 003D LDINT R7 768
0x5820000D, // 003E LDCONST R8 K13
0x7C140600, // 003F CALL R5 3
0x90021604, // 0040 SETMBR R0 K11 R4
0x80000000, // 0041 RET 0
( &(const binstruction[27]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0300, // 0001 GETMET R3 R1 K0
0x58140001, // 0002 LDCONST R5 K1
0x7C0C0400, // 0003 CALL R3 2
0x7C080200, // 0004 CALL R2 1
0x600C0009, // 0005 GETGBL R3 G9
0x8C100300, // 0006 GETMET R4 R1 K0
0x58180002, // 0007 LDCONST R6 K2
0x7C100400, // 0008 CALL R4 2
0x7C0C0200, // 0009 CALL R3 1
0x4C100000, // 000A LDNIL R4
0x20100404, // 000B NE R4 R2 R4
0x74120002, // 000C JMPT R4 #0010
0x4C100000, // 000D LDNIL R4
0x20100604, // 000E NE R4 R3 R4
0x78120003, // 000F JMPF R4 #0014
0x8C100103, // 0010 GETMET R4 R0 K3
0x5C180400, // 0011 MOVE R6 R2
0x5C1C0600, // 0012 MOVE R7 R3
0x7C100600, // 0013 CALL R4 3
0x60100003, // 0014 GETGBL R4 G3
0x5C140000, // 0015 MOVE R5 R0
0x7C100200, // 0016 CALL R4 1
0x8C100904, // 0017 GETMET R4 R4 K4
0x5C180200, // 0018 MOVE R6 R1
0x7C100400, // 0019 CALL R4 2
0x80000000, // 001A RET 0
})
)
);
@ -600,6 +450,251 @@ be_local_closure(Matter_Plugin_Light3_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
be_local_closure(Matter_Plugin_Light3_update_shadow, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(virtual),
/* K2 */ be_nested_str_weak(light),
/* K3 */ be_nested_str_weak(get),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(hue),
/* K6 */ be_nested_str_weak(sat),
/* K7 */ be_nested_str_weak(tasmota),
/* K8 */ be_nested_str_weak(scale_uint),
/* K9 */ be_const_int(0),
/* K10 */ be_nested_str_weak(shadow_hue),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(1),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[66]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060039, // 0006 JMPT R1 #0041
0xA4060400, // 0007 IMPORT R1 K2
0x8C080303, // 0008 GETMET R2 R1 K3
0x7C080200, // 0009 CALL R2 1
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0033, // 000C JMPF R3 #0041
0x8C0C0504, // 000D GETMET R3 R2 K4
0x58140005, // 000E LDCONST R5 K5
0x4C180000, // 000F LDNIL R6
0x7C0C0600, // 0010 CALL R3 3
0x8C100504, // 0011 GETMET R4 R2 K4
0x58180006, // 0012 LDCONST R6 K6
0x4C1C0000, // 0013 LDNIL R7
0x7C100600, // 0014 CALL R4 3
0x4C140000, // 0015 LDNIL R5
0x20140605, // 0016 NE R5 R3 R5
0x78160009, // 0017 JMPF R5 #0022
0xB8160E00, // 0018 GETNGBL R5 K7
0x8C140B08, // 0019 GETMET R5 R5 K8
0x5C1C0600, // 001A MOVE R7 R3
0x58200009, // 001B LDCONST R8 K9
0x54260167, // 001C LDINT R9 360
0x58280009, // 001D LDCONST R10 K9
0x542E00FD, // 001E LDINT R11 254
0x7C140C00, // 001F CALL R5 6
0x5C0C0A00, // 0020 MOVE R3 R5
0x70020000, // 0021 JMP #0023
0x880C010A, // 0022 GETMBR R3 R0 K10
0x4C140000, // 0023 LDNIL R5
0x20140805, // 0024 NE R5 R4 R5
0x78160009, // 0025 JMPF R5 #0030
0xB8160E00, // 0026 GETNGBL R5 K7
0x8C140B08, // 0027 GETMET R5 R5 K8
0x5C1C0800, // 0028 MOVE R7 R4
0x58200009, // 0029 LDCONST R8 K9
0x542600FE, // 002A LDINT R9 255
0x58280009, // 002B LDCONST R10 K9
0x542E00FD, // 002C LDINT R11 254
0x7C140C00, // 002D CALL R5 6
0x5C100A00, // 002E MOVE R4 R5
0x70020000, // 002F JMP #0031
0x8810010B, // 0030 GETMBR R4 R0 K11
0x8814010A, // 0031 GETMBR R5 R0 K10
0x20140605, // 0032 NE R5 R3 R5
0x78160004, // 0033 JMPF R5 #0039
0x8C14010C, // 0034 GETMET R5 R0 K12
0x541E02FF, // 0035 LDINT R7 768
0x58200009, // 0036 LDCONST R8 K9
0x7C140600, // 0037 CALL R5 3
0x90021403, // 0038 SETMBR R0 K10 R3
0x8814010B, // 0039 GETMBR R5 R0 K11
0x20140805, // 003A NE R5 R4 R5
0x78160004, // 003B JMPF R5 #0041
0x8C14010C, // 003C GETMET R5 R0 K12
0x541E02FF, // 003D LDINT R7 768
0x5820000D, // 003E LDCONST R8 K13
0x7C140600, // 003F CALL R5 3
0x90021604, // 0040 SETMBR R0 K11 R4
0x80000000, // 0041 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_hue_sat
********************************************************************/
be_local_closure(Matter_Plugin_Light3_set_hue_sat, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(virtual),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(scale_uint),
/* K4 */ be_nested_str_weak(light),
/* K5 */ be_nested_str_weak(set),
/* K6 */ be_nested_str_weak(hue),
/* K7 */ be_nested_str_weak(sat),
/* K8 */ be_nested_str_weak(update_shadow),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(attribute_updated),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_const_int(1),
}),
be_str_weak(set_hue_sat),
&be_const_str_solidified,
( &(const binstruction[104]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x200C0203, // 0001 NE R3 R1 R3
0x780E0006, // 0002 JMPF R3 #000A
0x140C0300, // 0003 LT R3 R1 K0
0x780E0000, // 0004 JMPF R3 #0006
0x58040000, // 0005 LDCONST R1 K0
0x540E00FD, // 0006 LDINT R3 254
0x240C0203, // 0007 GT R3 R1 R3
0x780E0000, // 0008 JMPF R3 #000A
0x540600FD, // 0009 LDINT R1 254
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0006, // 000C JMPF R3 #0014
0x140C0500, // 000D LT R3 R2 K0
0x780E0000, // 000E JMPF R3 #0010
0x58080000, // 000F LDCONST R2 K0
0x540E00FD, // 0010 LDINT R3 254
0x240C0403, // 0011 GT R3 R2 R3
0x780E0000, // 0012 JMPF R3 #0014
0x540A00FD, // 0013 LDINT R2 254
0x880C0101, // 0014 GETMBR R3 R0 K1
0x740E003A, // 0015 JMPT R3 #0051
0x4C0C0000, // 0016 LDNIL R3
0x200C0203, // 0017 NE R3 R1 R3
0x780E0008, // 0018 JMPF R3 #0022
0xB80E0400, // 0019 GETNGBL R3 K2
0x8C0C0703, // 001A GETMET R3 R3 K3
0x5C140200, // 001B MOVE R5 R1
0x58180000, // 001C LDCONST R6 K0
0x541E00FD, // 001D LDINT R7 254
0x58200000, // 001E LDCONST R8 K0
0x54260167, // 001F LDINT R9 360
0x7C0C0C00, // 0020 CALL R3 6
0x70020000, // 0021 JMP #0023
0x4C0C0000, // 0022 LDNIL R3
0x4C100000, // 0023 LDNIL R4
0x20100404, // 0024 NE R4 R2 R4
0x78120008, // 0025 JMPF R4 #002F
0xB8120400, // 0026 GETNGBL R4 K2
0x8C100903, // 0027 GETMET R4 R4 K3
0x5C180400, // 0028 MOVE R6 R2
0x581C0000, // 0029 LDCONST R7 K0
0x542200FD, // 002A LDINT R8 254
0x58240000, // 002B LDCONST R9 K0
0x542A00FE, // 002C LDINT R10 255
0x7C100C00, // 002D CALL R4 6
0x70020000, // 002E JMP #0030
0x4C100000, // 002F LDNIL R4
0x4C140000, // 0030 LDNIL R5
0x20140605, // 0031 NE R5 R3 R5
0x7816000A, // 0032 JMPF R5 #003E
0x4C140000, // 0033 LDNIL R5
0x20140805, // 0034 NE R5 R4 R5
0x78160007, // 0035 JMPF R5 #003E
0xB8160800, // 0036 GETNGBL R5 K4
0x8C140B05, // 0037 GETMET R5 R5 K5
0x601C0013, // 0038 GETGBL R7 G19
0x7C1C0000, // 0039 CALL R7 0
0x981E0C03, // 003A SETIDX R7 K6 R3
0x981E0E04, // 003B SETIDX R7 K7 R4
0x7C140400, // 003C CALL R5 2
0x7002000F, // 003D JMP #004E
0x4C140000, // 003E LDNIL R5
0x20140605, // 003F NE R5 R3 R5
0x78160006, // 0040 JMPF R5 #0048
0xB8160800, // 0041 GETNGBL R5 K4
0x8C140B05, // 0042 GETMET R5 R5 K5
0x601C0013, // 0043 GETGBL R7 G19
0x7C1C0000, // 0044 CALL R7 0
0x981E0C03, // 0045 SETIDX R7 K6 R3
0x7C140400, // 0046 CALL R5 2
0x70020005, // 0047 JMP #004E
0xB8160800, // 0048 GETNGBL R5 K4
0x8C140B05, // 0049 GETMET R5 R5 K5
0x601C0013, // 004A GETGBL R7 G19
0x7C1C0000, // 004B CALL R7 0
0x981E0E04, // 004C SETIDX R7 K7 R4
0x7C140400, // 004D CALL R5 2
0x8C140108, // 004E GETMET R5 R0 K8
0x7C140200, // 004F CALL R5 1
0x70020015, // 0050 JMP #0067
0x4C0C0000, // 0051 LDNIL R3
0x200C0203, // 0052 NE R3 R1 R3
0x780E0007, // 0053 JMPF R3 #005C
0x880C0109, // 0054 GETMBR R3 R0 K9
0x200C0203, // 0055 NE R3 R1 R3
0x780E0004, // 0056 JMPF R3 #005C
0x8C0C010A, // 0057 GETMET R3 R0 K10
0x541602FF, // 0058 LDINT R5 768
0x58180000, // 0059 LDCONST R6 K0
0x7C0C0600, // 005A CALL R3 3
0x90021201, // 005B SETMBR R0 K9 R1
0x4C0C0000, // 005C LDNIL R3
0x200C0403, // 005D NE R3 R2 R3
0x780E0007, // 005E JMPF R3 #0067
0x880C010B, // 005F GETMBR R3 R0 K11
0x200C0403, // 0060 NE R3 R2 R3
0x780E0004, // 0061 JMPF R3 #0067
0x8C0C010A, // 0062 GETMET R3 R0 K10
0x541602FF, // 0063 LDINT R5 768
0x5818000C, // 0064 LDCONST R6 K12
0x7C0C0600, // 0065 CALL R3 3
0x90021602, // 0066 SETMBR R0 K11 R2
0x80000000, // 0067 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light3
********************************************************************/
@ -607,19 +702,20 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light3,
2,
&be_class_Matter_Plugin_Light1,
be_nested_map(11,
be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(set_hue_sat, 0), be_const_closure(Matter_Plugin_Light3_set_hue_sat_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(TYPES, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
{ be_const_key_weak(read_attribute, 4), be_const_closure(Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(Matter_Plugin_Light3_update_virtual_closure) },
{ be_const_key_weak(append_state_json, 1), be_const_closure(Matter_Plugin_Light3_append_state_json_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(4,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
be_nested_str_weak(Hue),
be_nested_str_weak(Sat),
})) ) } )) },
{ be_const_key_weak(shadow_hue, 2), be_const_var(0) },
{ be_const_key_weak(CLUSTERS, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -702,10 +798,19 @@ be_local_class(Matter_Plugin_Light3,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(update_shadow, 8), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X203_X20RGB) },
{ be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Light3_init_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(Matter_Plugin_Light3_update_shadow_closure) },
{ be_const_key_weak(invoke_request, 6), be_const_closure(Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(NAME, -1), be_nested_str_weak(Light_X203_X20RGB) },
{ be_const_key_weak(shadow_hue, 11), be_const_var(0) },
{ be_const_key_weak(shadow_sat, 9), be_const_var(1) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(set_hue_sat, -1), be_const_closure(Matter_Plugin_Light3_set_hue_sat_closure) },
})),
be_str_weak(Matter_Plugin_Light3)
);

View File

@ -3372,7 +3372,7 @@ be_local_class(Matter_UI,
{ be_const_key_weak(show_commissioning_info, -1), be_const_closure(Matter_UI_show_commissioning_info_closure) },
{ be_const_key_weak(page_part_ctl, 18), be_const_closure(Matter_UI_page_part_ctl_closure) },
{ be_const_key_weak(show_fabric_info, -1), be_const_closure(Matter_UI_show_fabric_info_closure) },
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact) },
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_weak(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3) },
{ be_const_key_weak(web_get_arg, -1), be_const_closure(Matter_UI_web_get_arg_closure) },
{ be_const_key_weak(plugin_option, 5), be_const_closure(Matter_UI_plugin_option_closure) },
{ be_const_key_weak(web_add_config_button, -1), be_const_closure(Matter_UI_web_add_config_button_closure) },

View File

@ -145,6 +145,7 @@ class be_class_tasmota (scope: global, name: Tasmota) {
_find_op, func(tasm_find_op) // new C version for finding a rule operator
_apply_str_op, func(tasm_apply_str_op)
find_key_i, closure(Tasmota_find_key_i_closure)
find_list_i, closure(Tasmota_find_list_i_closure)
find_op, closure(Tasmota_find_op_closure)
add_rule, closure(Tasmota_add_rule_closure)
remove_rule, closure(Tasmota_remove_rule_closure)

View File

@ -64,6 +64,19 @@ class Tasmota
end
end
# find a string in a list, case insensitive
def find_list_i(l, vali)
import string
var idx = 0
var valu = string.toupper(vali)
while idx < size(l)
if string.toupper(l[idx]) == valu
return idx
end
idx += 1
end
return nil
end
# split the item when there is an operator, returns a list of (left,op,right)
#-

View File

@ -249,6 +249,7 @@
#define D_RSLT_STATE "STATE"
#define D_RSLT_UPTIME "UPTIME"
#define D_RSLT_WARNING "WARNING"
#define D_RSLT_COMMAND "COMMAND"
#define D_LOG_SOME_SETTINGS_RESET "Some settings have been reset"

View File

@ -111,11 +111,14 @@ extern "C" int matter_publish_command(bvm *vm) {
if (use_fname) {
ResponseAppend_P(PSTR("{\"%s\":"), friendly_name);
} else {
ResponseAppend_P(PSTR("{\"ep%i\":"), ep);
ResponseAppend_P(PSTR("{\"%i\":"), ep);
}
}
ResponseAppend_P(PSTR("{"));
// Add "Ep":<ep>
ResponseAppend_P(PSTR("\"" "Ep" "\":%i,"), ep);
// Add "Name":"xxx" if name is present
if (friendly_name && strlen(friendly_name)) {
ResponseAppend_P(PSTR("\"" "Name" "\":\"%s\","), EscapeJSONString(friendly_name).c_str());
@ -156,13 +159,13 @@ extern "C" int matter_publish_command(bvm *vm) {
}
char stopic[TOPSZ];
if (Settings->flag5.zb_received_as_subtopic) {
GetTopic_P(stopic, TELE, subtopic, json_prefix);
GetTopic_P(stopic, STAT, subtopic, json_prefix);
} else {
GetTopic_P(stopic, TELE, subtopic, PSTR(D_RSLT_SENSOR));
GetTopic_P(stopic, STAT, subtopic, PSTR(D_RSLT_COMMAND));
}
MqttPublish(stopic, Settings->flag.mqtt_sensor_retain);
} else {
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_SENSOR), Settings->flag.mqtt_sensor_retain);
MqttPublishPrefixTopic_P(STAT, PSTR(D_RSLT_COMMAND), Settings->flag.mqtt_sensor_retain);
}
XdrvRulesProcess(0); // apply rules
be_return_nil(vm);