Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel timeout countdowns - wasp in box check triggered too early #4

Open
riesch opened this issue May 1, 2022 · 1 comment
Open

Comments

@riesch
Copy link

riesch commented May 1, 2022

Version of the custom_component

Latest

Configuration

wasp_sensor:
  - name: Woonkamer Occupancy
    wasp_sensors:
      - binary_sensor.pir_woonkamer_keuken_home_security_motion_detection
      - binary_sensor.pir_salontafel_home_security_motion_detection
      - binary_sensor.pir_afzuiger_sensor_home_security_motion_detection
    box_sensors:
      - binary_sensor.doorsensor_woonkamer
      - binary_sensor.doorsensor_achterdeur
    timeout: 185

Describe the bug

The timeout is set at 185, yet before 185 seconds the check is done resulting in a false trapped wasp.
Box closed at 21:39:39 (empty room)
From that time no new ON triggers from any of the 3 PIR
Wasp in box at 21:41:38 (67 sec too soon)
Wasp seen off at 21:42:24

Debug log


2022-05-01 21:39:39 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is closed and wasp is seen, waiting 185 seconds
2022-05-01 21:40:01 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: waiting for binary_sensor.pir_afzuiger_sensor_home_security_motion_detection, currently off, for 1 seconds
2022-05-01 21:40:02 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.pir_afzuiger_sensor_home_security_motion_detection is off after 1 seconds
2022-05-01 21:41:38 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is still closed and wasp is still seen after 185 seconds
2022-05-01 21:41:55 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is still closed and wasp is still seen after 185 seconds
2022-05-01 21:41:56 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: waiting for binary_sensor.pir_salontafel_home_security_motion_detection, currently off, for 1 seconds
2022-05-01 21:41:57 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.pir_salontafel_home_security_motion_detection is off after 1 seconds
2022-05-01 21:42:16 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is still closed and wasp is still seen after 185 seconds
2022-05-01 21:42:23 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: waiting for binary_sensor.pir_woonkamer_keuken_home_security_motion_detection, currently off, for 1 seconds
2022-05-01 21:42:24 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.pir_woonkamer_keuken_home_security_motion_detection is off after 1 seconds

@riesch riesch changed the title timeout period - triggered too early timeout period - wasp in box check triggered too early May 1, 2022
@riesch
Copy link
Author

riesch commented May 2, 2022

it seems to me that counting down the timeout period is not reset after box is newly closed. So that parallel timeout instances are being counted down, triggered at every box close. You can see that in these logs:


2022-05-02 09:25:14 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is closed and wasp is seen, waiting 185 seconds
2022-05-02 09:25:59 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.doorsensor_woonkamer is now on
2022-05-02 09:26:05 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.doorsensor_woonkamer is now off
2022-05-02 09:26:05 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is closed and wasp is seen, waiting 185 seconds
2022-05-02 09:27:56 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.doorsensor_woonkamer is now on
2022-05-02 09:28:02 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.doorsensor_woonkamer is now off
2022-05-02 09:28:02 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is closed and wasp is seen, waiting 185 seconds
2022-05-02 09:28:19 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is still closed and wasp is still seen after 185 seconds
2022-05-02 09:28:41 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: waiting for binary_sensor.pir_woonkamer_keuken_home_security_motion_detection, currently on, for 1 seconds
2022-05-02 09:28:42 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: binary_sensor.pir_woonkamer_keuken_home_security_motion_detection is on after 1 seconds
2022-05-02 09:29:10 DEBUG (MainThread) [custom_components.wasp_sensor] Woonkamer Occupancy: box is still closed and wasp is still seen after 185 seconds

@riesch riesch changed the title timeout period - wasp in box check triggered too early Parallel timeout countdowns - wasp in box check triggered too early May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant