Sign inSign up

hedgiemate/notifier

By hedgiemate

Updated 28 days ago

Image
0

9.8K

hedgiemate/notifier repository overview

HedgieMate Notifier

A lightweight Go sidecar that monitors TeslaMate MQTT topics and sends push notification events to the HedgieMate relay server. Designed to run alongside your TeslaMate Docker stack.

How It Works

  1. Connects to your TeslaMate MQTT broker
  2. Monitors vehicle state topics (driving, charging, battery, geofence, etc.)
  3. Detects state transitions (e.g., charging started, drive ended)
  4. Sends events to the HedgieMate relay server, which delivers push notifications to your iOS device

Prerequisites

  • A running TeslaMate instance with MQTT broker (Mosquitto)
  • A HedgieMate user token (generated in the HedgieMate iOS app under Settings > Push Notifications)

Quick Start

Add the notifier to your existing TeslaMate docker-compose.yml:

services:
  hedgiemate-notifier:
    image: hedgiemate/notifier:latest
    restart: unless-stopped
    depends_on:
      - mosquitto
    environment:
      HEDGIEMATE_USER_TOKEN: "hm_your_token_here"
      MQTT_HOST: "mosquitto"
      MQTT_PORT: "1883"
      CAR_IDS: "1"
      LOG_LEVEL: "info"

Then run:

docker compose up -d hedgiemate-notifier
Docker Run
docker run -d \
  --name hedgiemate-notifier \
  --restart unless-stopped \
  -e HEDGIEMATE_USER_TOKEN="hm_your_token_here" \
  -e MQTT_HOST="your-mqtt-host" \
  -e MQTT_PORT="1883" \
  -e CAR_IDS="1" \
  hedgiemate/notifier:latest
Build from Source
go build -o hedgiemate-notifier .
HEDGIEMATE_USER_TOKEN=hm_xxx MQTT_HOST=localhost ./hedgiemate-notifier

Configuration

All configuration is via environment variables:

VariableRequiredDefaultDescription
HEDGIEMATE_USER_TOKENYes-Your linking token from the HedgieMate iOS app (hm_xxx)
MQTT_HOSTYes-MQTT broker hostname
MQTT_PORTNo1883MQTT broker port
MQTT_USERNAMENo-MQTT authentication username
MQTT_PASSWORDNo-MQTT authentication password
MQTT_CLIENT_IDNohedgiemate-notifierMQTT client ID
CAR_IDSNo1Comma-separated car IDs to monitor
RELAY_URLNohttps://push.hedgiemate.comRelay server URL
BATTERY_LOW_THRESHOLDNo20Battery low notification threshold (%)
BATTERY_HIGH_THRESHOLDNo90Battery full notification threshold (%)
LOG_LEVELNoinfoLog level: debug, info, warn, error

Supported Events

EventTrigger
drive_startedVehicle state transitions to "driving"
drive_endedVehicle state transitions from "driving"
charging_startedCharging state transitions to "Charging"
charging_completedCharging state transitions to "Complete"
charging_interruptedCharging stops unexpectedly (not "Complete")
battery_lowBattery drops below threshold (once per session)
battery_fullBattery rises above threshold (once per session)
charger_connectedCharger plugged in
charger_disconnectedCharger unplugged
software_updateNew software update available
geofence_enteredVehicle enters a geofence
geofence_exitedVehicle exits a geofence
vehicle_asleepVehicle goes to sleep
vehicle_wokeVehicle wakes up
sentry_recordingSentry Mode starts recording (center_display_state == 7)
live_activity_updatePeriodic charging data for Live Activities (30s/60s)

Multiple Cars

Monitor multiple vehicles by setting CAR_IDS to a comma-separated list:

CAR_IDS=1,2,3

Each car has its own independent state machine.

Architecture

MQTT Broker ──> MQTT Client ──> State Machine ──> Event Emitter ──> Relay Server ──> APNs ──> iOS
                                (per car)         (5s debounce)     (HMAC signed)
  • MQTT Client: Subscribes to TeslaMate topics, auto-reconnects on connection loss
  • State Machine: Tracks per-car state, detects transitions, manages battery threshold flags
  • Event Emitter: 5-second debounce window, prevents duplicate events
  • Relay Client: HMAC-SHA256 signed requests, 3 retries with exponential backoff

Changelog

See the GitHub Releases page for release notes, or CHANGELOG.md in the repo.


Disclaimer: This project is an unofficial community tool and is not affiliated with, endorsed by, or supported by the official TeslaMate project.


Changelog

v1.5.0 — 2026-06-25

New: Sentry Mode recording notification

Full Changelog: https://github.com/LukStankovic/hedgiemate-notifier/compare/v1.4.7...v1.5.0

Tag summary

Content type

Image

Digest

sha256:3d7e3778b

Size

6.7 MB

Last updated

3 months ago

docker pull hedgiemate/notifier