Matter refactoring of bridged devices (#21575)

This commit is contained in:
s-hadinger 2024-06-05 23:13:48 +02:00 committed by GitHub
parent e198ffb22d
commit 0bcb981556
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
112 changed files with 8951 additions and 13102 deletions

View File

@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
### Breaking Changed
### Changed
- Matter refactoring of bridged devices
### Fixed
- Berry `input()` returns empty string and does not crash

View File

@ -227,11 +227,11 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_1_Root.h"
#include "solidify/solidified_Matter_Plugin_1_Aggregator.h"
#include "solidify/solidified_Matter_Plugin_1_Device.h"
#include "solidify/solidified_Matter_Plugin_2_OnOff.h"
#include "solidify/solidified_Matter_Plugin_3_OnOff.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_OnOff.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_Air_Quality.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Air_Quality.h"
#include "solidify/solidified_Matter_Plugin_3_Light0.h"
#include "solidify/solidified_Matter_Plugin_2_Light0.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Light0.h"
#include "solidify/solidified_Matter_Plugin_2_Light1.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Light1.h"
@ -259,22 +259,20 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Contact.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_2_Bridge_HTTP.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_OnOff.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Light0.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Light1.h"
#include "solidify/solidified_Matter_Plugin_5_Bridge_Light2.h"
#include "solidify/solidified_Matter_Plugin_5_Bridge_Light3.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Pressure.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Temp.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Humidity.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Contact.h"
#include "solidify/solidified_Matter_Plugin_4_Bridge_Sensor_Flow.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Air_Quality.h"
#include "solidify/solidified_Matter_Plugin_3_Bridge_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Light0.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Light1.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Light2.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Light3.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Pressure.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Temp.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Humidity.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Contact.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Flow.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Air_Quality.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_z_All.h"
#include "solidify/solidified_Matter_zz_Device.h"
@ -462,7 +460,7 @@ module matter (scope: global, strings: weak) {
// Plugins - only the core classes, all others are taken from `matter_device.plugins_classes`
Plugin_Root, class(be_class_Matter_Plugin_Root) // Generic behavior common to all devices
Plugin_Aggregator, class(be_class_Matter_Plugin_Aggregator) // Aggregator
Plugin_Bridge_HTTP, class(be_class_Matter_Plugin_Bridge_HTTP) // HTTP bridge superclass
Plugin_Device, class(be_class_Matter_Plugin_Device) // Device
}
@const_object_info_end */

View File

@ -49,6 +49,23 @@ class Matter_HTTP_remote : Matter_HTTP_async
# `nil` if current request is synchronous
var reachable # is the device reachable
var reachable_utc # last tick when the reachability was seen (avoids sending superfluous ping commands)
static var STATUS_PREFIX = [
"Status", # 0
"StatusPRM", # 1
"StatusFWR", # 2
"StatusLOG", # 3
"StatusMEM", # 4
"StatusNET", # 5
"StatusMQT", # 6
"StatusTIM", # 7
nil, # 8 is deprecated and synonym of 10
"StatusPTH", # 9
"StatusSNS", # 10
"StatusSTS", # 11
"StatusSTK", # 12
"StatusSHT" # 13
]
# information gathered about the remote device (name, version...)
static var UPDATE_TIME = 5000 # update every 5s until first response
@ -73,9 +90,9 @@ class Matter_HTTP_remote : Matter_HTTP_async
self.info = {}
if self.device
# we need different callbacks per command (don't create a single one for both calls)
self.add_schedule(self.UPDATE_CMD0, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd))
self.add_schedule(self.UPDATE_CMD2, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd))
self.add_schedule(self.UPDATE_CMD5, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response(status,payload,cmd))
self.add_schedule(self.UPDATE_CMD0, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http))
self.add_schedule(self.UPDATE_CMD2, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http))
self.add_schedule(self.UPDATE_CMD5, self.UPDATE_TIME, / status,payload,cmd -> self.parse_status_response_and_call_method(status,payload,cmd,self,self.parse_status_http))
end
end
@ -87,28 +104,40 @@ class Matter_HTTP_remote : Matter_HTTP_async
#############################################################
# parse response for `Status` and `Status 2`
def parse_status_response(status, payload, cmd)
#
# Payload can be a string (unparsed) or a map
def parse_status_response_and_call_method(status, payload, cmd, obj, method)
if status != nil && status > 0
# device is known to be reachable
self.device_is_alive(true)
import json
var j = json.load(payload)
var code = nil # index of Status
if j
# filter
if j.contains("Status") # Status 0 (actually `Status` wihtout any number)
j = j["Status"]
code = 0
elif j.contains("StatusFWR") # Status 2
j = j["StatusFWR"]
code = 2
elif j.contains("StatusNET") # Status 5
j = j["StatusNET"]
code = 5
var j = payload
if type(j) == 'string'
import json
j = json.load(j)
end
var code = nil # index of Status, nil of none
if j != nil
# detect any Status prefix and compute Status<code>
var i = 0
var prefix_tab = self.STATUS_PREFIX # move to local variable to avoid many dereferencing
while i < size(prefix_tab)
var status_prefix = prefix_tab[i]
if status_prefix != nil
if j.contains(status_prefix)
j = j[status_prefix]
code = i
break
end
end
i = i + 1
end
# convert to shadow values
self.parse_update(j, code) # call parser
# dispatch to method in charge of converting to shadow values
method(obj, j, code)
else
tasmota.log(f"MTR: *** failed to parse JSON response {payload=}", 3)
end
end
end
@ -116,8 +145,8 @@ class Matter_HTTP_remote : Matter_HTTP_async
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
# This call is synchronous and blocking.
def parse_status_http(data, index)
var changed = false
if index == 0 # Status
var device_name = data.find("DeviceName") # we consider 'Tasmota' as the non-information default
@ -254,7 +283,7 @@ class Matter_HTTP_remote : Matter_HTTP_async
self.current_cmd = cmd
var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+')
tasmota.log(format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 3)
tasmota.log(format("MTR: HTTP async request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 4)
var ret = self.begin(cmd_url)
end
@ -273,7 +302,7 @@ class Matter_HTTP_remote : Matter_HTTP_async
self.current_cmd = nil
var cmd_url = "/cm?cmnd=" + string.tr(cmd, ' ', '+')
tasmota.log(format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 3)
tasmota.log(format("MTR: HTTP sync request 'http://%s:%i%s'", self.addr, self.port, cmd_url), 4)
var ret = super(self).begin_sync(cmd_url, timeout)
var payload_short = (ret) ? ret : 'nil'
if size(payload_short) > 30 payload_short = payload_short[0..29] + '...' end

View File

@ -34,6 +34,7 @@ class Matter_Plugin
# Behavior of the plugin, frequency at which `update_shadow()` is called
static var UPDATE_TIME = 5000 # default is every 5 seconds
static var VIRTUAL = false # set to true only for virtual devices
static var BRIDGE = false # set to true only for bridged devices (ESP8266 or OpenBK)
var update_next # next timestamp for update
# Configuration of the plugin: clusters and type
static var CLUSTERS = matter.consolidate_clusters(_class, {
@ -143,14 +144,14 @@ class Matter_Plugin
# Returns true if it's a local device, or false for a
# remotely device controlled via HTTP
def is_local_device()
return true
return !(self.BRIDGE)
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This method should collect the data from the local or remote device
# and call `parse_update(<data>)` when data is available.
# and call `parse_status(<data>)` when data is available.
#
# TO BE OVERRIDDEN
# This call is synnchronous and blocking.

View File

@ -19,9 +19,23 @@
import matter
#@ solidify:Matter_Plugin_Device.GetOptionReader,weak
#@ solidify:Matter_Plugin_Device,weak
class Matter_Plugin_Device : Matter_Plugin
# Following arguments are specific to bridge devices
# static var TYPE = "" # name of the plug-in in json
# static var DISPLAY_NAME = "" # display name of the plug-in
# static var ARG = "" # additional argument name (or empty if none)
static var ARG_HTTP = "url" # domain name
# static var UPDATE_TIME = 3000 # update every 3s
static var UPDATE_CMD = "Status 11" # command to send for updates
static var PROBE_TIMEOUT = 1700 # timeout of 1800 ms for probing, which gives at least 1s for TCP recovery
static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing
var http_remote # instance of Matter_HTTP_remote
# clusters for general devices
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
0x0039: [3,5,0x0A,0x0F,0x11,0x12], # Bridged Device Basic Information 9.13 p.485
@ -38,6 +52,18 @@ class Matter_Plugin_Device : Matter_Plugin
# var tick # tick value when it was last updated
# var node_label # name of the endpoint, used only in bridge mode, "" if none
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
if self.BRIDGE
var addr = arguments.find(self.ARG_HTTP)
self.http_remote = self.device.register_http_remote(addr, self.PROBE_TIMEOUT)
self.register_cmd_cb()
end
end
#############################################################
# read an attribute
#
@ -86,24 +112,55 @@ class Matter_Plugin_Device : Matter_Plugin
end
# ====================================================================================================
elif cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ==========
elif cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ==========
import string
if attribute == 0x0003 # ---------- ProductName / string ----------
return tlv_solo.set(TLV.UTF1, tasmota.cmd("DeviceName", true)['DeviceName'])
if self.BRIDGE
var name = self.http_remote.get_info().find("name")
if name
return tlv_solo.set(TLV.UTF1, name)
else
return tlv_solo.set(TLV.NULL, nil)
end
else
return tlv_solo.set(TLV.UTF1, tasmota.cmd("DeviceName", true)['DeviceName'])
end
elif attribute == 0x0005 # ---------- NodeLabel / string ----------
return tlv_solo.set(TLV.UTF1, self.get_name())
elif attribute == 0x000A # ---------- SoftwareVersionString / string ----------
var version_full = tasmota.cmd("Status 2", true)['StatusFWR']['Version']
var version_end = string.find(version_full, '(')
if version_end > 0 version_full = version_full[0..version_end - 1] end
return tlv_solo.set(TLV.UTF1, version_full)
elif attribute == 0x000F # ---------- SerialNumber / string ----------
return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", ""))
if self.BRIDGE
var version_full = self.http_remote.get_info().find("version")
if version_full
var version_end = string.find(version_full, '(')
if version_end > 0 version_full = version_full[0..version_end - 1] end
return tlv_solo.set(TLV.UTF1, version_full)
else
return tlv_solo.set(TLV.NULL, nil)
end
else
var version_full = tasmota.cmd("Status 2", true)['StatusFWR']['Version']
var version_end = string.find(version_full, '(')
if version_end > 0 version_full = version_full[0..version_end - 1] end
return tlv_solo.set(TLV.UTF1, version_full)
end
elif attribute == 0x000F || attribute == 0x0012 # ---------- SerialNumber / string ----------
if self.BRIDGE
var mac = self.http_remote.get_info().find("mac")
if mac
return tlv_solo.set(TLV.UTF1, mac)
else
return tlv_solo.set(TLV.NULL, nil)
end
else
return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", ""))
end
elif attribute == 0x0011 # ---------- Reachable / bool ----------
return tlv_solo.set(TLV.BOOL, 1) # by default we are reachable
elif attribute == 0x0012 # ---------- UniqueID / string 32 max ----------
return tlv_solo.set(TLV.UTF1, tasmota.wifi().find("mac", ""))
if self.BRIDGE
return tlv_solo.set(TLV.BOOL, self.http_remote.reachable) # TODO find a way to do a ping
else
return tlv_solo.set(TLV.BOOL, 1) # by default we are reachable
end
end
end
@ -213,6 +270,154 @@ class Matter_Plugin_Device : Matter_Plugin
return ret
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# register_cmd_cb
#
# Register recurrent command and callback
# Defined as a separate method to allow override
def register_cmd_cb()
self.http_remote.add_schedule(self.UPDATE_CMD, self.UPDATE_TIME,
/ status,payload,cmd -> self.parse_http_response(status,payload,cmd))
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This method should collect the data from the local or remote device
# and call `parse_status(<data>, <index>)` when data is available.
def update_shadow()
if self.BRIDGE && self.tick != self.device.tick # don't force an update if we just received it
var ret = self.call_remote_sync(self.UPDATE_CMD)
if ret
self.parse_http_response(1, ret, self.UPDATE_CMD)
end
end
self.tick = self.device.tick
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
def parse_status(data, index)
end
#############################################################
# call_remote_sync
#
# Call a remote Tasmota device, returns Berry native map or nil
# arg can be nil, in this case `cmd` has it all
def call_remote_sync(cmd, arg)
if self.BRIDGE
# if !self.http_remote return nil end
import json
var retry = 2 # try 2 times if first failed
if arg != nil cmd = cmd + ' ' + str(arg) end
while retry > 0
var ret = self.http_remote.call_sync(cmd, self.SYNC_TIMEOUT)
if ret != nil
self.http_remote.device_is_alive(true)
var j = json.load(ret)
return j
end
retry -= 1
tasmota.log("MTR: HTTP GET retrying", 3)
end
self.http_remote.device_is_alive(false)
return nil
end
end
#############################################################
# parse_http_response
#
# Parse response from HTTP API and update shadows
# We support:
# `Status 8`: {"StatusSNS":{ [...] }}
# `Status 11`: {"StatusSTS":{ [...] }}
# `Status 13`: {"StatusSHT":{ [...] }}
def parse_http_response(status, payload, cmd)
if self.BRIDGE
self.tick = self.device.tick # avoid new force update in same tick
self.http_remote.parse_status_response_and_call_method(status, payload, cmd, self, self.parse_status)
end
end
#############################################################
# every_250ms
#
# check if the timer expired and update_shadow() needs to be called
def every_250ms()
if self.BRIDGE
self.http_remote.scheduler() # defer to HTTP scheduler
# avoid calling update_shadow() since it's not applicable for HTTP remote
else
super(self).every_250ms()
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
static var PREFIX = "| <i>%s</i> "
def web_values()
import webserver
self.web_values_prefix()
webserver.content_send("&lt;-- (" + self.DISPLAY_NAME + ") --&gt;")
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
# Show on/off value as html
def web_value_onoff(onoff)
var onoff_html = (onoff != nil ? (onoff ? "<b>On</b>" : "Off") : "")
return onoff_html
end
#############################################################
# GetOption reader to decode `SetOption<x>` values from `Status 3`
static class GetOptionReader
var flag, flag2, flag3, flag4, flag5, flag6
def init(j)
if j == nil raise "value_error", "invalid json" end
var so = j['SetOption']
self.flag = bytes().fromhex(so[0]).reverse()
self.flag2 = bytes().fromhex(so[1])
self.flag3 = bytes().fromhex(so[2]).reverse()
self.flag4 = bytes().fromhex(so[3]).reverse()
self.flag5 = bytes().fromhex(so[4]).reverse()
self.flag6 = bytes().fromhex(so[5]).reverse()
end
def getoption(x)
if x < 32 # SetOption0 .. 31 = Settings->flag
return self.flag.getbits(x, 1)
elif x < 50 # SetOption32 .. 49 = Settings->param
return self.flag2.get(x - 32, 1)
elif x < 82 # SetOption50 .. 81 = Settings->flag3
return self.flag3.getbits(x - 50, 1)
elif x < 114 # SetOption82 .. 113 = Settings->flag4
return self.flag4.getbits(x - 82, 1)
elif x < 146 # SetOption114 .. 145 = Settings->flag5
return self.flag5.getbits(x - 114, 1)
elif x < 178 # SetOption146 .. 177 = Settings->flag6
return self.flag6.getbits(x - 146, 1)
end
end
end
#############################################################
#############################################################
#######################################################################
# _parse_sensor_entry: internal helper function
#

View File

@ -1,296 +0,0 @@
#
# Matter_Plugin_Bridge_HTTP.be - implements base class for a Bridge via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_HTTP.GetOptionReader,weak
#@ solidify:Matter_Plugin_Bridge_HTTP,weak
class Matter_Plugin_Bridge_HTTP : Matter_Plugin_Device
static var TYPE = "" # name of the plug-in in json
static var DISPLAY_NAME = "" # display name of the plug-in
static var ARG = "" # additional argument name (or empty if none)
static var ARG_HTTP = "url" # domain name
static var UPDATE_TIME = 3000 # update every 3s
static var UPDATE_CMD = "Status 11" # command to send for updates
static var PROBE_TIMEOUT = 1700 # timeout of 1800 ms for probing, which gives at least 1s for TCP recovery
static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing
# static var CLUSTERS = {
# # 0x001D: inherited # Descriptor Cluster 9.5 p.453
# # 0x0003: inherited # Identify 1.2 p.16
# # 0x0004: inherited # Groups 1.3 p.21
# # 0x0005: inherited # Scenes 1.4 p.30 - no writable
# # 0x0006: [0], # On/Off 1.5 p.48
# # 0x0028: [0,1,2,3,4,5,6,7,8,9,0x0A,0x0F,0x12,0x13],# Basic Information Cluster cluster 11.1 p.565
# # 0x0039: [0x11] # Bridged Device Basic Information 9.13 p.485
# }
var http_remote # instance of Matter_HTTP_remote
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
var addr = arguments.find(self.ARG_HTTP)
self.http_remote = self.device.register_http_remote(addr, self.PROBE_TIMEOUT)
self.register_cmd_cb()
end
#############################################################
# is_local_device
#
# Returns true if it's a local device, or false for a
# remotely device controlled via HTTP
def is_local_device()
return false
end
#############################################################
# register_cmd_cb
#
# Register recurrent command and callback
# Defined as a separate method to allow override
def register_cmd_cb()
self.http_remote.add_schedule(self.UPDATE_CMD, self.UPDATE_TIME,
/ status,payload,cmd -> self.parse_http_response(status,payload,cmd))
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This method should collect the data from the local or remote device
# and call `parse_update(<data>)` when data is available.
def update_shadow()
self.tick = self.device.tick
var ret = self.call_remote_sync(self.UPDATE_CMD)
if ret
self.parse_http_response(1, ret, self.UPDATE_CMD)
end
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
def parse_update(data, index)
end
#############################################################
# call_remote_sync
#
# Call a remote Tasmota device, returns Berry native map or nil
# arg can be nil, in this case `cmd` has it all
def call_remote_sync(cmd, arg)
# if !self.http_remote return nil end
import json
var retry = 2 # try 2 times if first failed
if arg != nil cmd = cmd + ' ' + str(arg) end
while retry > 0
var ret = self.http_remote.call_sync(cmd, self.SYNC_TIMEOUT)
if ret != nil
self.http_remote.device_is_alive(true)
var j = json.load(ret)
return j
end
retry -= 1
tasmota.log("MTR: HTTP GET retrying", 3)
end
self.http_remote.device_is_alive(false)
return nil
end
#############################################################
# parse_http_response
#
# Parse response from HTTP API and update shadows
# We support:
# `Status 8`: {"StatusSNS":{ [...] }}
# `Status 11`: {"StatusSTS":{ [...] }}
# `Status 13`: {"StatusSHT":{ [...] }}
def parse_http_response(status, payload, cmd)
if status > 0
# device is known to be reachable
self.http_remote.device_is_alive(true)
var tick = self.device.tick
import json
var j = json.load(payload)
var code = nil # index of Status
if j
# filter
if j.contains("StatusSNS") # Status 8
j = j["StatusSNS"]
code = 8
elif j.contains("StatusSTS") # Status 11
j = j["StatusSTS"]
code = 11
elif j.contains("StatusSHT") # Status 13
j = j["StatusSTS"]
code = 13
end
# convert to shadow values
self.parse_update(j, code) # call parser
end
end
end
# #############################################################
# # is_reachable()
# #
# # Pings the device and checks if it's reachable
# def is_reachable_lazy_sync()
# var cur_tick = self.device.tick
# if cur_tick != self.tick
# var ret = self.call_remote_sync("", "") # empty command works as a ping
# self.http_remote.device_is_alive(ret != nil)
# end
# return self.http_remote.reachable
# end
#############################################################
# read attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0039 # ========== Bridged Device Basic Information 9.13 p.485 ==========
import string
if attribute == 0x0003 # ---------- ProductName / string ----------
var name = self.http_remote.get_info().find("name")
if name
return tlv_solo.set(TLV.UTF1, name)
else
return tlv_solo.set(TLV.NULL, nil)
end
elif attribute == 0x000A # ---------- SoftwareVersionString / string ----------
var version_full = self.http_remote.get_info().find("version")
if version_full
var version_end = string.find(version_full, '(')
if version_end > 0 version_full = version_full[0..version_end - 1] end
return tlv_solo.set(TLV.UTF1, version_full)
else
return tlv_solo.set(TLV.NULL, nil)
end
elif attribute == 0x000F || attribute == 0x0012 # ---------- SerialNumber || UniqueID / string ----------
var mac = self.http_remote.get_info().find("mac")
if mac
return tlv_solo.set(TLV.UTF1, mac)
else
return tlv_solo.set(TLV.NULL, nil)
end
elif attribute == 0x0011 # ---------- Reachable / bool ----------
# self.is_reachable_lazy_sync() # Not needed anymore
return tlv_solo.set(TLV.BOOL, self.http_remote.reachable) # TODO find a way to do a ping
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# every_250ms
#
# check if the timer expired and update_shadow() needs to be called
def every_250ms()
self.http_remote.scheduler() # defer to HTTP scheduler
# avoid calling update_shadow() since it's not applicable for HTTP remote
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
static var PREFIX = "| <i>%s</i> "
def web_values()
import webserver
self.web_values_prefix()
webserver.content_send("&lt;-- (" + self.DISPLAY_NAME + ") --&gt;")
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
# Show on/off value as html
def web_value_onoff(onoff)
var onoff_html = (onoff != nil ? (onoff ? "<b>On</b>" : "Off") : "")
return onoff_html
end
#############################################################
# GetOption reader to decode `SetOption<x>` values from `Status 3`
static class GetOptionReader
var flag, flag2, flag3, flag4, flag5, flag6
def init(j)
if j == nil raise "value_error", "invalid json" end
var so = j['SetOption']
self.flag = bytes().fromhex(so[0]).reverse()
self.flag2 = bytes().fromhex(so[1])
self.flag3 = bytes().fromhex(so[2]).reverse()
self.flag4 = bytes().fromhex(so[3]).reverse()
self.flag5 = bytes().fromhex(so[4]).reverse()
self.flag6 = bytes().fromhex(so[5]).reverse()
end
def getoption(x)
if x < 32 # SetOption0 .. 31 = Settings->flag
return self.flag.getbits(x, 1)
elif x < 50 # SetOption32 .. 49 = Settings->param
return self.flag2.get(x - 32, 1)
elif x < 82 # SetOption50 .. 81 = Settings->flag3
return self.flag3.getbits(x - 50, 1)
elif x < 114 # SetOption82 .. 113 = Settings->flag4
return self.flag4.getbits(x - 82, 1)
elif x < 146 # SetOption114 .. 145 = Settings->flag5
return self.flag5.getbits(x - 114, 1)
elif x < 178 # SetOption146 .. 177 = Settings->flag6
return self.flag6.getbits(x - 146, 1)
end
end
end
#- Examples
import json
var p = '{"SerialLog":2,"WebLog":3,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Livebox-781A",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001800600003C5A0A192800000000","00000080","00006000","00006000","00000020"]}'
var j = json.load(p)
var gor = matter.Plugin_Bridge_HTTP.GetOptionReader(j)
assert(gor.getoption(151) == 1)
assert(gor.getoption(150) == 0)
assert(gor.getoption(32) == 40)
assert(gor.getoption(37) == 128)
-#
end
matter.Plugin_Bridge_HTTP = Matter_Plugin_Bridge_HTTP

View File

@ -1,5 +1,5 @@
#
# Matter_Plugin_OnOff.be - implements the behavior for a Relay (OnOff)
# Matter_Plugin_Light0.be - implements the behavior for a generic Lighting (OnOff only)
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -21,11 +21,11 @@ import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_OnOff,weak
#@ solidify:Matter_Plugin_Light0,weak
class Matter_Plugin_OnOff : Matter_Plugin_Device
static var TYPE = "relay" # name of the plug-in in json
static var DISPLAY_NAME = "Relay" # display name of the plug-in
class Matter_Plugin_Light0 : Matter_Plugin_Device
static var TYPE = "light0" # name of the plug-in in json
static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var ARG_HINT = "Relay<x> number"
@ -38,7 +38,7 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
0x0006: [0], # On/Off 1.5 p.48
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power")
static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
# Inherited
# var device # reference to the `device` global object
@ -46,8 +46,8 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
# var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
# var tick # tick value when it was last updated
# var node_label # name of the endpoint, used only in bridge mode, "" if none
var tasmota_relay_index # Relay number in Tasmota (1 based), may be nil for Lights 1/2/3 internal
var shadow_onoff # (bool) status of the light power on/off
var tasmota_relay_index # Relay number in Tasmota (zero based)
#############################################################
# Constructor
@ -61,21 +61,24 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, 1))
if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end
# with Light0 we always need relay number but we don't for Light1/2/3 so self.tasmota_relay_index may be `nil`
self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, nil))
if (self.tasmota_relay_index != nil && self.tasmota_relay_index <= 0) self.tasmota_relay_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
if !self.VIRTUAL
var pow = tasmota.get_power(self.tasmota_relay_index - 1)
if pow != nil
if self.shadow_onoff != bool(pow)
self.attribute_updated(0x0006, 0x0000)
if !self.VIRTUAL && !self.BRIDGE
if (self.tasmota_relay_index != nil)
var pow = tasmota.get_power(self.tasmota_relay_index - 1)
if pow != nil
if self.shadow_onoff != bool(pow)
self.attribute_updated(0x0006, 0x0000)
end
self.shadow_onoff = pow
end
self.shadow_onoff = pow
end
end
super(self).update_shadow()
@ -85,14 +88,26 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
# Model
#
def set_onoff(pow)
if !self.VIRTUAL
tasmota.set_power(self.tasmota_relay_index - 1, bool(pow))
self.update_shadow()
else
if self.BRIDGE
var ret = self.call_remote_sync("Power" + str(self.tasmota_relay_index), pow ? "1" : "0")
if ret != nil
self.parse_status(ret, 11) # update shadow from return value
# self.tick = self.device.tick # prevent an explicit Status11 for as it is not needed if the subscription update is sent in same tick
end
elif self.VIRTUAL
if pow != self.shadow_onoff
self.attribute_updated(0x0006, 0x0000)
self.shadow_onoff = pow
end
else
if (self.tasmota_relay_index != nil)
tasmota.set_power(self.tasmota_relay_index - 1, bool(pow))
self.update_shadow()
else
import light
light.set({'power':pow})
self.update_shadow()
end
end
end
@ -157,5 +172,51 @@ class Matter_Plugin_OnOff : Matter_Plugin_Device
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
if index == 11 # Status 11
var state = false
if self.tasmota_relay_index == 1 && data.contains("POWER") # special case, can be `POWER` or `POWER1`
state = (data.find("POWER") == "ON")
else
state = (data.find("POWER" + str(self.tasmota_relay_index)) == "ON")
end
if self.shadow_onoff != bool(state)
self.attribute_updated(0x0006, 0x0000)
self.shadow_onoff = state
end
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s", self.web_value_onoff(self.shadow_onoff)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Power" + str(self.tasmota_relay_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
#############################################################
#############################################################
end
matter.Plugin_OnOff = Matter_Plugin_OnOff
matter.Plugin_Light0 = Matter_Plugin_Light0

View File

@ -23,19 +23,19 @@ import matter
#@ solidify:Matter_Plugin_Light1,weak
class Matter_Plugin_Light1 : Matter_Plugin_Device
class Matter_Plugin_Light1 : Matter_Plugin_Light0
static var TYPE = "light1" # name of the plug-in in json
static var DISPLAY_NAME = "Light 1 Dimmer" # display name of the plug-in
static var UPDATE_TIME = 250 # update every 250ms
# static var UPDATE_TIME = 250 # update every 250ms
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0], # On/Off 1.5 p.48
# 0x0006: [0], # On/Off 1.5 p.48
0x0008: [0,2,3,0x0F,0x11], # Level Control 1.6 p.57
})
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Power", "Bri")
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Bri")
static var TYPES = { 0x0101: 2 } # Dimmable Light
# Inherited
@ -44,22 +44,34 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
# var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
# var tick # tick value when it was last updated
# var node_label # name of the endpoint, used only in bridge mode, "" if none
var shadow_onoff # (bool) status of the light power on/off
# var tasmota_relay_index # Relay number in Tasmota (1 based), nil for internal light
# var shadow_onoff # (bool) status of the light power on/off
var shadow_bri # (int 0..254) brightness before Gamma correction - as per Matter 255 is not allowed
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.shadow_onoff = false
self.shadow_bri = 0
end
#############################################################
# parse_configuration
#
# Parse configuration map
def parse_configuration(config)
# with Light0 we always need relay number but we don't for Light1/2/3 so self.tasmota_relay_index may be `nil`
if self.BRIDGE
self.tasmota_relay_index = int(config.find(self.ARG #-'relay'-#, nil))
if (self.tasmota_relay_index != nil && self.tasmota_relay_index <= 0) self.tasmota_relay_index = 1 end
end
end
#############################################################
# Update shadow
#
def update_shadow()
if !self.VIRTUAL
if !self.VIRTUAL && !self.BRIDGE
import light
var light_status = light.get()
if light_status != nil
@ -81,19 +93,6 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
super(self).update_shadow() # superclass manages 'power'
end
def set_onoff(pow)
if !self.VIRTUAL
import light
light.set({'power':pow})
self.update_shadow()
else
if pow != self.shadow_onoff
self.attribute_updated(0x0006, 0x0000)
self.shadow_onoff = pow
end
end
end
#############################################################
# Set Bri
#
@ -103,16 +102,13 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
if (bri_254 < 0) bri_254 = 0 end
if (bri_254 > 254) bri_254 = 254 end
pow = (pow != nil) ? bool(pow) : nil # nil or bool
if !self.VIRTUAL
import light
var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255)
if pow == nil
light.set({'bri': bri_255})
else
light.set({'bri': bri_255, 'power': pow})
if self.BRIDGE
var dimmer = tasmota.scale_uint(bri_254, 0, 254, 0, 100)
var ret = self.call_remote_sync("Dimmer", str(dimmer))
if ret != nil
self.parse_status(ret, 11) # update shadow from return value
end
self.update_shadow()
else
elif self.VIRTUAL
if (pow != nil) && (pow != self.shadow_onoff)
self.attribute_updated(0x0006, 0x0000)
self.shadow_onoff = pow
@ -121,6 +117,15 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
self.attribute_updated(0x0008, 0x0000)
self.shadow_bri = bri_254
end
else
import light
var bri_255 = tasmota.scale_uint(bri_254, 0, 254, 0, 255)
if pow == nil
light.set({'bri': bri_255})
else
light.set({'bri': bri_255, 'power': pow})
end
self.update_shadow()
end
end
@ -133,14 +138,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
self.update_shadow_lazy()
if attribute == 0x0000 # ---------- OnOff / bool ----------
return tlv_solo.set(TLV.BOOL, self.shadow_onoff)
end
# ====================================================================================================
elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
self.update_shadow_lazy()
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
return tlv_solo.set(TLV.U1, self.shadow_bri)
@ -170,23 +168,7 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
var command = ctx.command
# ====================================================================================================
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
self.update_shadow_lazy()
if command == 0x0000 # ---------- Off ----------
self.set_onoff(false)
self.publish_command('Power', 0)
return true
elif command == 0x0001 # ---------- On ----------
self.set_onoff(true)
self.publish_command('Power', 1)
return true
elif command == 0x0002 # ---------- Toggle ----------
self.set_onoff(!self.shadow_onoff)
self.publish_command('Power', self.shadow_onoff ? 1 : 0)
return true
end
# ====================================================================================================
elif cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
self.update_shadow_lazy()
if command == 0x0000 # ---------- MoveToLevel ----------
var bri_254 = val.findsubval(0) # Hue 0..254
@ -236,11 +218,53 @@ class Matter_Plugin_Light1 : Matter_Plugin_Device
if val_bri != nil
self.set_bri(int(val_bri), val_onoff)
return # don't call super() because we already handeld 'Power'
elif val_onoff != nil
self.set_onoff(bool(val_onoff))
end
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
super(self).parse_status(data, index)
if index == 11 # Status 11
var dimmer = int(data.find("Dimmer")) # 0..100
if dimmer != nil
var bri = tasmota.scale_uint(dimmer, 0, 100, 0, 254)
if bri != self.shadow_bri
self.attribute_updated(0x0008, 0x0000)
self.shadow_bri = bri
end
end
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s", self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer()))
end
# Show on/off value as html
def web_value_dimmer()
var bri_html = ""
if self.shadow_bri != nil
var bri = tasmota.scale_uint(self.shadow_bri, 0, 254, 0, 100)
bri_html = format("%i%%", bri)
end
return "&#128261; " + bri_html;
end
#############################################################
#############################################################
end
matter.Plugin_Light1 = Matter_Plugin_Light1

View File

@ -26,11 +26,20 @@ import matter
class Matter_Plugin_Sensor : Matter_Plugin_Device
static var ARG = "filter" # additional argument name (or empty if none)
static var ARG_HINT = "Filter pattern"
static var UPDATE_CMD = "Status 10" # command to send for updates
static var UPDATE_TIME = 5000 # update sensor every 5s
static var JSON_NAME = "" # Name of the sensor attribute in JSON payloads
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
var tasmota_sensor_matcher # Actual matcher object
var shadow_value # Last known value
var temp_unit # temperature unit, "C" or "F"
static var TEMP_C = "C"
static var TEMP_F = "F"
var pressure_unit # pressure unit, "hPa" or "mmHg" or "inHg"
static var PRESSURE_HPA = "hPa"
static var PRESSURE_MMHG = "mmHg"
static var PRESSURE_INHG = "inHg"
#############################################################
# Constructor
@ -52,6 +61,8 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
if self.tasmota_sensor_filter
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
end
self.temp_unit = self.TEMP_C
self.pressure_unit = self.PRESSURE_HPA
end
#############################################################
@ -106,5 +117,53 @@ class Matter_Plugin_Sensor : Matter_Plugin_Device
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
def parse_status(data, index)
if index == 10 # Status 10
if data.contains("TempUnit")
self.temp_unit = data["TempUnit"]
end
if data.contains("PressureUnit")
self.pressure_unit = data["PressureUnit"]
end
if self.tasmota_sensor_matcher
var val = self.pre_value(real(self.tasmota_sensor_matcher.match(data)))
if val != nil
if val != self.shadow_value
self.value_changed()
self.shadow_value = val
end
end
end
end
end
#############################################################
# Return the first item in the filter
def filter_name_html()
if self.tasmota_sensor_filter
import string
import webserver
return webserver.html_escape(string.split(self.tasmota_sensor_filter, '#')[0])
end
return ""
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if (!name) name = self.filter_name_html() end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor = Matter_Plugin_Sensor

View File

@ -63,7 +63,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
var j = tasmota.cmd("Status 8", true)
var j = tasmota.cmd("Status 10", true)
if j != nil j = j.find("StatusSNS") end
if j != nil && j.contains(switch_str)
var state = (j.find(switch_str) == "ON")
@ -107,5 +107,46 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
if index == 10 # Status 10
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_contact != nil && self.shadow_contact != bool(state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_contact = state
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_contact)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Contact = Matter_Plugin_Sensor_Contact

View File

@ -63,7 +63,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
var j = tasmota.cmd("Status 8", true)
var j = tasmota.cmd("Status 10", true)
if j != nil j = j.find("StatusSNS") end
if j != nil && j.contains(switch_str)
var state = (j.find(switch_str) == "ON")
@ -111,5 +111,47 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
if index == 10 # Status 10
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state)
self.attribute_updated(0x0406, 0x0000)
end
self.shadow_occupancy = state
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Occupancy = Matter_Plugin_Sensor_Occupancy

View File

@ -53,7 +53,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
var j = tasmota.cmd("Status 8", true)
var j = tasmota.cmd("Status 10", true)
if j != nil j = j.find("StatusSNS") end
if j != nil && j.contains(switch_str)
var state = (j.find(switch_str) == "ON")

View File

@ -64,7 +64,7 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
var j = tasmota.cmd("Status 8", true)
var j = tasmota.cmd("Status 10", true)
if j != nil j = j.find("StatusSNS") end
if j != nil && j.contains(switch_str)
var state = (j.find(switch_str) == "ON")
@ -88,11 +88,7 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device
# ====================================================================================================
if cluster == 0x0045 # ========== Boolean State ==========
if attribute == 0x0000 # ---------- StateValue / bool ----------
if self.shadow_leak != nil
return tlv_solo.set(TLV.BOOL, self.shadow_leak)
else
return tlv_solo.set(TLV.NULL, nil)
end
return tlv_solo.set(TLV.BOOL, self.shadow_leak)
end
end
@ -115,5 +111,47 @@ class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device
super(self).update_virtual(payload_json)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
if index == 10 # Status 10
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_leak != nil && self.shadow_leak != bool(state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_leak = state
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_leak)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Waterleak = Matter_Plugin_Sensor_Waterleak

View File

@ -1,156 +0,0 @@
#
# Matter_Plugin_Bridge_Light0.be - implements the behavior for a remote generic Lighting (OnOff only) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light0,weak
class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Bridge_HTTP
static var TYPE = "http_light0" # name of the plug-in in json
static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_HINT = "Power<x> number"
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
# static var UPDATE_TIME = 3000 # update every 3s
# static var UPDATE_CMD = "Status 11" # command to send for updates
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
0x0006: [0], # On/Off 1.5 p.48
})
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
var tasmota_relay_index # Relay number in Tasmota (one based)
var shadow_onoff # fake status for now # TODO
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.shadow_onoff = false
self.tasmota_relay_index = int(arguments.find(self.ARG #-'relay'-#, 1))
if self.tasmota_relay_index <= 0 self.tasmota_relay_index = 1 end
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
if index == 11 # Status 11
var state = false
if self.tasmota_relay_index == 1 && data.contains("POWER") # special case, can be `POWER` or `POWER1`
state = (data.find("POWER") == "ON")
else
state = (data.find("POWER" + str(self.tasmota_relay_index)) == "ON")
end
if self.shadow_onoff != nil && self.shadow_onoff != bool(state)
self.attribute_updated(0x0006, 0x0000)
end
self.shadow_onoff = state
end
end
#############################################################
# Model
#
def set_onoff(v)
var ret = self.call_remote_sync("Power" + str(self.tasmota_relay_index), v ? "1" : "0")
if ret != nil
self.parse_update(ret, 11) # update shadow from return value
# self.tick = self.device.tick # prevent an explicit Status11 for as it is not needed if the subscription update is sent in same tick
end
end
#############################################################
# read an attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
self.update_shadow_lazy()
if attribute == 0x0000 # ---------- OnOff / bool ----------
return tlv_solo.set(TLV.BOOL, self.shadow_onoff)
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# Invoke a command
#
# returns a TLV object if successful, contains the response
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
# ====================================================================================================
if cluster == 0x0006 # ========== On/Off 1.5 p.48 ==========
if command == 0x0000 # ---------- Off ----------
self.set_onoff(false)
self.publish_command('Power', 0)
return true
elif command == 0x0001 # ---------- On ----------
self.set_onoff(true)
self.publish_command('Power', 1)
return true
elif command == 0x0002 # ---------- Toggle ----------
self.set_onoff(!self.shadow_onoff)
self.publish_command('Power', self.shadow_onoff ? 1 : 0)
return true
end
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s", self.web_value_onoff(self.shadow_onoff)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Power" + str(self.tasmota_relay_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
end
matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0

View File

@ -1,122 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor.be - implements base class for a Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor,weak
class Matter_Plugin_Bridge_Sensor : Matter_Plugin_Bridge_HTTP
# static var TYPE = "" # name of the plug-in in json
# static var DISPLAY_NAME = "" # display name of the plug-in
static var ARG = "filter" # additional argument name (or empty if none)
static var ARG_HTTP = "url" # domain name
static var ARG_HINT = "Filter pattern"
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 8" # command to send for updates
static var PROBE_TIMEOUT = 1700 # timeout of 1700 ms for probing, which gives at least 1s for TCP recovery
# static var SYNC_TIMEOUT = 500 # timeout of 700 ms for probing
var tasmota_sensor_filter # Rule-type filter to the value, like "ESP32#Temperature"
var tasmota_sensor_matcher # Actual matcher object
var shadow_value # Last known value
var temp_unit # temperature unit, "C" or "F"
static var TEMP_C = "C"
static var TEMP_F = "F"
var pressure_unit # pressure unit, "hPa" or "mmHg" or "inHg"
static var PRESSURE_HPA = "hPa"
static var PRESSURE_MMHG = "mmHg"
static var PRESSURE_INHG = "inHg"
#############################################################
# parse_configuration
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_sensor_filter = config.find(self.ARG#-'filter'-#)
if self.tasmota_sensor_filter
self.tasmota_sensor_matcher = tasmota.Rule_Matcher.parse(self.tasmota_sensor_filter)
end
self.temp_unit = self.TEMP_C
self.pressure_unit = self.PRESSURE_HPA
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
def parse_update(data, index)
if index == 8 # Status 8
if data.contains("TempUnit")
self.temp_unit = data["TempUnit"]
end
if data.contains("PressureUnit")
self.pressure_unit = data["PressureUnit"]
end
if self.tasmota_sensor_matcher
var val = self.pre_value(real(self.tasmota_sensor_matcher.match(data)))
if val != nil
if val != self.shadow_value
self.value_changed()
self.shadow_value = val
end
end
end
end
end
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
# self.attribute_updated(0x0402, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
return val
end
#############################################################
# Return the first item in the filter
def filter_name_html()
if self.tasmota_sensor_filter
import string
import webserver
return webserver.html_escape(string.split(self.tasmota_sensor_filter, '#')[0])
end
return ""
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if (!name) name = self.filter_name_html() end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
end
matter.Plugin_Bridge_Sensor = Matter_Plugin_Bridge_Sensor

View File

@ -1,110 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Contact.be - implements Contact Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Contact,weak
class Matter_Plugin_Bridge_Sensor_Contact : Matter_Plugin_Bridge_HTTP
static var TYPE = "http_contact" # name of the plug-in in json
static var DISPLAY_NAME = "Contact" # display name of the plug-in
static var ARG = "switch" # additional argument name (or empty if none)
static var ARG_HINT = "Switch<x> number"
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 8" # command to send for updates
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0045: [0], # Boolean State p.70 - no writable
})
static var TYPES = { 0x0015: 1 } # Contact Sensor, rev 1
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_contact
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.tasmota_switch_index = int(arguments.find(self.ARG #-'switch'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
if index == 8 # Status 8
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_contact != nil && self.shadow_contact != bool(state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_contact = state
end
end
#############################################################
# read an attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0045 # ========== Boolean State ==========
if attribute == 0x0000 # ---------- StateValue / bool ----------
if self.shadow_contact != nil
return tlv_solo.set(TLV.BOOL, self.shadow_contact)
else
return tlv_solo.set(TLV.NULL, nil)
end
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_contact)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
end
matter.Plugin_Bridge_Sensor_Contact = Matter_Plugin_Bridge_Sensor_Contact

View File

@ -1,114 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Occupancy.be - implements base class for a Occupancy Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Occupancy,weak
class Matter_Plugin_Bridge_Sensor_Occupancy : Matter_Plugin_Bridge_HTTP
static var TYPE = "http_occupancy" # name of the plug-in in json
static var DISPLAY_NAME = "Occupancy" # display name of the plug-in
static var ARG = "switch" # additional argument name (or empty if none)
static var ARG_HINT = "Switch<x> number"
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 8" # command to send for updates
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0406: [0,1,2], # Occupancy Sensing p.105 - no writable
})
static var TYPES = { 0x0107: 2 } # Occupancy Sensor, rev 2
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_occupancy
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.tasmota_switch_index = int(arguments.find(self.ARG #-'relay'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
if index == 8 # Status 8
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_occupancy != nil && self.shadow_occupancy != bool(state)
self.attribute_updated(0x0406, 0x0000)
end
self.shadow_occupancy = state
end
end
#############################################################
# read an attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0406 # ========== Occupancy Sensing ==========
if attribute == 0x0000 # ---------- Occupancy / U8 ----------
if self.shadow_occupancy != nil
return tlv_solo.set(TLV.U1, self.shadow_occupancy)
else
return tlv_solo.set(TLV.NULL, nil)
end
elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ----------
return tlv_solo.set(TLV.U1, 3) # physical contact
elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ----------
return tlv_solo.set(TLV.U1, 0) # unknown
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Occupancy%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_occupancy)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
end
matter.Plugin_Bridge_Sensor_Occupancy = Matter_Plugin_Bridge_Sensor_Occupancy

View File

@ -1,110 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Waterleak.be - implements Waterleak Sensor via HTTP to Tasmota
#
# Copyright (C) 2024 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Waterleak,weak
class Matter_Plugin_Bridge_Sensor_Waterleak : Matter_Plugin_Bridge_HTTP
static var TYPE = "http_waterleak" # name of the plug-in in json
static var DISPLAY_NAME = "Waterleak" # display name of the plug-in
static var ARG = "switch" # additional argument name (or empty if none)
static var ARG_HINT = "Switch<x> number"
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 8" # command to send for updates
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0045: [0], # Boolean State p.70 - no writable
})
static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_Waterleak
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.tasmota_switch_index = int(arguments.find(self.ARG #-'switch'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
if index == 8 # Status 8
var state = false
state = (data.find("Switch" + str(self.tasmota_switch_index)) == "ON")
if self.shadow_Waterleak != nil && self.shadow_Waterleak != bool(state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_Waterleak = state
end
end
#############################################################
# read an attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0045 # ========== Boolean State ==========
if attribute == 0x0000 # ---------- StateValue / bool ----------
if self.shadow_Waterleak != nil
return tlv_solo.set(TLV.BOOL, self.shadow_Waterleak)
else
return tlv_solo.set(TLV.NULL, nil)
end
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_Waterleak)))
end
# Show prefix before web value
def web_values_prefix()
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end
end
matter.Plugin_Bridge_Sensor_Waterleak = Matter_Plugin_Bridge_Sensor_Waterleak

View File

@ -53,7 +53,9 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.shadow_ct = 325
if !self.BRIDGE # in BRIDGE mode keep default to nil
self.shadow_ct = 325
end
self.update_ct_minmax() # read SetOption to adjust ct min/max
end
@ -61,7 +63,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# Update shadow
#
def update_shadow()
if !self.VIRTUAL
if !self.VIRTUAL && !self.BRIDGE
import light
self.update_ct_minmax()
super(self).update_shadow()
@ -96,15 +98,20 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
def set_ct(ct)
if ct < self.ct_min ct = self.ct_min end
if ct > self.ct_max ct = self.ct_max end
if !self.VIRTUAL
import light
light.set({'ct': ct})
self.update_shadow()
else
if self.BRIDGE
var ret = self.call_remote_sync("CT", str(ct))
if ret != nil
self.parse_status(ret, 11) # update shadow from return value
end
elif self.VIRTUAL
if ct != self.shadow_ct
self.attribute_updated(0x0300, 0x0007)
self.shadow_ct = ct
end
else
import light
light.set({'ct': ct})
self.update_shadow()
end
end
@ -144,7 +151,6 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
# returns a TLV object if successful, contains the response
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
import light
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
@ -154,6 +160,8 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
self.update_shadow_lazy()
if command == 0x000A # ---------- MoveToColorTemperature ----------
var ct_in = val.findsubval(0) # CT
if ct_in < self.ct_min ct_in = self.ct_min end
if ct_in > self.ct_max ct_in = self.ct_max end
self.set_ct(ct_in)
ctx.log = "ct:"+str(ct_in)
self.publish_command('CT', ct_in)
@ -187,5 +195,53 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
# This call is synnchronous and blocking.
def parse_status(data, index)
super(self).parse_status(data, index)
if index == 11 # Status 11
var ct = int(data.find("CT")) # 153..500
if ct != nil
if ct != self.shadow_ct
if ct < self.ct_min ct = self.ct_min end
if ct > self.ct_max ct = self.ct_max end
self.attribute_updated(0x0300, 0x0007)
self.shadow_ct = ct
end
end
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s %s",
self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_ct()))
end
# Show on/off value as html
def web_value_ct()
var ct_html = ""
if self.shadow_ct != nil
var ct_k = (((1000000 / self.shadow_ct) + 25) / 50) * 50 # convert in Kelvin
ct_html = format("%iK", ct_k)
end
return "&#9898; " + ct_html;
end
#############################################################
#############################################################
end
matter.Plugin_Light2 = Matter_Plugin_Light2

View File

@ -62,9 +62,9 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
if !self.VIRTUAL && !self.BRIDGE
import light
super(self).update_shadow()
var light_status = light.get()
if light_status != nil
var hue = light_status.find('hue', nil)
@ -74,6 +74,8 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end
if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end
end
else
super(self).update_shadow()
end
end
@ -93,7 +95,29 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
if sat_254 > 254 sat_254 = 254 end
end
if !self.VIRTUAL
if self.BRIDGE
if hue_254 != nil
var hue_360 = tasmota.scale_uint(hue_254, 0, 254, 0, 360)
var ret = self.call_remote_sync("HSBColor1", hue_360)
if ret != nil
self.parse_status(ret, 11) # update shadow from return value
end
end
if sat_254 != nil
var sat_100 = tasmota.scale_uint(sat_254, 0, 254, 0, 100)
var ret = self.call_remote_sync("HSBColor2", sat_100)
if ret != nil
self.parse_status(ret, 11) # update shadow from return value
end
end
elif self.VIRTUAL
if hue_254 != nil
if hue_254 != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue_254 end
end
if sat_254 != nil
if sat_254 != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat_254 end
end
else
var hue_360 = (hue_254 != nil) ? tasmota.scale_uint(hue_254, 0, 254, 0, 360) : nil
var sat_255 = (sat_254 != nil) ? tasmota.scale_uint(sat_254, 0, 254, 0, 255) : nil
@ -105,13 +129,6 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
light.set({'sat': sat_255})
end
self.update_shadow()
else
if hue_254 != nil
if hue_254 != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue_254 end
end
if sat_254 != nil
if sat_254 != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat_254 end
end
end
end
@ -222,5 +239,59 @@ class Matter_Plugin_Light3 : Matter_Plugin_Light1
super(self).update_virtual(payload)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_status(data, index)
super(self).parse_status(data, index)
if index == 11 # Status 11
var hsb = data.find("HSBColor")
if hsb
import string
var hsb_list = string.split(hsb, ",")
var hue = int(hsb_list[0])
var sat = int(hsb_list[1])
# dimmer is already available
if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end
if sat != nil sat = tasmota.scale_uint(sat, 0, 100, 0, 254) else sat = self.shadow_sat end
if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end
if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end
end
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s %s",
self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_RGB()))
end
# Show on/off value as html
def web_value_RGB()
if self.shadow_hue != nil && self.shadow_sat != nil
var l = light_state(3) # RGB virtual light state object
l.set_bri(255) # set full brightness to get full range RGB
l.set_huesat(tasmota.scale_uint(self.shadow_hue, 0, 254, 0, 360), tasmota.scale_uint(self.shadow_sat, 0, 254, 0, 255))
var rgb_hex = format("#%02X%02X%02X", l.r, l.g, l.b)
var rgb_html = format('<i class="bxm" style="--cl:%s"></i>%s', rgb_hex, rgb_hex)
return rgb_html
end
return ""
end
#############################################################
#############################################################
end
matter.Plugin_Light3 = Matter_Plugin_Light3

View File

@ -1,5 +1,5 @@
#
# Matter_Plugin_Light0.be - implements the behavior for a generic Lighting (OnOff only)
# Matter_Plugin_OnOff.be - implements the behavior for a Relay (OnOff)
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -21,12 +21,13 @@ import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Light0,weak
#@ solidify:Matter_Plugin_OnOff,weak
class Matter_Plugin_Light0 : Matter_Plugin_OnOff
static var TYPE = "light0" # name of the plug-in in json
static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in
static var TYPES = { 0x0100: 2 } # OnOff Light, but not actually used because Relay is managed by OnOff
class Matter_Plugin_OnOff : Matter_Plugin_Light0
static var TYPE = "relay" # name of the plug-in in json
static var DISPLAY_NAME = "Relay" # display name of the plug-in
static var TYPES = { 0x010A: 2 } # On/Off Plug-in Unit
# Inherited
# var device # reference to the `device` global object
@ -34,7 +35,8 @@ class Matter_Plugin_Light0 : Matter_Plugin_OnOff
# var clusters # map from cluster to list of attributes, typically constructed from CLUSTERS hierachy
# var tick # tick value when it was last updated
# var node_label # name of the endpoint, used only in bridge mode, "" if none
# var shadow_onoff # (bool) status of the light power on/off
# var shadow_onoff # (bool) status of the light power on/off
# var tasmota_relay_index # Relay number in Tasmota (zero based)
end
matter.Plugin_Light0 = Matter_Plugin_Light0
matter.Plugin_OnOff = Matter_Plugin_OnOff

View File

@ -77,5 +77,20 @@ class Matter_Plugin_Sensor_Flow : Matter_Plugin_Sensor
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x26C5; %i m&sup3;/h",
int(self.shadow_value)))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Flow = Matter_Plugin_Sensor_Flow

View File

@ -77,5 +77,21 @@ class Matter_Plugin_Sensor_Humidity : Matter_Plugin_Sensor
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x1F4A7; %2.0f%%",
self.shadow_value != nil ? real(self.shadow_value) / 100 : nil))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Humidity = Matter_Plugin_Sensor_Humidity

View File

@ -84,5 +84,21 @@ class Matter_Plugin_Sensor_Illuminance : Matter_Plugin_Sensor
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#128261; %i lux",
int(self.shadow_value)))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Illuminance = Matter_Plugin_Sensor_Illuminance

View File

@ -77,5 +77,21 @@ class Matter_Plugin_Sensor_Pressure : Matter_Plugin_Sensor
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x26C5; %i hPa",
int(self.shadow_value)))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Pressure = Matter_Plugin_Sensor_Pressure

View File

@ -39,10 +39,18 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
if tasmota.get_option(8) == 1 # Fahrenheit
val = (val - 32) / 1.8
# TODO simplify
if self.BRIDGE
if self.temp_unit == self.TEMP_F # Fahrenheit
val = (val - 32) / 1.8
end
return val != nil ? int(val * 100) : nil
else
if tasmota.get_option(8) == 1 # Fahrenheit
val = (val - 32) / 1.8
end
return val != nil ? int(val * 100) : nil
end
return val != nil ? int(val * 100) : nil
end
#############################################################
@ -80,5 +88,21 @@ class Matter_Plugin_Sensor_Temp : Matter_Plugin_Sensor
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# For Bridge devices
#############################################################
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x2600;&#xFE0F; %.1f °C",
self.shadow_value != nil ? real(self.shadow_value) / 100 : nil))
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Temp = Matter_Plugin_Sensor_Temp

View File

@ -1,184 +0,0 @@
#
# Matter_Plugin_Bridge_Light1.be - implements the behavior for a remote generic Lighting (Dimmer) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light1,weak
class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Bridge_Light0
static var TYPE = "http_light1" # name of the plug-in in json
static var DISPLAY_NAME = "Light 1 Dimmer" # display name of the plug-in
# static var ARG = "relay" # additional argument name (or empty if none)
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
# 0x0006: inherited # On/Off 1.5 p.48
0x0008: [0,2,3,0x0F,0x11], # Level Control 1.6 p.57
})
static var TYPES = { 0x0101: 2 } # Dimmable Light
var shadow_bri
# var tasmota_relay_index # ingerited
# var shadow_onoff # inherited
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
super(self).parse_update(data, index)
if index == 11 # Status 11
var dimmer = int(data.find("Dimmer")) # 0..100
if dimmer != nil
var bri = tasmota.scale_uint(dimmer, 0, 100, 0, 254)
if bri != self.shadow_bri
self.attribute_updated(0x0008, 0x0000)
self.shadow_bri = bri
end
end
end
end
#############################################################
# Model
#
def set_bri(v)
var dimmer = tasmota.scale_uint(v, 0, 254, 0, 100)
var ret = self.call_remote_sync("Dimmer", str(dimmer))
if ret != nil
self.parse_update(ret, 11) # update shadow from return value
end
end
#############################################################
# read an attribute
#
def read_attribute(session, ctx, tlv_solo)
var TLV = matter.TLV
var cluster = ctx.cluster
var attribute = ctx.attribute
# ====================================================================================================
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
self.update_shadow_lazy()
if attribute == 0x0000 # ---------- CurrentLevel / u1 ----------
if self.shadow_bri != nil
return tlv_solo.set(TLV.U1, self.shadow_bri)
else
return tlv_solo.set(TLV.NULL, nil)
end
elif attribute == 0x0002 # ---------- MinLevel / u1 ----------
return tlv_solo.set(TLV.U1, 0)
elif attribute == 0x0003 # ---------- MaxLevel / u1 ----------
return tlv_solo.set(TLV.U1, 254)
elif attribute == 0x000F # ---------- Options / map8 ----------
return tlv_solo.set(TLV.U1, 0) #
elif attribute == 0x0011 # ---------- OnLevel / u1 ----------
if self.shadow_bri != nil
return tlv_solo.set(TLV.U1, self.shadow_bri)
else
return tlv_solo.set(TLV.NULL, nil)
end
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# Invoke a command
#
# returns a TLV object if successful, contains the response
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
# ====================================================================================================
if cluster == 0x0008 # ========== Level Control 1.6 p.57 ==========
if command == 0x0000 # ---------- MoveToLevel ----------
var bri_in = val.findsubval(0) # Hue 0..254
self.set_bri(bri_in)
ctx.log = "bri:"+str(bri_in)
self.publish_command('Bri', tasmota.scale_uint(bri_in, 0, 254, 0, 255),
'Dimmer', tasmota.scale_uint(bri_in, 0, 254, 0, 100))
return true
elif command == 0x0001 # ---------- Move ----------
# TODO, we don't really support it
return true
elif command == 0x0002 # ---------- Step ----------
# TODO, we don't really support it
return true
elif command == 0x0003 # ---------- Stop ----------
# TODO, we don't really support it
return true
elif command == 0x0004 # ---------- MoveToLevelWithOnOff ----------
var bri_in = val.findsubval(0) # Hue 0..254
self.set_bri(bri_in)
var onoff = bri_in > 0
self.set_onoff(onoff)
ctx.log = "bri:"+str(bri_in)
self.publish_command('Bri', tasmota.scale_uint(bri_in, 0, 254, 0, 255),
'Dimmer', tasmota.scale_uint(bri_in, 0, 254, 0, 100),
'Power', onoff ? 1 : 0)
return true
elif command == 0x0005 # ---------- MoveWithOnOff ----------
# TODO, we don't really support it
return true
elif command == 0x0006 # ---------- StepWithOnOff ----------
# TODO, we don't really support it
return true
elif command == 0x0007 # ---------- StopWithOnOff ----------
# TODO, we don't really support it
return true
end
else
return super(self).invoke_request(session, val, ctx)
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s", self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer()))
end
# Show on/off value as html
def web_value_dimmer()
var bri_html = ""
if self.shadow_bri != nil
var bri = tasmota.scale_uint(self.shadow_bri, 0, 254, 0, 100)
bri_html = format("%i%%", bri)
end
return "&#128261; " + bri_html;
end
end
matter.Plugin_Bridge_Light1 = Matter_Plugin_Bridge_Light1

View File

@ -1,70 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Flow.be - implements base class for a Flow Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Flow,weak
class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Bridge_Sensor
static var TYPE = "http_flow" # name of the plug-in in json
static var DISPLAY_NAME = "Flow" # display name of the plug-in
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0404: [0,1,2], # Flow Measurement
})
static var TYPES = { 0x0306: 1 } # Flow Sensor, rev 1
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
self.attribute_updated(0x0404, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
return val != nil ? int(val * 10) : nil # MeasuredValue represents 10 x flow in m3/h
end
#############################################################
# read an attribute
#
static var read_attribute = matter.Plugin_Sensor_Flow.read_attribute
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x26C5; %i m3/h",
int(self.shadow_value)))
end
end
matter.Plugin_Bridge_Sensor_Flow = Matter_Plugin_Bridge_Sensor_Flow

View File

@ -1,70 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Humidity.be - implements base class for a Humidity Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Humidity,weak
class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Bridge_Sensor
static var TYPE = "http_humidity" # name of the plug-in in json
static var DISPLAY_NAME = "Humidity" # display name of the plug-in
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0405: [0,1,2], # Humidity Measurement p.102 - no writable
})
static var TYPES = { 0x0307: 2 } # Humidity Sensor, rev 2
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
self.attribute_updated(0x0405, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
return val != nil ? int(val * 100) : nil # 1/100th of percentage
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Sensor_Humidity.read_attribute
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x1F4A7; %2.0f%%",
self.shadow_value != nil ? real(self.shadow_value) / 100 : nil))
end
end
matter.Plugin_Bridge_Sensor_Humidity = Matter_Plugin_Bridge_Sensor_Humidity

View File

@ -1,77 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Illuminance.be - implements base class for a Light/Illuminance Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Illuminance,weak
class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Bridge_Sensor
static var TYPE = "http_illuminance" # name of the plug-in in json
static var DISPLAY_NAME = "Illuminance" # display name of the plug-in
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0400: [0,1,2], # Illuminance Measurement p.95 - no writable
})
static var TYPES = { 0x0106: 2 } # Illuminance Sensor, rev 2
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
self.attribute_updated(0x0400, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
if val == nil return nil end
import math
if val < 0
return 0
else
return math.log10(val + 1) * 10000
end
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Sensor_Illuminance.read_attribute
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#128261; %ilux",
int(self.shadow_value)))
end
end
matter.Plugin_Bridge_Sensor_Illuminance = Matter_Plugin_Bridge_Sensor_Illuminance

View File

@ -1,70 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Pressure Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Pressure,weak
class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Bridge_Sensor
static var TYPE = "http_pressure" # name of the plug-in in json
static var DISPLAY_NAME = "Pressure" # display name of the plug-in
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0403: [0,1,2], # Pressure Measurement
})
static var TYPES = { 0x0305: 2 } # Temperature Sensor, rev 2
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
self.attribute_updated(0x0403, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
return val != nil ? int(val) : nil
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Sensor_Pressure.read_attribute
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x26C5; %i hPa",
int(self.shadow_value)))
end
end
matter.Plugin_Bridge_Sensor_Pressure = Matter_Plugin_Bridge_Sensor_Pressure

View File

@ -1,73 +0,0 @@
#
# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Temperature Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Temp,weak
class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Bridge_Sensor
static var TYPE = "http_temperature" # name of the plug-in in json
static var DISPLAY_NAME = "Temperature" # display name of the plug-in
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0402: [0,1,2], # Temperature Measurement p.97 - no writable
})
static var TYPES = { 0x0302: 2 } # Temperature Sensor, rev 2
#############################################################
# Called when the value changed compared to shadow value
#
# This must be overriden.
# This is where you call `self.attribute_updated(<cluster>, <attribute>)`
def value_changed()
self.attribute_updated(0x0402, 0x0000)
end
#############################################################
# Pre-process value
#
# This must be overriden.
# This allows to convert the raw sensor value to the target one, typically int
def pre_value(val)
if self.temp_unit == self.TEMP_F # Fahrenheit
val = (val - 32) / 1.8
end
return val != nil ? int(val * 100) : nil
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Sensor_Temp.read_attribute
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("&#x2600;&#xFE0F; %.1f °C",
self.shadow_value != nil ? real(self.shadow_value) / 100 : nil))
end
end
matter.Plugin_Bridge_Sensor_Temp = Matter_Plugin_Bridge_Sensor_Temp

View File

@ -1,155 +0,0 @@
#
# Matter_Plugin_Bridge_Light2.be - implements the behavior for a remote generic Lighting (CT) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light2,weak
class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Bridge_Light1
static var TYPE = "http_light2" # name of the plug-in in json
static var DISPLAY_NAME = "Light 2 CT" # display name of the plug-in
# static var ARG = "relay" # additional argument name (or empty if none)
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
# 0x0006: inherited # On/Off 1.5 p.48
# 0x0008: inherited # Level Control 1.6 p.57
0x0300: [7,8,0xF,0x400A,0x400B,0x400C], # Color Control 3.2 p.111
})
static var TYPES = { 0x010C: 2 } # Dimmable Light
var shadow_ct
var ct_min, ct_max
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.update_ct_minmax()
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# TO BE OVERRIDDEN
# This call is synnchronous and blocking.
def parse_update(data, index)
super(self).parse_update(data, index)
if index == 11 # Status 11
var ct = int(data.find("CT")) # 153..500
if ct != nil
if ct != self.shadow_ct
if ct < self.ct_min ct = self.ct_min end
if ct > self.ct_max ct = self.ct_max end
self.attribute_updated(0x0300, 0x0007)
self.shadow_ct = ct
end
end
end
end
#############################################################
# Update ct_min/max
#
def update_ct_minmax()
var ct_alexa_mode = tasmota.get_option(82) # if set, range is 200..380 instead of 153...500
self.ct_min = ct_alexa_mode ? 200 : 153
self.ct_max = ct_alexa_mode ? 380 : 500
end
#############################################################
# Model
#
def set_ct(v)
var ret = self.call_remote_sync("CT", str(v))
if ret != nil
self.parse_update(ret, 11) # update shadow from return value
end
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Light2.read_attribute
#############################################################
# Invoke a command
#
# returns a TLV object if successful, contains the response
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
if command == 0x000A # ---------- MoveToColorTemperature ----------
var ct_in = val.findsubval(0) # CT
if ct_in < self.ct_min ct_in = self.ct_min end
if ct_in > self.ct_max ct_in = self.ct_max end
self.set_ct(ct_in)
ctx.log = "ct:"+str(ct_in)
self.publish_command('CT', ct_in)
return true
elif command == 0x0047 # ---------- StopMoveStep ----------
# TODO, we don't really support it
return true
elif command == 0x004B # ---------- MoveColorTemperature ----------
# TODO, we don't really support it
return true
elif command == 0x004C # ---------- StepColorTemperature ----------
# TODO, we don't really support it
return true
end
else
return super(self).invoke_request(session, val, ctx)
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s %s",
self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_ct()))
end
# Show on/off value as html
def web_value_ct()
var ct_html = ""
if self.shadow_ct != nil
var ct_k = (((1000000 / self.shadow_ct) + 25) / 50) * 50 # convert in Kelvin
ct_html = format("%iK", ct_k)
end
return "&#9898; " + ct_html;
end
end
matter.Plugin_Bridge_Light2 = Matter_Plugin_Bridge_Light2

View File

@ -1,176 +0,0 @@
#
# Matter_Plugin_Bridge_Light3.be - implements the behavior for a remote generic Lighting (RGB) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light3,weak
class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Bridge_Light1
static var TYPE = "http_light3" # name of the plug-in in json
static var DISPLAY_NAME = "Light 3 RGB" # display name of the plug-in
# static var ARG = "relay" # additional argument name (or empty if none)
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x001D: inherited # Descriptor Cluster 9.5 p.453
# 0x0003: inherited # Identify 1.2 p.16
# 0x0004: inherited # Groups 1.3 p.21
# 0x0005: inherited # Scenes 1.4 p.30 - no writable
# 0x0006: inherited # On/Off 1.5 p.48
# 0x0008: inherited # Level Control 1.6 p.57
0x0300: [0,1,7,8,0xF,0x4001,0x400A], # Color Control 3.2 p.111
})
static var TYPES = { 0x010D: 2 } # Extended Color Light
var shadow_hue, shadow_sat # 0..254
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
end
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
super(self).parse_update(data, index)
if index == 11 # Status 11
var hsb = data.find("HSBColor")
if hsb
import string
var hsb_list = string.split(hsb, ",")
var hue = int(hsb_list[0])
var sat = int(hsb_list[1])
# dimmer is already available
if hue != nil hue = tasmota.scale_uint(hue, 0, 360, 0, 254) else hue = self.shadow_hue end
if sat != nil sat = tasmota.scale_uint(sat, 0, 100, 0, 254) else sat = self.shadow_sat end
if hue != self.shadow_hue self.attribute_updated(0x0300, 0x0000) self.shadow_hue = hue end
if sat != self.shadow_sat self.attribute_updated(0x0300, 0x0001) self.shadow_sat = sat end
end
end
end
#############################################################
# Model
#
def set_hue(v)
var hue_360 = tasmota.scale_uint(v, 0, 254, 0, 360)
var ret = self.call_remote_sync("HSBColor1", hue_360)
if ret != nil
self.parse_update(ret, 11) # update shadow from return value
end
end
def set_sat(v)
var sat_100 = tasmota.scale_uint(v, 0, 254, 0, 100)
var ret = self.call_remote_sync("HSBColor2", sat_100)
if ret != nil
self.parse_update(ret, 11) # update shadow from return value
end
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Light3.read_attribute
#############################################################
# Invoke a command
#
# returns a TLV object if successful, contains the response
# or an `int` to indicate a status
def invoke_request(session, val, ctx)
var TLV = matter.TLV
var cluster = ctx.cluster
var command = ctx.command
# ====================================================================================================
if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
if command == 0x0000 # ---------- MoveToHue ----------
var hue_in = val.findsubval(0) # Hue 0..254
self.set_hue(hue_in)
ctx.log = "hue:"+str(hue_in)
self.publish_command('Hue', hue_in)
return true
elif command == 0x0001 # ---------- MoveHue ----------
# TODO, we don't really support it
return true
elif command == 0x0002 # ---------- StepHue ----------
# TODO, we don't really support it
return true
elif command == 0x0003 # ---------- MoveToSaturation ----------
var sat_in = val.findsubval(0) # Sat 0..254
self.set_sat(sat_in)
ctx.log = "sat:"+str(sat_in)
self.publish_command('Sat', sat_in)
return true
elif command == 0x0004 # ---------- MoveSaturation ----------
# TODO, we don't really support it
return true
elif command == 0x0005 # ---------- StepSaturation ----------
# TODO, we don't really support it
return true
elif command == 0x0006 # ---------- MoveToHueAndSaturation ----------
var hue_in = val.findsubval(0) # Hue 0..254
var sat_in = val.findsubval(1) # Sat 0..254
self.set_hue(hue_in)
self.set_sat(sat_in)
ctx.log = "hue:"+str(hue_in)+" sat:"+str(sat_in)
self.publish_command('Hue', hue_in, 'Sat', sat_in)
return true
elif command == 0x0047 # ---------- StopMoveStep ----------
# TODO, we don't really support it
return true
end
else
return super(self).invoke_request(session, val, ctx)
end
end
#############################################################
# web_values
#
# Show values of the remote device as HTML
def web_values()
import webserver
self.web_values_prefix() # display '| ' and name if present
webserver.content_send(format("%s %s %s",
self.web_value_onoff(self.shadow_onoff), self.web_value_dimmer(),
self.web_value_RGB()))
end
# Show on/off value as html
def web_value_RGB()
if self.shadow_hue != nil && self.shadow_sat != nil
var l = light_state(3) # RGB virtual light state object
l.set_bri(255) # set full brightness to get full range RGB
l.set_huesat(tasmota.scale_uint(self.shadow_hue, 0, 254, 0, 360), tasmota.scale_uint(self.shadow_sat, 0, 254, 0, 255))
var rgb_hex = format("#%02X%02X%02X", l.r, l.g, l.b)
var rgb_html = format('<i class="bxm" style="--cl:%s"></i>%s', rgb_hex, rgb_hex)
return rgb_html
end
return ""
end
end
matter.Plugin_Bridge_Light3 = Matter_Plugin_Bridge_Light3

View File

@ -0,0 +1,32 @@
#
# Matter_Plugin_Bridge_Light0.be - implements the behavior for a remote generic Lighting (OnOff only) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light0,weak
class Matter_Plugin_Bridge_Light0 : Matter_Plugin_Light0
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_light0" # name of the plug-in in json
# static var DISPLAY_NAME = "Light 0 On" # display name of the plug-in
static var UPDATE_TIME = 3000 # update every 3s
end
matter.Plugin_Bridge_Light0 = Matter_Plugin_Bridge_Light0

View File

@ -0,0 +1,34 @@
#
# Matter_Plugin_Bridge_Light1.be - implements the behavior for a remote generic Lighting (Dimmer) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light1,weak
class Matter_Plugin_Bridge_Light1 : Matter_Plugin_Light1
static var BRIDGE = true
static var TYPE = "http_light1" # name of the plug-in in json
# static var DISPLAY_NAME = "Light 1 Dimmer" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 3000 # update every 3s
end
matter.Plugin_Bridge_Light1 = Matter_Plugin_Bridge_Light1

View File

@ -0,0 +1,34 @@
#
# Matter_Plugin_Bridge_Light2.be - implements the behavior for a remote generic Lighting (CT) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light2,weak
class Matter_Plugin_Bridge_Light2 : Matter_Plugin_Light2
static var BRIDGE = true
static var TYPE = "http_light2" # name of the plug-in in json
# static var DISPLAY_NAME = "Light 2 CT" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 3000 # update every 3s
end
matter.Plugin_Bridge_Light2 = Matter_Plugin_Bridge_Light2

View File

@ -0,0 +1,34 @@
#
# Matter_Plugin_Bridge_Light3.be - implements the behavior for a remote generic Lighting (RGB) via HTTP
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Light3,weak
class Matter_Plugin_Bridge_Light3 : Matter_Plugin_Light3
static var BRIDGE = true
static var TYPE = "http_light3" # name of the plug-in in json
# static var DISPLAY_NAME = "Light 3 RGB" # display name of the plug-in
static var ARG = "relay" # additional argument name (or empty if none)
static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 3000 # update every 3s
end
matter.Plugin_Bridge_Light3 = Matter_Plugin_Bridge_Light3

View File

@ -23,69 +23,58 @@ import matter
#@ solidify:Matter_Plugin_Bridge_Sensor_Air_Quality,weak
class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Bridge_HTTP
class Matter_Plugin_Bridge_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality
static var BRIDGE = true
static var TYPE = "http_airquality" # name of the plug-in in json
static var DISPLAY_NAME = "Air Quality" # display name of the plug-in
static var ARG = "airquality" # additional argument name (or empty if none)
static var ARG_HINT = "Sensor Model"
# static var DISPLAY_NAME = "Air Quality" # display name of the plug-in
# static var ARG = "airquality" # additional argument name (or empty if none)
# static var ARG_HINT = "Sensor Model"
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 8" # command to send for updates
static var UPDATE_CMD = "Status 10" # command to send for updates
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x005B: [0], # Air Quality - no writable
0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement
0x042C: [0,1,2,8,9], # PM1 Concentration Measurement
0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement
0x042D: [0,1,2,8,9], # PM10 Concentration Measurement
0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement
0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement
})
# static var CLUSTERS = matter.consolidate_clusters(_class, {
# 0x005B: [0], # Air Quality - no writable
# 0x040D: [0,1,2,8,9], # Carbon Dioxide Concentration Measurement
# 0x042C: [0,1,2,8,9], # PM1 Concentration Measurement
# 0x042A: [0,1,2,8,9], # PM2.5 Concentration Measurement
# 0x042D: [0,1,2,8,9], # PM10 Concentration Measurement
# 0x042E: [0,1,2,8,9], # TVOC Total Volatile Organic Compounds Concentration Measurement
# 0x0413: [0,1,2,8,9], # Nitrogen Dioxide Concentration Measurement
# })
static var TYPES = { 0x002C: 1 } # Air Quality, rev 1
# static var TYPES = { 0x002C: 1 } # Air Quality, rev 1
var prefix # key prefix in JSON
var shadow_air_quality # Human readable air quality index
# var prefix # key prefix in JSON
# var shadow_air_quality # Human readable air quality index
# 0: Unknown
# 1: Good
# 4: Poor
# var shadow_pb0_3
# var shadow_pb0_5
# var shadow_pb1
# var shadow_pb2_5
# var shadow_pb5
# var shadow_pb10
var shadow_pm1
var shadow_pm2_5
# var shadow_pm5
var shadow_pm10
var shadow_co2
# var shadow_eco2
var shadow_no2
var shadow_tvoc
#############################################################
# Constructor
def init(device, endpoint, arguments)
super(self).init(device, endpoint, arguments)
self.prefix = str(arguments.find(self.ARG))
end
# # var shadow_pb0_3
# # var shadow_pb0_5
# # var shadow_pb1
# # var shadow_pb2_5
# # var shadow_pb5
# # var shadow_pb10
# var shadow_pm1
# var shadow_pm2_5
# # var shadow_pm5
# var shadow_pm10
# var shadow_co2
# # var shadow_eco2
# var shadow_no2
# var shadow_tvoc
#############################################################
# Stub for updating shadow values (local copies of what we published to the Matter gateway)
#
# This call is synnchronous and blocking.
def parse_update(data, index)
if index == 8 # Status 8
def parse_status(data, index)
if index == 10 # Status 10
var values = data.find(self.prefix)
end
end
#############################################################
# read an attribute
#
def read_attribute = matter.Plugin_Sensor_Air_Quality.read_attribute
#############################################################
# web_values
#

View File

@ -0,0 +1,36 @@
#
# Matter_Plugin_Bridge_Sensor_Contact.be - implements Contact Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Contact,weak
class Matter_Plugin_Bridge_Sensor_Contact : Matter_Plugin_Sensor_Contact
static var BRIDGE = true
static var TYPE = "http_contact" # name of the plug-in in json
# static var DISPLAY_NAME = "Contact" # display name of the plug-in
# static var ARG = "switch" # additional argument name (or empty if none)
# static var ARG_HINT = "Switch<x> number"
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 10" # command to send for updates
end
matter.Plugin_Bridge_Sensor_Contact = Matter_Plugin_Bridge_Sensor_Contact

View File

@ -0,0 +1,30 @@
#
# Matter_Plugin_Bridge_Sensor_Flow.be - implements base class for a Flow Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Flow,weak
class Matter_Plugin_Bridge_Sensor_Flow : Matter_Plugin_Sensor_Flow
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_flow" # name of the plug-in in json
end
matter.Plugin_Bridge_Sensor_Flow = Matter_Plugin_Bridge_Sensor_Flow

View File

@ -0,0 +1,30 @@
#
# Matter_Plugin_Bridge_Sensor_Humidity.be - implements base class for a Humidity Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Humidity,weak
class Matter_Plugin_Bridge_Sensor_Humidity : Matter_Plugin_Sensor_Humidity
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_humidity" # name of the plug-in in json
end
matter.Plugin_Bridge_Sensor_Humidity = Matter_Plugin_Bridge_Sensor_Humidity

View File

@ -0,0 +1,30 @@
#
# Matter_Plugin_Bridge_Sensor_Illuminance.be - implements base class for a Light/Illuminance Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Illuminance,weak
class Matter_Plugin_Bridge_Sensor_Illuminance : Matter_Plugin_Sensor_Illuminance
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_illuminance" # name of the plug-in in json
end
matter.Plugin_Bridge_Sensor_Illuminance = Matter_Plugin_Bridge_Sensor_Illuminance

View File

@ -0,0 +1,36 @@
#
# Matter_Plugin_Bridge_Sensor_Occupancy.be - implements base class for a Occupancy Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Occupancy,weak
class Matter_Plugin_Bridge_Sensor_Occupancy : Matter_Plugin_Sensor_Occupancy
static var BRIDGE = true
static var TYPE = "http_occupancy" # name of the plug-in in json
# static var DISPLAY_NAME = "Occupancy" # display name of the plug-in
# static var ARG = "switch" # additional argument name (or empty if none)
# static var ARG_HINT = "Switch<x> number"
# static var ARG_TYPE = / x -> int(x) # function to convert argument to the right type
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 10" # command to send for updates
end
matter.Plugin_Bridge_Sensor_Occupancy = Matter_Plugin_Bridge_Sensor_Occupancy

View File

@ -0,0 +1,30 @@
#
# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Pressure Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Pressure,weak
class Matter_Plugin_Bridge_Sensor_Pressure : Matter_Plugin_Sensor_Pressure
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_pressure" # name of the plug-in in json
end
matter.Plugin_Bridge_Sensor_Pressure = Matter_Plugin_Bridge_Sensor_Pressure

View File

@ -0,0 +1,30 @@
#
# Matter_Plugin_Bridge_Sensor_Temp.be - implements base class for a Temperature Sensor via HTTP to Tasmota
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Temp,weak
class Matter_Plugin_Bridge_Sensor_Temp : Matter_Plugin_Sensor_Temp
static var BRIDGE = true # flag as bridged device
static var TYPE = "http_temperature" # name of the plug-in in json
end
matter.Plugin_Bridge_Sensor_Temp = Matter_Plugin_Bridge_Sensor_Temp

View File

@ -0,0 +1,32 @@
#
# Matter_Plugin_Bridge_Sensor_Waterleak.be - implements Waterleak Sensor via HTTP to Tasmota
#
# Copyright (C) 2024 Stephan Hadinger & Theo Arends
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Bridge_Sensor_Waterleak,weak
class Matter_Plugin_Bridge_Sensor_Waterleak : Matter_Plugin_Sensor_Waterleak
static var BRIDGE = true
static var TYPE = "http_waterleak" # name of the plug-in in json
static var UPDATE_TIME = 5000 # update every 5s
static var UPDATE_CMD = "Status 10" # command to send for updates
end
matter.Plugin_Bridge_Sensor_Waterleak = Matter_Plugin_Bridge_Sensor_Waterleak

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light0 : Matter_Plugin_Light0
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Light0 = Matter_Plugin_Virt_Light0

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light1 : Matter_Plugin_Light1
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Light1 = Matter_Plugin_Virt_Light1

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light2 : Matter_Plugin_Light2
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Light2 = Matter_Plugin_Virt_Light2

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Light3 : Matter_Plugin_Light3
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Light3 = Matter_Plugin_Virt_Light3

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_OnOff : Matter_Plugin_OnOff
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_OnOff = Matter_Plugin_Virt_OnOff

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Air_Quality : Matter_Plugin_Sensor_Air_Quality
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Air_Quality = Matter_Plugin_Virt_Sensor_Air_Quality

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Contact : Matter_Plugin_Sensor_Contact
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Contact = Matter_Plugin_Virt_Sensor_Contact

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Flow : Matter_Plugin_Sensor_Flow
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Flow = Matter_Plugin_Virt_Sensor_Flow

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Humidity : Matter_Plugin_Sensor_Humidity
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Humidity = Matter_Plugin_Virt_Sensor_Humidity

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Illuminance : Matter_Plugin_Sensor_Illuminance
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Illuminance = Matter_Plugin_Virt_Sensor_Illuminance

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Occupancy : Matter_Plugin_Sensor_Occupancy
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Occupancy = Matter_Plugin_Virt_Sensor_Occupancy

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Pressure : Matter_Plugin_Sensor_Pressure
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Pressure = Matter_Plugin_Virt_Sensor_Pressure

View File

@ -29,6 +29,5 @@ class Matter_Plugin_Virt_Sensor_Temp : Matter_Plugin_Sensor_Temp
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Temp = Matter_Plugin_Virt_Sensor_Temp

View File

@ -30,6 +30,5 @@ class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak
static var ARG = "" # no arg for virtual device
static var ARG_HINT = "_Not used_" # Hint for entering the Argument (inside 'placeholder')
static var VIRTUAL = true # virtual device
end
matter.Plugin_Virt_Sensor_Waterleak = Matter_Plugin_Virt_Sensor_Waterleak

View File

@ -559,11 +559,11 @@ class Matter_UI
end
#---------------------------------------------------------------------- -#
# Generate configuration map from Status 8 and Status 11
# Generate configuration map from Status 10 and Status 11
#
# Returns a list of maps: [ {"type":"temperature", "filter":"ESP32#Temperature"} ]
#---------------------------------------------------------------------- -#
def generate_config_from_status(status8, status11)
def generate_config_from_status(status10, status11)
var config_list = []
# count `Power` and `Power<x>`
@ -614,7 +614,7 @@ class Matter_UI
# detect sensors
config_list += self.device.autoconf_sensors_list(status8)
config_list += self.device.autoconf_sensors_list(status10)
return config_list
end
@ -627,24 +627,24 @@ class Matter_UI
import json
if url == '' return end
var timeout = matter.Plugin_Bridge_HTTP.PROBE_TIMEOUT
var timeout = matter.Plugin_Device.PROBE_TIMEOUT
var http_remote = matter.HTTP_remote(nil, url, timeout)
# Status 8
var status8 = http_remote.call_sync('Status 8', timeout)
if status8 != nil status8 = json.load(status8) end
if status8 != nil status8 = status8.find('StatusSNS') end
# Status 10
var status10 = http_remote.call_sync('Status 10', timeout)
if status10 != nil status10 = json.load(status10) end
if status10 != nil status10 = status10.find('StatusSNS') end
# Status 11
var status11
if status8 != nil
if status10 != nil
status11 = http_remote.call_sync('Status 11', timeout)
if status11 != nil status11 = json.load(status11) end
if status11 != nil status11 = status11.find('StatusSTS') end
end
if status8 != nil && status11 != nil
tasmota.log(format("MTR: probed '%s' status8=%s satus11=%s", url, str(status8), str(status11)), 3)
if status10 != nil && status11 != nil
tasmota.log(format("MTR: probed '%s' status10=%s satus11=%s", url, str(status10), str(status11)), 3)
var config_list = self.generate_config_from_status(status8, status11)
var config_list = self.generate_config_from_status(status10, status11)
self.show_plugins_hints_js(self._CLASSES_TYPES2)
@ -1028,7 +1028,7 @@ class Matter_UI
while idx < size(self.device.plugins)
var plg = self.device.plugins[idx]
if isinstance(plg, matter.Plugin_Bridge_HTTP)
if plg.BRIDGE
if bridge_plugin_by_host == nil bridge_plugin_by_host = {} end
var host = plg.http_remote.addr

View File

@ -1,934 +0,0 @@
/* Solidification of Matter_Plugin_2_Bridge_HTTP.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_GetOptionReader;
/********************************************************************
** Solidified function: getoption
********************************************************************/
extern const bclass be_class_GetOptionReader;
be_local_closure(class_GetOptionReader_getoption, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_GetOptionReader,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(flag),
/* K1 */ be_nested_str_weak(getbits),
/* K2 */ be_const_int(1),
/* K3 */ be_nested_str_weak(flag2),
/* K4 */ be_nested_str_weak(get),
/* K5 */ be_nested_str_weak(flag3),
/* K6 */ be_nested_str_weak(flag4),
/* K7 */ be_nested_str_weak(flag5),
/* K8 */ be_nested_str_weak(flag6),
}),
be_str_weak(getoption),
&be_const_str_solidified,
( &(const binstruction[65]) { /* code */
0x540A001F, // 0000 LDINT R2 32
0x14080202, // 0001 LT R2 R1 R2
0x780A0006, // 0002 JMPF R2 #000A
0x88080100, // 0003 GETMBR R2 R0 K0
0x8C080501, // 0004 GETMET R2 R2 K1
0x5C100200, // 0005 MOVE R4 R1
0x58140002, // 0006 LDCONST R5 K2
0x7C080600, // 0007 CALL R2 3
0x80040400, // 0008 RET 1 R2
0x70020035, // 0009 JMP #0040
0x540A0031, // 000A LDINT R2 50
0x14080202, // 000B LT R2 R1 R2
0x780A0007, // 000C JMPF R2 #0015
0x88080103, // 000D GETMBR R2 R0 K3
0x8C080504, // 000E GETMET R2 R2 K4
0x5412001F, // 000F LDINT R4 32
0x04100204, // 0010 SUB R4 R1 R4
0x58140002, // 0011 LDCONST R5 K2
0x7C080600, // 0012 CALL R2 3
0x80040400, // 0013 RET 1 R2
0x7002002A, // 0014 JMP #0040
0x540A0051, // 0015 LDINT R2 82
0x14080202, // 0016 LT R2 R1 R2
0x780A0007, // 0017 JMPF R2 #0020
0x88080105, // 0018 GETMBR R2 R0 K5
0x8C080501, // 0019 GETMET R2 R2 K1
0x54120031, // 001A LDINT R4 50
0x04100204, // 001B SUB R4 R1 R4
0x58140002, // 001C LDCONST R5 K2
0x7C080600, // 001D CALL R2 3
0x80040400, // 001E RET 1 R2
0x7002001F, // 001F JMP #0040
0x540A0071, // 0020 LDINT R2 114
0x14080202, // 0021 LT R2 R1 R2
0x780A0007, // 0022 JMPF R2 #002B
0x88080106, // 0023 GETMBR R2 R0 K6
0x8C080501, // 0024 GETMET R2 R2 K1
0x54120051, // 0025 LDINT R4 82
0x04100204, // 0026 SUB R4 R1 R4
0x58140002, // 0027 LDCONST R5 K2
0x7C080600, // 0028 CALL R2 3
0x80040400, // 0029 RET 1 R2
0x70020014, // 002A JMP #0040
0x540A0091, // 002B LDINT R2 146
0x14080202, // 002C LT R2 R1 R2
0x780A0007, // 002D JMPF R2 #0036
0x88080107, // 002E GETMBR R2 R0 K7
0x8C080501, // 002F GETMET R2 R2 K1
0x54120071, // 0030 LDINT R4 114
0x04100204, // 0031 SUB R4 R1 R4
0x58140002, // 0032 LDCONST R5 K2
0x7C080600, // 0033 CALL R2 3
0x80040400, // 0034 RET 1 R2
0x70020009, // 0035 JMP #0040
0x540A00B1, // 0036 LDINT R2 178
0x14080202, // 0037 LT R2 R1 R2
0x780A0006, // 0038 JMPF R2 #0040
0x88080108, // 0039 GETMBR R2 R0 K8
0x8C080501, // 003A GETMET R2 R2 K1
0x54120091, // 003B LDINT R4 146
0x04100204, // 003C SUB R4 R1 R4
0x58140002, // 003D LDCONST R5 K2
0x7C080600, // 003E CALL R2 3
0x80040400, // 003F RET 1 R2
0x80000000, // 0040 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_GetOptionReader;
be_local_closure(class_GetOptionReader_init, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_GetOptionReader,
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(value_error),
/* K1 */ be_nested_str_weak(invalid_X20json),
/* K2 */ be_nested_str_weak(SetOption),
/* K3 */ be_nested_str_weak(flag),
/* K4 */ be_nested_str_weak(fromhex),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(reverse),
/* K7 */ be_nested_str_weak(flag2),
/* K8 */ be_const_int(1),
/* K9 */ be_nested_str_weak(flag3),
/* K10 */ be_const_int(2),
/* K11 */ be_nested_str_weak(flag4),
/* K12 */ be_const_int(3),
/* K13 */ be_nested_str_weak(flag5),
/* K14 */ be_nested_str_weak(flag6),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[54]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x1C080202, // 0001 EQ R2 R1 R2
0x780A0000, // 0002 JMPF R2 #0004
0xB0060101, // 0003 RAISE 1 K0 K1
0x94080302, // 0004 GETIDX R2 R1 K2
0x600C0015, // 0005 GETGBL R3 G21
0x7C0C0000, // 0006 CALL R3 0
0x8C0C0704, // 0007 GETMET R3 R3 K4
0x94140505, // 0008 GETIDX R5 R2 K5
0x7C0C0400, // 0009 CALL R3 2
0x8C0C0706, // 000A GETMET R3 R3 K6
0x7C0C0200, // 000B CALL R3 1
0x90020603, // 000C SETMBR R0 K3 R3
0x600C0015, // 000D GETGBL R3 G21
0x7C0C0000, // 000E CALL R3 0
0x8C0C0704, // 000F GETMET R3 R3 K4
0x94140508, // 0010 GETIDX R5 R2 K8
0x7C0C0400, // 0011 CALL R3 2
0x90020E03, // 0012 SETMBR R0 K7 R3
0x600C0015, // 0013 GETGBL R3 G21
0x7C0C0000, // 0014 CALL R3 0
0x8C0C0704, // 0015 GETMET R3 R3 K4
0x9414050A, // 0016 GETIDX R5 R2 K10
0x7C0C0400, // 0017 CALL R3 2
0x8C0C0706, // 0018 GETMET R3 R3 K6
0x7C0C0200, // 0019 CALL R3 1
0x90021203, // 001A SETMBR R0 K9 R3
0x600C0015, // 001B GETGBL R3 G21
0x7C0C0000, // 001C CALL R3 0
0x8C0C0704, // 001D GETMET R3 R3 K4
0x9414050C, // 001E GETIDX R5 R2 K12
0x7C0C0400, // 001F CALL R3 2
0x8C0C0706, // 0020 GETMET R3 R3 K6
0x7C0C0200, // 0021 CALL R3 1
0x90021603, // 0022 SETMBR R0 K11 R3
0x600C0015, // 0023 GETGBL R3 G21
0x7C0C0000, // 0024 CALL R3 0
0x8C0C0704, // 0025 GETMET R3 R3 K4
0x54160003, // 0026 LDINT R5 4
0x94140405, // 0027 GETIDX R5 R2 R5
0x7C0C0400, // 0028 CALL R3 2
0x8C0C0706, // 0029 GETMET R3 R3 K6
0x7C0C0200, // 002A CALL R3 1
0x90021A03, // 002B SETMBR R0 K13 R3
0x600C0015, // 002C GETGBL R3 G21
0x7C0C0000, // 002D CALL R3 0
0x8C0C0704, // 002E GETMET R3 R3 K4
0x54160004, // 002F LDINT R5 5
0x94140405, // 0030 GETIDX R5 R2 R5
0x7C0C0400, // 0031 CALL R3 2
0x8C0C0706, // 0032 GETMET R3 R3 K6
0x7C0C0200, // 0033 CALL R3 1
0x90021C03, // 0034 SETMBR R0 K14 R3
0x80000000, // 0035 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: GetOptionReader
********************************************************************/
be_local_class(GetOptionReader,
6,
NULL,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(flag2, -1), be_const_var(1) },
{ be_const_key_weak(flag4, -1), be_const_var(3) },
{ be_const_key_weak(getoption, -1), be_const_closure(class_GetOptionReader_getoption_closure) },
{ be_const_key_weak(init, 5), be_const_closure(class_GetOptionReader_init_closure) },
{ be_const_key_weak(flag3, -1), be_const_var(2) },
{ be_const_key_weak(flag6, -1), be_const_var(5) },
{ be_const_key_weak(flag5, -1), be_const_var(4) },
{ be_const_key_weak(flag, 0), be_const_var(0) },
})),
be_str_weak(GetOptionReader)
);
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
/********************************************************************
** Solidified function: call_remote_sync
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_call_remote_sync, /* name */
be_nested_proto(
10, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(json),
/* K1 */ be_const_int(2),
/* K2 */ be_nested_str_weak(_X20),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(http_remote),
/* K5 */ be_nested_str_weak(call_sync),
/* K6 */ be_nested_str_weak(SYNC_TIMEOUT),
/* K7 */ be_nested_str_weak(device_is_alive),
/* K8 */ be_nested_str_weak(load),
/* K9 */ be_const_int(1),
/* K10 */ be_nested_str_weak(tasmota),
/* K11 */ be_nested_str_weak(log),
/* K12 */ be_nested_str_weak(MTR_X3A_X20HTTP_X20GET_X20retrying),
/* K13 */ be_const_int(3),
}),
be_str_weak(call_remote_sync),
&be_const_str_solidified,
( &(const binstruction[42]) { /* code */
0xA40E0000, // 0000 IMPORT R3 K0
0x58100001, // 0001 LDCONST R4 K1
0x4C140000, // 0002 LDNIL R5
0x20140405, // 0003 NE R5 R2 R5
0x78160005, // 0004 JMPF R5 #000B
0x00140302, // 0005 ADD R5 R1 K2
0x60180008, // 0006 GETGBL R6 G8
0x5C1C0400, // 0007 MOVE R7 R2
0x7C180200, // 0008 CALL R6 1
0x00140A06, // 0009 ADD R5 R5 R6
0x5C040A00, // 000A MOVE R1 R5
0x24140903, // 000B GT R5 R4 K3
0x78160016, // 000C JMPF R5 #0024
0x88140104, // 000D GETMBR R5 R0 K4
0x8C140B05, // 000E GETMET R5 R5 K5
0x5C1C0200, // 000F MOVE R7 R1
0x88200106, // 0010 GETMBR R8 R0 K6
0x7C140600, // 0011 CALL R5 3
0x4C180000, // 0012 LDNIL R6
0x20180A06, // 0013 NE R6 R5 R6
0x781A0007, // 0014 JMPF R6 #001D
0x88180104, // 0015 GETMBR R6 R0 K4
0x8C180D07, // 0016 GETMET R6 R6 K7
0x50200200, // 0017 LDBOOL R8 1 0
0x7C180400, // 0018 CALL R6 2
0x8C180708, // 0019 GETMET R6 R3 K8
0x5C200A00, // 001A MOVE R8 R5
0x7C180400, // 001B CALL R6 2
0x80040C00, // 001C RET 1 R6
0x04100909, // 001D SUB R4 R4 K9
0xB81A1400, // 001E GETNGBL R6 K10
0x8C180D0B, // 001F GETMET R6 R6 K11
0x5820000C, // 0020 LDCONST R8 K12
0x5824000D, // 0021 LDCONST R9 K13
0x7C180600, // 0022 CALL R6 3
0x7001FFE6, // 0023 JMP #000B
0x88140104, // 0024 GETMBR R5 R0 K4
0x8C140B07, // 0025 GETMET R5 R5 K7
0x501C0000, // 0026 LDBOOL R7 0 0
0x7C140400, // 0027 CALL R5 2
0x4C140000, // 0028 LDNIL R5
0x80040A00, // 0029 RET 1 R5
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_onoff
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_value_onoff, /* name */
be_nested_proto(
3, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(_X3Cb_X3EOn_X3C_X2Fb_X3E),
/* K1 */ be_nested_str_weak(Off),
/* K2 */ be_nested_str_weak(),
}),
be_str_weak(web_value_onoff),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0004, // 0002 JMPF R2 #0008
0x78060001, // 0003 JMPF R1 #0006
0x58080000, // 0004 LDCONST R2 K0
0x70020000, // 0005 JMP #0007
0x58080001, // 0006 LDCONST R2 K1
0x70020000, // 0007 JMP #0009
0x58080002, // 0008 LDCONST R2 K2
0x80040400, // 0009 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_http_response
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_parse_http_response, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[12]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(http_remote),
/* K2 */ be_nested_str_weak(device_is_alive),
/* K3 */ be_nested_str_weak(device),
/* K4 */ be_nested_str_weak(tick),
/* K5 */ be_nested_str_weak(json),
/* K6 */ be_nested_str_weak(load),
/* K7 */ be_nested_str_weak(contains),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(StatusSTS),
/* K10 */ be_nested_str_weak(StatusSHT),
/* K11 */ be_nested_str_weak(parse_update),
}),
be_str_weak(parse_http_response),
&be_const_str_solidified,
( &(const binstruction[39]) { /* code */
0x24100300, // 0000 GT R4 R1 K0
0x78120023, // 0001 JMPF R4 #0026
0x88100101, // 0002 GETMBR R4 R0 K1
0x8C100902, // 0003 GETMET R4 R4 K2
0x50180200, // 0004 LDBOOL R6 1 0
0x7C100400, // 0005 CALL R4 2
0x88100103, // 0006 GETMBR R4 R0 K3
0x88100904, // 0007 GETMBR R4 R4 K4
0xA4160A00, // 0008 IMPORT R5 K5
0x8C180B06, // 0009 GETMET R6 R5 K6
0x5C200400, // 000A MOVE R8 R2
0x7C180400, // 000B CALL R6 2
0x4C1C0000, // 000C LDNIL R7
0x781A0017, // 000D JMPF R6 #0026
0x8C200D07, // 000E GETMET R8 R6 K7
0x58280008, // 000F LDCONST R10 K8
0x7C200400, // 0010 CALL R8 2
0x78220002, // 0011 JMPF R8 #0015
0x94180D08, // 0012 GETIDX R6 R6 K8
0x541E0007, // 0013 LDINT R7 8
0x7002000C, // 0014 JMP #0022
0x8C200D07, // 0015 GETMET R8 R6 K7
0x58280009, // 0016 LDCONST R10 K9
0x7C200400, // 0017 CALL R8 2
0x78220002, // 0018 JMPF R8 #001C
0x94180D09, // 0019 GETIDX R6 R6 K9
0x541E000A, // 001A LDINT R7 11
0x70020005, // 001B JMP #0022
0x8C200D07, // 001C GETMET R8 R6 K7
0x5828000A, // 001D LDCONST R10 K10
0x7C200400, // 001E CALL R8 2
0x78220001, // 001F JMPF R8 #0022
0x94180D09, // 0020 GETIDX R6 R6 K9
0x541E000C, // 0021 LDINT R7 13
0x8C20010B, // 0022 GETMET R8 R0 K11
0x5C280C00, // 0023 MOVE R10 R6
0x5C2C0E00, // 0024 MOVE R11 R7
0x7C200600, // 0025 CALL R8 3
0x80000000, // 0026 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_values, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26lt_X3B_X2D_X2D_X20_X28),
/* K4 */ be_nested_str_weak(DISPLAY_NAME),
/* K5 */ be_nested_str_weak(_X29_X20_X2D_X2D_X26gt_X3B),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x88100104, // 0004 GETMBR R4 R0 K4
0x00120604, // 0005 ADD R4 K3 R4
0x00100905, // 0006 ADD R4 R4 K5
0x7C080400, // 0007 CALL R2 2
0x80000000, // 0008 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: is_local_device
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_is_local_device, /* name */
be_nested_proto(
2, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
0, /* has constants */
NULL, /* no const */
be_str_weak(is_local_device),
&be_const_str_solidified,
( &(const binstruction[ 2]) { /* code */
0x50040000, // 0000 LDBOOL R1 0 0
0x80040200, // 0001 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG_HTTP),
/* K3 */ be_nested_str_weak(http_remote),
/* K4 */ be_nested_str_weak(device),
/* K5 */ be_nested_str_weak(register_http_remote),
/* K6 */ be_nested_str_weak(PROBE_TIMEOUT),
/* K7 */ be_nested_str_weak(register_cmd_cb),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100701, // 0008 GETMET R4 R3 K1
0x88180102, // 0009 GETMBR R6 R0 K2
0x7C100400, // 000A CALL R4 2
0x88140104, // 000B GETMBR R5 R0 K4
0x8C140B05, // 000C GETMET R5 R5 K5
0x5C1C0800, // 000D MOVE R7 R4
0x88200106, // 000E GETMBR R8 R0 K6
0x7C140600, // 000F CALL R5 3
0x90020605, // 0010 SETMBR R0 K3 R5
0x8C140107, // 0011 GETMET R5 R0 K7
0x7C140200, // 0012 CALL R5 1
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_parse_update, /* name */
be_nested_proto(
3, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
0, /* has constants */
NULL, /* no const */
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_read_attribute, /* name */
be_nested_proto(
14, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[21]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(string),
/* K5 */ be_const_int(3),
/* K6 */ be_nested_str_weak(http_remote),
/* K7 */ be_nested_str_weak(get_info),
/* K8 */ be_nested_str_weak(find),
/* K9 */ be_nested_str_weak(name),
/* K10 */ be_nested_str_weak(set),
/* K11 */ be_nested_str_weak(UTF1),
/* K12 */ be_nested_str_weak(NULL),
/* K13 */ be_nested_str_weak(version),
/* K14 */ be_nested_str_weak(_X28),
/* K15 */ be_const_int(0),
/* K16 */ be_const_int(1),
/* K17 */ be_nested_str_weak(mac),
/* K18 */ be_nested_str_weak(BOOL),
/* K19 */ be_nested_str_weak(reachable),
/* K20 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[103]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0038, // 0004 LDINT R7 57
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0056, // 0006 JMPF R7 #005E
0xA41E0800, // 0007 IMPORT R7 K4
0x1C200D05, // 0008 EQ R8 R6 K5
0x78220012, // 0009 JMPF R8 #001D
0x88200106, // 000A GETMBR R8 R0 K6
0x8C201107, // 000B GETMET R8 R8 K7
0x7C200200, // 000C CALL R8 1
0x8C201108, // 000D GETMET R8 R8 K8
0x58280009, // 000E LDCONST R10 K9
0x7C200400, // 000F CALL R8 2
0x78220005, // 0010 JMPF R8 #0017
0x8C24070A, // 0011 GETMET R9 R3 K10
0x882C090B, // 0012 GETMBR R11 R4 K11
0x5C301000, // 0013 MOVE R12 R8
0x7C240600, // 0014 CALL R9 3
0x80041200, // 0015 RET 1 R9
0x70020004, // 0016 JMP #001C
0x8C24070A, // 0017 GETMET R9 R3 K10
0x882C090C, // 0018 GETMBR R11 R4 K12
0x4C300000, // 0019 LDNIL R12
0x7C240600, // 001A CALL R9 3
0x80041200, // 001B RET 1 R9
0x70020040, // 001C JMP #005E
0x54220009, // 001D LDINT R8 10
0x1C200C08, // 001E EQ R8 R6 R8
0x7822001B, // 001F JMPF R8 #003C
0x88200106, // 0020 GETMBR R8 R0 K6
0x8C201107, // 0021 GETMET R8 R8 K7
0x7C200200, // 0022 CALL R8 1
0x8C201108, // 0023 GETMET R8 R8 K8
0x5828000D, // 0024 LDCONST R10 K13
0x7C200400, // 0025 CALL R8 2
0x7822000E, // 0026 JMPF R8 #0036
0x8C240F08, // 0027 GETMET R9 R7 K8
0x5C2C1000, // 0028 MOVE R11 R8
0x5830000E, // 0029 LDCONST R12 K14
0x7C240600, // 002A CALL R9 3
0x2428130F, // 002B GT R10 R9 K15
0x782A0002, // 002C JMPF R10 #0030
0x04281310, // 002D SUB R10 R9 K16
0x402A1E0A, // 002E CONNECT R10 K15 R10
0x9420100A, // 002F GETIDX R8 R8 R10
0x8C28070A, // 0030 GETMET R10 R3 K10
0x8830090B, // 0031 GETMBR R12 R4 K11
0x5C341000, // 0032 MOVE R13 R8
0x7C280600, // 0033 CALL R10 3
0x80041400, // 0034 RET 1 R10
0x70020004, // 0035 JMP #003B
0x8C24070A, // 0036 GETMET R9 R3 K10
0x882C090C, // 0037 GETMBR R11 R4 K12
0x4C300000, // 0038 LDNIL R12
0x7C240600, // 0039 CALL R9 3
0x80041200, // 003A RET 1 R9
0x70020021, // 003B JMP #005E
0x5422000E, // 003C LDINT R8 15
0x1C200C08, // 003D EQ R8 R6 R8
0x74220002, // 003E JMPT R8 #0042
0x54220011, // 003F LDINT R8 18
0x1C200C08, // 0040 EQ R8 R6 R8
0x78220012, // 0041 JMPF R8 #0055
0x88200106, // 0042 GETMBR R8 R0 K6
0x8C201107, // 0043 GETMET R8 R8 K7
0x7C200200, // 0044 CALL R8 1
0x8C201108, // 0045 GETMET R8 R8 K8
0x58280011, // 0046 LDCONST R10 K17
0x7C200400, // 0047 CALL R8 2
0x78220005, // 0048 JMPF R8 #004F
0x8C24070A, // 0049 GETMET R9 R3 K10
0x882C090B, // 004A GETMBR R11 R4 K11
0x5C301000, // 004B MOVE R12 R8
0x7C240600, // 004C CALL R9 3
0x80041200, // 004D RET 1 R9
0x70020004, // 004E JMP #0054
0x8C24070A, // 004F GETMET R9 R3 K10
0x882C090C, // 0050 GETMBR R11 R4 K12
0x4C300000, // 0051 LDNIL R12
0x7C240600, // 0052 CALL R9 3
0x80041200, // 0053 RET 1 R9
0x70020008, // 0054 JMP #005E
0x54220010, // 0055 LDINT R8 17
0x1C200C08, // 0056 EQ R8 R6 R8
0x78220005, // 0057 JMPF R8 #005E
0x8C20070A, // 0058 GETMET R8 R3 K10
0x88280912, // 0059 GETMBR R10 R4 K18
0x882C0106, // 005A GETMBR R11 R0 K6
0x882C1713, // 005B GETMBR R11 R11 K19
0x7C200600, // 005C CALL R8 3
0x80041000, // 005D RET 1 R8
0x601C0003, // 005E GETGBL R7 G3
0x5C200000, // 005F MOVE R8 R0
0x7C1C0200, // 0060 CALL R7 1
0x8C1C0F14, // 0061 GETMET R7 R7 K20
0x5C240200, // 0062 MOVE R9 R1
0x5C280400, // 0063 MOVE R10 R2
0x5C2C0600, // 0064 MOVE R11 R3
0x7C1C0800, // 0065 CALL R7 4
0x80040E00, // 0066 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(PREFIX),
/* K4 */ be_nested_str_weak(html_escape),
/* K5 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C0C0302, // 0003 GETMET R3 R1 K2
0x60140018, // 0004 GETGBL R5 G24
0x88180103, // 0005 GETMBR R6 R0 K3
0x780A0003, // 0006 JMPF R2 #000B
0x8C1C0304, // 0007 GETMET R7 R1 K4
0x5C240400, // 0008 MOVE R9 R2
0x7C1C0400, // 0009 CALL R7 2
0x70020000, // 000A JMP #000C
0x581C0005, // 000B LDCONST R7 K5
0x7C140400, // 000C CALL R5 2
0x7C0C0400, // 000D CALL R3 2
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: register_cmd_cb
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_register_cmd_cb, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
1, /* has sup protos */
( &(const struct bproto*[ 2]) {
be_nested_proto(
8, /* nstack */
3, /* argc */
0, /* varg */
1, /* has upvals */
( &(const bupvaldesc[ 1]) { /* upvals */
be_local_const_upval(1, 0),
}),
0, /* has sup protos */
NULL,
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(parse_http_response),
}),
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x680C0000, // 0000 GETUPV R3 U0
0x8C0C0700, // 0001 GETMET R3 R3 K0
0x5C140000, // 0002 MOVE R5 R0
0x5C180200, // 0003 MOVE R6 R1
0x5C1C0400, // 0004 MOVE R7 R2
0x7C0C0800, // 0005 CALL R3 4
0x80040600, // 0006 RET 1 R3
})
),
&be_class_Matter_Plugin_Bridge_HTTP,
}),
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(http_remote),
/* K1 */ be_nested_str_weak(add_schedule),
/* K2 */ be_nested_str_weak(UPDATE_CMD),
/* K3 */ be_nested_str_weak(UPDATE_TIME),
}),
be_str_weak(register_cmd_cb),
&be_const_str_solidified,
( &(const binstruction[ 8]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x880C0102, // 0002 GETMBR R3 R0 K2
0x88100103, // 0003 GETMBR R4 R0 K3
0x84140000, // 0004 CLOSURE R5 P0
0x7C040800, // 0005 CALL R1 4
0xA0000000, // 0006 CLOSE R0
0x80000000, // 0007 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_update_shadow, /* name */
be_nested_proto(
7, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(tick),
/* K1 */ be_nested_str_weak(device),
/* K2 */ be_nested_str_weak(call_remote_sync),
/* K3 */ be_nested_str_weak(UPDATE_CMD),
/* K4 */ be_nested_str_weak(parse_http_response),
/* K5 */ be_const_int(1),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x88040101, // 0000 GETMBR R1 R0 K1
0x88040300, // 0001 GETMBR R1 R1 K0
0x90020001, // 0002 SETMBR R0 K0 R1
0x8C040102, // 0003 GETMET R1 R0 K2
0x880C0103, // 0004 GETMBR R3 R0 K3
0x7C040400, // 0005 CALL R1 2
0x78060004, // 0006 JMPF R1 #000C
0x8C080104, // 0007 GETMET R2 R0 K4
0x58100005, // 0008 LDCONST R4 K5
0x5C140200, // 0009 MOVE R5 R1
0x88180103, // 000A GETMBR R6 R0 K3
0x7C080800, // 000B CALL R2 4
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: every_250ms
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_closure(class_Matter_Plugin_Bridge_HTTP_every_250ms, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_HTTP,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(http_remote),
/* K1 */ be_nested_str_weak(scheduler),
}),
be_str_weak(every_250ms),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x7C040200, // 0002 CALL R1 1
0x80000000, // 0003 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_HTTP
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Bridge_HTTP,
1,
&be_class_Matter_Plugin_Device,
be_nested_map(23,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2011) },
{ be_const_key_weak(every_250ms, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_every_250ms_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak() },
{ be_const_key_weak(call_remote_sync, 22), be_const_closure(class_Matter_Plugin_Bridge_HTTP_call_remote_sync_closure) },
{ be_const_key_weak(web_value_onoff, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_value_onoff_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_update_shadow_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) },
{ be_const_key_weak(GetOptionReader, 5), be_const_class(be_class_GetOptionReader) },
{ be_const_key_weak(parse_http_response, 21), be_const_closure(class_Matter_Plugin_Bridge_HTTP_parse_http_response_closure) },
{ be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_parse_update_closure) },
{ be_const_key_weak(SYNC_TIMEOUT, 18), be_const_int(500) },
{ be_const_key_weak(is_local_device, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_is_local_device_closure) },
{ be_const_key_weak(PREFIX, 17), be_nested_str_weak(_X7C_X20_X3Ci_X3E_X25s_X3C_X2Fi_X3E_X20) },
{ be_const_key_weak(http_remote, 1), be_const_var(0) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_init_closure) },
{ be_const_key_weak(ARG_HTTP, -1), be_nested_str_weak(url) },
{ be_const_key_weak(DISPLAY_NAME, 9), be_nested_str_weak() },
{ be_const_key_weak(web_values_prefix, 19), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_values_prefix_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_read_attribute_closure) },
{ be_const_key_weak(PROBE_TIMEOUT, -1), be_const_int(1700) },
{ be_const_key_weak(register_cmd_cb, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_register_cmd_cb_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_HTTP_web_values_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak() },
})),
be_str_weak(Matter_Plugin_Bridge_HTTP)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,16 +1,487 @@
/* Solidification of Matter_Plugin_2_OnOff.h */
/* Solidification of Matter_Plugin_2_Light0.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_OnOff;
extern const bclass be_class_Matter_Plugin_Light0;
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(shadow_onoff),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[25]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0005, // 0004 LDINT R7 6
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0008, // 0006 JMPF R7 #0010
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E0004, // 000A JMPF R7 #0010
0x8C1C0706, // 000B GETMET R7 R3 K6
0x88240907, // 000C GETMBR R9 R4 K7
0x88280108, // 000D GETMBR R10 R0 K8
0x7C1C0600, // 000E CALL R7 3
0x80040E00, // 000F RET 1 R7
0x601C0003, // 0010 GETGBL R7 G3
0x5C200000, // 0011 MOVE R8 R0
0x7C1C0200, // 0012 CALL R7 1
0x8C1C0F09, // 0013 GETMET R7 R7 K9
0x5C240200, // 0014 MOVE R9 R1
0x5C280400, // 0015 MOVE R10 R2
0x5C2C0600, // 0016 MOVE R11 R3
0x7C1C0800, // 0017 CALL R7 4
0x80040E00, // 0018 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_update_virtual, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(set_onoff),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x58100001, // 0001 LDCONST R4 K1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E0004, // 0005 JMPF R3 #000B
0x8C0C0102, // 0006 GETMET R3 R0 K2
0x60140017, // 0007 GETGBL R5 G23
0x5C180400, // 0008 MOVE R6 R2
0x7C140200, // 0009 CALL R5 1
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_parse_status, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_const_int(1),
/* K2 */ be_nested_str_weak(contains),
/* K3 */ be_nested_str_weak(POWER),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(ON),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[37]) { /* code */
0x540E000A, // 0000 LDINT R3 11
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0020, // 0002 JMPF R3 #0024
0x500C0000, // 0003 LDBOOL R3 0 0
0x88100100, // 0004 GETMBR R4 R0 K0
0x1C100901, // 0005 EQ R4 R4 K1
0x78120009, // 0006 JMPF R4 #0011
0x8C100302, // 0007 GETMET R4 R1 K2
0x58180003, // 0008 LDCONST R6 K3
0x7C100400, // 0009 CALL R4 2
0x78120005, // 000A JMPF R4 #0011
0x8C100304, // 000B GETMET R4 R1 K4
0x58180003, // 000C LDCONST R6 K3
0x7C100400, // 000D CALL R4 2
0x1C100905, // 000E EQ R4 R4 K5
0x5C0C0800, // 000F MOVE R3 R4
0x70020007, // 0010 JMP #0019
0x8C100304, // 0011 GETMET R4 R1 K4
0x60180008, // 0012 GETGBL R6 G8
0x881C0100, // 0013 GETMBR R7 R0 K0
0x7C180200, // 0014 CALL R6 1
0x001A0606, // 0015 ADD R6 K3 R6
0x7C100400, // 0016 CALL R4 2
0x1C100905, // 0017 EQ R4 R4 K5
0x5C0C0800, // 0018 MOVE R3 R4
0x88100106, // 0019 GETMBR R4 R0 K6
0x60140017, // 001A GETGBL R5 G23
0x5C180600, // 001B MOVE R6 R3
0x7C140200, // 001C CALL R5 1
0x20100805, // 001D NE R4 R4 R5
0x78120004, // 001E JMPF R4 #0024
0x8C100107, // 001F GETMET R4 R0 K7
0x541A0005, // 0020 LDINT R6 6
0x581C0008, // 0021 LDCONST R7 K8
0x7C100600, // 0022 CALL R4 3
0x90020C03, // 0023 SETMBR R0 K6 R3
0x80000000, // 0024 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(0),
/* K4 */ be_const_int(1),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x4C180000, // 0003 LDNIL R6
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x4C0C0000, // 0008 LDNIL R3
0x20080403, // 0009 NE R2 R2 R3
0x780A0003, // 000A JMPF R2 #000F
0x88080100, // 000B GETMBR R2 R0 K0
0x18080503, // 000C LE R2 R2 K3
0x780A0000, // 000D JMPF R2 #000F
0x90020104, // 000E SETMBR R0 K0 K4
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[18]) { /* constants */
/* K0 */ be_nested_str_weak(BRIDGE),
/* K1 */ be_nested_str_weak(call_remote_sync),
/* K2 */ be_nested_str_weak(Power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_nested_str_weak(1),
/* K5 */ be_nested_str_weak(0),
/* K6 */ be_nested_str_weak(parse_status),
/* K7 */ be_nested_str_weak(VIRTUAL),
/* K8 */ be_nested_str_weak(shadow_onoff),
/* K9 */ be_nested_str_weak(attribute_updated),
/* K10 */ be_const_int(0),
/* K11 */ be_nested_str_weak(tasmota),
/* K12 */ be_nested_str_weak(set_power),
/* K13 */ be_const_int(1),
/* K14 */ be_nested_str_weak(update_shadow),
/* K15 */ be_nested_str_weak(light),
/* K16 */ be_nested_str_weak(set),
/* K17 */ be_nested_str_weak(power),
}),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[55]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x780A0011, // 0001 JMPF R2 #0014
0x8C080101, // 0002 GETMET R2 R0 K1
0x60100008, // 0003 GETGBL R4 G8
0x88140103, // 0004 GETMBR R5 R0 K3
0x7C100200, // 0005 CALL R4 1
0x00120404, // 0006 ADD R4 K2 R4
0x78060001, // 0007 JMPF R1 #000A
0x58140004, // 0008 LDCONST R5 K4
0x70020000, // 0009 JMP #000B
0x58140005, // 000A LDCONST R5 K5
0x7C080600, // 000B CALL R2 3
0x4C0C0000, // 000C LDNIL R3
0x200C0403, // 000D NE R3 R2 R3
0x780E0003, // 000E JMPF R3 #0013
0x8C0C0106, // 000F GETMET R3 R0 K6
0x5C140400, // 0010 MOVE R5 R2
0x541A000A, // 0011 LDINT R6 11
0x7C0C0600, // 0012 CALL R3 3
0x70020021, // 0013 JMP #0036
0x88080107, // 0014 GETMBR R2 R0 K7
0x780A0008, // 0015 JMPF R2 #001F
0x88080108, // 0016 GETMBR R2 R0 K8
0x20080202, // 0017 NE R2 R1 R2
0x780A0004, // 0018 JMPF R2 #001E
0x8C080109, // 0019 GETMET R2 R0 K9
0x54120005, // 001A LDINT R4 6
0x5814000A, // 001B LDCONST R5 K10
0x7C080600, // 001C CALL R2 3
0x90021001, // 001D SETMBR R0 K8 R1
0x70020016, // 001E JMP #0036
0x88080103, // 001F GETMBR R2 R0 K3
0x4C0C0000, // 0020 LDNIL R3
0x20080403, // 0021 NE R2 R2 R3
0x780A000A, // 0022 JMPF R2 #002E
0xB80A1600, // 0023 GETNGBL R2 K11
0x8C08050C, // 0024 GETMET R2 R2 K12
0x88100103, // 0025 GETMBR R4 R0 K3
0x0410090D, // 0026 SUB R4 R4 K13
0x60140017, // 0027 GETGBL R5 G23
0x5C180200, // 0028 MOVE R6 R1
0x7C140200, // 0029 CALL R5 1
0x7C080600, // 002A CALL R2 3
0x8C08010E, // 002B GETMET R2 R0 K14
0x7C080200, // 002C CALL R2 1
0x70020007, // 002D JMP #0036
0xA40A1E00, // 002E IMPORT R2 K15
0x8C0C0510, // 002F GETMET R3 R2 K16
0x60140013, // 0030 GETGBL R5 G19
0x7C140000, // 0031 CALL R5 0
0x98162201, // 0032 SETIDX R5 K17 R1
0x7C0C0400, // 0033 CALL R3 2
0x8C0C010E, // 0034 GETMET R3 R0 K14
0x7C0C0200, // 0035 CALL R3 1
0x80000000, // 0036 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_update_shadow, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(BRIDGE),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(get_power),
/* K5 */ be_const_int(1),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[33]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x74060018, // 0001 JMPT R1 #001B
0x88040101, // 0002 GETMBR R1 R0 K1
0x74060016, // 0003 JMPT R1 #001B
0x88040102, // 0004 GETMBR R1 R0 K2
0x4C080000, // 0005 LDNIL R2
0x20040202, // 0006 NE R1 R1 R2
0x78060012, // 0007 JMPF R1 #001B
0xB8060600, // 0008 GETNGBL R1 K3
0x8C040304, // 0009 GETMET R1 R1 K4
0x880C0102, // 000A GETMBR R3 R0 K2
0x040C0705, // 000B SUB R3 R3 K5
0x7C040400, // 000C CALL R1 2
0x4C080000, // 000D LDNIL R2
0x20080202, // 000E NE R2 R1 R2
0x780A000A, // 000F JMPF R2 #001B
0x88080106, // 0010 GETMBR R2 R0 K6
0x600C0017, // 0011 GETGBL R3 G23
0x5C100200, // 0012 MOVE R4 R1
0x7C0C0200, // 0013 CALL R3 1
0x20080403, // 0014 NE R2 R2 R3
0x780A0003, // 0015 JMPF R2 #001A
0x8C080107, // 0016 GETMET R2 R0 K7
0x54120005, // 0017 LDINT R4 6
0x58140008, // 0018 LDCONST R5 K8
0x7C080600, // 0019 CALL R2 3
0x90020C01, // 001A SETMBR R0 K6 R1
0x60040003, // 001B GETGBL R1 G3
0x5C080000, // 001C MOVE R2 R0
0x7C040200, // 001D CALL R1 1
0x8C040309, // 001E GETMET R1 R1 K9
0x7C040200, // 001F CALL R1 1
0x80000000, // 0020 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_web_values, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_invoke_request, /* name */
be_nested_proto(
11, /* nstack */
4, /* argc */
@ -18,7 +489,7 @@ be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[12]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
@ -95,159 +566,10 @@ be_local_closure(class_Matter_Plugin_OnOff_invoke_request, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(shadow_onoff),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[25]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0005, // 0004 LDINT R7 6
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0008, // 0006 JMPF R7 #0010
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E0004, // 000A JMPF R7 #0010
0x8C1C0706, // 000B GETMET R7 R3 K6
0x88240907, // 000C GETMBR R9 R4 K7
0x88280108, // 000D GETMBR R10 R0 K8
0x7C1C0600, // 000E CALL R7 3
0x80040E00, // 000F RET 1 R7
0x601C0003, // 0010 GETGBL R7 G3
0x5C200000, // 0011 MOVE R8 R0
0x7C1C0200, // 0012 CALL R7 1
0x8C1C0F09, // 0013 GETMET R7 R7 K9
0x5C240200, // 0014 MOVE R9 R1
0x5C280400, // 0015 MOVE R10 R2
0x5C2C0600, // 0016 MOVE R11 R3
0x7C1C0800, // 0017 CALL R7 4
0x80040E00, // 0018 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_update_virtual, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(set_onoff),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C080300, // 0000 GETMET R2 R1 K0
0x58100001, // 0001 LDCONST R4 K1
0x7C080400, // 0002 CALL R2 2
0x4C0C0000, // 0003 LDNIL R3
0x200C0403, // 0004 NE R3 R2 R3
0x780E0004, // 0005 JMPF R3 #000B
0x8C0C0102, // 0006 GETMET R3 R0 K2
0x60140017, // 0007 GETGBL R5 G23
0x5C180400, // 0008 MOVE R6 R2
0x7C140200, // 0009 CALL R5 1
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
be_local_closure(class_Matter_Plugin_Light0__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
@ -272,54 +594,53 @@ be_local_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E, /* name */
/********************************************************************
** Solidified function: set_onoff
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_set_onoff, /* name */
extern const bclass be_class_Matter_Plugin_Light0;
be_local_closure(class_Matter_Plugin_Light0_web_values_prefix, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
&be_class_Matter_Plugin_Light0,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(set_power),
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_const_int(1),
/* K5 */ be_nested_str_weak(update_shadow),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(set_onoff),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A000A, // 0001 JMPT R2 #000D
0xB80A0200, // 0002 GETNGBL R2 K1
0x8C080502, // 0003 GETMET R2 R2 K2
0x88100103, // 0004 GETMBR R4 R0 K3
0x04100904, // 0005 SUB R4 R4 K4
0x60140017, // 0006 GETGBL R5 G23
0x5C180200, // 0007 MOVE R6 R1
0x7C140200, // 0008 CALL R5 1
0x7C080600, // 0009 CALL R2 3
0x8C080105, // 000A GETMET R2 R0 K5
0x7C080200, // 000B CALL R2 1
0x70020007, // 000C JMP #0015
0x88080106, // 000D GETMBR R2 R0 K6
0x20080202, // 000E NE R2 R1 R2
0x780A0004, // 000F JMPF R2 #0015
0x8C080107, // 0010 GETMET R2 R0 K7
0x54120005, // 0011 LDINT R4 6
0x58140008, // 0012 LDCONST R5 K8
0x7C080600, // 0013 CALL R2 3
0x90020C01, // 0014 SETMBR R0 K6 R1
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
@ -328,126 +649,26 @@ be_local_closure(class_Matter_Plugin_OnOff_set_onoff, /* name */
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_update_shadow, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(tasmota),
/* K2 */ be_nested_str_weak(get_power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_const_int(1),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(attribute_updated),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[27]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x74060012, // 0001 JMPT R1 #0015
0xB8060200, // 0002 GETNGBL R1 K1
0x8C040302, // 0003 GETMET R1 R1 K2
0x880C0103, // 0004 GETMBR R3 R0 K3
0x040C0704, // 0005 SUB R3 R3 K4
0x7C040400, // 0006 CALL R1 2
0x4C080000, // 0007 LDNIL R2
0x20080202, // 0008 NE R2 R1 R2
0x780A000A, // 0009 JMPF R2 #0015
0x88080105, // 000A GETMBR R2 R0 K5
0x600C0017, // 000B GETGBL R3 G23
0x5C100200, // 000C MOVE R4 R1
0x7C0C0200, // 000D CALL R3 1
0x20080403, // 000E NE R2 R2 R3
0x780A0003, // 000F JMPF R2 #0014
0x8C080106, // 0010 GETMET R2 R0 K6
0x54120005, // 0011 LDINT R4 6
0x58140007, // 0012 LDCONST R5 K7
0x7C080600, // 0013 CALL R2 3
0x90020A01, // 0014 SETMBR R0 K5 R1
0x60040003, // 0015 GETGBL R1 G3
0x5C080000, // 0016 MOVE R2 R0
0x7C040200, // 0017 CALL R1 1
0x8C040308, // 0018 GETMET R1 R1 K8
0x7C040200, // 0019 CALL R1 1
0x80000000, // 001A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_closure(class_Matter_Plugin_OnOff_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_OnOff,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_OnOff
** Solidified class: Matter_Plugin_Light0
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_OnOff,
be_local_class(Matter_Plugin_Light0,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(18,
be_nested_map(21,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light0_read_attribute_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Light0_update_virtual_closure) },
{ be_const_key_weak(tasmota_relay_index, 1), be_const_var(0) },
{ be_const_key_weak(parse_status, 5), be_const_closure(class_Matter_Plugin_Light0_parse_status_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Light0_parse_configuration_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
})) ) } )) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_Light0_set_onoff_closure) },
{ be_const_key_weak(CLUSTERS, 19), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -531,21 +752,25 @@ be_local_class(Matter_Plugin_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_OnOff_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 16), be_const_closure(class_Matter_Plugin_OnOff_read_attribute_closure) },
{ be_const_key_weak(parse_configuration, 13), be_const_closure(class_Matter_Plugin_OnOff_parse_configuration_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_OnOff_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, 14), be_nested_str_weak(Relay) },
{ be_const_key_weak(ARG_TYPE, 12), be_const_static_closure(class_Matter_Plugin_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light0_init_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(250) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light0_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, 8), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light0_invoke_request_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(0) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_OnOff_update_shadow_closure) },
{ be_const_key_weak(ARG_HINT, 11), be_nested_str_weak(Relay_X3Cx_X3E_X20number) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_OnOff_init_closure) },
{ be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_OnOff_set_onoff_closure) },
{ be_const_key_weak(tasmota_relay_index, -1), be_const_var(1) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Light0__X3Clambda_X3E_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Relay_X3Cx_X3E_X20number) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light0_update_shadow_closure) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Light0_web_values_prefix_closure) },
})),
be_str_weak(Matter_Plugin_OnOff)
be_str_weak(Matter_Plugin_Light0)
);
/********************************************************************/
/* End of solidification */

View File

@ -6,6 +6,370 @@
extern const bclass be_class_Matter_Plugin_Sensor;
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_parse_status, /* name */
be_nested_proto(
9, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(contains),
/* K1 */ be_nested_str_weak(TempUnit),
/* K2 */ be_nested_str_weak(temp_unit),
/* K3 */ be_nested_str_weak(PressureUnit),
/* K4 */ be_nested_str_weak(pressure_unit),
/* K5 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K6 */ be_nested_str_weak(pre_value),
/* K7 */ be_nested_str_weak(match),
/* K8 */ be_nested_str_weak(shadow_value),
/* K9 */ be_nested_str_weak(value_changed),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E001E, // 0002 JMPF R3 #0022
0x8C0C0300, // 0003 GETMET R3 R1 K0
0x58140001, // 0004 LDCONST R5 K1
0x7C0C0400, // 0005 CALL R3 2
0x780E0001, // 0006 JMPF R3 #0009
0x940C0301, // 0007 GETIDX R3 R1 K1
0x90020403, // 0008 SETMBR R0 K2 R3
0x8C0C0300, // 0009 GETMET R3 R1 K0
0x58140003, // 000A LDCONST R5 K3
0x7C0C0400, // 000B CALL R3 2
0x780E0001, // 000C JMPF R3 #000F
0x940C0303, // 000D GETIDX R3 R1 K3
0x90020803, // 000E SETMBR R0 K4 R3
0x880C0105, // 000F GETMBR R3 R0 K5
0x780E0010, // 0010 JMPF R3 #0022
0x8C0C0106, // 0011 GETMET R3 R0 K6
0x6014000A, // 0012 GETGBL R5 G10
0x88180105, // 0013 GETMBR R6 R0 K5
0x8C180D07, // 0014 GETMET R6 R6 K7
0x5C200200, // 0015 MOVE R8 R1
0x7C180400, // 0016 CALL R6 2
0x7C140200, // 0017 CALL R5 1
0x7C0C0400, // 0018 CALL R3 2
0x4C100000, // 0019 LDNIL R4
0x20100604, // 001A NE R4 R3 R4
0x78120005, // 001B JMPF R4 #0022
0x88100108, // 001C GETMBR R4 R0 K8
0x20100604, // 001D NE R4 R3 R4
0x78120002, // 001E JMPF R4 #0022
0x8C100109, // 001F GETMET R4 R0 K9
0x7C100200, // 0020 CALL R4 1
0x90021003, // 0021 SETMBR R0 K8 R3
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_sensor_filter),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(Rule_Matcher),
/* K6 */ be_nested_str_weak(parse),
/* K7 */ be_nested_str_weak(temp_unit),
/* K8 */ be_nested_str_weak(TEMP_C),
/* K9 */ be_nested_str_weak(pressure_unit),
/* K10 */ be_nested_str_weak(PRESSURE_HPA),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x8C080301, // 0000 GETMET R2 R1 K1
0x88100102, // 0001 GETMBR R4 R0 K2
0x7C080400, // 0002 CALL R2 2
0x90020002, // 0003 SETMBR R0 K0 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x780A0005, // 0005 JMPF R2 #000C
0xB80A0800, // 0006 GETNGBL R2 K4
0x88080505, // 0007 GETMBR R2 R2 K5
0x8C080506, // 0008 GETMET R2 R2 K6
0x88100100, // 0009 GETMBR R4 R0 K0
0x7C080400, // 000A CALL R2 2
0x90020602, // 000B SETMBR R0 K3 R2
0x88080108, // 000C GETMBR R2 R0 K8
0x90020E02, // 000D SETMBR R0 K7 R2
0x8808010A, // 000E GETMBR R2 R0 K10
0x90021202, // 000F SETMBR R0 K9 R2
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_pre_value, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80040200, // 0000 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_parse_sensors, /* name */
be_nested_proto(
8, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K2 */ be_nested_str_weak(pre_value),
/* K3 */ be_nested_str_weak(match),
/* K4 */ be_nested_str_weak(shadow_value),
/* K5 */ be_nested_str_weak(value_changed),
}),
be_str_weak(parse_sensors),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0012, // 0001 JMPT R2 #0015
0x88080101, // 0002 GETMBR R2 R0 K1
0x780A0010, // 0003 JMPF R2 #0015
0x8C080102, // 0004 GETMET R2 R0 K2
0x6010000A, // 0005 GETGBL R4 G10
0x88140101, // 0006 GETMBR R5 R0 K1
0x8C140B03, // 0007 GETMET R5 R5 K3
0x5C1C0200, // 0008 MOVE R7 R1
0x7C140400, // 0009 CALL R5 2
0x7C100200, // 000A CALL R4 1
0x7C080400, // 000B CALL R2 2
0x4C0C0000, // 000C LDNIL R3
0x200C0403, // 000D NE R3 R2 R3
0x780E0005, // 000E JMPF R3 #0015
0x880C0104, // 000F GETMBR R3 R0 K4
0x200C0403, // 0010 NE R3 R2 R3
0x780E0002, // 0011 JMPF R3 #0015
0x8C0C0105, // 0012 GETMET R3 R0 K5
0x7C0C0200, // 0013 CALL R3 1
0x90020802, // 0014 SETMBR R0 K4 R2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_value_changed, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(add_read_sensors_schedule),
/* K2 */ be_nested_str_weak(UPDATE_TIME),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100301, // 0008 GETMET R4 R1 K1
0x88180102, // 0009 GETMBR R6 R0 K2
0x7C100400, // 000A CALL R4 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: filter_name_html
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_filter_name_html, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_sensor_filter),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(webserver),
/* K3 */ be_nested_str_weak(html_escape),
/* K4 */ be_nested_str_weak(split),
/* K5 */ be_nested_str_weak(_X23),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(filter_name_html),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x78060009, // 0001 JMPF R1 #000C
0xA4060200, // 0002 IMPORT R1 K1
0xA40A0400, // 0003 IMPORT R2 K2
0x8C0C0503, // 0004 GETMET R3 R2 K3
0x8C140304, // 0005 GETMET R5 R1 K4
0x881C0100, // 0006 GETMBR R7 R0 K0
0x58200005, // 0007 LDCONST R8 K5
0x7C140600, // 0008 CALL R5 3
0x94140B06, // 0009 GETIDX R5 R5 K6
0x7C0C0400, // 000A CALL R3 2
0x80040600, // 000B RET 1 R3
0x80060E00, // 000C RET 1 K7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(filter_name_html),
/* K3 */ be_nested_str_weak(content_send),
/* K4 */ be_nested_str_weak(PREFIX),
/* K5 */ be_nested_str_weak(html_escape),
/* K6 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0002, // 0004 JMPT R3 #0008
0x8C0C0102, // 0005 GETMET R3 R0 K2
0x7C0C0200, // 0006 CALL R3 1
0x5C080600, // 0007 MOVE R2 R3
0x8C0C0303, // 0008 GETMET R3 R1 K3
0x60140018, // 0009 GETGBL R5 G24
0x88180104, // 000A GETMBR R6 R0 K4
0x780A0003, // 000B JMPF R2 #0010
0x8C1C0305, // 000C GETMET R7 R1 K5
0x5C240400, // 000D MOVE R9 R2
0x7C1C0400, // 000E CALL R7 2
0x70020000, // 000F JMP #0011
0x581C0006, // 0010 LDCONST R7 K6
0x7C140400, // 0011 CALL R5 2
0x7C0C0400, // 0012 CALL R3 2
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
@ -65,216 +429,39 @@ be_local_closure(class_Matter_Plugin_Sensor_update_virtual, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: parse_sensors
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_parse_sensors, /* name */
be_nested_proto(
8, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K2 */ be_nested_str_weak(pre_value),
/* K3 */ be_nested_str_weak(match),
/* K4 */ be_nested_str_weak(shadow_value),
/* K5 */ be_nested_str_weak(value_changed),
}),
be_str_weak(parse_sensors),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x740A0012, // 0001 JMPT R2 #0015
0x88080101, // 0002 GETMBR R2 R0 K1
0x780A0010, // 0003 JMPF R2 #0015
0x8C080102, // 0004 GETMET R2 R0 K2
0x6010000A, // 0005 GETGBL R4 G10
0x88140101, // 0006 GETMBR R5 R0 K1
0x8C140B03, // 0007 GETMET R5 R5 K3
0x5C1C0200, // 0008 MOVE R7 R1
0x7C140400, // 0009 CALL R5 2
0x7C100200, // 000A CALL R4 1
0x7C080400, // 000B CALL R2 2
0x4C0C0000, // 000C LDNIL R3
0x200C0403, // 000D NE R3 R2 R3
0x780E0005, // 000E JMPF R3 #0015
0x880C0104, // 000F GETMBR R3 R0 K4
0x200C0403, // 0010 NE R3 R2 R3
0x780E0002, // 0011 JMPF R3 #0015
0x8C0C0105, // 0012 GETMET R3 R0 K5
0x7C0C0200, // 0013 CALL R3 1
0x90020802, // 0014 SETMBR R0 K4 R2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_parse_configuration, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_sensor_filter),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(Rule_Matcher),
/* K6 */ be_nested_str_weak(parse),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x8C080301, // 0000 GETMET R2 R1 K1
0x88100102, // 0001 GETMBR R4 R0 K2
0x7C080400, // 0002 CALL R2 2
0x90020002, // 0003 SETMBR R0 K0 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x780A0005, // 0005 JMPF R2 #000C
0xB80A0800, // 0006 GETNGBL R2 K4
0x88080505, // 0007 GETMBR R2 R2 K5
0x8C080506, // 0008 GETMET R2 R2 K6
0x88100100, // 0009 GETMBR R4 R0 K0
0x7C080400, // 000A CALL R2 2
0x90020602, // 000B SETMBR R0 K3 R2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(add_read_sensors_schedule),
/* K2 */ be_nested_str_weak(UPDATE_TIME),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100301, // 0008 GETMET R4 R1 K1
0x88180102, // 0009 GETMBR R6 R0 K2
0x7C100400, // 000A CALL R4 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_pre_value, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80040200, // 0000 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor;
be_local_closure(class_Matter_Plugin_Sensor_value_changed, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor,
3,
5,
&be_class_Matter_Plugin_Device,
be_nested_map(13,
be_nested_map(24,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG, 1), be_nested_str_weak(filter) },
{ be_const_key_weak(value_changed, -1), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) },
{ be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Filter_X20pattern) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(JSON_NAME, 8), be_nested_str_weak() },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(pre_value, 12), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
{ be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(shadow_value, 19), be_const_var(2) },
{ be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) },
{ be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_status_closure) },
{ be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_update_virtual_closure) },
{ be_const_key_weak(pre_value, 7), be_const_closure(class_Matter_Plugin_Sensor_pre_value_closure) },
{ be_const_key_weak(ARG_HINT, 14), be_nested_str_weak(Filter_X20pattern) },
{ be_const_key_weak(tasmota_sensor_filter, 6), be_const_var(0) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) },
{ be_const_key_weak(parse_sensors, -1), be_const_closure(class_Matter_Plugin_Sensor_parse_sensors_closure) },
{ be_const_key_weak(parse_configuration, 20), be_const_closure(class_Matter_Plugin_Sensor_parse_configuration_closure) },
{ be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) },
{ be_const_key_weak(ARG, 11), be_nested_str_weak(filter) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_web_values_prefix_closure) },
{ be_const_key_weak(filter_name_html, 16), be_const_closure(class_Matter_Plugin_Sensor_filter_name_html_closure) },
{ be_const_key_weak(PRESSURE_HPA, -1), be_nested_str_weak(hPa) },
{ be_const_key_weak(init, 5), be_const_closure(class_Matter_Plugin_Sensor_init_closure) },
{ be_const_key_weak(value_changed, 21), be_const_closure(class_Matter_Plugin_Sensor_value_changed_closure) },
{ be_const_key_weak(pressure_unit, -1), be_const_var(4) },
{ be_const_key_weak(temp_unit, -1), be_const_var(3) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak() },
})),
be_str_weak(Matter_Plugin_Sensor)
);

View File

@ -6,195 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_contact),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(VIRTUAL),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X208),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),
/* K10 */ be_nested_str_weak(ON),
/* K11 */ be_nested_str_weak(shadow_contact),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[43]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060022, // 0006 JMPT R1 #002A
0x60040008, // 0007 GETGBL R1 G8
0x88080103, // 0008 GETMBR R2 R0 K3
0x7C040200, // 0009 CALL R1 1
0x00060401, // 000A ADD R1 K2 R1
0xB80A0800, // 000B GETNGBL R2 K4
0x8C080505, // 000C GETMET R2 R2 K5
0x58100006, // 000D LDCONST R4 K6
0x50140200, // 000E LDBOOL R5 1 0
0x7C080600, // 000F CALL R2 3
0x4C0C0000, // 0010 LDNIL R3
0x200C0403, // 0011 NE R3 R2 R3
0x780E0003, // 0012 JMPF R3 #0017
0x8C0C0507, // 0013 GETMET R3 R2 K7
0x58140008, // 0014 LDCONST R5 K8
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E000F, // 0019 JMPF R3 #002A
0x8C0C0509, // 001A GETMET R3 R2 K9
0x5C140200, // 001B MOVE R5 R1
0x7C0C0400, // 001C CALL R3 2
0x780E000B, // 001D JMPF R3 #002A
0x8C0C0507, // 001E GETMET R3 R2 K7
0x5C140200, // 001F MOVE R5 R1
0x7C0C0400, // 0020 CALL R3 2
0x1C0C070A, // 0021 EQ R3 R3 K10
0x8810010B, // 0022 GETMBR R4 R0 K11
0x20100803, // 0023 NE R4 R4 R3
0x78120003, // 0024 JMPF R4 #0029
0x8C10010C, // 0025 GETMET R4 R0 K12
0x541A0044, // 0026 LDINT R6 69
0x581C000D, // 0027 LDCONST R7 K13
0x7C100600, // 0028 CALL R4 3
0x90021603, // 0029 SETMBR R0 K11 R3
0x80000000, // 002A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -263,6 +74,181 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_contact),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(VIRTUAL),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X2010),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),
/* K10 */ be_nested_str_weak(ON),
/* K11 */ be_nested_str_weak(shadow_contact),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[43]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060022, // 0006 JMPT R1 #002A
0x60040008, // 0007 GETGBL R1 G8
0x88080103, // 0008 GETMBR R2 R0 K3
0x7C040200, // 0009 CALL R1 1
0x00060401, // 000A ADD R1 K2 R1
0xB80A0800, // 000B GETNGBL R2 K4
0x8C080505, // 000C GETMET R2 R2 K5
0x58100006, // 000D LDCONST R4 K6
0x50140200, // 000E LDBOOL R5 1 0
0x7C080600, // 000F CALL R2 3
0x4C0C0000, // 0010 LDNIL R3
0x200C0403, // 0011 NE R3 R2 R3
0x780E0003, // 0012 JMPF R3 #0017
0x8C0C0507, // 0013 GETMET R3 R2 K7
0x58140008, // 0014 LDCONST R5 K8
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E000F, // 0019 JMPF R3 #002A
0x8C0C0509, // 001A GETMET R3 R2 K9
0x5C140200, // 001B MOVE R5 R1
0x7C0C0400, // 001C CALL R3 2
0x780E000B, // 001D JMPF R3 #002A
0x8C0C0507, // 001E GETMET R3 R2 K7
0x5C140200, // 001F MOVE R5 R1
0x7C0C0400, // 0020 CALL R3 2
0x1C0C070A, // 0021 EQ R3 R3 K10
0x8810010B, // 0022 GETMBR R4 R0 K11
0x20100803, // 0023 NE R4 R4 R3
0x78120003, // 0024 JMPF R4 #0029
0x8C10010C, // 0025 GETMET R4 R0 K12
0x541A0044, // 0026 LDINT R6 69
0x581C000D, // 0027 LDCONST R7 K13
0x7C100600, // 0028 CALL R4 3
0x90021603, // 0029 SETMBR R0 K11 R3
0x80000000, // 002A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
@ -309,6 +295,180 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_virtual, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_status, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_contact),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0044, // 0017 LDINT R6 69
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_contact),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Contact
********************************************************************/
@ -316,29 +476,31 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Contact,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(16,
be_nested_map(19,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(shadow_contact, -1), be_const_var(1) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_init_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) },
{ be_const_key_weak(update_shadow, 15), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_shadow_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(parse_configuration, 7), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Contact),
})) ) } )) },
{ be_const_key_weak(ARG, 6), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) },
{ be_const_key_weak(tasmota_switch_index, 11), be_const_var(0) },
{ be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_shadow_closure) },
{ be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Contact) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_closure) },
{ be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix_closure) },
{ be_const_key_weak(shadow_contact, 4), be_const_var(1) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) },
{ be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_status_closure) },
{ be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(ARG, 12), be_nested_str_weak(switch) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -422,9 +584,10 @@ be_local_class(Matter_Plugin_Sensor_Contact,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPE, 9), be_nested_str_weak(contact) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_read_attribute_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration_closure) },
{ be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(contact) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Contact__X3Clambda_X3E_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_init_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Contact)
);

View File

@ -6,241 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */
be_nested_proto(
10, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(val_onoff),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Occupancy),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0x8C080101, // 0000 GETMET R2 R0 K1
0x5C100200, // 0001 MOVE R4 R1
0x58140002, // 0002 LDCONST R5 K2
0x88180100, // 0003 GETMBR R6 R0 K0
0x601C0017, // 0004 GETGBL R7 G23
0x54220405, // 0005 LDINT R8 1030
0x58240003, // 0006 LDCONST R9 K3
0x7C080E00, // 0007 CALL R2 7
0x90020002, // 0008 SETMBR R0 K0 R2
0x60080003, // 0009 GETGBL R2 G3
0x5C0C0000, // 000A MOVE R3 R0
0x7C080200, // 000B CALL R2 1
0x8C080504, // 000C GETMET R2 R2 K4
0x5C100200, // 000D MOVE R4 R1
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(VIRTUAL),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X208),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),
/* K10 */ be_nested_str_weak(ON),
/* K11 */ be_nested_str_weak(shadow_occupancy),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[43]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060022, // 0006 JMPT R1 #002A
0x60040008, // 0007 GETGBL R1 G8
0x88080103, // 0008 GETMBR R2 R0 K3
0x7C040200, // 0009 CALL R1 1
0x00060401, // 000A ADD R1 K2 R1
0xB80A0800, // 000B GETNGBL R2 K4
0x8C080505, // 000C GETMET R2 R2 K5
0x58100006, // 000D LDCONST R4 K6
0x50140200, // 000E LDBOOL R5 1 0
0x7C080600, // 000F CALL R2 3
0x4C0C0000, // 0010 LDNIL R3
0x200C0403, // 0011 NE R3 R2 R3
0x780E0003, // 0012 JMPF R3 #0017
0x8C0C0507, // 0013 GETMET R3 R2 K7
0x58140008, // 0014 LDCONST R5 K8
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E000F, // 0019 JMPF R3 #002A
0x8C0C0509, // 001A GETMET R3 R2 K9
0x5C140200, // 001B MOVE R5 R1
0x7C0C0400, // 001C CALL R3 2
0x780E000B, // 001D JMPF R3 #002A
0x8C0C0507, // 001E GETMET R3 R2 K7
0x5C140200, // 001F MOVE R5 R1
0x7C0C0400, // 0020 CALL R3 2
0x1C0C070A, // 0021 EQ R3 R3 K10
0x8810010B, // 0022 GETMBR R4 R0 K11
0x20100803, // 0023 NE R4 R4 R3
0x78120003, // 0024 JMPF R4 #0029
0x8C10010C, // 0025 GETMET R4 R0 K12
0x541A0405, // 0026 LDINT R6 1030
0x581C000D, // 0027 LDCONST R7 K13
0x7C100600, // 0028 CALL R4 3
0x90021603, // 0029 SETMBR R0 K11 R3
0x80000000, // 002A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
@ -328,6 +93,401 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(VIRTUAL),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X2010),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),
/* K10 */ be_nested_str_weak(ON),
/* K11 */ be_nested_str_weak(shadow_occupancy),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(0),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[43]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060022, // 0006 JMPT R1 #002A
0x60040008, // 0007 GETGBL R1 G8
0x88080103, // 0008 GETMBR R2 R0 K3
0x7C040200, // 0009 CALL R1 1
0x00060401, // 000A ADD R1 K2 R1
0xB80A0800, // 000B GETNGBL R2 K4
0x8C080505, // 000C GETMET R2 R2 K5
0x58100006, // 000D LDCONST R4 K6
0x50140200, // 000E LDBOOL R5 1 0
0x7C080600, // 000F CALL R2 3
0x4C0C0000, // 0010 LDNIL R3
0x200C0403, // 0011 NE R3 R2 R3
0x780E0003, // 0012 JMPF R3 #0017
0x8C0C0507, // 0013 GETMET R3 R2 K7
0x58140008, // 0014 LDCONST R5 K8
0x7C0C0400, // 0015 CALL R3 2
0x5C080600, // 0016 MOVE R2 R3
0x4C0C0000, // 0017 LDNIL R3
0x200C0403, // 0018 NE R3 R2 R3
0x780E000F, // 0019 JMPF R3 #002A
0x8C0C0509, // 001A GETMET R3 R2 K9
0x5C140200, // 001B MOVE R5 R1
0x7C0C0400, // 001C CALL R3 2
0x780E000B, // 001D JMPF R3 #002A
0x8C0C0507, // 001E GETMET R3 R2 K7
0x5C140200, // 001F MOVE R5 R1
0x7C0C0400, // 0020 CALL R3 2
0x1C0C070A, // 0021 EQ R3 R3 K10
0x8810010B, // 0022 GETMBR R4 R0 K11
0x20100803, // 0023 NE R4 R4 R3
0x78120003, // 0024 JMPF R4 #0029
0x8C10010C, // 0025 GETMET R4 R0 K12
0x541A0405, // 0026 LDINT R6 1030
0x581C000D, // 0027 LDCONST R7 K13
0x7C100600, // 0028 CALL R4 3
0x90021603, // 0029 SETMBR R0 K11 R3
0x80000000, // 002A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual, /* name */
be_nested_proto(
10, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(val_onoff),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Occupancy),
/* K3 */ be_const_int(0),
/* K4 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0x8C080101, // 0000 GETMET R2 R0 K1
0x5C100200, // 0001 MOVE R4 R1
0x58140002, // 0002 LDCONST R5 K2
0x88180100, // 0003 GETMBR R6 R0 K0
0x601C0017, // 0004 GETGBL R7 G23
0x54220405, // 0005 LDINT R8 1030
0x58240003, // 0006 LDCONST R9 K3
0x7C080E00, // 0007 CALL R2 7
0x90020002, // 0008 SETMBR R0 K0 R2
0x60080003, // 0009 GETGBL R2 G3
0x5C0C0000, // 000A MOVE R3 R0
0x7C080200, // 000B CALL R2 1
0x8C080504, // 000C GETMET R2 R2 K4
0x5C100200, // 000D MOVE R4 R1
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_occupancy),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0405, // 0017 LDINT R6 1030
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Occupancy
********************************************************************/
@ -335,18 +495,31 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Occupancy,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(16,
be_nested_map(19,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_init_closure) },
{ be_const_key_weak(tasmota_switch_index, 9), be_const_var(0) },
{ be_const_key_weak(update_shadow, 14), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(ARG, 12), be_nested_str_weak(switch) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(263, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Occupancy),
})) ) } )) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_closure) },
{ be_const_key_weak(parse_configuration, 4), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) },
{ be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_status_closure) },
{ be_const_key_weak(ARG_HINT, 18), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(ARG, 12), be_nested_str_weak(switch) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -432,20 +605,10 @@ be_local_class(Matter_Plugin_Sensor_Occupancy,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 4), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(263, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Occupancy),
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(occupancy) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_parse_configuration_closure) },
{ be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
{ be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(occupancy) },
{ be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_init_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Occupancy)
);

View File

@ -54,7 +54,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow, /* name */
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(Status_X2010),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),

View File

@ -7,26 +7,56 @@
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
/********************************************************************
** Solidified function: <lambda>
** Solidified function: read_attribute
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E, /* name */
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(set),
/* K6 */ be_nested_str_weak(BOOL),
/* K7 */ be_nested_str_weak(shadow_leak),
/* K8 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
( &(const binstruction[23]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0044, // 0004 LDINT R7 69
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0006, // 0006 JMPF R7 #000E
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E0004, // 0008 JMPF R7 #000E
0x8C1C0705, // 0009 GETMET R7 R3 K5
0x88240906, // 000A GETMBR R9 R4 K6
0x88280107, // 000B GETMBR R10 R0 K7
0x7C1C0600, // 000C CALL R7 3
0x80040E00, // 000D RET 1 R7
0x601C0003, // 000E GETGBL R7 G3
0x5C200000, // 000F MOVE R8 R0
0x7C1C0200, // 0010 CALL R7 1
0x8C1C0F08, // 0011 GETMET R7 R7 K8
0x5C240200, // 0012 MOVE R9 R1
0x5C280400, // 0013 MOVE R10 R2
0x5C2C0600, // 0014 MOVE R11 R3
0x7C1C0800, // 0015 CALL R7 4
0x80040E00, // 0016 RET 1 R7
})
)
);
@ -71,6 +101,61 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_init, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
@ -92,7 +177,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow, /* name *
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(cmd),
/* K6 */ be_nested_str_weak(Status_X208),
/* K6 */ be_nested_str_weak(Status_X2010),
/* K7 */ be_nested_str_weak(find),
/* K8 */ be_nested_str_weak(StatusSNS),
/* K9 */ be_nested_str_weak(contains),
@ -153,116 +238,6 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow, /* name *
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(shadow_leak),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(NULL),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[33]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0044, // 0004 LDINT R7 69
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0010, // 0006 JMPF R7 #0018
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E000E, // 0008 JMPF R7 #0018
0x881C0105, // 0009 GETMBR R7 R0 K5
0x4C200000, // 000A LDNIL R8
0x201C0E08, // 000B NE R7 R7 R8
0x781E0005, // 000C JMPF R7 #0013
0x8C1C0706, // 000D GETMET R7 R3 K6
0x88240907, // 000E GETMBR R9 R4 K7
0x88280105, // 000F GETMBR R10 R0 K5
0x7C1C0600, // 0010 CALL R7 3
0x80040E00, // 0011 RET 1 R7
0x70020004, // 0012 JMP #0018
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240908, // 0014 GETMBR R9 R4 K8
0x4C280000, // 0015 LDNIL R10
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x601C0003, // 0018 GETGBL R7 G3
0x5C200000, // 0019 MOVE R8 R0
0x7C1C0200, // 001A CALL R7 1
0x8C1C0F09, // 001B GETMET R7 R7 K9
0x5C240200, // 001C MOVE R9 R1
0x5C280400, // 001D MOVE R10 R2
0x5C2C0600, // 001E MOVE R11 R3
0x7C1C0800, // 001F CALL R7 4
0x80040E00, // 0020 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
@ -319,6 +294,180 @@ be_local_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual, /* name
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_leak),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0044, // 0017 LDINT R6 69
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_switch_index),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_const_int(1),
/* K4 */ be_const_int(0),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0301, // 0001 GETMET R3 R1 K1
0x88140102, // 0002 GETMBR R5 R0 K2
0x58180003, // 0003 LDCONST R6 K3
0x7C0C0600, // 0004 CALL R3 3
0x7C080200, // 0005 CALL R2 1
0x90020002, // 0006 SETMBR R0 K0 R2
0x88080100, // 0007 GETMBR R2 R0 K0
0x18080504, // 0008 LE R2 R2 K4
0x780A0000, // 0009 JMPF R2 #000B
0x90020103, // 000A SETMBR R0 K0 K3
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_leak),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Waterleak
********************************************************************/
@ -326,18 +475,31 @@ extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Waterleak,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(16,
be_nested_map(19,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 2), be_const_static_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(67, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(tasmota_switch_index, 7), be_const_var(0) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Waterleak),
})) ) } )) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_init_closure) },
{ be_const_key_weak(shadow_leak, 15), be_const_var(1) },
{ be_const_key_weak(update_shadow, 4), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) },
{ be_const_key_weak(ARG, 11), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(CLUSTERS, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(shadow_leak, 6), be_const_var(1) },
{ be_const_key_weak(web_values, 18), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration_closure) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_shadow_closure) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) },
{ be_const_key_weak(parse_status, 16), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_status_closure) },
{ be_const_key_weak(ARG_HINT, 4), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(ARG, 12), be_nested_str_weak(switch) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -421,20 +583,10 @@ be_local_class(Matter_Plugin_Sensor_Waterleak,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(tasmota_switch_index, 9), be_const_var(0) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Waterleak),
})) ) } )) },
{ be_const_key_weak(read_attribute, 14), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_read_attribute_closure) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(waterleak) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(67, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_parse_configuration_closure) },
{ be_const_key_weak(UPDATE_TIME, 2), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(waterleak) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Waterleak__X3Clambda_X3E_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) },
})),
be_str_weak(Matter_Plugin_Sensor_Waterleak)
);

View File

@ -1,574 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Light0.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
/********************************************************************
** Solidified function: set_onoff
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_set_onoff, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(call_remote_sync),
/* K1 */ be_nested_str_weak(Power),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(1),
/* K4 */ be_nested_str_weak(0),
/* K5 */ be_nested_str_weak(parse_update),
}),
be_str_weak(set_onoff),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x60100008, // 0001 GETGBL R4 G8
0x88140102, // 0002 GETMBR R5 R0 K2
0x7C100200, // 0003 CALL R4 1
0x00120204, // 0004 ADD R4 K1 R4
0x78060001, // 0005 JMPF R1 #0008
0x58140003, // 0006 LDCONST R5 K3
0x70020000, // 0007 JMP #0009
0x58140004, // 0008 LDCONST R5 K4
0x7C080600, // 0009 CALL R2 3
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0003, // 000C JMPF R3 #0011
0x8C0C0105, // 000D GETMET R3 R0 K5
0x5C140400, // 000E MOVE R5 R2
0x541A000A, // 000F LDINT R6 11
0x7C0C0600, // 0010 CALL R3 3
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_onoff),
/* K2 */ be_nested_str_weak(tasmota_relay_index),
/* K3 */ be_nested_str_weak(find),
/* K4 */ be_nested_str_weak(ARG),
/* K5 */ be_const_int(1),
/* K6 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x60100009, // 000A GETGBL R4 G9
0x8C140703, // 000B GETMET R5 R3 K3
0x881C0104, // 000C GETMBR R7 R0 K4
0x58200005, // 000D LDCONST R8 K5
0x7C140600, // 000E CALL R5 3
0x7C100200, // 000F CALL R4 1
0x90020404, // 0010 SETMBR R0 K2 R4
0x88100102, // 0011 GETMBR R4 R0 K2
0x18100906, // 0012 LE R4 R4 K6
0x78120000, // 0013 JMPF R4 #0015
0x90020505, // 0014 SETMBR R0 K2 K5
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(shadow_onoff),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[25]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0005, // 0004 LDINT R7 6
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0008, // 0006 JMPF R7 #0010
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E0004, // 000A JMPF R7 #0010
0x8C1C0706, // 000B GETMET R7 R3 K6
0x88240907, // 000C GETMBR R9 R4 K7
0x88280108, // 000D GETMBR R10 R0 K8
0x7C1C0600, // 000E CALL R7 3
0x80040E00, // 000F RET 1 R7
0x601C0003, // 0010 GETGBL R7 G3
0x5C200000, // 0011 MOVE R8 R0
0x7C1C0200, // 0012 CALL R7 1
0x8C1C0F09, // 0013 GETMET R7 R7 K9
0x5C240200, // 0014 MOVE R9 R1
0x5C280400, // 0015 MOVE R10 R2
0x5C2C0600, // 0016 MOVE R11 R3
0x7C1C0800, // 0017 CALL R7 4
0x80040E00, // 0018 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Light0__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_parse_update, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_relay_index),
/* K1 */ be_const_int(1),
/* K2 */ be_nested_str_weak(contains),
/* K3 */ be_nested_str_weak(POWER),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(ON),
/* K6 */ be_nested_str_weak(shadow_onoff),
/* K7 */ be_nested_str_weak(attribute_updated),
/* K8 */ be_const_int(0),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x540E000A, // 0000 LDINT R3 11
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0024, // 0002 JMPF R3 #0028
0x500C0000, // 0003 LDBOOL R3 0 0
0x88100100, // 0004 GETMBR R4 R0 K0
0x1C100901, // 0005 EQ R4 R4 K1
0x78120009, // 0006 JMPF R4 #0011
0x8C100302, // 0007 GETMET R4 R1 K2
0x58180003, // 0008 LDCONST R6 K3
0x7C100400, // 0009 CALL R4 2
0x78120005, // 000A JMPF R4 #0011
0x8C100304, // 000B GETMET R4 R1 K4
0x58180003, // 000C LDCONST R6 K3
0x7C100400, // 000D CALL R4 2
0x1C100905, // 000E EQ R4 R4 K5
0x5C0C0800, // 000F MOVE R3 R4
0x70020007, // 0010 JMP #0019
0x8C100304, // 0011 GETMET R4 R1 K4
0x60180008, // 0012 GETGBL R6 G8
0x881C0100, // 0013 GETMBR R7 R0 K0
0x7C180200, // 0014 CALL R6 1
0x001A0606, // 0015 ADD R6 K3 R6
0x7C100400, // 0016 CALL R4 2
0x1C100905, // 0017 EQ R4 R4 K5
0x5C0C0800, // 0018 MOVE R3 R4
0x88100106, // 0019 GETMBR R4 R0 K6
0x4C140000, // 001A LDNIL R5
0x20100805, // 001B NE R4 R4 R5
0x78120009, // 001C JMPF R4 #0027
0x88100106, // 001D GETMBR R4 R0 K6
0x60140017, // 001E GETGBL R5 G23
0x5C180600, // 001F MOVE R6 R3
0x7C140200, // 0020 CALL R5 1
0x20100805, // 0021 NE R4 R4 R5
0x78120003, // 0022 JMPF R4 #0027
0x8C100107, // 0023 GETMET R4 R0 K7
0x541A0005, // 0024 LDINT R6 6
0x581C0008, // 0025 LDCONST R7 K8
0x7C100600, // 0026 CALL R4 3
0x90020C03, // 0027 SETMBR R0 K6 R3
0x80000000, // 0028 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_invoke_request, /* name */
be_nested_proto(
11, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(set_onoff),
/* K6 */ be_nested_str_weak(publish_command),
/* K7 */ be_nested_str_weak(Power),
/* K8 */ be_const_int(1),
/* K9 */ be_const_int(2),
/* K10 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[50]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x541E0005, // 0004 LDINT R7 6
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0029, // 0006 JMPF R7 #0031
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E0009, // 0008 JMPF R7 #0013
0x8C1C0105, // 0009 GETMET R7 R0 K5
0x50240000, // 000A LDBOOL R9 0 0
0x7C1C0400, // 000B CALL R7 2
0x8C1C0106, // 000C GETMET R7 R0 K6
0x58240007, // 000D LDCONST R9 K7
0x58280004, // 000E LDCONST R10 K4
0x7C1C0600, // 000F CALL R7 3
0x501C0200, // 0010 LDBOOL R7 1 0
0x80040E00, // 0011 RET 1 R7
0x7002001D, // 0012 JMP #0031
0x1C1C0D08, // 0013 EQ R7 R6 K8
0x781E0009, // 0014 JMPF R7 #001F
0x8C1C0105, // 0015 GETMET R7 R0 K5
0x50240200, // 0016 LDBOOL R9 1 0
0x7C1C0400, // 0017 CALL R7 2
0x8C1C0106, // 0018 GETMET R7 R0 K6
0x58240007, // 0019 LDCONST R9 K7
0x58280008, // 001A LDCONST R10 K8
0x7C1C0600, // 001B CALL R7 3
0x501C0200, // 001C LDBOOL R7 1 0
0x80040E00, // 001D RET 1 R7
0x70020011, // 001E JMP #0031
0x1C1C0D09, // 001F EQ R7 R6 K9
0x781E000F, // 0020 JMPF R7 #0031
0x8C1C0105, // 0021 GETMET R7 R0 K5
0x8824010A, // 0022 GETMBR R9 R0 K10
0x78260000, // 0023 JMPF R9 #0025
0x50240001, // 0024 LDBOOL R9 0 1
0x50240200, // 0025 LDBOOL R9 1 0
0x7C1C0400, // 0026 CALL R7 2
0x8C1C0106, // 0027 GETMET R7 R0 K6
0x58240007, // 0028 LDCONST R9 K7
0x8828010A, // 0029 GETMBR R10 R0 K10
0x782A0001, // 002A JMPF R10 #002D
0x58280008, // 002B LDCONST R10 K8
0x70020000, // 002C JMP #002E
0x58280004, // 002D LDCONST R10 K4
0x7C1C0600, // 002E CALL R7 3
0x501C0200, // 002F LDBOOL R7 1 0
0x80040E00, // 0030 RET 1 R7
0x80000000, // 0031 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_web_values, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_closure(class_Matter_Plugin_Bridge_Light0_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light0,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Power),
/* K3 */ be_nested_str_weak(tasmota_relay_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light0
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Light0,
2,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_onoff, 5), be_const_var(1) },
{ be_const_key_weak(tasmota_relay_index, 4), be_const_var(0) },
{ be_const_key_weak(set_onoff, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_set_onoff_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_init_closure) },
{ be_const_key_weak(web_values_prefix, 9), be_const_closure(class_Matter_Plugin_Bridge_Light0_web_values_prefix_closure) },
{ be_const_key_weak(web_values, 15), be_const_closure(class_Matter_Plugin_Bridge_Light0_web_values_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_parse_update_closure) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Power_X3Cx_X3E_X20number) },
{ be_const_key_weak(read_attribute, 12), be_const_closure(class_Matter_Plugin_Bridge_Light0_read_attribute_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light0_invoke_request_closure) },
{ be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(DISPLAY_NAME, 6), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Bridge_Light0__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light0)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,315 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Sensor.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_parse_configuration, /* name */
be_nested_proto(
5, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
1, /* has constants */
( &(const bvalue[11]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_sensor_filter),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(ARG),
/* K3 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(Rule_Matcher),
/* K6 */ be_nested_str_weak(parse),
/* K7 */ be_nested_str_weak(temp_unit),
/* K8 */ be_nested_str_weak(TEMP_C),
/* K9 */ be_nested_str_weak(pressure_unit),
/* K10 */ be_nested_str_weak(PRESSURE_HPA),
}),
be_str_weak(parse_configuration),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x8C080301, // 0000 GETMET R2 R1 K1
0x88100102, // 0001 GETMBR R4 R0 K2
0x7C080400, // 0002 CALL R2 2
0x90020002, // 0003 SETMBR R0 K0 R2
0x88080100, // 0004 GETMBR R2 R0 K0
0x780A0005, // 0005 JMPF R2 #000C
0xB80A0800, // 0006 GETNGBL R2 K4
0x88080505, // 0007 GETMBR R2 R2 K5
0x8C080506, // 0008 GETMET R2 R2 K6
0x88100100, // 0009 GETMBR R4 R0 K0
0x7C080400, // 000A CALL R2 2
0x90020602, // 000B SETMBR R0 K3 R2
0x88080108, // 000C GETMBR R2 R0 K8
0x90020E02, // 000D SETMBR R0 K7 R2
0x8808010A, // 000E GETMBR R2 R0 K10
0x90021202, // 000F SETMBR R0 K9 R2
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_value_changed, /* name */
be_nested_proto(
1, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(filter_name_html),
/* K3 */ be_nested_str_weak(content_send),
/* K4 */ be_nested_str_weak(PREFIX),
/* K5 */ be_nested_str_weak(html_escape),
/* K6 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0002, // 0004 JMPT R3 #0008
0x8C0C0102, // 0005 GETMET R3 R0 K2
0x7C0C0200, // 0006 CALL R3 1
0x5C080600, // 0007 MOVE R2 R3
0x8C0C0303, // 0008 GETMET R3 R1 K3
0x60140018, // 0009 GETGBL R5 G24
0x88180104, // 000A GETMBR R6 R0 K4
0x780A0003, // 000B JMPF R2 #0010
0x8C1C0305, // 000C GETMET R7 R1 K5
0x5C240400, // 000D MOVE R9 R2
0x7C1C0400, // 000E CALL R7 2
0x70020000, // 000F JMP #0011
0x581C0006, // 0010 LDCONST R7 K6
0x7C140400, // 0011 CALL R5 2
0x7C0C0400, // 0012 CALL R3 2
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_parse_update, /* name */
be_nested_proto(
9, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(contains),
/* K1 */ be_nested_str_weak(TempUnit),
/* K2 */ be_nested_str_weak(temp_unit),
/* K3 */ be_nested_str_weak(PressureUnit),
/* K4 */ be_nested_str_weak(pressure_unit),
/* K5 */ be_nested_str_weak(tasmota_sensor_matcher),
/* K6 */ be_nested_str_weak(pre_value),
/* K7 */ be_nested_str_weak(match),
/* K8 */ be_nested_str_weak(shadow_value),
/* K9 */ be_nested_str_weak(value_changed),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0x540E0007, // 0000 LDINT R3 8
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E001E, // 0002 JMPF R3 #0022
0x8C0C0300, // 0003 GETMET R3 R1 K0
0x58140001, // 0004 LDCONST R5 K1
0x7C0C0400, // 0005 CALL R3 2
0x780E0001, // 0006 JMPF R3 #0009
0x940C0301, // 0007 GETIDX R3 R1 K1
0x90020403, // 0008 SETMBR R0 K2 R3
0x8C0C0300, // 0009 GETMET R3 R1 K0
0x58140003, // 000A LDCONST R5 K3
0x7C0C0400, // 000B CALL R3 2
0x780E0001, // 000C JMPF R3 #000F
0x940C0303, // 000D GETIDX R3 R1 K3
0x90020803, // 000E SETMBR R0 K4 R3
0x880C0105, // 000F GETMBR R3 R0 K5
0x780E0010, // 0010 JMPF R3 #0022
0x8C0C0106, // 0011 GETMET R3 R0 K6
0x6014000A, // 0012 GETGBL R5 G10
0x88180105, // 0013 GETMBR R6 R0 K5
0x8C180D07, // 0014 GETMET R6 R6 K7
0x5C200200, // 0015 MOVE R8 R1
0x7C180400, // 0016 CALL R6 2
0x7C140200, // 0017 CALL R5 1
0x7C0C0400, // 0018 CALL R3 2
0x4C100000, // 0019 LDNIL R4
0x20100604, // 001A NE R4 R3 R4
0x78120005, // 001B JMPF R4 #0022
0x88100108, // 001C GETMBR R4 R0 K8
0x20100604, // 001D NE R4 R3 R4
0x78120002, // 001E JMPF R4 #0022
0x8C100109, // 001F GETMET R4 R0 K9
0x7C100200, // 0020 CALL R4 1
0x90021003, // 0021 SETMBR R0 K8 R3
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: filter_name_html
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_filter_name_html, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota_sensor_filter),
/* K1 */ be_nested_str_weak(string),
/* K2 */ be_nested_str_weak(webserver),
/* K3 */ be_nested_str_weak(html_escape),
/* K4 */ be_nested_str_weak(split),
/* K5 */ be_nested_str_weak(_X23),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(filter_name_html),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x78060009, // 0001 JMPF R1 #000C
0xA4060200, // 0002 IMPORT R1 K1
0xA40A0400, // 0003 IMPORT R2 K2
0x8C0C0503, // 0004 GETMET R3 R2 K3
0x8C140304, // 0005 GETMET R5 R1 K4
0x881C0100, // 0006 GETMBR R7 R0 K0
0x58200005, // 0007 LDCONST R8 K5
0x7C140600, // 0008 CALL R5 3
0x94140B06, // 0009 GETIDX R5 R5 K6
0x7C0C0400, // 000A CALL R3 2
0x80040600, // 000B RET 1 R3
0x80060E00, // 000C RET 1 K7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_pre_value, /* name */
be_nested_proto(
2, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80040200, // 0000 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Sensor,
5,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(22,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(tasmota_sensor_filter, -1), be_const_var(0) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Filter_X20pattern) },
{ be_const_key_weak(shadow_value, -1), be_const_var(2) },
{ be_const_key_weak(pre_value, 10), be_const_closure(class_Matter_Plugin_Bridge_Sensor_pre_value_closure) },
{ be_const_key_weak(ARG_HTTP, -1), be_nested_str_weak(url) },
{ be_const_key_weak(pressure_unit, -1), be_const_var(4) },
{ be_const_key_weak(tasmota_sensor_matcher, -1), be_const_var(1) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(filter) },
{ be_const_key_weak(PRESSURE_MMHG, -1), be_nested_str_weak(mmHg) },
{ be_const_key_weak(value_changed, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_value_changed_closure) },
{ be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_parse_update_closure) },
{ be_const_key_weak(TEMP_C, -1), be_nested_str_weak(C) },
{ be_const_key_weak(temp_unit, 4), be_const_var(3) },
{ be_const_key_weak(PRESSURE_INHG, -1), be_nested_str_weak(inHg) },
{ be_const_key_weak(PRESSURE_HPA, 18), be_nested_str_weak(hPa) },
{ be_const_key_weak(PROBE_TIMEOUT, 16), be_const_int(1700) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_web_values_prefix_closure) },
{ be_const_key_weak(UPDATE_CMD, 13), be_nested_str_weak(Status_X208) },
{ be_const_key_weak(TEMP_F, -1), be_nested_str_weak(F) },
{ be_const_key_weak(filter_name_html, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_filter_name_html_closure) },
{ be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) },
{ be_const_key_weak(parse_configuration, 2), be_const_closure(class_Matter_Plugin_Bridge_Sensor_parse_configuration_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,404 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Sensor_Air_Quality.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Air_Quality'
extern bclosure *class_Matter_Plugin_Sensor_Air_Quality_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
1, /* has sup protos */
( &(const struct bproto*[ 2]) {
be_nested_proto(
9, /* nstack */
2, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(content_send),
/* K2 */ be_nested_str_weak(_X25s_X20_X25i_X20),
}),
be_str_weak(web_values_single),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0007, // 0002 JMPF R2 #000B
0xA40A0000, // 0003 IMPORT R2 K0
0x8C0C0501, // 0004 GETMET R3 R2 K1
0x60140018, // 0005 GETGBL R5 G24
0x58180002, // 0006 LDCONST R6 K2
0x5C1C0000, // 0007 MOVE R7 R0
0x5C200200, // 0008 MOVE R8 R1
0x7C140600, // 0009 CALL R5 3
0x7C0C0400, // 000A CALL R3 2
0x80000000, // 000B RET 0
})
),
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
}),
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(web_values_prefix),
/* K1 */ be_nested_str_weak(Air),
/* K2 */ be_nested_str_weak(shadow_air_quality),
/* K3 */ be_nested_str_weak(PM1),
/* K4 */ be_nested_str_weak(shadow_pm1),
/* K5 */ be_nested_str_weak(PM2_X2E5),
/* K6 */ be_nested_str_weak(shadow_pm2_5),
/* K7 */ be_nested_str_weak(PM10),
/* K8 */ be_nested_str_weak(shadow_pm10),
/* K9 */ be_nested_str_weak(CO2),
/* K10 */ be_nested_str_weak(shadow_co2),
/* K11 */ be_nested_str_weak(NO2),
/* K12 */ be_nested_str_weak(shadow_no2),
/* K13 */ be_nested_str_weak(TVOC),
/* K14 */ be_nested_str_weak(shadow_tvoc),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[32]) { /* code */
0x84040000, // 0000 CLOSURE R1 P0
0x8C080100, // 0001 GETMET R2 R0 K0
0x7C080200, // 0002 CALL R2 1
0x5C080200, // 0003 MOVE R2 R1
0x580C0001, // 0004 LDCONST R3 K1
0x88100102, // 0005 GETMBR R4 R0 K2
0x7C080400, // 0006 CALL R2 2
0x5C080200, // 0007 MOVE R2 R1
0x580C0003, // 0008 LDCONST R3 K3
0x88100104, // 0009 GETMBR R4 R0 K4
0x7C080400, // 000A CALL R2 2
0x5C080200, // 000B MOVE R2 R1
0x580C0005, // 000C LDCONST R3 K5
0x88100106, // 000D GETMBR R4 R0 K6
0x7C080400, // 000E CALL R2 2
0x5C080200, // 000F MOVE R2 R1
0x580C0007, // 0010 LDCONST R3 K7
0x88100108, // 0011 GETMBR R4 R0 K8
0x7C080400, // 0012 CALL R2 2
0x5C080200, // 0013 MOVE R2 R1
0x580C0009, // 0014 LDCONST R3 K9
0x8810010A, // 0015 GETMBR R4 R0 K10
0x7C080400, // 0016 CALL R2 2
0x5C080200, // 0017 MOVE R2 R1
0x580C000B, // 0018 LDCONST R3 K11
0x8810010C, // 0019 GETMBR R4 R0 K12
0x7C080400, // 001A CALL R2 2
0x5C080200, // 001B MOVE R2 R1
0x580C000D, // 001C LDCONST R3 K13
0x8810010E, // 001D GETMBR R4 R0 K14
0x7C080400, // 001E CALL R2 2
0x80000000, // 001F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(prefix),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(ARG),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x60100008, // 0008 GETGBL R4 G8
0x8C140702, // 0009 GETMET R5 R3 K2
0x881C0103, // 000A GETMBR R7 R0 K3
0x7C140400, // 000B CALL R5 2
0x7C100200, // 000C CALL R4 1
0x90020204, // 000D SETMBR R0 K1 R4
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Air_Quality;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update, /* name */
be_nested_proto(
6, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Air_Quality,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(prefix),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[ 7]) { /* code */
0x540E0007, // 0000 LDINT R3 8
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0002, // 0002 JMPF R3 #0006
0x8C0C0300, // 0003 GETMET R3 R1 K0
0x88140101, // 0004 GETMBR R5 R0 K1
0x7C0C0400, // 0005 CALL R3 2
0x80000000, // 0006 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Air_Quality
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Sensor_Air_Quality,
8,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(20,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Air_X20Quality) },
{ be_const_key_weak(shadow_tvoc, 8), be_const_var(7) },
{ be_const_key_weak(shadow_pm10, 7), be_const_var(4) },
{ be_const_key_weak(shadow_pm2_5, -1), be_const_var(3) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Sensor_X20Model) },
{ be_const_key_weak(shadow_co2, -1), be_const_var(5) },
{ be_const_key_weak(parse_update, 18), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_parse_update_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Air_Quality_read_attribute_closure) },
{ be_const_key_weak(prefix, 13), be_const_var(0) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(44, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_web_values_closure) },
{ be_const_key_weak(shadow_pm1, 11), be_const_var(2) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_airquality) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(12,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(1068, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1069, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1070, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1037, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(91, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1066, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1043, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(8),
be_const_int(9),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Air_Quality_init_closure) },
{ be_const_key_weak(UPDATE_TIME, 3), be_const_int(5000) },
{ be_const_key_weak(shadow_no2, 4), be_const_var(6) },
{ be_const_key_weak(shadow_air_quality, -1), be_const_var(1) },
{ be_const_key_weak(ARG, 0), be_nested_str_weak(airquality) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Air_Quality)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,431 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Sensor_Contact.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(tasmota_switch_index),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(ARG),
/* K4 */ be_const_int(1),
/* K5 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x60100009, // 0008 GETGBL R4 G9
0x8C140702, // 0009 GETMET R5 R3 K2
0x881C0103, // 000A GETMBR R7 R0 K3
0x58200004, // 000B LDCONST R8 K4
0x7C140600, // 000C CALL R5 3
0x7C100200, // 000D CALL R4 1
0x90020204, // 000E SETMBR R0 K1 R4
0x88100101, // 000F GETMBR R4 R0 K1
0x18100905, // 0010 LE R4 R4 K5
0x78120000, // 0011 JMPF R4 #0013
0x90020304, // 0012 SETMBR R0 K1 K4
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_parse_update, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_contact),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0007, // 0000 LDINT R3 8
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0044, // 0017 LDINT R6 69
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Contact,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(shadow_contact),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(NULL),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[33]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0044, // 0004 LDINT R7 69
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0010, // 0006 JMPF R7 #0018
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E000E, // 0008 JMPF R7 #0018
0x881C0105, // 0009 GETMBR R7 R0 K5
0x4C200000, // 000A LDNIL R8
0x201C0E08, // 000B NE R7 R7 R8
0x781E0005, // 000C JMPF R7 #0013
0x8C1C0706, // 000D GETMET R7 R3 K6
0x88240907, // 000E GETMBR R9 R4 K7
0x88280105, // 000F GETMBR R10 R0 K5
0x7C1C0600, // 0010 CALL R7 3
0x80040E00, // 0011 RET 1 R7
0x70020004, // 0012 JMP #0018
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240908, // 0014 GETMBR R9 R4 K8
0x4C280000, // 0015 LDNIL R10
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x601C0003, // 0018 GETGBL R7 G3
0x5C200000, // 0019 MOVE R8 R0
0x7C1C0200, // 001A CALL R7 1
0x8C1C0F09, // 001B GETMET R7 R7 K9
0x5C240200, // 001C MOVE R9 R1
0x5C280400, // 001D MOVE R10 R2
0x5C2C0600, // 001E MOVE R11 R3
0x7C1C0800, // 001F CALL R7 4
0x80040E00, // 0020 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Contact,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Contact_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_contact),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Contact
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Sensor_Contact,
2,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 5), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 4), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(shadow_contact, -1), be_const_var(1) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_init_closure) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_prefix_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(parse_update, 11), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_parse_update_closure) },
{ be_const_key_weak(read_attribute, 12), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Contact_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(TYPES, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(http_contact) },
{ be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Contact)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,452 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Sensor_Occupancy.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(tasmota_switch_index),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(ARG),
/* K4 */ be_const_int(1),
/* K5 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x60100009, // 0008 GETGBL R4 G9
0x8C140702, // 0009 GETMET R5 R3 K2
0x881C0103, // 000A GETMBR R7 R0 K3
0x58200004, // 000B LDCONST R8 K4
0x7C140600, // 000C CALL R5 3
0x7C100200, // 000D CALL R4 1
0x90020204, // 000E SETMBR R0 K1 R4
0x88100101, // 000F GETMBR R4 R0 K1
0x18100905, // 0010 LE R4 R4 K5
0x78120000, // 0011 JMPF R4 #0013
0x90020304, // 0012 SETMBR R0 K1 K4
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_parse_update, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_occupancy),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0007, // 0000 LDINT R3 8
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0405, // 0017 LDINT R6 1030
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(shadow_occupancy),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(U1),
/* K8 */ be_nested_str_weak(NULL),
/* K9 */ be_const_int(1),
/* K10 */ be_const_int(3),
/* K11 */ be_const_int(2),
/* K12 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[49]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0405, // 0004 LDINT R7 1030
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0020, // 0006 JMPF R7 #0028
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E000F, // 0008 JMPF R7 #0019
0x881C0105, // 0009 GETMBR R7 R0 K5
0x4C200000, // 000A LDNIL R8
0x201C0E08, // 000B NE R7 R7 R8
0x781E0005, // 000C JMPF R7 #0013
0x8C1C0706, // 000D GETMET R7 R3 K6
0x88240907, // 000E GETMBR R9 R4 K7
0x88280105, // 000F GETMBR R10 R0 K5
0x7C1C0600, // 0010 CALL R7 3
0x80040E00, // 0011 RET 1 R7
0x70020004, // 0012 JMP #0018
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240908, // 0014 GETMBR R9 R4 K8
0x4C280000, // 0015 LDNIL R10
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x7002000E, // 0018 JMP #0028
0x1C1C0D09, // 0019 EQ R7 R6 K9
0x781E0005, // 001A JMPF R7 #0021
0x8C1C0706, // 001B GETMET R7 R3 K6
0x88240907, // 001C GETMBR R9 R4 K7
0x5828000A, // 001D LDCONST R10 K10
0x7C1C0600, // 001E CALL R7 3
0x80040E00, // 001F RET 1 R7
0x70020006, // 0020 JMP #0028
0x1C1C0D0B, // 0021 EQ R7 R6 K11
0x781E0004, // 0022 JMPF R7 #0028
0x8C1C0706, // 0023 GETMET R7 R3 K6
0x88240907, // 0024 GETMBR R9 R4 K7
0x58280004, // 0025 LDCONST R10 K4
0x7C1C0600, // 0026 CALL R7 3
0x80040E00, // 0027 RET 1 R7
0x601C0003, // 0028 GETGBL R7 G3
0x5C200000, // 0029 MOVE R8 R0
0x7C1C0200, // 002A CALL R7 1
0x8C1C0F0C, // 002B GETMET R7 R7 K12
0x5C240200, // 002C MOVE R9 R1
0x5C280400, // 002D MOVE R10 R2
0x5C2C0600, // 002E MOVE R11 R3
0x7C1C0800, // 002F CALL R7 4
0x80040E00, // 0030 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Occupancy,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Occupancy_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Occupancy
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Sensor_Occupancy,
2,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 12), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(shadow_occupancy, -1), be_const_var(1) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_init_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(TYPES, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(263, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(parse_update, 14), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_parse_update_closure) },
{ be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1030, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_read_attribute_closure) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Occupancy_web_values_prefix_closure) },
{ be_const_key_weak(TYPE, 5), be_nested_str_weak(http_occupancy) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(UPDATE_CMD, 2), be_nested_str_weak(Status_X208) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Occupancy)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,431 +0,0 @@
/* Solidification of Matter_Plugin_3_Bridge_Sensor_Waterleak.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_prefix, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(get_name),
/* K2 */ be_nested_str_weak(Switch),
/* K3 */ be_nested_str_weak(tasmota_switch_index),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
/* K7 */ be_nested_str_weak(),
}),
be_str_weak(web_values_prefix),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x5C0C0400, // 0003 MOVE R3 R2
0x740E0004, // 0004 JMPT R3 #000A
0x600C0008, // 0005 GETGBL R3 G8
0x88100103, // 0006 GETMBR R4 R0 K3
0x7C0C0200, // 0007 CALL R3 1
0x000E0403, // 0008 ADD R3 K2 R3
0x5C080600, // 0009 MOVE R2 R3
0x8C0C0304, // 000A GETMET R3 R1 K4
0x60140018, // 000B GETGBL R5 G24
0x88180105, // 000C GETMBR R6 R0 K5
0x780A0003, // 000D JMPF R2 #0012
0x8C1C0306, // 000E GETMET R7 R1 K6
0x5C240400, // 000F MOVE R9 R2
0x7C1C0400, // 0010 CALL R7 2
0x70020000, // 0011 JMP #0013
0x581C0007, // 0012 LDCONST R7 K7
0x7C140400, // 0013 CALL R5 2
0x7C0C0400, // 0014 CALL R3 2
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(tasmota_switch_index),
/* K2 */ be_nested_str_weak(find),
/* K3 */ be_nested_str_weak(ARG),
/* K4 */ be_const_int(1),
/* K5 */ be_const_int(0),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x60100009, // 0008 GETGBL R4 G9
0x8C140702, // 0009 GETMET R5 R3 K2
0x881C0103, // 000A GETMBR R7 R0 K3
0x58200004, // 000B LDCONST R8 K4
0x7C140600, // 000C CALL R5 3
0x7C100200, // 000D CALL R4 1
0x90020204, // 000E SETMBR R0 K1 R4
0x88100101, // 000F GETMBR R4 R0 K1
0x18100905, // 0010 LE R4 R4 K5
0x78120000, // 0011 JMPF R4 #0013
0x90020304, // 0012 SETMBR R0 K1 K4
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(Waterleak_X25i_X20_X25s),
/* K4 */ be_nested_str_weak(tasmota_switch_index),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_Waterleak),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x8C1C0105, // 0007 GETMET R7 R0 K5
0x88240106, // 0008 GETMBR R9 R0 K6
0x7C1C0400, // 0009 CALL R7 2
0x7C100600, // 000A CALL R4 3
0x7C080400, // 000B CALL R2 2
0x80000000, // 000C RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_parse_update, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Switch),
/* K2 */ be_nested_str_weak(tasmota_switch_index),
/* K3 */ be_nested_str_weak(ON),
/* K4 */ be_nested_str_weak(shadow_Waterleak),
/* K5 */ be_nested_str_weak(attribute_updated),
/* K6 */ be_const_int(0),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x540E0007, // 0000 LDINT R3 8
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0017, // 0002 JMPF R3 #001B
0x500C0000, // 0003 LDBOOL R3 0 0
0x8C100300, // 0004 GETMET R4 R1 K0
0x60180008, // 0005 GETGBL R6 G8
0x881C0102, // 0006 GETMBR R7 R0 K2
0x7C180200, // 0007 CALL R6 1
0x001A0206, // 0008 ADD R6 K1 R6
0x7C100400, // 0009 CALL R4 2
0x1C100903, // 000A EQ R4 R4 K3
0x5C0C0800, // 000B MOVE R3 R4
0x88100104, // 000C GETMBR R4 R0 K4
0x4C140000, // 000D LDNIL R5
0x20100805, // 000E NE R4 R4 R5
0x78120009, // 000F JMPF R4 #001A
0x88100104, // 0010 GETMBR R4 R0 K4
0x60140017, // 0011 GETGBL R5 G23
0x5C180600, // 0012 MOVE R6 R3
0x7C140200, // 0013 CALL R5 1
0x20100805, // 0014 NE R4 R4 R5
0x78120003, // 0015 JMPF R4 #001A
0x8C100105, // 0016 GETMET R4 R0 K5
0x541A0044, // 0017 LDINT R6 69
0x581C0006, // 0018 LDCONST R7 K6
0x7C100600, // 0019 CALL R4 3
0x90020803, // 001A SETMBR R0 K4 R3
0x80000000, // 001B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(shadow_Waterleak),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(NULL),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[33]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0044, // 0004 LDINT R7 69
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0010, // 0006 JMPF R7 #0018
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E000E, // 0008 JMPF R7 #0018
0x881C0105, // 0009 GETMBR R7 R0 K5
0x4C200000, // 000A LDNIL R8
0x201C0E08, // 000B NE R7 R7 R8
0x781E0005, // 000C JMPF R7 #0013
0x8C1C0706, // 000D GETMET R7 R3 K6
0x88240907, // 000E GETMBR R9 R4 K7
0x88280105, // 000F GETMBR R10 R0 K5
0x7C1C0600, // 0010 CALL R7 3
0x80040E00, // 0011 RET 1 R7
0x70020004, // 0012 JMP #0018
0x8C1C0706, // 0013 GETMET R7 R3 K6
0x88240908, // 0014 GETMBR R9 R4 K8
0x4C280000, // 0015 LDNIL R10
0x7C1C0600, // 0016 CALL R7 3
0x80040E00, // 0017 RET 1 R7
0x601C0003, // 0018 GETGBL R7 G3
0x5C200000, // 0019 MOVE R8 R0
0x7C1C0200, // 001A CALL R7 1
0x8C1C0F09, // 001B GETMET R7 R7 K9
0x5C240200, // 001C MOVE R9 R1
0x5C280400, // 001D MOVE R10 R2
0x5C2C0600, // 001E MOVE R11 R3
0x7C1C0800, // 001F CALL R7 4
0x80040E00, // 0020 RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Waterleak
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
be_local_class(Matter_Plugin_Bridge_Sensor_Waterleak,
2,
&be_class_Matter_Plugin_Bridge_HTTP,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(ARG_TYPE, 4), be_const_static_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak__X3Clambda_X3E_closure) },
{ be_const_key_weak(ARG_HINT, 2), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_prefix_closure) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_init_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) },
{ be_const_key_weak(TYPES, 9), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(67, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(parse_update, 12), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_parse_update_closure) },
{ be_const_key_weak(CLUSTERS, 11), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(69, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(tasmota_switch_index, 6), be_const_var(0) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Waterleak_read_attribute_closure) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(TYPE, 5), be_nested_str_weak(http_waterleak) },
{ be_const_key_weak(shadow_Waterleak, -1), be_const_var(1) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X208) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Waterleak)
);
/********************************************************************/
/* End of solidification */

View File

@ -7,40 +7,81 @@
extern const bclass be_class_Matter_Plugin_Light2;
/********************************************************************
** Solidified function: init
** Solidified function: set_ct
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_init, /* name */
be_local_closure(class_Matter_Plugin_Light2_set_ct, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_ct),
/* K2 */ be_nested_str_weak(update_ct_minmax),
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(ct_min),
/* K1 */ be_nested_str_weak(ct_max),
/* K2 */ be_nested_str_weak(BRIDGE),
/* K3 */ be_nested_str_weak(call_remote_sync),
/* K4 */ be_nested_str_weak(CT),
/* K5 */ be_nested_str_weak(parse_status),
/* K6 */ be_nested_str_weak(VIRTUAL),
/* K7 */ be_nested_str_weak(shadow_ct),
/* K8 */ be_nested_str_weak(attribute_updated),
/* K9 */ be_nested_str_weak(light),
/* K10 */ be_nested_str_weak(set),
/* K11 */ be_nested_str_weak(ct),
/* K12 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(init),
be_str_weak(set_ct),
&be_const_str_solidified,
( &(const binstruction[13]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x54120144, // 0008 LDINT R4 325
0x90020204, // 0009 SETMBR R0 K1 R4
0x8C100102, // 000A GETMET R4 R0 K2
0x7C100200, // 000B CALL R4 1
0x80000000, // 000C RET 0
( &(const binstruction[44]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x14080202, // 0001 LT R2 R1 R2
0x780A0000, // 0002 JMPF R2 #0004
0x88040100, // 0003 GETMBR R1 R0 K0
0x88080101, // 0004 GETMBR R2 R0 K1
0x24080202, // 0005 GT R2 R1 R2
0x780A0000, // 0006 JMPF R2 #0008
0x88040101, // 0007 GETMBR R1 R0 K1
0x88080102, // 0008 GETMBR R2 R0 K2
0x780A000D, // 0009 JMPF R2 #0018
0x8C080103, // 000A GETMET R2 R0 K3
0x58100004, // 000B LDCONST R4 K4
0x60140008, // 000C GETGBL R5 G8
0x5C180200, // 000D MOVE R6 R1
0x7C140200, // 000E CALL R5 1
0x7C080600, // 000F CALL R2 3
0x4C0C0000, // 0010 LDNIL R3
0x200C0403, // 0011 NE R3 R2 R3
0x780E0003, // 0012 JMPF R3 #0017
0x8C0C0105, // 0013 GETMET R3 R0 K5
0x5C140400, // 0014 MOVE R5 R2
0x541A000A, // 0015 LDINT R6 11
0x7C0C0600, // 0016 CALL R3 3
0x70020012, // 0017 JMP #002B
0x88080106, // 0018 GETMBR R2 R0 K6
0x780A0008, // 0019 JMPF R2 #0023
0x88080107, // 001A GETMBR R2 R0 K7
0x20080202, // 001B NE R2 R1 R2
0x780A0004, // 001C JMPF R2 #0022
0x8C080108, // 001D GETMET R2 R0 K8
0x541202FF, // 001E LDINT R4 768
0x54160006, // 001F LDINT R5 7
0x7C080600, // 0020 CALL R2 3
0x90020E01, // 0021 SETMBR R0 K7 R1
0x70020007, // 0022 JMP #002B
0xA40A1200, // 0023 IMPORT R2 K9
0x8C0C050A, // 0024 GETMET R3 R2 K10
0x60140013, // 0025 GETGBL R5 G19
0x7C140000, // 0026 CALL R5 0
0x98161601, // 0027 SETIDX R5 K11 R1
0x7C0C0400, // 0028 CALL R3 2
0x8C0C010C, // 0029 GETMET R3 R0 K12
0x7C0C0200, // 002A CALL R3 1
0x80000000, // 002B RET 0
})
)
);
@ -53,7 +94,7 @@ be_local_closure(class_Matter_Plugin_Light2_init, /* name */
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_invoke_request, /* name */
be_nested_proto(
13, /* nstack */
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
@ -61,265 +102,92 @@ be_local_closure(class_Matter_Plugin_Light2_invoke_request, /* name */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(light),
/* K1 */ be_nested_str_weak(matter),
/* K2 */ be_nested_str_weak(TLV),
/* K3 */ be_nested_str_weak(cluster),
/* K4 */ be_nested_str_weak(command),
/* K5 */ be_nested_str_weak(update_shadow_lazy),
/* K6 */ be_nested_str_weak(findsubval),
/* K7 */ be_const_int(0),
/* K8 */ be_nested_str_weak(set_ct),
/* K9 */ be_nested_str_weak(log),
/* K10 */ be_nested_str_weak(ct_X3A),
/* K11 */ be_nested_str_weak(publish_command),
/* K12 */ be_nested_str_weak(CT),
/* K13 */ be_nested_str_weak(invoke_request),
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_nested_str_weak(findsubval),
/* K6 */ be_const_int(0),
/* K7 */ be_nested_str_weak(ct_min),
/* K8 */ be_nested_str_weak(ct_max),
/* K9 */ be_nested_str_weak(set_ct),
/* K10 */ be_nested_str_weak(log),
/* K11 */ be_nested_str_weak(ct_X3A),
/* K12 */ be_nested_str_weak(publish_command),
/* K13 */ be_nested_str_weak(CT),
/* K14 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[59]) { /* code */
0xA4120000, // 0000 IMPORT R4 K0
0xB8160200, // 0001 GETNGBL R5 K1
0x88140B02, // 0002 GETMBR R5 R5 K2
( &(const binstruction[66]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x881C0704, // 0004 GETMBR R7 R3 K4
0x542202FF, // 0005 LDINT R8 768
0x1C200C08, // 0006 EQ R8 R6 R8
0x78220028, // 0007 JMPF R8 #0031
0x8C200105, // 0008 GETMET R8 R0 K5
0x7C200200, // 0009 CALL R8 1
0x54220009, // 000A LDINT R8 10
0x1C200E08, // 000B EQ R8 R7 R8
0x78220011, // 000C JMPF R8 #001F
0x8C200506, // 000D GETMET R8 R2 K6
0x58280007, // 000E LDCONST R10 K7
0x7C200400, // 000F CALL R8 2
0x8C240108, // 0010 GETMET R9 R0 K8
0x5C2C1000, // 0011 MOVE R11 R8
0x7C240400, // 0012 CALL R9 2
0x60240008, // 0013 GETGBL R9 G8
0x5C281000, // 0014 MOVE R10 R8
0x7C240200, // 0015 CALL R9 1
0x00261409, // 0016 ADD R9 K10 R9
0x900E1209, // 0017 SETMBR R3 K9 R9
0x8C24010B, // 0018 GETMET R9 R0 K11
0x582C000C, // 0019 LDCONST R11 K12
0x5C301000, // 001A MOVE R12 R8
0x7C240600, // 001B CALL R9 3
0x50240200, // 001C LDBOOL R9 1 0
0x80041200, // 001D RET 1 R9
0x70020010, // 001E JMP #0030
0x54220046, // 001F LDINT R8 71
0x1C200E08, // 0020 EQ R8 R7 R8
0x78220002, // 0021 JMPF R8 #0025
0x50200200, // 0022 LDBOOL R8 1 0
0x80041000, // 0023 RET 1 R8
0x7002000A, // 0024 JMP #0030
0x5422004A, // 0025 LDINT R8 75
0x1C200E08, // 0026 EQ R8 R7 R8
0x78220002, // 0027 JMPF R8 #002B
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x70020004, // 002A JMP #0030
0x5422004B, // 002B LDINT R8 76
0x1C200E08, // 002C EQ R8 R7 R8
0x78220001, // 002D JMPF R8 #0030
0x50200200, // 002E LDBOOL R8 1 0
0x80041000, // 002F RET 1 R8
0x70020008, // 0030 JMP #003A
0x60200003, // 0031 GETGBL R8 G3
0x5C240000, // 0032 MOVE R9 R0
0x7C200200, // 0033 CALL R8 1
0x8C20110D, // 0034 GETMET R8 R8 K13
0x5C280200, // 0035 MOVE R10 R1
0x5C2C0400, // 0036 MOVE R11 R2
0x5C300600, // 0037 MOVE R12 R3
0x7C200800, // 0038 CALL R8 4
0x80041000, // 0039 RET 1 R8
0x80000000, // 003A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(light),
/* K2 */ be_nested_str_weak(update_ct_minmax),
/* K3 */ be_nested_str_weak(update_shadow),
/* K4 */ be_nested_str_weak(get),
/* K5 */ be_nested_str_weak(find),
/* K6 */ be_nested_str_weak(ct),
/* K7 */ be_nested_str_weak(shadow_ct),
/* K8 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[38]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x7406001D, // 0001 JMPT R1 #0020
0xA4060200, // 0002 IMPORT R1 K1
0x8C080102, // 0003 GETMET R2 R0 K2
0x7C080200, // 0004 CALL R2 1
0x60080003, // 0005 GETGBL R2 G3
0x5C0C0000, // 0006 MOVE R3 R0
0x7C080200, // 0007 CALL R2 1
0x8C080503, // 0008 GETMET R2 R2 K3
0x7C080200, // 0009 CALL R2 1
0x8C080304, // 000A GETMET R2 R1 K4
0x7C080200, // 000B CALL R2 1
0x4C0C0000, // 000C LDNIL R3
0x200C0403, // 000D NE R3 R2 R3
0x780E000F, // 000E JMPF R3 #001F
0x8C0C0505, // 000F GETMET R3 R2 K5
0x58140006, // 0010 LDCONST R5 K6
0x4C180000, // 0011 LDNIL R6
0x7C0C0600, // 0012 CALL R3 3
0x4C100000, // 0013 LDNIL R4
0x1C100604, // 0014 EQ R4 R3 R4
0x78120000, // 0015 JMPF R4 #0017
0x880C0107, // 0016 GETMBR R3 R0 K7
0x88100107, // 0017 GETMBR R4 R0 K7
0x20100604, // 0018 NE R4 R3 R4
0x78120004, // 0019 JMPF R4 #001F
0x8C100108, // 001A GETMET R4 R0 K8
0x541A02FF, // 001B LDINT R6 768
0x541E0006, // 001C LDINT R7 7
0x7C100600, // 001D CALL R4 3
0x90020E03, // 001E SETMBR R0 K7 R3
0x70020004, // 001F JMP #0025
0x60040003, // 0020 GETGBL R1 G3
0x5C080000, // 0021 MOVE R2 R0
0x7C040200, // 0022 CALL R1 1
0x8C040303, // 0023 GETMET R1 R1 K3
0x7C040200, // 0024 CALL R1 1
0x80000000, // 0025 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_update_virtual, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(CT),
/* K2 */ be_nested_str_weak(set_ct),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0300, // 0001 GETMET R3 R1 K0
0x58140001, // 0002 LDCONST R5 K1
0x7C0C0400, // 0003 CALL R3 2
0x7C080200, // 0004 CALL R2 1
0x4C0C0000, // 0005 LDNIL R3
0x200C0403, // 0006 NE R3 R2 R3
0x780E0002, // 0007 JMPF R3 #000B
0x8C0C0102, // 0008 GETMET R3 R0 K2
0x5C140400, // 0009 MOVE R5 R2
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_ct
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_set_ct, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 9]) { /* constants */
/* K0 */ be_nested_str_weak(ct_min),
/* K1 */ be_nested_str_weak(ct_max),
/* K2 */ be_nested_str_weak(VIRTUAL),
/* K3 */ be_nested_str_weak(light),
/* K4 */ be_nested_str_weak(set),
/* K5 */ be_nested_str_weak(ct),
/* K6 */ be_nested_str_weak(update_shadow),
/* K7 */ be_nested_str_weak(shadow_ct),
/* K8 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(set_ct),
&be_const_str_solidified,
( &(const binstruction[28]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x14080202, // 0001 LT R2 R1 R2
0x780A0000, // 0002 JMPF R2 #0004
0x88040100, // 0003 GETMBR R1 R0 K0
0x88080101, // 0004 GETMBR R2 R0 K1
0x24080202, // 0005 GT R2 R1 R2
0x780A0000, // 0006 JMPF R2 #0008
0x88040101, // 0007 GETMBR R1 R0 K1
0x88080102, // 0008 GETMBR R2 R0 K2
0x740A0008, // 0009 JMPT R2 #0013
0xA40A0600, // 000A IMPORT R2 K3
0x8C0C0504, // 000B GETMET R3 R2 K4
0x60140013, // 000C GETGBL R5 G19
0x7C140000, // 000D CALL R5 0
0x98160A01, // 000E SETIDX R5 K5 R1
0x7C0C0400, // 000F CALL R3 2
0x8C0C0106, // 0010 GETMET R3 R0 K6
0x7C0C0200, // 0011 CALL R3 1
0x70020007, // 0012 JMP #001B
0x88080107, // 0013 GETMBR R2 R0 K7
0x20080202, // 0014 NE R2 R1 R2
0x780A0004, // 0015 JMPF R2 #001B
0x8C080108, // 0016 GETMET R2 R0 K8
0x541202FF, // 0017 LDINT R4 768
0x54160006, // 0018 LDINT R5 7
0x7C080600, // 0019 CALL R2 3
0x90020E01, // 001A SETMBR R0 K7 R1
0x80000000, // 001B RET 0
0x541E02FF, // 0004 LDINT R7 768
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0030, // 0006 JMPF R7 #0038
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x541E0009, // 0009 LDINT R7 10
0x1C1C0C07, // 000A EQ R7 R6 R7
0x781E0019, // 000B JMPF R7 #0026
0x8C1C0505, // 000C GETMET R7 R2 K5
0x58240006, // 000D LDCONST R9 K6
0x7C1C0400, // 000E CALL R7 2
0x88200107, // 000F GETMBR R8 R0 K7
0x14200E08, // 0010 LT R8 R7 R8
0x78220000, // 0011 JMPF R8 #0013
0x881C0107, // 0012 GETMBR R7 R0 K7
0x88200108, // 0013 GETMBR R8 R0 K8
0x24200E08, // 0014 GT R8 R7 R8
0x78220000, // 0015 JMPF R8 #0017
0x881C0108, // 0016 GETMBR R7 R0 K8
0x8C200109, // 0017 GETMET R8 R0 K9
0x5C280E00, // 0018 MOVE R10 R7
0x7C200400, // 0019 CALL R8 2
0x60200008, // 001A GETGBL R8 G8
0x5C240E00, // 001B MOVE R9 R7
0x7C200200, // 001C CALL R8 1
0x00221608, // 001D ADD R8 K11 R8
0x900E1408, // 001E SETMBR R3 K10 R8
0x8C20010C, // 001F GETMET R8 R0 K12
0x5828000D, // 0020 LDCONST R10 K13
0x5C2C0E00, // 0021 MOVE R11 R7
0x7C200600, // 0022 CALL R8 3
0x50200200, // 0023 LDBOOL R8 1 0
0x80041000, // 0024 RET 1 R8
0x70020010, // 0025 JMP #0037
0x541E0046, // 0026 LDINT R7 71
0x1C1C0C07, // 0027 EQ R7 R6 R7
0x781E0002, // 0028 JMPF R7 #002C
0x501C0200, // 0029 LDBOOL R7 1 0
0x80040E00, // 002A RET 1 R7
0x7002000A, // 002B JMP #0037
0x541E004A, // 002C LDINT R7 75
0x1C1C0C07, // 002D EQ R7 R6 R7
0x781E0002, // 002E JMPF R7 #0032
0x501C0200, // 002F LDBOOL R7 1 0
0x80040E00, // 0030 RET 1 R7
0x70020004, // 0031 JMP #0037
0x541E004B, // 0032 LDINT R7 76
0x1C1C0C07, // 0033 EQ R7 R6 R7
0x781E0001, // 0034 JMPF R7 #0037
0x501C0200, // 0035 LDBOOL R7 1 0
0x80040E00, // 0036 RET 1 R7
0x70020008, // 0037 JMP #0041
0x601C0003, // 0038 GETGBL R7 G3
0x5C200000, // 0039 MOVE R8 R0
0x7C1C0200, // 003A CALL R7 1
0x8C1C0F0E, // 003B GETMET R7 R7 K14
0x5C240200, // 003C MOVE R9 R1
0x5C280400, // 003D MOVE R10 R2
0x5C2C0600, // 003E MOVE R11 R3
0x7C1C0800, // 003F CALL R7 4
0x80040E00, // 0040 RET 1 R7
0x80000000, // 0041 RET 0
})
)
);
@ -437,6 +305,53 @@ be_local_closure(class_Matter_Plugin_Light2_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_update_virtual, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(CT),
/* K2 */ be_nested_str_weak(set_ct),
/* K3 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x60080009, // 0000 GETGBL R2 G9
0x8C0C0300, // 0001 GETMET R3 R1 K0
0x58140001, // 0002 LDCONST R5 K1
0x7C0C0400, // 0003 CALL R3 2
0x7C080200, // 0004 CALL R2 1
0x4C0C0000, // 0005 LDNIL R3
0x200C0403, // 0006 NE R3 R2 R3
0x780E0002, // 0007 JMPF R3 #000B
0x8C0C0102, // 0008 GETMET R3 R0 K2
0x5C140400, // 0009 MOVE R5 R2
0x7C0C0400, // 000A CALL R3 2
0x600C0003, // 000B GETGBL R3 G3
0x5C100000, // 000C MOVE R4 R0
0x7C0C0200, // 000D CALL R3 1
0x8C0C0703, // 000E GETMET R3 R3 K3
0x5C140200, // 000F MOVE R5 R1
0x7C0C0400, // 0010 CALL R3 2
0x80000000, // 0011 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_ct_minmax
********************************************************************/
@ -481,6 +396,291 @@ be_local_closure(class_Matter_Plugin_Light2_update_ct_minmax, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(BRIDGE),
/* K2 */ be_nested_str_weak(shadow_ct),
/* K3 */ be_nested_str_weak(update_ct_minmax),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x88100101, // 0008 GETMBR R4 R0 K1
0x74120001, // 0009 JMPT R4 #000C
0x54120144, // 000A LDINT R4 325
0x90020404, // 000B SETMBR R0 K2 R4
0x8C100103, // 000C GETMET R4 R0 K3
0x7C100200, // 000D CALL R4 1
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(web_value_dimmer),
/* K7 */ be_nested_str_weak(web_value_ct),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x8C1C0106, // 0009 GETMET R7 R0 K6
0x7C1C0200, // 000A CALL R7 1
0x8C200107, // 000B GETMET R8 R0 K7
0x7C200200, // 000C CALL R8 1
0x7C100800, // 000D CALL R4 4
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_parse_status, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(parse_status),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(CT),
/* K3 */ be_nested_str_weak(shadow_ct),
/* K4 */ be_nested_str_weak(ct_min),
/* K5 */ be_nested_str_weak(ct_max),
/* K6 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
0x540E000A, // 0007 LDINT R3 11
0x1C0C0403, // 0008 EQ R3 R2 R3
0x780E0017, // 0009 JMPF R3 #0022
0x600C0009, // 000A GETGBL R3 G9
0x8C100301, // 000B GETMET R4 R1 K1
0x58180002, // 000C LDCONST R6 K2
0x7C100400, // 000D CALL R4 2
0x7C0C0200, // 000E CALL R3 1
0x4C100000, // 000F LDNIL R4
0x20100604, // 0010 NE R4 R3 R4
0x7812000F, // 0011 JMPF R4 #0022
0x88100103, // 0012 GETMBR R4 R0 K3
0x20100604, // 0013 NE R4 R3 R4
0x7812000C, // 0014 JMPF R4 #0022
0x88100104, // 0015 GETMBR R4 R0 K4
0x14100604, // 0016 LT R4 R3 R4
0x78120000, // 0017 JMPF R4 #0019
0x880C0104, // 0018 GETMBR R3 R0 K4
0x88100105, // 0019 GETMBR R4 R0 K5
0x24100604, // 001A GT R4 R3 R4
0x78120000, // 001B JMPF R4 #001D
0x880C0105, // 001C GETMBR R3 R0 K5
0x8C100106, // 001D GETMET R4 R0 K6
0x541A02FF, // 001E LDINT R6 768
0x541E0006, // 001F LDINT R7 7
0x7C100600, // 0020 CALL R4 3
0x90020603, // 0021 SETMBR R0 K3 R3
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_ct
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_web_value_ct, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(),
/* K1 */ be_nested_str_weak(shadow_ct),
/* K2 */ be_const_int(1000000),
/* K3 */ be_nested_str_weak(_X25iK),
/* K4 */ be_nested_str_weak(_X26_X239898_X3B_X20),
}),
be_str_weak(web_value_ct),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x58040000, // 0000 LDCONST R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x4C0C0000, // 0002 LDNIL R3
0x20080403, // 0003 NE R2 R2 R3
0x780A000C, // 0004 JMPF R2 #0012
0x88080101, // 0005 GETMBR R2 R0 K1
0x0C0A0402, // 0006 DIV R2 K2 R2
0x540E0018, // 0007 LDINT R3 25
0x00080403, // 0008 ADD R2 R2 R3
0x540E0031, // 0009 LDINT R3 50
0x0C080403, // 000A DIV R2 R2 R3
0x540E0031, // 000B LDINT R3 50
0x08080403, // 000C MUL R2 R2 R3
0x600C0018, // 000D GETGBL R3 G24
0x58100003, // 000E LDCONST R4 K3
0x5C140400, // 000F MOVE R5 R2
0x7C0C0400, // 0010 CALL R3 2
0x5C040600, // 0011 MOVE R1 R3
0x000A0801, // 0012 ADD R2 K4 R1
0x80040400, // 0013 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: update_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_closure(class_Matter_Plugin_Light2_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light2,
1, /* has constants */
( &(const bvalue[10]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(BRIDGE),
/* K2 */ be_nested_str_weak(light),
/* K3 */ be_nested_str_weak(update_ct_minmax),
/* K4 */ be_nested_str_weak(update_shadow),
/* K5 */ be_nested_str_weak(get),
/* K6 */ be_nested_str_weak(find),
/* K7 */ be_nested_str_weak(ct),
/* K8 */ be_nested_str_weak(shadow_ct),
/* K9 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[40]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x7406001F, // 0001 JMPT R1 #0022
0x88040101, // 0002 GETMBR R1 R0 K1
0x7406001D, // 0003 JMPT R1 #0022
0xA4060400, // 0004 IMPORT R1 K2
0x8C080103, // 0005 GETMET R2 R0 K3
0x7C080200, // 0006 CALL R2 1
0x60080003, // 0007 GETGBL R2 G3
0x5C0C0000, // 0008 MOVE R3 R0
0x7C080200, // 0009 CALL R2 1
0x8C080504, // 000A GETMET R2 R2 K4
0x7C080200, // 000B CALL R2 1
0x8C080305, // 000C GETMET R2 R1 K5
0x7C080200, // 000D CALL R2 1
0x4C0C0000, // 000E LDNIL R3
0x200C0403, // 000F NE R3 R2 R3
0x780E000F, // 0010 JMPF R3 #0021
0x8C0C0506, // 0011 GETMET R3 R2 K6
0x58140007, // 0012 LDCONST R5 K7
0x4C180000, // 0013 LDNIL R6
0x7C0C0600, // 0014 CALL R3 3
0x4C100000, // 0015 LDNIL R4
0x1C100604, // 0016 EQ R4 R3 R4
0x78120000, // 0017 JMPF R4 #0019
0x880C0108, // 0018 GETMBR R3 R0 K8
0x88100108, // 0019 GETMBR R4 R0 K8
0x20100604, // 001A NE R4 R3 R4
0x78120004, // 001B JMPF R4 #0021
0x8C100109, // 001C GETMET R4 R0 K9
0x541A02FF, // 001D LDINT R6 768
0x541E0006, // 001E LDINT R7 7
0x7C100600, // 001F CALL R4 3
0x90021003, // 0020 SETMBR R0 K8 R3
0x70020004, // 0021 JMP #0027
0x60040003, // 0022 GETGBL R1 G3
0x5C080000, // 0023 MOVE R2 R0
0x7C040200, // 0024 CALL R1 1
0x8C040304, // 0025 GETMET R1 R1 K4
0x7C040200, // 0026 CALL R1 1
0x80000000, // 0027 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light2
********************************************************************/
@ -488,29 +688,23 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light2,
3,
&be_class_Matter_Plugin_Light1,
be_nested_map(15,
be_nested_map(18,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light2_init_closure) },
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light2_invoke_request_closure) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
{ be_const_key_weak(update_shadow, 10), be_const_closure(class_Matter_Plugin_Light2_update_shadow_closure) },
{ be_const_key_weak(update_virtual, 8), be_const_closure(class_Matter_Plugin_Light2_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X202_X20CT) },
{ be_const_key_weak(set_ct, -1), be_const_closure(class_Matter_Plugin_Light2_set_ct_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light2_update_shadow_closure) },
{ be_const_key_weak(set_ct, 13), be_const_closure(class_Matter_Plugin_Light2_set_ct_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
{ be_const_key_weak(UPDATE_COMMANDS, 17), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(3,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
be_nested_str_weak(CT),
})) ) } )) },
{ be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -624,10 +818,19 @@ be_local_class(Matter_Plugin_Light2,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(read_attribute, 11), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(ct_min, -1), be_const_var(1) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light2_invoke_request_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(shadow_ct, 0), be_const_var(0) },
{ be_const_key_weak(update_virtual, -1), be_const_closure(class_Matter_Plugin_Light2_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, 16), be_nested_str_weak(Light_X202_X20CT) },
{ be_const_key_weak(web_value_ct, 11), be_const_closure(class_Matter_Plugin_Light2_web_value_ct_closure) },
{ be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Light2_parse_status_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light2) },
{ be_const_key_weak(ct_min, 12), be_const_var(1) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light2_web_values_closure) },
{ be_const_key_weak(init, 10), be_const_closure(class_Matter_Plugin_Light2_init_closure) },
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
})),
be_str_weak(Matter_Plugin_Light2)
);

View File

@ -63,148 +63,6 @@ be_local_closure(class_Matter_Plugin_Light3_update_virtual, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: set_hue_sat
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_closure(class_Matter_Plugin_Light3_set_hue_sat, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(VIRTUAL),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(scale_uint),
/* K4 */ be_nested_str_weak(light),
/* K5 */ be_nested_str_weak(set),
/* K6 */ be_nested_str_weak(hue),
/* K7 */ be_nested_str_weak(sat),
/* K8 */ be_nested_str_weak(update_shadow),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(attribute_updated),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_const_int(1),
}),
be_str_weak(set_hue_sat),
&be_const_str_solidified,
( &(const binstruction[104]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x200C0203, // 0001 NE R3 R1 R3
0x780E0006, // 0002 JMPF R3 #000A
0x140C0300, // 0003 LT R3 R1 K0
0x780E0000, // 0004 JMPF R3 #0006
0x58040000, // 0005 LDCONST R1 K0
0x540E00FD, // 0006 LDINT R3 254
0x240C0203, // 0007 GT R3 R1 R3
0x780E0000, // 0008 JMPF R3 #000A
0x540600FD, // 0009 LDINT R1 254
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0006, // 000C JMPF R3 #0014
0x140C0500, // 000D LT R3 R2 K0
0x780E0000, // 000E JMPF R3 #0010
0x58080000, // 000F LDCONST R2 K0
0x540E00FD, // 0010 LDINT R3 254
0x240C0403, // 0011 GT R3 R2 R3
0x780E0000, // 0012 JMPF R3 #0014
0x540A00FD, // 0013 LDINT R2 254
0x880C0101, // 0014 GETMBR R3 R0 K1
0x740E003A, // 0015 JMPT R3 #0051
0x4C0C0000, // 0016 LDNIL R3
0x200C0203, // 0017 NE R3 R1 R3
0x780E0008, // 0018 JMPF R3 #0022
0xB80E0400, // 0019 GETNGBL R3 K2
0x8C0C0703, // 001A GETMET R3 R3 K3
0x5C140200, // 001B MOVE R5 R1
0x58180000, // 001C LDCONST R6 K0
0x541E00FD, // 001D LDINT R7 254
0x58200000, // 001E LDCONST R8 K0
0x54260167, // 001F LDINT R9 360
0x7C0C0C00, // 0020 CALL R3 6
0x70020000, // 0021 JMP #0023
0x4C0C0000, // 0022 LDNIL R3
0x4C100000, // 0023 LDNIL R4
0x20100404, // 0024 NE R4 R2 R4
0x78120008, // 0025 JMPF R4 #002F
0xB8120400, // 0026 GETNGBL R4 K2
0x8C100903, // 0027 GETMET R4 R4 K3
0x5C180400, // 0028 MOVE R6 R2
0x581C0000, // 0029 LDCONST R7 K0
0x542200FD, // 002A LDINT R8 254
0x58240000, // 002B LDCONST R9 K0
0x542A00FE, // 002C LDINT R10 255
0x7C100C00, // 002D CALL R4 6
0x70020000, // 002E JMP #0030
0x4C100000, // 002F LDNIL R4
0x4C140000, // 0030 LDNIL R5
0x20140605, // 0031 NE R5 R3 R5
0x7816000A, // 0032 JMPF R5 #003E
0x4C140000, // 0033 LDNIL R5
0x20140805, // 0034 NE R5 R4 R5
0x78160007, // 0035 JMPF R5 #003E
0xB8160800, // 0036 GETNGBL R5 K4
0x8C140B05, // 0037 GETMET R5 R5 K5
0x601C0013, // 0038 GETGBL R7 G19
0x7C1C0000, // 0039 CALL R7 0
0x981E0C03, // 003A SETIDX R7 K6 R3
0x981E0E04, // 003B SETIDX R7 K7 R4
0x7C140400, // 003C CALL R5 2
0x7002000F, // 003D JMP #004E
0x4C140000, // 003E LDNIL R5
0x20140605, // 003F NE R5 R3 R5
0x78160006, // 0040 JMPF R5 #0048
0xB8160800, // 0041 GETNGBL R5 K4
0x8C140B05, // 0042 GETMET R5 R5 K5
0x601C0013, // 0043 GETGBL R7 G19
0x7C1C0000, // 0044 CALL R7 0
0x981E0C03, // 0045 SETIDX R7 K6 R3
0x7C140400, // 0046 CALL R5 2
0x70020005, // 0047 JMP #004E
0xB8160800, // 0048 GETNGBL R5 K4
0x8C140B05, // 0049 GETMET R5 R5 K5
0x601C0013, // 004A GETGBL R7 G19
0x7C1C0000, // 004B CALL R7 0
0x981E0E04, // 004C SETIDX R7 K7 R4
0x7C140400, // 004D CALL R5 2
0x8C140108, // 004E GETMET R5 R0 K8
0x7C140200, // 004F CALL R5 1
0x70020015, // 0050 JMP #0067
0x4C0C0000, // 0051 LDNIL R3
0x200C0203, // 0052 NE R3 R1 R3
0x780E0007, // 0053 JMPF R3 #005C
0x880C0109, // 0054 GETMBR R3 R0 K9
0x200C0203, // 0055 NE R3 R1 R3
0x780E0004, // 0056 JMPF R3 #005C
0x8C0C010A, // 0057 GETMET R3 R0 K10
0x541602FF, // 0058 LDINT R5 768
0x58180000, // 0059 LDCONST R6 K0
0x7C0C0600, // 005A CALL R3 3
0x90021201, // 005B SETMBR R0 K9 R1
0x4C0C0000, // 005C LDNIL R3
0x200C0403, // 005D NE R3 R2 R3
0x780E0007, // 005E JMPF R3 #0067
0x880C010B, // 005F GETMBR R3 R0 K11
0x200C0403, // 0060 NE R3 R2 R3
0x780E0004, // 0061 JMPF R3 #0067
0x8C0C010A, // 0062 GETMET R3 R0 K10
0x541602FF, // 0063 LDINT R5 768
0x5818000C, // 0064 LDCONST R6 K12
0x7C0C0600, // 0065 CALL R3 3
0x90021602, // 0066 SETMBR R0 K11 R2
0x80000000, // 0067 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
@ -426,91 +284,487 @@ be_local_closure(class_Matter_Plugin_Light3_update_shadow, /* name */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(update_shadow),
/* K1 */ be_nested_str_weak(VIRTUAL),
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(VIRTUAL),
/* K1 */ be_nested_str_weak(BRIDGE),
/* K2 */ be_nested_str_weak(light),
/* K3 */ be_nested_str_weak(get),
/* K4 */ be_nested_str_weak(find),
/* K5 */ be_nested_str_weak(hue),
/* K6 */ be_nested_str_weak(sat),
/* K7 */ be_nested_str_weak(tasmota),
/* K8 */ be_nested_str_weak(scale_uint),
/* K9 */ be_const_int(0),
/* K10 */ be_nested_str_weak(shadow_hue),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_nested_str_weak(attribute_updated),
/* K13 */ be_const_int(1),
/* K3 */ be_nested_str_weak(update_shadow),
/* K4 */ be_nested_str_weak(get),
/* K5 */ be_nested_str_weak(find),
/* K6 */ be_nested_str_weak(hue),
/* K7 */ be_nested_str_weak(sat),
/* K8 */ be_nested_str_weak(tasmota),
/* K9 */ be_nested_str_weak(scale_uint),
/* K10 */ be_const_int(0),
/* K11 */ be_nested_str_weak(shadow_hue),
/* K12 */ be_nested_str_weak(shadow_sat),
/* K13 */ be_nested_str_weak(attribute_updated),
/* K14 */ be_const_int(1),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[66]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060039, // 0006 JMPT R1 #0041
0xA4060400, // 0007 IMPORT R1 K2
0x8C080303, // 0008 GETMET R2 R1 K3
( &(const binstruction[74]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x74060041, // 0001 JMPT R1 #0044
0x88040101, // 0002 GETMBR R1 R0 K1
0x7406003F, // 0003 JMPT R1 #0044
0xA4060400, // 0004 IMPORT R1 K2
0x60080003, // 0005 GETGBL R2 G3
0x5C0C0000, // 0006 MOVE R3 R0
0x7C080200, // 0007 CALL R2 1
0x8C080503, // 0008 GETMET R2 R2 K3
0x7C080200, // 0009 CALL R2 1
0x8C080304, // 000A GETMET R2 R1 K4
0x7C080200, // 000B CALL R2 1
0x4C0C0000, // 000C LDNIL R3
0x200C0403, // 000D NE R3 R2 R3
0x780E0033, // 000E JMPF R3 #0043
0x8C0C0505, // 000F GETMET R3 R2 K5
0x58140006, // 0010 LDCONST R5 K6
0x4C180000, // 0011 LDNIL R6
0x7C0C0600, // 0012 CALL R3 3
0x8C100505, // 0013 GETMET R4 R2 K5
0x58180007, // 0014 LDCONST R6 K7
0x4C1C0000, // 0015 LDNIL R7
0x7C100600, // 0016 CALL R4 3
0x4C140000, // 0017 LDNIL R5
0x20140605, // 0018 NE R5 R3 R5
0x78160009, // 0019 JMPF R5 #0024
0xB8161000, // 001A GETNGBL R5 K8
0x8C140B09, // 001B GETMET R5 R5 K9
0x5C1C0600, // 001C MOVE R7 R3
0x5820000A, // 001D LDCONST R8 K10
0x54260167, // 001E LDINT R9 360
0x5828000A, // 001F LDCONST R10 K10
0x542E00FD, // 0020 LDINT R11 254
0x7C140C00, // 0021 CALL R5 6
0x5C0C0A00, // 0022 MOVE R3 R5
0x70020000, // 0023 JMP #0025
0x880C010B, // 0024 GETMBR R3 R0 K11
0x4C140000, // 0025 LDNIL R5
0x20140805, // 0026 NE R5 R4 R5
0x78160009, // 0027 JMPF R5 #0032
0xB8161000, // 0028 GETNGBL R5 K8
0x8C140B09, // 0029 GETMET R5 R5 K9
0x5C1C0800, // 002A MOVE R7 R4
0x5820000A, // 002B LDCONST R8 K10
0x542600FE, // 002C LDINT R9 255
0x5828000A, // 002D LDCONST R10 K10
0x542E00FD, // 002E LDINT R11 254
0x7C140C00, // 002F CALL R5 6
0x5C100A00, // 0030 MOVE R4 R5
0x70020000, // 0031 JMP #0033
0x8810010C, // 0032 GETMBR R4 R0 K12
0x8814010B, // 0033 GETMBR R5 R0 K11
0x20140605, // 0034 NE R5 R3 R5
0x78160004, // 0035 JMPF R5 #003B
0x8C14010D, // 0036 GETMET R5 R0 K13
0x541E02FF, // 0037 LDINT R7 768
0x5820000A, // 0038 LDCONST R8 K10
0x7C140600, // 0039 CALL R5 3
0x90021603, // 003A SETMBR R0 K11 R3
0x8814010C, // 003B GETMBR R5 R0 K12
0x20140805, // 003C NE R5 R4 R5
0x78160004, // 003D JMPF R5 #0043
0x8C14010D, // 003E GETMET R5 R0 K13
0x541E02FF, // 003F LDINT R7 768
0x5820000E, // 0040 LDCONST R8 K14
0x7C140600, // 0041 CALL R5 3
0x90021804, // 0042 SETMBR R0 K12 R4
0x70020004, // 0043 JMP #0049
0x60040003, // 0044 GETGBL R1 G3
0x5C080000, // 0045 MOVE R2 R0
0x7C040200, // 0046 CALL R1 1
0x8C040303, // 0047 GETMET R1 R1 K3
0x7C040200, // 0048 CALL R1 1
0x80000000, // 0049 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_RGB
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_closure(class_Matter_Plugin_Light3_web_value_RGB, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_hue),
/* K1 */ be_nested_str_weak(shadow_sat),
/* K2 */ be_nested_str_weak(light_state),
/* K3 */ be_const_int(3),
/* K4 */ be_nested_str_weak(set_bri),
/* K5 */ be_nested_str_weak(set_huesat),
/* K6 */ be_nested_str_weak(tasmota),
/* K7 */ be_nested_str_weak(scale_uint),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(_X23_X2502X_X2502X_X2502X),
/* K10 */ be_nested_str_weak(r),
/* K11 */ be_nested_str_weak(g),
/* K12 */ be_nested_str_weak(b),
/* K13 */ be_nested_str_weak(_X3Ci_X20class_X3D_X22bxm_X22_X20style_X3D_X22_X2D_X2Dcl_X3A_X25s_X22_X3E_X3C_X2Fi_X3E_X25s),
/* K14 */ be_nested_str_weak(),
}),
be_str_weak(web_value_RGB),
&be_const_str_solidified,
( &(const binstruction[45]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x4C080000, // 0001 LDNIL R2
0x20040202, // 0002 NE R1 R1 R2
0x78060027, // 0003 JMPF R1 #002C
0x88040101, // 0004 GETMBR R1 R0 K1
0x4C080000, // 0005 LDNIL R2
0x20040202, // 0006 NE R1 R1 R2
0x78060023, // 0007 JMPF R1 #002C
0xB8060400, // 0008 GETNGBL R1 K2
0x58080003, // 0009 LDCONST R2 K3
0x7C040200, // 000A CALL R1 1
0x8C080304, // 000B GETMET R2 R1 K4
0x541200FE, // 000C LDINT R4 255
0x7C080400, // 000D CALL R2 2
0x8C080305, // 000E GETMET R2 R1 K5
0xB8120C00, // 000F GETNGBL R4 K6
0x8C100907, // 0010 GETMET R4 R4 K7
0x88180100, // 0011 GETMBR R6 R0 K0
0x581C0008, // 0012 LDCONST R7 K8
0x542200FD, // 0013 LDINT R8 254
0x58240008, // 0014 LDCONST R9 K8
0x542A0167, // 0015 LDINT R10 360
0x7C100C00, // 0016 CALL R4 6
0xB8160C00, // 0017 GETNGBL R5 K6
0x8C140B07, // 0018 GETMET R5 R5 K7
0x881C0101, // 0019 GETMBR R7 R0 K1
0x58200008, // 001A LDCONST R8 K8
0x542600FD, // 001B LDINT R9 254
0x58280008, // 001C LDCONST R10 K8
0x542E00FE, // 001D LDINT R11 255
0x7C140C00, // 001E CALL R5 6
0x7C080600, // 001F CALL R2 3
0x60080018, // 0020 GETGBL R2 G24
0x580C0009, // 0021 LDCONST R3 K9
0x8810030A, // 0022 GETMBR R4 R1 K10
0x8814030B, // 0023 GETMBR R5 R1 K11
0x8818030C, // 0024 GETMBR R6 R1 K12
0x7C080800, // 0025 CALL R2 4
0x600C0018, // 0026 GETGBL R3 G24
0x5810000D, // 0027 LDCONST R4 K13
0x5C140400, // 0028 MOVE R5 R2
0x5C180400, // 0029 MOVE R6 R2
0x7C0C0600, // 002A CALL R3 3
0x80040600, // 002B RET 1 R3
0x80061C00, // 002C RET 1 K14
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_hue_sat
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_closure(class_Matter_Plugin_Light3_set_hue_sat, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[18]) { /* constants */
/* K0 */ be_const_int(0),
/* K1 */ be_nested_str_weak(BRIDGE),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(scale_uint),
/* K4 */ be_nested_str_weak(call_remote_sync),
/* K5 */ be_nested_str_weak(HSBColor1),
/* K6 */ be_nested_str_weak(parse_status),
/* K7 */ be_nested_str_weak(HSBColor2),
/* K8 */ be_nested_str_weak(VIRTUAL),
/* K9 */ be_nested_str_weak(shadow_hue),
/* K10 */ be_nested_str_weak(attribute_updated),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_const_int(1),
/* K13 */ be_nested_str_weak(light),
/* K14 */ be_nested_str_weak(set),
/* K15 */ be_nested_str_weak(hue),
/* K16 */ be_nested_str_weak(sat),
/* K17 */ be_nested_str_weak(update_shadow),
}),
be_str_weak(set_hue_sat),
&be_const_str_solidified,
( &(const binstruction[151]) { /* code */
0x4C0C0000, // 0000 LDNIL R3
0x200C0203, // 0001 NE R3 R1 R3
0x780E0006, // 0002 JMPF R3 #000A
0x140C0300, // 0003 LT R3 R1 K0
0x780E0000, // 0004 JMPF R3 #0006
0x58040000, // 0005 LDCONST R1 K0
0x540E00FD, // 0006 LDINT R3 254
0x240C0203, // 0007 GT R3 R1 R3
0x780E0000, // 0008 JMPF R3 #000A
0x540600FD, // 0009 LDINT R1 254
0x4C0C0000, // 000A LDNIL R3
0x200C0403, // 000B NE R3 R2 R3
0x780E0033, // 000C JMPF R3 #0041
0x8C0C0504, // 000D GETMET R3 R2 K4
0x58140005, // 000E LDCONST R5 K5
0x4C180000, // 000F LDNIL R6
0x7C0C0600, // 0010 CALL R3 3
0x8C100504, // 0011 GETMET R4 R2 K4
0x58180006, // 0012 LDCONST R6 K6
0x4C1C0000, // 0013 LDNIL R7
0x7C100600, // 0014 CALL R4 3
0x4C140000, // 0015 LDNIL R5
0x20140605, // 0016 NE R5 R3 R5
0x78160009, // 0017 JMPF R5 #0022
0xB8160E00, // 0018 GETNGBL R5 K7
0x8C140B08, // 0019 GETMET R5 R5 K8
0x5C1C0600, // 001A MOVE R7 R3
0x58200009, // 001B LDCONST R8 K9
0x54260167, // 001C LDINT R9 360
0x58280009, // 001D LDCONST R10 K9
0x542E00FD, // 001E LDINT R11 254
0x7C140C00, // 001F CALL R5 6
0x5C0C0A00, // 0020 MOVE R3 R5
0x70020000, // 0021 JMP #0023
0x880C010A, // 0022 GETMBR R3 R0 K10
0x4C140000, // 0023 LDNIL R5
0x20140805, // 0024 NE R5 R4 R5
0x78160009, // 0025 JMPF R5 #0030
0xB8160E00, // 0026 GETNGBL R5 K7
0x8C140B08, // 0027 GETMET R5 R5 K8
0x5C1C0800, // 0028 MOVE R7 R4
0x58200009, // 0029 LDCONST R8 K9
0x542600FE, // 002A LDINT R9 255
0x58280009, // 002B LDCONST R10 K9
0x542E00FD, // 002C LDINT R11 254
0x7C140C00, // 002D CALL R5 6
0x5C100A00, // 002E MOVE R4 R5
0x70020000, // 002F JMP #0031
0x8810010B, // 0030 GETMBR R4 R0 K11
0x8814010A, // 0031 GETMBR R5 R0 K10
0x20140605, // 0032 NE R5 R3 R5
0x78160004, // 0033 JMPF R5 #0039
0x8C14010C, // 0034 GETMET R5 R0 K12
0x541E02FF, // 0035 LDINT R7 768
0x58200009, // 0036 LDCONST R8 K9
0x7C140600, // 0037 CALL R5 3
0x90021403, // 0038 SETMBR R0 K10 R3
0x8814010B, // 0039 GETMBR R5 R0 K11
0x20140805, // 003A NE R5 R4 R5
0x78160004, // 003B JMPF R5 #0041
0x8C14010C, // 003C GETMET R5 R0 K12
0x541E02FF, // 003D LDINT R7 768
0x5820000D, // 003E LDCONST R8 K13
0x7C140600, // 003F CALL R5 3
0x90021604, // 0040 SETMBR R0 K11 R4
0x80000000, // 0041 RET 0
0x780E0006, // 000C JMPF R3 #0014
0x140C0500, // 000D LT R3 R2 K0
0x780E0000, // 000E JMPF R3 #0010
0x58080000, // 000F LDCONST R2 K0
0x540E00FD, // 0010 LDINT R3 254
0x240C0403, // 0011 GT R3 R2 R3
0x780E0000, // 0012 JMPF R3 #0014
0x540A00FD, // 0013 LDINT R2 254
0x880C0101, // 0014 GETMBR R3 R0 K1
0x780E002C, // 0015 JMPF R3 #0043
0x4C0C0000, // 0016 LDNIL R3
0x200C0203, // 0017 NE R3 R1 R3
0x780E0012, // 0018 JMPF R3 #002C
0xB80E0400, // 0019 GETNGBL R3 K2
0x8C0C0703, // 001A GETMET R3 R3 K3
0x5C140200, // 001B MOVE R5 R1
0x58180000, // 001C LDCONST R6 K0
0x541E00FD, // 001D LDINT R7 254
0x58200000, // 001E LDCONST R8 K0
0x54260167, // 001F LDINT R9 360
0x7C0C0C00, // 0020 CALL R3 6
0x8C100104, // 0021 GETMET R4 R0 K4
0x58180005, // 0022 LDCONST R6 K5
0x5C1C0600, // 0023 MOVE R7 R3
0x7C100600, // 0024 CALL R4 3
0x4C140000, // 0025 LDNIL R5
0x20140805, // 0026 NE R5 R4 R5
0x78160003, // 0027 JMPF R5 #002C
0x8C140106, // 0028 GETMET R5 R0 K6
0x5C1C0800, // 0029 MOVE R7 R4
0x5422000A, // 002A LDINT R8 11
0x7C140600, // 002B CALL R5 3
0x4C0C0000, // 002C LDNIL R3
0x200C0403, // 002D NE R3 R2 R3
0x780E0012, // 002E JMPF R3 #0042
0xB80E0400, // 002F GETNGBL R3 K2
0x8C0C0703, // 0030 GETMET R3 R3 K3
0x5C140400, // 0031 MOVE R5 R2
0x58180000, // 0032 LDCONST R6 K0
0x541E00FD, // 0033 LDINT R7 254
0x58200000, // 0034 LDCONST R8 K0
0x54260063, // 0035 LDINT R9 100
0x7C0C0C00, // 0036 CALL R3 6
0x8C100104, // 0037 GETMET R4 R0 K4
0x58180007, // 0038 LDCONST R6 K7
0x5C1C0600, // 0039 MOVE R7 R3
0x7C100600, // 003A CALL R4 3
0x4C140000, // 003B LDNIL R5
0x20140805, // 003C NE R5 R4 R5
0x78160003, // 003D JMPF R5 #0042
0x8C140106, // 003E GETMET R5 R0 K6
0x5C1C0800, // 003F MOVE R7 R4
0x5422000A, // 0040 LDINT R8 11
0x7C140600, // 0041 CALL R5 3
0x70020052, // 0042 JMP #0096
0x880C0108, // 0043 GETMBR R3 R0 K8
0x780E0016, // 0044 JMPF R3 #005C
0x4C0C0000, // 0045 LDNIL R3
0x200C0203, // 0046 NE R3 R1 R3
0x780E0007, // 0047 JMPF R3 #0050
0x880C0109, // 0048 GETMBR R3 R0 K9
0x200C0203, // 0049 NE R3 R1 R3
0x780E0004, // 004A JMPF R3 #0050
0x8C0C010A, // 004B GETMET R3 R0 K10
0x541602FF, // 004C LDINT R5 768
0x58180000, // 004D LDCONST R6 K0
0x7C0C0600, // 004E CALL R3 3
0x90021201, // 004F SETMBR R0 K9 R1
0x4C0C0000, // 0050 LDNIL R3
0x200C0403, // 0051 NE R3 R2 R3
0x780E0007, // 0052 JMPF R3 #005B
0x880C010B, // 0053 GETMBR R3 R0 K11
0x200C0403, // 0054 NE R3 R2 R3
0x780E0004, // 0055 JMPF R3 #005B
0x8C0C010A, // 0056 GETMET R3 R0 K10
0x541602FF, // 0057 LDINT R5 768
0x5818000C, // 0058 LDCONST R6 K12
0x7C0C0600, // 0059 CALL R3 3
0x90021602, // 005A SETMBR R0 K11 R2
0x70020039, // 005B JMP #0096
0x4C0C0000, // 005C LDNIL R3
0x200C0203, // 005D NE R3 R1 R3
0x780E0008, // 005E JMPF R3 #0068
0xB80E0400, // 005F GETNGBL R3 K2
0x8C0C0703, // 0060 GETMET R3 R3 K3
0x5C140200, // 0061 MOVE R5 R1
0x58180000, // 0062 LDCONST R6 K0
0x541E00FD, // 0063 LDINT R7 254
0x58200000, // 0064 LDCONST R8 K0
0x54260167, // 0065 LDINT R9 360
0x7C0C0C00, // 0066 CALL R3 6
0x70020000, // 0067 JMP #0069
0x4C0C0000, // 0068 LDNIL R3
0x4C100000, // 0069 LDNIL R4
0x20100404, // 006A NE R4 R2 R4
0x78120008, // 006B JMPF R4 #0075
0xB8120400, // 006C GETNGBL R4 K2
0x8C100903, // 006D GETMET R4 R4 K3
0x5C180400, // 006E MOVE R6 R2
0x581C0000, // 006F LDCONST R7 K0
0x542200FD, // 0070 LDINT R8 254
0x58240000, // 0071 LDCONST R9 K0
0x542A00FE, // 0072 LDINT R10 255
0x7C100C00, // 0073 CALL R4 6
0x70020000, // 0074 JMP #0076
0x4C100000, // 0075 LDNIL R4
0x4C140000, // 0076 LDNIL R5
0x20140605, // 0077 NE R5 R3 R5
0x7816000A, // 0078 JMPF R5 #0084
0x4C140000, // 0079 LDNIL R5
0x20140805, // 007A NE R5 R4 R5
0x78160007, // 007B JMPF R5 #0084
0xB8161A00, // 007C GETNGBL R5 K13
0x8C140B0E, // 007D GETMET R5 R5 K14
0x601C0013, // 007E GETGBL R7 G19
0x7C1C0000, // 007F CALL R7 0
0x981E1E03, // 0080 SETIDX R7 K15 R3
0x981E2004, // 0081 SETIDX R7 K16 R4
0x7C140400, // 0082 CALL R5 2
0x7002000F, // 0083 JMP #0094
0x4C140000, // 0084 LDNIL R5
0x20140605, // 0085 NE R5 R3 R5
0x78160006, // 0086 JMPF R5 #008E
0xB8161A00, // 0087 GETNGBL R5 K13
0x8C140B0E, // 0088 GETMET R5 R5 K14
0x601C0013, // 0089 GETGBL R7 G19
0x7C1C0000, // 008A CALL R7 0
0x981E1E03, // 008B SETIDX R7 K15 R3
0x7C140400, // 008C CALL R5 2
0x70020005, // 008D JMP #0094
0xB8161A00, // 008E GETNGBL R5 K13
0x8C140B0E, // 008F GETMET R5 R5 K14
0x601C0013, // 0090 GETGBL R7 G19
0x7C1C0000, // 0091 CALL R7 0
0x981E2004, // 0092 SETIDX R7 K16 R4
0x7C140400, // 0093 CALL R5 2
0x8C140111, // 0094 GETMET R5 R0 K17
0x7C140200, // 0095 CALL R5 1
0x80000000, // 0096 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_closure(class_Matter_Plugin_Light3_parse_status, /* name */
be_nested_proto(
15, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(parse_status),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(HSBColor),
/* K3 */ be_nested_str_weak(string),
/* K4 */ be_nested_str_weak(split),
/* K5 */ be_nested_str_weak(_X2C),
/* K6 */ be_const_int(0),
/* K7 */ be_const_int(1),
/* K8 */ be_nested_str_weak(tasmota),
/* K9 */ be_nested_str_weak(scale_uint),
/* K10 */ be_nested_str_weak(shadow_hue),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[70]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
0x540E000A, // 0007 LDINT R3 11
0x1C0C0403, // 0008 EQ R3 R2 R3
0x780E003A, // 0009 JMPF R3 #0045
0x8C0C0301, // 000A GETMET R3 R1 K1
0x58140002, // 000B LDCONST R5 K2
0x7C0C0400, // 000C CALL R3 2
0x780E0036, // 000D JMPF R3 #0045
0xA4120600, // 000E IMPORT R4 K3
0x8C140904, // 000F GETMET R5 R4 K4
0x5C1C0600, // 0010 MOVE R7 R3
0x58200005, // 0011 LDCONST R8 K5
0x7C140600, // 0012 CALL R5 3
0x60180009, // 0013 GETGBL R6 G9
0x941C0B06, // 0014 GETIDX R7 R5 K6
0x7C180200, // 0015 CALL R6 1
0x601C0009, // 0016 GETGBL R7 G9
0x94200B07, // 0017 GETIDX R8 R5 K7
0x7C1C0200, // 0018 CALL R7 1
0x4C200000, // 0019 LDNIL R8
0x20200C08, // 001A NE R8 R6 R8
0x78220009, // 001B JMPF R8 #0026
0xB8221000, // 001C GETNGBL R8 K8
0x8C201109, // 001D GETMET R8 R8 K9
0x5C280C00, // 001E MOVE R10 R6
0x582C0006, // 001F LDCONST R11 K6
0x54320167, // 0020 LDINT R12 360
0x58340006, // 0021 LDCONST R13 K6
0x543A00FD, // 0022 LDINT R14 254
0x7C200C00, // 0023 CALL R8 6
0x5C181000, // 0024 MOVE R6 R8
0x70020000, // 0025 JMP #0027
0x8818010A, // 0026 GETMBR R6 R0 K10
0x4C200000, // 0027 LDNIL R8
0x20200E08, // 0028 NE R8 R7 R8
0x78220009, // 0029 JMPF R8 #0034
0xB8221000, // 002A GETNGBL R8 K8
0x8C201109, // 002B GETMET R8 R8 K9
0x5C280E00, // 002C MOVE R10 R7
0x582C0006, // 002D LDCONST R11 K6
0x54320063, // 002E LDINT R12 100
0x58340006, // 002F LDCONST R13 K6
0x543A00FD, // 0030 LDINT R14 254
0x7C200C00, // 0031 CALL R8 6
0x5C1C1000, // 0032 MOVE R7 R8
0x70020000, // 0033 JMP #0035
0x881C010B, // 0034 GETMBR R7 R0 K11
0x8820010A, // 0035 GETMBR R8 R0 K10
0x20200C08, // 0036 NE R8 R6 R8
0x78220004, // 0037 JMPF R8 #003D
0x8C20010C, // 0038 GETMET R8 R0 K12
0x542A02FF, // 0039 LDINT R10 768
0x582C0006, // 003A LDCONST R11 K6
0x7C200600, // 003B CALL R8 3
0x90021406, // 003C SETMBR R0 K10 R6
0x8820010B, // 003D GETMBR R8 R0 K11
0x20200E08, // 003E NE R8 R7 R8
0x78220004, // 003F JMPF R8 #0045
0x8C20010C, // 0040 GETMET R8 R0 K12
0x542A02FF, // 0041 LDINT R10 768
0x582C0007, // 0042 LDCONST R11 K7
0x7C200600, // 0043 CALL R8 3
0x90021607, // 0044 SETMBR R0 K11 R7
0x80000000, // 0045 RET 0
})
)
);
@ -652,6 +906,55 @@ be_local_closure(class_Matter_Plugin_Light3_read_attribute, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_closure(class_Matter_Plugin_Light3_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Light3,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(web_value_dimmer),
/* K7 */ be_nested_str_weak(web_value_RGB),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x8C1C0106, // 0009 GETMET R7 R0 K6
0x7C1C0200, // 000A CALL R7 1
0x8C200107, // 000B GETMET R8 R0 K7
0x7C200200, // 000C CALL R8 1
0x7C100800, // 000D CALL R4 4
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Light3
********************************************************************/
@ -659,19 +962,30 @@ extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Light3,
2,
&be_class_Matter_Plugin_Light1,
be_nested_map(13,
be_nested_map(16,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_virtual, 1), be_const_closure(class_Matter_Plugin_Light3_update_virtual_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Light3_web_values_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Light3_init_closure) },
{ be_const_key_weak(shadow_hue, -1), be_const_var(0) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(update_virtual, 8), be_const_closure(class_Matter_Plugin_Light3_update_virtual_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Light3_update_shadow_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(init, 9), be_const_closure(class_Matter_Plugin_Light3_init_closure) },
{ be_const_key_weak(set_hue_sat, 3), be_const_closure(class_Matter_Plugin_Light3_set_hue_sat_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light3) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X203_X20RGB) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(UPDATE_COMMANDS, 15), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(4,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
be_nested_str_weak(Hue),
be_nested_str_weak(Sat),
})) ) } )) },
{ be_const_key_weak(read_attribute, 2), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) },
{ be_const_key_weak(set_hue_sat, -1), be_const_closure(class_Matter_Plugin_Light3_set_hue_sat_closure) },
{ be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -787,19 +1101,11 @@ be_local_class(Matter_Plugin_Light3,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(UPDATE_COMMANDS, 4), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(4,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Power),
be_nested_str_weak(Bri),
be_nested_str_weak(Hue),
be_nested_str_weak(Sat),
})) ) } )) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(invoke_request, 12), be_const_closure(class_Matter_Plugin_Light3_invoke_request_closure) },
{ be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Light3_parse_status_closure) },
{ be_const_key_weak(TYPE, 6), be_nested_str_weak(light3) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(web_value_RGB, -1), be_const_closure(class_Matter_Plugin_Light3_web_value_RGB_closure) },
})),
be_str_weak(Matter_Plugin_Light3)
);

View File

@ -1,29 +1,29 @@
/* Solidification of Matter_Plugin_3_Light0.h */
/* Solidification of Matter_Plugin_3_OnOff.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Light0;
extern const bclass be_class_Matter_Plugin_OnOff;
/********************************************************************
** Solidified class: Matter_Plugin_Light0
** Solidified class: Matter_Plugin_OnOff
********************************************************************/
extern const bclass be_class_Matter_Plugin_OnOff;
be_local_class(Matter_Plugin_Light0,
extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_OnOff,
0,
&be_class_Matter_Plugin_OnOff,
&be_class_Matter_Plugin_Light0,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X200_X20On) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(light0) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Relay) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(256, -1), be_const_int(2) },
{ be_const_key_int(266, -1), be_const_int(2) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Light0)
be_str_weak(Matter_Plugin_OnOff)
);
/********************************************************************/
/* End of solidification */

View File

@ -160,6 +160,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Flow_pre_value, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Flow;
be_local_closure(class_Matter_Plugin_Sensor_Flow_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Flow,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20m_X26sup3_X3B_X2Fh),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Flow
********************************************************************/
@ -167,23 +209,20 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Flow,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Flow) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(flow) },
{ be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(774, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Flow_value_changed_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Flow),
})) ) } )) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Flow_value_changed_closure) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Flow) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -270,7 +309,11 @@ be_local_class(Matter_Plugin_Sensor_Flow,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Flow) },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Flow_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Flow) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(flow) },
})),
be_str_weak(Matter_Plugin_Sensor_Flow)
);

View File

@ -160,6 +160,56 @@ be_local_closure(class_Matter_Plugin_Sensor_Humidity_pre_value, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Humidity;
be_local_closure(class_Matter_Plugin_Sensor_Humidity_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Humidity,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x1F4A7_X3B_X20_X252_X2E0f_X25_X25),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x4C1C0000, // 0007 LDNIL R7
0x20180C07, // 0008 NE R6 R6 R7
0x781A0005, // 0009 JMPF R6 #0010
0x6018000A, // 000A GETGBL R6 G10
0x881C0104, // 000B GETMBR R7 R0 K4
0x7C180200, // 000C CALL R6 1
0x541E0063, // 000D LDINT R7 100
0x0C180C07, // 000E DIV R6 R6 R7
0x70020000, // 000F JMP #0011
0x4C180000, // 0010 LDNIL R6
0x7C100400, // 0011 CALL R4 2
0x7C080400, // 0012 CALL R2 2
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Humidity
********************************************************************/
@ -167,23 +217,20 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(humidity) },
{ be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Humidity_value_changed_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Humidity),
})) ) } )) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_value_changed_closure) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -270,7 +317,11 @@ be_local_class(Matter_Plugin_Sensor_Humidity,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Humidity_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Humidity) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(humidity) },
})),
be_str_weak(Matter_Plugin_Sensor_Humidity)
);

View File

@ -172,6 +172,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Illuminance_pre_value, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Illuminance;
be_local_closure(class_Matter_Plugin_Sensor_Illuminance_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Illuminance,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23128261_X3B_X20_X25i_X20lux),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Illuminance
********************************************************************/
@ -179,23 +221,20 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(illuminance) },
{ be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Illuminance),
})) ) } )) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_value_changed_closure) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -282,7 +321,11 @@ be_local_class(Matter_Plugin_Sensor_Illuminance,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(illuminance) },
})),
be_str_weak(Matter_Plugin_Sensor_Illuminance)
);

View File

@ -159,6 +159,48 @@ be_local_closure(class_Matter_Plugin_Sensor_Pressure_pre_value, /* name */
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Pressure;
be_local_closure(class_Matter_Plugin_Sensor_Pressure_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Pressure,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20hPa),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Pressure
********************************************************************/
@ -166,23 +208,20 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(pressure) },
{ be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Pressure_value_changed_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Pressure),
})) ) } )) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_value_changed_closure) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -269,7 +308,11 @@ be_local_class(Matter_Plugin_Sensor_Pressure,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Pressure_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Pressure) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(pressure) },
})),
be_str_weak(Matter_Plugin_Sensor_Pressure)
);

View File

@ -138,20 +138,23 @@ be_local_closure(class_Matter_Plugin_Sensor_Temp_pre_value, /* name */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Temp,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_const_int(1),
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(BRIDGE),
/* K1 */ be_nested_str_weak(temp_unit),
/* K2 */ be_nested_str_weak(TEMP_F),
/* K3 */ be_const_real_hex(0x3FE66666),
/* K4 */ be_nested_str_weak(tasmota),
/* K5 */ be_nested_str_weak(get_option),
/* K6 */ be_const_int(1),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x54120007, // 0002 LDINT R4 8
0x7C080400, // 0003 CALL R2 2
0x1C080502, // 0004 EQ R2 R2 K2
( &(const binstruction[42]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x780A0012, // 0001 JMPF R2 #0015
0x88080101, // 0002 GETMBR R2 R0 K1
0x880C0102, // 0003 GETMBR R3 R0 K2
0x1C080403, // 0004 EQ R2 R2 R3
0x780A0003, // 0005 JMPF R2 #000A
0x540A001F, // 0006 LDINT R2 32
0x04080202, // 0007 SUB R2 R1 R2
@ -167,6 +170,78 @@ be_local_closure(class_Matter_Plugin_Sensor_Temp_pre_value, /* name */
0x70020000, // 0011 JMP #0013
0x4C080000, // 0012 LDNIL R2
0x80040400, // 0013 RET 1 R2
0x70020013, // 0014 JMP #0029
0xB80A0800, // 0015 GETNGBL R2 K4
0x8C080505, // 0016 GETMET R2 R2 K5
0x54120007, // 0017 LDINT R4 8
0x7C080400, // 0018 CALL R2 2
0x1C080506, // 0019 EQ R2 R2 K6
0x780A0003, // 001A JMPF R2 #001F
0x540A001F, // 001B LDINT R2 32
0x04080202, // 001C SUB R2 R1 R2
0x0C080503, // 001D DIV R2 R2 K3
0x5C040400, // 001E MOVE R1 R2
0x4C080000, // 001F LDNIL R2
0x20080202, // 0020 NE R2 R1 R2
0x780A0004, // 0021 JMPF R2 #0027
0x60080009, // 0022 GETGBL R2 G9
0x540E0063, // 0023 LDINT R3 100
0x080C0203, // 0024 MUL R3 R1 R3
0x7C080200, // 0025 CALL R2 1
0x70020000, // 0026 JMP #0028
0x4C080000, // 0027 LDNIL R2
0x80040400, // 0028 RET 1 R2
0x80000000, // 0029 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Temp;
be_local_closure(class_Matter_Plugin_Sensor_Temp_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Temp,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x2600_X3B_X26_X23xFE0F_X3B_X20_X25_X2E1f_X20_XC2_XB0C),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x4C1C0000, // 0007 LDNIL R7
0x20180C07, // 0008 NE R6 R6 R7
0x781A0005, // 0009 JMPF R6 #0010
0x6018000A, // 000A GETGBL R6 G10
0x881C0104, // 000B GETMBR R7 R0 K4
0x7C180200, // 000C CALL R6 1
0x541E0063, // 000D LDINT R7 100
0x0C180C07, // 000E DIV R6 R6 R7
0x70020000, // 000F JMP #0011
0x4C180000, // 0010 LDNIL R6
0x7C100400, // 0011 CALL R4 2
0x7C080400, // 0012 CALL R2 2
0x80000000, // 0013 RET 0
})
)
);
@ -180,23 +255,20 @@ extern const bclass be_class_Matter_Plugin_Sensor;
be_local_class(Matter_Plugin_Sensor_Temp,
0,
&be_class_Matter_Plugin_Sensor,
be_nested_map(9,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(temperature) },
{ be_const_key_weak(TYPES, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(value_changed, 8), be_const_closure(class_Matter_Plugin_Sensor_Temp_value_changed_closure) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(UPDATE_COMMANDS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(1,
( (struct bvalue*) &(const bvalue[]) {
be_nested_str_weak(Temperature),
})) ) } )) },
{ be_const_key_weak(value_changed, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_value_changed_closure) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
@ -283,7 +355,11 @@ be_local_class(Matter_Plugin_Sensor_Temp,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(JSON_NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(pre_value, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Temp_web_values_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Temperature) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(temperature) },
})),
be_str_weak(Matter_Plugin_Sensor_Temp)
);

View File

@ -1,648 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Light1.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_invoke_request, /* name */
be_nested_proto(
21, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[20]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(findsubval),
/* K6 */ be_nested_str_weak(set_bri),
/* K7 */ be_nested_str_weak(log),
/* K8 */ be_nested_str_weak(bri_X3A),
/* K9 */ be_nested_str_weak(publish_command),
/* K10 */ be_nested_str_weak(Bri),
/* K11 */ be_nested_str_weak(tasmota),
/* K12 */ be_nested_str_weak(scale_uint),
/* K13 */ be_nested_str_weak(Dimmer),
/* K14 */ be_const_int(1),
/* K15 */ be_const_int(2),
/* K16 */ be_const_int(3),
/* K17 */ be_nested_str_weak(set_onoff),
/* K18 */ be_nested_str_weak(Power),
/* K19 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[132]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x541E0007, // 0004 LDINT R7 8
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0072, // 0006 JMPF R7 #007A
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E0021, // 0008 JMPF R7 #002B
0x8C1C0505, // 0009 GETMET R7 R2 K5
0x58240004, // 000A LDCONST R9 K4
0x7C1C0400, // 000B CALL R7 2
0x8C200106, // 000C GETMET R8 R0 K6
0x5C280E00, // 000D MOVE R10 R7
0x7C200400, // 000E CALL R8 2
0x60200008, // 000F GETGBL R8 G8
0x5C240E00, // 0010 MOVE R9 R7
0x7C200200, // 0011 CALL R8 1
0x00221008, // 0012 ADD R8 K8 R8
0x900E0E08, // 0013 SETMBR R3 K7 R8
0x8C200109, // 0014 GETMET R8 R0 K9
0x5828000A, // 0015 LDCONST R10 K10
0xB82E1600, // 0016 GETNGBL R11 K11
0x8C2C170C, // 0017 GETMET R11 R11 K12
0x5C340E00, // 0018 MOVE R13 R7
0x58380004, // 0019 LDCONST R14 K4
0x543E00FD, // 001A LDINT R15 254
0x58400004, // 001B LDCONST R16 K4
0x544600FE, // 001C LDINT R17 255
0x7C2C0C00, // 001D CALL R11 6
0x5830000D, // 001E LDCONST R12 K13
0xB8361600, // 001F GETNGBL R13 K11
0x8C341B0C, // 0020 GETMET R13 R13 K12
0x5C3C0E00, // 0021 MOVE R15 R7
0x58400004, // 0022 LDCONST R16 K4
0x544600FD, // 0023 LDINT R17 254
0x58480004, // 0024 LDCONST R18 K4
0x544E0063, // 0025 LDINT R19 100
0x7C340C00, // 0026 CALL R13 6
0x7C200A00, // 0027 CALL R8 5
0x50200200, // 0028 LDBOOL R8 1 0
0x80041000, // 0029 RET 1 R8
0x7002004D, // 002A JMP #0079
0x1C1C0D0E, // 002B EQ R7 R6 K14
0x781E0002, // 002C JMPF R7 #0030
0x501C0200, // 002D LDBOOL R7 1 0
0x80040E00, // 002E RET 1 R7
0x70020048, // 002F JMP #0079
0x1C1C0D0F, // 0030 EQ R7 R6 K15
0x781E0002, // 0031 JMPF R7 #0035
0x501C0200, // 0032 LDBOOL R7 1 0
0x80040E00, // 0033 RET 1 R7
0x70020043, // 0034 JMP #0079
0x1C1C0D10, // 0035 EQ R7 R6 K16
0x781E0002, // 0036 JMPF R7 #003A
0x501C0200, // 0037 LDBOOL R7 1 0
0x80040E00, // 0038 RET 1 R7
0x7002003E, // 0039 JMP #0079
0x541E0003, // 003A LDINT R7 4
0x1C1C0C07, // 003B EQ R7 R6 R7
0x781E002A, // 003C JMPF R7 #0068
0x8C1C0505, // 003D GETMET R7 R2 K5
0x58240004, // 003E LDCONST R9 K4
0x7C1C0400, // 003F CALL R7 2
0x8C200106, // 0040 GETMET R8 R0 K6
0x5C280E00, // 0041 MOVE R10 R7
0x7C200400, // 0042 CALL R8 2
0x24200F04, // 0043 GT R8 R7 K4
0x8C240111, // 0044 GETMET R9 R0 K17
0x5C2C1000, // 0045 MOVE R11 R8
0x7C240400, // 0046 CALL R9 2
0x60240008, // 0047 GETGBL R9 G8
0x5C280E00, // 0048 MOVE R10 R7
0x7C240200, // 0049 CALL R9 1
0x00261009, // 004A ADD R9 K8 R9
0x900E0E09, // 004B SETMBR R3 K7 R9
0x8C240109, // 004C GETMET R9 R0 K9
0x582C000A, // 004D LDCONST R11 K10
0xB8321600, // 004E GETNGBL R12 K11
0x8C30190C, // 004F GETMET R12 R12 K12
0x5C380E00, // 0050 MOVE R14 R7
0x583C0004, // 0051 LDCONST R15 K4
0x544200FD, // 0052 LDINT R16 254
0x58440004, // 0053 LDCONST R17 K4
0x544A00FE, // 0054 LDINT R18 255
0x7C300C00, // 0055 CALL R12 6
0x5834000D, // 0056 LDCONST R13 K13
0xB83A1600, // 0057 GETNGBL R14 K11
0x8C381D0C, // 0058 GETMET R14 R14 K12
0x5C400E00, // 0059 MOVE R16 R7
0x58440004, // 005A LDCONST R17 K4
0x544A00FD, // 005B LDINT R18 254
0x584C0004, // 005C LDCONST R19 K4
0x54520063, // 005D LDINT R20 100
0x7C380C00, // 005E CALL R14 6
0x583C0012, // 005F LDCONST R15 K18
0x78220001, // 0060 JMPF R8 #0063
0x5840000E, // 0061 LDCONST R16 K14
0x70020000, // 0062 JMP #0064
0x58400004, // 0063 LDCONST R16 K4
0x7C240E00, // 0064 CALL R9 7
0x50240200, // 0065 LDBOOL R9 1 0
0x80041200, // 0066 RET 1 R9
0x70020010, // 0067 JMP #0079
0x541E0004, // 0068 LDINT R7 5
0x1C1C0C07, // 0069 EQ R7 R6 R7
0x781E0002, // 006A JMPF R7 #006E
0x501C0200, // 006B LDBOOL R7 1 0
0x80040E00, // 006C RET 1 R7
0x7002000A, // 006D JMP #0079
0x541E0005, // 006E LDINT R7 6
0x1C1C0C07, // 006F EQ R7 R6 R7
0x781E0002, // 0070 JMPF R7 #0074
0x501C0200, // 0071 LDBOOL R7 1 0
0x80040E00, // 0072 RET 1 R7
0x70020004, // 0073 JMP #0079
0x541E0006, // 0074 LDINT R7 7
0x1C1C0C07, // 0075 EQ R7 R6 R7
0x781E0001, // 0076 JMPF R7 #0079
0x501C0200, // 0077 LDBOOL R7 1 0
0x80040E00, // 0078 RET 1 R7
0x70020008, // 0079 JMP #0083
0x601C0003, // 007A GETGBL R7 G3
0x5C200000, // 007B MOVE R8 R0
0x7C1C0200, // 007C CALL R7 1
0x8C1C0F13, // 007D GETMET R7 R7 K19
0x5C240200, // 007E MOVE R9 R1
0x5C280400, // 007F MOVE R10 R2
0x5C2C0600, // 0080 MOVE R11 R3
0x7C1C0800, // 0081 CALL R7 4
0x80040E00, // 0082 RET 1 R7
0x80000000, // 0083 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_read_attribute, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(attribute),
/* K4 */ be_nested_str_weak(update_shadow_lazy),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(shadow_bri),
/* K7 */ be_nested_str_weak(set),
/* K8 */ be_nested_str_weak(U1),
/* K9 */ be_nested_str_weak(NULL),
/* K10 */ be_const_int(2),
/* K11 */ be_const_int(3),
/* K12 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(const binstruction[79]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140502, // 0002 GETMBR R5 R2 K2
0x88180503, // 0003 GETMBR R6 R2 K3
0x541E0007, // 0004 LDINT R7 8
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E003E, // 0006 JMPF R7 #0046
0x8C1C0104, // 0007 GETMET R7 R0 K4
0x7C1C0200, // 0008 CALL R7 1
0x1C1C0D05, // 0009 EQ R7 R6 K5
0x781E000F, // 000A JMPF R7 #001B
0x881C0106, // 000B GETMBR R7 R0 K6
0x4C200000, // 000C LDNIL R8
0x201C0E08, // 000D NE R7 R7 R8
0x781E0005, // 000E JMPF R7 #0015
0x8C1C0707, // 000F GETMET R7 R3 K7
0x88240908, // 0010 GETMBR R9 R4 K8
0x88280106, // 0011 GETMBR R10 R0 K6
0x7C1C0600, // 0012 CALL R7 3
0x80040E00, // 0013 RET 1 R7
0x70020004, // 0014 JMP #001A
0x8C1C0707, // 0015 GETMET R7 R3 K7
0x88240909, // 0016 GETMBR R9 R4 K9
0x4C280000, // 0017 LDNIL R10
0x7C1C0600, // 0018 CALL R7 3
0x80040E00, // 0019 RET 1 R7
0x7002002A, // 001A JMP #0046
0x1C1C0D0A, // 001B EQ R7 R6 K10
0x781E0005, // 001C JMPF R7 #0023
0x8C1C0707, // 001D GETMET R7 R3 K7
0x88240908, // 001E GETMBR R9 R4 K8
0x58280005, // 001F LDCONST R10 K5
0x7C1C0600, // 0020 CALL R7 3
0x80040E00, // 0021 RET 1 R7
0x70020022, // 0022 JMP #0046
0x1C1C0D0B, // 0023 EQ R7 R6 K11
0x781E0005, // 0024 JMPF R7 #002B
0x8C1C0707, // 0025 GETMET R7 R3 K7
0x88240908, // 0026 GETMBR R9 R4 K8
0x542A00FD, // 0027 LDINT R10 254
0x7C1C0600, // 0028 CALL R7 3
0x80040E00, // 0029 RET 1 R7
0x7002001A, // 002A JMP #0046
0x541E000E, // 002B LDINT R7 15
0x1C1C0C07, // 002C EQ R7 R6 R7
0x781E0005, // 002D JMPF R7 #0034
0x8C1C0707, // 002E GETMET R7 R3 K7
0x88240908, // 002F GETMBR R9 R4 K8
0x58280005, // 0030 LDCONST R10 K5
0x7C1C0600, // 0031 CALL R7 3
0x80040E00, // 0032 RET 1 R7
0x70020011, // 0033 JMP #0046
0x541E0010, // 0034 LDINT R7 17
0x1C1C0C07, // 0035 EQ R7 R6 R7
0x781E000E, // 0036 JMPF R7 #0046
0x881C0106, // 0037 GETMBR R7 R0 K6
0x4C200000, // 0038 LDNIL R8
0x201C0E08, // 0039 NE R7 R7 R8
0x781E0005, // 003A JMPF R7 #0041
0x8C1C0707, // 003B GETMET R7 R3 K7
0x88240908, // 003C GETMBR R9 R4 K8
0x88280106, // 003D GETMBR R10 R0 K6
0x7C1C0600, // 003E CALL R7 3
0x80040E00, // 003F RET 1 R7
0x70020004, // 0040 JMP #0046
0x8C1C0707, // 0041 GETMET R7 R3 K7
0x88240909, // 0042 GETMBR R9 R4 K9
0x4C280000, // 0043 LDNIL R10
0x7C1C0600, // 0044 CALL R7 3
0x80040E00, // 0045 RET 1 R7
0x601C0003, // 0046 GETGBL R7 G3
0x5C200000, // 0047 MOVE R8 R0
0x7C1C0200, // 0048 CALL R7 1
0x8C1C0F0C, // 0049 GETMET R7 R7 K12
0x5C240200, // 004A MOVE R9 R1
0x5C280400, // 004B MOVE R10 R2
0x5C2C0600, // 004C MOVE R11 R3
0x7C1C0800, // 004D CALL R7 4
0x80040E00, // 004E RET 1 R7
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_web_values, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s_X20_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(web_value_dimmer),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x8C1C0106, // 0009 GETMET R7 R0 K6
0x7C1C0200, // 000A CALL R7 1
0x7C100600, // 000B CALL R4 3
0x7C080400, // 000C CALL R2 2
0x80000000, // 000D RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_bri
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_set_bri, /* name */
be_nested_proto(
9, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(scale_uint),
/* K2 */ be_const_int(0),
/* K3 */ be_nested_str_weak(call_remote_sync),
/* K4 */ be_nested_str_weak(Dimmer),
/* K5 */ be_nested_str_weak(parse_update),
}),
be_str_weak(set_bri),
&be_const_str_solidified,
( &(const binstruction[22]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x5C100200, // 0002 MOVE R4 R1
0x58140002, // 0003 LDCONST R5 K2
0x541A00FD, // 0004 LDINT R6 254
0x581C0002, // 0005 LDCONST R7 K2
0x54220063, // 0006 LDINT R8 100
0x7C080C00, // 0007 CALL R2 6
0x8C0C0103, // 0008 GETMET R3 R0 K3
0x58140004, // 0009 LDCONST R5 K4
0x60180008, // 000A GETGBL R6 G8
0x5C1C0400, // 000B MOVE R7 R2
0x7C180200, // 000C CALL R6 1
0x7C0C0600, // 000D CALL R3 3
0x4C100000, // 000E LDNIL R4
0x20100604, // 000F NE R4 R3 R4
0x78120003, // 0010 JMPF R4 #0015
0x8C100105, // 0011 GETMET R4 R0 K5
0x5C180600, // 0012 MOVE R6 R3
0x541E000A, // 0013 LDINT R7 11
0x7C100600, // 0014 CALL R4 3
0x80000000, // 0015 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_parse_update, /* name */
be_nested_proto(
11, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(parse_update),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(Dimmer),
/* K3 */ be_nested_str_weak(tasmota),
/* K4 */ be_nested_str_weak(scale_uint),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(shadow_bri),
/* K7 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
0x540E000A, // 0007 LDINT R3 11
0x1C0C0403, // 0008 EQ R3 R2 R3
0x780E0017, // 0009 JMPF R3 #0022
0x600C0009, // 000A GETGBL R3 G9
0x8C100301, // 000B GETMET R4 R1 K1
0x58180002, // 000C LDCONST R6 K2
0x7C100400, // 000D CALL R4 2
0x7C0C0200, // 000E CALL R3 1
0x4C100000, // 000F LDNIL R4
0x20100604, // 0010 NE R4 R3 R4
0x7812000F, // 0011 JMPF R4 #0022
0xB8120600, // 0012 GETNGBL R4 K3
0x8C100904, // 0013 GETMET R4 R4 K4
0x5C180600, // 0014 MOVE R6 R3
0x581C0005, // 0015 LDCONST R7 K5
0x54220063, // 0016 LDINT R8 100
0x58240005, // 0017 LDCONST R9 K5
0x542A00FD, // 0018 LDINT R10 254
0x7C100C00, // 0019 CALL R4 6
0x88140106, // 001A GETMBR R5 R0 K6
0x20140805, // 001B NE R5 R4 R5
0x78160004, // 001C JMPF R5 #0022
0x8C140107, // 001D GETMET R5 R0 K7
0x541E0007, // 001E LDINT R7 8
0x58200005, // 001F LDCONST R8 K5
0x7C140600, // 0020 CALL R5 3
0x90020C04, // 0021 SETMBR R0 K6 R4
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_dimmer
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_closure(class_Matter_Plugin_Bridge_Light1_web_value_dimmer, /* name */
be_nested_proto(
9, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light1,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(),
/* K1 */ be_nested_str_weak(shadow_bri),
/* K2 */ be_nested_str_weak(tasmota),
/* K3 */ be_nested_str_weak(scale_uint),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(_X25i_X25_X25),
/* K6 */ be_nested_str_weak(_X26_X23128261_X3B_X20),
}),
be_str_weak(web_value_dimmer),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x58040000, // 0000 LDCONST R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x4C0C0000, // 0002 LDNIL R3
0x20080403, // 0003 NE R2 R2 R3
0x780A000C, // 0004 JMPF R2 #0012
0xB80A0400, // 0005 GETNGBL R2 K2
0x8C080503, // 0006 GETMET R2 R2 K3
0x88100101, // 0007 GETMBR R4 R0 K1
0x58140004, // 0008 LDCONST R5 K4
0x541A00FD, // 0009 LDINT R6 254
0x581C0004, // 000A LDCONST R7 K4
0x54220063, // 000B LDINT R8 100
0x7C080C00, // 000C CALL R2 6
0x600C0018, // 000D GETGBL R3 G24
0x58100005, // 000E LDCONST R4 K5
0x5C140400, // 000F MOVE R5 R2
0x7C0C0400, // 0010 CALL R3 2
0x5C040600, // 0011 MOVE R1 R3
0x000A0C01, // 0012 ADD R2 K6 R1
0x80040400, // 0013 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light1
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
be_local_class(Matter_Plugin_Bridge_Light1,
1,
&be_class_Matter_Plugin_Bridge_Light0,
be_nested_map(11,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(web_value_dimmer, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_web_value_dimmer_closure) },
{ be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_parse_update_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light1) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_read_attribute_closure) },
{ be_const_key_weak(TYPES, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(257, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(shadow_bri, -1), be_const_var(0) },
{ be_const_key_weak(CLUSTERS, 5), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(29, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(8, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(2),
be_const_int(3),
be_const_int(15),
be_const_int(17),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(set_bri, -1), be_const_closure(class_Matter_Plugin_Bridge_Light1_set_bri_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X201_X20Dimmer) },
{ be_const_key_weak(web_values, 1), be_const_closure(class_Matter_Plugin_Bridge_Light1_web_values_closure) },
{ be_const_key_weak(invoke_request, 0), be_const_closure(class_Matter_Plugin_Bridge_Light1_invoke_request_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light1)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,229 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Sensor_Flow.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Flow,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0004, // 0002 JMPF R2 #0008
0x60080009, // 0003 GETGBL R2 G9
0x540E0009, // 0004 LDINT R3 10
0x080C0203, // 0005 MUL R3 R1 R3
0x7C080200, // 0006 CALL R2 1
0x70020000, // 0007 JMP #0009
0x4C080000, // 0008 LDNIL R2
0x80040400, // 0009 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Flow,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0403, // 0001 LDINT R3 1028
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Flow'
extern bclosure *class_Matter_Plugin_Sensor_Flow_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Flow;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Flow_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Flow,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20m3_X2Fh),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Flow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_class(Matter_Plugin_Bridge_Sensor_Flow,
0,
&be_class_Matter_Plugin_Bridge_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_web_values_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(774, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 7), be_const_static_closure(class_Matter_Plugin_Sensor_Flow_read_attribute_closure) },
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Flow_value_changed_closure) },
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Flow) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_flow) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1028, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Flow)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,237 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Sensor_Humidity.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Humidity,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[10]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0004, // 0002 JMPF R2 #0008
0x60080009, // 0003 GETGBL R2 G9
0x540E0063, // 0004 LDINT R3 100
0x080C0203, // 0005 MUL R3 R1 R3
0x7C080200, // 0006 CALL R2 1
0x70020000, // 0007 JMP #0009
0x4C080000, // 0008 LDNIL R2
0x80040400, // 0009 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Humidity,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0404, // 0001 LDINT R3 1029
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Humidity'
extern bclosure *class_Matter_Plugin_Sensor_Humidity_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Humidity;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Humidity,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x1F4A7_X3B_X20_X252_X2E0f_X25_X25),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x4C1C0000, // 0007 LDNIL R7
0x20180C07, // 0008 NE R6 R6 R7
0x781A0005, // 0009 JMPF R6 #0010
0x6018000A, // 000A GETGBL R6 G10
0x881C0104, // 000B GETMBR R7 R0 K4
0x7C180200, // 000C CALL R6 1
0x541E0063, // 000D LDINT R7 100
0x0C180C07, // 000E DIV R6 R6 R7
0x70020000, // 000F JMP #0011
0x4C180000, // 0010 LDNIL R6
0x7C100400, // 0011 CALL R4 2
0x7C080400, // 0012 CALL R2 2
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Humidity
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_class(Matter_Plugin_Bridge_Sensor_Humidity,
0,
&be_class_Matter_Plugin_Bridge_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_web_values_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(775, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Humidity_read_attribute_closure) },
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Humidity_value_changed_closure) },
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Humidity) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_humidity) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1029, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Humidity)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,241 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Sensor_Illuminance.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_pre_value, /* name */
be_nested_proto(
6, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Illuminance,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(math),
/* K1 */ be_const_int(0),
/* K2 */ be_nested_str_weak(log10),
/* K3 */ be_const_int(1),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[17]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x1C080202, // 0001 EQ R2 R1 R2
0x780A0001, // 0002 JMPF R2 #0005
0x4C080000, // 0003 LDNIL R2
0x80040400, // 0004 RET 1 R2
0xA40A0000, // 0005 IMPORT R2 K0
0x140C0301, // 0006 LT R3 R1 K1
0x780E0001, // 0007 JMPF R3 #000A
0x80060200, // 0008 RET 1 K1
0x70020005, // 0009 JMP #0010
0x8C0C0502, // 000A GETMET R3 R2 K2
0x00140303, // 000B ADD R5 R1 K3
0x7C0C0400, // 000C CALL R3 2
0x5412270F, // 000D LDINT R4 10000
0x080C0604, // 000E MUL R3 R3 R4
0x80040600, // 000F RET 1 R3
0x80000000, // 0010 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Illuminance,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E03FF, // 0001 LDINT R3 1024
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Illuminance'
extern bclosure *class_Matter_Plugin_Sensor_Illuminance_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Illuminance;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Illuminance,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23128261_X3B_X20_X25ilux),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Illuminance
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_class(Matter_Plugin_Bridge_Sensor_Illuminance,
0,
&be_class_Matter_Plugin_Bridge_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_web_values_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(262, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Illuminance_read_attribute_closure) },
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Illuminance_value_changed_closure) },
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Illuminance) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_illuminance) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1024, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Illuminance)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,228 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Sensor_Pressure.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Pressure,
0, /* has constants */
NULL, /* no const */
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x4C080000, // 0000 LDNIL R2
0x20080202, // 0001 NE R2 R1 R2
0x780A0003, // 0002 JMPF R2 #0007
0x60080009, // 0003 GETGBL R2 G9
0x5C0C0200, // 0004 MOVE R3 R1
0x7C080200, // 0005 CALL R2 1
0x70020000, // 0006 JMP #0008
0x4C080000, // 0007 LDNIL R2
0x80040400, // 0008 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Pressure,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0402, // 0001 LDINT R3 1027
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Pressure'
extern bclosure *class_Matter_Plugin_Sensor_Pressure_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Pressure;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Pressure,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x26C5_X3B_X20_X25i_X20hPa),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[12]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x60180009, // 0006 GETGBL R6 G9
0x881C0104, // 0007 GETMBR R7 R0 K4
0x7C180200, // 0008 CALL R6 1
0x7C100400, // 0009 CALL R4 2
0x7C080400, // 000A CALL R2 2
0x80000000, // 000B RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Pressure
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_class(Matter_Plugin_Bridge_Sensor_Pressure,
0,
&be_class_Matter_Plugin_Bridge_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_web_values_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(773, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Pressure_read_attribute_closure) },
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Pressure_value_changed_closure) },
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Pressure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_pressure) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(1027, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 0), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Pressure)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,249 +0,0 @@
/* Solidification of Matter_Plugin_4_Bridge_Sensor_Temp.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp;
/********************************************************************
** Solidified function: pre_value
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_pre_value, /* name */
be_nested_proto(
4, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Temp,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(temp_unit),
/* K1 */ be_nested_str_weak(TEMP_F),
/* K2 */ be_const_real_hex(0x3FE66666),
}),
be_str_weak(pre_value),
&be_const_str_solidified,
( &(const binstruction[18]) { /* code */
0x88080100, // 0000 GETMBR R2 R0 K0
0x880C0101, // 0001 GETMBR R3 R0 K1
0x1C080403, // 0002 EQ R2 R2 R3
0x780A0003, // 0003 JMPF R2 #0008
0x540A001F, // 0004 LDINT R2 32
0x04080202, // 0005 SUB R2 R1 R2
0x0C080502, // 0006 DIV R2 R2 K2
0x5C040400, // 0007 MOVE R1 R2
0x4C080000, // 0008 LDNIL R2
0x20080202, // 0009 NE R2 R1 R2
0x780A0004, // 000A JMPF R2 #0010
0x60080009, // 000B GETGBL R2 G9
0x540E0063, // 000C LDINT R3 100
0x080C0203, // 000D MUL R3 R1 R3
0x7C080200, // 000E CALL R2 1
0x70020000, // 000F JMP #0011
0x4C080000, // 0010 LDNIL R2
0x80040400, // 0011 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: value_changed
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Temp,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_changed),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0401, // 0001 LDINT R3 1026
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Temp'
extern bclosure *class_Matter_Plugin_Sensor_Temp_read_attribute;
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Temp;
be_local_closure(class_Matter_Plugin_Bridge_Sensor_Temp_web_values, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Sensor_Temp,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X26_X23x2600_X3B_X26_X23xFE0F_X3B_X20_X25_X2E1f_X20_XC2_XB0C),
/* K4 */ be_nested_str_weak(shadow_value),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x88180104, // 0006 GETMBR R6 R0 K4
0x4C1C0000, // 0007 LDNIL R7
0x20180C07, // 0008 NE R6 R6 R7
0x781A0005, // 0009 JMPF R6 #0010
0x6018000A, // 000A GETGBL R6 G10
0x881C0104, // 000B GETMBR R7 R0 K4
0x7C180200, // 000C CALL R6 1
0x541E0063, // 000D LDINT R7 100
0x0C180C07, // 000E DIV R6 R6 R7
0x70020000, // 000F JMP #0011
0x4C180000, // 0010 LDNIL R6
0x7C100400, // 0011 CALL R4 2
0x7C080400, // 0012 CALL R2 2
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Temp
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Sensor;
be_local_class(Matter_Plugin_Bridge_Sensor_Temp,
0,
&be_class_Matter_Plugin_Bridge_Sensor,
be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(pre_value, 1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_pre_value_closure) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_web_values_closure) },
{ be_const_key_weak(TYPES, 3), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(770, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(read_attribute, 7), be_const_closure(class_Matter_Plugin_Sensor_Temp_read_attribute_closure) },
{ be_const_key_weak(value_changed, 6), be_const_closure(class_Matter_Plugin_Bridge_Sensor_Temp_value_changed_closure) },
{ be_const_key_weak(DISPLAY_NAME, 4), be_nested_str_weak(Temperature) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_temperature) },
{ be_const_key_weak(CLUSTERS, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(6,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(1026, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(9,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, 1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Temp)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,550 +0,0 @@
/* Solidification of Matter_Plugin_5_Bridge_Light2.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(update_ct_minmax),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x8C100101, // 0008 GETMET R4 R0 K1
0x7C100200, // 0009 CALL R4 1
0x80000000, // 000A RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_parse_update, /* name */
be_nested_proto(
8, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 7]) { /* constants */
/* K0 */ be_nested_str_weak(parse_update),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(CT),
/* K3 */ be_nested_str_weak(shadow_ct),
/* K4 */ be_nested_str_weak(ct_min),
/* K5 */ be_nested_str_weak(ct_max),
/* K6 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[35]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
0x540E000A, // 0007 LDINT R3 11
0x1C0C0403, // 0008 EQ R3 R2 R3
0x780E0017, // 0009 JMPF R3 #0022
0x600C0009, // 000A GETGBL R3 G9
0x8C100301, // 000B GETMET R4 R1 K1
0x58180002, // 000C LDCONST R6 K2
0x7C100400, // 000D CALL R4 2
0x7C0C0200, // 000E CALL R3 1
0x4C100000, // 000F LDNIL R4
0x20100604, // 0010 NE R4 R3 R4
0x7812000F, // 0011 JMPF R4 #0022
0x88100103, // 0012 GETMBR R4 R0 K3
0x20100604, // 0013 NE R4 R3 R4
0x7812000C, // 0014 JMPF R4 #0022
0x88100104, // 0015 GETMBR R4 R0 K4
0x14100604, // 0016 LT R4 R3 R4
0x78120000, // 0017 JMPF R4 #0019
0x880C0104, // 0018 GETMBR R3 R0 K4
0x88100105, // 0019 GETMBR R4 R0 K5
0x24100604, // 001A GT R4 R3 R4
0x78120000, // 001B JMPF R4 #001D
0x880C0105, // 001C GETMBR R3 R0 K5
0x8C100106, // 001D GETMET R4 R0 K6
0x541A02FF, // 001E LDINT R6 768
0x541E0006, // 001F LDINT R7 7
0x7C100600, // 0020 CALL R4 3
0x90020603, // 0021 SETMBR R0 K3 R3
0x80000000, // 0022 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(web_value_dimmer),
/* K7 */ be_nested_str_weak(web_value_ct),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x8C1C0106, // 0009 GETMET R7 R0 K6
0x7C1C0200, // 000A CALL R7 1
0x8C200107, // 000B GETMET R8 R0 K7
0x7C200200, // 000C CALL R8 1
0x7C100800, // 000D CALL R4 4
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_ct
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_web_value_ct, /* name */
be_nested_proto(
6, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(),
/* K1 */ be_nested_str_weak(shadow_ct),
/* K2 */ be_const_int(1000000),
/* K3 */ be_nested_str_weak(_X25iK),
/* K4 */ be_nested_str_weak(_X26_X239898_X3B_X20),
}),
be_str_weak(web_value_ct),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0x58040000, // 0000 LDCONST R1 K0
0x88080101, // 0001 GETMBR R2 R0 K1
0x4C0C0000, // 0002 LDNIL R3
0x20080403, // 0003 NE R2 R2 R3
0x780A000C, // 0004 JMPF R2 #0012
0x88080101, // 0005 GETMBR R2 R0 K1
0x0C0A0402, // 0006 DIV R2 K2 R2
0x540E0018, // 0007 LDINT R3 25
0x00080403, // 0008 ADD R2 R2 R3
0x540E0031, // 0009 LDINT R3 50
0x0C080403, // 000A DIV R2 R2 R3
0x540E0031, // 000B LDINT R3 50
0x08080403, // 000C MUL R2 R2 R3
0x600C0018, // 000D GETGBL R3 G24
0x58100003, // 000E LDCONST R4 K3
0x5C140400, // 000F MOVE R5 R2
0x7C0C0400, // 0010 CALL R3 2
0x5C040600, // 0011 MOVE R1 R3
0x000A0801, // 0012 ADD R2 K4 R1
0x80040400, // 0013 RET 1 R2
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_ct
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_set_ct, /* name */
be_nested_proto(
7, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 3]) { /* constants */
/* K0 */ be_nested_str_weak(call_remote_sync),
/* K1 */ be_nested_str_weak(CT),
/* K2 */ be_nested_str_weak(parse_update),
}),
be_str_weak(set_ct),
&be_const_str_solidified,
( &(const binstruction[14]) { /* code */
0x8C080100, // 0000 GETMET R2 R0 K0
0x58100001, // 0001 LDCONST R4 K1
0x60140008, // 0002 GETGBL R5 G8
0x5C180200, // 0003 MOVE R6 R1
0x7C140200, // 0004 CALL R5 1
0x7C080600, // 0005 CALL R2 3
0x4C0C0000, // 0006 LDNIL R3
0x200C0403, // 0007 NE R3 R2 R3
0x780E0003, // 0008 JMPF R3 #000D
0x8C0C0102, // 0009 GETMET R3 R0 K2
0x5C140400, // 000A MOVE R5 R2
0x541A000A, // 000B LDINT R6 11
0x7C0C0600, // 000C CALL R3 3
0x80000000, // 000D RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_invoke_request, /* name */
be_nested_proto(
12, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[14]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_nested_str_weak(findsubval),
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(ct_min),
/* K7 */ be_nested_str_weak(ct_max),
/* K8 */ be_nested_str_weak(set_ct),
/* K9 */ be_nested_str_weak(log),
/* K10 */ be_nested_str_weak(ct_X3A),
/* K11 */ be_nested_str_weak(publish_command),
/* K12 */ be_nested_str_weak(CT),
/* K13 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[64]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x541E02FF, // 0004 LDINT R7 768
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E002E, // 0006 JMPF R7 #0036
0x541E0009, // 0007 LDINT R7 10
0x1C1C0C07, // 0008 EQ R7 R6 R7
0x781E0019, // 0009 JMPF R7 #0024
0x8C1C0504, // 000A GETMET R7 R2 K4
0x58240005, // 000B LDCONST R9 K5
0x7C1C0400, // 000C CALL R7 2
0x88200106, // 000D GETMBR R8 R0 K6
0x14200E08, // 000E LT R8 R7 R8
0x78220000, // 000F JMPF R8 #0011
0x881C0106, // 0010 GETMBR R7 R0 K6
0x88200107, // 0011 GETMBR R8 R0 K7
0x24200E08, // 0012 GT R8 R7 R8
0x78220000, // 0013 JMPF R8 #0015
0x881C0107, // 0014 GETMBR R7 R0 K7
0x8C200108, // 0015 GETMET R8 R0 K8
0x5C280E00, // 0016 MOVE R10 R7
0x7C200400, // 0017 CALL R8 2
0x60200008, // 0018 GETGBL R8 G8
0x5C240E00, // 0019 MOVE R9 R7
0x7C200200, // 001A CALL R8 1
0x00221408, // 001B ADD R8 K10 R8
0x900E1208, // 001C SETMBR R3 K9 R8
0x8C20010B, // 001D GETMET R8 R0 K11
0x5828000C, // 001E LDCONST R10 K12
0x5C2C0E00, // 001F MOVE R11 R7
0x7C200600, // 0020 CALL R8 3
0x50200200, // 0021 LDBOOL R8 1 0
0x80041000, // 0022 RET 1 R8
0x70020010, // 0023 JMP #0035
0x541E0046, // 0024 LDINT R7 71
0x1C1C0C07, // 0025 EQ R7 R6 R7
0x781E0002, // 0026 JMPF R7 #002A
0x501C0200, // 0027 LDBOOL R7 1 0
0x80040E00, // 0028 RET 1 R7
0x7002000A, // 0029 JMP #0035
0x541E004A, // 002A LDINT R7 75
0x1C1C0C07, // 002B EQ R7 R6 R7
0x781E0002, // 002C JMPF R7 #0030
0x501C0200, // 002D LDBOOL R7 1 0
0x80040E00, // 002E RET 1 R7
0x70020004, // 002F JMP #0035
0x541E004B, // 0030 LDINT R7 76
0x1C1C0C07, // 0031 EQ R7 R6 R7
0x781E0001, // 0032 JMPF R7 #0035
0x501C0200, // 0033 LDBOOL R7 1 0
0x80040E00, // 0034 RET 1 R7
0x70020008, // 0035 JMP #003F
0x601C0003, // 0036 GETGBL R7 G3
0x5C200000, // 0037 MOVE R8 R0
0x7C1C0200, // 0038 CALL R7 1
0x8C1C0F0D, // 0039 GETMET R7 R7 K13
0x5C240200, // 003A MOVE R9 R1
0x5C280400, // 003B MOVE R10 R2
0x5C2C0600, // 003C MOVE R11 R3
0x7C1C0800, // 003D CALL R7 4
0x80040E00, // 003E RET 1 R7
0x80000000, // 003F RET 0
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light2'
extern bclosure *class_Matter_Plugin_Light2_read_attribute;
/********************************************************************
** Solidified function: update_ct_minmax
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
be_local_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax, /* name */
be_nested_proto(
4, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light2,
1, /* has constants */
( &(const bvalue[ 4]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(get_option),
/* K2 */ be_nested_str_weak(ct_min),
/* K3 */ be_nested_str_weak(ct_max),
}),
be_str_weak(update_ct_minmax),
&be_const_str_solidified,
( &(const binstruction[15]) { /* code */
0xB8060000, // 0000 GETNGBL R1 K0
0x8C040301, // 0001 GETMET R1 R1 K1
0x540E0051, // 0002 LDINT R3 82
0x7C040400, // 0003 CALL R1 2
0x78060001, // 0004 JMPF R1 #0007
0x540A00C7, // 0005 LDINT R2 200
0x70020000, // 0006 JMP #0008
0x540A0098, // 0007 LDINT R2 153
0x90020402, // 0008 SETMBR R0 K2 R2
0x78060001, // 0009 JMPF R1 #000C
0x540A017B, // 000A LDINT R2 380
0x70020000, // 000B JMP #000D
0x540A01F3, // 000C LDINT R2 500
0x90020602, // 000D SETMBR R0 K3 R2
0x80000000, // 000E RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light2
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_class(Matter_Plugin_Bridge_Light2,
3,
&be_class_Matter_Plugin_Bridge_Light1,
be_nested_map(15,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(init, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_init_closure) },
{ be_const_key_weak(parse_update, 9), be_const_closure(class_Matter_Plugin_Bridge_Light2_parse_update_closure) },
{ be_const_key_weak(web_values, 11), be_const_closure(class_Matter_Plugin_Bridge_Light2_web_values_closure) },
{ be_const_key_weak(ct_max, -1), be_const_var(2) },
{ be_const_key_weak(CLUSTERS, 14), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(2),
be_const_int(3),
be_const_int(15),
be_const_int(17),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(7),
be_const_int(8),
be_const_int(15),
be_const_int(16394),
be_const_int(16395),
be_const_int(16396),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(268, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(web_value_ct, 8), be_const_closure(class_Matter_Plugin_Bridge_Light2_web_value_ct_closure) },
{ be_const_key_weak(set_ct, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_set_ct_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X202_X20CT) },
{ be_const_key_weak(shadow_ct, -1), be_const_var(0) },
{ be_const_key_weak(update_ct_minmax, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_update_ct_minmax_closure) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light2_invoke_request_closure) },
{ be_const_key_weak(read_attribute, 10), be_const_closure(class_Matter_Plugin_Light2_read_attribute_closure) },
{ be_const_key_weak(ct_min, -1), be_const_var(1) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light2) },
})),
be_str_weak(Matter_Plugin_Bridge_Light2)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,699 +0,0 @@
/* Solidification of Matter_Plugin_5_Bridge_Light3.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
/********************************************************************
** Solidified function: set_sat
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_set_sat, /* name */
be_nested_proto(
9, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(scale_uint),
/* K2 */ be_const_int(0),
/* K3 */ be_nested_str_weak(call_remote_sync),
/* K4 */ be_nested_str_weak(HSBColor2),
/* K5 */ be_nested_str_weak(parse_update),
}),
be_str_weak(set_sat),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x5C100200, // 0002 MOVE R4 R1
0x58140002, // 0003 LDCONST R5 K2
0x541A00FD, // 0004 LDINT R6 254
0x581C0002, // 0005 LDCONST R7 K2
0x54220063, // 0006 LDINT R8 100
0x7C080C00, // 0007 CALL R2 6
0x8C0C0103, // 0008 GETMET R3 R0 K3
0x58140004, // 0009 LDCONST R5 K4
0x5C180400, // 000A MOVE R6 R2
0x7C0C0600, // 000B CALL R3 3
0x4C100000, // 000C LDNIL R4
0x20100604, // 000D NE R4 R3 R4
0x78120003, // 000E JMPF R4 #0013
0x8C100105, // 000F GETMET R4 R0 K5
0x5C180600, // 0010 MOVE R6 R3
0x541E000A, // 0011 LDINT R7 11
0x7C100600, // 0012 CALL R4 3
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: parse_update
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_parse_update, /* name */
be_nested_proto(
15, /* nstack */
3, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[13]) { /* constants */
/* K0 */ be_nested_str_weak(parse_update),
/* K1 */ be_nested_str_weak(find),
/* K2 */ be_nested_str_weak(HSBColor),
/* K3 */ be_nested_str_weak(string),
/* K4 */ be_nested_str_weak(split),
/* K5 */ be_nested_str_weak(_X2C),
/* K6 */ be_const_int(0),
/* K7 */ be_const_int(1),
/* K8 */ be_nested_str_weak(tasmota),
/* K9 */ be_nested_str_weak(scale_uint),
/* K10 */ be_nested_str_weak(shadow_hue),
/* K11 */ be_nested_str_weak(shadow_sat),
/* K12 */ be_nested_str_weak(attribute_updated),
}),
be_str_weak(parse_update),
&be_const_str_solidified,
( &(const binstruction[70]) { /* code */
0x600C0003, // 0000 GETGBL R3 G3
0x5C100000, // 0001 MOVE R4 R0
0x7C0C0200, // 0002 CALL R3 1
0x8C0C0700, // 0003 GETMET R3 R3 K0
0x5C140200, // 0004 MOVE R5 R1
0x5C180400, // 0005 MOVE R6 R2
0x7C0C0600, // 0006 CALL R3 3
0x540E000A, // 0007 LDINT R3 11
0x1C0C0403, // 0008 EQ R3 R2 R3
0x780E003A, // 0009 JMPF R3 #0045
0x8C0C0301, // 000A GETMET R3 R1 K1
0x58140002, // 000B LDCONST R5 K2
0x7C0C0400, // 000C CALL R3 2
0x780E0036, // 000D JMPF R3 #0045
0xA4120600, // 000E IMPORT R4 K3
0x8C140904, // 000F GETMET R5 R4 K4
0x5C1C0600, // 0010 MOVE R7 R3
0x58200005, // 0011 LDCONST R8 K5
0x7C140600, // 0012 CALL R5 3
0x60180009, // 0013 GETGBL R6 G9
0x941C0B06, // 0014 GETIDX R7 R5 K6
0x7C180200, // 0015 CALL R6 1
0x601C0009, // 0016 GETGBL R7 G9
0x94200B07, // 0017 GETIDX R8 R5 K7
0x7C1C0200, // 0018 CALL R7 1
0x4C200000, // 0019 LDNIL R8
0x20200C08, // 001A NE R8 R6 R8
0x78220009, // 001B JMPF R8 #0026
0xB8221000, // 001C GETNGBL R8 K8
0x8C201109, // 001D GETMET R8 R8 K9
0x5C280C00, // 001E MOVE R10 R6
0x582C0006, // 001F LDCONST R11 K6
0x54320167, // 0020 LDINT R12 360
0x58340006, // 0021 LDCONST R13 K6
0x543A00FD, // 0022 LDINT R14 254
0x7C200C00, // 0023 CALL R8 6
0x5C181000, // 0024 MOVE R6 R8
0x70020000, // 0025 JMP #0027
0x8818010A, // 0026 GETMBR R6 R0 K10
0x4C200000, // 0027 LDNIL R8
0x20200E08, // 0028 NE R8 R7 R8
0x78220009, // 0029 JMPF R8 #0034
0xB8221000, // 002A GETNGBL R8 K8
0x8C201109, // 002B GETMET R8 R8 K9
0x5C280E00, // 002C MOVE R10 R7
0x582C0006, // 002D LDCONST R11 K6
0x54320063, // 002E LDINT R12 100
0x58340006, // 002F LDCONST R13 K6
0x543A00FD, // 0030 LDINT R14 254
0x7C200C00, // 0031 CALL R8 6
0x5C1C1000, // 0032 MOVE R7 R8
0x70020000, // 0033 JMP #0035
0x881C010B, // 0034 GETMBR R7 R0 K11
0x8820010A, // 0035 GETMBR R8 R0 K10
0x20200C08, // 0036 NE R8 R6 R8
0x78220004, // 0037 JMPF R8 #003D
0x8C20010C, // 0038 GETMET R8 R0 K12
0x542A02FF, // 0039 LDINT R10 768
0x582C0006, // 003A LDCONST R11 K6
0x7C200600, // 003B CALL R8 3
0x90021406, // 003C SETMBR R0 K10 R6
0x8820010B, // 003D GETMBR R8 R0 K11
0x20200E08, // 003E NE R8 R7 R8
0x78220004, // 003F JMPF R8 #0045
0x8C20010C, // 0040 GETMET R8 R0 K12
0x542A02FF, // 0041 LDINT R10 768
0x582C0007, // 0042 LDCONST R11 K7
0x7C200600, // 0043 CALL R8 3
0x90021607, // 0044 SETMBR R0 K11 R7
0x80000000, // 0045 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_web_values, /* name */
be_nested_proto(
10, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[ 8]) { /* constants */
/* K0 */ be_nested_str_weak(webserver),
/* K1 */ be_nested_str_weak(web_values_prefix),
/* K2 */ be_nested_str_weak(content_send),
/* K3 */ be_nested_str_weak(_X25s_X20_X25s_X20_X25s),
/* K4 */ be_nested_str_weak(web_value_onoff),
/* K5 */ be_nested_str_weak(shadow_onoff),
/* K6 */ be_nested_str_weak(web_value_dimmer),
/* K7 */ be_nested_str_weak(web_value_RGB),
}),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[16]) { /* code */
0xA4060000, // 0000 IMPORT R1 K0
0x8C080101, // 0001 GETMET R2 R0 K1
0x7C080200, // 0002 CALL R2 1
0x8C080302, // 0003 GETMET R2 R1 K2
0x60100018, // 0004 GETGBL R4 G24
0x58140003, // 0005 LDCONST R5 K3
0x8C180104, // 0006 GETMET R6 R0 K4
0x88200105, // 0007 GETMBR R8 R0 K5
0x7C180400, // 0008 CALL R6 2
0x8C1C0106, // 0009 GETMET R7 R0 K6
0x7C1C0200, // 000A CALL R7 1
0x8C200107, // 000B GETMET R8 R0 K7
0x7C200200, // 000C CALL R8 1
0x7C100800, // 000D CALL R4 4
0x7C080400, // 000E CALL R2 2
0x80000000, // 000F RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_value_RGB
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB, /* name */
be_nested_proto(
12, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[15]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_hue),
/* K1 */ be_nested_str_weak(shadow_sat),
/* K2 */ be_nested_str_weak(light_state),
/* K3 */ be_const_int(3),
/* K4 */ be_nested_str_weak(set_bri),
/* K5 */ be_nested_str_weak(set_huesat),
/* K6 */ be_nested_str_weak(tasmota),
/* K7 */ be_nested_str_weak(scale_uint),
/* K8 */ be_const_int(0),
/* K9 */ be_nested_str_weak(_X23_X2502X_X2502X_X2502X),
/* K10 */ be_nested_str_weak(r),
/* K11 */ be_nested_str_weak(g),
/* K12 */ be_nested_str_weak(b),
/* K13 */ be_nested_str_weak(_X3Ci_X20class_X3D_X22bxm_X22_X20style_X3D_X22_X2D_X2Dcl_X3A_X25s_X22_X3E_X3C_X2Fi_X3E_X25s),
/* K14 */ be_nested_str_weak(),
}),
be_str_weak(web_value_RGB),
&be_const_str_solidified,
( &(const binstruction[45]) { /* code */
0x88040100, // 0000 GETMBR R1 R0 K0
0x4C080000, // 0001 LDNIL R2
0x20040202, // 0002 NE R1 R1 R2
0x78060027, // 0003 JMPF R1 #002C
0x88040101, // 0004 GETMBR R1 R0 K1
0x4C080000, // 0005 LDNIL R2
0x20040202, // 0006 NE R1 R1 R2
0x78060023, // 0007 JMPF R1 #002C
0xB8060400, // 0008 GETNGBL R1 K2
0x58080003, // 0009 LDCONST R2 K3
0x7C040200, // 000A CALL R1 1
0x8C080304, // 000B GETMET R2 R1 K4
0x541200FE, // 000C LDINT R4 255
0x7C080400, // 000D CALL R2 2
0x8C080305, // 000E GETMET R2 R1 K5
0xB8120C00, // 000F GETNGBL R4 K6
0x8C100907, // 0010 GETMET R4 R4 K7
0x88180100, // 0011 GETMBR R6 R0 K0
0x581C0008, // 0012 LDCONST R7 K8
0x542200FD, // 0013 LDINT R8 254
0x58240008, // 0014 LDCONST R9 K8
0x542A0167, // 0015 LDINT R10 360
0x7C100C00, // 0016 CALL R4 6
0xB8160C00, // 0017 GETNGBL R5 K6
0x8C140B07, // 0018 GETMET R5 R5 K7
0x881C0101, // 0019 GETMBR R7 R0 K1
0x58200008, // 001A LDCONST R8 K8
0x542600FD, // 001B LDINT R9 254
0x58280008, // 001C LDCONST R10 K8
0x542E00FE, // 001D LDINT R11 255
0x7C140C00, // 001E CALL R5 6
0x7C080600, // 001F CALL R2 3
0x60080018, // 0020 GETGBL R2 G24
0x580C0009, // 0021 LDCONST R3 K9
0x8810030A, // 0022 GETMBR R4 R1 K10
0x8814030B, // 0023 GETMBR R5 R1 K11
0x8818030C, // 0024 GETMBR R6 R1 K12
0x7C080800, // 0025 CALL R2 4
0x600C0018, // 0026 GETGBL R3 G24
0x5810000D, // 0027 LDCONST R4 K13
0x5C140400, // 0028 MOVE R5 R2
0x5C180400, // 0029 MOVE R6 R2
0x7C0C0600, // 002A CALL R3 3
0x80040600, // 002B RET 1 R3
0x80061C00, // 002C RET 1 K14
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Light3'
extern bclosure *class_Matter_Plugin_Light3_read_attribute;
/********************************************************************
** Solidified function: invoke_request
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_invoke_request, /* name */
be_nested_proto(
15, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[19]) { /* constants */
/* K0 */ be_nested_str_weak(matter),
/* K1 */ be_nested_str_weak(TLV),
/* K2 */ be_nested_str_weak(cluster),
/* K3 */ be_nested_str_weak(command),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(findsubval),
/* K6 */ be_nested_str_weak(set_hue),
/* K7 */ be_nested_str_weak(log),
/* K8 */ be_nested_str_weak(hue_X3A),
/* K9 */ be_nested_str_weak(publish_command),
/* K10 */ be_nested_str_weak(Hue),
/* K11 */ be_const_int(1),
/* K12 */ be_const_int(2),
/* K13 */ be_const_int(3),
/* K14 */ be_nested_str_weak(set_sat),
/* K15 */ be_nested_str_weak(sat_X3A),
/* K16 */ be_nested_str_weak(Sat),
/* K17 */ be_nested_str_weak(_X20sat_X3A),
/* K18 */ be_nested_str_weak(invoke_request),
}),
be_str_weak(invoke_request),
&be_const_str_solidified,
( &(const binstruction[119]) { /* code */
0xB8120000, // 0000 GETNGBL R4 K0
0x88100901, // 0001 GETMBR R4 R4 K1
0x88140702, // 0002 GETMBR R5 R3 K2
0x88180703, // 0003 GETMBR R6 R3 K3
0x541E02FF, // 0004 LDINT R7 768
0x1C1C0A07, // 0005 EQ R7 R5 R7
0x781E0065, // 0006 JMPF R7 #006D
0x1C1C0D04, // 0007 EQ R7 R6 K4
0x781E0011, // 0008 JMPF R7 #001B
0x8C1C0505, // 0009 GETMET R7 R2 K5
0x58240004, // 000A LDCONST R9 K4
0x7C1C0400, // 000B CALL R7 2
0x8C200106, // 000C GETMET R8 R0 K6
0x5C280E00, // 000D MOVE R10 R7
0x7C200400, // 000E CALL R8 2
0x60200008, // 000F GETGBL R8 G8
0x5C240E00, // 0010 MOVE R9 R7
0x7C200200, // 0011 CALL R8 1
0x00221008, // 0012 ADD R8 K8 R8
0x900E0E08, // 0013 SETMBR R3 K7 R8
0x8C200109, // 0014 GETMET R8 R0 K9
0x5828000A, // 0015 LDCONST R10 K10
0x5C2C0E00, // 0016 MOVE R11 R7
0x7C200600, // 0017 CALL R8 3
0x50200200, // 0018 LDBOOL R8 1 0
0x80041000, // 0019 RET 1 R8
0x70020050, // 001A JMP #006C
0x1C1C0D0B, // 001B EQ R7 R6 K11
0x781E0002, // 001C JMPF R7 #0020
0x501C0200, // 001D LDBOOL R7 1 0
0x80040E00, // 001E RET 1 R7
0x7002004B, // 001F JMP #006C
0x1C1C0D0C, // 0020 EQ R7 R6 K12
0x781E0002, // 0021 JMPF R7 #0025
0x501C0200, // 0022 LDBOOL R7 1 0
0x80040E00, // 0023 RET 1 R7
0x70020046, // 0024 JMP #006C
0x1C1C0D0D, // 0025 EQ R7 R6 K13
0x781E0011, // 0026 JMPF R7 #0039
0x8C1C0505, // 0027 GETMET R7 R2 K5
0x58240004, // 0028 LDCONST R9 K4
0x7C1C0400, // 0029 CALL R7 2
0x8C20010E, // 002A GETMET R8 R0 K14
0x5C280E00, // 002B MOVE R10 R7
0x7C200400, // 002C CALL R8 2
0x60200008, // 002D GETGBL R8 G8
0x5C240E00, // 002E MOVE R9 R7
0x7C200200, // 002F CALL R8 1
0x00221E08, // 0030 ADD R8 K15 R8
0x900E0E08, // 0031 SETMBR R3 K7 R8
0x8C200109, // 0032 GETMET R8 R0 K9
0x58280010, // 0033 LDCONST R10 K16
0x5C2C0E00, // 0034 MOVE R11 R7
0x7C200600, // 0035 CALL R8 3
0x50200200, // 0036 LDBOOL R8 1 0
0x80041000, // 0037 RET 1 R8
0x70020032, // 0038 JMP #006C
0x541E0003, // 0039 LDINT R7 4
0x1C1C0C07, // 003A EQ R7 R6 R7
0x781E0002, // 003B JMPF R7 #003F
0x501C0200, // 003C LDBOOL R7 1 0
0x80040E00, // 003D RET 1 R7
0x7002002C, // 003E JMP #006C
0x541E0004, // 003F LDINT R7 5
0x1C1C0C07, // 0040 EQ R7 R6 R7
0x781E0002, // 0041 JMPF R7 #0045
0x501C0200, // 0042 LDBOOL R7 1 0
0x80040E00, // 0043 RET 1 R7
0x70020026, // 0044 JMP #006C
0x541E0005, // 0045 LDINT R7 6
0x1C1C0C07, // 0046 EQ R7 R6 R7
0x781E001E, // 0047 JMPF R7 #0067
0x8C1C0505, // 0048 GETMET R7 R2 K5
0x58240004, // 0049 LDCONST R9 K4
0x7C1C0400, // 004A CALL R7 2
0x8C200505, // 004B GETMET R8 R2 K5
0x5828000B, // 004C LDCONST R10 K11
0x7C200400, // 004D CALL R8 2
0x8C240106, // 004E GETMET R9 R0 K6
0x5C2C0E00, // 004F MOVE R11 R7
0x7C240400, // 0050 CALL R9 2
0x8C24010E, // 0051 GETMET R9 R0 K14
0x5C2C1000, // 0052 MOVE R11 R8
0x7C240400, // 0053 CALL R9 2
0x60240008, // 0054 GETGBL R9 G8
0x5C280E00, // 0055 MOVE R10 R7
0x7C240200, // 0056 CALL R9 1
0x00261009, // 0057 ADD R9 K8 R9
0x00241311, // 0058 ADD R9 R9 K17
0x60280008, // 0059 GETGBL R10 G8
0x5C2C1000, // 005A MOVE R11 R8
0x7C280200, // 005B CALL R10 1
0x0024120A, // 005C ADD R9 R9 R10
0x900E0E09, // 005D SETMBR R3 K7 R9
0x8C240109, // 005E GETMET R9 R0 K9
0x582C000A, // 005F LDCONST R11 K10
0x5C300E00, // 0060 MOVE R12 R7
0x58340010, // 0061 LDCONST R13 K16
0x5C381000, // 0062 MOVE R14 R8
0x7C240A00, // 0063 CALL R9 5
0x50240200, // 0064 LDBOOL R9 1 0
0x80041200, // 0065 RET 1 R9
0x70020004, // 0066 JMP #006C
0x541E0046, // 0067 LDINT R7 71
0x1C1C0C07, // 0068 EQ R7 R6 R7
0x781E0001, // 0069 JMPF R7 #006C
0x501C0200, // 006A LDBOOL R7 1 0
0x80040E00, // 006B RET 1 R7
0x70020008, // 006C JMP #0076
0x601C0003, // 006D GETGBL R7 G3
0x5C200000, // 006E MOVE R8 R0
0x7C1C0200, // 006F CALL R7 1
0x8C1C0F12, // 0070 GETMET R7 R7 K18
0x5C240200, // 0071 MOVE R9 R1
0x5C280400, // 0072 MOVE R10 R2
0x5C2C0600, // 0073 MOVE R11 R3
0x7C1C0800, // 0074 CALL R7 4
0x80040E00, // 0075 RET 1 R7
0x80000000, // 0076 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: set_hue
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_set_hue, /* name */
be_nested_proto(
9, /* nstack */
2, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(tasmota),
/* K1 */ be_nested_str_weak(scale_uint),
/* K2 */ be_const_int(0),
/* K3 */ be_nested_str_weak(call_remote_sync),
/* K4 */ be_nested_str_weak(HSBColor1),
/* K5 */ be_nested_str_weak(parse_update),
}),
be_str_weak(set_hue),
&be_const_str_solidified,
( &(const binstruction[20]) { /* code */
0xB80A0000, // 0000 GETNGBL R2 K0
0x8C080501, // 0001 GETMET R2 R2 K1
0x5C100200, // 0002 MOVE R4 R1
0x58140002, // 0003 LDCONST R5 K2
0x541A00FD, // 0004 LDINT R6 254
0x581C0002, // 0005 LDCONST R7 K2
0x54220167, // 0006 LDINT R8 360
0x7C080C00, // 0007 CALL R2 6
0x8C0C0103, // 0008 GETMET R3 R0 K3
0x58140004, // 0009 LDCONST R5 K4
0x5C180400, // 000A MOVE R6 R2
0x7C0C0600, // 000B CALL R3 3
0x4C100000, // 000C LDNIL R4
0x20100604, // 000D NE R4 R3 R4
0x78120003, // 000E JMPF R4 #0013
0x8C100105, // 000F GETMET R4 R0 K5
0x5C180600, // 0010 MOVE R6 R3
0x541E000A, // 0011 LDINT R7 11
0x7C100600, // 0012 CALL R4 3
0x80000000, // 0013 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
be_local_closure(class_Matter_Plugin_Bridge_Light3_init, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Bridge_Light3,
1, /* has constants */
( &(const bvalue[ 1]) { /* constants */
/* K0 */ be_nested_str_weak(init),
}),
be_str_weak(init),
&be_const_str_solidified,
( &(const binstruction[ 9]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x80000000, // 0008 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light3
********************************************************************/
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
be_local_class(Matter_Plugin_Bridge_Light3,
2,
&be_class_Matter_Plugin_Bridge_Light1,
be_nested_map(14,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(set_sat, 6), be_const_closure(class_Matter_Plugin_Bridge_Light3_set_sat_closure) },
{ be_const_key_weak(init, 8), be_const_closure(class_Matter_Plugin_Bridge_Light3_init_closure) },
{ be_const_key_weak(parse_update, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_parse_update_closure) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light3) },
{ be_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_web_values_closure) },
{ be_const_key_weak(web_value_RGB, 1), be_const_closure(class_Matter_Plugin_Bridge_Light3_web_value_RGB_closure) },
{ be_const_key_weak(CLUSTERS, 13), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(8,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(8, 7), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(11,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(2),
be_const_int(3),
be_const_int(15),
be_const_int(17),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(57, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(3),
be_const_int(5),
be_const_int(10),
be_const_int(15),
be_const_int(17),
be_const_int(18),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(29, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(10,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(3, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(8,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(4, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(5, 2), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(12,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(2),
be_const_int(3),
be_const_int(4),
be_const_int(5),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(7,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
{ be_const_key_int(768, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
be_const_list( * be_nested_list(13,
( (struct bvalue*) &(const bvalue[]) {
be_const_int(0),
be_const_int(1),
be_const_int(7),
be_const_int(8),
be_const_int(15),
be_const_int(16385),
be_const_int(16394),
be_const_int(65528),
be_const_int(65529),
be_const_int(65530),
be_const_int(65531),
be_const_int(65532),
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(invoke_request, -1), be_const_closure(class_Matter_Plugin_Bridge_Light3_invoke_request_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Light_X203_X20RGB) },
{ be_const_key_weak(set_hue, 11), be_const_closure(class_Matter_Plugin_Bridge_Light3_set_hue_closure) },
{ be_const_key_weak(shadow_hue, 9), be_const_var(0) },
{ be_const_key_weak(TYPES, 12), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(269, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(shadow_sat, -1), be_const_var(1) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Light3_read_attribute_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light3)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,25 @@
/* Solidification of Matter_Plugin_8_Bridge_Light0.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light0;
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light0
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light0;
be_local_class(Matter_Plugin_Bridge_Light0,
0,
&be_class_Matter_Plugin_Light0,
be_nested_map(3,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(3000) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_light0) },
{ be_const_key_weak(BRIDGE, -1), be_const_bool(1) },
})),
be_str_weak(Matter_Plugin_Bridge_Light0)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,54 @@
/* Solidification of Matter_Plugin_8_Bridge_Light1.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light1;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Light1__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light1
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light1;
be_local_class(Matter_Plugin_Bridge_Light1,
0,
&be_class_Matter_Plugin_Light1,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light1) },
{ be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) },
{ be_const_key_weak(BRIDGE, -1), be_const_bool(1) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light1__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light1)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,54 @@
/* Solidification of Matter_Plugin_8_Bridge_Light2.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light2;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Light2__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light2
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light2;
be_local_class(Matter_Plugin_Bridge_Light2,
0,
&be_class_Matter_Plugin_Light2,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light2) },
{ be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) },
{ be_const_key_weak(BRIDGE, -1), be_const_bool(1) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light2__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light2)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,54 @@
/* Solidification of Matter_Plugin_8_Bridge_Light3.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Light3;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Bridge_Light3__X3Clambda_X3E, /* name */
be_nested_proto(
3, /* nstack */
1, /* argc */
0, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
NULL,
0, /* has constants */
NULL, /* no const */
be_str_weak(_X3Clambda_X3E),
&be_const_str_solidified,
( &(const binstruction[ 4]) { /* code */
0x60040009, // 0000 GETGBL R1 G9
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x80040200, // 0003 RET 1 R1
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Light3
********************************************************************/
extern const bclass be_class_Matter_Plugin_Light3;
be_local_class(Matter_Plugin_Bridge_Light3,
0,
&be_class_Matter_Plugin_Light3,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(http_light3) },
{ be_const_key_weak(UPDATE_TIME, 2), be_const_int(3000) },
{ be_const_key_weak(BRIDGE, -1), be_const_bool(1) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(relay) },
{ be_const_key_weak(ARG_TYPE, 0), be_const_static_closure(class_Matter_Plugin_Bridge_Light3__X3Clambda_X3E_closure) },
})),
be_str_weak(Matter_Plugin_Bridge_Light3)
);
/********************************************************************/
/* End of solidification */

Some files were not shown because too many files have changed in this diff Show More