Matter support for Rain sensor (#21633)

This commit is contained in:
s-hadinger 2024-06-14 18:54:27 +02:00 committed by GitHub
parent 75c47b6948
commit 7cb8c0259d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 2455 additions and 2588 deletions

View File

@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3``
- Berry `classof` extended to class methods (#21615)
- Extend command ``SetOption147 1`` to disable publish of IRReceived MQTT messages (#21574)
- Matter support for Rain sensor
### Breaking Changed

View File

@ -252,12 +252,15 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Illuminance.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_Humidity.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Humidity.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_OnOff.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_Contact.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_2_Sensor_Boolean.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_Occupancy.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_OnOff.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_Contact.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_Rain.h"
#include "solidify/solidified_Matter_Plugin_3_Sensor_Waterleak.h"
#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_Rain.h"
#include "solidify/solidified_Matter_Plugin_9_Virt_Sensor_Waterleak.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_OnOff.h"
#include "solidify/solidified_Matter_Plugin_8_Bridge_Light0.h"
@ -272,6 +275,7 @@ extern const bclass be_class_Matter_TLV; // need to declare it upfront because
#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_Rain.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"

View File

@ -116,7 +116,7 @@ class Matter_Plugin
def init(device, endpoint, config)
self.device = device
self.endpoint = endpoint
self.clusters = self.consolidate_clusters()
self.clusters = self.get_clusters()
self.parse_configuration(config)
self.node_label = config.find("name", "")
end
@ -179,11 +179,11 @@ class Matter_Plugin
end
#############################################################
# consolidate_clusters
# get_clusters
#
# Build a consolidated map of all the `CLUSTERS` static vars
# from the inheritance hierarchy
def consolidate_clusters()
def get_clusters()
return self.CLUSTERS
# def real_super(o) return super(o) end # enclose `super()` in a static function to disable special behavior for super in instances
# var ret = {}
@ -257,12 +257,6 @@ class Matter_Plugin
return false
end
#############################################################
# Does it handle this endpoint and this cluster
def has(cluster, endpoint)
return self.clusters.contains(cluster) && self.endpoints.find(endpoint) != nil
end
def set_name(n)
if n != self.node_label
self.attribute_updated(0x0039, 0x0005)

View File

@ -0,0 +1,104 @@
#
# Matter_Plugin_Sensor_Boolean.be - implements the behavior for an abstract boolean sensor - to be inherited
#
# 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_Sensor_Boolean,weak
class Matter_Plugin_Sensor_Boolean : 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 = "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 = 750 # update every 750ms
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_bool_value
#############################################################
# Constructor
def init(device, endpoint, config)
super(self).init(device, endpoint, config)
self.shadow_bool_value = false
end
#############################################################
# parse_configuration
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
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")
if (self.shadow_bool_value != state)
self.value_updated()
end
self.shadow_bool_value = state
end
end
end
#############################################################
# value_updated
#
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated()
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_bool_value != nil && self.shadow_bool_value != bool(state)
self.value_updated()
end
self.shadow_bool_value = state
end
end
#############################################################
#############################################################
end
matter.Plugin_Sensor_Boolean = Matter_Plugin_Sensor_Boolean

View File

@ -1,157 +0,0 @@
#
# Matter_Plugin_2_Sensor_Waterleak.be - implements the behavior for a Water leak Sensor
#
# 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_Sensor_Waterleak,weak
class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Device
static var TYPE = "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 = 750 # update every 750ms
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Waterleak")
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0045: [0], # Boolean State p.70 - no writable
})
# MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043
static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_leak
#############################################################
# Constructor
def init(device, endpoint, config)
super(self).init(device, endpoint, config)
self.shadow_leak = false
end
#############################################################
# parse_configuration
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
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")
if (self.shadow_leak != state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_leak = state
end
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 ----------
return tlv_solo.set(TLV.BOOL, self.shadow_leak)
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload_json)
var val_onoff = payload_json.find("Waterleak")
if val_onoff != nil
val_onoff = bool(val_onoff)
if self.shadow_leak != val_onoff
self.attribute_updated(0x0045, 0x0000)
self.shadow_leak = val_onoff
end
end
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,5 +1,5 @@
#
# Matter_Plugin_Sensor_Contact.be - implements the behavior for a Contact Sensor
# Matter_Plugin_3_Sensor_Contact.be - implements the behavior for a Contact Sensor
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -23,57 +23,29 @@ import matter
#@ solidify:Matter_Plugin_Sensor_Contact,weak
class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
class Matter_Plugin_Sensor_Contact : Matter_Plugin_Sensor_Boolean
static var TYPE = "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 = 750 # update every 750ms
# 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 = 750 # update every 750ms
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Contact")
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
# var tasmota_switch_index # Switch number in Tasmota (one based)
# var shadow_bool_value
#############################################################
# Constructor
def init(device, endpoint, config)
super(self).init(device, endpoint, config)
self.shadow_contact = false
end
#############################################################
# parse_configuration
# value_updated
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_switch_index = int(config.find(self.ARG #-'switch'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
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")
if (self.shadow_contact != state)
self.attribute_updated(0x0045, 0x0000)
end
self.shadow_contact = state
end
end
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated()
self.attribute_updated(0x0045, 0x0000)
end
#############################################################
@ -87,7 +59,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
# ====================================================================================================
if cluster == 0x0045 # ========== Boolean State ==========
if attribute == 0x0000 # ---------- StateValue / bool ----------
return tlv_solo.set_or_nil(TLV.BOOL, self.shadow_contact)
return tlv_solo.set_or_nil(TLV.BOOL, self.shadow_bool_value)
end
end
@ -99,30 +71,13 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
#
# Update internal state for virtual devices
def update_virtual(payload)
self.shadow_contact = self._parse_update_virtual(payload, "Contact", self.shadow_contact, bool, 0x0045, 0x0000)
self.shadow_bool_value = self._parse_update_virtual(payload, "Contact", self.shadow_bool_value, bool, 0x0045, 0x0000)
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
#
@ -130,7 +85,7 @@ class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
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)))
webserver.content_send(format("Contact%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value)))
end
# Show prefix before web value

View File

@ -1,5 +1,5 @@
#
# Matter_Plugin_Sensor_Occupancy.be - implements the behavior for a Occupany Switch
# Matter_Plugin_3_Sensor_Occupancy.be - implements the behavior for a Occupany Switch
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -23,57 +23,29 @@ import matter
#@ solidify:Matter_Plugin_Sensor_Occupancy,weak
class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Sensor_Boolean
static var TYPE = "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 = 750 # update every 750ms
# 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 = 750 # update every 750ms
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Occupancy")
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
# var tasmota_switch_index # Switch number in Tasmota (one based)
# var shadow_bool_value
#############################################################
# Constructor
def init(device, endpoint, config)
super(self).init(device, endpoint, config)
self.shadow_occupancy = false
end
#############################################################
# parse_configuration
# value_updated
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_switch_index = int(config.find(self.ARG #-'relay'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
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")
if (self.shadow_occupancy != state)
self.attribute_updated(0x0406, 0x0000)
end
self.shadow_occupancy = state
end
end
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated()
self.attribute_updated(0x0406, 0x0000)
end
#############################################################
@ -87,7 +59,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
# ====================================================================================================
if cluster == 0x0406 # ========== Occupancy Sensing ==========
if attribute == 0x0000 # ---------- Occupancy / U8 ----------
return tlv_solo.set_or_nil(TLV.U1, self.shadow_occupancy)
return tlv_solo.set_or_nil(TLV.U1, self.shadow_bool_value)
elif attribute == 0x0001 # ---------- OccupancySensorType / enum8 ----------
return tlv_solo.set(TLV.U1, 3) # physical contact
elif attribute == 0x0002 # ---------- OccupancySensorTypeBitmap / u8 ----------
@ -103,30 +75,13 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
#
# Update internal state for virtual devices
def update_virtual(payload)
self.val_onoff = self._parse_update_virtual(payload, "Occupancy", self.val_onoff, bool, 0x0406, 0x0000)
self.shadow_bool_value = self._parse_update_virtual(payload, "Occupancy", self.shadow_bool_value, bool, 0x0406, 0x0000)
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
#
@ -134,7 +89,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
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)))
webserver.content_send(format("Occupancy%i %s", self.shadow_bool_value, self.web_value_onoff(self.shadow_occupancy)))
end
# Show prefix before web value
@ -142,7 +97,7 @@ class Matter_Plugin_Sensor_Occupancy : Matter_Plugin_Device
import webserver
var name = self.get_name()
if !name
name = "Switch" + str(self.tasmota_switch_index)
name = "Switch" + str(self.shadow_bool_value)
end
webserver.content_send(format(self.PREFIX, name ? webserver.html_escape(name) : ""))
end

View File

@ -1,5 +1,5 @@
#
# Matter_Plugin_Sensor_OnOff.be - implements the behavior for a Occupany Switch
# Matter_Plugin_3_Sensor_OnOff.be - implements the behavior for a Occupany Switch
#
# Copyright (C) 2023 Stephan Hadinger & Theo Arends
#
@ -21,49 +21,28 @@
#@ solidify:Matter_Plugin_Sensor_OnOff,weak
class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device
class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Sensor_Boolean
static var TYPE = "onoff" # name of the plug-in in json
static var DISPLAY_NAME = "OnOff Sensor" # 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 = 750 # update every 750ms
# 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 = 750 # update every 750ms
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0006: [0], # On/Off 1.5 p.48
})
static var TYPES = { 0x0850: 2 } # OnOff Sensor, rev 2
var tasmota_switch_index # Switch number in Tasmota (one based)
var shadow_onoff
# var tasmota_switch_index # Switch number in Tasmota (one based)
# var shadow_bool_value
#############################################################
# parse_configuration
# value_updated
#
# Parse configuration map
def parse_configuration(config)
self.tasmota_switch_index = int(config.find(self.ARG #-'relay'-#, 1))
if self.tasmota_switch_index <= 0 self.tasmota_switch_index = 1 end
end
#############################################################
# Update shadow
#
def update_shadow()
super(self).update_shadow()
if !self.VIRTUAL
var switch_str = "Switch" + str(self.tasmota_switch_index)
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")
if (self.shadow_onoff != state)
self.attribute_updated(0x0006, 0x0000)
end
self.shadow_onoff = state
end
end
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated()
self.attribute_updated(0x0006, 0x0000)
end
#############################################################
@ -78,7 +57,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device
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)
return tlv_solo.set(TLV.BOOL, self.shadow_bool_value)
end
end
@ -93,7 +72,7 @@ class Matter_Plugin_Sensor_OnOff : Matter_Plugin_Device
#
# Override the default behavior to use the key `OnOff` instead of `Power`
def append_state_json()
return f',"OnOff":{int(self.shadow_onoff)}'
return f',"OnOff":{int(self.shadow_bool_value)}'
end
end

View File

@ -0,0 +1,105 @@
#
# Matter_Plugin_3_Sensor_Rain.be - implements the behavior for a Rain Sensor
#
# 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_Sensor_Rain,weak
class Matter_Plugin_Sensor_Rain : Matter_Plugin_Sensor_Boolean
static var TYPE = "rain" # name of the plug-in in json
static var DISPLAY_NAME = "Rain" # 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 = 750 # update every 750ms
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Rain")
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0045: [0], # Boolean State p.70 - no writable
})
# MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043
static var TYPES = { 0x0044: 1 } # Rain Sensor, rev 1
# var tasmota_switch_index # Switch number in Tasmota (one based)
# var shadow_bool_value
#############################################################
# value_updated
#
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated()
self.attribute_updated(0x0045, 0x0000)
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 ----------
return tlv_solo.set(TLV.BOOL, self.shadow_bool_value)
end
end
return super(self).read_attribute(session, ctx, tlv_solo)
end
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload)
self.shadow_bool_value = self._parse_update_virtual(payload, "Rain", self.shadow_bool_value, bool, 0x0045, 0x0000)
super(self).update_virtual(payload)
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("Rain%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value)))
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_Rain = Matter_Plugin_Sensor_Rain

View File

@ -0,0 +1,90 @@
#
# Matter_Plugin_3_Sensor_Waterleak.be - implements the behavior for a Water leak Sensor
#
# 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_Sensor_Waterleak,weak
class Matter_Plugin_Sensor_Waterleak : Matter_Plugin_Sensor_Boolean
static var TYPE = "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 = 750 # update every 750ms
static var UPDATE_COMMANDS = matter.UC_LIST(_class, "Waterleak")
static var CLUSTERS = matter.consolidate_clusters(_class, {
0x0045: [0], # Boolean State p.70 - no writable
})
# MATTER_WATER_LEAK_DETECTOR_DEVICE_TYPE_ID 0x0043
static var TYPES = { 0x0043: 1 } # Waterleak Sensor, rev 1
# var tasmota_switch_index # Switch number in Tasmota (one based)
# var shadow_bool_value
#############################################################
# value_updated
#
# This is triggered when a new value is changed, for subscription
# This method is meant to be overloaded and maximize shared code
def value_updated = Matter_Plugin_Sensor_Rain.value_updated
#############################################################
# read an attribute
#
def read_attribute = Matter_Plugin_Sensor_Rain.read_attribute
#############################################################
# update_virtual
#
# Update internal state for virtual devices
def update_virtual(payload)
self.shadow_bool_value = self._parse_update_virtual(payload, "Waterleak", self.shadow_bool_value, bool, 0x0045, 0x0000)
super(self).update_virtual(payload)
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("Waterleak%i %s", self.tasmota_switch_index, self.web_value_onoff(self.shadow_bool_value)))
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

@ -0,0 +1,32 @@
#
# Matter_Plugin_Bridge_8_Sensor_Rain.be - implements Rain 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_Rain,weak
class Matter_Plugin_Bridge_Sensor_Rain : Matter_Plugin_Sensor_Rain
static var BRIDGE = true
static var TYPE = "http_rain" # 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_Rain = Matter_Plugin_Bridge_Sensor_Rain

View File

@ -0,0 +1,34 @@
#
# Matter_Plugin_9_Virt_Sensor_Rain.be - implements the behavior for a Virtual Rain Sensor
#
# 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_Virt_Sensor_Rain,weak
class Matter_Plugin_Virt_Sensor_Rain : Matter_Plugin_Virt_Sensor_Rain
static var TYPE = "v_rain" # name of the plug-in in json
static var DISPLAY_NAME = "v.Rain" # display name of the plug-in
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_Rain = Matter_Plugin_Virt_Sensor_Rain

View File

@ -22,9 +22,9 @@ import matter
# Matter plug-in for core behavior
#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak ,weak
#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak,weak
class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak
class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak
static var TYPE = "v_waterleak" # name of the plug-in in json
static var DISPLAY_NAME = "v.Waterleak" # display name of the plug-in
static var ARG = "" # no arg for virtual device

