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

Installation with E3DC S10 (SunSpec mode) does not work #62

Open
SaschaHenning opened this issue Nov 13, 2021 · 7 comments
Open

Installation with E3DC S10 (SunSpec mode) does not work #62

SaschaHenning opened this issue Nov 13, 2021 · 7 comments

Comments

@SaschaHenning
Copy link

Version of the custom_component

0.0.18

Configuration

Not available since installation of intregration does not work.

Describe the bug

System:

Error occurs when trying to add the integration on "/config/integrations". It cannot install due to Failed to connect to host 192.168.0.245:502 slave 1 - Repeating group count not consistent with model length for model 803,model repeating len = 6, model repeating group len = 32(see logs below)

Did anyone successfully use this integration for an E3DC device?

It works fine when I use the modbus integration for direct register access. Here a part of my configuration (for details compare with excel above):

modbus:
  - name: E3DC
    type: tcp
    host: 192.168.0.245
    port: 502
    sensors:
      - name: e3dc_meter_home_incoming
        unit_of_measurement: kWh
        address: 40248 #40203+46-1
        slave: 1
        device_class: energy
        count: 2
        scan_interval: 15
        data_type: uint32
        scale: 0.001
        precision: 2
      - name: e3dc_meter_home_exporting
        unit_of_measurement: kWh
        address: 40240 #40203+38-1
        slave: 1
        device_class: energy
        count: 2
        scan_interval: 15
        data_type: uint32
        scale: 0.001
        precision: 2
...

Debug log

2021-11-13 21:03:09 DEBUG (MainThread) [custom_components.sunspec] New SunspecApi Client
2021-11-13 21:03:09 DEBUG (SyncWorker_1) [custom_components.sunspec] Client connect to IP 192.168.0.245 port 502 slave id 0 using timeout 60
2021-11-13 21:03:09 DEBUG (SyncWorker_1) [custom_components.sunspec] Client connected, perform initial scan
2021-11-13 21:03:09 ERROR (MainThread) [custom_components.sunspec] Failed to connect to host 192.168.0.245:502 slave 1 - Repeating group count not consistent with model length for model 803,model repeating len = 6, model repeating group len = 32
@CJNE
Copy link
Owner

CJNE commented Dec 15, 2021

Hi @SaschaHenning
There is a good chance that this problem has been fixed by the newly released pySunSpec2 release 1.0.6.
The latest release of this integration uses that version so you might have better luck using that?

@SaschaHenning
Copy link
Author

No changes -> tried again today

@CJNE
Copy link
Owner

CJNE commented Feb 7, 2022

OK, then the best chance to get this resolved is to file an issue at pySunSpec 2, the library we rely on for this.
https://github.com/sunspec/pysunspec2/issues
Include that error message about repeating group, it might be a bug in the SunSpec model, or in the inverter firmware.

@CJNE
Copy link
Owner

CJNE commented Feb 7, 2022

Try the latest release, it's using an updated version of pySunSpec2 that might fix your problem.

@SaschaHenning
Copy link
Author

Sorry, still no change.

2022-02-07 13:08:40 DEBUG (MainThread) [custom_components.sunspec] New SunspecApi Client
2022-02-07 13:08:40 DEBUG (SyncWorker_8) [custom_components.sunspec] Client connect to IP 192.168.0.245 port 502 slave id 1 using timeout 60
2022-02-07 13:08:40 DEBUG (SyncWorker_8) [custom_components.sunspec] Client connected, perform initial scan
2022-02-07 13:08:40 ERROR (MainThread) [custom_components.sunspec] Failed to connect to host 192.168.0.245:502 slave 1 - Repeating group count not consistent with model length for model 803,model repeating len = 6, model repeating group len = 32

@CJNE
Copy link
Owner

CJNE commented Feb 7, 2022

That's too bad, I had some hope that it would have been fixed. Can you create a bug report over there?

@siku2
Copy link

siku2 commented Aug 24, 2023

I recently decided to investigate this a bit, because the S10 actually exposes more information in the sunspec mode than in the proprietary E3DC mode.

As it turns out, sunspec isn't really great at backwards-compatibility. The S10 uses the spec from 2016 and the models for 801, 802, and 803 have changed significantly (and in a backwards-incompatible way) since then.
If you manually change the pysunspec2's models submodule all the way back to a commit in 2016 the S10 works out of the box.
I don't think sunspec really considers this a bug or even something that should be supported. The library isn't designed to dynamically swap these model definitions, so I really don't see a way for this to be fixed.

I might create a separate integration specifically for the S10's sunspec mode in the future to handle this.

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