evcc icon indicating copy to clipboard operation
evcc copied to clipboard

ostrom Tariff: 400 Bad Request

Open kallelix opened this issue 2 years ago • 1 comments

Describe the bug

OStrom api wirft 400 Bad request bei Preisabfrage für dynamischen Tariff. OStrom erwartet bei den Timestamps zwingend die Angabe der Millisekunden. Auf meinem System werden die request ohne Millisekunden generiert. Siehe trace.

Steps to reproduce

Funktioniert:

curl --request GET --url 'https://production.ostrom-api.io/spot-prices?startDate=2024-11-29T00%3A00%3A00.000Z&endDate=2024-11-30T00%3A00%3A00.000Z&resolution=HOUR&zip=98693' --header 'accept: application/json' --header 'authorization: Bearer ey........250'

Funktioniert nicht:

curl --request GET --url 'https://production.ostrom-api.io/spot-prices?startDate=2024-11-29T00%3A00%3A00Z&endDate=2024-11-30T00%3A00%3A00Z&resolution=HOUR&zip=98693' --header 'accept: application/json' --header 'authorization: Bearer ey........250'

Configuration details

network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: debug
levels:
  cache: error

# unique installation id
plant: 3b...16

interval: 10s # control cycle interval

tariffs:
  grid:
    type: template
    template: ostrom
    clientid: 12...00c
    clientsecret: 55922973fc...e5ede

chargers:
- type: template
  template: ellipro
  ski: 1113 ... C1B5
  ip: 192.168.178.51
  name: wallbox2

vehicles:
- type: template
  template: id
  title: ID.Buzz
  user: ...
  password: ...
  vin: W...
  capacity: 77
  name: ev1

loadpoints:
- title: Garage
  charger: wallbox2
  mode: now
  phases: 3
  mincurrent: 6
  maxcurrent: 16

meters:
- name: irusb
  type: custom
  power:
    source: http
    uri: http://iobroker:8087/getPlainValue/smartmeter.0.1-0:16_7_0__255.value
    method: GET
- name: pvgarage
  type: custom
  power:
    source: http
    uri: http://iobroker:8087/getPlainValue/deyeidc.0.3915920900.APo_t1
    method: GET

site:
  title: Mein Zuhause
  meters:
    grid: irusb
    pv: pvgarage

Log details

[ostrom] TRACE 2024/11/28 20:14:27 GET https://production.ostrom-api.io/spot-prices?endDate=2024-11-30T00%3A00%3A00Z&resolution=HOUR&startDate=2024-11-28T00%3A00%3A00Z&zip=98693
[ostrom] TRACE 2024/11/28 20:14:27 {"type":"bad_request","detail":["startDate must be longer than or equal to 24 characters","endDate must be longer than or equal to 24 characters"]}
[ostrom] ERROR 2024/11/28 20:14:27 unexpected status: 400 (Bad Request)
[main ] FATAL 2024/11/28 20:14:27 cannot create tariff type 'template': cannot create tariff type 'ostrom': unexpected status: 400 (Bad Request)

What type of operating system are you running?

Linux

Nightly build

  • [X] I have verified that the issue is reproducible with the latest nightly build

Version

0.131.7

kallelix avatar Nov 28 '24 20:11 kallelix

#17426

kallelix avatar Nov 28 '24 20:11 kallelix