### EDF Tempo Energy Provider Configuration (YAML) Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configure TeslaMateAgile to use the EDF Tempo tariff, which varies pricing by day color (Blue, White, Red) and peak/off-peak hours. Set the API endpoint and the six price values in €/kWh. Pricing follows French time (CET) with off-peak 22:00-06:00 and peak 06:00-22:00. The prices shown are examples and may not be current; verify with EDF Tempo. ```yaml - TeslaMate__EnergyProvider=EDFTempo - EDFTempo__BaseUrl=https://www.api-couleur-tempo.fr/api/joursTempo # EDF Tempo API endpoint - EDFTempo__BLUE_HP=0.1612 # Blue day peak hours price (€/kWh) - EDFTempo__BLUE_HC=0.1325 # Blue day off-peak hours price (€/kWh) - EDFTempo__WHITE_HP=0.1871 # White day peak hours price (€/kWh) - EDFTempo__WHITE_HC=0.1499 # White day off-peak hours price (€/kWh) - EDFTempo__RED_HP=0.7060 # Red day peak hours price (€/kWh) - EDFTempo__RED_HC=0.1575 # Red day off-peak hours price (€/kWh) ``` -------------------------------- ### Add TeslaMateAgile service to docker-compose.yml Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Add this service definition to the services section of your docker-compose.yml file when using the TeslaMate Docker install guide. Configure the environment variables as needed; Octopus and Tibber variables are only required for those providers. ```yaml services: teslamateagile: image: ghcr.io/amyjeanes/teslamateagile:latest restart: always environment: - DATABASE_USER=teslamate - DATABASE_PASS=secret - DATABASE_NAME=teslamate - DATABASE_HOST=database - TeslaMate__UpdateIntervalSeconds=300 - TeslaMate__GeofenceId=1 - TeslaMate__EnergyProvider=Octopus - Octopus__RegionCode=A # Octopus Energy only - Tibber__AccessToken=abc123 # Tibber only ``` -------------------------------- ### Home Assistant provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Home Assistant provider. Requires base URL, access token, and entity ID. Lookback days is optional but highly recommended. ```yaml - TeslaMate__EnergyProvider=HomeAssistant - TeslaMate__LookbackDays=7 # Optional: Highly recommended, see below Optional environment variables section - HomeAssistant__BaseUrl=http://homeassistant.local:8123 # URL to your Home Assistant instance - HomeAssistant__AccessToken=abc123 # Long-lived access token for Home Assistant - HomeAssistant__EntityId=input_number.energy_price # ID of the number-based entity containing price data in Home Assistant (Cost is in your currency e.g. pounds, euros, dollars (not pennies, cents, etc)) ``` -------------------------------- ### Warning log for short charges with no cost Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Log output when TeslaMateAgile cannot determine phases for short charges, resulting in zero cost. This warning appears in the logs and indicates the charge was not priced. ```text warn: TeslaMateAgile.PriceManager[0] Unable to determine phases for charges info: TeslaMateAgile.PriceManager[0] Calculated cost 0 and energy 0 kWh for charging process 26 ``` -------------------------------- ### PGE Energy Provider Configuration (YAML) Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configure TeslaMateAgile to use Pacific Gas & Electric's day-ahead market pricing. Set your PGE rate plan (e.g., EV2A) and your RepresentativeCircuitId for your pricing zone. The BaseUrl, Utility, Market, and Program are optional. Pricing is published daily at 6pm Pacific Time for the following day, so ensure UpdateIntervalSeconds allows regular updates. ```yaml - TeslaMate__EnergyProvider=PGE - PGE__RateName=EV2A # Your specific PGE rate plan (e.g., EV2A, E-ELEC, etc.) - PGE__RepresentativeCircuitId=123456789 # Your specific circuit identifier for your service territory - PGE__BaseUrl=https://pge-pe-api.gridx.com # Optional: PGE API endpoint - PGE__Utility=PGE # Optional: Utility name - PGE__Market=DAM # Optional: Market type - Day-Ahead Market - PGE__Program=CalFUSE # Optional: Program name ``` -------------------------------- ### Fixed Price provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Fixed Price provider for time-of-use tariffs. Prices are set in your currency (e.g., pounds, euros, dollars) and time zone is IANA. ```yaml - TeslaMate__EnergyProvider=FixedPrice - FixedPrice__TimeZone=Europe/London # IANA (tz database) time zone code, used for below times - FixedPrice__Prices__0=08:00-13:00=0.1559 # Cost is in your currency e.g. pounds, euros, dollars (not pennies, cents, etc) - FixedPrice__Prices__1=13:00-20:00=0.05 # You can have as many as these as you need - FixedPrice__Prices__2=20:00-03:30=0.04 - FixedPrice__Prices__3=03:30-06:00=0.035 - FixedPrice__Prices__4=06:00-08:00=0.02 ``` -------------------------------- ### Energinet provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Energinet provider. Requires region and currency, with optional VAT multiplier, negative price clamping, and fixed prices. ```yaml - TeslaMate__EnergyProvider=Energinet - Energinet__Region=YYYYY # See below Energinet regions section - Energinet__Currency=DKK # See below Energinet currencies section - Energinet__VAT=1.25 # Optional: VAT multiplier. In this example 25% - Energinet__ClampNegativePrices=false # Optional: Clamp negative prices to 0 (default: false) - Energinet__FixedPrices__TimeZone=Europe/Copenhagen # Optional: IANA (tz database) time zone code, used for below times - Energinet__FixedPrices__Prices__0=00:00-17:00=0.1432 # Optional: You can have as many as these as you need - Energinet__FixedPrices__Prices__1=17:00-20:00=0.3983 - Energinet__FixedPrices__Prices__2=20:00-00:00=0.1432 ``` -------------------------------- ### Database connection string alternative Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Alternative database connection using a connection string. Not recommended. ```yaml - ConnectionStrings__TeslaMate=Host=database;Database=teslamate;User Id=teslamate;Password=secret; ``` -------------------------------- ### Required environment variables Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Sets the scan interval for finished charges and optionally the geofence ID. If the geofence ID is unset, charges outside any geofence are priced, intended for public charging. ```yaml - TeslaMate__UpdateIntervalSeconds=3600 # Scan interval for finished charges, should not exceed lookback days if set - TeslaMate__GeofenceId=1 # You can get this by editing the Geofence inside TeslaMate and getting it from the url ``` -------------------------------- ### Fixed Price Weekly provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Fixed Price Weekly provider for tariffs that vary by day of the week. Supports comma-separated days or ranges, and optional time ranges. ```yaml - TeslaMate__EnergyProvider=FixedPriceWeekly - FixedPriceWeekly__TimeZone=Europe/London # IANA (tz database) time zone code, used for below times - FixedPriceWeekly__Prices__0=Mon-Wed=08:00-13:00=0.1559 # Cost is in your currency e.g. pounds, euros, dollars (not pennies, cents, etc) - FixedPriceWeekly__Prices__1=Mon-Wed=13:00-08:00=0.05 # Day(s) of the week can be comma separated or a range (e.g. Mon-Fri or Mon,Wed,Fri) - FixedPriceWeekly__Prices__2=Thu=0.22 # The time range is optional and will be used for the whole day if unspecified - FixedPriceWeekly__Prices__3=Fri,Sat=08:00-18:00=0.1559 # You can have as many as these as you need - FixedPriceWeekly__Prices__4=Fri,Sat=18:00-08:00=0.04 - FixedPriceWeekly__Prices__5=Sun=12:00-18:00=0.1559 - FixedPriceWeekly__Prices__6=Sun=18:00-08:00=0.04 - FixedPriceWeekly__Prices__7=Sun=08:00-12:00=0.1559 ``` -------------------------------- ### Recalculate charge costs for all charges at a geofence Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Sets the cost column to NULL for all charges with a specific geofence ID to trigger recalculation. Replace {GeofenceId} with your geofence ID. Use with caution as it may cause permanent data loss. ```sql UPDATE charging_processes SET cost=NULL WHERE geofence_id={GeofenceId} ``` -------------------------------- ### Tibber GraphQL query to list homes Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Query the Tibber GraphQL API to list homes and their addresses. Use the returned id to set Tibber__HomeId. ```graphql { viewer { homes { id address { address1 postalCode city country } } } } ``` -------------------------------- ### Legacy docker image warning log Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Warning log when using the outdated docker repository. The message directs to GitHub for more information. ```text warn: TeslaMateAgile.PriceService[0] You are using an outdated docker repository. See GitHub for more information: https://github.com/AmyJeanes/TeslaMateAgile#why-am-i-seeing-a-warning-about-using-a-legacy-docker-image ``` -------------------------------- ### Tibber provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Tibber provider. Requires an access token and optionally a home ID for multiple homes. ```yaml - TeslaMate__EnergyProvider=Tibber - Tibber__AccessToken=abc123 # See below Tibber Access Token section - Tibber__HomeId=c0693acc-567d-49d4-87d9-71a66d10f5c7 # Optional: See below Tibber Multiple Homes section ``` -------------------------------- ### Monta Energy Provider Configuration (YAML) Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configure TeslaMateAgile to use the Monta energy provider. Set the Client ID and Client Secret from your Monta Public API app. Optionally restrict searches to a specific charge point with ChargePointId, and choose the PriceType (default is Cost). Use Price when you are the driver on someone else's charge point, as Cost records the owner's energy cost and may be empty on public charge points. ```yaml - TeslaMate__EnergyProvider=Monta - Monta__ClientId=abc123 # Client ID of your Monta Public API app - Monta__ClientSecret=abc123 # Client secret of your Monta Publiic API app - Monta__ChargePointId=123 # Optional: Restrict searches to a particular charge point ID - Monta__PriceType=Cost # Optional (default: Cost), see below Monta price types section ``` -------------------------------- ### Docker Compose image change Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md YAML configuration to switch from the old mattjeanes/teslamateagile image to the new ghcr.io/amyjeanes/teslamateagile image in a docker-compose.yml file. ```yaml services: teslamateagile: image: ghcr.io/amyjeanes/teslamateagile:latest ``` -------------------------------- ### aWATTar provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the aWATTar provider. The VAT multiplier is optional and defaults to 1.19. ```yaml - TeslaMate__EnergyProvider=Awattar - Awattar__VATMultiplier=1.00 # Optional (default: 1.19), you should not need to set this unless your VAT differs from the default ``` -------------------------------- ### Database connection environment variables Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configure the TeslaMate PostgreSQL connection using environment variables. The DATABASE_PORT is optional and defaults to 5432. ```yaml - DATABASE_HOST=database - DATABASE_NAME=teslamate - DATABASE_USER=teslamate - DATABASE_PASS=secret - DATABASE_PORT=5432 # Optional (default: 5432) ``` -------------------------------- ### Recalculate charge costs for a particular charge Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Sets the cost column to NULL for a specific charge ID to trigger recalculation. Replace {ChargeId} with the actual charge ID from the Grafana URL. Use with caution as it may cause permanent data loss. ```sql UPDATE charging_processes SET cost=NULL WHERE id={ChargeId} ``` -------------------------------- ### Octopus Energy provider configuration Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Configures the Octopus Energy provider. Requires the region code as described in the Octopus Region Code section. ```yaml - TeslaMate__EnergyProvider=Octopus - Octopus__RegionCode=A # See below Octopus Region Code section ``` -------------------------------- ### Rate limit error log Source: https://github.com/amyjeanes/teslamateagile/blob/main/README.md Error log when a charge requires more requests than the rate limit allows in one period, so it cannot be priced. The message suggests raising TeslaMate__RateLimitMaxRequests to at least 2. ```text fail: TeslaMateAgile.Helpers.RateLimitHelper[0] This charge asked for more requests from the energy provider than the rate limit allows in one whole period, so it cannot be priced however often it is retried. Raise TeslaMate__RateLimitMaxRequests to at least 2, it is currently 1 per 10 second(s) ```