Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New firmware not work #123

Closed
Joerglp opened this issue Sep 7, 2023 · 56 comments · Fixed by #124
Closed

New firmware not work #123

Joerglp opened this issue Sep 7, 2023 · 56 comments · Fixed by #124
Labels
help wanted Extra attention is needed

Comments

@Joerglp
Copy link

Joerglp commented Sep 7, 2023

Hardware (please complete the following information):

  • Inverter model:SUN-600G3-EU.

Software (please complete the following information):

  • Logger firmware version: MW3_16U_5406_2.06
  • deye-inverter-mqtt version:latest
  • config.env (remove passwords before pasting):
    LOG_LEVEL=INFO
    LOG_STREAM=STDOUT
    DEYE_DATA_READ_INTERVAL=60
    DEYE_METRIC_GROUPS=micro
    DEYE_LOGGER_SERIAL_NUMBER=4196253664
    DEYE_LOGGER_IP_ADDRESS=192.168.0.71
    DEYE_LOGGER_PORT=8899
    DEYE_FEATURE_MQTT_PUBLISHER=true
    DEYE_FEATURE_SET_TIME=true
    MQTT_HOST=192.168.0.101
    MQTT_PORT=1883
    MQTT_USERNAME=mqttuser
    MQTT_PASSWORD=#######ä
    MQTT_TOPIC_PREFIX=deye
    PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    LANG=C.UTF-8
    GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
    PYTHON_VERSION=3.10.10
    PYTHON_PIP_VERSION=22.3.1
    PYTHON_SETUPTOOLS_VERSION=65.5.1
    PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/d5cb0afaf23b8520f1bbcfed521017b4a95f5c01/public/get-pip.py
    PYTHON_GET_PIP_SHA256=394be00f13fa1b9aaa47e911bdb59a09c3b2986472130f30aa0bfaf7f3980637

Error:
2023-09-07 15:33:49,329 - DeyeDaemon - INFO - Reading start
2023-09-07 15:33:49,329 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-07 15:33:49,469 - DeyeModbus - ERROR - Response frame has invalid starting byte
2023-09-07 15:33:49,470 - DeyeMqttClient - INFO - Logger is offline

With Firmware 1.57 ist o.k.
Now with the new Firmware are not o.k.

@kbialek
Copy link
Owner

kbialek commented Sep 7, 2023

Thanks for reporting the problem @Joerglp . It seems like something has changed in version 2 of the firmware. Could you enable DEBUG logs, and try again, so we can see what is returned by the logger?

@Joerglp
Copy link
Author

Joerglp commented Sep 8, 2023 via email

@kbialek
Copy link
Owner

kbialek commented Sep 8, 2023

The response "41542b595a434d505645523d4d57335f3136555f353430365f322e30360d0a0d0a" is a hex encoded ascii string. After conversion it looks like this "AT+YZCMPVER=MW3_16U_5406_2.06", so it's a response from the AT command interface.

Possible options:

  1. Someone figures out how to do Modbus/TCP communication with loggers having fw v2.x
  2. Someone implements AT command support as a replacement of Modbus/TCP. Something similar to https://github.com/jedie/inverter-connect @jedie Do you know if it's feasible and could solve the problem?

EDIT:
@Joerglp Could you check in your logger web interface, if there is maybe an option to enable Modbus/TCP?

@SMCerina
Copy link

SMCerina commented Sep 8, 2023

I cannot see any option to enable Modbus/TCP even in the config_hide.html.

@kbialek
Copy link
Owner

kbialek commented Sep 8, 2023

Okay, perhaps Modbus/TCP interface has been moved to another TCP port. Can you scan your inverter IP with nmap?

@SMCerina
Copy link

SMCerina commented Sep 8, 2023

No other open port on the inverter.

80/tcp   open  http       LimitlessLED smart lightbulb bridge httpd
|_http-server-header: HTTPD
| http-methods: 
|_  Supported Methods: GET POST
|_http-title: 401 Unauthorized
| http-auth: 
| HTTP/1.0 401 Unauthorized\x0D
|_  Basic realm=USER LOGIN
8899/tcp open  ospf-lite?
| fingerprint-strings: 
|   GenericLines: 
|     AT+YZCMPVER=MW3_16U_5406_2.27
|     2211101306
|     2211101306
|     2211101306
|   GetRequest, HTTPOptions, NULL: 
|     AT+YZCMPVER=MW3_16U_5406_2.27
|     2211101306
|   RTSPRequest: 
|     AT+YZCMPVER=MW3_16U_5406_2.27
|     2211101306
|_    2211101306

@Joerglp
Copy link
Author

Joerglp commented Sep 8, 2023

I can see the Entry Server and Port 8899 in the config_hide.html.
I have the Firmware 2.06

