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

tcp: Allow serial number to mismatch in reply #197

Merged
merged 1 commit into from
May 31, 2022

Conversation

MarijnS95
Copy link
Contributor

As it turns out the serial number does not seem to be required in the request packet, in order to extract data from the inverter. This field is present in the "header" around the TCP packet, most likely to keep the format the same between requests and replies but is not actually checked by the inverter before it sends back a valid reply.

By being more lenient here we can recommend - or at least request - the community to test with a nonmatching (e.g. 0) serial number, instead of having to look it up on the screen or through the javascript backend.

As it turns out the serial number _does not seem_ to be required in the
request packet, in order to extract data from the inverter.  This field
is present in the "header" around the TCP packet, most likely to keep
the format the same between requests and replies but is not actually
checked by the inverter before it sends back a valid reply.

By being more lenient here we can recommend - or at least request - the
community to test with a nonmatching (e.g. `0`) serial number, instead
of having to look it up on the screen or through the `javascript`
backend.
@codecov
Copy link

codecov bot commented May 31, 2022

Codecov Report

Merging #197 (9135cac) into main (928802e) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #197   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          325       323    -2     
  Branches        65        63    -2     
=========================================
- Hits           325       323    -2     
Impacted Files Coverage Δ
omnikinverter/tcp.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 928802e...9135cac. Read the comment docs.

@klaasnicolaas klaasnicolaas added the bugfix Fixing a bug. label May 31, 2022
@klaasnicolaas klaasnicolaas merged commit 8e10275 into klaasnicolaas:main May 31, 2022
@MarijnS95 MarijnS95 deleted the tcp-allow-sn-mismatch branch May 31, 2022 14:47
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix Fixing a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants