-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Add Peblar #16451
Add Peblar #16451
Conversation
Hmm, something bad happens to the currents, I'm getting a lot of these: "Garage: charger logic error: current mismatch (got 15.1A measured, expected 12.2A)" Need to find out if it is related to the recent changes. |
There is a 1A difference between set current and max phase current observed:
|
I've seen this happen on 2 different vehicles, it is not vehicle related..
Still need to dig into this further where this mismatch is coming from. Right now I can only say it happens on "changing" conditions such as cloud-sun-cloud. |
Mhhm. And the version before the brushing did not show this? |
Update: The charger input/current response of the EV seems ok to me. The charge logic seems to expect a value from 2 loops before... |
Did you find out whats wrong? |
charger/peblar.go
Outdated
@@ -84,9 +84,6 @@ func NewPeblar(uri string, id uint8) (api.Charger, error) { | |||
return nil, err | |||
} | |||
|
|||
log := util.NewLogger("peblar") |
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.
Logger still makes sende to see whats going on.
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.
Logger still makes sende to see whats going on.
You mean for future debugging? I can revert it, but currently there is not any logging line in the code so this would be un-used.
Not really.. I'm trying to see what happens in the "charger logic error". For that, I added logging to the setCurrent & getPhaseValues functions. Here is what I get during a charger logic error: In loop "n-1" the current is set to 15631mA via modbus to the charger. That current is applied in at most 5 seconds by the EV. (This EV always draws 0.8A less than the advertised limit). In loop "n" the current is read back and is according to (my) expectation (14.9A). However the expectation from the charger logic error is another value, namely, a value mentioned as "max charge current" mentioned in loop n-1, being 13.4A. At the end of loop "n" this "max charge current" of 13427mA is eventually set towards the charger. My conclusion would be that the expectation of the charger logic error is actually 1 iteration too soon. What do you think? |
Didn‘t check the code yet, but why does the actual setCurrent only happen with one cycle delay? It is using the wrong value imho. |
charger/peblar.go
Outdated
return fmt.Errorf("invalid current %.1f", current) | ||
} | ||
|
||
err := wb.setCurrent(wb.curr) |
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.
doh :O
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.
Well that resulted in unexpected behavior..
Co-authored-by: andig <cpuidle@gmail.com>
Hi @andig, I've been testing this branch for the past weeks and have not seen more warnings regarding the current sanity check. |
* master: (102 commits) Smart Cost: better option steps (evcc-io#17117) Add Peblar (evcc-io#16451) Smart Cost: higher precision limit via slot click (evcc-io#17099) Tariffs: add formulas (evcc-io#17002) Volvo2mqtt: remove broken status (evcc-io#17089) chore: generalise handlers chore: clean error handling Mqtt: fix panic Ui: restore semi-legacy browser support (evcc-io#17061) chore: assert plugin getters (evcc-io#17052) Revert "Allow meters for pv usage (evcc-io#17006)" Em2Go: work around current being reset (evcc-io#17050) Upgrade telegram api (evcc-io#17049) chore: use cast.ToBoolE (evcc-io#17030) chore: deduplicate getter implementations (evcc-io#17031) Plugins: make script plugin use pipeline (evcc-io#17029) chore: fix test Site: don't modify battery mode unless battery configured (evcc-io#17027) chore: rebuild mocks chore: upgrade libraries ...
Hey EVCC team,
Here is a charger implementation for the Peblar chargers (https://peblar.com/products/ev-charging). Developer info on the modbus API is located at developer.peblar.com.
I've been using this implementation for a while and tested it for the 1p3p switchover to work. This switchover won't work on all variants due to relay configurations (and 1 phase connected systems ofc).
I've checked the doc build to run fine and cleaned out some lint errors. Can you review this code?
Fix #15406