Liu Song’s Projects


~/Projects/Tasmota

git clone https://code.lsong.org/Tasmota

Commit

Commit
3a00dde3af56580d47111313da264ac10c7a13ee
Author
s-hadinger <49731213+[email protected]>
Date
2023-06-14 22:32:54 +0200 +0200
Diffstat
 lib/libesp32/berry_matter/src/be_matter_module.c | 7 
 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Bridge_Sensor_Contact.be | 110 
 lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Contact.be | 5 
 lib/libesp32/berry_matter/src/embedded/Matter_UI.be | 2 
 lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Contact.h | 328 
 lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h | 2 

Matter add remote contact (#18883)


diff --git a/lib/libesp32/berry_matter/src/be_matter_module.c b/lib/libesp32/berry_matter/src/be_matter_module.c
index 26f04f25111ea2c6d214425e6a5a7842051ab4f0..8fa29d9346528a703b3481ff59435d918c3866c5 100644
--- a/lib/libesp32/berry_matter/src/be_matter_module.c
+++ b/lib/libesp32/berry_matter/src/be_matter_module.c
@@ -224,6 +224,9 @@ #include "solidify/solidified_Matter_Plugin_Sensor_Illuminance.h"
 #include "solidify/solidified_Matter_Plugin_Sensor_Humidity.h"
 #include "solidify/solidified_Matter_Plugin_Sensor_Occupancy.h"
 /*
+extern const bclass be_class_Matter_Counter;
+#include "solidify/solidified_Matter_Plugin_Sensor_Contact.h"
+/*
   if (seconds < 0) { return empty_resp; }       // no value
 #include "solidify/solidified_Matter_Plugin_Bridge_OnOff.h"
 #include "solidify/solidified_Matter_Plugin_Bridge_Light0.h"
@@ -236,8 +239,7 @@ #include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Temp.h"
 #include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Illuminance.h"
 #include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Humidity.h"
 #include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Occupancy.h"
-#include "solidify/solidified_Matter_Plugin_Sensor_OnOff.h"
-#include "solidify/solidified_Matter_Plugin_Sensor_Contact.h"
+#include "solidify/solidified_Matter_Plugin_Bridge_Sensor_Contact.h"
 
 /*********************************************************************************************\
  * Get a bytes() object of the certificate DAC/PAI_Cert
@@ -442,6 +444,7 @@   Plugin_Bridge_Sensor_Temp, class(be_class_Matter_Plugin_Bridge_Sensor_Temp)   // HTTP Temperature sensor
   Plugin_Bridge_Sensor_Illuminance, class(be_class_Matter_Plugin_Bridge_Sensor_Illuminance)   // HTTP Illuminance sensor
   Plugin_Bridge_Sensor_Humidity, class(be_class_Matter_Plugin_Bridge_Sensor_Humidity)   // HTTP Humidity sensor
   Plugin_Bridge_Sensor_Occupancy, class(be_class_Matter_Plugin_Bridge_Sensor_Occupancy)   // HTTP Occupancy sensor
+  Plugin_Bridge_Sensor_Contact, class(be_class_Matter_Plugin_Bridge_Sensor_Contact)   // HTTP Contact sensor
 }
 
 @const_object_info_end */




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




diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Contact.be b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Contact.be
index c66f80490bdfe293f06875551a90f093b0185c43..2a5194b4953e43177b8b00c17ad8661f53ba615d 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Contact.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_Plugin_Sensor_Contact.be
@@ -27,8 +27,8 @@
 #@ solidify:Matter_Plugin_Sensor_Contact,weak
 
 class Matter_Plugin_Sensor_Contact : Matter_Plugin_Device
-  static var TYPE = "contact"                     # name of the plug-in in json
+  static var TYPE = "contact"                       # name of the plug-in in json
-  static var NAME = "Contact"                     # display name of the plug-in
+  static var NAME = "Contact"                       # display name of the plug-in
   static var ARG  = "switch"                        # additional argument name (or empty if none)
   static var ARG_HINT = "Enter Switch<x> number"
   static var ARG_TYPE = / x -> int(x)               # function to convert argument to the right type
@@ -46,8 +46,7 @@   # parse_configuration
   #
   # Parse configuration map
   def parse_configuration(config)
-# Copyright (C) 2023  Stephan Hadinger & Theo Arends
 # This program is distributed in the hope that it will be useful,
     if self.tasmota_switch_index <= 0    self.tasmota_switch_index = 1    end
   end
 




diff --git a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
index 387a6809983642d4320ee514d801e5d8875b0543..398a3161a3faccd5346382aeb2cffd727aa23d80 100644
--- a/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
+++ b/lib/libesp32/berry_matter/src/embedded/Matter_UI.be
@@ -37,7 +37,7 @@                               "|temperature|pressure|illuminance|humidity|occupancy|onoff|contact"
   # static var _CLASSES_HTTP  = "-http"
   static var _CLASSES_TYPES2= "|http_relay|http_light0|http_light1|http_light2|http_light3"
                               "|http_temperature|http_pressure|http_illuminance|http_humidity"
-                              "|http_occupancy"
+                              "|http_occupancy|http_contact"
   var device
 
   # ####################################################################################################




diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Contact.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Contact.h
new file mode 100644
index 0000000000000000000000000000000000000000..60e67f3966974d8c6a0d3edc7dff335a3e695167
--- /dev/null
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_Plugin_Bridge_Sensor_Contact.h
@@ -0,0 +1,328 @@
+/* Solidification of Matter_Plugin_Bridge_Sensor_Contact.h */
+/********************************************************************\
+* Generated code, don't edit                                         *
+\********************************************************************/
+#include "be_constobj.h"
+
+extern const bclass be_class_Matter_Plugin_Bridge_Sensor_Contact;
+
+/********************************************************************
+** Solidified function: parse_update
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Contact_parse_update,   /* name */
+  be_nested_proto(
+    8,                          /* nstack */
+    3,                          /* argc */
+    2,                          /* varg */
+    0,                          /* has upvals */
+    NULL,                       /* no upvals */
+    0,                          /* has sup protos */
+    NULL,                       /* no sub protos */
+    1,                          /* has constants */
+    ( &(const bvalue[ 7]) {     /* constants */
+    /* K0   */  be_nested_str_weak(find),
+    /* K1   */  be_nested_str_weak(Switch),
+    /* K2   */  be_nested_str_weak(tasmota_switch_index),
+    /* K3   */  be_nested_str_weak(ON),
+    /* K4   */  be_nested_str_weak(shadow_contact),
+    /* K5   */  be_nested_str_weak(attribute_updated),
+    /* K6   */  be_const_int(0),
+    }),
+    be_str_weak(parse_update),
+    &be_const_str_solidified,
+    ( &(const binstruction[28]) {  /* code */
+      0x540E0007,  //  0000  LDINT	R3	8
+      0x1C0C0403,  //  0001  EQ	R3	R2	R3
+      0x780E0017,  //  0002  JMPF	R3	#001B
+      0x500C0000,  //  0003  LDBOOL	R3	0	0
+      0x8C100300,  //  0004  GETMET	R4	R1	K0
+      0x60180008,  //  0005  GETGBL	R6	G8
+      0x881C0102,  //  0006  GETMBR	R7	R0	K2
+      0x7C180200,  //  0007  CALL	R6	1
+      0x001A0206,  //  0008  ADD	R6	K1	R6
+      0x7C100400,  //  0009  CALL	R4	2
+      0x1C100903,  //  000A  EQ	R4	R4	K3
+      0x5C0C0800,  //  000B  MOVE	R3	R4
+      0x88100104,  //  000C  GETMBR	R4	R0	K4
+      0x4C140000,  //  000D  LDNIL	R5
+      0x20100805,  //  000E  NE	R4	R4	R5
+      0x78120009,  //  000F  JMPF	R4	#001A
+      0x88100104,  //  0010  GETMBR	R4	R0	K4
+      0x60140017,  //  0011  GETGBL	R5	G23
+      0x5C180600,  //  0012  MOVE	R6	R3
+      0x7C140200,  //  0013  CALL	R5	1
+      0x20100805,  //  0014  NE	R4	R4	R5
+      0x78120003,  //  0015  JMPF	R4	#001A
+      0x8C100105,  //  0016  GETMET	R4	R0	K5
+      0x541A0044,  //  0017  LDINT	R6	69
+      0x581C0006,  //  0018  LDCONST	R7	K6
+      0x7C100600,  //  0019  CALL	R4	3
+      0x90020803,  //  001A  SETMBR	R0	K4	R3
+      0x80000000,  //  001B  RET	0
+    })
+  )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: web_values
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Contact_web_values,   /* name */
+  be_nested_proto(
+    12,                          /* nstack */
+    1,                          /* argc */
+    2,                          /* varg */
+    0,                          /* has upvals */
+    NULL,                       /* no upvals */
+    0,                          /* has sup protos */
+    NULL,                       /* no sub protos */
+    1,                          /* has constants */
+    ( &(const bvalue[ 8]) {     /* constants */
+    /* K0   */  be_nested_str_weak(webserver),
+    /* K1   */  be_nested_str_weak(string),
+    /* K2   */  be_nested_str_weak(content_send),
+    /* K3   */  be_nested_str_weak(format),
+    /* K4   */  be_nested_str_weak(_X7C_X20Contact_X25i_X20_X25s),
+    /* K5   */  be_nested_str_weak(tasmota_switch_index),
+    /* K6   */  be_nested_str_weak(web_value_onoff),
+    /* K7   */  be_nested_str_weak(shadow_contact),
+    }),
+    be_str_weak(web_values),
+    &be_const_str_solidified,
+    ( &(const binstruction[12]) {  /* code */
+      0xA4060000,  //  0000  IMPORT	R1	K0
+      0xA40A0200,  //  0001  IMPORT	R2	K1
+      0x8C0C0302,  //  0002  GETMET	R3	R1	K2
+      0x8C140503,  //  0003  GETMET	R5	R2	K3
+      0x581C0004,  //  0004  LDCONST	R7	K4
+      0x88200105,  //  0005  GETMBR	R8	R0	K5
+      0x8C240106,  //  0006  GETMET	R9	R0	K6
+      0x882C0107,  //  0007  GETMBR	R11	R0	K7
+      0x7C240400,  //  0008  CALL	R9	2
+      0x7C140800,  //  0009  CALL	R5	4
+      0x7C0C0400,  //  000A  CALL	R3	2
+      0x80000000,  //  000B  RET	0
+    })
+  )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: <lambda>
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E,   /* name */
+  be_nested_proto(
+    3,                          /* nstack */
+    1,                          /* argc */
+    0,                          /* varg */
+    0,                          /* has upvals */
+    NULL,                       /* no upvals */
+    0,                          /* has sup protos */
+    NULL,                       /* no sub protos */
+    0,                          /* has constants */
+    NULL,                       /* no const */
+    be_str_weak(_X3Clambda_X3E),
+    &be_const_str_solidified,
+    ( &(const binstruction[ 4]) {  /* code */
+      0x60040009,  //  0000  GETGBL	R1	G9
+      0x5C080000,  //  0001  MOVE	R2	R0
+      0x7C040200,  //  0002  CALL	R1	1
+      0x80040200,  //  0003  RET	1	R1
+    })
+  )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: read_attribute
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Contact_read_attribute,   /* name */
+  be_nested_proto(
+    11,                          /* nstack */
+    3,                          /* argc */
+    2,                          /* varg */
+    0,                          /* has upvals */
+    NULL,                       /* no upvals */
+    0,                          /* has sup protos */
+    NULL,                       /* no sub protos */
+    1,                          /* has constants */
+    ( &(const bvalue[13]) {     /* constants */
+    /* K0   */  be_nested_str_weak(string),
+    /* K1   */  be_nested_str_weak(matter),
+    /* K2   */  be_nested_str_weak(TLV),
+    /* K3   */  be_nested_str_weak(cluster),
+    /* K4   */  be_nested_str_weak(attribute),
+    /* K5   */  be_const_int(0),
+    /* K6   */  be_nested_str_weak(shadow_contact),
+    /* K7   */  be_nested_str_weak(create_TLV),
+    /* K8   */  be_nested_str_weak(BOOL),
+    /* K9   */  be_nested_str_weak(NULL),
+    /* K10  */  be_nested_str_weak(U4),
+    /* K11  */  be_const_int(1),
+    /* K12  */  be_nested_str_weak(read_attribute),
+    }),
+    be_str_weak(read_attribute),
+    &be_const_str_solidified,
+    ( &(const binstruction[53]) {  /* code */
+      0xA40E0000,  //  0000  IMPORT	R3	K0
+      0xB8120200,  //  0001  GETNGBL	R4	K1
+      0x88100902,  //  0002  GETMBR	R4	R4	K2
+      0x88140503,  //  0003  GETMBR	R5	R2	K3
+      0x88180504,  //  0004  GETMBR	R6	R2	K4
+      0x541E0044,  //  0005  LDINT	R7	69
+      0x1C1C0A07,  //  0006  EQ	R7	R5	R7
+      0x781E0023,  //  0007  JMPF	R7	#002C
+      0x1C1C0D05,  //  0008  EQ	R7	R6	K5
+      0x781E000F,  //  0009  JMPF	R7	#001A
+      0x881C0106,  //  000A  GETMBR	R7	R0	K6
+      0x4C200000,  //  000B  LDNIL	R8
+      0x201C0E08,  //  000C  NE	R7	R7	R8
+      0x781E0005,  //  000D  JMPF	R7	#0014
+      0x8C1C0907,  //  000E  GETMET	R7	R4	K7
+      0x88240908,  //  000F  GETMBR	R9	R4	K8
+      0x88280106,  //  0010  GETMBR	R10	R0	K6
+      0x7C1C0600,  //  0011  CALL	R7	3
+      0x80040E00,  //  0012  RET	1	R7
+      0x70020004,  //  0013  JMP		#0019
+      0x8C1C0907,  //  0014  GETMET	R7	R4	K7
+      0x88240909,  //  0015  GETMBR	R9	R4	K9
+      0x4C280000,  //  0016  LDNIL	R10
+      0x7C1C0600,  //  0017  CALL	R7	3
+      0x80040E00,  //  0018  RET	1	R7
+      0x70020010,  //  0019  JMP		#002B
+      0x541EFFFB,  //  001A  LDINT	R7	65532
+      0x1C1C0C07,  //  001B  EQ	R7	R6	R7
+      0x781E0005,  //  001C  JMPF	R7	#0023
+      0x8C1C0907,  //  001D  GETMET	R7	R4	K7
+      0x8824090A,  //  001E  GETMBR	R9	R4	K10
+      0x58280005,  //  001F  LDCONST	R10	K5
+      0x7C1C0600,  //  0020  CALL	R7	3
+      0x80040E00,  //  0021  RET	1	R7
+      0x70020007,  //  0022  JMP		#002B
+      0x541EFFFC,  //  0023  LDINT	R7	65533
+      0x1C1C0C07,  //  0024  EQ	R7	R6	R7
+      0x781E0004,  //  0025  JMPF	R7	#002B
+      0x8C1C0907,  //  0026  GETMET	R7	R4	K7
+      0x8824090A,  //  0027  GETMBR	R9	R4	K10
+      0x5828000B,  //  0028  LDCONST	R10	K11
+      0x7C1C0600,  //  0029  CALL	R7	3
+      0x80040E00,  //  002A  RET	1	R7
+      0x70020007,  //  002B  JMP		#0034
+      0x601C0003,  //  002C  GETGBL	R7	G3
+      0x5C200000,  //  002D  MOVE	R8	R0
+      0x7C1C0200,  //  002E  CALL	R7	1
+      0x8C1C0F0C,  //  002F  GETMET	R7	R7	K12
+      0x5C240200,  //  0030  MOVE	R9	R1
+      0x5C280400,  //  0031  MOVE	R10	R2
+      0x7C1C0600,  //  0032  CALL	R7	3
+      0x80040E00,  //  0033  RET	1	R7
+      0x80000000,  //  0034  RET	0
+    })
+  )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified function: init
+********************************************************************/
+be_local_closure(Matter_Plugin_Bridge_Sensor_Contact_init,   /* name */
+  be_nested_proto(
+    9,                          /* nstack */
+    4,                          /* argc */
+    2,                          /* varg */
+    0,                          /* has upvals */
+    NULL,                       /* no upvals */
+    0,                          /* has sup protos */
+    NULL,                       /* no sub protos */
+    1,                          /* has constants */
+    ( &(const bvalue[ 6]) {     /* constants */
+    /* K0   */  be_nested_str_weak(init),
+    /* K1   */  be_nested_str_weak(tasmota_switch_index),
+    /* K2   */  be_nested_str_weak(find),
+    /* K3   */  be_nested_str_weak(ARG),
+    /* K4   */  be_const_int(1),
+    /* K5   */  be_const_int(0),
+    }),
+    be_str_weak(init),
+    &be_const_str_solidified,
+    ( &(const binstruction[20]) {  /* code */
+      0x60100003,  //  0000  GETGBL	R4	G3
+      0x5C140000,  //  0001  MOVE	R5	R0
+      0x7C100200,  //  0002  CALL	R4	1
+      0x8C100900,  //  0003  GETMET	R4	R4	K0
+      0x5C180200,  //  0004  MOVE	R6	R1
+      0x5C1C0400,  //  0005  MOVE	R7	R2
+      0x5C200600,  //  0006  MOVE	R8	R3
+      0x7C100800,  //  0007  CALL	R4	4
+      0x60100009,  //  0008  GETGBL	R4	G9
+      0x8C140702,  //  0009  GETMET	R5	R3	K2
+      0x881C0103,  //  000A  GETMBR	R7	R0	K3
+      0x58200004,  //  000B  LDCONST	R8	K4
+      0x7C140600,  //  000C  CALL	R5	3
+      0x7C100200,  //  000D  CALL	R4	1
+      0x90020204,  //  000E  SETMBR	R0	K1	R4
+      0x88100101,  //  000F  GETMBR	R4	R0	K1
+      0x18100905,  //  0010  LE	R4	R4	K5
+      0x78120000,  //  0011  JMPF	R4	#0013
+      0x90020304,  //  0012  SETMBR	R0	K1	K4
+      0x80000000,  //  0013  RET	0
+    })
+  )
+);
+/*******************************************************************/
+
+
+/********************************************************************
+** Solidified class: Matter_Plugin_Bridge_Sensor_Contact
+********************************************************************/
+extern const bclass be_class_Matter_Plugin_Bridge_HTTP;
+be_local_class(Matter_Plugin_Bridge_Sensor_Contact,
+    2,
+    &be_class_Matter_Plugin_Bridge_HTTP,
+    be_nested_map(15,
+    ( (struct bmapnode*) &(const bmapnode[]) {
+        { be_const_key_weak(ARG_HINT, 3), be_nested_str_weak(Enter_X20Switch_X3Cx_X3E_X20number) },
+        { be_const_key_weak(parse_update, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Contact_parse_update_closure) },
+        { be_const_key_weak(web_values, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Contact_web_values_closure) },
+        { be_const_key_weak(init, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Contact_init_closure) },
+        { be_const_key_weak(ARG_TYPE, 10), be_const_static_closure(Matter_Plugin_Bridge_Sensor_Contact__X3Clambda_X3E_closure) },
+        { be_const_key_weak(TYPES, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_map, {
+        be_const_map( *     be_nested_map(1,
+    ( (struct bmapnode*) &(const bmapnode[]) {
+        { be_const_key_int(21, -1), be_const_int(1) },
+    }))    ) } )) },
+        { be_const_key_weak(UPDATE_TIME, -1), be_const_int(5000) },
+        { be_const_key_weak(tasmota_switch_index, -1), be_const_var(0) },
+        { be_const_key_weak(NAME, -1), be_nested_str_weak(Contact) },
+        { be_const_key_weak(UPDATE_CMD, 11), be_nested_str_weak(Status_X208) },
+        { be_const_key_weak(TYPE, 14), be_nested_str_weak(http_contact) },
+        { be_const_key_weak(ARG, 8), be_nested_str_weak(switch) },
+        { be_const_key_weak(read_attribute, -1), be_const_closure(Matter_Plugin_Bridge_Sensor_Contact_read_attribute_closure) },
+        { be_const_key_weak(shadow_contact, -1), be_const_var(1) },
+        { be_const_key_weak(CLUSTERS, -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(69, -1), be_const_simple_instance(be_nested_simple_instance(&be_class_list, {
+        be_const_list( *     be_nested_list(3,
+    ( (struct bvalue*) &(const bvalue[]) {
+        be_const_int(0),
+        be_const_int(65532),
+        be_const_int(65533),
+    }))    ) } )) },
+    }))    ) } )) },
+    })),
+    be_str_weak(Matter_Plugin_Bridge_Sensor_Contact)
+);
+/*******************************************************************/
+
+void be_load_Matter_Plugin_Bridge_Sensor_Contact_class(bvm *vm) {
+    be_pushntvclass(vm, &be_class_Matter_Plugin_Bridge_Sensor_Contact);
+    be_setglobal(vm, "Matter_Plugin_Bridge_Sensor_Contact");
+    be_pop(vm, 1);
+}
+/********************************************************************/
+/* End of solidification */




diff --git a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
index 15ab6f8a6307744f18c9afbb9c66f334d9dc3731..425b86080c5b30f4bc181de016a29ad56ba91e11 100644
--- a/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
+++ b/lib/libesp32/berry_matter/src/solidify/solidified_Matter_UI.h
@@ -3209,8 +3209,8 @@     ( (struct bmapnode*) &(const bmapnode[]) {
         { be_const_key_weak(equal_map, -1), be_const_static_closure(Matter_UI_equal_map_closure) },
         { be_const_key_weak(page_part_mgr_adv, -1), be_const_closure(Matter_UI_page_part_mgr_adv_closure) },
 /********************************************************************\
+      0x5C100600,  //  001F  MOVE	R4	R3
 #include "be_constobj.h"
-      0x80040600,  //  0034  RET	1	R3
         { be_const_key_weak(page_part_mgr, 25), be_const_closure(Matter_UI_page_part_mgr_closure) },
         { be_const_key_weak(show_plugins_hints_js, -1), be_const_closure(Matter_UI_show_plugins_hints_js_closure) },
         { be_const_key_weak(show_enable, -1), be_const_closure(Matter_UI_show_enable_closure) },