@Joerglp
Copy link
Author

Joerglp commented Sep 8, 2023

Per Telnet:
telnet 192.168.0.71 8899
Connected to 192.168.0.71
AT+YZCMPVER=MW3_16U_5406_2.06

����B����X#��&����2211236711��
�� �������p��
������B�����Y���&����2211236711��
�� �������p��
������B��&����2211236711��
�� �������p��
������B����X#^C

@carstenfroehlich
Copy link

The big problem is, that the new SUN-MI-RELAY-01 is automatically updating the inverter to firmware version 2.27. So most of the users will have this problem in the near future.
Like me since 5 days...

@carstenfroehlich
Copy link

Maybe these settings are helping to analyse?
Screenshot_2023-09-09-09-01-30-80_40deb401b9ffe8e1df2f1cc5ba480b12
Screenshot_2023-09-09-09-01-41-63_40deb401b9ffe8e1df2f1cc5ba480b12

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

@Joerglp @SMCerina Could you please check if the AT interface works with the new firmware as before? If yes, then there is a chance to use for Modbus-over-AT communication.
For that you can use this project https://github.com/s10l/deye-logger-at-cmd

Here are the results I got from my logger running firmware v1

  1. Connectivity test:
❯ ./build/main -t 192.168.2.90:48899
2023/09/09 08:46:00 * Connecting :0 -> 192.168.2.90:48899...
2023/09/09 08:46:08 AP settings
2023/09/09 08:46:08 	Mode, SSID and Chanel:  11BGN,AP_XXXXXXXXX,AUTO
2023/09/09 08:46:08 	Encryption:             WPA2PSK,AES,712003b0
2023/09/09 08:46:08 Station settings
2023/09/09 08:46:08 	SSID:                   XXXXXXXXX
2023/09/09 08:46:08 	Key:                    WPA2PSK,AES,XXXXXXXXXX
2023/09/09 08:46:08 	IP:                     DHCP,192.168.2.90,255.255.255.0,192.168.2.1
2023/09/09 08:46:08 Web settings
2023/09/09 08:46:08 	Login:                  admin,admin
2023/09/09 08:46:09 
  1. Modbus read test:
❯ ./build/main -t 192.168.2.90:48899 -xmb 00280001
2023/09/09 09:02:21 * Connecting :0 -> 192.168.2.90:48899...
2023/09/09 09:02:24 +ok=01030204423AB50000
2023/09/09 09:02:25 

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

@carstenfroehlich What are the options available here?
image

@carstenfroehlich
Copy link

TCP-Server
TCP-Client
UDP

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

TCP-Server TCP-Client UDP

Exactly the same options as for my logger running on firmware v1

@carstenfroehlich
Copy link

carstenfroehlich commented Sep 9, 2023

maybe the values of the options have changed?
<select name="net_setting_pro_sel" id="div_5_3_tcp" style="width:250px" onclick="internetSet()"> <option value="TCPSERVER">TCP-Server</option> <option value="TCPCLIENT">TCP-Client</option> <option value="UDP">UDP</option></select>

@Joerglp
Copy link
Author

Joerglp commented Sep 9, 2023

./main -t 192.168.0.71:48899
2023/09/09 11:22:20 * Connecting :0 -> 192.168.0.71:48899...
2023/09/09 11:22:28 AP settings
2023/09/09 11:22:28 Mode, SSID and Chanel: 11BGN,AP_4196253664,AUTO
2023/09/09 11:22:28 Encryption: WPA2PSK,AES,847a4d1c
2023/09/09 11:22:28 Station settings
2023/09/09 11:22:28 SSID: XXXXX
2023/09/09 11:22:28 Key: WPA2PSK,AES,XXXXXXXXX
2023/09/09 11:22:28 IP: static,192.168.0.71,255.255.255.0,192.168.0.254
2023/09/09 11:22:28 Web settings
2023/09/09 11:22:28 Login: admin,admin
2023/09/09 11:22:29
./main -t 192.168.0.71:48899 -xmb 00280001
2023/09/09 11:23:01 * Connecting :0 -> 192.168.0.71:48899...
2023/09/09 11:23:04 +ok=0103020064B9AF
2023/09/09 11:23:05

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

@Joerglp Thanks. This looks very promising.

@carstenfroehlich
Copy link

this is from my server:

go run main.go -t 192.168.178.108:48899
2023/09/09 12:43:09 * Connecting :0 -> 192.168.178.108:48899...
2023/09/09 12:43:17 AP settings
2023/09/09 12:43:17 Mode, SSID and Chanel: 11BGN,AP_XXXXXXX,AUTO
2023/09/09 12:43:17 Encryption: WPA2PSK,AES,XXXXXX
2023/09/09 12:43:17 Station settings
2023/09/09 12:43:17 SSID: XXXXXXXXXXX
2023/09/09 12:43:17 Key: WPA2PSK,AES,XXXXXXXX
2023/09/09 12:43:17 IP: DHCP,192.168.178.108,255.255.255.0,192.168.178.1
2023/09/09 12:43:17 Web settings
2023/09/09 12:43:17 Login: XXXXXXX,XXXXXXXX
2023/09/09 12:43:18

go run main.go -t 192.168.178.108:48899 -xmb 00280001
2023/09/09 12:46:08 * Connecting :0 -> 192.168.178.108:48899...
2023/09/09 12:46:11 +ok=0103020064B9AF
2023/09/09 12:46:12

@carstenfroehlich
Copy link

does this help?
2023-09-09 12:31:28,362 - DeyeDaemon - INFO - Reading start 2023-09-09 12:31:28,363 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074] 2023-09-09 12:31:28,371 - DeyeModbus - ERROR - Response frame has invalid starting byte 2023-09-09 12:31:28,375 - DeyeMqttClient - INFO - Logger is offline 2023-09-09 12:31:28,375 - DeyeDaemon - INFO - Reading completed

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

Your tests proven, that it's possible to use Modbus-over-AT to read the data. I've started working on that feature. Stay tuned.

@maehtricks
Copy link

maehtricks commented Sep 9, 2023

It actually works with https://github.com/jedie/inverter-connect via Modbus over AT (SUN-600G3 with 2.27)

./cli.py print-values --ip 192.168.71.178 --port 48899 -c

image

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

Here is a beta image that uses AT commands for communication with the inverter exclusively. ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-1 Try it out.

The implementation is very hacky now. Primarily error handling is very poor. However it's ready to start collecting feedback.

No extra config changes are necessary.

@Joerglp
Copy link
Author

Joerglp commented Sep 9, 2023

Now I became that:
2023-09-09 15:43:08,215 - DeyeDaemon - INFO - Please help me build the list of compatible inverters. #41
2023-09-09 15:43:08,215 - DeyeAtConnector - INFO - Hello
2023-09-09 15:43:08,259 - paho.mqtt.client - DEBUG - Sending CONNECT (u1, p1, wr1, wq1, wf1, c1, k60) client_id=b'deye-inverter-4196253664'
2023-09-09 15:43:08,261 - paho.mqtt.client - DEBUG - Received CONNACK (0, 0)
2023-09-09 15:43:08,262 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r1, m1), 'b'deye/status'', ... (6 bytes)
2023-09-09 15:43:08,262 - DeyeMqttClient - INFO - Successfully connected to MQTT Broker located at 192.168.0.101:1883
2023-09-09 15:43:08,263 - DeyeDaemon - INFO - Feature "Report metrics over MQTT": enabled
2023-09-09 15:43:08,263 - DeyeDaemon - INFO - Feature "Set inverter time once online": enabled
2023-09-09 15:43:08,263 - DeyeDaemon - DEBUG - Start to execute the daemon at intervals of 60 seconds
2023-09-09 15:43:08,264 - DeyeDaemon - INFO - Reading start
2023-09-09 15:43:08,264 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-09 15:43:08,265 - DeyeAtConnector - DEBUG - Sending AT command: b'WIFIKIT-214028-READ'
2023-09-09 15:43:08,265 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 1)
2023-09-09 15:43:08,766 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'192.168.0.71,E8FDF88E20F6,4196253664'
2023-09-09 15:43:08,766 - DeyeAtConnector - DEBUG - Sending AT command: b'+ok'
2023-09-09 15:43:09,267 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+INVDATA=8,0103003c003945d4\n'
2023-09-09 15:43:09,768 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'+ok=01\x1003\x1072\x1000\x101D\x1000\x1000\x1000\x1000\x100F\x10F2\x1000\x1000\x1000\x100E\x1000\x100E\x1000\x1000\x1000\x1000\x1007\x10BD\x1000\x1000\x1007\x10D1\x1000\x1000\x1009\x1038\x1000\x1000\x1000\x1000\x1000\x1001\x1000\x1000\x1000\x1000\x1013\x1088\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1001\x1068\x1000\x1000\x1000\x1000\x1000\x1000\x1012\x10E8\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x10EA\x1000\x1007\x1000\x10FA\x1000\x1007\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1058\x10AB\x10\r\n\r\n'
2023-09-09 15:43:09,768 - DeyeAtConnector - DEBUG - Extracted Modbus response 010372001D000000000FF20000000E000E0000000007BD000007D100000938000000000001000000001388000000000000000000000000016800000000000012E800000000000000000000000000000000000000000000000000000000000000000000000000EA000700FA00070000000000000000
2023-09-09 15:43:09,768 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+Q\n'
2023-09-09 15:43:10,269 - DeyeModbus - ERROR - Modbus frame is too short
2023-09-09 15:43:10,270 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/logger_status', value: 'offline'
2023-09-09 15:43:10,270 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m2), 'b'deye/logger_status'', ... (7 bytes)
2023-09-09 15:43:10,271 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 2)
2023-09-09 15:43:10,272 - DeyeMqttClient - INFO - Logger is offline
2023-09-09 15:43:10,272 - DeyeDaemon - INFO - Reading completed
2023-09-09 15:44:08,344 - paho.mqtt.client - DEBUG - Sending PINGREQ
2023-09-09 15:44:08,375 - paho.mqtt.client - DEBUG - Received PINGRESP
2023-09-09 15:44:10,274 - DeyeDaemon - INFO - Reading start
2023-09-09 15:44:10,278 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-09 15:44:10,279 - DeyeAtConnector - DEBUG - Sending AT command: b'WIFIKIT-214028-READ'
2023-09-09 15:44:10,781 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'192.168.0.71,E8FDF88E20F6,4196253664'
2023-09-09 15:44:10,781 - DeyeAtConnector - DEBUG - Sending AT command: b'+ok'
2023-09-09 15:44:11,285 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+INVDATA=8,0103003c003945d4\n'
2023-09-09 15:44:11,786 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'+ok=01\x1003\x1072\x1000\x101D\x1000\x1000\x1000\x1000\x100F\x10F2\x1000\x1000\x1000\x100E\x1000\x100E\x1000\x1000\x1000\x1000\x1007\x10BD\x1000\x1000\x1007\x10D1\x1000\x1000\x1009\x1038\x1000\x1000\x1000\x1000\x1000\x1001\x1000\x1000\x1000\x1000\x1013\x1088\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1001\x1068\x1000\x1000\x1000\x1000\x1000\x1000\x1012\x10E8\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x10EA\x1000\x1007\x1000\x10FA\x1000\x1007\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1058\x10AB\x10\r\n\r\n'
2023-09-09 15:44:11,787 - DeyeAtConnector - DEBUG - Extracted Modbus response 010372001D000000000FF20000000E000E0000000007BD000007D100000938000000000001000000001388000000000000000000000000016800000000000012E800000000000000000000000000000000000000000000000000000000000000000000000000EA000700FA00070000000000000000
2023-09-09 15:44:11,787 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+Q\n'
2023-09-09 15:44:12,290 - DeyeModbus - ERROR - Modbus frame is too short
2023-09-09 15:44:12,292 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/logger_status', value: 'offline'
2023-09-09 15:44:12,295 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m3), 'b'deye/logger_status'', ... (7 bytes)
2023-09-09 15:44:12,296 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 3)
2023-09-09 15:44:12,297 - DeyeMqttClient - INFO - Logger is offline
2023-09-09 15:44:12,298 - DeyeDaemon - INFO - Reading completed
2023-09-09 15:45:08,393 - paho.mqtt.client - DEBUG - Sending PINGREQ
2023-09-09 15:45:08,395 - paho.mqtt.client - DEBUG - Received PINGRESP
2023-09-09 15:45:10,272 - DeyeDaemon - INFO - Reading start
2023-09-09 15:45:10,275 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-09 15:45:10,275 - DeyeAtConnector - DEBUG - Sending AT command: b'WIFIKIT-214028-READ'
2023-09-09 15:45:15,780 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:20,784 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:25,788 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:30,793 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:35,798 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:35,798 - DeyeAtConnector - WARNING - Too many connection timeouts
2023-09-09 15:45:35,798 - DeyeAtConnector - DEBUG - Sending AT command: b'+ok'
2023-09-09 15:45:36,299 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+INVDATA=8,0103003c003945d4\n'
2023-09-09 15:45:41,804 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:46,808 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:51,812 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:45:56,816 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:46:01,820 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-09 15:46:01,820 - DeyeAtConnector - WARNING - Too many connection timeouts
2023-09-09 15:46:01,820 - DeyeDaemon - ERROR - Unexpected error during daemon execution
Traceback (most recent call last):
File "/opt/deye_inverter_mqtt/deye_daemon.py", line 167, in __invoke_action
self.action()
File "/opt/deye_inverter_mqtt/deye_daemon.py", line 89, 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 50, in read_registers
modbus_resp_frame = self.connector.send_request(modbus_frame + modbus_crc)
File "/opt/deye_inverter_mqtt/deye_at_connector.py", line 95, in send_request
if at_response.startswith(b'+ok='):
AttributeError: 'NoneType' object has no attribute 'startswith'
2023-09-09 15:46:08,475 - paho.mqtt.client - DEBUG - Sending PINGREQ
2023-09-09 15:46:08,477 - paho.mqtt.client - DEBUG - Received PINGRESP
2023-09-09 15:46:10,272 - DeyeDaemon - INFO - Reading start
2023-09-09 15:46:10,273 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-09 15:46:10,273 - DeyeAtConnector - DEBUG - Sending AT command: b'WIFIKIT-214028-READ'
2023-09-09 15:46:10,863 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'192.168.0.71,E8FDF88E20F6,4196253664'
2023-09-09 15:46:10,863 - DeyeAtConnector - DEBUG - Sending AT command: b'+ok'
2023-09-09 15:46:11,364 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+INVDATA=8,0103003c003945d4\n'
2023-09-09 15:46:11,938 - DeyeAtConnector - DEBUG - Received response frame in 1. attempt: b'+ok=01\x1003\x1072\x1000\x101D\x1000\x1000\x1000\x1000\x100F\x10F2\x1000\x1000\x1000\x100E\x1000\x100E\x1000\x1000\x1000\x1000\x1007\x10BD\x1000\x1000\x1007\x10D1\x1000\x1000\x1009\x1024\x1000\x1000\x1000\x1000\x1000\x1001\x1000\x1000\x1000\x1000\x1013\x1088\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1001\x1068\x1000\x1000\x1000\x1000\x1000\x1000\x1012\x1098\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x10F6\x1000\x1007\x1000\x10F8\x1000\x1007\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x1000\x10BB\x10AA\x10\r\n\r\n'
2023-09-09 15:46:11,938 - DeyeAtConnector - DEBUG - Extracted Modbus response 010372001D000000000FF20000000E000E0000000007BD000007D1000009240000000000010000000013880000000000000000000000000168000000000000129800000000000000000000000000000000000000000000000000000000000000000000000000F6000700F800070000000000000000
2023-09-09 15:46:11,939 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+Q\n'
2023-09-09 15:46:12,440 - DeyeModbus - ERROR - Modbus frame is too short
2023-09-09 15:46:12,443 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/logger_status', value: 'offline'
2023-09-09 15:46:12,443 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m4), 'b'deye/logger_status'', ... (7 bytes)
2023-09-09 15:46:12,445 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 4)
2023-09-09 15:46:12,445 - DeyeMqttClient - INFO - Logger is offline
2023-09-09 15:46:12,445 - DeyeDaemon - INFO - Reading completed