View File

@ -33,14 +33,14 @@ import matter
#################################################################################
class Matter_UI
static var _CLASSES_TYPES = "|relay|light0|light1|light2|light3|shutter|shutter+tilt"
"|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|waterleak"
"|temperature|pressure|illuminance|humidity|occupancy|onoff|contact|flow|rain|waterleak"
"|airquality"
"|-virtual|v_relay|v_light0|v_light1|v_light2|v_light3"
"|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_waterleak"
"|v_temp|v_pressure|v_illuminance|v_humidity|v_occupancy|v_contact|v_flow|v_rain|v_waterleak"
"|v_airquality"
static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3"
"|http_temperature|http_pressure|http_illuminance|http_humidity"
"|http_occupancy|http_contact|http_flow|http_waterleak"
"|http_occupancy|http_contact|http_flow|http_rain|http_waterleak"
"|http_airquality"
var device

View File

@ -0,0 +1,301 @@
/* Solidification of Matter_Plugin_2_Sensor_Boolean.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
/********************************************************************
** Solidified function: parse_configuration
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_closure(class_Matter_Plugin_Sensor_Boolean_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_Boolean,
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: value_updated
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_closure(class_Matter_Plugin_Sensor_Boolean_value_updated, /* 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_Boolean,
0, /* has constants */
NULL, /* no const */
be_str_weak(value_updated),
&be_const_str_solidified,
( &(const binstruction[ 1]) { /* code */
0x80000000, // 0000 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_Boolean__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_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_closure(class_Matter_Plugin_Sensor_Boolean_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_Sensor_Boolean,
1, /* has constants */
( &(const bvalue[13]) { /* 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_bool_value),
/* K12 */ be_nested_str_weak(value_updated),
}),
be_str_weak(update_shadow),
&be_const_str_solidified,
( &(const binstruction[41]) { /* code */
0x60040003, // 0000 GETGBL R1 G3
0x5C080000, // 0001 MOVE R2 R0
0x7C040200, // 0002 CALL R1 1
0x8C040300, // 0003 GETMET R1 R1 K0
0x7C040200, // 0004 CALL R1 1
0x88040101, // 0005 GETMBR R1 R0 K1
0x74060020, // 0006 JMPT R1 #0028
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
0x780E000D, // 0019 JMPF R3 #0028
0x8C0C0509, // 001A GETMET R3 R2 K9
0x5C140200, // 001B MOVE R5 R1
0x7C0C0400, // 001C CALL R3 2
0x780E0009, // 001D JMPF R3 #0028
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
0x78120001, // 0024 JMPF R4 #0027
0x8C10010C, // 0025 GETMET R4 R0 K12
0x7C100200, // 0026 CALL R4 1
0x90021603, // 0027 SETMBR R0 K11 R3
0x80000000, // 0028 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_closure(class_Matter_Plugin_Sensor_Boolean_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_Boolean,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_bool_value),
}),
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: parse_status
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_closure(class_Matter_Plugin_Sensor_Boolean_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_Boolean,
1, /* has constants */
( &(const bvalue[ 6]) { /* 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_bool_value),
/* K5 */ be_nested_str_weak(value_updated),
}),
be_str_weak(parse_status),
&be_const_str_solidified,
( &(const binstruction[26]) { /* code */
0x540E0009, // 0000 LDINT R3 10
0x1C0C0403, // 0001 EQ R3 R2 R3
0x780E0015, // 0002 JMPF R3 #0019
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
0x78120007, // 000F JMPF R4 #0018
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
0x78120001, // 0015 JMPF R4 #0018
0x8C100105, // 0016 GETMET R4 R0 K5
0x7C100200, // 0017 CALL R4 1
0x90020803, // 0018 SETMBR R0 K4 R3
0x80000000, // 0019 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Boolean
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Boolean,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(11,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(shadow_bool_value, -1), be_const_var(1) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(parse_status, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_parse_status_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_value_updated_closure) },
{ be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_Boolean__X3Clambda_X3E_closure) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_Boolean_update_shadow_closure) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ be_const_key_weak(init, 8), be_const_closure(class_Matter_Plugin_Sensor_Boolean_init_closure) },
{ be_const_key_weak(parse_configuration, 2), be_const_closure(class_Matter_Plugin_Sensor_Boolean_parse_configuration_closure) },
})),
be_str_weak(Matter_Plugin_Sensor_Boolean)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,594 +0,0 @@
/* Solidification of Matter_Plugin_2_Sensor_Waterleak.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
/********************************************************************
** 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[ 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[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
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: init
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_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_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_leak),
}),
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_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
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_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_Waterleak,
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_leak),
/* 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
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_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_Sensor_Waterleak,
1, /* has constants */
( &(const bvalue[ 6]) { /* constants */
/* K0 */ be_nested_str_weak(find),
/* K1 */ be_nested_str_weak(Waterleak),
/* K2 */ be_nested_str_weak(shadow_leak),
/* K3 */ be_nested_str_weak(attribute_updated),
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(update_virtual),
}),
be_str_weak(update_virtual),
&be_const_str_solidified,
( &(const binstruction[25]) { /* 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
0x780E000B, // 0005 JMPF R3 #0012
0x600C0017, // 0006 GETGBL R3 G23
0x5C100400, // 0007 MOVE R4 R2
0x7C0C0200, // 0008 CALL R3 1
0x5C080600, // 0009 MOVE R2 R3
0x880C0102, // 000A GETMBR R3 R0 K2
0x200C0602, // 000B NE R3 R3 R2
0x780E0004, // 000C JMPF R3 #0012
0x8C0C0103, // 000D GETMET R3 R0 K3
0x54160044, // 000E LDINT R5 69
0x58180004, // 000F LDCONST R6 K4
0x7C0C0600, // 0010 CALL R3 3
0x90020402, // 0011 SETMBR R0 K2 R2
0x600C0003, // 0012 GETGBL R3 G3
0x5C100000, // 0013 MOVE R4 R0
0x7C0C0200, // 0014 CALL R3 1
0x8C0C0705, // 0015 GETMET R3 R3 K5
0x5C140200, // 0016 MOVE R5 R1
0x7C0C0400, // 0017 CALL R3 2
0x80000000, // 0018 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** 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
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
be_local_class(Matter_Plugin_Sensor_Waterleak,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(19,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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, 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, {
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, 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)
);
/********************************************************************/
/* End of solidification */

View File

@ -1,4 +1,4 @@
/* Solidification of Matter_Plugin_2_Sensor_Contact.h */
/* Solidification of Matter_Plugin_3_Sensor_Contact.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
@ -6,6 +6,52 @@
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_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_Contact,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_bool_value),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Contact),
/* 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
0x54220044, // 0005 LDINT R8 69
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: read_attribute
********************************************************************/
@ -28,7 +74,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(set_or_nil),
/* K6 */ be_nested_str_weak(BOOL),
/* K7 */ be_nested_str_weak(shadow_contact),
/* K7 */ be_nested_str_weak(shadow_bool_value),
/* K8 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
@ -64,37 +110,44 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_read_attribute, /* name */
/********************************************************************
** Solidified function: init
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_init, /* name */
be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
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[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_contact),
( &(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_bool_value),
}),
be_str_weak(init),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
( &(const binstruction[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
})
)
);
@ -157,12 +210,12 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix, /* name
/********************************************************************
** Solidified function: update_shadow
** Solidified function: value_updated
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */
be_local_closure(class_Matter_Plugin_Sensor_Contact_value_updated, /* name */
be_nested_proto(
8, /* nstack */
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -170,288 +223,18 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_update_shadow, /* name */
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),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(update_shadow),
be_str_weak(value_updated),
&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
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Contact;
be_local_closure(class_Matter_Plugin_Sensor_Contact_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_Contact,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_contact),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Contact),
/* 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
0x54220044, // 0005 LDINT R8 69
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_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
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0044, // 0001 LDINT R3 69
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
@ -461,34 +244,20 @@ be_local_closure(class_Matter_Plugin_Sensor_Contact_parse_configuration, /* na
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Contact
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_class(Matter_Plugin_Sensor_Contact,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(19,
0,
&be_class_Matter_Plugin_Sensor_Boolean,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Contact_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Contact) },
{ be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Contact_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(Contact),
})) ) } )) },
{ 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[]) {
@ -573,10 +342,15 @@ be_local_class(Matter_Plugin_Sensor_Contact,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ 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_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_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(21, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_web_values_prefix_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Contact_value_updated_closure) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(contact) },
})),
be_str_weak(Matter_Plugin_Sensor_Contact)
);

View File

@ -1,4 +1,4 @@
/* Solidification of Matter_Plugin_2_Sensor_Occupancy.h */
/* Solidification of Matter_Plugin_3_Sensor_Occupancy.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
@ -6,6 +6,52 @@
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
/********************************************************************
** 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(shadow_bool_value),
/* 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: read_attribute
********************************************************************/
@ -28,7 +74,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name
/* K4 */ be_const_int(0),
/* K5 */ be_nested_str_weak(set_or_nil),
/* K6 */ be_nested_str_weak(U1),
/* K7 */ be_nested_str_weak(shadow_occupancy),
/* K7 */ be_nested_str_weak(shadow_bool_value),
/* K8 */ be_const_int(1),
/* K9 */ be_nested_str_weak(set),
/* K10 */ be_const_int(3),
@ -84,37 +130,44 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_read_attribute, /* name
/********************************************************************
** Solidified function: init
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_init, /* name */
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values, /* name */
be_nested_proto(
9, /* nstack */
4, /* argc */
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[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(init),
/* K1 */ be_nested_str_weak(shadow_occupancy),
( &(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(shadow_bool_value),
/* K5 */ be_nested_str_weak(web_value_onoff),
/* K6 */ be_nested_str_weak(shadow_occupancy),
}),
be_str_weak(init),
be_str_weak(web_values),
&be_const_str_solidified,
( &(const binstruction[11]) { /* code */
0x60100003, // 0000 GETGBL R4 G3
0x5C140000, // 0001 MOVE R5 R0
0x7C100200, // 0002 CALL R4 1
0x8C100900, // 0003 GETMET R4 R4 K0
0x5C180200, // 0004 MOVE R6 R1
0x5C1C0400, // 0005 MOVE R7 R2
0x5C200600, // 0006 MOVE R8 R3
0x7C100800, // 0007 CALL R4 4
0x50100000, // 0008 LDBOOL R4 0 0
0x90020204, // 0009 SETMBR R0 K1 R4
0x80000000, // 000A RET 0
( &(const binstruction[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
})
)
);
@ -139,7 +192,7 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* na
/* 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),
/* K3 */ be_nested_str_weak(shadow_bool_value),
/* K4 */ be_nested_str_weak(content_send),
/* K5 */ be_nested_str_weak(PREFIX),
/* K6 */ be_nested_str_weak(html_escape),
@ -177,12 +230,12 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix, /* na
/********************************************************************
** Solidified function: update_shadow
** Solidified function: value_updated
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Occupancy;
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name */
be_local_closure(class_Matter_Plugin_Sensor_Occupancy_value_updated, /* name */
be_nested_proto(
8, /* nstack */
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
@ -190,288 +243,18 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy_update_shadow, /* name *
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),
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(update_shadow),
be_str_weak(value_updated),
&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
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0405, // 0001 LDINT R3 1030
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
@ -481,34 +264,20 @@ be_local_closure(class_Matter_Plugin_Sensor_Occupancy__X3Clambda_X3E, /* name
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Occupancy
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_class(Matter_Plugin_Sensor_Occupancy,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(19,
0,
&be_class_Matter_Plugin_Sensor_Boolean,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ 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_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Occupancy) },
{ be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_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(Occupancy),
})) ) } )) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(750) },
{ 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[]) {
@ -595,10 +364,15 @@ be_local_class(Matter_Plugin_Sensor_Occupancy,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ 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_const_key_weak(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_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(263, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_web_values_prefix_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Occupancy_value_updated_closure) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(occupancy) },
})),
be_str_weak(Matter_Plugin_Sensor_Occupancy)
);

View File

@ -1,4 +1,4 @@
/* Solidification of Matter_Plugin_2_Sensor_OnOff.h */
/* Solidification of Matter_Plugin_3_Sensor_OnOff.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
@ -6,157 +6,6 @@
extern const bclass be_class_Matter_Plugin_Sensor_OnOff;
/********************************************************************
** Solidified function: <lambda>
********************************************************************/
be_local_closure(class_Matter_Plugin_Sensor_OnOff__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_shadow
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_OnOff;
be_local_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow, /* name */
be_nested_proto(
8, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_OnOff,
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_onoff),
/* 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
0x541A0005, // 0026 LDINT R6 6
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_OnOff;
be_local_closure(class_Matter_Plugin_Sensor_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_Sensor_OnOff,
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
********************************************************************/
@ -180,7 +29,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_read_attribute, /* name */
/* K5 */ be_const_int(0),
/* K6 */ be_nested_str_weak(set),
/* K7 */ be_nested_str_weak(BOOL),
/* K8 */ be_nested_str_weak(shadow_onoff),
/* K8 */ be_nested_str_weak(shadow_bool_value),
/* K9 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
@ -233,7 +82,7 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json, /* name *
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(_X2C_X22OnOff_X22_X3A_X25s),
/* K1 */ be_nested_str_weak(shadow_onoff),
/* K1 */ be_nested_str_weak(shadow_bool_value),
}),
be_str_weak(append_state_json),
&be_const_str_solidified,
@ -251,16 +100,49 @@ be_local_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json, /* name *
/*******************************************************************/
/********************************************************************
** Solidified function: value_updated
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_OnOff;
be_local_closure(class_Matter_Plugin_Sensor_OnOff_value_updated, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_OnOff,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_updated),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0005, // 0001 LDINT R3 6
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_OnOff
********************************************************************/
extern const bclass be_class_Matter_Plugin_Device;
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_class(Matter_Plugin_Sensor_OnOff,
2,
&be_class_Matter_Plugin_Device,
be_nested_map(14,
0,
&be_class_Matter_Plugin_Sensor_Boolean,
be_nested_map(7,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(CLUSTERS, 8), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(read_attribute, 1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_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[]) {
{ be_const_key_int(6, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
@ -344,23 +226,15 @@ be_local_class(Matter_Plugin_Sensor_OnOff,
be_const_int(65533),
})) ) } )) },
})) ) } )) },
{ be_const_key_weak(ARG, -1), be_nested_str_weak(switch) },
{ be_const_key_weak(UPDATE_TIME, 4), be_const_int(750) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) },
{ be_const_key_weak(append_state_json, 12), be_const_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(OnOff_X20Sensor) },
{ be_const_key_weak(shadow_onoff, -1), be_const_var(1) },
{ be_const_key_weak(update_shadow, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_update_shadow_closure) },
{ be_const_key_weak(read_attribute, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_read_attribute_closure) },
{ be_const_key_weak(parse_configuration, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_parse_configuration_closure) },
{ be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
{ be_const_key_weak(append_state_json, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_append_state_json_closure) },
{ be_const_key_weak(TYPES, 6), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(1,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_int(2128, -1), be_const_int(2) },
})) ) } )) },
{ be_const_key_weak(ARG_HINT, 9), be_nested_str_weak(Switch_X3Cx_X3E_X20number) },
{ be_const_key_weak(tasmota_switch_index, 13), be_const_var(0) },
{ be_const_key_weak(ARG_TYPE, -1), be_const_static_closure(class_Matter_Plugin_Sensor_OnOff__X3Clambda_X3E_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_OnOff_value_updated_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(OnOff_X20Sensor) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(onoff) },
})),
be_str_weak(Matter_Plugin_Sensor_OnOff)
);

