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

Bugfix: Nissan LEAF, move battery-allows-closing writing #811

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dalathegreat
Copy link
Owner

What

This PR moves the battery_allows_contactor_closing writing for Nissan LEAF

Why

Periodic BMS reset would always cause this red X on the webserver, confusing users

image

It also confused users, some packs never set this bit as stated in the LEAF wiki

NOTE: with some Leaf BMS (so far only noticed on the 30kWh 2016) the line batteryAllowsContactorClosing = true is never set:

datalayer.system.status.battery_allows_contactor_closing = false;
. This prevents the automatic contactor sequence. A workaround is to force the value to always true. So if you are having problems with the contactor sequence, change the above line to datalayer.system.status.battery_allows_contactor_closing = true;

How

Instead of dynamically writing it based on CAN, always allow contactor closing on boot

This also makes the workaround no longer required

Copy link
Collaborator

@mvgalen mvgalen left a comment

Choose a reason for hiding this comment

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

I understand that the old situation is not ideal, but the always allowing the contactors to close (even when BMS is being reset) seems a bit strange to me.
Shouldn't at least some sanity checks be done before enabling battery_allows_contactor_closing? Like, BMS powered and no faults present?

@dalathegreat
Copy link
Owner Author

dalathegreat commented Jan 21, 2025

Very good point @mvgalen , I changed this in commit 850922b , so now we need to get CAN from battery before we allow closing to happen!

Contactors can be on during the reset. We just allow 0W while resetting. If the BMS would not wake up, we open contactors after 60 seconds.

@mvgalen
Copy link
Collaborator

mvgalen commented Jan 24, 2025

Yes, that is better. But are there no sanity checks we could do, like checking soc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants