<?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 "Betreff: Some code to receive info from the Viessmann boiler" in Getting started programming with the Viessmann API</title>
    <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192171#M98</link>
    <description>&lt;P&gt;Quote: "&lt;SPAN&gt;however it is not clear if the JSON order will preserve."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is assured, the order does change so you can't use the array index for parsing the results!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Oct 2021 14:58:46 GMT</pubDate>
    <dc:creator>JueBag</dc:creator>
    <dc:date>2021-10-24T14:58:46Z</dc:date>
    <item>
      <title>Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/187883#M72</link>
      <description>&lt;P&gt;Here is some code I have put together in order to receive basic info from the Viessmann boiler. I have used HTML and PHP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;&amp;lt;html&amp;gt; 
 &amp;lt;title&amp;gt;Viessmann boiler info&amp;lt;/title&amp;gt;
 &amp;lt;body&amp;gt;

 &amp;lt;h1&amp;gt;Viessmann boiler info&amp;lt;/h1&amp;gt;

&amp;lt;?php

$installationId = "Replace with your installation id";
$gatewaySerial = "Replace with your gateway serial";
$deviceId = "Replace with your device Id";


$getURL='https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features';

$headerRequest = array(
		"Content-Type: application/x-www-form-urlencoded",
		"Authorization: Bearer $autorizationTOKEN"
);

  
$cURLConnection = curl_init();
curl_setopt($cURLConnection, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; MSIE 7.01; Windows NT 5.0)");
curl_setopt($cURLConnection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($cURLConnection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($cURLConnection, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($cURLConnection, CURLOPT_RETURNTRANSFER,true);
curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, $headerRequest); 
curl_setopt($cURLConnection, CURLOPT_CONNECTTIMEOUT, 130);
curl_setopt($cURLConnection, CURLOPT_TIMEOUT, 130);
curl_setopt($cURLConnection, CURLOPT_URL,$getURL);

$apiResponse = curl_exec($cURLConnection);
$apiErr = curl_error($cURLConnection);

curl_close($cURLConnection);

$jsonResponse = json_decode($apiResponse, true);

echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";
print_r($jsonResponse);
print_r($apiErr);
echo "&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;";


$BurnerHours = $jsonResponse['data']['29']['properties']['hours']['value'];
echo "BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;";

$BurnerStarts = $jsonResponse['data']['29']['properties']['starts']['value'];
echo "BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;";

$MeasureUnit = $jsonResponse['data']['15']['properties']['value']['unit'];
if ($MeasureUnit == "celsius") {
		$MU = " &amp;amp;deg;C ";
	} else {
		$MU = " &amp;amp;deg;F ";
	}

$TemperatureCommon = $jsonResponse['data']['15']['properties']['value']['value'];
echo "TemperaturaTur: ".$TemperatureCommon." ".$MU."&amp;lt;br&amp;gt;";

$HotWaterSet = $jsonResponse['data']['4']['properties']['value']['value'];
$HotWater = $jsonResponse['data']['20']['properties']['value']['value'];
echo "HotWater: ".$HotWaterSet." / ".$HotWater." ".$MU."&amp;lt;br&amp;gt;";

$RadiatorsSet = $jsonResponse['data']['1']['properties']['temperature']['value'];
$Radiators = $jsonResponse['data']['31']['properties']['value']['value'];
echo "Radiators: ".$RadiatorsSet ." / ".$Radiators." ".$MU."&amp;lt;br&amp;gt;";


?&amp;gt;

&amp;lt;div style="position:relative; "&amp;gt;
			&amp;lt;img src="sistem_termic.png" alt="cetrala" style="display:block; margin-left:auto; margin-right:auto; "&amp;gt; 
	&amp;lt;div style="position:absolute; top: 12%; left:52%; font-size:150%; "&amp;gt;
		&amp;lt;?php echo "Boiler&amp;lt;br&amp;gt;".
			"TemperatureCommon: ".number_format($RadiatorsSet,0).$MU."&amp;lt;br&amp;gt;".
			"BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;".
			"BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;";?&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;div style="position:absolute; top: 53%; left:27%; font-size:150%; text-align:right; "&amp;gt;
		&amp;lt;?php echo "Water heating&amp;lt;br&amp;gt;".
			"Set: ".number_format($HotWaterSet,0).$MU."&amp;lt;br&amp;gt;".
			"Current: ".number_format($HotWater,0).$MU."&amp;lt;br&amp;gt;";?&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;div style="position:absolute; top: 53%; left:50%; font-size:150%; "&amp;gt;
		&amp;lt;?php echo "Radiators&amp;lt;br&amp;gt;".
			"Set: ".number_format($RadiatorsSet,0).$MU."&amp;lt;br&amp;gt;".
			"Current: ".number_format($Radiators,0).$MU."&amp;lt;br&amp;gt;";?&amp;gt;
	&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;

&amp;lt;/body&amp;gt;
 &amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the result is presented in the attached screenshot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 16:30:31 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/187883#M72</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-09-27T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188229#M73</link>
      <description>&lt;P&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt; Thank you very much for sharing your code! This will definitely help others in start developing with the API.&lt;BR /&gt;
Much appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 05:53:04 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188229#M73</guid>
      <dc:creator>CustomerCareMichael</dc:creator>
      <dc:date>2021-09-30T05:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188359#M74</link>
      <description>&lt;P&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/29136"&gt;@CustomerCareMichael&lt;/a&gt;, did you test the code?&lt;BR /&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt;, your code is not functional as it is.&lt;BR /&gt;Where is the "$ autorizationTOKEN" variable?&lt;BR /&gt;Can you provide "sistem_termic.png"?&lt;BR /&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 14:39:42 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188359#M74</guid>
      <dc:creator>nerixs</dc:creator>
      <dc:date>2021-09-30T14:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188368#M75</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;The code is functional only after you get the following variables&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;$autorizationTOKEN&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;$installationId&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;$gatewaySerial&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;$deviceId&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;For this preliminary steps, documentation is available here:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/getting-started" target="_blank" rel="noopener"&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/getting-started&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;and with more details, after you login, here&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/authentication" target="_blank" rel="noopener"&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/authentication&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Also you can take a lock at this post:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.viessmann-community.com/t5/Getting-started-programming-with/To-help-get-started/td-p/181347" target="_blank" rel="noopener"&gt;&lt;FONT&gt;&lt;FONT&gt;https://www.viessmann-community.com/t5/Getting-started-programming-with/To-help-get-started/td-p/181347&lt;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;I have attached the background .PNG. Strongly encourage to design your own and share. Mine is not much.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;All best,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;S&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 15:54:23 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/188368#M75</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-09-30T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191156#M80</link>
      <description>&lt;P&gt;Note that the returned JSON array &lt;STRONG&gt;order&lt;/STRONG&gt;&amp;nbsp;is not assured! Initially I used the array indices&amp;nbsp; as well and had to change my code afterwards!&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 17:45:07 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191156#M80</guid>
      <dc:creator>JueBag</dc:creator>
      <dc:date>2021-10-17T17:45:07Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191158#M81</link>
      <description>&lt;P&gt;True,&amp;nbsp;&lt;/P&gt;&lt;P&gt;it looks like from time to time the order of the data points is changing. I do not know yet what in causing this change. It can be a boiler restart, a restart of the boiler communication gateway or something else.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 17 Oct 2021 18:01:29 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191158#M81</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-17T18:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191190#M82</link>
      <description>&lt;P&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/23149"&gt;@JueBag&lt;/a&gt; Thank you for pointing that out.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;There is no defined order for the returned JSON array. I recommend analysing&amp;nbsp;the using names to sort the values.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;CC: &lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 06:34:57 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191190#M82</guid>
      <dc:creator>CustomerCareMichael</dc:creator>
      <dc:date>2021-10-18T06:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191202#M83</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;If we go data point to data point we will have about 7 queries to the server. If we query the entire list of features will have only one query. Is there any solution to simplify the process?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 07:14:11 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191202#M83</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-18T07:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191321#M84</link>
      <description>&lt;P&gt;You can call for one datapoint, several points or all!&lt;/P&gt;&lt;P&gt;See this example from my javascript rule which is requesting several datapoints:&lt;/P&gt;&lt;P&gt;url ="&lt;A href="https://api.viessmann.com/iot/v1/equipment/installations/" target="_blank"&gt;https://api.viessmann.com/iot/v1/equipment/installations/&lt;/A&gt;"+ installationID +"/gateways/" +gatewaySerial + "/devices/0/features?regex=heating.(sensors.temperature.outside%7Cdhw.(oneTimeCharge%7Csensors.temperature.hotWaterStorage%7Cpumps.circulation)%7Cburners.0.statistics%7Ccircuits.0.operating.modes.active)";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "%7" is used instead of the "|" character.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 17:12:42 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/191321#M84</guid>
      <dc:creator>JueBag</dc:creator>
      <dc:date>2021-10-18T17:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192155#M96</link>
      <description>&lt;P&gt;Very good suggestion. I will publish an update of the code accordingly.&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 11:22:10 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192155#M96</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-24T11:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192157#M97</link>
      <description>&lt;P&gt;So the $getURL variable would be updated as follows. It will be registered as a single transaction, however it is not clear if the JSON order will preserve. For the moment the reply for each data point is not provided in the order stated in the URL. I will return in couple of days after I can test the code in the boiler premises,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$getURL='&lt;A href="https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features?regex=" target="_blank"&gt;https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features?regex=&lt;/A&gt;'&lt;BR /&gt;.'heating.burners'.'%7C'&lt;BR /&gt;.'heating.burners.0.statistics'.'%7C'&lt;BR /&gt;.'heating.boiler.sensors.temperature.commonSupply'.'%7C'&lt;BR /&gt;.'heating.dhw.temperature.main'.'%7C'&lt;BR /&gt;.'hotWaterStorage'.'%7C'&lt;BR /&gt;.'heating.circuits.0.operating.programs.normal'.'%7C'&lt;BR /&gt;.'heating.circuits.0.sensors.temperatue.room';&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 11:48:48 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192157#M97</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-24T11:48:48Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192171#M98</link>
      <description>&lt;P&gt;Quote: "&lt;SPAN&gt;however it is not clear if the JSON order will preserve."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That is assured, the order does change so you can't use the array index for parsing the results!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 14:58:46 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192171#M98</guid>
      <dc:creator>JueBag</dc:creator>
      <dc:date>2021-10-24T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192184#M99</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;So, at the end of the day we remint with 7 queries to the server instead of one ...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;SPAN&gt;Maybe would be good for the syntax&amp;nbsp;to be reviewed and place al data points as elements in an array (&lt;/SPAN&gt;[]&lt;SPAN&gt;) rather than displaying them as "objects" (&lt;/SPAN&gt;{}&lt;SPAN&gt;). Just a thought ...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 17:33:01 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192184#M99</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-24T17:33:01Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192291#M102</link>
      <description>&lt;P&gt;What makes you think so?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try something like that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;var returnvalue = HTTP.sendHttpGetRequest(url, headers, 10*1000);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("returnvalue: {}", returnvalue);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//var arr=returnvalue;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;returnvalue = JSON.parse(returnvalue);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var count = returnvalue.data.length;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("count: {}", count);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;try {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for (var i = 0; i &amp;lt; count; i++) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;switch (returnvalue.data[i].feature) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.sensors.temperature.outside":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var temp = returnvalue.data[i].properties.value.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate('OutsideTemperature', temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, ExtTemp: {}", i,temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.dhw.sensors.temperature.hotWaterStorage":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var temp = returnvalue.data[i].properties.value.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate('BoilerTemperature', temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, HotWaterStorageTemp: {}", i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.dhw.oneTimeCharge":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var temp = returnvalue.data[i].properties.active.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;temp = (temp === true) ? 'on' : 'off';&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate('IsOneTimeCharge', temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, OneTimeCharge: {}",i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.dhw.pumps.circulation":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;temp = returnvalue.data[i].properties.status.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate('DhwPumpsCirculation', temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, DhwPumpsCirculation: {}",i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.burners.0.statistics":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;temp = returnvalue.data[i].properties.hours.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate("HeatingBurnerStatistics_Hours",temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex {}, Hours: {}", i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;temp = returnvalue.data[i].properties.starts.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate("HeatingBurnerStatistics_Starts",temp)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, Starts: {}", i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;case "heating.circuits.0.operating.modes.active":&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;temp= returnvalue.data[i].properties.value.value;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;events.postUpdate("ActiveMode", temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, ActiveMode: {}", i, temp);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;break;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;default:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;logger.info("DataIndex: {}, Data not used: {}",i, returnvalue.data[i].feature);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using those lines after the request posted above.&lt;/P&gt;&lt;P&gt;Sorry for no code tags, can't find them using my smartphone&lt;span class="lia-unicode-emoji" title=":lächelndes_Gesicht_mit_Sonnenbrille:"&gt;😎&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 08:05:56 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192291#M102</guid>
      <dc:creator>JueBag</dc:creator>
      <dc:date>2021-10-25T08:05:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192303#M103</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Thank you,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Solved. In PHP I have used ”usorit”.&amp;nbsp; Just 3 lines after&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;$jsonResponse = json_decode($apiResponse, true);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;include:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;usort($jsonResponse['data'], function($a,$b){
return $a["feature"]&amp;gt;$b["feature"];
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 10:34:51 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192303#M103</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-25T10:34:51Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192541#M106</link>
      <description>&lt;P&gt;Thank you for all questions and contributions. As a result I have updated the code and posted a new version here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.viessmann-community.com/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/td-p/192538" target="_blank"&gt;https://www.viessmann-community.com/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/td-p/192538&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 07:16:14 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/192541#M106</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-26T07:16:14Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203952#M141</link>
      <description>&lt;P&gt;The usort will help, but this is also not the best solution. Since 13.12.2021 i have new values in the $jsonResponse and so the indexes of the array are misleading. The Code should be corrected to extract the values by the name of the feature and not by a hardcoded index of an (sorted) array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 08:49:52 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203952#M141</guid>
      <dc:creator>BernhardW1</dc:creator>
      <dc:date>2021-12-14T08:49:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203959#M142</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Hi &lt;/FONT&gt;&lt;/FONT&gt;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40923"&gt;@BernhardW1&lt;/a&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Thank you for comments. Indeed I have faced this problems and as result on 26.10.2021 I have published an updated version of the code. Check this link:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.viessmann-community.com/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/td-p/192538" target="_blank" rel="noopener"&gt;https://www.viessmann-community.com/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/td-p/192538&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Regards,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;Sorin&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:02:56 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203959#M142</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-12-14T09:02:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203974#M144</link>
      <description>&lt;P&gt;I have adopted the example&amp;nbsp; to make it more robust if the number of items or the order of the items will change in the array:&lt;/P&gt;&lt;P&gt;$jsonResponse = json_decode($response, true);&lt;/P&gt;&lt;P&gt;function getEntryByFeatureName($resp, $feature)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for($i = 0; $i &amp;lt; sizeof($resp["data"]); $i++)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if ($resp["data"][$i]["feature"] == $feature)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return $resp["data"][$i];&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;echo getEntryByFeatureName($jsonResponse, "heating.sensors.temperature.outside")['properties']['value']['value'];&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 09:56:42 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/203974#M144</guid>
      <dc:creator>BernhardW1</dc:creator>
      <dc:date>2021-12-14T09:56:42Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/204098#M145</link>
      <description>&lt;P&gt;The reason for ( a lot of ) more datapoints being returned started on Dec 2nd for me. Actually the used Regex statement was not used and ALL datapoints were returned.&lt;/P&gt;&lt;P&gt;This misbehaviour was corrected today.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the order of the returned datapoints is NOT fixed, for that reason the USORT function will not help!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 18:35:46 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler/m-p/204098#M145</guid>
      <dc:creator>JueBag</dc:creator>
      <dc:date>2021-12-14T18:35:46Z</dc:date>
    </item>
  </channel>
</rss>

