ljezny/Particle-HAP

Device goes unresponsive after some days of usage

Opened this issue · 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

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

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

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

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

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.

Dids commented

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.

100% same for me

Dids commented

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.