-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: Implemented time response for cloudless time synchronization #82
base: main
Are you sure you want to change the base?
Conversation
42d0d90
to
87abc88
Compare
22da908
to
22b64ca
Compare
786d135
to
a3aebf6
Compare
a3aebf6
to
1424502
Compare
10f6642
to
f16ac48
Compare
a900bd8
to
c43846c
Compare
4e6cb30
to
e5d4d94
Compare
bc90d2b
to
86398b5
Compare
62f10ac
to
0a08116
Compare
fef2ba1
to
4d120f7
Compare
0ab7326
to
305ab8f
Compare
305ab8f
to
c4ce1f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial ACK/NAK on this.
serial
was poor parameter name choice, but for compatibility reasons, I think it needs to stay.
v5_loggerserial
stay as such because it refers to the logger serial number as opposed to that of the inverter (I've had issued raised on how do I enter inverter serial numbers with letters...)
v5_serial
... yeah, I've no idea what I was thinking with that variable name. v5_seq
or v5_seqno
makes a lot more sense.
pysolarmanv5/pysolarmanv5.py
Outdated
@@ -269,7 +272,7 @@ def _v5_frame_decoder(self, v5_frame): | |||
raise V5FrameError("V5 frame contains invalid sequence number") | |||
if v5_frame[7:11] != self.v5_loggerserial: | |||
raise V5FrameError("V5 frame contains incorrect data logger serial number") | |||
if v5_frame[3] != self.v5_magic and v5_frame[4] != CONTROL.REQUEST - 0x30: | |||
if v5_frame[3] != self.v5_magic or v5_frame[4] != CONTROL.REQUEST - 0x30: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, it would be easier if we stuck with either the existing definition of a two byte control code, or else redefine that into two, new, single byte fields. We refer to 0x4510
in some places, and now we are refering to just 0x45
. Same with 0x3000
vs 0x30
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You reviewed outdated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But yes, I'm all for separating those bytes cause handling it that way (using int) is way easier.
What compatibility? It's not exposed anywhere. They are together with
I would totally agree /w this point if it was reflected here too
But when I was going trough the code cause of building of that v5 header and so I was like wait what? But you are the boss at the end so... |
SSIA;
Fixes #81
I think that this could be appropriate solution but what do you think guys?
😉