Skip to content

Add Emporia EVSE charger support via cloud API#28225

Draft
Copilot wants to merge 4 commits intomasterfrom
copilot/add-emporia-evse-support
Draft

Add Emporia EVSE charger support via cloud API#28225
Copilot wants to merge 4 commits intomasterfrom
copilot/add-emporia-evse-support

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

Emporia EVSE is a popular US charger with no local API. This adds cloud integration using the undocumented Emporia REST API (reverse-engineered via PyEmVue).

Authentication

Emporia uses AWS Cognito with USER_SRP_AUTH flow. Implements the full SRP protocol in charger/emporia/cognito.go, matching the algorithm used by PyEmVue/pycognito:

  • InitiateAuthPASSWORD_VERIFIER challenge → RespondToAuthChallenge
  • Cognito returns an IdToken (not AccessToken) used as the authtoken header on all API calls
  • Token refresh via REFRESH_TOKEN_AUTH, falls back to full re-auth on failure

Charger implementation

  • Status: maps status == "Charging" → C, icon prefix "Car" → B (connected), otherwise A
  • Enable/disable + MaxCurrent: PUT /devices/evcharger preserving current device state
  • Auto-detects deviceGid if account has exactly one EVSE; requires explicit config otherwise
  • Requires sponsorship (consistent with other cloud chargers)

New files

File Purpose
charger/emporia/types.go API types (ChargerDevice, DevicesStatus, ChargerUpdate)
charger/emporia/cognito.go Cognito SRP auth + token lifecycle
charger/emporia.go api.Charger implementation
templates/definition/charger/emporia.yaml UI template (user/password + optional deviceGid)
chargers:
  - name: emporia
    type: emporia
    user: user@example.com
    password: secret
    # deviceGid: 1234  # optional; auto-detected if only one EVSE on account

New dependency: github.com/aws/aws-sdk-go-v2/service/cognitoidentityprovider v1.59.2

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 224.0.0.251
    • Triggering command: REDACTED, pid is -1 (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Support for Emporia EVSE (charger)</issue_title>
<issue_description>It's one of the most popular chargers in the US. The only way it does excess solar charging is with an add-on that costs $$

Having EVCC manage it would be a good step for this market
</issue_description>

<agent_instructions>Versuche aus dem in den Issue-Kommentaren genannten externen Softwareprojekten eine Implementierungslogik zu extrahieren und daraus eine neue Emporia-Wallbox-Implementierung in evcc zu erstellen.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@andig Does it have a usable API? @andig Couldn't find anything. Please feel free to ask the vendor and let's reopen when API (HTTP, OCPP, Modbus, really anything) is available. @andig > Something similar but has some basic GET command to turn on EVSE and Emporia Energy plugs - https://github.com/magico13/PyEmVue/blob/master/api_docs.md

Thanks for sharing that. This does indeed seem to cover EVs.</comment_new>
<comment_new>@andig
What we would need now is a full HTTP MITM trace of the interaction between PyEmVue with the EVSE:

  • authentication
  • get status
  • start/stop charging
  • change charging current

Based on this we can look at implementation.</comment_new>
<comment_new>@andig
Unfortunately we didn't get enough details to find an approach. Closing.</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits March 15, 2026 06:15
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for Emporia EVSE charger in EVCC Add Emporia EVSE charger support via cloud API Mar 15, 2026
Copilot AI requested a review from premultiply March 15, 2026 06:29
@andig andig added the devices Specific device support label Mar 15, 2026
@github-actions github-actions bot added the stale Outdated and ready to close label Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devices Specific device support stale Outdated and ready to close

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Emporia EVSE (charger)

3 participants