<?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 "Some code to receive info from the Viessmann boiler v0.2" 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-v0-2/m-p/192538#M105</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Here is some code I have put together in order to receive basic info from an Viessmann boiler. The code represents an improvement from a former post here on the forum and thus it has been highlighted&amp;nbsp;as version 0.2. Only HTML and PHP. it is used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In order to work you will have first to receive the following variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;$autorizationTOKEN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$installationId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$gatewaySerial&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$deviceId&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;For this preliminary steps, documentation is available here:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/getting-started" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/getting-started&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;and with more details, after you login, here:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/authentication" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/authentication&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Also you can take a lock at this post:&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;https://www.viessmann-community.com/t5/Getting-started-programming-with/To-help-get-started/td-p/181...&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As soon as the above requirements are fulfilled here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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&amp;lt;/title&amp;gt;
 &amp;lt;body&amp;gt;

 
&amp;lt;?php

//Get all boiler features
//$getURL='https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features';

//Get all boiler features required by the present project
$getURL='https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features?regex='
		.'heating.burners.0'.'%7C'
		.'heating.burners.0.statistics'.'%7C'
		.'heating.boiler.sensors.temperature.commonSupply'.'%7C'
		.'heating.dhw.temperature.main'.'%7C'
		.'heating.dhw.sensors.temperature.hotWaterStorage'.'%7C'
		.'heating.circuits.0.operating.programs.normal'.'%7C'
		.'heating.circuits.0.sensors.temperature.room';

$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);

 
usort($jsonResponse['data'], function($a,$b){
	return $a["feature"]&amp;gt;$b["feature"];
});

//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;";

$BurnerStatus = $jsonResponse['data']['1']['properties']['active']['value']; // heating.burners.0
echo "BurnerStatus: ".$BurnerStatus."&amp;lt;br&amp;gt;"; 
if ($BurnerStatus == "1") {
		$BurnerStatus = "&amp;lt;span style='vertical-align:middle; '&amp;gt;On&amp;lt;/span&amp;gt;&amp;lt;img src='viessmann_burner_on.png' alt='burner_on' width='20%' style='vertical-align:middle; '&amp;gt;";
	} else {
		$BurnerStatus = "&amp;lt;span style='vertical-align:middle; '&amp;gt;Off&amp;lt;/span&amp;gt;&amp;lt;img src='viessmann_burner_off.png' alt='burner_off' width='20%' style='vertical-align:middle; '&amp;gt;";
	}

$BurnerHours = $jsonResponse['data']['2']['properties']['hours']['value']; //heating.burners.0.statistics
echo "BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;";
$MaxEnergyConsumption = $BurnerHours*160/1000;
echo "MaxEnergyConsumption (160W/h): ".$EnergyConsumption." kWh&amp;lt;br&amp;gt;";


$BurnerStarts = $jsonResponse['data']['2']['properties']['starts']['value']; //heating.burners.0.statistics
echo "BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;";


$MeasureUnit = $jsonResponse['data']['0']['properties']['value']['unit']; //heating.boiler.sensors.temperature.commonSupply
if ($MeasureUnit == "celsius") {
		$MU = " &amp;amp;deg;C ";
	} else {
		$MU = " &amp;amp;deg;F ";
	}


$TemperatureCommon = $jsonResponse['data']['0']['properties']['value']['value']; //heating.boiler.sensors.temperature.commonSupply
echo "TemperatureCommon: ".$TemperatureCommon." ".$MU."&amp;lt;br&amp;gt;";

$HotWaterSet = $jsonResponse['data']['6']['properties']['value']['value']; //heating.dhw.temperature.main
$HotWater = $jsonResponse['data']['5']['properties']['value']['value']; //heating.dhw.sensors.temperature.hotWaterStorage
echo "HotWater: ".$HotWaterSet." / ".$HotWater." ".$MU."&amp;lt;br&amp;gt;";

$RadiatorsSet = $jsonResponse['data']['3']['properties']['temperature']['value']; //heating.circuits.0.operating.programs.normal
$TemperatureRoom = $jsonResponse['data']['4']['properties']['value']['value']; //heating.circuits.0.sensors.temperature.room
echo "Radiators: ".$RadiatorsSet ." / ".$TemperatureRoom." ".$MU."&amp;lt;br&amp;gt;";


?&amp;gt;

