<?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>How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124825/how-to-resetting-matter-totaloperationalhours-to-0-on-factory-reset</link><description>Dear Nordic Support Team, 
 Hope this email finds you well. I am currently developing a Matter-enabled device using the Nordic nRF Connect SDK, and I’ve encountered a question regarding the General Diagnostics Cluster (per Matter specification) that I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Oct 2025 12:15:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124825/how-to-resetting-matter-totaloperationalhours-to-0-on-factory-reset" /><item><title>RE: How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/thread/551423?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 12:15:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82c62415-f7d8-436c-be03-1dfda4b746fb</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I tested with both v3.0.1 and v3.1.0.&lt;/p&gt;
&lt;p&gt;I did some pretty simple tests where I added functionality that reads and increments the TotalOperationalHours when button 4 is pressed. I added it in&amp;nbsp;ButtonEventHandler() in the light switch sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t newTotalOperationalHours = 0;

void AppTask::ButtonEventHandler(Nrf::ButtonState state, Nrf::ButtonMask hasChanged)
{
	if ((APPLICATION_BUTTON_MASK &amp;amp; state &amp;amp; hasChanged)) {
		LOG_INF(&amp;quot;Button has been pressed, keep in this state for at least 500 ms to change light sensitivity of bound lighting devices.&amp;quot;);
		Instance().StartTimer(Timer::DimmerTrigger, kDimmerTriggeredTimeout);
	} else if ((APPLICATION_BUTTON_MASK &amp;amp; hasChanged)) {
		Nrf::PostTask([] { DimmerTriggerEventHandler(); });
#ifdef CONFIG_CHIP_ICD_UAT_SUPPORT
	} else if ((UAT_BUTTON_MASK &amp;amp; state &amp;amp; hasChanged)) {
		LOG_INF(&amp;quot;ICD UserActiveMode has been triggered.&amp;quot;);
		Server::GetInstance().GetICDManager().OnNetworkActivity();
#endif
	}
	if ((DK_BTN4_MSK &amp;amp; state &amp;amp; hasChanged)) {
		uint32_t totalOperationalHours;
		LOG_INF(&amp;quot;Button 4 pressed.&amp;quot;);
		ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours);
		LOG_INF(&amp;quot;TotalOperationalHours: %u&amp;quot;, totalOperationalHours);
		newTotalOperationalHours = totalOperationalHours + 1;
		LOG_INF(&amp;quot;TotalOperationalHours after increment: %u&amp;quot;, newTotalOperationalHours);
		ConfigurationMgr().StoreTotalOperationalHours(newTotalOperationalHours);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I tested by pressing button 4 to read and increment&amp;nbsp;TotalOperationalHours. I also verified the value with chip-tool. Then I performed a factory reset by holding button 1. After the device restarted, I checked&amp;nbsp;TotalOperationalHours again, and it was reset to 0.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/thread/551339?ContentTypeID=1</link><pubDate>Tue, 14 Oct 2025 03:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91711ccd-3cb8-4601-93b5-5b742709632c</guid><dc:creator>paper555</dc:creator><description>&lt;p&gt;&lt;span&gt;The SDK version I am using is ncs v3.0.1. Could you please let me know which version you are using?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/thread/550997?ContentTypeID=1</link><pubDate>Thu, 09 Oct 2025 11:13:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e005477-b281-4155-acf3-317705b3cdf1</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which version of the nRF Connect SDK are you using? Do you see this in an SDK sample or a custom application? Are you storing the TotalOperationalHours somewhere yourself?&lt;/p&gt;
&lt;p&gt;I cannot reproduce the issue on my side. In my tests, TotalOperationalHours is set to 0 after doing a factory reset, even without manually calling&amp;nbsp;StoreTotalOperationalHours().&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/thread/550958?ContentTypeID=1</link><pubDate>Thu, 09 Oct 2025 02:33:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77ad9edf-9102-4a5e-9c72-5e6363655ad2</guid><dc:creator>paper555</dc:creator><description>&lt;p&gt;&lt;span&gt;When the&amp;nbsp;&lt;/span&gt;&lt;code&gt;ScheduleFactoryReset()&lt;/code&gt;&lt;span&gt;&amp;nbsp;function is called by default during a factory reset, it should clear the NVM (Non-Volatile Memory) data. However, we are encountering an issue: even after invoking this function, the value of the&amp;nbsp;&lt;/span&gt;&lt;code&gt;TotalOperationalHours&lt;/code&gt;&lt;span&gt;&amp;nbsp;attribute fails to be cleared. Could you please help explain why this happens?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1759977043902v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1759977092793v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to resetting Matter TotalOperationalHours to 0 on Factory Reset</title><link>https://devzone.nordicsemi.com/thread/550909?ContentTypeID=1</link><pubDate>Wed, 08 Oct 2025 13:22:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03a3101b-1d81-4af1-ba5d-e1a8ff3b3b38</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can use the&amp;nbsp;&lt;code&gt;ConfigurationMgr().StoreTotalOperationalHours()&lt;/code&gt; function to set the TotalOperationalHours attribute, for example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ConfigurationMgr().StoreTotalOperationalHours(totalOperationalHours);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you want to verify the value, you can read it with&amp;nbsp;&lt;code&gt;ConfigurationMgr().GetTotalOperationalHours()&lt;/code&gt;, for example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ConfigurationMgr().GetTotalOperationalHours(totalOperationalHours);
LOG_INF(&amp;quot;TotalOperationalHours: %u&amp;quot;, totalOperationalHours);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>