-
-
Notifications
You must be signed in to change notification settings - Fork 744
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
Easee: validate charger phases #13238
Conversation
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.
We need to confirm the correct observationID is read in getPhases(), as we otherwise might break things.
charger/easee.go
Outdated
func (c *Easee) GetPhases() (int, error) { | ||
c.mux.RLock() | ||
defer c.mux.RUnlock() | ||
return c.phaseMode, nil |
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.
Ich kann es gerade nicht prüfen (frühestens Mittwoch) - aber ich glaube dieser Wert ist statisch und entspricht dem physikalischen Anschluß der Wallbox. Um den "aktuellen" Wert zu erhalten, müßten wir nach meinem Verständnis ObservationID 110 OUTPUT_PHASES
lesen.
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.
@GrimmiMeloni I think if we change this we should also refactor the Easee a bit. Currently, there are lots of local variables plus obsTime
. Imho we should add an obs
sync.Map
or mutex-guarded map that holds Observation
s plus a getObs(val any) error
method for accessing it. Wdyt?
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.
I double checked some recent logs of mine. They confirmed my hunch.
PHASE_MODE
stays static (at 2 in my case), whereas OUTPUT_PHASE
follows the active phases as controlled by evcc. Noteworthy implementation detail - OUTPUT PHASE
values are not 0,1,3
but 0,10,30
, so we need to map (or simply div by 10).
I also like the suggested refactoring, but I would rather put this in a separate PR. It will touch a lot of code and would not want to mix this with this feature.
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.
Ok- then lets add another var here and the reduce all of them separately.
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.
Do you want me to take this over and do the rest (e.g. local testing, etc.)?
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.
If possible that would be great 👍🏻
I can confirm that Easee works now again like intended! thankk you very much! |
Fix #13236
@GrimmiMeloni das Diff sieht nur deshalb so groß aus weil ich die Phasenumschaltung wie bei den anderen Chargern nach unten geschoben habe. Dazu ein paar RW Mutex Zugriffe.