Open olili opened 1 year ago
in addition to my post before. With the following sample script you can comprehend the bahaviour:
from pymodbus.client.sync import ModbusTcpClient, ModbusSocketFramer from SungrowModbusWebClient import SungrowModbusWebClient
import my_SungrowModbusWebClient as SungrowModbusWebClient
import logging logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG)
client`` = SungrowModbusWebClient.SungrowModbusWebClient(host="172.23.23.31", port=8082, framer=ModbusSocketFramer, timeout=3, RetryOnEmpty=True, retries=1) success = client.connect() client.write_register( 13003, 1, unit=1 )
As told before wrt to Reading Holding Registers:
read = client.read_holding_registers( 13003, 1, unit=1 ) print( read.registers[0] )
is working perfectly.
Sorry. No idea my current client does not support writing registers. Without knowing what you have patched to make it work I am not sure? I have write ability coming in a release I’m working on.
Thx. I used your original verison.
" No idea my current client does not support writing registers."
Does this mean that your WebClient does not support "write_register" at all?
This information I have not found/read before. I was not aware.
Sorry, Yes the http layer is overriding the pymodbus package to pretend to be modbus. It's really just logging into the web interface as admin and using the general parameters page. The writing component on the webui is on a different page so wasn't implemented originally. I currently have an alpha build with write ability I am playing with before pushing.
Thx for information and your great work in the WebClient.
If you need an alpha tester for Web Client with "write support", I'm ready.
O.
Am 2023-05-16 10:23, schrieb bohdan-s:
Sorry, Yes the http layer is overriding the pymodbus package to pretend to be modbus. It's really just logging into the web interface as admin and using the general parameters page. The writing component on the webui is on a different page so wasn't implemented originally. I currently have an alpha build with write ability I am playing with before pushing.
-- Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. You are receiving this because you authored the thread.Message ID: @.***>
Links:
[1] https://github.com/bohdan-s/SungrowModbusWebClient/issues/4#issuecomment-1549218616 [2] https://github.com/notifications/unsubscribe-auth/AJ5KIIZQSIM7PHOAGAGXPRTXGM2OTANCNFSM6AAAAAAYBFQYA4
@bohdan-s is there any news on a WebClient with Write-Support? I'm stll eger to alpha test.
I tried to write to to holding register via SungrowModbusWebClient 0.3.2 and modified Modbus4mqtt. Reading input and holding registers is working like a sharm But writing to holding registers throws an error like attached. Any hint? O.