Closed kptkip closed 1 year ago
more information missing... what is your refreshrate? etc. same wifi? the logger seems to be pretty laggy anyway
The docker container runs on a NAS in the same Network but connected via LAN.
Here is my config.env: `DEYE_LOGGER_IP_ADDRESS=192.168.33.X DEYE_LOGGER_PORT=8899 DEYE_LOGGER_SERIAL_NUMBER=[Serial] DEYE_METRIC_GROUPS=deye_sg04lp3_battery DEYE_FEATURE_SET_TIME=true
MQTT_HOST=192.168.33.Y MQTT_PORT=1884 MQTT_USERNAME= MQTT_PASSWORD= MQTT_TOPIC_PREFIX=SmartHome/Deye
LOG_LEVEL=INFO DEYE_DATA_READ_INTERVAL=30 `
hi @kptkip , please follow the instructions here https://github.com/kbialek/deye-inverter-mqtt#network-connectivity-issues
Connection works like a charm (s. screenshot attached) Logs look like this (also attached)
That's interesting. @kptkip Could you fill in this information?
Inverter model: SUN-8K-SG04LP3-EU Logger firmware version: LSW3_15_FFFF_1.0.96 deye-inverter-mqtt version: 2023.04.1
@edvandreas @hackepeterOli you own similar inverters. What is the logger firmware version at your devices? I suspect that @kptkip logger has incompatible firmware or is not properly configured. Maybe modbus/tcp must be enabled or something.
Here are the details from my working wifi stick: Logger Firmware: LSW3_15_FFFF_1.0.92R Inverter: SUN-12K-SG04LP3-EU
Here is my logger Firmware: LSW3_15_FFFF_1.0.9E you can contact the Support (in solarman app) for an update. Maybe the wifi signal is to bad?! Works a ping-t?
According to the numbers it seems, that I have the newest FW of us three, right? Or is the last digit HEX? WiFi is brillant - no hazzle.
Last week i get a Firmware-Update from Deye…
OK, I'll ask them, Do you have a special Contact adress or simply the info@...?
[service@deye.com.cn], you must tell the SN from the stick.
This is the response from service@deye.com.cn:
Hello, it is not recommended to update the firmware of the collector. If you need it, I can update your inverter firmware
Update is done by deye - still the same effect here - no connect.
@kptkip Sad to hear it. If you are in contact with deye support, you may ask them if modbus/tcp needs to be enabled at the logger Also let's check some basic stuff:
deye_sg04lp3
metric group?Probably a different timeout from the above:
DeyeConnector - DEBUG - Connection timeout
Traceback (most recent call last):
File "/opt/deye_inverter_mqtt/deye_connector.py", line 48, in send_request
data = client_socket.recv(1024)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/deye_inverter_mqtt/./deye_docker_entrypoint.py", line 43, in <module>
main()
File "/opt/deye_inverter_mqtt/./deye_docker_entrypoint.py", line 39, in main
daemon_main()
File "/opt/deye_inverter_mqtt/deye_daemon.py", line 97, in main
daemon.do_task()
File "/opt/deye_inverter_mqtt/deye_daemon.py", line 66, in do_task
regs |= self.modbus.read_registers(reg_range.first_reg_address, reg_range.last_reg_address)
File "/opt/deye_inverter_mqtt/deye_modbus.py", line 47, in read_registers
resp_frame = self.connector.send_request(req_frame)
File "/opt/deye_inverter_mqtt/deye_connector.py", line 60, in send_request
self.__log.warn("Connection error", e.message)
AttributeError: 'ConnectionResetError' object has no attribute 'message'
Inverter SUN-5K-SG01LP1-EU
Logger firmware LSW3_15_FFFF_1.0.96
Image 2023.05.2
and 2023.05.3-beta-1
It runs smoothly for about an hour until the error occurs.
@gwest7 thanks for reporting. This is a pretty stupid bug in the error handling. It's not related to the original problem reported in this issue.
tried both - SN is from the logger - not from the inverter.
I asked deye tech support - but they don't understand, what I want from them
@kptkip Can we check if there are response frames being sent by the logger? Could you record the network traffic at port 8899? E.g. using tcpdump
or wireshark
?
@palto42 I'm tagging you here, because of your network connectivity expertise.
No other idea right now, agree that a packet capture may help.
to be honest - I#m not familiar with tcpdump... THis is the output:
not really valuable...
Here is a sample from my server. It captures the traffic on port 8899 that goes in/out docker0
network interface. My inverter is now off, so there are no responses.
$ sudo tcpdump -i docker0 port 8899
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on docker0, link-type EN10MB (Ethernet), capture size 262144 bytes
20:17:11.546308 IP 172.17.0.3.45966 > 192.168.2.90.8899: Flags [S], seq 88988022, win 64240, options [mss 1460,sackOK,TS val 894213265 ecr 0,nop,wscale 7], length 0
20:17:12.579498 IP 172.17.0.3.45966 > 192.168.2.90.8899: Flags [S], seq 88988022, win 64240, options [mss 1460,sackOK,TS val 894214299 ecr 0,nop,wscale 7], length 0
20:17:14.659721 IP 172.17.0.3.45966 > 192.168.2.90.8899: Flags [S], seq 88988022, win 64240, options [mss 1460,sackOK,TS val 894216379 ecr 0,nop,wscale 7], length 0
so you are running this command inside the docker container on port 8899?
No, at the host
An example of bidirectional communication
$ sudo tcpdump -i docker0 port 8899
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on docker0, link-type EN10MB (Ethernet), capture size 262144 bytes
06:12:11.545722 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [S], seq 3718790533, win 64240, options [mss 1460,sackOK,TS val 929913265 ecr 0,nop,wscale 7], length 0
06:12:11.552095 IP 192.168.2.90.8899 > 172.17.0.3.37174: Flags [S.], seq 11502, ack 3718790534, win 4380, options [mss 1460], length 0
06:12:11.552243 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [.], ack 1, win 64240, length 0
06:12:11.552413 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [P.], seq 1:37, ack 1, win 64240, length 36
06:12:11.717820 IP 192.168.2.90.8899 > 172.17.0.3.37174: Flags [.], ack 37, win 4344, length 0
06:12:28.382301 IP 192.168.2.90.8899 > 172.17.0.3.37174: Flags [P.], seq 1:149, ack 37, win 4344, length 148
06:12:28.382613 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [.], ack 149, win 64092, length 0
06:12:28.383057 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [F.], seq 37, ack 149, win 64092, length 0
06:12:28.385099 IP 192.168.2.90.8899 > 172.17.0.3.37174: Flags [.], ack 38, win 4343, length 0
06:12:28.385811 IP 192.168.2.90.8899 > 172.17.0.3.37174: Flags [F.], seq 149, ack 38, win 4343, length 0
06:12:28.385906 IP 172.17.0.3.37174 > 192.168.2.90.8899: Flags [.], ack 150, win 64092, length 0
06:17:11.545843 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [S], seq 2868053599, win 64240, options [mss 1460,sackOK,TS val 930213265 ecr 0,nop,wscale 7], length 0
06:17:11.549402 IP 192.168.2.90.8899 > 172.17.0.3.37324: Flags [S.], seq 14190, ack 2868053600, win 4380, options [mss 1460], length 0
06:17:11.549577 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [.], ack 1, win 64240, length 0
06:17:11.549730 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [P.], seq 1:37, ack 1, win 64240, length 36
06:17:11.640422 IP 192.168.2.90.8899 > 172.17.0.3.37324: Flags [.], ack 37, win 4344, length 0
06:17:11.783443 IP 192.168.2.90.8899 > 172.17.0.3.37324: Flags [P.], seq 1:149, ack 37, win 4344, length 148
06:17:11.783597 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [.], ack 149, win 64092, length 0
06:17:11.784566 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [F.], seq 37, ack 149, win 64092, length 0
06:17:11.786367 IP 192.168.2.90.8899 > 172.17.0.3.37324: Flags [.], ack 38, win 4343, length 0
06:17:11.787127 IP 192.168.2.90.8899 > 172.17.0.3.37324: Flags [F.], seq 149, ack 38, win 4343, length 0
06:17:11.787286 IP 172.17.0.3.37324 > 192.168.2.90.8899: Flags [.], ack 150, win 64092, length 0
Now, it works (don't ask me why).
Do I need two docker instances (with different metric groups) if I want inverter data and battery data?
Now, it works (don't ask me why).
:+1:
Do I need two docker instances (with different metric groups) if I want inverter data and battery data?
No, just list the metric groups you want. This is documented https://github.com/kbialek/deye-inverter-mqtt#configuration
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I get the following info in the log-file:
2023-04-22 23:25:56,760 - DeyeDaemon - INFO - Reading registers [metrics group: deye_sg04lp3_battery, range: 0202-022e] 2023-04-22 23:26:46,807 - DeyeConnector - WARNING - Too many connection timeouts 2023-04-22 23:26:46,807 - DeyeModbus - ERROR - No response frame 2023-04-22 23:26:46,807 - DeyeModbus - ERROR - Modbus frame is too short or empty