&amp;lt;div style="position:relative; "&amp;gt;
			&amp;lt;img src="viessmann_map.png" alt="map" 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($TemperatureCommon,0).$MU."&amp;lt;br&amp;gt;".
			"BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;".
			"BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;".
			"MaxEnergyConsumption (160W/h): ".$MaxEnergyConsumption." kWh";?&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;".
			"TemperatureRoom: ".number_format($TemperatureRoom,0).$MU."&amp;lt;br&amp;gt;";?&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;div style="position:absolute; top: 37%; left:41%; font-size:120%; "&amp;gt;
		&amp;lt;?php echo $BurnerStatus; ?&amp;gt;
	&amp;lt;/div&amp;gt;	
&amp;lt;/div&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the boiler I have used does not provide any consumption statistics I have worked something around:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;$MaxEnergyConsumption = $BurnerHours*160/1000;&lt;/LI-CODE&gt;&lt;P&gt;where 160 is the maximum boiler energy consumption as provided by Viessmann in the product manual. If you are not sure you can uncomment the appropriate $getURL to see all the features and data points reported by your boiler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is available in the attached screenshot.&lt;/P&gt;&lt;P&gt;Also the used PNGs have been attached.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 07:11:56 GMT</pubDate>
    <dc:creator>SorinB</dc:creator>
    <dc:date>2021-10-26T07:11:56Z</dc:date>
    <item>
      <title>Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/192538#M105</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Here is some code I have put together in order to receive basic info from an Viessmann boiler. The code represents an improvement from a former post here on the forum and thus it has been highlighted&amp;nbsp;as version 0.2. Only HTML and PHP. it is used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In order to work you will have first to receive the following variables:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;$autorizationTOKEN&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$installationId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$gatewaySerial&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT&gt;$deviceId&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;For this preliminary steps, documentation is available here:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/getting-started" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/getting-started&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;and with more details, after you login, here:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/authentication" target="_blank" rel="noopener nofollow noreferrer"&gt;&lt;FONT&gt;https://developer.viessmann.com/en/doc/authentication&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Also you can take a lock at this post:&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;https://www.viessmann-community.com/t5/Getting-started-programming-with/To-help-get-started/td-p/181...&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As soon as the above requirements are fulfilled here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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&amp;lt;/title&amp;gt;
 &amp;lt;body&amp;gt;

 
&amp;lt;?php

//Get all boiler features
//$getURL='https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features';

//Get all boiler features required by the present project
$getURL='https://api.viessmann.com/iot/v1/equipment/installations/'.$installationId.'/gateways/'.$gatewaySerial.'/devices/'.$deviceId.'/features?regex='
		.'heating.burners.0'.'%7C'
		.'heating.burners.0.statistics'.'%7C'
		.'heating.boiler.sensors.temperature.commonSupply'.'%7C'
		.'heating.dhw.temperature.main'.'%7C'
		.'heating.dhw.sensors.temperature.hotWaterStorage'.'%7C'
		.'heating.circuits.0.operating.programs.normal'.'%7C'
		.'heating.circuits.0.sensors.temperature.room';

$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);

 
usort($jsonResponse['data'], function($a,$b){
	return $a["feature"]&amp;gt;$b["feature"];
});

//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;";

$BurnerStatus = $jsonResponse['data']['1']['properties']['active']['value']; // heating.burners.0
echo "BurnerStatus: ".$BurnerStatus."&amp;lt;br&amp;gt;"; 
if ($BurnerStatus == "1") {
		$BurnerStatus = "&amp;lt;span style='vertical-align:middle; '&amp;gt;On&amp;lt;/span&amp;gt;&amp;lt;img src='viessmann_burner_on.png' alt='burner_on' width='20%' style='vertical-align:middle; '&amp;gt;";
	} else {
		$BurnerStatus = "&amp;lt;span style='vertical-align:middle; '&amp;gt;Off&amp;lt;/span&amp;gt;&amp;lt;img src='viessmann_burner_off.png' alt='burner_off' width='20%' style='vertical-align:middle; '&amp;gt;";
	}

$BurnerHours = $jsonResponse['data']['2']['properties']['hours']['value']; //heating.burners.0.statistics
echo "BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;";
$MaxEnergyConsumption = $BurnerHours*160/1000;
echo "MaxEnergyConsumption (160W/h): ".$EnergyConsumption." kWh&amp;lt;br&amp;gt;";


