Commit Graph

83 Commits

Author SHA1 Message Date
6ac6d05f5f Simplifies authentication logic and adds VIN.
All checks were successful
Build, Push and Run Container / build (push) Successful in 35s
Removes temporary test endpoints and refactors the authorize endpoint.

Adds support for VIN notifications for a new vehicle by adding it to the dictionary.
2025-10-15 19:13:50 +02:00
f39d900fbb Updates base image versions
All checks were successful
Build, Push and Run Container / build (push) Successful in 1m8s
Updates the base images for both the ASP.NET runtime and the SDK to the stable 10.0 version.
This ensures the application uses the latest stable dependencies.
2025-09-23 18:33:31 +02:00
387ef9e70a Redirects to Tesla authorization on missing token
All checks were successful
Build, Push and Run Container / build (push) Successful in 53s
The application now redirects to the Tesla authorization endpoint when the access token is missing.
This ensures the user is prompted to authorize the application.
2025-09-19 13:28:39 +02:00
22df381755 Enables location and gear testing via API
All checks were successful
Build, Push and Run Container / build (push) Successful in 27s
Adds query parameters for latitude and longitude to the `/TestStartParking` endpoint, allowing to simulate different locations.

Adds logic to set the gear to "P" if the received value is null to cover edge cases.

Ensures asynchronous message processing by awaiting the result of ProcessMessage to prevent potential race conditions.
2025-08-25 08:49:57 +02:00
c44f0d327d Improves parking state logic
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Ensures the parking state is correctly managed by setting the parking started state before any parking zone checks.
Also, updates the logging message to more accurately reflect the car's state.
2025-08-22 08:53:42 +02:00
1272ecab46 Adds logging for parking zone code
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Adds logging of the parking zone code when parking starts in a determined zone.
This provides more detailed information for debugging and monitoring purposes.
2025-08-21 23:31:30 +02:00
3c64228f8c Updates zone file path
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Updates the default zone file path to point to the parking zones file.

This change ensures the application uses the correct GeoJSON file for determining parking zones.
2025-08-21 17:26:26 +02:00
b00cebbd0a Add test cases
All checks were successful
Build, Push and Run Container / build (push) Successful in 27s
2025-08-21 17:23:52 +02:00
00e79097d6 Fixes telemetry config endpoint call
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Removes redundant verb from the telemetry config endpoint URI, ensuring the request is correctly routed.
2025-08-21 15:15:27 +02:00
c62dc22245 Plain text instead of JSON
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
2025-08-21 15:13:18 +02:00
85cf55f878 Check config
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-21 15:11:30 +02:00
6c59133e13 Status endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-21 15:06:18 +02:00
d2e976aee1 Adds VIN to RePair telemetry config request
All checks were successful
Build, Push and Run Container / build (push) Successful in 29s
Ensures the RePair endpoint includes the VIN in the telemetry config request.
This guarantees that telemetry data is specifically requested for the provided VIN.
2025-08-21 14:59:51 +02:00
576b3b91a4 Updates access token for RePair endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Updates the hardcoded access token used in the /RePair endpoint.

The previous token was likely outdated or invalid, preventing the endpoint from functioning correctly. This change ensures the endpoint can properly authenticate and access necessary resources.
2025-08-21 14:56:31 +02:00
0549406720 Specifies ILogger type for RePair endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Specifies ILogger type for the RePair endpoint,
ensuring the correct logger context is used for configuration-related logging.
2025-08-21 14:55:14 +02:00
1de73e0bca Uses dependency injection for logger/client
All checks were successful
Build, Push and Run Container / build (push) Successful in 27s
Specifies that the logger and http client factory should be injected via dependency injection instead of directly from the request.

This allows for better testability and separation of concerns.
2025-08-21 14:54:05 +02:00
430daa39dc Configures fleet telemetry via API
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
Implements fleet telemetry configuration by first removing the existing telemetry configuration and then posting a new configuration.

This configures telemetry data collection intervals and host information.

Adds logging for request/response from the API.
2025-08-21 14:52:03 +02:00
4cfad4ae33 Add diagnose endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 29s
2025-08-21 14:32:06 +02:00
df999abf6c Improves parking state detection and logging
All checks were successful
Build, Push and Run Container / build (push) Successful in 28s
Enhances parking state logic by setting the initial gear to "P" and adding more detailed logging for state changes and parking events.

This provides better insight into vehicle states and parking behaviors.
2025-08-21 09:41:51 +02:00
c0a14e070c Change API key
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-20 12:22:35 +02:00
317b3eeacd Zone determinator service wired
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-20 12:03:10 +02:00
a9121cf48e Notification and parking zones
All checks were successful
Build, Push and Run Container / build (push) Successful in 37s
2025-08-20 12:00:41 +02:00
326c46cb27 Subscribes to a broader telemetry topic
All checks were successful
Build, Push and Run Container / build (push) Successful in 30s
Updates the MQTT client to subscribe to all subtopics under "telemetry"
using the wildcard "#". This allows the client to receive messages from various telemetry sources, improving data ingestion.
2025-08-19 12:59:19 +02:00
0d2fdc4de6 Enhances MQTT server logging
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Improves logging for MQTT server events to provide more detailed
information for debugging and monitoring. Logs the message payload
when a client publishes a message and includes username, password,
and remote IP address when an observer fails to connect due to
invalid credentials.
2025-08-19 10:16:31 +02:00
de4e06401b Read payload as string
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-18 22:34:47 +02:00
05c102aee8 Add KeyPairing to /Tesla endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-18 22:07:10 +02:00
5daf0825a0 Adds fleet status endpoint
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Adds an endpoint to retrieve fleet status information.

This endpoint uses a Tesla API proxy to fetch the fleet status
based on provided VINs. It handles authentication using a bearer
token and sends a POST request to the /api/1/vehicles/fleet_status
endpoint.

Also introduces new data models to properly serialize/deserialize the fleet status response.
2025-08-18 21:47:06 +02:00
166ac0b290 Publish MQTT
All checks were successful
Build, Push and Run Container / build (push) Successful in 3s
2025-08-18 15:04:29 +02:00
1aa42c1cd6 Increases log verbosity during development
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
Configures logging to show more detailed information during development.
Improves logging for debugging and troubleshooting authentication issues.
2025-08-18 14:22:32 +02:00
ce5852cbe8 Register automatic-parking.app
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
2025-08-18 14:18:42 +02:00
d291e6ec3e Removes redundant client configuration
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Removes the redundant base address and header configurations from within the endpoint handler. This configuration should be handled elsewhere, avoiding unnecessary repetition.
2025-08-18 12:34:07 +02:00
f06dd72213 Updates application registration endpoints
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Changes the application registration endpoints to use the ITeslaAuthenticatorService interface.

Updates the KeyPairing endpoint to redirect to the correct Tesla connector app.
Adds a new KeyPairing2 endpoint.
2025-08-18 12:28:05 +02:00
5719bf41b9 Certificate manager removed 2025-08-17 16:14:09 +02:00
dee65c9ee4 Certificate Manager? 2025-08-17 16:13:39 +02:00
947a1313c8 Move no cars found so logs can be read
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 12:29:12 +02:00
f724e59f7f Configures telemetry using external file
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Reads telemetry configuration parameters such as hostname, port, and CA certificate from an external JSON file.
This decouples configuration from code, allowing for easier updates and management of telemetry settings.
2025-08-17 12:27:32 +02:00
701b578b71 Removes redundant content-type header
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Removes the explicit setting of the "Content-Type" header,
as HttpClient handles this automatically based on the content being sent.

This change simplifies the code and avoids potential conflicts
if the content type is already being set elsewhere.
2025-08-17 12:18:38 +02:00
0ac37d198c Configures insecure HTTP client for proxy
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
Adds named HTTP client configuration with insecure settings to
communicate with the tesla_command_proxy, which uses a self-signed
certificate.

Changes the base address to use HTTPS.
2025-08-17 12:17:01 +02:00
3663595f78 Updates redirect URI for authorization
All checks were successful
Build, Push and Run Container / build (push) Successful in 26s
Changes the redirect URI after successful authorization to a more specific endpoint, likely to integrate with a UI or service named "Tesla". This allows the application to properly handle the authorization response and proceed with the next steps.
2025-08-17 12:12:40 +02:00
04a708216a Uses local redirect for authorization.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Changes from `RedirectToRoute` to `LocalRedirect` for the
authorization endpoint to improve security and ensure the
redirect stays within the application's domain.
2025-08-17 12:11:27 +02:00
f049d023c9 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.
2025-08-17 12:03:26 +02:00
663bb4b019 Return
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 00:39:46 +02:00
c05678b619 Set issuer
All checks were successful
Build, Push and Run Container / build (push) Successful in 21s
2025-08-17 00:37:23 +02:00
06514e2929 Refactors Tesla OIDC configuration retrieval
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Replaces the default document retriever with a custom implementation.

This change simplifies the configuration by embedding the HTTP document retriever directly within the custom retriever, and centralizes the URL replacement logic for Tesla's OIDC configuration. This avoids injecting the HttpDocumentRetriever into the TeslaDocumentRetriever constructor and makes the code more maintainable.
2025-08-17 00:35:34 +02:00
8442fb8f05 Updates Tesla OIDC address.
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Updates the Tesla OIDC address to use the production environment.

This ensures that the application uses the correct endpoint for authentication
and avoids issues related to using the development environment in production.
2025-08-17 00:33:48 +02:00
9b96072982 Removes unused object instantiation
All checks were successful
Build, Push and Run Container / build (push) Successful in 23s
Removes the unnecessary instantiation of the OpenIdConnectConfigurationRetriever. The object is instantiated directly in the ConfigurationManager constructor, making the explicit instantiation redundant.
2025-08-17 00:32:05 +02:00
5dbaf01a99 Fix the fix
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-17 00:18:39 +02:00
944256940f Fix
Some checks failed
Build, Push and Run Container / build (push) Failing after 17s
2025-08-17 00:16:16 +02:00
02725b0596 Add validissuer
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
2025-08-16 23:53:01 +02:00
20b11cff71 Manual config
All checks were successful
Build, Push and Run Container / build (push) Successful in 24s
2025-08-16 23:50:09 +02:00