-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Thanks for the work!
Unfortunately it does not work anymore, as the new firmware >2.x seems to answer the V5-request with AT.
See https://github.com/kbialek/deye-inverter-mqtt/issues/127
so it seems one has to switch over to AT on Port 48899.
Only in a short 5 sec timewindow, after reboot, when you change the Internal server parameters setting on the config_hide.html page from TCP-Client back to TCP-Server - it will answer "right" - so they have not disabled V5, just "hidden" it behind the AT. - See the output below.
2024-07-29 17:56:57,868 root INFO config...
2024-07-29 17:56:57,873 root INFO 172.16.0.223
2024-07-29 17:56:57,874 root INFO 8899
2024-07-29 17:56:57,875 root INFO 3989146484
Traceback (most recent call last):
File "./test-config.py", line 127, in
main()
File "./test-config.py", line 19, in main
data = _getDeyeData()
File "./test-config.py", line 36, in _getDeyeData
modbus = PySolarmanV5(
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 118, in init
self._socket_setup(kwargs.get("socket"), kwargs.get("auto_reconnect", False))
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 404, in _socket_setup
raise NoSocketAvailableError("No socket available")
pysolarmanv5.pysolarmanv5.NoSocketAvailableError: No socket available
root@raspberrypi2:/data/dbus-deye-sun-g3-pvinverter# ./test-config.py
2024-07-29 17:57:00,844 root INFO config...
2024-07-29 17:57:00,845 root INFO 172.16.0.223
2024-07-29 17:57:00,846 root INFO 8899
2024-07-29 17:57:00,847 root INFO 3989146484
2024-07-29 17:57:00,954 pysolarmanv5.pysolarmanv5 DEBUG [POLL-DISCARDED] RECD: 41 54 2b 59 5a 43 4d 50 56 45 52 3d 4d 57 33 5f 31 36 55 5f 35 34 30 36 5f 32 2e 33 32 2d 44 31 0d 0a 0d 0a
2024-07-29 17:57:00,955 pysolarmanv5.pysolarmanv5 DEBUG Socket setup completed... <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.16.0.231', 38318), raddr=('172.16.0.223', 8899)>
2024-07-29 17:57:00,957 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 f9 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 3c 00 01 44 06 a3 15
2024-07-29 17:57:01,27 pysolarmanv5.pysolarmanv5 DEBUG RECD: a5 15 00 10 15 f9 01 74 8b c5 ed 02 01 fc e8 00 00 0c 00 00 00 00 00 00 00 01 03 02 00 13 f9 89 73 15
2024-07-29 17:57:01,30 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 fa 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 3c 00 01 44 06 a4 15
2024-07-29 17:57:01,110 pysolarmanv5.pysolarmanv5 DEBUG RECD: a5 15 00 10 15 fa 02 74 8b c5 ed 02 01 fc e8 00 00 0c 00 00 00 00 00 00 00 01 03 02 00 13 f9 89 75 15
2024-07-29 17:57:01,112 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 fb 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 56 00 02 24 1b b5 15
2024-07-29 17:57:01,179 pysolarmanv5.pysolarmanv5 DEBUG RECD: a5 17 00 10 15 fb 03 74 8b c5 ed 02 01 fc e8 00 00 0c 00 00 00 00 00 00 00 01 03 04 00 d0 00 00 fb ca 7b 15
2024-07-29 17:57:01,182 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 fc 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 4c 00 01 45 dd 8e 15
2024-07-29 17:57:01,251 pysolarmanv5.pysolarmanv5 DEBUG RECD: a5 15 00 10 15 fc 04 74 8b c5 ed 02 01 fc e8 00 00 0c 00 00 00 00 00 00 00 01 03 02 00 00 b8 44 e0 15
2024-07-29 17:57:01,254 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 fd 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 49 00 01 55 dc 9b 15
2024-07-29 17:57:01,325 pysolarmanv5.pysolarmanv5 DEBUG RECD: a5 15 00 10 15 fd 05 74 8b c5 ed 02 01 fc e8 00 00 0d 00 00 00 00 00 00 00 01 03 02 08 f2 3e 01 20 15
2024-07-29 17:57:01,826 root INFO data from deye:
2024-07-29 17:57:01,828 root INFO {'acEnergyForward': 1.9000000000000001, 'acPower': 20.8, 'acCurrent': 0.0, 'acVoltage': 229.0, '_firmwareVersion': '2.32'}
root@raspberrypi2:/data/dbus-deye-sun-g3-pvinverter# ./test-config.py
2024-07-29 17:57:36,398 root INFO config...
2024-07-29 17:57:36,399 root INFO 172.16.0.223
2024-07-29 17:57:36,400 root INFO 8899
2024-07-29 17:57:36,401 root INFO 3989146484
2024-07-29 17:57:36,507 pysolarmanv5.pysolarmanv5 DEBUG Socket setup completed... <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.16.0.231', 38328), raddr=('172.16.0.223', 8899)>
2024-07-29 17:57:36,509 pysolarmanv5.pysolarmanv5 DEBUG SENT: a5 17 00 10 45 9a 00 74 8b c5 ed 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 3c 00 01 44 06 44 15
2024-07-29 17:57:36,539 pysolarmanv5.pysolarmanv5 DEBUG RECD: 41 54 2b 59 5a 43 4d 50 56 45 52 3d 4d 57 33 5f 31 36 55 5f 35 34 30 36 5f 32 2e 33 32 2d 44 31 0d 0a 0d 0a
2024-07-29 17:57:36,540 pysolarmanv5.pysolarmanv5 DEBUG frame_len does not match payload_len.
Traceback (most recent call last):
File "./test-config.py", line 127, in
main()
File "./test-config.py", line 19, in main
data = _getDeyeData()
File "./test-config.py", line 40, in _getDeyeData
acEnergyForward = _getDailyProduction(modbus)
File "./test-config.py", line 67, in _getDailyProduction
return modbus.read_holding_register_formatted(register_addr=0x003C, quantity=1, scale=0.1)
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 553, in read_holding_register_formatted
modbus_values = self.read_holding_registers(register_addr, quantity)
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 508, in read_holding_registers
modbus_values = self._get_modbus_response(mb_request_frame)
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 385, in _get_modbus_response
mb_response_frame = self._send_receive_modbus_frame(mb_request_frame)
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 373, in _send_receive_modbus_frame
mb_response_frame = self._v5_frame_decoder(v5_response_frame)
File "/data/dbus-deye-sun-g3-pvinverter/pysolarmanv5/pysolarmanv5.py", line 245, in _v5_frame_decoder
raise V5FrameError("V5 frame contains invalid start or end values")
pysolarmanv5.pysolarmanv5.V5FrameError: V5 frame contains invalid start or end values
`