Adds Tesla API integration
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s

Adds an endpoint to interact with the Tesla API via a command proxy.

This includes fetching vehicle information and configuring telemetry settings. It introduces new models to represent the Tesla API responses and request structures.
This commit is contained in:
2025-08-17 12:03:26 +02:00
parent 663bb4b019
commit f049d023c9
4 changed files with 195 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace ProofOfConcept.Models;
public sealed class TelemetryConfigRequest
{
[JsonPropertyName("vins")]
public List<string> Vins { get; set; } = new();
[JsonPropertyName("config")]
public TelemetryConfig Config { get; set; } = new();
}
public sealed class TelemetryConfig
{
[JsonPropertyName("hostname")]
public string Hostname { get; set; } = string.Empty;
[JsonPropertyName("port")]
public int Port { get; set; }
[JsonPropertyName("ca")]
public string CertificateAuthority { get; set; } = string.Empty;
[JsonPropertyName("fields")]
public Dictionary<string, TelemetryFieldConfig> Fields { get; set; } = new();
}
public sealed class TelemetryFieldConfig
{
[JsonPropertyName("interval_seconds")]
public int IntervalSeconds { get; set; }
}