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

[Solax] Changes in values parser for X3-Hybrid-G4 #17549

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

theater
Copy link
Contributor

@theater theater commented Oct 12, 2024

Some indexes were changed in the parsing based on user feedback.

It has been confirmed with the users that the changes do not affect the QVolt implementation and we can proceed with the review process.

@theater theater added enhancement An enhancement or new feature for an existing add-on work in progress A PR that is not yet ready to be merged labels Oct 12, 2024
@theater theater self-assigned this Oct 12, 2024
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/solax-binding/146326/203

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

These comments are probably the main reason to create this PR, so consider it as a double check. As you mention this might be breaking to users on current version, do you have some kind of information available (by API or otherwise) to determine the right indices like a version or schema string?

@theater
Copy link
Contributor Author

theater commented Oct 14, 2024

These comments are probably the main reason to create this PR, so consider it as a double check. As you mention this might be breaking to users on current version, do you have some kind of information available (by API or otherwise) to determine the right indices like a version or schema string?

Unfortunately everything is taken from other reverse-engineered implementations (python mostly). The problem is that the QVolt and X3-Hybrid-G4 return the same inverter type - 14. This leads me to believe that the API should be the same but changing indexes is indeed worrying. I will confirm that with users first (that's why the WIP flag).
If we have to support both and they provide different indexes (i.e. the expected values are in different places), probably I need to implement a parser for the QVolt which is bound to the type but not really taking the API's type into consideration.
Have you seen anything like that so far in any other bindings? Probably the automatic discovery will not work correctly for that...

@lsiepel
Copy link
Contributor

lsiepel commented Oct 18, 2024

These comments are probably the main reason to create this PR, so consider it as a double check. As you mention this might be breaking to users on current version, do you have some kind of information available (by API or otherwise) to determine the right indices like a version or schema string?

Unfortunately everything is taken from other reverse-engineered implementations (python mostly). The problem is that the QVolt and X3-Hybrid-G4 return the same inverter type - 14. This leads me to believe that the API should be the same but changing indexes is indeed worrying. I will confirm that with users first (that's why the WIP flag). If we have to support both and they provide different indexes (i.e. the expected values are in different places), probably I need to implement a parser for the QVolt which is bound to the type but not really taking the API's type into consideration. Have you seen anything like that so far in any other bindings? Probably the automatic discovery will not work correctly for that...

In general there are two scenario's (may be more):

  1. Versioning; The used schema (set if indices or whatever) is bases on some kind of property that can be determined up front. Either by dscovery or (additional) remote API call.
  2. Fallback; Use the default (most used) schema and if that fails (by error, missing property or unexpected result) it can fall back to the old behaviour.
    Obvious scenario 1 is prefered and i'm not that familair with this binding to give any advice on linking to a type and/or a specific parser. If you want to use a specific parser for a specific thing type, the thinghandler would be a place to control this. Not sure if there is a prefered way of implementing this. Just create something and we will see from there ;-)

Some values in the unit test are suspicious so need to clarify if they behave correct on his system.
Probably not compatible with QVolt's initial implementation

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@theater theater force-pushed the fixes-s3-hybrid-g4 branch from f8af901 to 19d61d0 Compare October 20, 2024 14:58
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
@theater
Copy link
Contributor Author

theater commented Oct 23, 2024

OK. It has been discussed with the community. It seems that QVolt and X3 Hybrid are the same inverter after all. The values in the initial parser were never correct and now they seem to be correct for both these inverters, so I would say that this change also contains a fixes for a non-working parse of some channels. We don't have to make any backwards compatibility magic...

@theater
Copy link
Contributor Author

theater commented Oct 23, 2024

@lsiepel not sure why the build has failed here. It seems that it never ran for the last commit I pushed. Do you know how we can retrigger it? I'm not sure how to login on the Jenkins and if I have the rights to do so...

@theater theater changed the title [Solax] (WIP) Changes in values parser for X3-Hybrid-G4 [Solax] Changes in values parser for X3-Hybrid-G4 Oct 24, 2024
@theater theater removed the work in progress A PR that is not yet ready to be merged label Oct 24, 2024
@theater
Copy link
Contributor Author

theater commented Oct 24, 2024

I got all the confirmations that the changes work well. The PR is ready for a review.

@lsiepel lsiepel added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Oct 25, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks LGTM

@lsiepel lsiepel merged commit 51e1205 into openhab:main Oct 25, 2024
5 checks passed
@lsiepel lsiepel added this to the 4.3 milestone Oct 25, 2024
KaaNee pushed a commit to KaaNee/openhab-addons that referenced this pull request Nov 8, 2024
* Fixes in indexes from Ruepert openhab#1

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Dec 16, 2024
* Fixes in indexes from Ruepert openhab#1

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
* Fixes in indexes from Ruepert openhab#1

Signed-off-by: Konstantin Polihronov <polychronov@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community approved enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants