Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/iob-package-metadata-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"iobroker.teslemetry": patch
---

Sync `io-package.json` adapter metadata (version, news, deprecated fields, dependency minimums) with the published package and add a test that fails CI if they drift apart again. Also addresses several ioBroker repository-checker findings: admin UI translations for English/German, JSON-config schema fixes, README/changelog/license formatting, and a `this.setInterval()`/`this.clearInterval()` fix for the polling timer.
4 changes: 3 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ pnpm link --global n8n-nodes-teslemetry

**Gotcha**: `VehicleHandler`/`EnergyHandler.handleStateChange()` don't catch their own write failures - a rejected SDK write propagates up to `main.ts`'s `onStateChange()`, the single place that logs it, so a new write branch must not add its own catch/log or the failure logs twice. Each write goes through `writeAndReconcile(id, value, write)` (private to each handler), which acks the requested value on success and re-acks the last confirmed value on failure, so a rejected command never leaves the ioBroker object state looking like it applied.

**Gotcha**: changesets bumps `package.json`/`CHANGELOG.md` on release but never touches `io-package.json` - its `common.version` and `common.news` need a manual sync on every release or the ioBroker repochecker hard-fails submission to `ioBroker.repositories`. No Teslemetry brand/logo asset lives in this monorepo; the real logo mark lives in the separate `website3` repo (its `public/web-app-manifest-512x512.png` is the highest-res copy) - source icons from there, don't hand-draw a placeholder.
**Gotcha**: changesets bumps `package.json`/`CHANGELOG.md` on release but never touches `io-package.json` - its `common.version` and `common.news` need a manual sync on every release (`test/packageVersionParity.test.ts` fails CI if they drift, but does not fix them for you) or the ioBroker repochecker hard-fails submission to `ioBroker.repositories`. `common.news` is truncated to the newest 7 entries by the repo builder - trim older ones when adding a new release. No Teslemetry brand/logo asset lives in this monorepo; the real logo mark lives in the separate `website3` repo (its `public/web-app-manifest-512x512.png` is the highest-res copy) - source icons from there, don't hand-draw a placeholder.

**Gotcha**: `npx @iobroker/repochecker <repo-url> --local` (run from `packages/iobroker.teslemetry/`) validates against local files but still resolves the adapter identity from the GitHub repo URL - since this repo is a monorepo (not a dedicated `ioBroker.<adapter>` repo), it always reports spurious `E0002`/`E0004`/`E0007`/`E0020`/`E1003`/`E2000`/`W4001` (repo/package naming) and a false-positive `E9007` (build dir tracked) from reading the filesystem instead of git. Only a dedicated single-adapter repo (a real submission concern, not a code fix) resolves those. `admin/i18n` only has `en`/`de` translations - the repochecker's other 9 suggested languages (`E5010`) are a known, intentionally-deferred gap.

## Technology Stack

Expand Down
1 change: 1 addition & 0 deletions packages/iobroker.teslemetry/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Thumbs.db
.nyc_output/
coverage/
*.log
.commitinfo
15 changes: 0 additions & 15 deletions packages/iobroker.teslemetry/.npmignore

This file was deleted.

34 changes: 34 additions & 0 deletions packages/iobroker.teslemetry/CHANGELOG_OLD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Older changelog entries

### 0.1.10
- Dependency updates

### 0.1.9
- Dependency updates

### 0.1.8
- Dependency updates

### 0.1.7
- Dependency updates

### 0.1.6
- Dependency updates

### 0.1.5
- Dependency updates

### 0.1.4
- Dependency updates

### 0.1.3
- SSE event handling now uses the standard EventEmitter pattern

### 0.1.2
- Dependency updates

### 0.1.1
- Dependency updates

### 0.1.0
- Initial release
42 changes: 26 additions & 16 deletions packages/iobroker.teslemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ Before installing this adapter, you need:
5. Wait for installation to complete
6. Click on the adapter instance to configure it

### Manual Installation (for development)

```bash
cd /opt/iobroker
npm install iobroker.teslemetry
```

## Configuration

### Access Token
Expand Down Expand Up @@ -347,20 +340,37 @@ pnpm test

## Changelog

### 0.1.0 (2026-01-08)
- Initial release
- Vehicle control (climate, charging, locks, etc.)
- Energy site management (power flow, operation modes)
- Real-time SSE streaming support
- Polling fallback mode
- Multi-language support (English, German)
### 0.2.5
- Dependency updates

## License
### 0.2.4
- Dependency updates

### 0.2.3
- Dependency updates

### 0.2.2
- Dependency updates

Apache-2.0 © 2026 Teslemetry
### 0.2.1
- Dependency updates

### 0.2.0
- Site time-of-use tariff (`tariff_id`, `tariff_content`, `tariff_content_v2`) is now exposed as read-only states under `energy.{SITE_ID}.tariff`

### 0.1.11
- Published to npm

Older entries are in [CHANGELOG_OLD.md](CHANGELOG_OLD.md).

## Credits

- Developed by [Teslemetry](https://teslemetry.com)
- Built on [@teslemetry/api](https://www.npmjs.com/package/@teslemetry/api)
- Part of the ioBroker ecosystem

## License

Apache-2.0

Copyright (c) 2026 Teslemetry
22 changes: 22 additions & 0 deletions packages/iobroker.teslemetry/admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Teslemetry Configuration": "Teslemetry-Konfiguration",
"Access Token": "Zugriffstoken",
"Your Teslemetry API access token. Get it from https://teslemetry.com/console": "Ihr Teslemetry-API-Zugriffstoken. Erhältlich unter https://teslemetry.com/console",
"Test Connection": "Verbindung testen",
"Region": "Region",
"Auto-detect": "Automatisch erkennen",
"North America": "Nordamerika",
"Europe": "Europa",
"Tesla API region. Use auto-detect unless you have connection issues.": "Tesla-API-Region. Verwenden Sie die automatische Erkennung, außer bei Verbindungsproblemen.",
"Data Updates": "Datenaktualisierung",
"Enable real-time streaming (SSE)": "Echtzeit-Streaming aktivieren (SSE)",
"Use Server-Sent Events for real-time updates. Recommended for best performance.": "Server-Sent Events für Echtzeit-Updates verwenden. Für beste Leistung empfohlen.",
"Poll interval (seconds)": "Abfrageintervall (Sekunden)",
"How often to fetch data when streaming is disabled. Minimum 30 seconds to avoid rate limits.": "Wie oft Daten abgerufen werden, wenn Streaming deaktiviert ist. Mindestens 30 Sekunden, um Ratenbegrenzungen zu vermeiden.",
"Device Selection": "Geräteauswahl",
"By default, all vehicles and energy sites are included. You can optionally select specific devices to monitor.": "Standardmäßig sind alle Fahrzeuge und Energieanlagen enthalten. Sie können optional bestimmte Geräte zur Überwachung auswählen.",
"Selected Vehicles (VINs)": "Ausgewählte Fahrzeuge (FIN)",
"Leave empty to include all vehicles. Add VIN numbers to include only specific vehicles.": "Leer lassen, um alle Fahrzeuge einzubeziehen. FIN hinzufügen, um nur bestimmte Fahrzeuge einzubeziehen.",
"Selected Energy Sites (IDs)": "Ausgewählte Energieanlagen (IDs)",
"Leave empty to include all energy sites. Add site IDs to include only specific sites.": "Leer lassen, um alle Energieanlagen einzubeziehen. Standort-IDs hinzufügen, um nur bestimmte Standorte einzubeziehen."
}
22 changes: 22 additions & 0 deletions packages/iobroker.teslemetry/admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Teslemetry Configuration": "Teslemetry Configuration",
"Access Token": "Access Token",
"Your Teslemetry API access token. Get it from https://teslemetry.com/console": "Your Teslemetry API access token. Get it from https://teslemetry.com/console",
"Test Connection": "Test Connection",
"Region": "Region",
"Auto-detect": "Auto-detect",
"North America": "North America",
"Europe": "Europe",
"Tesla API region. Use auto-detect unless you have connection issues.": "Tesla API region. Use auto-detect unless you have connection issues.",
"Data Updates": "Data Updates",
"Enable real-time streaming (SSE)": "Enable real-time streaming (SSE)",
"Use Server-Sent Events for real-time updates. Recommended for best performance.": "Use Server-Sent Events for real-time updates. Recommended for best performance.",
"Poll interval (seconds)": "Poll interval (seconds)",
"How often to fetch data when streaming is disabled. Minimum 30 seconds to avoid rate limits.": "How often to fetch data when streaming is disabled. Minimum 30 seconds to avoid rate limits.",
"Device Selection": "Device Selection",
"By default, all vehicles and energy sites are included. You can optionally select specific devices to monitor.": "By default, all vehicles and energy sites are included. You can optionally select specific devices to monitor.",
"Selected Vehicles (VINs)": "Selected Vehicles (VINs)",
"Leave empty to include all vehicles. Add VIN numbers to include only specific vehicles.": "Leave empty to include all vehicles. Add VIN numbers to include only specific vehicles.",
"Selected Energy Sites (IDs)": "Selected Energy Sites (IDs)",
"Leave empty to include all energy sites. Add site IDs to include only specific sites.": "Leave empty to include all energy sites. Add site IDs to include only specific sites."
}
45 changes: 28 additions & 17 deletions packages/iobroker.teslemetry/admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,20 @@
"size": 3
},
"accessToken": {
"type": "text",
"type": "password",
"label": "Access Token",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"password": true,
"required": true,
"help": "Your Teslemetry API access token. Get it from https://teslemetry.com/console",
"placeholder": "teslemetry_access_token_..."
"xl": 12,
"help": "Your Teslemetry API access token. Get it from https://teslemetry.com/console"
},
"testConnection": {
"type": "sendTo",
"command": "testConnection",
"jsonData": "{\"accessToken\": \"${data.accessToken}\"}",
"button": {
"text": "Test Connection",
"variant": "contained",
"color": "primary"
},
"label": "Test Connection",
"result": {
"success": {
"text": "${data.message}"
Expand All @@ -35,9 +30,11 @@
"text": "${data.error}"
}
},
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4
"lg": 4,
"xl": 4
},
"_spacer1": {
"type": "divider"
Expand All @@ -61,9 +58,11 @@
],
"default": "auto",
"help": "Tesla API region. Use auto-detect unless you have connection issues.",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4
"lg": 4,
"xl": 4
},
"_spacer2": {
"type": "divider"
Expand All @@ -78,9 +77,11 @@
"label": "Enable real-time streaming (SSE)",
"default": true,
"help": "Use Server-Sent Events for real-time updates. Recommended for best performance.",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4
"lg": 4,
"xl": 4
},
"pollInterval": {
"type": "number",
Expand All @@ -90,9 +91,11 @@
"default": 60,
"help": "How often to fetch data when streaming is disabled. Minimum 30 seconds to avoid rate limits.",
"hidden": "data.enableStreaming === true",
"xs": 12,
"sm": 12,
"md": 6,
"lg": 4
"lg": 4,
"xl": 4
},
"_spacer3": {
"type": "divider"
Expand All @@ -105,23 +108,31 @@
"_deviceSelectionHelp": {
"type": "staticText",
"text": "By default, all vehicles and energy sites are included. You can optionally select specific devices to monitor.",
"sm": 12
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"xl": 12
},
"selectedVehicles": {
"type": "chips",
"label": "Selected Vehicles (VINs)",
"help": "Leave empty to include all vehicles. Add VIN numbers to include only specific vehicles.",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12
"lg": 12,
"xl": 12
},
"selectedEnergySites": {
"type": "chips",
"label": "Selected Energy Sites (IDs)",
"help": "Leave empty to include all energy sites. Add site IDs to include only specific sites.",
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12
"lg": 12,
"xl": 12
}
}
}
Loading
Loading