Skip to content

Latest commit

 

History

History
187 lines (141 loc) · 6.02 KB

TROUBLESHOOTING.md

File metadata and controls

187 lines (141 loc) · 6.02 KB

Troubleshooting EV Smart Charger

Integration Won't Start

1. Check the Logs

Via Home Assistant UI:

  1. Go to Settings → System → Logs
  2. Search for "ev_smart_charger" or "evsc"
  3. Look for ERROR or WARNING messages

Enable Debug Logging:

Add this to your configuration.yaml:

logger:
  default: info
  logs:
    custom_components.ev_smart_charger: debug

Then restart Home Assistant and check logs again.

2. Common Issues

Helper Creation Fails

Symptoms:

  • Integration fails to start
  • Logs show "Failed to create helpers"

Solution: Create the helpers manually via Home Assistant UI:

  1. Go to Settings → Devices & Services → Helpers
  2. Click "+ CREATE HELPER"
  3. Create these three helpers:

Helper 1: EVSC Forza Ricarica

  • Type: Toggle
  • Name: EVSC Forza Ricarica
  • Icon: mdi:power
  • Entity ID: input_boolean.evsc_forza_ricarica

Helper 2: EVSC Smart Charger Blocker

  • Type: Toggle
  • Name: EVSC Smart Charger Blocker
  • Icon: mdi:solar-power
  • Entity ID: input_boolean.evsc_smart_charger_blocker_enabled

Helper 3: EVSC Solar Production Threshold

  • Type: Number
  • Name: EVSC Solar Production Threshold
  • Icon: mdi:solar-power-variant
  • Entity ID: input_number.evsc_solar_production_threshold
  • Minimum: 0
  • Maximum: 1000
  • Step: 10
  • Unit: W

Automation Setup Fails

Symptoms:

  • Integration loads but automations don't work
  • Logs show "Failed to set up automations"

Check:

  1. Verify all configured entities exist
  2. Check entity IDs are correct
  3. Charging detection (v2.2.0): map an EV charging-power sensor (the source of truth for "is the car charging") and/or a charger status sensor. The status sensor is now optional; if mapped it should report states like charger_charging, charger_free, charger_end. If you map a charging-power sensor, verify the diagnostic charging_power_w tracks real draw (a flat 0 W while charging = reversed sign → fix with a | abs template).

Entity Not Found Errors

Symptoms:

  • Logs show "Entity not found: sensor.xxx"

Solution:

  1. Go to Settings → Devices & Services → EV Smart Charger
  2. Click CONFIGURE
  3. Verify all entity selections are correct
  4. Make sure the entities actually exist in your system

3. Verification Steps

After fixing issues, verify everything works:

  1. Check Helpers Exist:

    • Go to Settings → Devices & Services → Helpers
    • Search for "evsc"
    • You should see 3 helpers
  2. Test Smart Charger Blocker:

    • Enable EVSC Smart Charger Blocker helper
    • Disable EVSC Forza Ricarica (kill switch must be OFF)
    • Plug in your car at night
    • Charger should be blocked automatically
  3. Check Logs:

    Settings → System → Logs
    

    Look for:

    • "✅ EV Smart Charger setup completed successfully"
    • "Smart Charger Blocker automation set up successfully"

4. Night Smart Charge Stops Too Early

Symptoms:

  • Night Smart Charge starts, then stops soon after.
  • Repeated debug line: Already completed today - inactive.

Expected behavior at home battery minimum SOC:

  • car_ready=ON for today: Night session should switch from BATTERY to GRID and continue.
  • car_ready=OFF for today: session should stop and be marked terminal (completed_today).

What to check in logs:

  • Transition path: Home battery threshold reached + switching to GRID fallback + Grid charge mode
  • Terminal path: Session state: completed_today

5. EV Target Overshoot or Nighttime Battery Drain

Symptoms:

  • EV charges above the configured target after a runtime target change.
  • Charging continues after sunset while profile is still solar_surplus.
  • Home battery drains unexpectedly in evening/night.

Expected behavior (current):

  • Target hard cap enforced stops charge at first SOC sample >= target.
  • At sunset with charger ON in solar_surplus:
    • try Night Smart Charge handover first,
    • if rejected/fails, stop charger immediately (safe fallback).
  • If EV SOC data is stale, integration logs SOC stale (continue) and continues by policy (no automatic stale-stop).

What to check in logs:

  • Target hard cap enforced
  • Sunset transition
  • Handover accepted or STOPPED: Sunset transition safe stop
  • SOC stale (continue) with age in seconds

6. Duplicate Lines in File Logs

Symptoms:

  • Same log line appears multiple times in the same second.

Expected behavior:

  • File logging uses a single global file handler.
  • Daily file path format: custom_components/ev_smart_charger/logs/<year>/<month>/<day>.log

Checks:

  1. Ensure switch.evsc_enable_file_logging is ON only once (no rapid toggle loops).
  2. Reload integration once after updating to current version.
  3. Verify that new logs no longer duplicate the same event line.

7. Get More Help

If issues persist:

  1. Collect Full Logs:

    • Enable debug logging (see above)
    • Restart Home Assistant
    • Copy relevant log entries
  2. Report Issue:

FAQ

Q: Can I use the integration without helpers? A: No, the helpers are required for the automations to work.

Q: Will I lose helper settings if I update? A: No, helpers persist across updates. They're separate entities in Home Assistant.

Q: Can I change helper entity IDs? A: No, the integration expects specific entity IDs. Use the exact IDs listed above.

Q: Integration loads but nothing happens when I plug in the car? A: Check that:

  1. Smart Charger Blocker helper is enabled
  2. Forza Ricarica helper is disabled
  3. It's actually nighttime or solar production is below threshold
  4. The integration sees the car as charging: a mapped charging-power sensor reads above ~200 W, or (fallback) the charger status sensor reports a charging state. Since v2.2.0 either signal works; if neither is mapped/reporting, charging detection (and the green dashboard banner) can't engage.