mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Matter fix bug when saving Force Static endpoints (#19071)
This commit is contained in:
parent
2ecb697a3f
commit
a0c4d914e8
@ -380,6 +380,7 @@ class Matter_IM
|
||||
# returns `true` if processed, `false` if silently ignored,
|
||||
# or raises an exception
|
||||
def process_invoke_request(msg, val)
|
||||
# import debug
|
||||
# structure is `ReadRequestMessage` 10.6.2 p.558
|
||||
# tasmota.log("MTR: IM:invoke_request processing start", 4)
|
||||
var ctx = matter.Path()
|
||||
@ -403,6 +404,7 @@ class Matter_IM
|
||||
var res = self.device.invoke_request(msg.session, q.command_fields, ctx)
|
||||
var params_log = (ctx.log != nil) ? "(" + str(ctx.log) + ") " : ""
|
||||
tasmota.log(format("MTR: >Command (%6i) %s %s %s", msg.session.local_session_id, ctx_str, cmd_name ? cmd_name : "", params_log), ctx.endpoint != 0 ? 2 : 3 #- don't log for endpoint 0 -# )
|
||||
# tasmota.log("MTR: Perf/Command = " + str(debug.counters()), 4)
|
||||
ctx.log = nil
|
||||
var a1 = matter.InvokeResponseIB()
|
||||
if res == true || ctx.status == matter.SUCCESS # special case, just respond ok
|
||||
|
@ -88,10 +88,12 @@ class Matter_IM_Message
|
||||
def send_im(responder)
|
||||
# tasmota.log(format("MTR: IM_Message send_im exch=%i ready=%i", self.resp.exchange_id, self.ready ? 1 : 0), 3)
|
||||
if !self.ready return false end
|
||||
# import debug
|
||||
var resp = self.resp
|
||||
resp.encode_frame(self.data.to_TLV().tlv2raw()) # payload in cleartext
|
||||
resp.encrypt()
|
||||
tasmota.log(format("MTR: <snd (%6i) id=%i exch=%i rack=%s", resp.session.local_session_id, resp.message_counter, resp.exchange_id, resp.ack_message_counter), 4)
|
||||
# tasmota.log("MTR: Perf/Send = " + str(debug.counters()), 4)
|
||||
responder.send_response_frame(resp)
|
||||
self.last_counter = resp.message_counter
|
||||
self.finish = true # by default we remove the packet after it is sent
|
||||
|
@ -120,6 +120,7 @@ class Matter_UDPServer
|
||||
# avoid any starvation.
|
||||
# Then resend queued outgoing packets.
|
||||
def loop()
|
||||
# import debug
|
||||
var packet_read = 0
|
||||
if self.udp_socket == nil return end
|
||||
var packet = self.udp_socket.read()
|
||||
@ -129,6 +130,7 @@ class Matter_UDPServer
|
||||
var from_addr = self.udp_socket.remote_ip
|
||||
var from_port = self.udp_socket.remote_port
|
||||
tasmota.log(format("MTR: UDP received from [%s]:%i", from_addr, from_port), 4)
|
||||
# tasmota.log("MTR: Perf/UDP_received = " + str(debug.counters()), 4)
|
||||
if self.dispatch_cb
|
||||
self.dispatch_cb(packet, from_addr, from_port)
|
||||
end
|
||||
|
@ -765,7 +765,11 @@ class Matter_UI
|
||||
elif webserver.has_arg("save")
|
||||
var matter_enabled_requested = webserver.has_arg("menable")
|
||||
var matter_commissioning_requested = webserver.has_arg("comm")
|
||||
self.device.disable_bridge_mode = webserver.arg("nobridge") == 'on'
|
||||
var matter_disable_bridge_mode_requested = (webserver.arg("nobridge") == 'on')
|
||||
if self.device.disable_bridge_mode != matter_disable_bridge_mode_requested
|
||||
self.device.disable_bridge_mode = matter_disable_bridge_mode_requested
|
||||
self.device.save_param()
|
||||
end
|
||||
|
||||
if matter_enabled_requested != self.matter_enabled()
|
||||
if matter_enabled_requested
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user