* S allius/issue102 (#103)

* hotfix: don't send two MODBUS commands together

* Update README.md

Exchange logger fw version with the real inverter fw version in the compatibility table

* Update python-app.yml

run also on pushes to issue branches
fix name for issues branches

* S allius/issue104 (#105)

* Update README.md

Exchange logger fw version with the real inverter fw version in the compatibility table

* Update python-app.yml

run also on pushes to issue branches
fix name for issues branches

* fix forwarding of MODBUS responses

* fix unit tests

* update changelog
This commit is contained in:
Stefan Allius
2024-06-21 18:12:48 +02:00
committed by GitHub
parent c34b33ed5f
commit a3c054d2b1
5 changed files with 33 additions and 8 deletions

View File

@@ -426,7 +426,8 @@ class Talent(Message):
if self.ctrl.is_req():
if self.remoteStream.mb.recv_req(data[hdr_len:],
self.msg_forward):
self.remoteStream.
msg_forward):
self.inc_counter('Modbus_Command')
else:
self.inc_counter('Invalid_Msg_Format')

View File

@@ -495,7 +495,8 @@ class SolarmanV5(Message):
elif ftype == self.MB_RTU_CMD:
if self.remoteStream.mb.recv_req(data[15:],
self.__forward_msg()):
self.remoteStream.
__forward_msg):
self.inc_counter('Modbus_Command')
else:
self.inc_counter('Invalid_Msg_Format')

View File

@@ -41,7 +41,7 @@ class Schedule:
fnc = getattr(m, "send_modbus_cmd", None)
if callable(fnc):
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, logging.DEBUG)
# if 0 == (cls.count % 30):
# # logging.info("Regular Modbus Status request")
# await fnc(Modbus.READ_REGS, 0x2007, 2, logging.DEBUG)
cls.count += 1