-
Notifications
You must be signed in to change notification settings - Fork 167
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
Solax: Add inverter missing from CAN event, Solax #480
Conversation
@@ -88,6 +89,12 @@ void update_values_can_inverter() { //This function maps all the values fetched | |||
if (millis() - LastFrameTime >= SolaxTimeout) { | |||
datalayer.system.status.inverter_allows_contactor_closing = false; | |||
STATE = BATTERY_ANNOUNCE; | |||
inverter_missing_on_can++; | |||
if (inverter_missing_on_can > CAN_STILL_ALIVE) { | |||
set_event(EVENT_CAN_INVERTER_MISSING, 0); |
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.
should this event clear datalayer.system.status.inverter_allows_contactor_closing
?
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.
It is cleared 4 rows before the event is fired. No need to clear it really, if we go into a ERROR situation we open contactors. This event is setup as a WARNING, but if it is stable and not triggered accidentally, we could bump up the severity to ERROR.
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.
No worries, was just a thought without any real checking of the 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.
Always appreciate extra pairs of eyes 😀 👀
@@ -258,6 +259,8 @@ const char* get_event_message_string(EVENTS_ENUM_TYPE event) { | |||
return "ERROR: High amount of corrupted CAN messages detected. Check CAN wire shielding!"; | |||
case EVENT_CAN_TX_FAILURE: | |||
return "ERROR: CAN messages failed to transmit, or no one on the bus to ACK the message!"; | |||
case EVENT_CAN_INVERTER_MISSING: |
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.
Not really a question for this PR (perhaps we could open an issue) ; but how are events handled when serial transmitter/receiver is used ? Will this event just fire on the inverter side ?
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.
@obbardc Best to open issue. Would be good to sync all events between the two lilygos. I did not write the implementation for the double lilyGo support!
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.
Sure!
What
This PR implements a new event, incase the Solax inverter does not send any CAN data, we raise an event.
Why
To guide the user towards troubleshooting CAN wiring
How
This new event is raised if Solax CAN communication is gone for too long: