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

Mapping for running_state #53

Closed
michbeck100 opened this issue Jun 2, 2022 · 6 comments
Closed

Mapping for running_state #53

michbeck100 opened this issue Jun 2, 2022 · 6 comments

Comments

@michbeck100
Copy link
Collaborator

I started using SunGather and I'm thinking to move from modbus4mqtt. Unfortunately it seems that SunGather doesn't support a mapping for running_state.
According to the sungrow documentation this is the mapping:
image
So running_state actually contains 8 values.

How can I achieve such a mapping?

michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 3, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 3, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 3, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 3, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 8, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 8, 2022
michbeck100 added a commit to michbeck100/SunGather that referenced this issue Jun 8, 2022
bohdan-s added a commit that referenced this issue Jul 7, 2022
@danielHin
Copy link
Contributor

danielHin commented Jul 7, 2022

Hi, the merge introduced a bug.

Traceback (most recent call last): File "sungather.py", line 584, in <module> main() File "sungather.py", line 552, in main export.publish(inverter) File "/src/github/SunGather/SunGather/exports/console.py", line 26, in publish print("| {:<7} | {:<35} | {:<20} |".format(str(inverter.getRegisterAddress(register)), str(register), str(value) + " " + str(inverter.getRegisterUnit(register)))) File "sungather.py", line 265, in getRegisterAddress return register['address'] KeyError: 'address'

it happens when reading register running_state

@michbeck100
Copy link
Collaborator Author

michbeck100 commented Jul 7, 2022

No it happens when reading the address of run_state, which is a custom register without address. It used to have a "virtual" address, but commit bc8493f changed this. This is not because of my changes. @bohdan-s why did you remove the address?

@michbeck100
Copy link
Collaborator Author

this fixes it again: #57

@danielHin
Copy link
Contributor

thy for fixing.

@michbeck100 @bohdan-s
another issue I've just saw. The newly introduced 'import_from_grid' register in the registers file clashes with the custom 'import_from_grid' register and overwrites the value.

Maybe we rename the running state registers by prefix them with state_ or running_state_ ?

Alternatively we could rename import_from_grid and export_to_grid to custom_*.

But its more obvious at lest to me to rename the new running state registers to make it more clear

@danielHin
Copy link
Contributor

proposed renaming in #59

@michbeck100
Copy link
Collaborator Author

I think this can be closed now

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

2 participants