Closed torsteinelv closed 1 year ago
update:
was able to exacly what i wanted todo with this library. thanks:
""" A basic client demonstrating how to use pysolarmanv5.""" from pysolarmanv5 import PySolarmanV5
def main(): modbus = PySolarmanV5( "xxxx",xxxx, port=8899, mb_slave_id=1, verbose=False )
print(modbus.read_holding_registers(register_addr=262, quantity=1))
print(modbus.write_multiple_holding_registers(register_addr=262, values=[5700]))
if name == "main": main()
Is this a known issue? My main goal is to change the voltage in time of use. Mabey someone can assist me in how to make this? Traceback (most recent call last): File "/root/Python-3.8.2/tte/test1.py", line 31, in
main()
File "/root/Python-3.8.2/tte/test1.py", line 14, in main
val = modbus.read_input_registers(register_addr=x, quantity=1)[0]
File "/usr/local/lib/python3.9/dist-packages/pysolarmanv5/pysolarmanv5.py", line 347, in read_input_registers
modbus_values = self._get_modbus_response(mb_request_frame)
File "/usr/local/lib/python3.9/dist-packages/pysolarmanv5/pysolarmanv5.py", line 261, in _get_modbus_response
mb_response_frame = self._send_receive_modbus_frame(mb_request_frame)
File "/usr/local/lib/python3.9/dist-packages/pysolarmanv5/pysolarmanv5.py", line 248, in _send_receive_modbus_frame
v5_response_frame = self._send_receive_v5_frame(v5_request_frame)
File "/usr/local/lib/python3.9/dist-packages/pysolarmanv5/pysolarmanv5.py", line 233, in _send_receive_v5_frame
v5_response = self.sock.recv(1024)
socket.timeout: timed out