$BurnerStarts = $jsonResponse['data']['2']['properties']['starts']['value']; //heating.burners.0.statistics
echo "BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;";


$MeasureUnit = $jsonResponse['data']['0']['properties']['value']['unit']; //heating.boiler.sensors.temperature.commonSupply
if ($MeasureUnit == "celsius") {
		$MU = " &amp;amp;deg;C ";
	} else {
		$MU = " &amp;amp;deg;F ";
	}


$TemperatureCommon = $jsonResponse['data']['0']['properties']['value']['value']; //heating.boiler.sensors.temperature.commonSupply
echo "TemperatureCommon: ".$TemperatureCommon." ".$MU."&amp;lt;br&amp;gt;";

$HotWaterSet = $jsonResponse['data']['6']['properties']['value']['value']; //heating.dhw.temperature.main
$HotWater = $jsonResponse['data']['5']['properties']['value']['value']; //heating.dhw.sensors.temperature.hotWaterStorage
echo "HotWater: ".$HotWaterSet." / ".$HotWater." ".$MU."&amp;lt;br&amp;gt;";

$RadiatorsSet = $jsonResponse['data']['3']['properties']['temperature']['value']; //heating.circuits.0.operating.programs.normal
$TemperatureRoom = $jsonResponse['data']['4']['properties']['value']['value']; //heating.circuits.0.sensors.temperature.room
echo "Radiators: ".$RadiatorsSet ." / ".$TemperatureRoom." ".$MU."&amp;lt;br&amp;gt;";


?&amp;gt;

&amp;lt;div style="position:relative; "&amp;gt;
			&amp;lt;img src="viessmann_map.png" alt="map" 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($TemperatureCommon,0).$MU."&amp;lt;br&amp;gt;".
			"BurnerHours: ".$BurnerHours."&amp;lt;br&amp;gt;".
			"BurnerStarts: ".$BurnerStarts."&amp;lt;br&amp;gt;".
			"MaxEnergyConsumption (160W/h): ".$MaxEnergyConsumption." kWh";?&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;".
			"TemperatureRoom: ".number_format($TemperatureRoom,0).$MU."&amp;lt;br&amp;gt;";?&amp;gt;
	&amp;lt;/div&amp;gt;
	&amp;lt;div style="position:absolute; top: 37%; left:41%; font-size:120%; "&amp;gt;
		&amp;lt;?php echo $BurnerStatus; ?&amp;gt;
	&amp;lt;/div&amp;gt;	
&amp;lt;/div&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the boiler I have used does not provide any consumption statistics I have worked something around:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;$MaxEnergyConsumption = $BurnerHours*160/1000;&lt;/LI-CODE&gt;&lt;P&gt;where 160 is the maximum boiler energy consumption as provided by Viessmann in the product manual. If you are not sure you can uncomment the appropriate $getURL to see all the features and data points reported by your boiler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is available in the attached screenshot.&lt;/P&gt;&lt;P&gt;Also the used PNGs have been attached.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 07:11:56 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/192538#M105</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-10-26T07:11:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195353#M110</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it would be nice if you can provide some code to get the installationId, gatewaySerial and deviceId as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I'm stuck at that to get these 3 magic numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 06:55:06 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195353#M110</guid>
      <dc:creator>MrAnderson</dc:creator>
      <dc:date>2021-11-08T06:55:06Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195367#M111</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/30364"&gt;@MrAnderson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should be quite straight forward:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 1: Authorization request (that is for login)&lt;/P&gt;&lt;P&gt;Step 2: get access token and insert the required code to refresh the token so you will not have to authorize&amp;nbsp; each time you send a command to the server&lt;/P&gt;&lt;P&gt;Step 3: get installationId&lt;/P&gt;&lt;P&gt;Step 4: get gatewaySerial&lt;/P&gt;&lt;P&gt;Step 5: get&amp;nbsp;deviceId&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 1 and 2 are covered here&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/authentication" target="_blank"&gt;https://developer.viessmann.com/en/doc/authentication&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Step 3 to 4 are covered here&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/iot/overview" target="_blank"&gt;https://developer.viessmann.com/en/doc/iot/overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where did you get stack?&lt;/P&gt;&lt;P&gt;Share some code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 07:20:33 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195367#M111</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-11-08T07:20:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195406#M112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read the documentation but may be I have to get some new glasses because I don't see mistake or the documentation is a bit incomplete at that point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The authorization is working fine and I can request my user profile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created another thread&amp;nbsp;&lt;A href="https://www.viessmann-community.com/t5/The-Viessmann-API/Cannot-get-installationId-gatewaySerial-and-deviceId/m-p/194464" target="_self"&gt;https://www.viessmann-community.com/t5/The-Viessmann-API/Cannot-get-installationId-gatewaySerial-and-deviceId/m-p/194464&lt;/A&gt;&amp;nbsp;where you can see my code a bit nicer than in this answer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;?php&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Initialization &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$authorizeURL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://iam.viessmann.com/idp/v2/authorize" target="_blank"&gt;https://iam.viessmann.com/idp/v2/authorize&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$tokenURL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://iam.viessmann.com/idp/v2/token" target="_blank"&gt;https://iam.viessmann.com/idp/v2/token&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$client_id&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"client_id"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// API Key&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$code_challenge&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"code_challenge"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$callback_uri&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="http://localhost:4200/oauth-callback" target="_blank"&gt;http://localhost:4200/oauth-callback&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$user&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"username"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// The same as used for Vicare &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$pwd&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"password"&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// The same as used for Vicare &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$token&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"access_token"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$refresh_token&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"refresh_token"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;/* */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Code parameters &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;$authorizeURL&lt;/SPAN&gt;&lt;SPAN&gt;?client_id=&lt;/SPAN&gt;&lt;SPAN&gt;$client_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;code_challenge=&lt;/SPAN&gt;&lt;SPAN&gt;$code_challenge&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;scope=IoT%20User%20offline_access&amp;amp;redirect_uri=&lt;/SPAN&gt;&lt;SPAN&gt;$callback_uri&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;response_type=code"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Content-Type: application/x-www-form-urlencoded"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;$curloptions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_URL =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_HTTPHEADER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_RETURNTRANSFER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_USERPWD =&amp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;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;][&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;exit&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Erreur"&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Token Settings &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;$tokenURL&lt;/SPAN&gt;&lt;SPAN&gt;?grant_type=authorization_code&amp;amp;code_verifier=&lt;/SPAN&gt;&lt;SPAN&gt;$code_challenge&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;client_id=&lt;/SPAN&gt;&lt;SPAN&gt;$client_id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;redirect_uri=&lt;/SPAN&gt;&lt;SPAN&gt;$callback_uri&lt;/SPAN&gt;&lt;SPAN&gt;&amp;amp;code=&lt;/SPAN&gt;&lt;SPAN&gt;$code&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Content-Type: application/x-www-form-urlencoded"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;$curloptions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_URL =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_HTTPHEADER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_RETURNTRANSFER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_POST =&amp;gt; &lt;/SPAN&gt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&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;json_decode&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$response&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;echo&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$response&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;echo&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$token&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;$json&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;'access_token'&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/**/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Read user data &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://api.viessmann.com/users/v1/users/me?sections=identity" target="_blank"&gt;https://api.viessmann.com/users/v1/users/me?sections=identity&lt;/A&gt;"&lt;/SPAN&g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gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// get Installations-Id &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&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;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;$curloptions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_URL =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_HTTPHEADER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// Data Curl Call &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt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// get Gateway-Id &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://api.viessmann.com/iot/v1/equipment/gateways/" target="_blank"&gt;https://api.viessmann.com/iot/v1/equipment/gateways/&lt;/A&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;$curloptions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;array&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_URL =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$url&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_HTTPHEADER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;$header&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CURLOPT_SSL_VERIFYPEER =&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;false&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//CURLOPT_RETURNTRANSFER =&amp;gt; true,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&l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&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers and thanks&lt;/DIV&gt;&lt;DIV&gt;Andreas&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Nov 2021 08:31:13 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195406#M112</guid>
      <dc:creator>MrAnderson</dc:creator>
      <dc:date>2021-11-08T08:31:13Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195493#M113</link>
      <description>&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Looks confusing at the first view &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":leicht_lächelndes_Gesicht:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Take it step by step.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Step 1: Authorization request (that is for login)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Have you been successful&amp;nbsp;to pass trough authentication?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT&gt;&lt;FONT&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;&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;/FONT&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;If the answer is YES and the problem remains only to receive&amp;nbsp;installationId, gatewaySerial and deviceId, then from your posted code you are missing the authorizationTOKEN. Something like this:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&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;Your code:&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;$url = "https://api.viessmann.com/iot/v1/equipment/installations/";

