jmccrohan / pysolarmanv5

A python module to interact with Solarman Data Logging Sticks
MIT License
126 stars 27 forks source link

question : write holding register #41

Closed chinezbrun closed 1 year ago

chinezbrun commented 1 year ago

not found the right sintax to write a register via pysolarman5 to Deye inverter

example print(modbus.read_holding_registers(register_addr=99,quantity=1))

5760

modbus.write_holding_register(register_addr=99,value=5750)

give me the errorr "raise V5FrameError("V5 frame does not contain a valid Modbus RTU frame") pysolarmanv5.pysolarmanv5.V5FrameError: V5 frame does not contain a valid Modbus RTU frame"

githubDante commented 1 year ago

Deye only supports writing to multiple registers (function code 0x10). Use:

modbus.write_multiple_holding_registers(99, [5750])

and should be OK.

chinezbrun commented 1 year ago

thanks a lot . all good with the syntax provided