<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111148/matter-setting-carbondioxideconcentrationmeasurement-value</link><description>Hello, 
 I am developing matter sensor and I would like to send data to `MeasuredValue` attribute of `CarbonDioxideConcentrationMeasurement` cluster. I followed this tutorial https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/matter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Apr 2025 12:01:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111148/matter-setting-carbondioxideconcentrationmeasurement-value" /><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/530445?ContentTypeID=1</link><pubDate>Thu, 03 Apr 2025 12:01:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ef30e3b-448d-4967-9ba1-eabd68c5a077</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/filipmrazek"&gt;filipmrazek&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Can you provide complete steps to resolve this issue ?&lt;br /&gt;We are also trying to add Carbon Dioxide cluster but failed to set or get measured value. we tried above steps but it seems we are missing something&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/487414?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2024 05:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9d1a297-f160-48f4-9e35-0022fd48bfde</guid><dc:creator>filipmrazek</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;Thank you for sour response. I looked at the section you found and I found the problem. I had to add `&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;emberAfEndpointConfigure()` before `&lt;/span&gt;&lt;/span&gt;&lt;span&gt;emberAfContainsServer&lt;/span&gt;&lt;span&gt;(mEndpointId, mClusterId)`.&lt;br /&gt;Now it works. Thanks for your help.&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/486948?ContentTypeID=1</link><pubDate>Fri, 31 May 2024 15:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:831803f7-6afd-4deb-aee6-d530d63b0869</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Filip,&lt;/p&gt;