$curloptions = array(
    CURLOPT_URL =&amp;gt; $url,
    CURLOPT_HTTPHEADER =&amp;gt; $header,
    CURLOPT_SSL_VERIFYPEER =&amp;gt; false,
    CURLOPT_RETURNTRANSFER =&amp;gt; true,
    //CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,
);

// Data Curl Call 
//
$curl = curl_init();
curl_setopt_array($curl, $curloptions);
$response = curl_exec($curl);
curl_close($curl);

echo($response);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;should be:&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;$getURL='https://api.viessmann.com/iot/v1/equipment/installations';

$headerRequest = array(
		"Content-Type: application/x-www-form-urlencoded",
		"Authorization: Bearer $autorizationTOKEN" //put here the name you have used for the AuthorizationTOKEN variable
);

  
$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);

print_r($jsonResponse);
print_r($apiErr);


$installationId = $jsonResponse['data']['0']['id'];
echo "installationId: ".$installationId."&amp;lt;br&amp;gt;";	&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 12:23:51 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195493#M113</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-11-08T12:23:51Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195546#M114</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/40821"&gt;@SorinB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;may be you can try my code below.&lt;/P&gt;&lt;P&gt;As I said&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;authorization is working fine&lt;/LI&gt;&lt;LI&gt;getting the access token is working fine&lt;/LI&gt;&lt;LI&gt;showing my profile is working fine&lt;/LI&gt;&lt;LI&gt;everything else is not working&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;&amp;lt;?php

// Initialization 
//
$authorizeURL = "https://iam.viessmann.com/idp/v2/authorize";
$tokenURL = "https://iam.viessmann.com/idp/v2/token";
$client_id = "my_client_id"; // Change to your API Key
$code_challenge = "code_challenge"; // Change to your challende ig
$callback_uri = "http://localhost:4200/oauth-callback";
$user = "username"; // Change to your username
$pwd = "password"; // change to your password
$token = "not_used";
$refresh_token = "not_used";

/* */
// Code parameters 
//
$url = "$authorizeURL?client_id=$client_id&amp;amp;code_challenge=$code_challenge&amp;amp;scope=IoT%20User%20offline_access&amp;amp;redirect_uri=$callback_uri&amp;amp;response_type=code";
$header = array("Content-Type: application/x-www-form-urlencoded");

$curloptions = array(
    CURLOPT_URL =&amp;gt; $url,
    CURLOPT_HTTPHEADER =&amp;gt; $header,
    CURLOPT_SSL_VERIFYPEER =&amp;gt; false,
    CURLOPT_RETURNTRANSFER =&amp;gt; true,
    CURLOPT_USERPWD =&amp;gt; "$user:$pwd",
    CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,
    CURLOPT_POST =&amp;gt; true,
);

// Call Curl Code 
//
$curl = curl_init();
curl_setopt_array($curl, $curloptions);
$response = curl_exec($curl);
curl_close($curl);

// Code Extraction 
//
$matches = array();
$pattern = '/code=(.*)"/';
if (preg_match_all($pattern, $response, $matches)) {
    $code = $matches[1][0];
} else {
    exit("Erreur"."\n");
}

// Token Settings 
//
$url = "$tokenURL?grant_type=authorization_code&amp;amp;code_verifier=$code_challenge&amp;amp;client_id=$client_id&amp;amp;redirect_uri=$callback_uri&amp;amp;code=$code";
$header = array("Content-Type: application/x-www-form-urlencoded");

$curloptions = array(
    CURLOPT_URL =&amp;gt; $url,
    CURLOPT_HTTPHEADER =&amp;gt; $header,
    CURLOPT_SSL_VERIFYPEER =&amp;gt; false,
    CURLOPT_RETURNTRANSFER =&amp;gt; true,
    CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,
    CURLOPT_POST =&amp;gt; true,
);

// Call Curl Token 
//
$curl = curl_init();
curl_setopt_array($curl, $curloptions);
$response = curl_exec($curl);
curl_close($curl);

// Token extraction 
//
$json = json_decode($response, true);
echo($response);
echo("\n");
$token = $json['access_token'];
/**/

// Read user data 
//
$url = "https://api.viessmann.com/users/v1/users/me?sections=identity";
$header = array("Content-Type: application/x-www-form-urlencoded","Authorization: Bearer $token");

