-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hi,
i have a HYD 10KTL-3PH running firmware HYD 5-20KTL-3PH_Firmware_V115162-BTS 5K BMS-V011526 PCU-V011526 BDU-V010010.zip
The excel file included in the release and listing registers list shows:
1125 | TOU_Charge_Power | | U32 | 1 | W | 1 | 4294967296 | RW | Timeshare Tariff - Forced Charging Power;The set value must not exceed the rated power of the machine.
1126 |
I can read the content [0,2501], using pysolarmanv5
I can change the value using the https://home.solarmanpv.com and the remote control.
But when i try to write using pysolarmanv5, i have an error: The data address received in the request is not an allowable address for
`
pip show PySolarmanV5
Name: pysolarmanv5
Version: 3.0.6
Summary: A Python library for interacting with Solarman (IGEN-Tech) v5 based Solar Data Loggers
Home-page: https://github.com/jmccrohan/pysolarmanv5
Author:
Author-email: Jonathan McCrohan jmccrohan@gmail.com
License: MIT License
Location: /home/cyrille/venv_domotic/lib/python3.11/site-packages
Requires: umodbus
Required-by: #N/A
Code:
from pysolarmanv5 import PySolarmanV5
sofar_solarman = PySolarmanV5("192.168.1.31", 2387519407, port=8899, mb_slave_id=1, verbose=True)
print(sofar_solarman.read_holding_registers(register_addr=0x1125, quantity=2))
sofar_solarman.write_multiple_holding_registers(register_addr=0x1125, values=[0, 2501])
sofar_solarman.disconnect()
Logs:
./sofar_solarman.py
DEBUG:pysolarmanv5.pysolarmanv5:Socket setup completed... <socket.socket fd=3, family=2, type=1, proto=6, laddr=('192.168.1.105', 50812), raddr=('192.168.1.31', 8899)>
DEBUG:pysolarmanv5.pysolarmanv5:[2387519407] SENT: a5 17 00 10 45 6e 00 af a7 4e 8e 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 11 25 00 02 d0 fc 16 15
DEBUG:pysolarmanv5.pysolarmanv5:[2387519407] RECD: a5 17 00 10 15 6e a2 af a7 4e 8e 02 01 da 09 7e 01 df 65 00 00 40 20 94 67 01 03 04 00 00 09 c5 3c 30 c4 15
[0, 2501]
DEBUG:pysolarmanv5.pysolarmanv5:[2387519407] SENT: a5 1c 00 10 45 6f 00 af a7 4e 8e 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 10 11 25 00 02 04 00 00 09 c5 37 db 41 15
DEBUG:pysolarmanv5.pysolarmanv5:[2387519407] RECD: a5 13 00 10 15 6f a3 af a7 4e 8e 02 01 db 09 7e 01 df 65 00 00 40 20 94 67 01 90 02 cd c1 a2 15
Traceback (most recent call last):
File "/domotic/dev/ezdom/protocols/./sofar_solarman.py", line 31, in
sofar_solarman.write_multiple_holding_registers(register_addr=0x1125, values=[0, 2501])
File "/home/cyrille/venv_domotic/lib/python3.11/site-packages/pysolarmanv5/pysolarmanv5.py", line 671, in write_multiple_holding_registers
modbus_values = self._get_modbus_response(mb_request_frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrille/venv_domotic/lib/python3.11/site-packages/pysolarmanv5/pysolarmanv5.py", line 462, in _get_modbus_response
modbus_values = rtu.parse_response_adu(mb_response_frame, mb_request_frame)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrille/venv_domotic/lib/python3.11/site-packages/umodbus/client/serial/rtu.py", line 190, in parse_response_adu
function = create_function_from_response_pdu(resp_pdu, req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrille/venv_domotic/lib/python3.11/site-packages/umodbus/functions.py", line 132, in create_function_from_response_pdu
function_code = pdu_to_function_code_or_raise_error(resp_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cyrille/venv_domotic/lib/python3.11/site-packages/umodbus/functions.py", line 118, in pdu_to_function_code_or_raise_error
raise error_code_to_exception_map[error_code]
umodbus.exceptions.IllegalDataAddressError: The data address received in the request is not an allowable address for
the server.
`
Do you see what could be wrong ?
Regards.