Overview
The flow is structured to monitor the state of charge (SOC) of a battery, adjust power set points for charging and discharging, and handle manual operations via injection nodes. It includes functionalities for sending notifications using Pushover. Nodes Breakdown
Battery SOC Input (victron-input-battery) Purpose: Monitors the state of charge of the battery. Wires to: a826ca07a7e68bc1 (SOC Change Node).
Grid Setpoint Input (victron-input-ess) Purpose: Monitors the setpoint for AC power. Wires to: 4aa09e3fb48cf9a3 (Setpoint Change Node).
Change Nodes (change) Two nodes (a826ca07a7e68bc1 and 4aa09e3fb48cf9a3) set flow context variables: soc: Set to the value of payload from the battery input. setpoint: Set to the value of payload from the grid setpoint input.
Inject Nodes Used for triggering events at specific times or manually: Power Up Session Complete: Sets the system to a resting state. Power UP Discharging: Injects a discharge value. Power UP Charging: Injects a charge value. Power Up Start Session: Activates manual control. Power UP Manual Stop: Stops the manual operation.
Function Nodes Power UP Discharge: Logic for managing the discharging process based on SOC and time. It adjusts the setpoint based on SOC thresholds. Power UP Charge: Similar logic for charging, adjusting based on time and SOC. Set Manual Start: Activates manual control by setting flags. SOC Monitoring: Monitors SOC and sends notifications if certain conditions are met. Power UP Session Complete: Resets the system state after a session. Rest For Next Power UP Session: Prepares the system for the next session when manual stop is invoked.
Output Nodes Pushover Nodes: Send notifications for various states like starting a discharging session or manual activation. Victron Output ESS: Writes the current setpoint back to the Victron system.
Delay Nodes Used to throttle the rate of message sending or to introduce pauses.
Logic Flow
Monitoring SOC & Setpoint: The flow continuously monitors the battery's state of charge and the current grid setpoint. When SOC changes or a new setpoint is injected, it updates the respective flow context variables.
Injecting Commands: Specific commands for discharging, charging, and stopping can be injected at predefined times or triggered manually.
Conditional Logic in Functions: The function nodes utilize conditions based on time and SOC: For example, if SOC exceeds a threshold, the system will change the setpoint accordingly. This is to prevent over-discharge or under-charge scenarios.
Notifications: Notifications are sent out at critical stages, like starting or stopping a session, keeping the user informed of system states.
Session Management: The flow has provisions for manual operation, allowing the user to start or stop operations and reset the system states as needed.
Conclusion
This Node-RED flow is a comprehensive management system for a battery charging and discharging process, utilizing Victron devices. It combines real-time monitoring, conditional logic, and user-triggered actions to optimize battery usage while providing notifications for transpare