View File

@ -0,0 +1,358 @@
/* Solidification of Matter_Plugin_3_Sensor_Rain.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_closure(class_Matter_Plugin_Sensor_Rain_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_Rain,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_bool_value),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Rain),
/* 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
0x54220044, // 0005 LDINT R8 69
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: read_attribute
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_closure(class_Matter_Plugin_Sensor_Rain_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_Rain,
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_bool_value),
/* K8 */ be_nested_str_weak(read_attribute),
}),
be_str_weak(read_attribute),
&be_const_str_solidified,
( &(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
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified function: web_values
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_closure(class_Matter_Plugin_Sensor_Rain_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_Rain,
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(Rain_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_bool_value),
}),
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: web_values_prefix
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_closure(class_Matter_Plugin_Sensor_Rain_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_Rain,
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: value_updated
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_closure(class_Matter_Plugin_Sensor_Rain_value_updated, /* name */
be_nested_proto(
5, /* nstack */
1, /* argc */
2, /* varg */
0, /* has upvals */
NULL, /* no upvals */
0, /* has sup protos */
&be_class_Matter_Plugin_Sensor_Rain,
1, /* has constants */
( &(const bvalue[ 2]) { /* constants */
/* K0 */ be_nested_str_weak(attribute_updated),
/* K1 */ be_const_int(0),
}),
be_str_weak(value_updated),
&be_const_str_solidified,
( &(const binstruction[ 5]) { /* code */
0x8C040100, // 0000 GETMET R1 R0 K0
0x540E0044, // 0001 LDINT R3 69
0x58100001, // 0002 LDCONST R4 K1
0x7C040600, // 0003 CALL R1 3
0x80000000, // 0004 RET 0
})
)
);
/*******************************************************************/
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Rain
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_class(Matter_Plugin_Sensor_Rain,
0,
&be_class_Matter_Plugin_Sensor_Boolean,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Rain_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Rain) },
{ be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Rain_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(Rain),
})) ) } )) },
{ 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(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(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_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(68, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_web_values_prefix_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_value_updated_closure) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(rain) },
})),
be_str_weak(Matter_Plugin_Sensor_Rain)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,273 @@
/* Solidification of Matter_Plugin_3_Sensor_Waterleak.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
/********************************************************************
** Solidified function: update_virtual
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
be_local_closure(class_Matter_Plugin_Sensor_Waterleak_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_Waterleak,
1, /* has constants */
( &(const bvalue[ 5]) { /* constants */
/* K0 */ be_nested_str_weak(shadow_bool_value),
/* K1 */ be_nested_str_weak(_parse_update_virtual),
/* K2 */ be_nested_str_weak(Waterleak),
/* 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
0x54220044, // 0005 LDINT R8 69
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
})
)
);
/*******************************************************************/
// Borrowed method 'read_attribute' from class 'class_Matter_Plugin_Sensor_Rain'
extern bclosure *class_Matter_Plugin_Sensor_Rain_read_attribute;
/********************************************************************
** 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_bool_value),
}),
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: 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
})
)
);
/*******************************************************************/
// Borrowed method 'value_updated' from class 'class_Matter_Plugin_Sensor_Rain'
extern bclosure *class_Matter_Plugin_Sensor_Rain_value_updated;
/********************************************************************
** Solidified class: Matter_Plugin_Sensor_Waterleak
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Boolean;
be_local_class(Matter_Plugin_Sensor_Waterleak,
0,
&be_class_Matter_Plugin_Sensor_Boolean,
be_nested_map(10,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(update_virtual, 6), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_update_virtual_closure) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(Waterleak) },
{ be_const_key_weak(read_attribute, 5), be_const_closure(class_Matter_Plugin_Sensor_Rain_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(Waterleak),
})) ) } )) },
{ 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(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(web_values, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_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(67, -1), be_const_int(1) },
})) ) } )) },
{ be_const_key_weak(web_values_prefix, -1), be_const_closure(class_Matter_Plugin_Sensor_Waterleak_web_values_prefix_closure) },
{ be_const_key_weak(value_updated, -1), be_const_closure(class_Matter_Plugin_Sensor_Rain_value_updated_closure) },
{ be_const_key_weak(TYPE, 3), be_nested_str_weak(waterleak) },
})),
be_str_weak(Matter_Plugin_Sensor_Waterleak)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,26 @@
/* Solidification of Matter_Plugin_8_Bridge_Sensor_Rain.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Rain;
/********************************************************************
** Solidified class: Matter_Plugin_Bridge_Sensor_Rain
********************************************************************/
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
be_local_class(Matter_Plugin_Bridge_Sensor_Rain,
0,
&be_class_Matter_Plugin_Sensor_Rain,
be_nested_map(4,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(BRIDGE, 2), be_const_bool(1) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(http_rain) },
{ be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
{ be_const_key_weak(UPDATE_CMD, -1), be_nested_str_weak(Status_X2010) },
})),
be_str_weak(Matter_Plugin_Bridge_Sensor_Rain)
);
/********************************************************************/
/* End of solidification */