@Joerglp
Copy link
Author

Joerglp commented Sep 9, 2023

With the tool from @maehtricks works
inverter v0.13.0
(Set log level 0: ERROR)

InverterInfo(ip='192.168.0.71', mac='E8FDF88E20F6', serial=4196253664)

Fetch...PV1 Voltage,PV2 Voltage,PV1 Current,PV2 Current,Daily Production,Daily Production 1,Daily Production 2,Total Production,Total Production 1,Total Production 2,Active Power Regulations,PV1 Power,PV2 Power,Total Power,
Signing off with "AT+Q"...Goodbye ;)

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Inverter Values
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┓
┃ Counter ┃ Name ┃ Value ┃ Register ┃ Length ┃ Raw data ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━┩
│ 1 │ PV1 Voltage │ 23.4 V │ 006D │ 1 │ 00ea │
│ 2 │ PV2 Voltage │ 24.6 V │ 006F │ 1 │ 00f6 │
│ 3 │ PV1 Current │ 0.4 A │ 006E │ 1 │ 0004 │
│ 4 │ PV2 Current │ 0.4 A │ 0070 │ 1 │ 0004 │
│ 5 │ Daily Production │ 2.9 kWh │ 003C │ 1 │ 001d │
│ 6 │ Daily Production 1 │ 1.4 kWh │ 0041 │ 1 │ 000e │
│ 7 │ Daily Production 2 │ 1.4 kWh │ 0042 │ 1 │ 000e │
│ 8 │ Total Production │ 408.2 kWh │ 003F │ 2 │ 0ff20000 │
│ 9 │ Total Production 1 │ 198.1 kWh │ 0045 │ 1 │ 07bd │
│ 10 │ Total Production 2 │ 200.1 kWh │ 0047 │ 1 │ 07d1 │
│ 11 │ Active Power Regulations │ 100 % │ 0028 │ 1 │ 0064 │
│ 12 │ PV1 Power │ 9.36 W │ - │ - │ (Computed) │
│ 13 │ PV2 Power │ 9.84 W │ - │ - │ (Computed) │
│ 14 │ Total Power │ 19.2 W │ - │ - │ (Computed) │
└─────────┴──────────────────────────┴──────────────────┴──────────┴────────┴────────────┘
───────────────────────────────────────────────────── Sa 09 Sep 2023 18:06:33 ─────────────────────────────────────────────────────

@carstenfroehlich
Copy link

carstenfroehlich commented Sep 9, 2023

seems it is not working
2023-09-09 16:27:13,632 - DeyeDaemon - INFO - Please help me build the list of compatible inverters. https://github.com/kbialek/deye-inverter-mqtt/issues/41 2023-09-09 16:27:13,666 - paho.mqtt.client - DEBUG - Sending CONNECT (u0, p0, wr1, wq1, wf1, c1, k60) client_id=b'deye-inverter-3939493096' 2023-09-09 16:27:13,668 - paho.mqtt.client - DEBUG - Received CONNACK (0, 0) 2023-09-09 16:27:14,669 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r1, m1), 'b'deye/status'', ... (6 bytes) 2023-09-09 16:27:14,670 - DeyeMqttClient - INFO - Successfully connected to MQTT Broker located at 192.168.178.113:1883 2023-09-09 16:27:14,671 - DeyeDaemon - INFO - Feature "Report metrics over MQTT": enabled 2023-09-09 16:27:14,671 - DeyeDaemon - INFO - Feature "Set inverter time once online": disabled 2023-09-09 16:27:14,672 - DeyeDaemon - DEBUG - Start to execute the daemon at intervals of 30 seconds 2023-09-09 16:27:14,674 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 1) 2023-09-09 16:27:14,675 - DeyeDaemon - INFO - Reading start 2023-09-09 16:27:14,677 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074] 2023-09-09 16:27:14,681 - DeyeConnector - DEBUG - Request frame: a5170010450000e8e4cfea0200000000000000000000000000000103003c003945d48515 2023-09-09 16:27:14,686 - DeyeConnector - DEBUG - Received response frame in 1. attempt: 41542b595a434d505645523d4d57335f3136555f353430365f322e32370d0a0d0a 2023-09-09 16:27:14,687 - DeyeModbus - ERROR - Response frame has invalid starting byte 2023-09-09 16:27:14,688 - DeyeMqttClient - DEBUG - Publishing message. topic: 'deye/logger_status', value: 'offline' 2023-09-09 16:27:14,690 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r0, m2), 'b'deye/logger_status'', ... (26 bytes) 2023-09-09 16:27:14,692 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 2) 2023-09-09 16:27:14,694 - DeyeMqttClient - INFO - Logger is offline 2023-09-09 16:27:14,694 - DeyeDaemon - INFO - Reading completed

@kbialek
Copy link
Owner

kbialek commented Sep 9, 2023

Thanks for the logs. They are very helpful. I see where the problem is. My logger appends trailing zeros to the Modbus response. You can see it here #123 (comment) I'm talking about this "+ok=01030204423AB50000"
In my initial implementation I've decided to blindly drop them. However your loggers work correctly and do not append those trailing zeros, so the "fix" I've added actually broke it.
Now it's also clear for me why https://github.com/jedie/inverter-connect does not work for me. Exactly because of these trailing zeros.

Here is a new, fixed docker image ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-2

@carstenfroehlich
Copy link

Thanks a lot.
I have deployed it but I can test it tomorrow, because the inverter is currently down without sun.
I will report then.

@Joerglp
Copy link
Author

Joerglp commented Sep 9, 2023

I would also like to say a big thank you for your quick work. Update has been installed, but we won't see the result until tomorrow morning. It's hard for me to stand on the carport roof with a headlight and illuminate the solar panel...
what should the neighbors think....
so let's hope for the best!

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@Joerglp @carstenfroehlich Here is a new docker image with another bugfix ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-3

@carstenfroehlich
Copy link

carstenfroehlich commented Sep 10, 2023

Maybe I am doing something absolutely wrong, but I have pulled the third patch and restarted my docker container.
Result is still the same and I have still the debug message from DeyeConnector Class...

I have also tried to rebuild the container with the no-cache option without any other result

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@carstenfroehlich Pulling is not enough. This image is not tagged as latest, thus you also have to explicitly reference the image version in your docker run configuration.

@carstenfroehlich
Copy link

@carstenfroehlich Pulling is not enough. This image is not tagged as latest, thus you also have to explicitly reference the image version in your docker run configuration.

OK, thanks, I have to read about this a bit. Until now I always checked out a branch, restart my container and it works. I have currently no idea where to find this docker run configuration. Do you mean the docker compose file?

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@carstenfroehlich If you use docker-compose - then yes, you should reference the image like this

services:
  deye-mqtt:
    image: ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-3
    env_file:
      - config.env
    restart: unless-stopped

@Joerglp
Copy link
Author

Joerglp commented Sep 10, 2023

Hello, thank.
It‘s work now.

@carstenfroehlich
Copy link

