|
| 1 | +template: viessmann |
| 2 | +products: |
| 3 | + - brand: Viessmann |
| 4 | + description: |
| 5 | + generic: Viessmann (SG Ready) |
| 6 | +group: heating |
| 7 | +# requirements: |
| 8 | +# evcc: ["sponsorship"] |
| 9 | +params: |
| 10 | + # TODO mark parameters as required |
| 11 | + - name: installation_id # TODO guide user on how to get this value |
| 12 | + - name: gateway_serial # TODO guide user on how to get this value |
| 13 | + - name: device_id # TODO guide user on how to get this value |
| 14 | + - name: token # TODO get with client id via oauth2 |
| 15 | + - name: target_temperature |
| 16 | + description: |
| 17 | + de: Zieltemperatur für Einmal-Warmwasser-Zubereitung (°C), max=60 |
| 18 | + en: Target temperator for onetimecharge (°C), max=60 |
| 19 | + default: 45 |
| 20 | + type: int |
| 21 | +render: | |
| 22 | + type: sgready |
| 23 | + getmode: |
| 24 | + source: http |
| 25 | + uri: https://api.viessmann.com/iot/v2/features/installations/{{.installation_id}}/gateways/{{.gateway_serial}}/devices/{{.device_id}}/features/heating.dhw.oneTimeCharge |
| 26 | + headers: |
| 27 | + - content-type: application/json |
| 28 | + - authorization: Bearer {{.token}} |
| 29 | + jq: '.data.properties.active.value | if . == false then 1 elif . == true then 2 else . end' |
| 30 | + # false -> oneTimeCharge is disabled -> normal mode -> 1 |
| 31 | + # true -> oneTimeCharge is enabled -> boost mode -> 2 |
| 32 | + setmode: |
| 33 | + source: switch |
| 34 | + switch: |
| 35 | + - case: 1 # normal |
| 36 | + set: |
| 37 | + source: http |
| 38 | + uri: https://api.viessmann.com/iot/v2/features/installations/{{.installation_id}}/gateways/{{.gateway_serial}}/devices/{{.device_id}}/features/heating.dhw.oneTimeCharge/commands/deactivate |
| 39 | + method: POST |
| 40 | + headers: |
| 41 | + - content-type: application/json |
| 42 | + - authorization: Bearer {{.token}} |
| 43 | + body: > |
| 44 | + { } |
| 45 | + - case: 2 # boost |
| 46 | + set: |
| 47 | + source: sequence |
| 48 | + set: |
| 49 | + - source: http |
| 50 | + uri: https://api.viessmann.com/iot/v2/features/installations/{{.installation_id}}/gateways/{{.gateway_serial}}/devices/{{.device_id}}/features/heating.dhw.temperature.temp2/commands/setTargetTemperature |
| 51 | + method: POST |
| 52 | + headers: |
| 53 | + - content-type: application/json |
| 54 | + - authorization: Bearer {{.token}} |
| 55 | + body: > |
| 56 | + {"temperature": {{.target_temperature}}} |
| 57 | + - source: http |
| 58 | + uri: https://api.viessmann.com/iot/v2/features/installations/{{.installation_id}}/gateways/{{.gateway_serial}}/devices/{{.device_id}}/features/heating.dhw.oneTimeCharge/commands/activate |
| 59 | + method: POST |
| 60 | + headers: |
| 61 | + - content-type: application/json |
| 62 | + - authorization: Bearer {{.token}} |
| 63 | + body: > |
| 64 | + { } |
0 commit comments