View File

@ -0,0 +1,27 @@
/* Solidification of Matter_Plugin_9_Virt_Sensor_Rain.h */
/********************************************************************\
* Generated code, don't edit *
\********************************************************************/
#include "be_constobj.h"
extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain;
/********************************************************************
** Solidified class: Matter_Plugin_Virt_Sensor_Rain
********************************************************************/
extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain;
be_local_class(Matter_Plugin_Virt_Sensor_Rain,
0,
&be_class_Matter_Plugin_Virt_Sensor_Rain,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2ERain) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(v_rain) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) },
{ be_const_key_weak(ARG, 2), be_nested_str_weak() },
})),
be_str_weak(Matter_Plugin_Virt_Sensor_Rain)
);
/********************************************************************/
/* End of solidification */

View File

@ -15,13 +15,13 @@ be_local_class(Matter_Plugin_Virt_Sensor_Waterleak,
&be_class_Matter_Plugin_Virt_Sensor_Waterleak,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key(VIRTUAL, 3), be_const_bool(1) },
{ be_const_key(DISPLAY_NAME, -1), be_nested_str(v_X2EWaterleak) },
{ be_const_key(TYPE, -1), be_nested_str(v_waterleak) },
{ be_const_key(ARG_HINT, -1), be_nested_str(_Not_X20used_) },
{ be_const_key(ARG, 2), be_nested_str() },
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
{ be_const_key_weak(DISPLAY_NAME, -1), be_nested_str_weak(v_X2EWaterleak) },
{ be_const_key_weak(TYPE, -1), be_nested_str_weak(v_waterleak) },
{ be_const_key_weak(ARG_HINT, -1), be_nested_str_weak(_Not_X20used_) },
{ be_const_key_weak(ARG, 2), be_nested_str_weak() },
})),
(bstring*) &be_const_str_Matter_Plugin_Virt_Sensor_Waterleak
be_str_weak(Matter_Plugin_Virt_Sensor_Waterleak)
);
/********************************************************************/
/* End of solidification */

View File

@ -3385,7 +3385,7 @@ be_local_class(Matter_UI,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(equal_map, -1), be_const_static_closure(class_Matter_UI_equal_map_closure) },
{ be_const_key_weak(page_part_mgr_adv, -1), be_const_closure(class_Matter_UI_page_part_mgr_adv_closure) },
{ be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity_X7Chttp_occupancy_X7Chttp_contact_X7Chttp_flow_X7Chttp_waterleak_X7Chttp_airquality) },
{ be_const_key_weak(_CLASSES_TYPES2, -1), be_nested_str_weak(_X7Chttp_relay_X7Chttp_light0_X7Chttp_light1_X7Chttp_light2_X7Chttp_light3_X7Chttp_temperature_X7Chttp_pressure_X7Chttp_illuminance_X7Chttp_humidity_X7Chttp_occupancy_X7Chttp_contact_X7Chttp_flow_X7Chttp_rain_X7Chttp_waterleak_X7Chttp_airquality) },
{ be_const_key_weak(page_part_mgr, 25), be_const_closure(class_Matter_UI_page_part_mgr_closure) },
{ be_const_key_weak(show_plugins_hints_js, -1), be_const_closure(class_Matter_UI_show_plugins_hints_js_closure) },
{ be_const_key_weak(show_enable, -1), be_const_closure(class_Matter_UI_show_enable_closure) },
@ -3397,7 +3397,7 @@ be_local_class(Matter_UI,
{ be_const_key_weak(show_commissioning_info, -1), be_const_closure(class_Matter_UI_show_commissioning_info_closure) },
{ be_const_key_weak(page_part_ctl, 18), be_const_closure(class_Matter_UI_page_part_ctl_closure) },
{ be_const_key_weak(show_fabric_info, -1), be_const_closure(class_Matter_UI_show_fabric_info_closure) },
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_waterleak_X7Cv_airquality) },
{ be_const_key_weak(_CLASSES_TYPES, 4), be_nested_str_long(_X7Crelay_X7Clight0_X7Clight1_X7Clight2_X7Clight3_X7Cshutter_X7Cshutter_X2Btilt_X7Ctemperature_X7Cpressure_X7Cilluminance_X7Chumidity_X7Coccupancy_X7Conoff_X7Ccontact_X7Cflow_X7Crain_X7Cwaterleak_X7Cairquality_X7C_X2Dvirtual_X7Cv_relay_X7Cv_light0_X7Cv_light1_X7Cv_light2_X7Cv_light3_X7Cv_temp_X7Cv_pressure_X7Cv_illuminance_X7Cv_humidity_X7Cv_occupancy_X7Cv_contact_X7Cv_flow_X7Cv_rain_X7Cv_waterleak_X7Cv_airquality) },
{ be_const_key_weak(web_get_arg, -1), be_const_closure(class_Matter_UI_web_get_arg_closure) },
{ be_const_key_weak(plugin_option, 5), be_const_closure(class_Matter_UI_plugin_option_closure) },
{ be_const_key_weak(web_add_config_button, -1), be_const_closure(class_Matter_UI_web_add_config_button_closure) },

