<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Thema "Re: Betreff: Syntax for setting a value" in Getting started programming with the Viessmann API</title>
    <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376832#M473</link>
    <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/29136"&gt;@CustomerCareMichael&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it works with Postman.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I copy the cURL request from Postman to the command prompt, it does not work anymore. So the problem was there I think.&lt;BR /&gt;&lt;BR /&gt;Thanks again and kind regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 12:46:09 GMT</pubDate>
    <dc:creator>rbeintausend</dc:creator>
    <dc:date>2023-10-30T12:46:09Z</dc:date>
    <item>
      <title>Syntax for setting a value</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/374222#M462</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;first of all thanks a lot for the documentation on the API, which makes it possible even for beginners like me to work/play with it.&lt;/P&gt;&lt;P&gt;I went over the documentation and managed (of course after many tries and mistakes) to complete the getting started part and also the authentication. Everything works fine.&lt;/P&gt;&lt;P&gt;I can also read out actual values of my system.&lt;/P&gt;&lt;P data-unlink="true"&gt;E.g.&lt;BR /&gt;curl -X GET https://api.viessmann.com/iot/v2/features/installations/{{Installation_ID}}/gateways/{{gateway_ID}}/devices/{{device_ID}}/features/heating.dhw.temperature.main&amp;nbsp;&amp;nbsp;&amp;nbsp;--header "Authorization: Bearer {Access_Token}"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;As stated, that works like a charm.&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;BR /&gt;But I cannot figure out how to set a new target value.&lt;/P&gt;&lt;P data-unlink="true"&gt;I have tried it as it is shown in the documentation:&lt;BR /&gt;curl -X POST https://api.viessmann.com/iot/v2/features/installations/{{installationID}}/gateways/{{gatewaySerial}}/devices/{{deviceId}}/features/heating.dhw.temperature.main/commands/setTargetTemperature&amp;nbsp;&amp;nbsp; --header 'Content-Type: application/json'&amp;nbsp; --data '{"temperature": 55}'&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Of course that does not work, because I need to handover my access-token as well. (my understanding)&lt;/P&gt;&lt;P data-unlink="true"&gt;So I receive:&lt;/P&gt;&lt;P data-unlink="true"&gt;{"viErrorId":"req-3873e289641245f7b2283b16f52260ab","statusCode":401,"errorType":"UNAUTHORIZED","message":"Authorization failed while trying to perform this action"}&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;But when add my access token to that, I think I am messing something up with the syntax, because I keep getting error messages.&lt;/P&gt;&lt;P data-unlink="true"&gt;I tried for example&lt;BR /&gt;curl -X POST https://api.viessmann.com/iot/v2/features/installations/{{installationID}}/gateways/{{gatewaySerial}}/devices/{{deviceId}}/features/heating.dhw.temperature.main/commands/setTargetTemperature&amp;nbsp;&amp;nbsp; --header 'Content-Type: application/json'&amp;nbsp; --data '{"temperature": 55}'&amp;nbsp; --header 'Authorization: Bearer {{Access_Token}}'&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Or&lt;BR /&gt;curl -X POST https://api.viessmann.com/iot/v2/features/installations/{{installationID}}/gateways/{{gatewaySerial}}/devices/{{deviceId}}/features/heating.dhw.temperature.main/commands/setTargetTemperature&amp;nbsp; --header 'Authorization: Bearer {Access_Token}'&amp;nbsp; --header 'Content-Type: application/json'&amp;nbsp; --data '{"temperature": 55}'&amp;nbsp; --header 'Authorization: Bearer {Access_Token}'&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;And many many more. But no luck.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Usually the return message ist:&lt;BR /&gt;{"viErrorId":"req-22da678479e54f0faac6ddeddd2a61db","statusCode":401,"errorType":"UNAUTHORIZED","message":"Authorization failed while trying to perform this action"}curl: (6) Could not resolve host: Bearer&lt;BR /&gt;curl: (3) URL using bad/illegal format or missing URL&lt;BR /&gt;curl: (6) Could not resolve host: application&lt;BR /&gt;curl: (3) unmatched close brace/bracket in URL position 3:&lt;BR /&gt;44}'&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Could someone help me to find the right syntax for setting a target value?&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Thanks a lot in advance and please excuse any lack of knowledge here. I am just getting started &lt;span class="lia-unicode-emoji" title=":leicht_lächelndes_Gesicht:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;BR /&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 10:23:46 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/374222#M462</guid>
      <dc:creator>rbeintausend</dc:creator>
      <dc:date>2023-10-24T10:23:46Z</dc:date>
    </item>
    <item>
      <title>Betreff: Syntax for setting a value</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376069#M470</link>
      <description>&lt;P&gt;Hi again,&lt;BR /&gt;&lt;BR /&gt;anyone able to help me out here? I am really stuck &lt;span class="lia-unicode-emoji" title=":enttäuschtes_Gesicht:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any possible help&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2023 09:40:49 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376069#M470</guid>
      <dc:creator>rbeintausend</dc:creator>
      <dc:date>2023-10-29T09:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Syntax for setting a value</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376481#M471</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="color:var(--ck-color-mention-text);"&gt;&lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/56510"&gt;@rbeintausend&lt;/a&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; , happy to support you on your issue!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a request for setting a value, that is working for me (setting the target temperature of the comfort program to 20 degrees):&lt;/P&gt;
&lt;P&gt;&lt;I&gt;curl -X POST '&lt;A href="https://api.viessmann.com/iot/v2/features/installations/{{installationID}}/gateways/{{gatewaySerial}}/devices/{{deviceId}}/features/heating.circuits.0.operating.programs.comfort/commands/setTemperature" target="_blank"&gt;https://api.viessmann.com/iot/v2/features/installations/{{installationID}}/gateways/{{gatewaySerial}}/devices/{{deviceId}}/features/heating.circuits.0.operating.programs.comfort/commands/setTemperature&lt;/A&gt;' --header 'Content-Type: application/json' --header 'Authorization: Bearer &lt;/I&gt;&lt;SPAN style="background-color:rgb(255,255,255);color:rgb(45,51,56);font-size:13px;"&gt;&lt;I&gt;{{Access_Token}}&lt;/I&gt;&lt;/SPAN&gt;&lt;I&gt;' --data '{"targetTemperature": 20}'&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the response:&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"data": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"success": true,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"message": null,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;"reason": "COMMAND_EXECUTION_SUCCESS"&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The request does not really differ from what you are attempting to do. So I am not sure yet what could be the issue for you. Normally, the error message you get shows that there is no access token provided in the request.&lt;/P&gt;
&lt;P&gt;Did you also try using Postman for this API request? In our &lt;A href="https://www.postman.com/vimicho/workspace/viessmann-api-public/collection/12055031-17157e90-a2e8-47b6-a7b8-2320c2941db3?action=share&amp;amp;creator=12055031" target="_blank"&gt;Postman example collection&lt;/A&gt;, you also find a command for setting the DHW temperature. You can also let Postman show you the corresponding cURL request by clicking &amp;nbsp;on the &lt;STRONG&gt;&amp;lt;/&amp;gt;&lt;/STRONG&gt; icon on the right hand side of Postman.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 06:56:06 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376481#M471</guid>
      <dc:creator>CustomerCareMichael</dc:creator>
      <dc:date>2023-10-30T06:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Syntax for setting a value</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376618#M472</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/29136"&gt;@CustomerCareMichael&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first of all thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I tried the syntax you posted and it does not help. I am getting the following return message:&lt;/P&gt;&lt;P&gt;{"viErrorId":"req-dd86ffe0155f41e392b483896d2a8e01","statusCode":401,"errorType":"UNAUTHORIZED","message":"Authorization failed while trying to perform this action"}curl: (3) URL using bad/illegal format or missing URL&lt;BR /&gt;curl: (6) Could not resolve host: application&lt;BR /&gt;curl: (3) URL using bad/illegal format or missing URL&lt;BR /&gt;curl: (6) Could not resolve host: Bearer&lt;BR /&gt;curl: (3) URL using bad/illegal format or missing URL&lt;BR /&gt;curl: (3) unmatched brace in URL position 2:&lt;BR /&gt;'{targetTemperature:&lt;BR /&gt;^&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The access token is not the issue, I tested it with several GET commands and the returns are always fine. The issue seems to comes up, when I try to pass more than one header. (For the GET commands I do not need that, I just hand over the access token)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the windows command prompt, so maybe the issue lies there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next step for me is trying it with Postman.&lt;BR /&gt;I will let you know, if that solves the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 08:58:39 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376618#M472</guid>
      <dc:creator>rbeintausend</dc:creator>
      <dc:date>2023-10-30T08:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Syntax for setting a value</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376832#M473</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/29136"&gt;@CustomerCareMichael&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it works with Postman.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I copy the cURL request from Postman to the command prompt, it does not work anymore. So the problem was there I think.&lt;BR /&gt;&lt;BR /&gt;Thanks again and kind regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 12:46:09 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Syntax-for-setting-a-value/m-p/376832#M473</guid>
      <dc:creator>rbeintausend</dc:creator>
      <dc:date>2023-10-30T12:46:09Z</dc:date>
    </item>
  </channel>
</rss>

