emilohman / homey-plejd

This App brings support for the Plejd devices.
MIT License
11 stars 5 forks source link

Plejd app stop working. #8

Closed gorper closed 3 years ago

gorper commented 3 years ago

Greetings. I am at the moment quite happy with the app but.

Currently running v 3.0.0 of Plejd app and it has stopped responding twice. It gives a paus sign in the homey app list. I just need to deactivate and then reactivate the app and all is back to fine. Unfortunately I have no more information.

emilohman commented 3 years ago

Sorry to hear that! Can you please send me you logs by going to Plejd settings in the Homey app. Then press the settings icon on top right corner. There hit the "Send diagnostic report" button.

gorper commented 3 years ago

558264e8-0190-4759-91ac-965c95a4f3e7 is a code that I should provide homey told me.

joco73 commented 3 years ago

I have also encountered this. Every second day I need a restart and then all is fine again.

It seems that it do not free up resources, starts on 10 MB and after a day it is up above 30 MB.

emilohman commented 3 years ago

Thanks for reporting this! The problem is that when getting state of a device that doesn't support dim I try to set the dim value in homey but no such capability exists. I'll try to publish a fix later today!

gorper commented 3 years ago

I also see that plejd app is growing. I looked into the memory statistic. And in 1 hour it have grown from 23.2 Mb to 24.4 Mb.

emilohman commented 3 years ago

I see... I will look into that. I've now published a fix for the dimmer error. That error generated lots of errors in the log.. and that can be one theory why homey disables the app after some time. Please report back if its works better now.

gorper commented 3 years ago

Unfortunately I see growing of app since you pushed update to 3.0.1 and my homey auto installed it yesterday my plejd app has gone from 12 mb to now 35mb so it is slowly consuming memory. It has not yet gone into pause mode.

gorper commented 3 years ago

Don’t know what to do with this. So I post it here c19ae296-3ce9-40ec-b0e3-d6d10b2d0fba homey state I should give it to developer.

joco73 commented 3 years ago

Since update, it has been working fine for me. No more problems. But as @gorper say, the size grows mine is up on 40+ MB, but I just then restart it when I remember but something is leaking...

Good App by the way and I hope the BT fix from Homey will come soon, and also that Plejd open up their API, Good work!

emilohman commented 3 years ago

I have localized and hopefully fixed the memory leaking problem. I'll do some more testing but it's looking good. In sdk 3 (Homey v5) Athom changed what timezone Homey uses. So I need to convert the time to be able to synk with the time in Plejd. That conversion was leaking memory but now I've found a better way of doing it.

So really thanks for reporting! I'll publish a fix very soon.

gorper commented 3 years ago

It is me that should thank You for the splendid app. I noted after auto update to 3.0.1 the memory consuming slows down but still occur. But today it was like 50+ Mb suddenly it cleaned up so now it is just 20Mb again. Good that it don’t stop working.

gorper commented 3 years ago

Unfortunately once again the app 3.0.2 went into pause. After restart it is 12.6 Mb but before it was stoped by homey it was like 74.? Mb. So it is still growing but slow. And as my last comment sometime it seems to shape up and shrink.

gorper commented 3 years ago

Don’t know if this help. But since DST change to summer time a original plejd dim up timer I have set in plejd direct begun to start 2 hours to early. Memory usage for app has increased from 12.6 Mb to 34.3 in 2 days. Do the app any attempt to set time in plejd ?

emilohman commented 3 years ago

I published a new version last night. How do you think that one works? The main problem in the memory leak is that Homey now use UTC time and I need to convert it to Plejd time.. The other problem is polling.. I've now changed to only set the Plejd clock on startup for now so it works if the power breaks and Plejd need to set its clock. I've also changed polling interval for states from 2s to 10s. That gives Homey time to clean up some memory. Hopefully Homey get support for instant state changes over BLE soon so we don't have use polling.

gorper commented 3 years ago

I tried to put a Graf from insights her but it did not work. Unfortunately app still grow. Approx 10 mb / 24h. Will let it continue until fail. Regarding the alter of polling it is fine by me. Don’t need it more accurate and I don’t see any drawback at the moment. Could my plejd accessory BAT-01 be a player in this ? Just thinking because it seems to involve time.

fredrikostlind commented 3 years ago

Just updated Homey to 6.0.0-rc5 to be able to test the new BLE notification together with the Plejd app.

If I try to change the state of an DIM-01 (example) from the mobile or desktop app, I get this error message Missing Capability Listener: onoff. Do you recognize this problem? image

emilohman commented 3 years ago

Strange.. no nothing I've seen. Can you please send me a. error report? Go to More->Apps->Plejd->cog wheel->Send diagnostic report button.

fredrikostlind commented 3 years ago

Between the time I posted the error message and now, I have rebooted Homey twise, and now i'm unable to reproduce the error again. Although, created a diag report with code 9393e8ca-c1e9-490c-b117-efe3ad7cb150.

emilohman commented 3 years ago

Ok, good that it's working again. Can't see any error in your log. Strange.. please let me know if it happens again.

fredrikostlind commented 3 years ago

Will do! With the new beta version of Homey and the new version of your app, it's a big different in responsiveness between the Plejd device and the state in Homey compared to before. Great work!

gorper commented 3 years ago

Hallo. Plejd app 3.1.3 grow from 20 to 80 Mb and is paused by homey in 7days in my system. But it works until shutted down. I have noticed that homey hog memory by it self not specific to any app. So my action to solve this is to test a flow restarting homey or plejd app now and then.

emilohman commented 3 years ago

Which version of homey do you use? My experience is it works much better with v6.0 so Plejd app can use notifications instead of polling.

gorper commented 3 years ago

I running version 5.0.4 of homey. It is auto updating so I guess that is the official version. But as I mentioned homey itself seems to hog memory. Fresh restarted other is like 200 Mb but it was like 600 Mb when I restarted. And on top plejd app grow until paused as I mentioned.

emilohman commented 3 years ago

Please try upgrading to v6.0: https://firmware.athom.com/

gorper commented 3 years ago

Done and wi will see. Thanks.

gorper commented 3 years ago

So I must say plejd 3.1.3 and Homey 6.0.0 is memory wise steady as a rock around 11 Mb so with this I say this issue open by me solved. And I close it. Well done.