View File

@ -6213,55 +6213,58 @@ be_local_class(Matter_Device,
{ be_const_key_weak(stop, 14), be_const_closure(class_Matter_Device_stop_closure) },
{ be_const_key_weak(stop_basic_commissioning, 13), be_const_closure(class_Matter_Device_stop_basic_commissioning_closure) },
{ be_const_key_weak(plugins_classes, 10), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
be_const_map( * be_nested_map(47,
be_const_map( * be_nested_map(50,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(v_waterleak, 40), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) },
{ be_const_key_weak(light0, -1), be_const_class(be_class_Matter_Plugin_Light0) },
{ be_const_key_weak(http_illuminance, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) },
{ be_const_key_weak(v_flow, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) },
{ be_const_key_weak(humidity, 24), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) },
{ be_const_key_weak(v_pressure, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) },
{ be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) },
{ be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) },
{ be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) },
{ be_const_key_weak(airquality, -1), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) },
{ be_const_key_weak(light1, 17), be_const_class(be_class_Matter_Plugin_Light1) },
{ be_const_key_weak(v_illuminance, 26), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
{ be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) },
{ be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
{ be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) },
{ be_const_key_weak(http_light0, 6), be_const_class(be_class_Matter_Plugin_Bridge_Light0) },
{ be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
{ be_const_key_weak(contact, 29), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
{ be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) },
{ be_const_key_weak(http_flow, 10), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) },
{ be_const_key_weak(pressure, -1), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) },
{ be_const_key_weak(v_humidity, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) },
{ be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) },
{ be_const_key_weak(v_light1, -1), be_const_class(be_class_Matter_Plugin_Virt_Light1) },
{ be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) },
{ be_const_key_weak(occupancy, -1), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) },
{ be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
{ be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) },
{ be_const_key_weak(v_airquality, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) },
{ be_const_key_weak(illuminance, 36), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) },
{ be_const_key_weak(shutter, 34), be_const_class(be_class_Matter_Plugin_Shutter) },
{ be_const_key_weak(waterleak, 5), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) },
{ be_const_key_weak(relay, 29), be_const_class(be_class_Matter_Plugin_OnOff) },
{ be_const_key_weak(http_light3, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light3) },
{ be_const_key_weak(http_contact, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) },
{ be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) },
{ be_const_key_weak(v_light2, 42), be_const_class(be_class_Matter_Plugin_Virt_Light2) },
{ be_const_key_weak(light2, 3), be_const_class(be_class_Matter_Plugin_Light2) },
{ be_const_key_weak(v_light2, -1), be_const_class(be_class_Matter_Plugin_Virt_Light2) },
{ be_const_key_weak(illuminance, -1), be_const_class(be_class_Matter_Plugin_Sensor_Illuminance) },
{ be_const_key_weak(humidity, -1), be_const_class(be_class_Matter_Plugin_Sensor_Humidity) },
{ be_const_key_weak(http_occupancy, 31), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) },
{ be_const_key_weak(http_contact, 14), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Contact) },
{ be_const_key_weak(light0, 16), be_const_class(be_class_Matter_Plugin_Light0) },
{ be_const_key_weak(v_pressure, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Pressure) },
{ be_const_key_weak(v_light1, 10), be_const_class(be_class_Matter_Plugin_Virt_Light1) },
{ be_const_key_weak(http_airquality, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Air_Quality) },
{ be_const_key_weak(v_occupancy, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Occupancy) },
{ be_const_key_weak(v_contact, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) },
{ be_const_key_weak(shutter_X2Btilt, -1), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
{ be_const_key_weak(http_flow, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Flow) },
{ be_const_key_weak(v_contact, 41), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Contact) },
{ be_const_key_weak(v_temp, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Temp) },
{ be_const_key_weak(http_illuminance, 33), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance) },
{ be_const_key_weak(rain, 22), be_const_class(be_class_Matter_Plugin_Sensor_Rain) },
{ be_const_key_weak(v_relay, -1), be_const_class(be_class_Matter_Plugin_Virt_OnOff) },
{ be_const_key_weak(shutter, 6), be_const_class(be_class_Matter_Plugin_Shutter) },
{ be_const_key_weak(light2, -1), be_const_class(be_class_Matter_Plugin_Light2) },
{ be_const_key_weak(http_light0, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light0) },
{ be_const_key_weak(v_illuminance, 49), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Illuminance) },
{ be_const_key_weak(temperature, -1), be_const_class(be_class_Matter_Plugin_Sensor_Temp) },
{ be_const_key_weak(root, 27), be_const_class(be_class_Matter_Plugin_Root) },
{ be_const_key_weak(v_waterleak, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Waterleak) },
{ be_const_key_weak(contact, -1), be_const_class(be_class_Matter_Plugin_Sensor_Contact) },
{ be_const_key_weak(http_rain, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Rain) },
{ be_const_key_weak(http_relay, -1), be_const_class(be_class_Matter_Plugin_Bridge_OnOff) },
{ be_const_key_weak(aggregator, -1), be_const_class(be_class_Matter_Plugin_Aggregator) },
{ be_const_key_weak(pressure, 43), be_const_class(be_class_Matter_Plugin_Sensor_Pressure) },
{ be_const_key_weak(shutter_X2Btilt, 24), be_const_class(be_class_Matter_Plugin_ShutterTilt) },
{ be_const_key_weak(v_humidity, 46), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Humidity) },
{ be_const_key_weak(http_light2, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light2) },
{ be_const_key_weak(http_humidity, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Humidity) },
{ be_const_key_weak(light3, -1), be_const_class(be_class_Matter_Plugin_Light3) },
{ be_const_key_weak(v_airquality, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Air_Quality) },
{ be_const_key_weak(http_waterleak, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) },
{ be_const_key_weak(waterleak, 8), be_const_class(be_class_Matter_Plugin_Sensor_Waterleak) },
{ be_const_key_weak(light1, 3), be_const_class(be_class_Matter_Plugin_Light1) },
{ be_const_key_weak(http_light1, -1), be_const_class(be_class_Matter_Plugin_Bridge_Light1) },
{ be_const_key_weak(v_flow, 13), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Flow) },
{ be_const_key_weak(v_light0, -1), be_const_class(be_class_Matter_Plugin_Virt_Light0) },
{ be_const_key_weak(relay, 43), be_const_class(be_class_Matter_Plugin_OnOff) },
{ be_const_key_weak(occupancy, 48), be_const_class(be_class_Matter_Plugin_Sensor_Occupancy) },
{ be_const_key_weak(airquality, 34), be_const_class(be_class_Matter_Plugin_Sensor_Air_Quality) },
{ be_const_key_weak(http_temperature, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Temp) },
{ be_const_key_weak(http_pressure, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Pressure) },
{ be_const_key_weak(flow, -1), be_const_class(be_class_Matter_Plugin_Sensor_Flow) },
{ be_const_key_weak(http_waterleak, 2), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Waterleak) },
{ be_const_key_weak(http_occupancy, -1), be_const_class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy) },
{ be_const_key_weak(root, 39), be_const_class(be_class_Matter_Plugin_Root) },
{ be_const_key_weak(onoff, -1), be_const_class(be_class_Matter_Plugin_Sensor_OnOff) },
{ be_const_key_weak(v_rain, -1), be_const_class(be_class_Matter_Plugin_Virt_Sensor_Rain) },
{ be_const_key_weak(v_light3, -1), be_const_class(be_class_Matter_Plugin_Virt_Light3) },
})) ) } )) },
{ be_const_key_weak(tick, 9), be_const_var(10) },
{ be_const_key_weak(commissioning_admin_fabric, -1), be_const_var(17) },