<?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>topic Re: regrading the device custom attributes reading sample app is crashing in Smart Home Developer Forum</title>
    <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/631035#M7382</link>
    <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;1234567890qwr&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jul 2024 02:14:48 GMT</pubDate>
    <dc:creator>Hfdfbjkplk</dc:creator>
    <dc:date>2024-07-13T02:14:48Z</dc:date>
    <item>
      <title>regrading the device custom attributes reading sample app is crashing</title>
      <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/628104#M7343</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I added the one smart Wi-Fi light device through matter while using the your sample app. While controlling and reading the on off its working fine. But while reading the attributes the below errors are observed also app getting crashed.&lt;/P&gt;&lt;P&gt;FATAL EXCEPTION: main&lt;BR /&gt;Process: package PID: 30323&lt;BR /&gt;chip.devicecontroller.ChipClusterException: CHIP cluster error: 195&lt;BR /&gt;Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@9b56298, Dispatchers.Main.immediate]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We tried different methods, but the same issues occurs every time. Please look into it and provide the solution for this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;suspend fun &lt;/SPAN&gt;&lt;SPAN&gt;readBasicClusters&lt;/SPAN&gt;(&lt;SPAN&gt;nodeId&lt;/SPAN&gt;: &lt;SPAN&gt;Long&lt;/SPAN&gt;) {&lt;BR /&gt;   &lt;SPAN&gt;/* val endpointId = 1&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    val clusterId = 0x00000090&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    val attributeName = "power"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    val attributeId = 0x00000008*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;   /* val chipAttribute =&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        ChipAttributePath.newInstance(1, 0x00000090, 0x00000008)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    val chipAttribute1 =&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        ChipAttributePath.newInstance(1, 0x00000090, 0x0000000C)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    val chipAttribute2 =&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        ChipAttributePath.newInstance(1, 0x00000090, 0x0000000B)*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;val &lt;/SPAN&gt;&lt;SPAN&gt;chipAttribute &lt;/SPAN&gt;=&lt;BR /&gt;        &lt;SPAN&gt;ChipAttributePath&lt;/SPAN&gt;.newInstance(&lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;SPAN&gt;144&lt;/SPAN&gt;, &lt;SPAN&gt;8&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;val &lt;/SPAN&gt;&lt;SPAN&gt;chipAttribute1 &lt;/SPAN&gt;=&lt;BR /&gt;        &lt;SPAN&gt;ChipAttributePath&lt;/SPAN&gt;.newInstance(&lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;SPAN&gt;144&lt;/SPAN&gt;, &lt;SPAN&gt;12&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;val &lt;/SPAN&gt;&lt;SPAN&gt;chipAttribute2 &lt;/SPAN&gt;=&lt;BR /&gt;        &lt;SPAN&gt;ChipAttributePath&lt;/SPAN&gt;.newInstance(&lt;SPAN&gt;1&lt;/SPAN&gt;, &lt;SPAN&gt;144&lt;/SPAN&gt;, &lt;SPAN&gt;11&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;val &lt;/SPAN&gt;&lt;SPAN&gt;attributePaths &lt;/SPAN&gt;= &lt;SPAN&gt;listOf&lt;/SPAN&gt;(&lt;SPAN&gt;chipAttribute&lt;/SPAN&gt;, &lt;SPAN&gt;chipAttribute1&lt;/SPAN&gt;, &lt;SPAN&gt;chipAttribute2&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;val &lt;/SPAN&gt;&lt;SPAN&gt;devicePtr &lt;/SPAN&gt;=&lt;BR /&gt;        &lt;SPAN&gt;try &lt;/SPAN&gt;{&lt;BR /&gt;            &lt;SPAN&gt;chipClient&lt;/SPAN&gt;.getConnectedDevicePointer(&lt;SPAN&gt;nodeId&lt;/SPAN&gt;)&lt;BR /&gt;        } &lt;SPAN&gt;catch &lt;/SPAN&gt;(&lt;SPAN&gt;e&lt;/SPAN&gt;: &lt;SPAN&gt;IllegalStateException&lt;/SPAN&gt;) {&lt;BR /&gt;            &lt;SPAN&gt;Timber&lt;/SPAN&gt;.d(&lt;SPAN&gt;"getConnectedDevicePointer--&amp;gt; exception &lt;/SPAN&gt;&lt;SPAN&gt;$&lt;/SPAN&gt;&lt;SPAN&gt;e&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;)&lt;BR /&gt;            &lt;SPAN&gt;return&lt;BR /&gt;&lt;/SPAN&gt;        }&lt;BR /&gt;    &lt;SPAN&gt;/*chipClient.readAttributes(nodeId, attributePaths)*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    /*chipClient.chipDeviceController.readAttributePath(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        object : ReportCallback {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            override fun onError(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                attributePath: ChipAttributePath?,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                eventPath: ChipEventPath?,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                e: Exception?&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            ) {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.d("readAttributes onError--&amp;gt; $e")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            override fun onReport(nodeState: NodeState?) {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.d("readAttributes onReport--&amp;gt; $nodeState")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                val states: HashMap&amp;lt;ChipAttributePath, AttributeState&amp;gt; = HashMap()&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                for (path in attributePaths) {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    var endpoint: Int = path.endpointId.id.toInt()&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    states[path] =&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                        nodeState!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                            .getEndpointState(endpoint)!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                            .getClusterState(path.clusterId.id)!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                            .getAttributeState(path.attributeId.id)!!&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.d("readAttributes states--&amp;gt; $states")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            override fun onDone() {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                super.onDone()&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        },&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        nodeId,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        attributePaths&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    )*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    /*chipClient.chipDeviceController.readPath(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        object : ReportCallback {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            override fun onError(&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                attributePath: ChipAttributePath?,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                eventPath: ChipEventPath?,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                ex: java.lang.Exception&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            ) {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.e("TAG-&amp;gt;Read $attributeName failure $ex")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            override fun onReport(nodeState: NodeState?) {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.d("TAG-&amp;gt;onReport $nodeState")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                val tlv = nodeState?.getEndpointState(endpointId)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    ?.getClusterState(clusterId.toLong())&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    ?.getAttributeState(attributeId.toLong())&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                    ?.tlv&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                *//*val value = tlv?.let { TlvReader(it) }*//*&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;                Timber.d("TAG-&amp;gt;[Read Success] $attributeName: $tlv")&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        },&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        devicePtr,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        listOf(chipAttribute, chipAttribute1, chipAttribute2),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        null,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        false&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    )*/&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    /*clustersHelper.readApplicationBasicClusterAttributeList(nodeId, 1)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    clustersHelper.readBasicClusterAttributeList(nodeId, 1)*/&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 04:09:45 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/628104#M7343</guid>
      <dc:creator>nagendra</dc:creator>
      <dc:date>2024-06-26T04:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: regrading the device custom attributes reading sample app is crashing</title>
      <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/630741#M7377</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.googlenestcommunity.com/t5/user/viewprofilepage/user-id/562843"&gt;@nagendra&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="3"&gt;&lt;SPAN&gt;The reason for you encountering the error could be because of one of the following reasons :&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;UL&gt;