Hi,
the patch is working, but it seems, that the output format for telegraf is not correct.
My influxdb is not receiving other data than the total_energy.
2023-09-10T08:46:53Z D! [outputs.influxdb_v2] Wrote batch of 10 metrics in 8.814369ms 2023-09-10T08:46:53Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335603678723268 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=268 1694335604685585777 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335605686476802 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=266 1694335606709000591 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335607642289198 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335608697057763 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=266 1694335609649502380 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335610654414048 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335611656056068 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=266 1694335612657921937 2023-09-10T08:46:53Z D! [outputs.file] Wrote batch of 10 metrics in 1.887356ms 2023-09-10T08:46:53Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics 2023-09-10T08:46:53Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:46:54Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:46:55Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:46:56Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:46:57Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: invalid character 'o' looking for beginning of value 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: must be an object or an array of objects 2023-09-10T08:46:58Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value ^X2023-09-10T08:46:59Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:47:00Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:47:01Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:47:02Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:47:03Z D! [outputs.influxdb_v2] Wrote batch of 10 metrics in 8.820892ms 2023-09-10T08:47:03Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=267 1694335613661503043 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=281 1694335614663369052 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=280 1694335615663010770 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=280 1694335616668391001 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335617674698329 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335618684564933 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335619704615890 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335620679162818 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335621677448298 mqtt_consumer,host=dfd91121bec7,topic=tele/tasmota_E27D60/SENSOR LK13BE_Power_curr=282 1694335622687034480 2023-09-10T08:47:03Z D! [outputs.file] Wrote batch of 10 metrics in 1.948691ms 2023-09-10T08:47:03Z D! [outputs.file] Buffer fullness: 0 / 10000 metrics 2023-09-10T08:47:03Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value 2023-09-10T08:47:04Z E! [inputs.mqtt_consumer] Error in plugin: invalid character ':' after top-level value

@kbialek kbialek linked a pull request Sep 10, 2023 that will close this issue
@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@carstenfroehlich

the patch is working, but it seems, that the output format for telegraf is not correct.
My influxdb is not receiving other data than the total_energy.

This is strange. My changes have nothing to do with metrics processing. Perhaps there was an unhandled communication error with the logger, which caused that. Please collect more logs.

@Joerglp

Nice. It's working for me too. Let's run it for one more day to see if it's stable enough.

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

Here is another docker image ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-4

Before using it, you have to update your configuration

  1. Remove DEYE_LOGGER_PORT env variable
  2. Add DEYE_LOGGER_PROTOCOL=at env variable

For more info read this https://github.com/kbialek/deye-inverter-mqtt/tree/feature/at-interface#installation

@carstenfroehlich Please check if it also resolves your problem with influx integration.

@carstenfroehlich
Copy link

carstenfroehlich commented Sep 10, 2023

sorry, but there seems to be an error in logging
`
docker logs deye-inverter-mqtt_deye-mqtt_1

Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
`

@carstenfroehlich
Copy link

The problems in influx integration are not solved.
With the beta-4 image i do not get any data anymore...
When I reset to the master, logging is working again, but not receiving any data like before

@SMCerina
Copy link

The beta 4 image is working for me. Thank you for your quick support.

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@carstenfroehlich Share debug logs and your config.env

@carstenfroehlich
Copy link

carstenfroehlich commented Sep 10, 2023

@kbialek this is my config.env:
`
DEYE_LOGGER_IP_ADDRESS=192.168.178.108
#DEYE_LOGGER_PORT=8899
DEYE_LOGGER_PROTOCOL=at
DEYE_LOGGER_SERIAL_NUMBER=3939493096

MQTT_HOST=192.168.178.113
MQTT_PORT=1883
MQTT_USERNAME=
MQTT_PASSWORD=
MQTT_TOPIC_PREFIX=deye
MQTT_TLS_ENABLED=false
#MQTT_TLS_INSECURE=true
#MQTT_TLS_CA_CERT_PATH=certs/ca.crt
#MQTT_TLS_CLIENT_CERT_PATH=certs/client.crt
#MQTT_TLS_CLIENT_KEY_PATH=certs/client.key

LOG_LEVEL=DEBUG
#LOG_STREAM=STDOUT
#PLUGINS_DIR=plugins
DEYE_DATA_READ_INTERVAL=30
DEYE_METRIC_GROUPS=micro
`

this is my whole debug log from this container:

docker logs deye-inverter-mqtt_deye-mqtt_1

Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Error setting up logging: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

The error is the only entry in the log, once per minute

the result then is, that in MQTT Data no topic deye is existing:
image

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@carstenfroehlich I'm pretty much confident that you are still running the latest or 2023.08.1 image version, which requires DEYE_LOGGER_PORT env variable. When this variable is not present the error you posted is printed. You see it once per minute, because docker restarts the container.

