# Zigbee App keeps pausing

**URL:** <https://community.homey.app/t/zigbee-app-keeps-pausing/67902>\
**Category:** Developers\
**Tags:** app, zigbee, homey-pro\
**Created:** [August 25, 2022, 2:42pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902 "2022-08-25T14:42:18Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 25, 2022, 2:42pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/1 "2022-08-25T14:42:18Z")

</div>

I am working on an app to link Zigbee devices and have already published it to the app store, but now I noticed that the app pauses on its own after a couple of minutes (it shows the pause symbol in my app overview).  
It doesn’t necessarily seem to crash but my devices become unavailable since the app is no longer running at that point.  
Did any of you experience something similar and does someone have a suggestion on how to debug this?  
When I submit a crash report the stdout and stderr are completely empty.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 25, 2022, 2:44pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/2 "2022-08-25T14:44:05Z")

</div>

Sounds like your app is getting paused because it’s using too much memory (not sure what the max is, I think 80MB?). Should be visible in Insights.

---

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 25, 2022, 2:48pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/3 "2022-08-25T14:48:53Z")

</div>

If I look here: [Homey Developer Tools](https://tools.developer.homey.app/tools/app-profiling)  
And then for my own app, it says it’s using a consistent 28.1MB.  
Is there any other spot where I can check the memory usage?

 ![Screenshot 2022-08-25 at 16.51.07](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7e6120f2f3b48cf8180623cce8b58b971d66fc17.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 25, 2022, 2:58pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/4 "2022-08-25T14:58:56Z")

</div>

Yes, not sure if the value will differ though

> **[My Homey](https://my.homey.app)**
>
> Homey Web App

Hit the graph icon on the left  
Enter ‘app’ in searchfield  
Scroll to app name

---

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 25, 2022, 3:01pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/5 "2022-08-25T15:01:19Z")

</div>

Not sure in what field, but it won’t show up in either:

 ![Screenshot 2022-08-25 at 17.00.50](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/1/e130af42e94ac4fa23a85bd8cb4682415284b443.png)

---

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 25, 2022, 3:10pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/6 "2022-08-25T15:10:02Z")

</div>

Okay, I just found out it is a memory issue, right before it crashes it makes one huge spike, but I don’t know why. Someone any idea how I can try and debug this?

 ![Screenshot 2022-08-25 at 17.09.04](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/d/5de6a8d15ea9499f502f5611b8b94305434c0df4.png)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 25, 2022, 3:20pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/7 "2022-08-25T15:20:01Z")

</div>

I think it’s still possible to use the V8 inspector: [Debug app code - #2 by robertklep](https://community.homey.app/t/debug-app-code/33516/2)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 25, 2022, 5:35pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/8 "2022-08-25T17:35:42Z")

</div>

Odd, I get a listing of installed apps. But you found the memory issue anyways I see 😉

 ![Screenshot_20220825-193426_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/6/968d10cf463e6059f555d59bdefec70dffcda826.jpeg)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 25, 2022, 6:10pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/9 "2022-08-25T18:10:49Z")

</div>

You have the Power User setting turned on 😉

---

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 25, 2022, 7:04pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/10 "2022-08-25T19:04:07Z")

</div>

I did also find that one now I turned the power user setting on, but that one has a wider x-axis so for my purpose at the moment a little less useful since it happens within a matter of minutes.  
However, I did change the intervalPoll setting on a couple of the registerCapabilities and it seems to have lowered the ramping of the RAM. It still spikes after a while, but from 16MB to 20MB now which is acceptable and doesn’t break the app.  
Still wondering where the sudden spike comes from though, if it would slowly creep up I can imagine some logging slowly building up, but this is not a behavior I can really understand.  
Currently I have declared my capabilities as follow:

```auto
this.registerCapability("measure_power", CLUSTER.ELECTRICAL_MEASUREMENT, {
      get: 'activePower',
      getOpts: {
        getOnStart: true,
        getOnOnline: true,
        pollInterval: 1000,
      },
      report: 'activePower',
      reportOpts: {
        configureAttributeReporting: {
          minInterval: 0,
          maxInterval: 10,
          minChange: 1,
        }
      },
    });

```

Pretty standard I believe.  
I have also attached my current memory usage, the strange thing is that it is completely stable after starting up the app for about 20 minutes or so, and then it suddenly spikes and afterwards it goes up and down tiny amounts:

 ![Screenshot 2022-08-25 at 20.59.59](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/8/e860a7f0a30d425afdc8b658c6e71484720c877c.png)  
One last remark, not sure if it has anything to do with this, but lately my Homey tends to “fall away” every now and then. Via my app and via the online portals, my Homey is completely unreachable for a couple of seconds. Not sure if this is behavior that happened before, since I didn’t check the app as often as I do now 😅

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 26, 2022, 5:04am UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/11 "2022-08-26T05:04:11Z")

</div>

> [@MarijnvanderSteen](#):
>
> Via my app and via the online portals, my Homey is completely unreachable for a couple of seconds

Is your Homey still using its original Athom power supply? If so, that could be the reason. Replacing it with a decent USB power supply has solved a lot of random issues for a lot of people.

---

<div class="post-metadata">

**Author:** ![MarijnvanderSteen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marijnvandersteen/32/56553_2.png) [@MarijnvanderSteen](https://community.homey.app/u/MarijnvanderSteen)\
**Post date:** [August 26, 2022, 6:15am UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/12 "2022-08-26T06:15:55Z")

</div>

Ah, good one, I thought I might be related to the memory issue, but I’ll try a new power supply, any suggestions?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [August 26, 2022, 6:18am UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/13 "2022-08-26T06:18:30Z")

</div>

If you happen to have an old iPad charger, those are pretty good. Otherwise, any decent USB power supply capable of supplying about 2.3/2.5A or more is okay. Just don’t buy a cheap one from Aliexpress or the local telefoonhoesjesstore.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 26, 2022, 1:45pm UTC](https://community.homey.app/t/zigbee-app-keeps-pausing/67902/14 "2022-08-26T13:45:04Z")

</div>

> [@robertklep](#):
>
> local telefoonhoesjesstore

😅
