-
Notifications
You must be signed in to change notification settings - Fork 42
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't connect to ECU-R #79
Comments
Hi @jeremiahsb, have you allready tried to use APSystemsSocket.py from my fork? Download it here: https://github.com/HAEdwin/homeassistant-apsystems_ecur/archive/refs/heads/main.zip |
@HAEdwin using your APSystemsSocket.py file, without the 216 in the line for YC600 gets this message: |
Unfortunately there's a bug in the integration. The inverter data returns 15 inverters but in fact you own 14 inverters of type YC600 and the 15th is the ECU itself with ID 21600002xxxx is that correct? |
I have updated my fork (quick and dirty), hope this this solves your issue. Download my repository from https://github.com/HAEdwin/homeassistant-apsystems_ecur/archive/refs/heads/main.zip to replace APSystemsSocket.py. |
@HAEdwin yep, that resolved the issue. Thanks! |
@jeremiahsb Have you ever removed/replaced this inverter 216000020769 from the ECU configuration? Just checking new code... |
@HAEdwin I haven't removed or replaced that inverter. |
ECU-R without the SunSpec logo
yc600 inverter with an ID of 216
Connected via WiFi only
I added 216 to the APSystemsSockets.py script (and restarted HA). Upon trying to add the IP address to apsystems_ecur in HA, I get this error in the logs:
This error originated from a custom integration.
Logger: custom_components.apsystems_ecur.config_flow
Source: custom_components/apsystems_ecur/APSystemsSocket.py:164
Integration: APSystems PV solar ECU (documentation)
First occurred: 2:57:55 PM (1 occurrences)
Last logged: 2:57:55 PM
APSystemsInvalidData exception: Unable to convert binary to int location=333 data=b'4150533131303333323030303230303031000f202206161452514090000942130130310258008f00c200f3002f00f34090000919060130310258009300be00f0003300f04090000917540130310258009300c300f200c200f24090000900150130310258009700c200f100c800f14090000895000130310258009500c100f300c000f34090000892680130310258008e00c300f300c700f34090000889350130310257009100c000f0002f00f04090000941000130310258008b00c400f1000000f14090000918590130310258009500c600f000c400f04090000913920130310258008400c400f3002e00f34090000897860130310257009400c500f200c300f24090000893310130310258008b00c100f0002e00f04090000889980030310000006400000000000000004090000885060130310257009400c100f200c200f2216000020769003030454e440a'
Traceback (most recent call last):
File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 159, in aps_int
return int(binascii.b2a_hex(codec[(start):(start+2)]), 16)
ValueError: invalid literal for int() with base 16: 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 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 148, in query_ecu
data = self.process_inverter_data()
File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 296, in process_inverter_data
(channel_data, location) = self.process_yc600(data, location)
File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 376, in process_yc600
power.append(self.aps_int(data, location))
File "/config/custom_components/apsystems_ecur/APSystemsSocket.py", line 164, in aps_int
raise APSystemsInvalidData(error)
custom_components.apsystems_ecur.APSystemsSocket.APSystemsInvalidData: Unable to convert binary to int location=333 data=b'4150533131303333323030303230303031000f202206161452514090000942130130310258008f00c200f3002f00f34090000919060130310258009300be00f0003300f04090000917540130310258009300c300f200c200f24090000900150130310258009700c200f100c800f14090000895000130310258009500c100f300c000f34090000892680130310258008e00c300f300c700f34090000889350130310257009100c000f0002f00f04090000941000130310258008b00c400f1000000f14090000918590130310258009500c600f000c400f04090000913920130310258008400c400f3002e00f34090000897860130310257009400c500f200c300f24090000893310130310258008b00c100f0002e00f04090000889980030310000006400000000000000004090000885060130310257009400c100f200c200f2216000020769003030454e440a'
The text was updated successfully, but these errors were encountered: