You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The changes to removed the unused parameters are good - not sure how that was missed in the previous PR, although they're superfluous anyway as the update_inverter_setting is designed to be called indirectly anyway.
I'd need to validate the correct API endpoint though I'm certain that the last time I checked newTcpsetAPI.do was the correct endpoint.
newTcpsetAPI.do does not work with Model SPF 5000 ES Inverter tcpSet.do does work with Model SPF 5000 ES Inverter tcpSet.do also work with data retrieval from inverter.
Example:
update_inverter_setting should be public because many exceptional case people want to pass raw parameters. Although this is possible in other way but I thought this is a neat.
I don't know you how validated or which inverter you validated to. Maybe growatt uses different API endpoint for different inverters.
Thanks @kaisarturan I don't think this was tested against the SPF inverter, which is why you're seeing this issue.
In order to make this universal and not break compatibility my suggestion would be to add a new parameter to the update_inverter_setting function called endpoint and make it default to the existing value.
Then add a new helper function like we have for mix and ac for spf inverters, that function can then override the default value for endpoint used by the update_inverter_setting function.
This will ensure it's then backwards compatible for other users as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Model SPF 5000 ES Inverter
AC Output Source Priority:
0:Bat Priority (SBU)
1:Pv Priority (SOL)
2:Uti Priority (UEI)
3:Pv&Uti Priority (SUB)
Example Request Parameters: