Skip to content
Open
Changes from 1 commit
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
20 changes: 10 additions & 10 deletions templates/definition/vehicle/iobroker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .soc }}/plain?extraPlain=true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): With the documented rest-api adapter setup and the documented host-only .uri, every vehicle request is sent to /v1/state/... instead of the adapter's /rest-api/v1/state/... mount, so reads and writes fail with an unavailable endpoint rather than accessing the configured datapoints.

Triggers: When .uri is a host URI as shown in the template example and the ioBroker rest-api adapter is mounted under /rest-api.

Suggested fix: Retain the /rest-api prefix, or update the adapter/URI contract consistently and migrate the charger and meter ioBroker templates as well.

uri: {{ .uri }}/v1/state/{{ .soc }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -154,7 +154,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .range }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .range }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -168,7 +168,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .status }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .status }}/plain?extraPlain=true
cache: {{ .cache }}
{{- $a := .statusA | nospace | splitList "," | compact }}
{{- $b := .statusB | nospace | splitList "," | compact }}
Expand All @@ -189,7 +189,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .limitSoc }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .limitSoc }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -203,7 +203,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .odometer }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .odometer }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -217,7 +217,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .climater }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .climater }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -231,7 +231,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .finishTime }}/plain?extraPlain=true
uri: {{ .uri }}/v1/state/{{ .finishTime }}/plain?extraPlain=true
cache: {{ .cache }}
{{- if .user }}
auth:
Expand All @@ -245,7 +245,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .chargeEnable }}?value=${chargeenable}
uri: {{ .uri }}/v1/state/{{ .chargeEnable }}?value=${chargeenable}
{{- if .user }}
auth:
type: basic
Expand All @@ -258,7 +258,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .setMaxCurrent }}?value=${maxcurrent}
uri: {{ .uri }}/v1/state/{{ .setMaxCurrent }}?value=${maxcurrent}
{{- if .user }}
auth:
type: basic
Expand All @@ -271,7 +271,7 @@ render: |
source: http
headers:
- accept: text/plain;charset=UTF-8
uri: {{ .uri }}/rest-api/v1/state/{{ .wakeup }}?value=${wakeup}
uri: {{ .uri }}/v1/state/{{ .wakeup }}?value=${wakeup}
{{- if .user }}
auth:
type: basic
Expand Down
Loading