@@ -63,6 +63,7 @@ class Matter_Device
63
63
var root_discriminator # as `int`
64
64
var root_passcode # as `int`
65
65
var ipv4only # advertize only IPv4 addresses (no IPv6)
66
+ var disable_bridge_mode # default is bridge mode, this flag disables this mode for some non-compliant controllers
66
67
var next_ep # next endpoint to be allocated for bridge, start at 1
67
68
# context for PBKDF
68
69
var root_iterations # PBKDF number of iterations
@@ -92,6 +93,7 @@ class Matter_Device
92
93
self .next_ep = 1 # start at endpoint 1 for dynamically allocated endpoints
93
94
self .root_salt = crypto.random ( 16 )
94
95
self .ipv4only = false
96
+ self .disable_bridge_mode = false
95
97
self .load_param ()
96
98
97
99
self .sessions = matter.Session_Store ( self )
@@ -628,7 +630,7 @@ class Matter_Device
628
630
import json
629
631
self .update_remotes_info () # update self.plugins_config_remotes
630
632
631
- var j = format ( '{"distinguish":%i,"passcode":%i,"ipv4only":%s,"nextep":%i' , self .root_discriminator , self .root_passcode , self .ipv4only ? 'true' : 'false' , self .next_ep )
633
+ var j = format ( '{"distinguish":%i,"passcode":%i,"ipv4only":%s,"disable_bridge_mode":%s," nextep":%i' , self .root_discriminator , self .root_passcode , self .ipv4only ? 'true' : 'false' , self .disable_bridge_mode ? 'true' : 'false' , self .next_ep )
632
634
if self .plugins_persist
633
635
j += ',"config":'
634
636
j += json.dump ( self .plugins_config )
@@ -693,6 +695,7 @@ class Matter_Device
693
695
self .root_discriminator = j.find ( "distinguish" , self .root_discriminator )
694
696
self .root_passcode = j.find ( "passcode" , self .root_passcode )
695
697
self .ipv4only = bool ( j.find ( "ipv4only" , false ))
698
+ self .disable_bridge_mode = bool ( j.find ( "disable_bridge_mode" , false ))
696
699
self .next_ep = j.find ( "nextep" , self .next_ep )
697
700
self .plugins_config = j.find ( "config" )
698
701
if self .plugins_config != nil
0 commit comments