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

Can not connect to ECU. Check log #49

Closed
dclobato opened this issue Feb 22, 2022 · 3 comments
Closed

Can not connect to ECU. Check log #49

dclobato opened this issue Feb 22, 2022 · 3 comments

Comments

@dclobato
Copy link

After upgrading HA and the integration, I'm getting an error when I try to add my ECU.

After click on "Add Integration", select "APSystems PV solar ECU" and inform the IP address of the WiFi interface, I get a "Can not connect to the ECU" error message. I tried twice, and same error on both...

Below, the log:

2022-02-21 21:14:37 ERROR (MainThread) [custom_components.apsystems_ecur.config_flow] APSystemsInvalidData exception: Error getting checksum int from 'Inverter data' data=b''
Traceback (most recent call last):
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 212, in check_ecu_checksum
    checksum = int(data[5:9])
ValueError: invalid literal for int() with base 10: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/apsystems_ecur/config_flow.py", line 45, in async_step_user
    test_query = await self.hass.async_add_executor_job(ap_ecu.query_ecu)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 158, in query_ecu
    data = self.process_inverter_data()
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 287, in process_inverter_data
    self.check_ecu_checksum(data, "Inverter data")
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 217, in check_ecu_checksum
    raise APSystemsInvalidData(error)
custom_components.apsystems_ecur.APSystemsSocket.APSystemsInvalidData: Error getting checksum int from 'Inverter data' data=b''
2022-02-21 21:18:19 ERROR (MainThread) [custom_components.apsystems_ecur.config_flow] Unhandled exception: [Errno 104] Connection reset by peer
Traceback (most recent call last):
  File "/config/custom_components/apsystems_ecur/config_flow.py", line 45, in async_step_user
    test_query = await self.hass.async_add_executor_job(ap_ecu.query_ecu)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 150, in query_ecu
    self.inverter_raw_data = self.send_read_from_socket(cmd)
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 105, in send_read_from_socket
    return self.read_from_socket()
  File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 93, in read_from_socket
    data = self.sock.recv(self.recv_size)
ConnectionResetError: [Errno 104] Connection reset by peer

My ECU is on version 2.0.5017 (I think)

[dclobato@appserver] ~$ nc 10.0.1.19 8899
APS1100160001END
APS120117000121620000686001R▒
? "!!110015ECU_R_PRO_2.0.5017America/Sao_Paulo▒▒▒`Ũy▒00END
^C
[dclobato@appserver] ~$
@Emile86
Copy link

Emile86 commented Feb 22, 2022

Same problem here sinds today

image

Error log:

@tv3
Copy link

tv3 commented Feb 22, 2022

If you both are using an ECU_R_PRO with firmware 2.0.x, you might be running into same kind of issue as reported in #42

You could follow the suggestions in that issue to get integration working.

@dclobato
Copy link
Author

You could follow the suggestions in that issue to get integration working.

Yeah! It's working again! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants