Skip to content

Push notifications bei Ladestart/Ende/usw. #16

Open

Description

@mrhund

Wäre ein feature request, den ich für sinnvoll halten würde.
Gibts da schon Pläne?

Activity

  1. webalexeu commented on Apr 17, 2026

    @webalexeu
    Contributor

    Hello @naltatis ,

    Really interesting to add notifications directly within the application.
    Do you plan also push notifications ? (Then I guess you will use cloud service like for optimizer.evcc.io ?)

    I did it already for another application so I can participate if you are interested ?

  2. naltatis commented on Apr 17, 2026

    @naltatis
    Member

    We'll likely want to use Expo Notifications to handle the platform specific abstractions.

    Possible high level overview:

    Enable Notifications on device (push permission)

    
       ┌──────────┐  push token  ┌─────────────────┐  push token  ┌────────────┐
       │ evcc-app │─────────────▶│ WebView (evcc)  │─────────────▶│ local evcc │
       └──────────┘              └─────────────────┘              └────────────┘
    

    Sending notification to devices

       ┌────────────┐  message  ┌──────────────────────┐  forward  ┌───────────┐  APNs/FCM  ┌──────────┐
       │ local evcc │──────────▶│ push.evcc.io (relay) │──────────▶│ Expo Push │───────────▶│ evcc-app │
       └────────────┘           └──────────────────────┘           └───────────┘            └──────────┘
    

    We'll need to provide a very thin, stateless push relay service (go) that encapsulates the expo secrets. All user secrets (push token) should stay in the local evcc instance. Maybe sponsor only if we see misuse, but can be open for start.

    I'd keep it simple for start: multiple devices can be registered, all registered devices receive the same messages. This aligns with our current messaging model. We can get more granular later if we need it.

    Enabling notifications should be done via the evcc web ui. users can active it when they use the web ui through the native app (existing app detection, web view post message bridge). The service "e.g. App Notifications" can always be visible (also in pure web context), but the ui for dis/enabling push is only visible/active in an app context.

  3. andig commented on Jul 18, 2026

    @andig
    Member

    Design for native push notifications, following the discussion in #230 / evcc-io/evcc#31906 (websocket forwarding was the wrong approach — it only works in the foreground):

    Architecture

    1. The app obtains an Expo push token. Expo's push service fronts APNs/FCM; the credentials belong to the app's Expo project, so individual evcc instances need no Apple/Google setup.
    2. Per-server opt-in: a "Send notifications to this device" checkbox in the server form. Enabling asks for OS notification permission and registers the token with that instance (POST /api/push/token). Each configured server registers independently.
    3. evcc gains an implicit AppPush messenger: configured messaging events are delivered to all registered devices via the Expo push API. Stale tokens (DeviceNotRegistered) are pruned automatically.
    4. Delivery works with the app closed or in the background — the OS displays the notification.

    Notes

    • No new cloud service needed for v1: instances call exp.host directly. If we later prefer our own relay (rate limiting, privacy, credential ownership), it can live under sponsor.evcc.io without changing the app side.
    • Message content transits Expo/APNs/FCM — same as any push solution; worth a mention in the docs.
    • F-Droid builds lack Play Services, so FCM push won't work there; ntfy (already supported as a messenger) or UnifiedPush remain the alternative for that audience.
    • Prerequisite before this delivers in production: upload the APNs key and FCM service account to the Expo project (EAS credentials).

    Implementation: #231 + evcc-io/evcc#31910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions