add log_level support for modbus commands

This commit is contained in:
Stefan Allius
2024-05-28 19:32:20 +02:00
parent ab9e798152
commit 66657888dd
9 changed files with 52 additions and 36 deletions

View File

@@ -40,8 +40,8 @@ class Schedule:
if m.server_side:
fnc = getattr(m, "send_modbus_cmd", None)
if callable(fnc):
await fnc(Modbus.READ_REGS, 0x3008, 21)
await fnc(Modbus.READ_REGS, 0x3008, 21, logging.DEBUG)
if 0 == (cls.count % 30):
# logging.info("Regular Modbus Status request")
await fnc(Modbus.READ_REGS, 0x2007, 2)
await fnc(Modbus.READ_REGS, 0x2007, 2, logging.DEBUG)
cls.count += 1