$curloptions = array(
    CURLOPT_URL =&amp;gt; $url,
    CURLOPT_HTTPHEADER =&amp;gt; $header,
    CURLOPT_SSL_VERIFYPEER =&amp;gt; false,
    CURLOPT_RETURNTRANSFER =&amp;gt; true,
    CURLOPT_HTTPAUTH =&amp;gt; CURLAUTH_BASIC,
);

// Data Curl Call 
//
$curl = curl_init();
curl_setopt_array($curl, $curloptions);
$response = curl_exec($curl);
curl_close($curl);

print_r(json_decode($response));


// get Installations-Id 
//

$getURL='https://api.viessmann.com/iot/v1/equipment/installations/';
$headerRequest = array(
    "Content-Type: application/x-www-form-urlencoded",
    "Authorization: Bearer $token" //put here the name you have used for the AuthorizationTOKEN variable
);

$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);
print_r($jsonResponse);
print_r($apiErr);

?&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;THanks and regards&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 14:06:22 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195546#M114</guid>
      <dc:creator>MrAnderson</dc:creator>
      <dc:date>2021-11-08T14:06:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195563#M115</link>
      <description>&lt;P&gt;Your code looks and works fine &lt;span class="lia-unicode-emoji" title=":leicht_lächelndes_Gesicht:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;print_r($jsonResponse);&lt;/PRE&gt;&lt;P&gt;The above line will return an array.&lt;/P&gt;&lt;P&gt;Accordingly with the documentation available here&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.viessmann.com/en/doc/iot/overview" target="_blank" rel="noopener"&gt;https://developer.viessmann.com/en/doc/iot/overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you will find the&amp;nbsp;InstallationID under&amp;nbsp;the parameter "id".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To extract the parameter&amp;nbsp;from the array you can ad to your code the following two lines:&lt;/P&gt;&lt;PRE&gt;$installationId = $jsonResponse['data']['0']['id'];
echo "installationId: ".$installationId."&amp;lt;br&amp;gt;";&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 14:40:50 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195563#M115</guid>
      <dc:creator>SorinB</dc:creator>
      <dc:date>2021-11-08T14:40:50Z</dc:date>
    </item>
    <item>
      <title>Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195572#M116</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Well, that's interesting... It is not working on my server..... &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;I'm quite familiar with PHP or shell scripting so it must be something wrong with my user profile or my installation that I don't have access to the installationId and so on...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How&lt;/STRONG&gt; can I check that? Or may be &lt;STRONG&gt;who&lt;/STRONG&gt; can check that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My response looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Array&lt;BR /&gt;(&lt;BR /&gt;    [data] =&amp;gt; Array&lt;BR /&gt;        (&lt;BR /&gt;        )&lt;BR /&gt;&lt;BR /&gt;    [cursor] =&amp;gt; Array&lt;BR /&gt;        (&lt;BR /&gt;            [next] =&amp;gt;&lt;BR /&gt;        )&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 14:52:59 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195572#M116</guid>
      <dc:creator>MrAnderson</dc:creator>
      <dc:date>2021-11-08T14:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195577#M117</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/30364"&gt;@MrAnderson&lt;/a&gt; ,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;it appears to me that for the account that you are using for requesting the API, there is no installation registered. This should explain why you are getting an OK response, but without information.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Please make sure that you use the account that registered the installation (and is able to see it within ViCare) to request the data via API.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 14:59:18 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195577#M117</guid>
      <dc:creator>MichaelHanna</dc:creator>
      <dc:date>2021-11-08T14:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Betreff: Some code to receive info from the Viessmann boiler v0.2</title>
      <link>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195599#M118</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.viessmann.de/t5/user/viewprofilepage/user-id/29136"&gt;@MichaelHanna&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you made my day........&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shame on me that I didn't get it. For my ViCare I'm using a different user as for the community...&lt;BR /&gt;After one and a half year I simply forgot it &lt;span class="lia-unicode-emoji" title=":leicht_lächelndes_Gesicht:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 15:46:19 GMT</pubDate>
      <guid>https://community.viessmann.de/t5/Getting-started-programming-with/Some-code-to-receive-info-from-the-Viessmann-boiler-v0-2/m-p/195599#M118</guid>
      <dc:creator>MrAnderson</dc:creator>
      <dc:date>2021-11-08T15:46:19Z</dc:date>
    </item>
  </channel>
</rss>

