Particle-HAP icon indicating copy to clipboard operation
Particle-HAP copied to clipboard

Device goes unresponsive after some days of usage

Open plaetzchen opened this issue 3 years ago • 8 comments

Hi!

I am running on a Particle Photon with 2.1.0 and particle-hap 1.0.16. I am using the Door example code with some modifications to control a relay that interacts with a window.

I have the issue that the device goes unresponsive after some time, sometimes 24h, sometimes a couple of days. Is there a known issue to this or a way to debug this remotely?

My settings in code are currently set to

#define MAX_PAIRINGS 16
#define MAX_CONNECTIONS 8

plaetzchen avatar Sep 01 '21 17:09 plaetzchen

I have the same problem. I assume there is a memory leak in the library possibly?

xkckyle avatar Sep 02 '21 01:09 xkckyle

Same issue with Particle 2.2.0 running the default "lightbulb" example unmodified.

petcurfew avatar Oct 04 '21 14:10 petcurfew

Do you think a daily auto reboot/reset would bandaid it until the issue is fixed?

xkckyle avatar Oct 04 '21 16:10 xkckyle

I was thinking about that but how best to do that?

plaetzchen avatar Oct 04 '21 16:10 plaetzchen

Maybe... Get a date stamp when it boots. If today's date and boot date are not =, then reboot.

This library included a reset and a restart function already set up. I don't remember what the difference was.

xkckyle avatar Oct 04 '21 17:10 xkckyle

This has been an issue for a long time and I believe several potential fixes have been made, but nothing has fixed it so far.

It used to be days for me as well, but for some reason it's mere hours now, before the HomeKit portion of it stops working.

After that happens, it'll still communicate with the Particle API just fine, but only for a few more hours or days, until it just stops responding.

Dids avatar Oct 08 '21 15:10 Dids

100% same for me

plaetzchen avatar Oct 08 '21 15:10 plaetzchen

If anyone has any ideas on how to further debug this, I have multiple devices I could test with.

At this point I'd still prefer getting this to work one way or another, because a standalone HomeKit accessory is massively better than having to rely on Homebridge etc.

I can only guess what the core issue might be, but could this issue happen if the device/OS has exhausted all available connections/sockets? Either that or something's steadily leaking memory.

Dids avatar Nov 13 '21 09:11 Dids