&lt;p&gt;Yes, I see it now that you are using the constructor with four arguments. Apologies for the misunderstanding, you are correct and I was wrong in my previous reply.&lt;/p&gt;
[quote user="filipmrazek"]However, I figured out that the Init() function returns `CHIP_ERROR_INCORRECT_STATE`, but cannot find out why.[/quote]
&lt;p&gt;Alright, so the functions which can cause CHIP_ERROR_INCORRECT_STATE to be returned are IsValidAliasCluster(), emberAfContainsServer(), and registerAttributeAccessOverride() (&lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/v2.6.1/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h#L350-L356"&gt;https://github.com/nrfconnect/sdk-connectedhomeip/blob/v2.6.1/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h#L350-L356&lt;/a&gt;). So the next step would be to find our the source for the error amongst those three functions. &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/486641?ContentTypeID=1</link><pubDate>Thu, 30 May 2024 11:21:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca86d064-fa51-4433-a4cf-c267aeb842ee</guid><dc:creator>filipmrazek</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if I understand, but in the post I shared on May 15th I use the correct constructor with 4 arguments and the last one is measurement unit. In the post I used: `ConcentrationMeasurement::MeasurementUnitEnum::kPpm`.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However, I figured out that the Init() function returns `CHIP_ERROR_INCORRECT_STATE`, but cannot find out why.&lt;br /&gt;&lt;br /&gt;Ad MinMax constrain - I didn&amp;#39;t set any MinValue or MaxValue, so they are Null and the function you suggested returns always true if they are Null&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/486486?ContentTypeID=1</link><pubDate>Wed, 29 May 2024 13:55:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6af33105-ba7a-44d9-a08a-e207e6f509bc</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Filip,&lt;/p&gt;
&lt;p&gt;Regarding your implementation you shared on May 15th:&lt;/p&gt;
&lt;p&gt;The constructor you used is meant to be used when the kNumericMeasurement feature is &lt;strong&gt;not&lt;/strong&gt; used. If you are using kNumericMeasurement you need to use &lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/v2.6.1/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h#L322"&gt;the other Instance constructor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are &lt;strong&gt;not&lt;/strong&gt; using kNumericMeasurement, you can check if the Init() function returns an error code.&lt;/p&gt;
&lt;p&gt;If both steps above are ok, the cases where SetMeasuredValue will not update the MeasuredValue attribute is when the input is the same as the current value or if the input value exceeds the limits for MeasuredValue (&lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/v2.6.1/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h#L269"&gt;CheckConstraintMinMax&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/485925?ContentTypeID=1</link><pubDate>Sun, 26 May 2024 18:06:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33bacfad-13eb-4962-918c-0a9d469e8c07</guid><dc:creator>filipmrazek</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;Thank you for your update.&lt;br /&gt;I tried to impelemnt Set function for sending MeasuredValue for CarbonDioxide cluster the same way as for Temperature measurement. here is the&amp;nbsp;implemented function:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;EmberAfStatus Set(chip::EndpointId endpoint, float value)
{
    using Traits = NumericAttributeTraits&amp;lt;float&amp;gt;;
    if (!Traits::CanRepresentValue(true, value))
    {
        return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
    }
    Traits::StorageType storageValue;
    Traits::WorkingToStorage(value, storageValue);
    uint8_t* writable = Traits::ToAttributeStoreRepresentation(storageValue);
    return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;but the return value is&amp;nbsp;EMBER_ZCL_STATUS_FAILURE. I&amp;#39;m not sure, but it looks like its returning the value from this line&amp;nbsp;&lt;a href="https://github.com/project-chip/connectedhomeip/blob/3718e996b56f36a553c1b4571f77728396590776/src/app/util/attribute-storage.cpp#L656"&gt;https://github.com/project-chip/connectedhomeip/blob/3718e996b56f36a553c1b4571f77728396590776/src/app/util/attribute-storage.cpp#L656&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I noticed one interesting thing. In zap tool, The Storage option for MeasuredValue of CarbonDioxide measurement is grayed out and I cannot change that to RAM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_05_2D00_26-at-20.04.12.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_05_2D00_26-at-20.05.04.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/485875?ContentTypeID=1</link><pubDate>Fri, 24 May 2024 15:13:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9215e1dd-8cee-4021-b2cf-63f0751f1b63</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Filip,&lt;/p&gt;
&lt;p&gt;Thank you for your patience.&lt;/p&gt;
&lt;p&gt;When I returned to this case today, I made sure to read the Matter specification along with it, and I found that the CarbonDioxideConcentrationMeasurement cluster should be more similar to the RelativeHumidityMeasurement you shared as an example. Neither cluster has write access for their MeasuredValue attribute, yet you are able to use Set on the Relative Humidity.&lt;/p&gt;
&lt;p&gt;I will contact the developers about this so we can find out what the proper functionality is.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/485277?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 06:08:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccd396c1-1d44-4cbb-8ad2-e05d93910772</guid><dc:creator>filipmrazek</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;did anybody have a time to take a look at my problem with settng measured data? I investigate it a little bit and I&amp;nbsp;find out that it logs the following to the console at startup:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;err&amp;gt; chip: [DMG]Endpoint 1, Cluster 0x0000_040D not found in IncreaseClusterDataVersion!&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/483384?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 06:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:546d7b93-20b4-44ff-b024-4bff884501d4</guid><dc:creator>filipmrazek</dc:creator><description>&lt;p&gt;Hello Maria,&lt;/p&gt;
&lt;p&gt;First of all, thank you for your answer. I tried to change my code according to the example you sent. My code looks something like that:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;in header file:
ConcentrationMeasurement::Instance&amp;lt;true, true, true, true, true, true&amp;gt; co2_cluster;

in source file constructor:
Constructor::Constructor()
    : co2_cluster(1, 
        CarbonDioxideConcentrationMeasurement::Id, 
        ConcentrationMeasurement::MeasurementMediumEnum::kAir,
        ConcentrationMeasurement::MeasurementUnitEnum::kPpm)
{
    co2_cluster.Init();
}

void send_data(float value)
{
    co2_cluster.SetMeasuredValue(DataModel::Nullable&amp;lt;float&amp;gt;(value));
    LOG_INF(&amp;quot;data sent&amp;quot;);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The code compiles, but if I try it, the CO2 value is missing. (I&amp;#39;m trying it with python matter server). On the other hand, I can see all other values (like temperature, humidity) which were send with the following code.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Set(1, value);&lt;/pre&gt;&lt;br /&gt;Am I missing something in the example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter setting CarbonDioxideConcentrationMeasurement value.</title><link>https://devzone.nordicsemi.com/thread/483321?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 14:07:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f57ab9d7-0080-4076-95ac-44c35875ed3e</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Filip,&lt;/p&gt;
&lt;p&gt;To change the value for the MeasuredValue attribute for the CarbonDioxideConcentrationMeasurement cluster (and similar), you need to use &lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/ca3672fbb939180da8e43e6994e01c89fa9dcd02/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h#L364"&gt;SetMeasuredValue&lt;/a&gt;. You can see a usage example in &lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/ca3672fbb939180da8e43e6994e01c89fa9dcd02/examples/air-quality-sensor-app/air-quality-sensor-common/src/air-quality-sensor-manager.cpp#L20"&gt;air-quality-sensor-manager.cpp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>