&lt;LI style="font-weight: 400;" aria-level="4"&gt;&lt;SPAN&gt;You might be trying to read values before communication is fully established with the device. You should ensure before reading the device attribute cluster you are able to read the device descriptor cluster.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="4"&gt;&lt;SPAN&gt;Also, you need to make sure that the values are right and the clusters are available on the device.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI style="font-weight: 400;" aria-level="4"&gt;&lt;SPAN&gt;You can refer to the &lt;/SPAN&gt;&lt;A href="https://github.com/project-chip/connectedhomeip" target="_blank"&gt;&lt;SPAN&gt;connectedhomeip&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt; repository on Github to learn how to read custom clusters and you should also try with the sample app.&amp;nbsp;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 11 Jul 2024 16:40:18 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/630741#M7377</guid>
      <dc:creator>sipriyadarshi</dc:creator>
      <dc:date>2024-07-11T16:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: regrading the device custom attributes reading sample app is crashing</title>
      <link>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/631035#M7382</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;1234567890qwr&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2024 02:14:48 GMT</pubDate>
      <guid>https://www.googlenestcommunity.com/t5/Smart-Home-Developer-Forum/regrading-the-device-custom-attributes-reading-sample-app-is-crashing/m-p/631035#M7382</guid>
      <dc:creator>Hfdfbjkplk</dc:creator>
      <dc:date>2024-07-13T02:14:48Z</dc:date>
    </item>
  </channel>
</rss>

