Matter Zigbee support for sensors: Temperature, Humidity, Pressure (#22084)

This commit is contained in:
s-hadinger 2024-09-03 23:50:53 +02:00 committed by GitHub
parent 5f80251414
commit c41e9fe010
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 8074 additions and 6785 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000) - Command ``SetOption69 1`` to enable Serial Bridge inverted Receive (#22000)
- Zigbee Koenkk firmware 20240710 for Sonoff Zigbee ZBPro - Zigbee Koenkk firmware 20240710 for Sonoff Zigbee ZBPro
- Berry Zigbee improvements to prepare Matter - Berry Zigbee improvements to prepare Matter
- Matter Zigbee support for sensors: Temperature, Humidity, Pressure
### Breaking Changed ### Breaking Changed
- Berry make `energy` modules changes from #21887 backwards compatible - Berry make `energy` modules changes from #21887 backwards compatible

View File

@ -55,6 +55,7 @@ be_extern_native_module(TFL);
be_extern_native_module(mdns); be_extern_native_module(mdns);
#ifdef USE_ZIGBEE #ifdef USE_ZIGBEE
be_extern_native_module(zigbee); be_extern_native_module(zigbee);
be_extern_native_module(matter_zigbee);
#endif // USE_ZIGBEE #endif // USE_ZIGBEE
#ifdef USE_BERRY_CAM #ifdef USE_BERRY_CAM
be_extern_native_module(cam); be_extern_native_module(cam);
@ -171,6 +172,7 @@ BERRY_LOCAL const bntvmodule_t* const be_module_table[] = {
#endif // USE_WEBSERVER #endif // USE_WEBSERVER
#ifdef USE_ZIGBEE #ifdef USE_ZIGBEE
&be_native_module(zigbee), &be_native_module(zigbee),
&be_native_module(matter_zigbee),
#endif // USE_ZIGBEE #endif // USE_ZIGBEE
&be_native_module(flash), &be_native_module(flash),
&be_native_module(partition_core), &be_native_module(partition_core),

View File

@ -233,6 +233,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_0.h" #include "solidify/solidified_Matter_Plugin_0.h"
#include "solidify/solidified_Matter_z_Commissioning.h" #include "solidify/solidified_Matter_z_Commissioning.h"
#include "solidify/solidified_Matter_z_Autoconf.h" #include "solidify/solidified_Matter_z_Autoconf.h"
#include "solidify/solidified_Matter_z_Zigbee.h"
#include "solidify/solidified_Matter_Base38.h" #include "solidify/solidified_Matter_Base38.h"
#include "solidify/solidified_Matter_UI.h" #include "solidify/solidified_Matter_UI.h"
#include "solidify/solidified_Matter_Profiler.h" #include "solidify/solidified_Matter_Profiler.h"
@ -295,6 +296,9 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Rain.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h" #include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_9_Zigbee_Temperature.h"
#include "solidify/solidified_Matter_Plugin_9_Zigbee_Pressure.h"
#include "solidify/solidified_Matter_Plugin_9_Zigbee_Humidity.h"
#include "solidify/solidified_Matter_Plugin_z_All.h" #include "solidify/solidified_Matter_Plugin_z_All.h"
#include "solidify/solidified_Matter_zz_Device.h" #include "solidify/solidified_Matter_zz_Device.h"

View File

@ -35,6 +35,7 @@ class Matter_Plugin
static var UPDATE_TIME = 5000 # default is every 5 seconds static var UPDATE_TIME = 5000 # default is every 5 seconds
static var VIRTUAL = false # set to true only for virtual devices static var VIRTUAL = false # set to true only for virtual devices
static var BRIDGE = false # set to true only for bridged devices (ESP8266 or OpenBK) static var BRIDGE = false # set to true only for bridged devices (ESP8266 or OpenBK)
static var ZIGBEE = false # set to true only when mapped to a zigbee device
var update_next # next timestamp for update var update_next # next timestamp for update
# Configuration of the plugin: clusters and type # Configuration of the plugin: clusters and type
static var CLUSTERS = matter.consolidate_clusters(_class, { static var CLUSTERS = matter.consolidate_clusters(_class, {

View File

@ -55,6 +55,12 @@ class Matter_Plugin_Device : Matter_Plugin
############################################################# #############################################################
# Constructor # Constructor
def init(device, endpoint, arguments) def init(device, endpoint, arguments)
# Zigbee code, activated only when `ZIGBEE` is true
# attribute `zigbee_mapper` needs to be defined for classes with `ZIGBEE` true
if self.ZIGBEE
self.zigbee_mapper = device.create_zb_mapper(self) # needs to exist before `parse_configuration()` is called
end
super(self).init(device, endpoint, arguments) super(self).init(device, endpoint, arguments)
if self.BRIDGE if self.BRIDGE
@ -64,6 +70,17 @@ class Matter_Plugin_Device : Matter_Plugin
end end
end end
#############################################################
# parse_configuration
#
# Parse configuration map, handling case of Zigbee configuration
def parse_configuration(config)
# super(self).parse_configuration(config) # not necessary because the superclass does nothing
if self.ZIGBEE && self.zigbee_mapper
self.zigbee_mapper.parse_configuration(config)
end
end
############################################################# #############################################################
# read an attribute # read an attribute
# #

View File

@ -57,6 +57,7 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
# #
# Parse configuration map # Parse configuration map
def parse_configuration(config) def parse_configuration(config)
super(self).parse_configuration(config)
self.tasmota_sensor_filter = config.find(self.ARG#-'filter'-#) self.tasmota_sensor_filter = config.find(self.ARG#-'filter'-#)
if self.tasmota_sensor_filter if self.tasmota_sensor_filter
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter) self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
@ -167,5 +168,31 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
############################################################# #############################################################
############################################################# #############################################################
#############################################################
# For Zigbee devices
#############################################################
#############################################################
# attributes_refined
#
# Filtered to only events for this endpoint
#
# Can be called only if `self.ZIGBEE` is true
def zigbee_received(frame, attr_list)
import math
log(f"MTR: zigbee_received Ox{self.zigbee_mapper.shortaddr:04X} {attr_list=} {type(attr_list)=}", 3)
var idx = 0
while (idx < size(attr_list))
var entry = attr_list[idx]
if (entry.key == self.ZIGBEE_NAME)
var val = self.pre_value(entry.val)
var update_list = { self.JSON_NAME : val } # Matter temperature is 1/100th of degrees
self.update_virtual(update_list)
log(f"MTR: [{self.endpoint:02X}] {self.JSON_NAME} updated {update_list}", 3)
return nil
end
idx += 1
end
end
end end
matter.Plugin_Sensor = Matter_Plugin_Sensor matter.Plugin_Sensor = Matter_Plugin_Sensor

View File

@ -0,0 +1,38 @@
#
# Matter_Plugin_9_Zigbee_Humidity.be - implements the behavior for a Zigbee Humidity sensor
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Zigbee_Humidity,weak
class Matter_Plugin_Zigbee_Humidity : Matter_Plugin_Sensor_Humidity
static var ZIGBEE = true
static var TYPE = "z_humidity" # name of the plug-in in json
static var DISPLAY_NAME = "Zig Humidity" # display name of the plug-in
static var ZIGBEE_NAME = "Humidity" # name of zigbee attribute with sensor reported
static var ARG = "zigbee_device" # zigbee device
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
static var ARG_HINT = "Device" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device, necessary for Zigbee mapping
var zigbee_mapper # required for zigbee device
end
matter.Plugin_Zigbee_Humidity = Matter_Plugin_Zigbee_Humidity

View File

@ -0,0 +1,38 @@
#
# Matter_Plugin_9_Zigbee_Pressure.be - implements the behavior for a Zigbee Pressure sensor
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Zigbee_Pressure,weak
class Matter_Plugin_Zigbee_Pressure : Matter_Plugin_Sensor_Pressure
static var ZIGBEE = true
static var TYPE = "z_pressure" # name of the plug-in in json
static var DISPLAY_NAME = "Zig Pressure" # display name of the plug-in
static var ZIGBEE_NAME = "Pressure" # name of zigbee attribute with sensor reported
static var ARG = "zigbee_device" # zigbee device
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
static var ARG_HINT = "Device" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device, necessary for Zigbee mapping
var zigbee_mapper # required for zigbee device
end
matter.Plugin_Zigbee_Pressure = Matter_Plugin_Zigbee_Pressure

View File

@ -0,0 +1,38 @@
#
# Matter_Plugin_9_Zigbee_Temperature.be - implements the behavior for a Zigbee Temperature sensor
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Zigbee_Temperature,weak
class Matter_Plugin_Zigbee_Temperature : Matter_Plugin_Sensor_Temp
static var ZIGBEE = true
static var TYPE = "z_temp" # name of the plug-in in json
static var DISPLAY_NAME = "Zig Temperature" # display name of the plug-in
static var ZIGBEE_NAME = "Temperature" # name of zigbee attribute with sensor reported
static var ARG = "zigbee_device" # zigbee device
static var ARG_TYPE = / x -> str(x) # function to convert argument to the right type
static var ARG_HINT = "Device" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device, necessary for Zigbee mapping
var zigbee_mapper # required for zigbee device
end
matter.Plugin_Zigbee_Temperature = Matter_Plugin_Zigbee_Temperature

View File

@ -32,11 +32,13 @@ import matter
# WebUI for the partition manager # WebUI for the partition manager
################################################################################# #################################################################################
class Matter_UI class Matter_UI
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt" static var _CLASSES_TYPES_STD =
"|relay|light0|light1|light2|light3|shutter|shutter+tilt"
"|gensw_btn" "|gensw_btn"
"|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|rain|waterleak" "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|rain|waterleak"
"|airquality" "|airquality"
"|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3" static var _CLASSES_TYPES_VIRTUAL =
"-virtual|v_relay|v_light0|v_light1|v_light2|v_light3"
"|v_fan" "|v_fan"
"|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_rain|v_waterleak" "|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_rain|v_waterleak"
"|v_airquality" "|v_airquality"
@ -438,7 +440,11 @@ class Matter_UI
# Add new endpoint section # Add new endpoint section
self.show_plugins_hints_js(self._CLASSES_TYPES) if self.device.zigbee
self.show_plugins_hints_js(self._CLASSES_TYPES_STD, self.device.zigbee._CLASSES_TYPES, self._CLASSES_TYPES_VIRTUAL)
else
self.show_plugins_hints_js(self._CLASSES_TYPES_STD, self._CLASSES_TYPES_VIRTUAL)
end
webserver.content_send("<p></p><fieldset><legend><b>&nbsp;Add to Configuration&nbsp;</b></legend><p></p>" webserver.content_send("<p></p><fieldset><legend><b>&nbsp;Add to Configuration&nbsp;</b></legend><p></p>"
"<p><b>Add local sensor or device</b></p>" "<p><b>Add local sensor or device</b></p>"
@ -453,9 +459,13 @@ class Matter_UI
"<tr>" "<tr>"
"<td style='font-size:smaller;'><input type='text' name='nam' size='1' value='' placeholder='(optional)' title=''></td>" "<td style='font-size:smaller;'><input type='text' name='nam' size='1' value='' placeholder='(optional)' title=''></td>"
"<td style='font-size:smaller;'><select id='pi' name='pi' onchange='otm(\"arg\",this.value)'>") "<td style='font-size:smaller;'><select id='pi' name='pi' onchange='otm(\"arg\",this.value)'>")
self.plugin_option('', self._CLASSES_TYPES) if self.device.zigbee
self.plugin_option('', self._CLASSES_TYPES_STD, self.device.zigbee._CLASSES_TYPES, self._CLASSES_TYPES_VIRTUAL)
else
self.plugin_option('', self._CLASSES_TYPES_STD, self._CLASSES_TYPES_VIRTUAL)
end
webserver.content_send("</select></td>" webserver.content_send("</select></td>"
"<td style='font-size:smaller;'><input type='text' id='arg' name='arg' size='1' value=''></td>" "<td style='font-size:smaller;'><input type='text' id='arg' name='arg' size='1' value=''></td>"
"</tr></table>" "</tr></table>"
"<div style='display: block;'></div>" "<div style='display: block;'></div>"
@ -509,6 +519,8 @@ class Matter_UI
webserver.content_send("<option value=''></option>") webserver.content_send("<option value=''></option>")
elif typ == '-virtual' elif typ == '-virtual'
webserver.content_send("<option value='' disabled>--- Virtual Devices ---</option>") webserver.content_send("<option value='' disabled>--- Virtual Devices ---</option>")
elif typ == '-zigbee'
webserver.content_send("<option value='' disabled>--- Zigbee Devices ---</option>")
else else
var nam = self.device.get_plugin_class_displayname(typ) var nam = self.device.get_plugin_class_displayname(typ)
webserver.content_send(format("<option value='%s'%s>%s</option>", typ, (typ == cur) ? " selected" : "", nam)) webserver.content_send(format("<option value='%s'%s>%s</option>", typ, (typ == cur) ? " selected" : "", nam))

View File

@ -0,0 +1,174 @@
#
# Matter_z_Zigbee.be - implements common Zigbee handling
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# IMPORTANT: this class is included in build only if `#define USE_ZIGBEE` is defined in `C`
#
# This is managed in matter_module with includes
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#@ solidify:Matter_Zigbee_Mapper,weak
##########################################################################################
# Matter_Zigbee_Mapper
#
# Class used to enrich Matter plug-in and do the mapping.
# This helps avoiding duplication of code
##########################################################################################
class Matter_Zigbee_Mapper
var pi # plug-in for this mapper
var device_arg # contains the device shortaddr (int) or device name (str) as per configuration JSON
# we need to store it, because the zigbee subsystem is not initialized when Matter starts
# hence lookup needs to be postponed
var zigbee_device # zigbee device
var shortaddr # shortaddr to facilitatefiltering
def init(pi)
self.pi = pi
end
#############################################################
# parse_configuration
#
# Parse configuration map
def parse_configuration(config)
import zigbee
import string
self.device_arg = config.find(self.pi.ARG #-'zigbee_device'-#, nil)
# we accept hex integers
if (type(self.device_arg) == 'string')
if string.startswith(self.device_arg, "0x") || string.startswith(self.device_arg, "0X")
self.device_arg = int(self.device_arg)
end
end
if (self.device_arg != nil)
tasmota.set_timer(100, /-> self.probe_zb_values()) # delayed on purpose to make sure all matter is initialized
end
end
#############################################################
# read_zb_info
#
# Run the equivalent of `ZbInfo` and return the atttribute_list
#
# Return nil if something went wrong
def read_zb_info()
if self.resolve_zb_device()
import zigbee
var device = zigbee.find(self.shortaddr)
if (device != nil)
var info = device.info()
return info
end
end
end
#############################################################
# probe_zb_values
#
# Probe stored values so we don't need to wait for the sensor
# to send a new value
#
# It is virtually equivalent to doing `ZbInfo` and parsing
# the last known value
def probe_zb_values()
var info = self.read_zb_info()
if (info != nil)
log(f"MTR: Read information for zigbee device 0x{self.shortaddr:%04X}", 3)
# handle it like if it was attributes received
self.pi.zigbee_received(nil, info)
end
end
#############################################################
# resolve_zb_device
#
# Lazily resolve the device id
# return true if found, false if not found or zigbee not started
def resolve_zb_device()
import zigbee
if (self.device_arg == nil) return false end
if (self.shortaddr != nil) return true end
self.zigbee_device = zigbee.find(self.device_arg)
if self.zigbee_device
self.shortaddr = self.zigbee_device.shortaddr
return true
else
log(f"MTR: cannot find zigbee device '{self.device_arg}'", 3)
return false
end
end
end
##########################################################################################
# Matter_Zigbee
#
# Helper class for managing mapping between Matter and Zigbee
##########################################################################################
class Matter_Zigbee
static var Matter_Zigbee_Mapper = Matter_Zigbee_Mapper
var device # reference to the main Device instance
# UI
static var _CLASSES_TYPES = # Zigbee
"-zigbee|z_temp|z_pressure|z_humidity"
#############################################################
def init(device)
import zigbee
self.device = device
zigbee.add_handler(self) # listen to all events received
end
#############################################################
# attributes_refined
#
# Called by Zigbee mapping whenever a new event is received
def attributes_final(event_type, frame, attr_list, shortaddr)
# iterate on all applicable endpoint
# log(f"MTR: attributes_final received '{attr_list}' for 0x{shortaddr:04X}", 3)
var plugins = self.device.plugins
var idx = 0
while (idx < size(plugins))
var pi = plugins[idx]
if (pi.ZIGBEE && pi.zigbee_mapper) # first test always works, while second works only if `zigbee` arrtibute exists
if (pi.zigbee_mapper.resolve_zb_device()) # resolve if this wan't done before
if (pi.zigbee_mapper.shortaddr == shortaddr)
pi.zigbee_received(frame, attr_list)
end
end
end
idx += 1
end
end
end
#@ solidify:matter_zigbee,weak
matter_zigbee = module('matter_zigbee')
matter_zigbee.Matter_Zigbee = Matter_Zigbee
def matter_zigbee_init(m)
return m.Matter_Zigbee
end
matter_zigbee.init = matter_zigbee_init

View File

@ -39,6 +39,7 @@ class Matter_Device
var commissioning # `matter.Commissioning()` object var commissioning # `matter.Commissioning()` object
var autoconf # `matter.Autoconf()` objects var autoconf # `matter.Autoconf()` objects
var sessions # `matter.Session_Store()` objet var sessions # `matter.Session_Store()` objet
var zigbee # `Mattter_Zigbee()` object, only set if compiled with zigbee, `nil` otherwise
var ui var ui
var tick # increment at each tick, avoids to repeat too frequently some actions var tick # increment at each tick, avoids to repeat too frequently some actions
# Events # Events
@ -82,6 +83,7 @@ class Matter_Device
self.sessions.load_fabrics() self.sessions.load_fabrics()
self.message_handler = matter.MessageHandler(self) self.message_handler = matter.MessageHandler(self)
self.events = matter.EventHandler(self) self.events = matter.EventHandler(self)
self.zigbee = self.init_zigbee()
self.ui = matter.UI(self) self.ui = matter.UI(self)
self.commissioning.init_basic_commissioning() self.commissioning.init_basic_commissioning()
@ -999,6 +1001,30 @@ class Matter_Device
end end
end end
#####################################################################
# Zigbee support
#
# Returns true if zigbee module is present
#####################################################################
def is_zigbee_present()
import introspect
return (introspect.module('matter_zigbee') != nil)
end
#
def init_zigbee()
if self.is_zigbee_present()
import matter_zigbee
return matter_zigbee(self)
end
end
#
def create_zb_mapper(pi)
if self.zigbee
return self.zigbee.Matter_Zigbee_Mapper(pi)
end
end
end end
matter.Device = Matter_Device matter.Device = Matter_Device

View File

@ -3,49 +3,113 @@
* Generated code, don't edit * * Generated code, don't edit *
\********************************************************************/ \********************************************************************/
#include "be_constobj.h" #include "be_constobj.h"
// compact class 'Matter_Plugin_Sensor' ktab size: 36, total: 53 (saved 136 bytes) // compact class 'Matter_Plugin_Sensor' ktab size: 49, total: 70 (saved 168 bytes)
static const bvalue be_ktab_class_Matter_Plugin_Sensor[36] = { static const bvalue be_ktab_class_Matter_Plugin_Sensor[49] = {
/* K0 */ be_nested_str_weak(contains), /* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(TempUnit), /* K1 */ be_nested_str_weak(JSON_NAME),
/* K2 */ be_nested_str_weak(temp_unit), /* K2 */ be_nested_str_weak(bool),
/* K3 */ be_nested_str_weak(PressureUnit), /* K3 */ be_nested_str_weak(shadow_value),
/* K4 */ be_nested_str_weak(pressure_unit), /* K4 */ be_nested_str_weak(value_changed),
/* K5 */ be_nested_str_weak(tasmota_sensor_matcher), /* K5 */ be_nested_str_weak(update_virtual),
/* K6 */ be_nested_str_weak(pre_value), /* K6 */ be_nested_str_weak(contains),
/* K7 */ be_nested_str_weak(match), /* K7 */ be_nested_str_weak(TempUnit),
/* K8 */ be_nested_str_weak(shadow_value), /* K8 */ be_nested_str_weak(temp_unit),
/* K9 */ be_nested_str_weak(value_changed), /* K9 */ be_nested_str_weak(PressureUnit),
/* K10 */ be_nested_str_weak(tasmota_sensor_filter), /* K10 */ be_nested_str_weak(pressure_unit),
/* K11 */ be_nested_str_weak(find), /* K11 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K12 */ be_nested_str_weak(ARG), /* K12 */ be_nested_str_weak(pre_value),
/* K13 */ be_nested_str_weak(tasmota), /* K13 */ be_nested_str_weak(match),
/* K14 */ be_nested_str_weak(Rule_Matcher), /* K14 */ be_nested_str_weak(tasmota_sensor_filter),
/* K15 */ be_nested_str_weak(parse), /* K15 */ be_nested_str_weak(string),
/* K16 */ be_nested_str_weak(TEMP_C), /* K16 */ be_nested_str_weak(webserver),
/* K17 */ be_nested_str_weak(PRESSURE_HPA), /* K17 */ be_nested_str_weak(html_escape),
/* K18 */ be_nested_str_weak(VIRTUAL), /* K18 */ be_nested_str_weak(split),
/* K19 */ be_nested_str_weak(JSON_NAME), /* K19 */ be_nested_str_weak(_X23),
/* K20 */ be_nested_str_weak(init), /* K20 */ be_const_int(0),
/* K21 */ be_nested_str_weak(add_read_sensors_schedule), /* K21 */ be_nested_str_weak(),
/* K22 */ be_nested_str_weak(UPDATE_TIME), /* K22 */ be_nested_str_weak(init),
/* K23 */ be_nested_str_weak(string), /* K23 */ be_nested_str_weak(add_read_sensors_schedule),
/* K24 */ be_nested_str_weak(webserver), /* K24 */ be_nested_str_weak(UPDATE_TIME),
/* K25 */ be_nested_str_weak(html_escape), /* K25 */ be_nested_str_weak(get_name),
/* K26 */ be_nested_str_weak(split), /* K26 */ be_nested_str_weak(filter_name_html),
/* K27 */ be_nested_str_weak(_X23), /* K27 */ be_nested_str_weak(content_send),
/* K28 */ be_const_int(0), /* K28 */ be_nested_str_weak(PREFIX),
/* K29 */ be_nested_str_weak(), /* K29 */ be_nested_str_weak(parse_configuration),
/* K30 */ be_nested_str_weak(get_name), /* K30 */ be_nested_str_weak(ARG),
/* K31 */ be_nested_str_weak(filter_name_html), /* K31 */ be_nested_str_weak(tasmota),
/* K32 */ be_nested_str_weak(content_send), /* K32 */ be_nested_str_weak(Rule_Matcher),
/* K33 */ be_nested_str_weak(PREFIX), /* K33 */ be_nested_str_weak(parse),
/* K34 */ be_nested_str_weak(bool), /* K34 */ be_nested_str_weak(TEMP_C),
/* K35 */ be_nested_str_weak(update_virtual), /* K35 */ be_nested_str_weak(PRESSURE_HPA),
/* K36 */ be_nested_str_weak(VIRTUAL),
/* K37 */ be_nested_str_weak(math),
/* K38 */ be_nested_str_weak(log),
/* K39 */ be_nested_str_weak(MTR_X3A_X20zigbee_received_X20Ox_X2504X_X20attr_list_X3D_X25s_X20type_X28attr_list_X29_X3D_X25s),
/* K40 */ be_nested_str_weak(zigbee_mapper),
/* K41 */ be_nested_str_weak(shortaddr),
/* K42 */ be_const_int(3),
/* K43 */ be_nested_str_weak(key),
/* K44 */ be_nested_str_weak(ZIGBEE_NAME),
/* K45 */ be_nested_str_weak(val),
/* K46 */ be_nested_str_weak(MTR_X3A_X20_X5B_X2502X_X5D_X20_X25s_X20updated_X20_X25s),
/* K47 */ be_nested_str_weak(endpoint),
/* K48 */ be_const_int(1),
}; };
extern const bclass be_class_Matter_Plugin_Sensor; extern const bclass be_class_Matter_Plugin_Sensor;
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_update_virtual, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x88100101, // 0001 GETMBR R4 R0 K1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E000E, // 0005 JMPF R3 #0015
0x600C0004, // 0006 GETGBL R3 G4
0x5C100400, // 0007 MOVE R4 R2
0x7C0C0200, // 0008 CALL R3 1
0x1C0C0702, // 0009 EQ R3 R3 K2
0x780E0003, // 000A JMPF R3 #000F
0x600C0009, // 000B GETGBL R3 G9
0x5C100400, // 000C MOVE R4 R2
0x7C0C0200, // 000D CALL R3 1
0x5C080600, // 000E MOVE R2 R3
0x880C0103, // 000F GETMBR R3 R0 K3
0x200C0602, // 0010 NE R3 R3 R2
0x780E0002, // 0011 JMPF R3 #0015
0x8C0C0104, // 0012 GETMET R3 R0 K4
0x7C0C0200, // 0013 CALL R3 1
0x90020602, // 0014 SETMBR R0 K3 R2
0x600C0003, // 0015 GETGBL R3 G3
0x5C100000, // 0016 MOVE R4 R0
0x7C0C0200, // 0017 CALL R3 1
0x8C0C0705, // 0018 GETMET R3 R3 K5
0x5C140200, // 0019 MOVE R5 R1
0x7C0C0400, // 001A CALL R3 2
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/******************************************************************** /********************************************************************
** Solidified function: parse_status ** Solidified function: parse_status
********************************************************************/ ********************************************************************/
@ -66,24 +130,24 @@ be_local_closure(class_Matter_Plugin_Sensor_parse_status, /* name */
0x540E0009, // 0000 LDINT R3 10 0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3 0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E001E, // 0002 JMPF R3 #0022 0x780E001E, // 0002 JMPF R3 #0022
0x8C0C0300, // 0003 GETMET R3 R1 K0 0x8C0C0306, // 0003 GETMET R3 R1 K6
0x58140001, // 0004 LDCONST R5 K1 0x58140007, // 0004 LDCONST R5 K7
0x7C0C0400, // 0005 CALL R3 2 0x7C0C0400, // 0005 CALL R3 2
0x780E0001, // 0006 JMPF R3 #0009 0x780E0001, // 0006 JMPF R3 #0009
0x940C0301, // 0007 GETIDX R3 R1 K1 0x940C0307, // 0007 GETIDX R3 R1 K7
0x90020403, // 0008 SETMBR R0 K2 R3 0x90021003, // 0008 SETMBR R0 K8 R3
0x8C0C0300, // 0009 GETMET R3 R1 K0 0x8C0C0306, // 0009 GETMET R3 R1 K6
0x58140003, // 000A LDCONST R5 K3 0x58140009, // 000A LDCONST R5 K9
0x7C0C0400, // 000B CALL R3 2 0x7C0C0400, // 000B CALL R3 2
0x780E0001, // 000C JMPF R3 #000F 0x780E0001, // 000C JMPF R3 #000F
0x940C0303, // 000D GETIDX R3 R1 K3 0x940C0309, // 000D GETIDX R3 R1 K9
0x90020803, // 000E SETMBR R0 K4 R3 0x90021403, // 000E SETMBR R0 K10 R3
0x880C0105, // 000F GETMBR R3 R0 K5 0x880C010B, // 000F GETMBR R3 R0 K11
0x780E0010, // 0010 JMPF R3 #0022 0x780E0010, // 0010 JMPF R3 #0022
0x8C0C0106, // 0011 GETMET R3 R0 K6 0x8C0C010C, // 0011 GETMET R3 R0 K12
0x6014000A, // 0012 GETGBL R5 G10 0x6014000A, // 0012 GETGBL R5 G10
0x88180105, // 0013 GETMBR R6 R0 K5 0x8818010B, // 0013 GETMBR R6 R0 K11
0x8C180D07, // 0014 GETMET R6 R6 K7 0x8C180D0D, // 0014 GETMET R6 R6 K13
0x5C200200, // 0015 MOVE R8 R1 0x5C200200, // 0015 MOVE R8 R1
0x7C180400, // 0016 CALL R6 2 0x7C180400, // 0016 CALL R6 2
0x7C140200, // 0017 CALL R5 1 0x7C140200, // 0017 CALL R5 1
@ -91,12 +155,12 @@ be_local_closure(class_Matter_Plugin_Sensor_parse_status, /* name */
0x4C100000, // 0019 LDNIL R4 0x4C100000, // 0019 LDNIL R4
0x20100604, // 001A NE R4 R3 R4 0x20100604, // 001A NE R4 R3 R4
0x78120005, // 001B JMPF R4 #0022 0x78120005, // 001B JMPF R4 #0022
0x88100108, // 001C GETMBR R4 R0 K8 0x88100103, // 001C GETMBR R4 R0 K3
0x20100604, // 001D NE R4 R3 R4 0x20100604, // 001D NE R4 R3 R4
0x78120002, // 001E JMPF R4 #0022 0x78120002, // 001E JMPF R4 #0022
0x8C100109, // 001F GETMET R4 R0 K9 0x8C100104, // 001F GETMET R4 R0 K4
0x7C100200, // 0020 CALL R4 1 0x7C100200, // 0020 CALL R4 1
0x90021003, // 0021 SETMBR R0 K8 R3 0x90020603, // 0021 SETMBR R0 K3 R3
0x80000000, // 0022 RET 0 0x80000000, // 0022 RET 0
}) })
) )
@ -104,46 +168,6 @@ be_local_closure(class_Matter_Plugin_Sensor_parse_status, /* name */
/*******************************************************************/ /*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x8C08030B, // 0000 GETMET R2 R1 K11
0x8810010C, // 0001 GETMBR R4 R0 K12
0x7C080400, // 0002 CALL R2 2
0x90021402, // 0003 SETMBR R0 K10 R2
0x8808010A, // 0004 GETMBR R2 R0 K10
0x780A0005, // 0005 JMPF R2 #000C
0xB80A1A00, // 0006 GETNGBL R2 K13
0x8808050E, // 0007 GETMBR R2 R2 K14
0x8C08050F, // 0008 GETMET R2 R2 K15
0x8810010A, // 0009 GETMBR R4 R0 K10
0x7C080400, // 000A CALL R2 2
0x90020A02, // 000B SETMBR R0 K5 R2
0x88080110, // 000C GETMBR R2 R0 K16
0x90020402, // 000D SETMBR R0 K2 R2
0x88080111, // 000E GETMBR R2 R0 K17
0x90020802, // 000F SETMBR R0 K4 R2
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/******************************************************************** /********************************************************************
** Solidified function: pre_value ** Solidified function: pre_value
********************************************************************/ ********************************************************************/
@ -169,12 +193,12 @@ be_local_closure(class_Matter_Plugin_Sensor_pre_value, /* name */
/******************************************************************** /********************************************************************
** Solidified function: parse_sensors ** Solidified function: filter_name_html
********************************************************************/ ********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_parse_sensors, /* name */ be_local_closure(class_Matter_Plugin_Sensor_filter_name_html, /* name */
be_nested_proto( be_nested_proto(
7, /* nstack */ 9, /* nstack */
2, /* argc */ 1, /* argc */
10, /* varg */ 10, /* varg */
0, /* has upvals */ 0, /* has upvals */
NULL, /* no upvals */ NULL, /* no upvals */
@ -182,42 +206,22 @@ be_local_closure(class_Matter_Plugin_Sensor_parse_sensors, /* name */
NULL, /* no sub protos */ NULL, /* no sub protos */
1, /* has constants */ 1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */ &be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(parse_sensors), be_str_weak(filter_name_html),
&be_const_str_solidified, &be_const_str_solidified,
( &(const binstruction[33]) { /* code */ ( &(const binstruction[13]) { /* code */
0x88080112, // 0000 GETMBR R2 R0 K18 0x8804010E, // 0000 GETMBR R1 R0 K14
0x740A001D, // 0001 JMPT R2 #0020 0x78060009, // 0001 JMPF R1 #000C
0x88080105, // 0002 GETMBR R2 R0 K5 0xA4061E00, // 0002 IMPORT R1 K15
0x780A001B, // 0003 JMPF R2 #0020 0xA40A2000, // 0003 IMPORT R2 K16
0x88080105, // 0004 GETMBR R2 R0 K5 0x8C0C0511, // 0004 GETMET R3 R2 K17
0x8C080507, // 0005 GETMET R2 R2 K7 0x8C140312, // 0005 GETMET R5 R1 K18
0x5C100200, // 0006 MOVE R4 R1 0x881C010E, // 0006 GETMBR R7 R0 K14
0x7C080400, // 0007 CALL R2 2 0x58200013, // 0007 LDCONST R8 K19
0x600C000F, // 0008 GETGBL R3 G15 0x7C140600, // 0008 CALL R5 3
0x5C100400, // 0009 MOVE R4 R2 0x94140B14, // 0009 GETIDX R5 R5 K20
0x60140013, // 000A GETGBL R5 G19 0x7C0C0400, // 000A CALL R3 2
0x7C0C0400, // 000B CALL R3 2 0x80040600, // 000B RET 1 R3
0x780E0003, // 000C JMPF R3 #0011 0x80062A00, // 000C RET 1 K21
0x8C0C050B, // 000D GETMET R3 R2 K11
0x88140113, // 000E GETMBR R5 R0 K19
0x7C0C0400, // 000F CALL R3 2
0x5C080600, // 0010 MOVE R2 R3
0x8C0C0106, // 0011 GETMET R3 R0 K6
0x6014000A, // 0012 GETGBL R5 G10
0x5C180400, // 0013 MOVE R6 R2
0x7C140200, // 0014 CALL R5 1
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E0005, // 0019 JMPF R3 #0020
0x880C0108, // 001A GETMBR R3 R0 K8
0x200C0403, // 001B NE R3 R2 R3
0x780E0002, // 001C JMPF R3 #0020
0x8C0C0109, // 001D GETMET R3 R0 K9
0x7C0C0200, // 001E CALL R3 1
0x90021002, // 001F SETMBR R0 K8 R2
0x80000000, // 0020 RET 0
}) })
) )
); );
@ -268,13 +272,13 @@ be_local_closure(class_Matter_Plugin_Sensor_init, /* name */
0x60100003, // 0000 GETGBL R4 G3 0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0 0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1 0x7C100200, // 0002 CALL R4 1
0x8C100914, // 0003 GETMET R4 R4 K20 0x8C100916, // 0003 GETMET R4 R4 K22
0x5C180200, // 0004 MOVE R6 R1 0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2 0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3 0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4 0x7C100800, // 0007 CALL R4 4
0x8C100315, // 0008 GETMET R4 R1 K21 0x8C100317, // 0008 GETMET R4 R1 K23
0x88180116, // 0009 GETMBR R6 R0 K22 0x88180118, // 0009 GETMBR R6 R0 K24
0x7C100400, // 000A CALL R4 2 0x7C100400, // 000A CALL R4 2
0x80000000, // 000B RET 0 0x80000000, // 000B RET 0
}) })
@ -283,42 +287,6 @@ be_local_closure(class_Matter_Plugin_Sensor_init, /* name */
/*******************************************************************/ /*******************************************************************/
/********************************************************************
** Solidified function: filter_name_html
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_filter_name_html, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(filter_name_html),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x8804010A, // 0000 GETMBR R1 R0 K10
0x78060009, // 0001 JMPF R1 #000C
0xA4062E00, // 0002 IMPORT R1 K23
0xA40A3000, // 0003 IMPORT R2 K24
0x8C0C0519, // 0004 GETMET R3 R2 K25
0x8C14031A, // 0005 GETMET R5 R1 K26
0x881C010A, // 0006 GETMBR R7 R0 K10
0x5820001B, // 0007 LDCONST R8 K27
0x7C140600, // 0008 CALL R5 3
0x94140B1C, // 0009 GETIDX R5 R5 K28
0x7C0C0400, // 000A CALL R3 2
0x80040600, // 000B RET 1 R3
0x80063A00, // 000C RET 1 K29
})
)
);
/*******************************************************************/
/******************************************************************** /********************************************************************
** Solidified function: web_values_prefix ** Solidified function: web_values_prefix
********************************************************************/ ********************************************************************/
@ -336,23 +304,23 @@ be_local_closure(class_Matter_Plugin_Sensor_web_values_prefix, /* name */
be_str_weak(web_values_prefix), be_str_weak(web_values_prefix),
&be_const_str_solidified, &be_const_str_solidified,
( &(const binstruction[20]) { /* code */ ( &(const binstruction[20]) { /* code */
0xA4063000, // 0000 IMPORT R1 K24 0xA4062000, // 0000 IMPORT R1 K16
0x8C08011E, // 0001 GETMET R2 R0 K30 0x8C080119, // 0001 GETMET R2 R0 K25
0x7C080200, // 0002 CALL R2 1 0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2 0x5C0C0400, // 0003 MOVE R3 R2
0x740E0002, // 0004 JMPT R3 #0008 0x740E0002, // 0004 JMPT R3 #0008
0x8C0C011F, // 0005 GETMET R3 R0 K31 0x8C0C011A, // 0005 GETMET R3 R0 K26
0x7C0C0200, // 0006 CALL R3 1 0x7C0C0200, // 0006 CALL R3 1
0x5C080600, // 0007 MOVE R2 R3 0x5C080600, // 0007 MOVE R2 R3
0x8C0C0320, // 0008 GETMET R3 R1 K32 0x8C0C031B, // 0008 GETMET R3 R1 K27
0x60140018, // 0009 GETGBL R5 G24 0x60140018, // 0009 GETGBL R5 G24
0x88180121, // 000A GETMBR R6 R0 K33 0x8818011C, // 000A GETMBR R6 R0 K28
0x780A0003, // 000B JMPF R2 #0010 0x780A0003, // 000B JMPF R2 #0010
0x8C1C0319, // 000C GETMET R7 R1 K25 0x8C1C0311, // 000C GETMET R7 R1 K17
0x5C240400, // 000D MOVE R9 R2 0x5C240400, // 000D MOVE R9 R2
0x7C1C0400, // 000E CALL R7 2 0x7C1C0400, // 000E CALL R7 2
0x70020000, // 000F JMP #0011 0x70020000, // 000F JMP #0011
0x581C001D, // 0010 LDCONST R7 K29 0x581C0015, // 0010 LDCONST R7 K21
0x7C140400, // 0011 CALL R5 2 0x7C140400, // 0011 CALL R5 2
0x7C0C0400, // 0012 CALL R3 2 0x7C0C0400, // 0012 CALL R3 2
0x80000000, // 0013 RET 0 0x80000000, // 0013 RET 0
@ -363,11 +331,11 @@ be_local_closure(class_Matter_Plugin_Sensor_web_values_prefix, /* name */
/******************************************************************** /********************************************************************
** Solidified function: update_virtual ** Solidified function: parse_configuration
********************************************************************/ ********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_update_virtual, /* name */ be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */
be_nested_proto( be_nested_proto(
6, /* nstack */ 5, /* nstack */
2, /* argc */ 2, /* argc */
10, /* varg */ 10, /* varg */
0, /* has upvals */ 0, /* has upvals */
@ -376,37 +344,159 @@ be_local_closure(class_Matter_Plugin_Sensor_update_virtual, /* name */
NULL, /* no sub protos */ NULL, /* no sub protos */
1, /* has constants */ 1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */ &be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(update_virtual), be_str_weak(parse_configuration),
&be_const_str_solidified, &be_const_str_solidified,
( &(const binstruction[28]) { /* code */ ( &(const binstruction[23]) { /* code */
0x8C08030B, // 0000 GETMET R2 R1 K11 0x60080003, // 0000 GETGBL R2 G3
0x88100113, // 0001 GETMBR R4 R0 K19 0x5C0C0000, // 0001 MOVE R3 R0
0x7C080400, // 0002 CALL R2 2 0x7C080200, // 0002 CALL R2 1
0x4C0C0000, // 0003 LDNIL R3 0x8C08051D, // 0003 GETMET R2 R2 K29
0x200C0403, // 0004 NE R3 R2 R3 0x5C100200, // 0004 MOVE R4 R1
0x780E000E, // 0005 JMPF R3 #0015 0x7C080400, // 0005 CALL R2 2
0x600C0004, // 0006 GETGBL R3 G4 0x8C080300, // 0006 GETMET R2 R1 K0
0x5C100400, // 0007 MOVE R4 R2 0x8810011E, // 0007 GETMBR R4 R0 K30
0x7C0C0200, // 0008 CALL R3 1 0x7C080400, // 0008 CALL R2 2
0x1C0C0722, // 0009 EQ R3 R3 K34 0x90021C02, // 0009 SETMBR R0 K14 R2
0x780E0003, // 000A JMPF R3 #000F 0x8808010E, // 000A GETMBR R2 R0 K14
0x600C0009, // 000B GETGBL R3 G9 0x780A0005, // 000B JMPF R2 #0012
0x5C100400, // 000C MOVE R4 R2 0xB80A3E00, // 000C GETNGBL R2 K31
0x7C0C0200, // 000D CALL R3 1 0x88080520, // 000D GETMBR R2 R2 K32
0x5C080600, // 000E MOVE R2 R3 0x8C080521, // 000E GETMET R2 R2 K33
0x880C0108, // 000F GETMBR R3 R0 K8 0x8810010E, // 000F GETMBR R4 R0 K14
0x200C0602, // 0010 NE R3 R3 R2 0x7C080400, // 0010 CALL R2 2
0x780E0002, // 0011 JMPF R3 #0015 0x90021602, // 0011 SETMBR R0 K11 R2
0x8C0C0109, // 0012 GETMET R3 R0 K9 0x88080122, // 0012 GETMBR R2 R0 K34
0x7C0C0200, // 0013 CALL R3 1 0x90021002, // 0013 SETMBR R0 K8 R2
0x90021002, // 0014 SETMBR R0 K8 R2 0x88080123, // 0014 GETMBR R2 R0 K35
0x600C0003, // 0015 GETGBL R3 G3 0x90021402, // 0015 SETMBR R0 K10 R2
0x5C100000, // 0016 MOVE R4 R0 0x80000000, // 0016 RET 0
0x7C0C0200, // 0017 CALL R3 1 })
0x8C0C0723, // 0018 GETMET R3 R3 K35 )
0x5C140200, // 0019 MOVE R5 R1 );
0x7C0C0400, // 001A CALL R3 2 /*******************************************************************/
0x80000000, // 001B RET 0
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_parse_sensors, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(parse_sensors),
&be_const_str_solidified,
( &(const binstruction[33]) { /* code */
0x88080124, // 0000 GETMBR R2 R0 K36
0x740A001D, // 0001 JMPT R2 #0020
0x8808010B, // 0002 GETMBR R2 R0 K11
0x780A001B, // 0003 JMPF R2 #0020
0x8808010B, // 0004 GETMBR R2 R0 K11
0x8C08050D, // 0005 GETMET R2 R2 K13
0x5C100200, // 0006 MOVE R4 R1
0x7C080400, // 0007 CALL R2 2
0x600C000F, // 0008 GETGBL R3 G15
0x5C100400, // 0009 MOVE R4 R2
0x60140013, // 000A GETGBL R5 G19
0x7C0C0400, // 000B CALL R3 2
0x780E0003, // 000C JMPF R3 #0011
0x8C0C0500, // 000D GETMET R3 R2 K0
0x88140101, // 000E GETMBR R5 R0 K1
0x7C0C0400, // 000F CALL R3 2
0x5C080600, // 0010 MOVE R2 R3
0x8C0C010C, // 0011 GETMET R3 R0 K12
0x6014000A, // 0012 GETGBL R5 G10
0x5C180400, // 0013 MOVE R6 R2
0x7C140200, // 0014 CALL R5 1
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E0005, // 0019 JMPF R3 #0020
0x880C0103, // 001A GETMBR R3 R0 K3
0x200C0403, // 001B NE R3 R2 R3
0x780E0002, // 001C JMPF R3 #0020
0x8C0C0104, // 001D GETMET R3 R0 K4
0x7C0C0200, // 001E CALL R3 1
0x90020602, // 001F SETMBR R0 K3 R2
0x80000000, // 0020 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: zigbee_received
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_zigbee_received, /* name */
be_nested_proto(
14, /* nstack */
3, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Plugin_Sensor, /* shared constants */
be_str_weak(zigbee_received),
&be_const_str_solidified,
( &(const binstruction[48]) { /* code */
0xA40E4A00, // 0000 IMPORT R3 K37
0xB8124C00, // 0001 GETNGBL R4 K38
0x60140018, // 0002 GETGBL R5 G24
0x58180027, // 0003 LDCONST R6 K39
0x881C0128, // 0004 GETMBR R7 R0 K40
0x881C0F29, // 0005 GETMBR R7 R7 K41
0x5C200400, // 0006 MOVE R8 R2
0x60240004, // 0007 GETGBL R9 G4
0x5C280400, // 0008 MOVE R10 R2
0x7C240200, // 0009 CALL R9 1
0x7C140800, // 000A CALL R5 4
0x5818002A, // 000B LDCONST R6 K42
0x7C100400, // 000C CALL R4 2
0x58100014, // 000D LDCONST R4 K20
0x6014000C, // 000E GETGBL R5 G12
0x5C180400, // 000F MOVE R6 R2
0x7C140200, // 0010 CALL R5 1
0x14140805, // 0011 LT R5 R4 R5
0x7816001B, // 0012 JMPF R5 #002F
0x94140404, // 0013 GETIDX R5 R2 R4
0x88180B2B, // 0014 GETMBR R6 R5 K43
0x881C012C, // 0015 GETMBR R7 R0 K44
0x1C180C07, // 0016 EQ R6 R6 R7
0x781A0014, // 0017 JMPF R6 #002D
0x8C18010C, // 0018 GETMET R6 R0 K12
0x88200B2D, // 0019 GETMBR R8 R5 K45
0x7C180400, // 001A CALL R6 2
0x601C0013, // 001B GETGBL R7 G19
0x7C1C0000, // 001C CALL R7 0
0x88200101, // 001D GETMBR R8 R0 K1
0x981C1006, // 001E SETIDX R7 R8 R6
0x8C200105, // 001F GETMET R8 R0 K5
0x5C280E00, // 0020 MOVE R10 R7
0x7C200400, // 0021 CALL R8 2
0xB8224C00, // 0022 GETNGBL R8 K38
0x60240018, // 0023 GETGBL R9 G24
0x5828002E, // 0024 LDCONST R10 K46
0x882C012F, // 0025 GETMBR R11 R0 K47
0x88300101, // 0026 GETMBR R12 R0 K1
0x5C340E00, // 0027 MOVE R13 R7
0x7C240800, // 0028 CALL R9 4
0x5828002A, // 0029 LDCONST R10 K42
0x7C200400, // 002A CALL R8 2
0x4C200000, // 002B LDNIL R8
0x80041000, // 002C RET 1 R8
0x00100930, // 002D ADD R4 R4 K48
0x7001FFDE, // 002E JMP #000E
0x80000000, // 002F RET 0
}) })
) )
); );
@ -420,32 +510,33 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor, be_local_class(Matter_Plugin_Sensor,
5, 5,
&be_class_Matter_Plugin_Device, &be_class_Matter_Plugin_Device,
be_nested_map(24, be_nested_map(25,
( (struct bmapnode*) &(const bmapnode[]) { ( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(shadow_value, 19), be_const_var(2) },
{ be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) },
{ be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_status_closure) },
{ be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) },
{ be_const_key_weak(pre_value, 7), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(ARG_HINT, 14), be_nested_str_weak(Filter_X20pattern) },
{ be_const_key_weak(tasmota_sensor_filter, 6), be_const_var(0) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(parse_configuration, 20), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) },
{ be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) },
{ be_const_key_weak(ARG, 11), be_nested_str_weak(filter) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_web_values_prefix_closure) },
{ be_const_key_weak(filter_name_html, 16), be_const_closure(class_Matter_Plugin_Sensor_filter_name_html_closure) },
{ be_const_key_weak(PRESSURE_HPA, -1), be_nested_str_weak(hPa) },
{ be_const_key_weak(init, 5), be_const_closure(class_Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(value_changed, 21), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) },
{ be_const_key_weak(pressure_unit, -1), be_const_var(4) },
{ be_const_key_weak(temp_unit, -1), be_const_var(3) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak() }, { be_const_key_weak(JSON_NAME, -1), be_nested_str_weak() },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(zigbee_received, -1), be_const_closure(class_Matter_Plugin_Sensor_zigbee_received_closure) },
{ be_const_key_weak(parse_status, 2), be_const_closure(class_Matter_Plugin_Sensor_parse_status_closure) },
{ be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) },
{ be_const_key_weak(temp_unit, 23), be_const_var(3) },
{ be_const_key_weak(UPDATE_TIME, 10), be_const_int(5000) },
{ be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) },
{ be_const_key_weak(pressure_unit, -1), be_const_var(4) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) },
{ be_const_key_weak(tasmota_sensor_filter, 1), be_const_var(0) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) },
{ be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) },
{ be_const_key_weak(parse_configuration, 22), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(update_virtual, 14), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) },
{ be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_web_values_prefix_closure) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
{ be_const_key_weak(filter_name_html, 13), be_const_closure(class_Matter_Plugin_Sensor_filter_name_html_closure) },
{ be_const_key_weak(ARG_HINT, 12), be_nested_str_weak(Filter_X20pattern) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(PRESSURE_HPA, -1), be_nested_str_weak(hPa) },
})), })),
be_str_weak(Matter_Plugin_Sensor) be_str_weak(Matter_Plugin_Sensor)
); );

View File

@ -0,0 +1,58 @@
/* Solidification of Matter_Plugin_9_Zigbee_Humidity.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Zigbee_Humidity;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Zigbee_Humidity__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 */
0x60040008, // 0000 GETGBL R1 G8
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Zigbee_Humidity
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
be_local_class(Matter_Plugin_Zigbee_Humidity,
1,
&be_class_Matter_Plugin_Sensor_Humidity,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, 2), be_nested_str_weak(zigbee_device) },
{ be_const_key_weak(ARG_TYPE, 8), be_const_static_closure(class_Matter_Plugin_Zigbee_Humidity__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 7), be_nested_str_weak(Device) },
{ be_const_key_weak(ZIGBEE, 6), be_const_bool(1) },
{ be_const_key_weak(ZIGBEE_NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(VIRTUAL, -1), be_const_bool(1) },
{ be_const_key_weak(zigbee_mapper, -1), be_const_var(0) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Zig_X20Humidity) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(z_humidity) },
})),
be_str_weak(Matter_Plugin_Zigbee_Humidity)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,58 @@
/* Solidification of Matter_Plugin_9_Zigbee_Pressure.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Zigbee_Pressure;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Zigbee_Pressure__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 */
0x60040008, // 0000 GETGBL R1 G8
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Zigbee_Pressure
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
be_local_class(Matter_Plugin_Zigbee_Pressure,
1,
&be_class_Matter_Plugin_Sensor_Pressure,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, 2), be_nested_str_weak(zigbee_device) },
{ be_const_key_weak(ARG_TYPE, 8), be_const_static_closure(class_Matter_Plugin_Zigbee_Pressure__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 7), be_nested_str_weak(Device) },
{ be_const_key_weak(ZIGBEE, 6), be_const_bool(1) },
{ be_const_key_weak(ZIGBEE_NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(VIRTUAL, -1), be_const_bool(1) },
{ be_const_key_weak(zigbee_mapper, -1), be_const_var(0) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Zig_X20Pressure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(z_pressure) },
})),
be_str_weak(Matter_Plugin_Zigbee_Pressure)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,58 @@
/* Solidification of Matter_Plugin_9_Zigbee_Temperature.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Zigbee_Temperature;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Zigbee_Temperature__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 */
0x60040008, // 0000 GETGBL R1 G8
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Zigbee_Temperature
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
be_local_class(Matter_Plugin_Zigbee_Temperature,
1,
&be_class_Matter_Plugin_Sensor_Temp,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, 2), be_nested_str_weak(zigbee_device) },
{ be_const_key_weak(ARG_TYPE, 8), be_const_static_closure(class_Matter_Plugin_Zigbee_Temperature__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 7), be_nested_str_weak(Device) },
{ be_const_key_weak(ZIGBEE, 6), be_const_bool(1) },
{ be_const_key_weak(ZIGBEE_NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(VIRTUAL, -1), be_const_bool(1) },
{ be_const_key_weak(zigbee_mapper, -1), be_const_var(0) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Zig_X20Temperature) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(z_temp) },
})),
be_str_weak(Matter_Plugin_Zigbee_Temperature)
);
/********************************************************************/
/* End of solidification */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,456 @@
/* Solidification of Matter_z_Zigbee.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
// compact class 'Matter_Zigbee_Mapper' ktab size: 21, total: 32 (saved 88 bytes)
static const bvalue be_ktab_class_Matter_Zigbee_Mapper[21] = {
/* K0 */ be_nested_str_weak(zigbee),
/* K1 */ be_nested_str_weak(device_arg),
/* K2 */ be_nested_str_weak(shortaddr),
/* K3 */ be_nested_str_weak(zigbee_device),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(log),
/* K6 */ be_nested_str_weak(MTR_X3A_X20cannot_X20find_X20zigbee_X20device_X20_X27_X25s_X27),
/* K7 */ be_const_int(3),
/* K8 */ be_nested_str_weak(string),
/* K9 */ be_nested_str_weak(pi),
/* K10 */ be_nested_str_weak(ARG),
/* K11 */ be_nested_str_weak(startswith),
/* K12 */ be_nested_str_weak(0x),
/* K13 */ be_nested_str_weak(0X),
/* K14 */ be_nested_str_weak(tasmota),
/* K15 */ be_nested_str_weak(set_timer),
/* K16 */ be_nested_str_weak(resolve_zb_device),
/* K17 */ be_nested_str_weak(info),
/* K18 */ be_nested_str_weak(read_zb_info),
/* K19 */ be_nested_str_weak(MTR_X3A_X20Read_X20information_X20for_X20zigbee_X20device_X200x_X2504X),
/* K20 */ be_nested_str_weak(zigbee_received),
};
extern const bclass be_class_Matter_Zigbee_Mapper;
/********************************************************************
** Solidified function: resolve_zb_device
********************************************************************/
be_local_closure(class_Matter_Zigbee_Mapper_resolve_zb_device, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee_Mapper, /* shared constants */
be_str_weak(resolve_zb_device),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x4C0C0000, // 0002 LDNIL R3
0x1C080403, // 0003 EQ R2 R2 R3
0x780A0001, // 0004 JMPF R2 #0007
0x50080000, // 0005 LDBOOL R2 0 0
0x80040400, // 0006 RET 1 R2
0x88080102, // 0007 GETMBR R2 R0 K2
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
0x780A0001, // 000A JMPF R2 #000D
0x50080200, // 000B LDBOOL R2 1 0
0x80040400, // 000C RET 1 R2
0x8C080304, // 000D GETMET R2 R1 K4
0x88100101, // 000E GETMBR R4 R0 K1
0x7C080400, // 000F CALL R2 2
0x90020602, // 0010 SETMBR R0 K3 R2
0x88080103, // 0011 GETMBR R2 R0 K3
0x780A0005, // 0012 JMPF R2 #0019
0x88080103, // 0013 GETMBR R2 R0 K3
0x88080502, // 0014 GETMBR R2 R2 K2
0x90020402, // 0015 SETMBR R0 K2 R2
0x50080200, // 0016 LDBOOL R2 1 0
0x80040400, // 0017 RET 1 R2
0x70020008, // 0018 JMP #0022
0xB80A0A00, // 0019 GETNGBL R2 K5
0x600C0018, // 001A GETGBL R3 G24
0x58100006, // 001B LDCONST R4 K6
0x88140101, // 001C GETMBR R5 R0 K1
0x7C0C0400, // 001D CALL R3 2
0x58100007, // 001E LDCONST R4 K7
0x7C080400, // 001F CALL R2 2
0x50080000, // 0020 LDBOOL R2 0 0
0x80040400, // 0021 RET 1 R2
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
be_local_closure(class_Matter_Zigbee_Mapper_parse_configuration, /* name */
be_nested_proto(
8, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
1, /* has sup protos */
( &(const struct bproto*[ 1]) {
be_nested_proto(
2, /* nstack */
0, /* argc */
0, /* varg */
1, /* has upvals */
( &(const bupvaldesc[ 1]) { /* upvals */
be_local_const_upval(1, 0),
}),
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(probe_zb_values),
}),
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x68000000, // 0000 GETUPV R0 U0
0x8C000100, // 0001 GETMET R0 R0 K0
0x7C000200, // 0002 CALL R0 1
0x80040000, // 0003 RET 1 R0
})
),
}),
1, /* has constants */
&be_ktab_class_Matter_Zigbee_Mapper, /* shared constants */
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[38]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0xA40E1000, // 0001 IMPORT R3 K8
0x8C100304, // 0002 GETMET R4 R1 K4
0x88180109, // 0003 GETMBR R6 R0 K9
0x88180D0A, // 0004 GETMBR R6 R6 K10
0x4C1C0000, // 0005 LDNIL R7
0x7C100600, // 0006 CALL R4 3
0x90020204, // 0007 SETMBR R0 K1 R4
0x60100004, // 0008 GETGBL R4 G4
0x88140101, // 0009 GETMBR R5 R0 K1
0x7C100200, // 000A CALL R4 1
0x1C100908, // 000B EQ R4 R4 K8
0x7812000D, // 000C JMPF R4 #001B
0x8C10070B, // 000D GETMET R4 R3 K11
0x88180101, // 000E GETMBR R6 R0 K1
0x581C000C, // 000F LDCONST R7 K12
0x7C100600, // 0010 CALL R4 3
0x74120004, // 0011 JMPT R4 #0017
0x8C10070B, // 0012 GETMET R4 R3 K11
0x88180101, // 0013 GETMBR R6 R0 K1
0x581C000D, // 0014 LDCONST R7 K13
0x7C100600, // 0015 CALL R4 3
0x78120003, // 0016 JMPF R4 #001B
0x60100009, // 0017 GETGBL R4 G9
0x88140101, // 0018 GETMBR R5 R0 K1
0x7C100200, // 0019 CALL R4 1
0x90020204, // 001A SETMBR R0 K1 R4
0x88100101, // 001B GETMBR R4 R0 K1
0x4C140000, // 001C LDNIL R5
0x20100805, // 001D NE R4 R4 R5
0x78120004, // 001E JMPF R4 #0024
0xB8121C00, // 001F GETNGBL R4 K14
0x8C10090F, // 0020 GETMET R4 R4 K15
0x541A0063, // 0021 LDINT R6 100
0x841C0000, // 0022 CLOSURE R7 P0
0x7C100600, // 0023 CALL R4 3
0xA0000000, // 0024 CLOSE R0
0x80000000, // 0025 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_zb_info
********************************************************************/
be_local_closure(class_Matter_Zigbee_Mapper_read_zb_info, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee_Mapper, /* shared constants */
be_str_weak(read_zb_info),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0x8C040110, // 0000 GETMET R1 R0 K16
0x7C040200, // 0001 CALL R1 1
0x78060009, // 0002 JMPF R1 #000D
0xA4060000, // 0003 IMPORT R1 K0
0x8C080304, // 0004 GETMET R2 R1 K4
0x88100102, // 0005 GETMBR R4 R0 K2
0x7C080400, // 0006 CALL R2 2
0x4C0C0000, // 0007 LDNIL R3
0x200C0403, // 0008 NE R3 R2 R3
0x780E0002, // 0009 JMPF R3 #000D
0x8C0C0511, // 000A GETMET R3 R2 K17
0x7C0C0200, // 000B CALL R3 1
0x80040600, // 000C RET 1 R3
0x80000000, // 000D RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(class_Matter_Zigbee_Mapper_init, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee_Mapper, /* shared constants */
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x90021201, // 0000 SETMBR R0 K9 R1
0x80000000, // 0001 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: probe_zb_values
********************************************************************/
be_local_closure(class_Matter_Zigbee_Mapper_probe_zb_values, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee_Mapper, /* shared constants */
be_str_weak(probe_zb_values),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C040112, // 0000 GETMET R1 R0 K18
0x7C040200, // 0001 CALL R1 1
0x4C080000, // 0002 LDNIL R2
0x20080202, // 0003 NE R2 R1 R2
0x780A000B, // 0004 JMPF R2 #0011
0xB80A0A00, // 0005 GETNGBL R2 K5
0x600C0018, // 0006 GETGBL R3 G24
0x58100013, // 0007 LDCONST R4 K19
0x88140102, // 0008 GETMBR R5 R0 K2
0x7C0C0400, // 0009 CALL R3 2
0x58100007, // 000A LDCONST R4 K7
0x7C080400, // 000B CALL R2 2
0x88080109, // 000C GETMBR R2 R0 K9
0x8C080514, // 000D GETMET R2 R2 K20
0x4C100000, // 000E LDNIL R4
0x5C140200, // 000F MOVE R5 R1
0x7C080600, // 0010 CALL R2 3
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Zigbee_Mapper
********************************************************************/
be_local_class(Matter_Zigbee_Mapper,
4,
NULL,
be_nested_map(9,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shortaddr, -1), be_const_var(3) },
{ be_const_key_weak(resolve_zb_device, -1), be_const_closure(class_Matter_Zigbee_Mapper_resolve_zb_device_closure) },
{ be_const_key_weak(device_arg, -1), be_const_var(1) },
{ be_const_key_weak(read_zb_info, -1), be_const_closure(class_Matter_Zigbee_Mapper_read_zb_info_closure) },
{ be_const_key_weak(zigbee_device, -1), be_const_var(2) },
{ be_const_key_weak(probe_zb_values, 3), be_const_closure(class_Matter_Zigbee_Mapper_probe_zb_values_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Zigbee_Mapper_init_closure) },
{ be_const_key_weak(parse_configuration, 5), be_const_closure(class_Matter_Zigbee_Mapper_parse_configuration_closure) },
{ be_const_key_weak(pi, -1), be_const_var(0) },
})),
be_str_weak(Matter_Zigbee_Mapper)
);
/********************************************************************
** Solidified function: matter_zigbee_init
********************************************************************/
be_local_closure(matter_zigbee_init, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
0, /* 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(Matter_Zigbee),
}),
be_str_weak(matter_zigbee_init),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
// compact class 'Matter_Zigbee' ktab size: 11, total: 12 (saved 8 bytes)
static const bvalue be_ktab_class_Matter_Zigbee[11] = {
/* K0 */ be_nested_str_weak(zigbee),
/* K1 */ be_nested_str_weak(device),
/* K2 */ be_nested_str_weak(add_handler),
/* K3 */ be_nested_str_weak(plugins),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(ZIGBEE),
/* K6 */ be_nested_str_weak(zigbee_mapper),
/* K7 */ be_nested_str_weak(resolve_zb_device),
/* K8 */ be_nested_str_weak(shortaddr),
/* K9 */ be_nested_str_weak(zigbee_received),
/* K10 */ be_const_int(1),
};
extern const bclass be_class_Matter_Zigbee;
/********************************************************************
** Solidified function: init
********************************************************************/
be_local_closure(class_Matter_Zigbee_init, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee, /* shared constants */
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 6]) { /* code */
0xA40A0000, // 0000 IMPORT R2 K0
0x90020201, // 0001 SETMBR R0 K1 R1
0x8C0C0502, // 0002 GETMET R3 R2 K2
0x5C140000, // 0003 MOVE R5 R0
0x7C0C0400, // 0004 CALL R3 2
0x80000000, // 0005 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: attributes_final
********************************************************************/
be_local_closure(class_Matter_Zigbee_attributes_final, /* name */
be_nested_proto(
12, /* nstack */
5, /* argc */
10, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL, /* no sub protos */
1, /* has constants */
&be_ktab_class_Matter_Zigbee, /* shared constants */
be_str_weak(attributes_final),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x88140101, // 0000 GETMBR R5 R0 K1
0x88140B03, // 0001 GETMBR R5 R5 K3
0x58180004, // 0002 LDCONST R6 K4
0x601C000C, // 0003 GETGBL R7 G12
0x5C200A00, // 0004 MOVE R8 R5
0x7C1C0200, // 0005 CALL R7 1
0x141C0C07, // 0006 LT R7 R6 R7
0x781E0012, // 0007 JMPF R7 #001B
0x941C0A06, // 0008 GETIDX R7 R5 R6
0x88200F05, // 0009 GETMBR R8 R7 K5
0x7822000D, // 000A JMPF R8 #0019
0x88200F06, // 000B GETMBR R8 R7 K6
0x7822000B, // 000C JMPF R8 #0019
0x88200F06, // 000D GETMBR R8 R7 K6
0x8C201107, // 000E GETMET R8 R8 K7
0x7C200200, // 000F CALL R8 1
0x78220007, // 0010 JMPF R8 #0019
0x88200F06, // 0011 GETMBR R8 R7 K6
0x88201108, // 0012 GETMBR R8 R8 K8
0x1C201004, // 0013 EQ R8 R8 R4
0x78220003, // 0014 JMPF R8 #0019
0x8C200F09, // 0015 GETMET R8 R7 K9
0x5C280400, // 0016 MOVE R10 R2
0x5C2C0600, // 0017 MOVE R11 R3
0x7C200600, // 0018 CALL R8 3
0x00180D0A, // 0019 ADD R6 R6 K10
0x7001FFE7, // 001A JMP #0003
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Zigbee
********************************************************************/
be_local_class(Matter_Zigbee,
1,
NULL,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, 3), be_const_closure(class_Matter_Zigbee_init_closure) },
{ be_const_key_weak(Matter_Zigbee_Mapper, 4), be_const_class(be_class_Matter_Zigbee_Mapper) },
{ be_const_key_weak(attributes_final, -1), be_const_closure(class_Matter_Zigbee_attributes_final_closure) },
{ be_const_key_weak(_CLASSES_TYPES, -1), be_nested_str_weak(_X2Dzigbee_X7Cz_temp_X7Cz_pressure_X7Cz_humidity) },
{ be_const_key_weak(device, -1), be_const_var(0) },
})),
be_str_weak(Matter_Zigbee)
);
/********************************************************************
** Solidified module: matter_zigbee
********************************************************************/
be_local_module(matter_zigbee,
"matter_zigbee",
be_nested_map(2,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(Matter_Zigbee, -1), be_const_class(be_class_Matter_Zigbee) },
{ be_const_key_weak(init, 0), be_const_closure(matter_zigbee_init_closure) },
}))
);
BE_EXPORT_VARIABLE be_define_const_native_module(matter_zigbee);
/********************************************************************/
/********************************************************************/
/* End of solidification */