EV Smart Charging (Germany)
EV Smart Charging Example Flow
This example demonstrates how to implement smart EV charging using the Energy Schedule node. The flow optimizes charging times based on CO2 emissions, making it ideal for environmentally conscious EV owners who want to charge their vehicles using the cleanest possible energy.
Flow Overview
The flow is designed to:
- Schedule 6 hours of charging within a 12-hour window
- Optimize for lowest CO2 emissions
- Allow non-consecutive charging periods for maximum flexibility
- Handle high-power charging (11kW)
- Provide clear status feedback
Components
Car Connected (Inject Node)
- Simulates EV connection event
- Configures charging requirements:
- Energy Demand: 40 kWh (typical for partial EV battery charge)
- Maximum Load: 11,000W (11kW charging capability)
- Average Load: 7,200W (actual average consumption)
EV Charging (Energy Schedule Node)
- Configured for CO2 optimization (
law: "co2"
) - 6 active hours within 12-hour coverage
- Non-consecutive hours allowed for better optimization
- Requires German postal code (ZIP)
- Configured for CO2 optimization (
Check Status (Switch Node)
- Routes status based on charging state
- Two outputs: Active (true) and Paused (false)
Debug Nodes
- Charging Active: Shows when charging is running
- Charging Paused: Shows when charging is paused
- Schedule Details: Displays complete schedule information
Configuration Steps
Import the Flow
[Menu] → Import → Clipboard # Paste the flow JSON and click Import
Configure the Energy Schedule Node
- Double-click the "EV Charging" node
- Enter your local Postleitzahl (ZIP code)
- Optional: Add your personal Corrently API token
- Verify settings:
- Law: co2
- Active Hours: 6
- Coverage Hours: 12
- Consecutive Hours: unchecked
Adjust Charging Parameters (if needed)
- Double-click the "Car Connected" node
- Modify the payload JSON to match your EV's specifications:
{ "requirements": { "energyDemand": 40, // Required energy in kWh "maxLoad": 11000, // Maximum charging power in watts "avgLoad": 7200 // Average charging power in watts } }
Usage
Basic Operation
- Click the "Car Connected" inject node to simulate plugging in your EV
- The schedule node will calculate optimal charging times
- Monitor the debug sidebar for status updates
Understanding Outputs
- First output (boolean):
true
→ Charging should be activefalse
→ Charging should be paused
- Second output (object):
- Complete schedule details
- Time slots
- Progress information
- First output (boolean):
Integration with Real Hardware
- Replace debug nodes with your charging control nodes
- Use the boolean output to control your charging relay/contactor
- Monitor the schedule details for logging or visualization
Typical Values for Common EVs
EV Model | Battery | energyDemand | maxLoad | avgLoad |
---|---|---|---|---|
Tesla Model 3 SR+ | 50 kWh | 40 kWh | 11000 W | 7200 W |
VW ID.3 Pro | 58 kWh | 45 kWh | 11000 W | 7200 W |
Hyundai Kona | 64 kWh | 50 kWh | 11000 W | 7200 W |
Customization Tips
Adjust Time Window
- Modify
coverageHours
for different scheduling windows - Example: Set to 24 for overnight charging
- Modify
Change Optimization Goal
- Switch
law
to "price" for cost optimization - Use "comfort" for immediate charging
- Switch
Power Adjustments
- Reduce
maxLoad
for lower-powered charging points - Common values:
- 11000W (11kW - three-phase 16A)
- 7400W (7.4kW - single-phase 32A)
- 3700W (3.7kW - single-phase 16A)
- Reduce
Notes
- The flow requires a valid German postal code (Postleitzahl)
- CO2 optimization uses the GrünstromIndex (GreenPowerIndex)
- Non-consecutive hours allow for better optimization but might not be suitable for all EVs
- Consider your EV's minimum charging current when setting avgLoad
Error Handling
- The node will show a red status if there are any issues
- Check the debug sidebar for error details
- Common issues:
- Invalid ZIP code
- API rate limits
- Network connectivity problems
[{"id":"ev-charging-example","type":"tab","label":"EV Smart Charging Example","disabled":false,"info":"Smart EV charging flow that optimizes for CO2 emissions. Schedules 6 non-consecutive hours within a 12-hour window."},{"id":"inject2","type":"inject","z":"ev-charging-example","name":"Car Connected","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0,"topic":"","payload":"{\"requirements\":{\"energyDemand\":40,\"maxLoad\":11000,\"avgLoad\":7200}}","payloadType":"json","x":150,"y":100,"wires":[["schedule2"]]},{"id":"schedule2","type":"energy-schedule","z":"ev-charging-example","name":"EV Charging","zip":"69168","law":"co2","activeHours":"6","coverageHours":"12","consecutiveHours":false,"x":400,"y":100,"wires":[["switch1"],["debug5"]]},{"id":"switch1","type":"switch","z":"ev-charging-example","name":"Check Status","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":100,"wires":[["debug3"],["debug4"]]},{"id":"debug3","type":"debug","z":"ev-charging-example","name":"Charging Active","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":900,"y":60,"wires":[]},{"id":"debug4","type":"debug","z":"ev-charging-example","name":"Charging Paused","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":900,"y":140,"wires":[]},{"id":"debug5","type":"debug","z":"ev-charging-example","name":"Schedule Details","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":true,"targetType":"full","statusVal":"","statusType":"auto","x":650,"y":180,"wires":[]}]