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

Specify number of inverters in config.ini #148

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Conversation

OFreddy
Copy link
Contributor

@OFreddy OFreddy commented Feb 21, 2024

First of all I wan't to thank for the great work and valueable project. Well done!

In my case I have a lot of inverters defined in OpenDTU but not all of them should be forwarded to Venus OS.
My apporach is to define the amount of inverters in the config.ini file which should be forwarded.

It is totally backward compatible with the current solution as a value of 0 extracts the amount from the JSON response.

Another, but more complex solution, is to add an additional parameter to the inverter section with the advantage that the inverters to be taken into account do not necessarily have to be at the beginning.
A discussion about that is appreciated.

Added config parameter to  specify amount of computed inverters
config.ini Outdated
@@ -34,6 +34,10 @@ HTTPTimeout=2.5
Username =
Password =

# Number of inverters if not all from json response should be used
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move it up to line 10, also call it differently to show, that we query only the first amount X of devices. QueryOnlyFirstOfDTUInverter

Comment should be like: If you want to exclude Inverter, specify how many of the Inverters you want to query. Please assure that the order is correct in the DTU, we can only extract the first one in a row.

Please also update the README page

Changed config value name.
Updated comments and Readme.md.
Copy link
Collaborator

@0x7878 0x7878 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request. I've made a few comments.

Overall I'd just like to have a different name for the option like Query_first_X_Inverter.

README.md Outdated
@@ -89,7 +89,8 @@ Within the project there is a file `/data/dbus-opendtu/config.ini`. Most importa
|-------------------- | ------------- |
| SignOfLifeLog | Time in minutes how often a status is added to the log-file `current.log` with log-level INFO |
| NumberOfTemplates | Number ob Template Inverter to query |
| DTU | Which DTU to be used ahoy, opendtu or template REST devices Valid options: opendtu, ahoy, template |
| DTU | Which DTU to be used ahoy, opendtu or template REST devices Valid options: opendtu, ahoy, template |
| QueryOnlyFirstOfDTUInverter | Amount of Inverters you to query. Set a value larger than "0" when not all inverters should be considered. Please assure that the order is correct in the DTU, we can only extract the first one in a row. |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| QueryOnlyFirstOfDTUInverter | Amount of Inverters you to query. Set a value larger than "0" when not all inverters should be considered. Please assure that the order is correct in the DTU, we can only extract the first one in a row. |
| QueryOnlyFirstOfDTUInverter | Number of inverters you want to query. if you want to query all inverters, set this to 0. Please make sure that the order in the DTU is correct, we can only extract the first one in a row. |

The text is quite long, maybe it can be shortened and the rest could be in a footnote. See Footnotes

config.ini Show resolved Hide resolved
Copy link
Collaborator

@0x7878 0x7878 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me it's okay

@@ -89,7 +89,8 @@ Within the project there is a file `/data/dbus-opendtu/config.ini`. Most importa
|-------------------- | ------------- |
| SignOfLifeLog | Time in minutes how often a status is added to the log-file `current.log` with log-level INFO |
| NumberOfTemplates | Number ob Template Inverter to query |
| DTU | Which DTU to be used ahoy, opendtu or template REST devices Valid options: opendtu, ahoy, template |
| DTU | Which DTU to be used ahoy, opendtu or template REST devices Valid options: opendtu, ahoy, template |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@henne49 henne49 merged commit b94dc8f into henne49:main Feb 22, 2024
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

Successfully merging this pull request may close these issues.

3 participants