ballle98 / AqualinkD

Daemon to control Jandy Aqualink RS pool equipment from any home automation hub (Alexa, Homekit & Siri, Home Assistant, smartthings, domoticz etc) or web browser.
Other
6 stars 2 forks source link

rework pda_shouldSleep() #83

Closed ballle98 closed 11 months ago

ballle98 commented 11 months ago

Does not look like pda_sleep_mode is used in upstream anymore. Do we need _pda_first_probe_recvd?

image

ballle98 commented 11 months ago

See Commit 527fe30c8581de703c74f49486e12e3f1bc3fac0 and Commit 1b6726fd9b1ad20ed3ee2a7959a1ffcd35de030f and Commit 9b5814f1abed6a8eb273f4593df18725421827a2

ballle98/AqualinkD#26: AQ_PDA_INIT is not always called

ballle98/AqualinkD#33: sleep with websocket active

ballle98/AqualinkD#27: enable last active for sleep

ballle98 commented 11 months ago

from upstream main

caculate_ack_packet, line 1438: if (aqconfig.pda_sleep_mode && pda_shouldSleep()) {

ballle98 commented 11 months ago

https://github.com/ballle98/AqualinkD/blame/5231b0bfb56f675d7f91b94fbd2a9ae03a949ea5/pda.c#L59

ballle98 commented 11 months ago

bad change is in https://github.com/ballle98/AqualinkD/issues/26: AQ_PDA_INIT is not always called

ballle98 commented 11 months ago

Actually the changes in #26 are fine

image

image