EDIT:
Or one of the former beta version. Please simply ensure that you are running ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-4

@Joerglp
Copy link
Author

Joerglp commented Sep 10, 2023

@kbialek
Beta3 is running flawlessly for me so far. Telegraf fetches the data from Mqtt and delivers it to the influxDB.
Thanks again!
I'll get back to you in a few days and let you know whether the beta is running smoothly.

@kbialek
Copy link
Owner

kbialek commented Sep 10, 2023

@Joerglp Thanks. Could you please test beta-4 too? Instructions are here #123 (comment)

@carstenfroehlich
Copy link

@carstenfroehlich I'm pretty much confident that you are still running the latest or 2023.08.1 image version, which requires DEYE_LOGGER_PORT env variable. When this variable is not present the error you posted is printed. You see it once per minute, because docker restarts the container.

EDIT: Or one of the former beta version. Please simply ensure that you are running ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-4

you are totally right, sorry for the confusion.
I had additionally to the image entry an build entry in my docker compose file, so it was always overwriting your beta image!
Thanks a lot for your support!
I will test it tomorrow, but currently this is the log:

2023-09-10 18:46:17,870 - DeyeDaemon - INFO - Please help me build the list of compatible inverters. #41
2023-09-10 18:46:17,870 - DeyeConnectorFactory - INFO - Creating Modbus/AT Logger connector
2023-09-10 18:46:17,871 - DeyeAtConnector - INFO - Hello
2023-09-10 18:46:17,903 - paho.mqtt.client - DEBUG - Sending CONNECT (u0, p0, wr1, wq1, wf1, c1, k60) client_id=b'deye-inverter-3939493096'
2023-09-10 18:46:17,906 - paho.mqtt.client - DEBUG - Received CONNACK (0, 0)
2023-09-10 18:46:18,908 - paho.mqtt.client - DEBUG - Sending PUBLISH (d0, q1, r1, m1), 'b'deye/status'', ... (6 bytes)
2023-09-10 18:46:18,909 - DeyeMqttClient - INFO - Successfully connected to MQTT Broker located at 192.168.178.113:1883
2023-09-10 18:46:18,909 - DeyeDaemon - INFO - Feature "Report metrics over MQTT": enabled
2023-09-10 18:46:18,910 - DeyeDaemon - INFO - Feature "Set inverter time once online": disabled
2023-09-10 18:46:18,910 - DeyeDaemon - DEBUG - Start to execute the daemon at intervals of 30 seconds
2023-09-10 18:46:18,911 - paho.mqtt.client - DEBUG - Received PUBACK (Mid: 1)
2023-09-10 18:46:18,912 - DeyeDaemon - INFO - Reading start
2023-09-10 18:46:18,913 - DeyeDaemon - INFO - Reading registers [metrics group: micro, range: 003c-0074]
2023-09-10 18:46:18,914 - DeyeAtConnector - DEBUG - Sending AT command: b'WIFIKIT-214028-READ'
2023-09-10 18:46:20,015 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-10 18:46:21,017 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-10 18:46:22,018 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-10 18:46:23,020 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-10 18:46:24,022 - DeyeAtConnector - DEBUG - Connection response timeout
2023-09-10 18:46:24,022 - DeyeAtConnector - WARNING - Too many connection timeouts
2023-09-10 18:46:24,023 - DeyeAtConnector - DEBUG - Sending AT command: b'+ok'
2023-09-10 18:46:24,124 - DeyeAtConnector - DEBUG - Sending AT command: b'AT+INVDATA=8,0103003c003945d4\n'

Looks good!

@Joerglp
Copy link
Author

Joerglp commented Sep 11, 2023

@kbialek beta4 ist deployed. I'll see if it's working during the day.

Edit:
It‘s work.

@carstenfroehlich
Copy link

Now the inverter seems to be damaged... The external relay has worked for one day. Now the inverter shows a permanent red light. So poorly I'm out for testing...

@Joerglp
Copy link
Author

Joerglp commented Sep 11, 2023

Everything is still going great for me.

@Joerglp
Copy link
Author

Joerglp commented Sep 11, 2023

It's been working for me without crashes so far

@kbialek
Copy link
Owner

kbialek commented Sep 11, 2023

Same for me. It seems like the implementation is good enough.

@kbialek
Copy link
Owner

kbialek commented Sep 12, 2023

The latest beta before the release ghcr.io/kbialek/deye-inverter-mqtt:2023.09.1-beta-5

@Joerglp
Copy link
Author

Joerglp commented Sep 12, 2023

Ok! Is deployed. What was changed? Ich give answer tomorrow.

@kbialek
Copy link
Owner

kbialek commented Sep 12, 2023

I've merged this #125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants