Skip to content

Instantly share code, notes, and snippets.

@andrewfoster
andrewfoster / Polestar automated charging.md
Last active May 11, 2025 00:00
Polestar automated charging

Goals

  1. Be able to remote start/stop/set charge current on an EVSE connected to a 15A wall socket.
  2. Automatically adjust charging based on grid cost, solar production and house battery status,
  3. (Nice to have) Set max SoC level remotely as the car's API does not support it.
  4. Avoid buying a hardwired EVSE given their cost and lack of >15A near the car.

Architecture

EVCC enables control of an EVSE based on solar production, dynamic tariffs and home solar, battery and grid utilisation.

@andrewfoster
andrewfoster / sieve.sieve
Last active April 15, 2025 08:13 — forked from jsit/sieve.sieve
Notifications / mailing lists / bulk email sieve code (for e.g. Fastmail et al.)
if
# these are DEFINITELY notifications
allof(
anyof(
header :contains "X-ME-CMCategory" "notification",
header :contains "X-ME-VSCategory" "transactional"
),
# unless they're from substack, which does "transactional" for some reason
not header :contains ["From", "Reply-To", "Received-From", "Return-Path"] [
"substack.com"