strautomator / core

Strautomator Core
MIT License
45 stars 6 forks source link

Automation triggered for incorrect total elapsed time conditions #10

Closed rmarescu closed 2 years ago

rmarescu commented 2 years ago

I have 2 automations for workout sport type where total elapsed time is mainly used to determine which automation to be executed:

Daily workout automation was created a while back and worked fine by itself. After I created Cold shower automation, workouts that match Daily workout automation are now processed by the Cold shower automation.

Is there something that I have misconfigured, or there is something else causing the issue?

Debugging info Strava activity IDs that were both processed today as _Cold shower_: - `6482483181` (should have been processed by _Daily workout_ automation) - `6482483634` (processed correctly by _Cold shower_ automation) CleanShot 2022-01-06 at 19 44 56@2x

Thanks!

igoramadas commented 2 years ago

Hi Razvan!

It's the first time I hear about such issue so to be honest I have no idea what's going on :-( Unfortunately I don't log much about processed activities for privacy reasons, so there's no way to troubleshoot via logs only.

I tried checking the activity 6482483181, but it was either deleted or you have set it as private. If the activity is private and you give me your written consent here, I can get the activity details via API with a delegated user and double check what happened. Or you could also just make it public for some hours so I can get its details.

rmarescu commented 2 years ago

Hey Igor, thanks for taking the time to look into it. Both activities are now public.

igoramadas commented 2 years ago

Found the issue. Time based conditions (moving time and total time) might not work depending on the timezone, as they're being parsed as a time (HH:MM) instead of a duration in seconds. I'm actually surprised that this wasn't caught and reported earlier, as there are many other users on your timezone.

Fix should be deployed tomorrow. Thanks for reporting it. 🙂

igoramadas commented 2 years ago

https://github.com/strautomator/web/releases/tag/v22.16.11928

rmarescu commented 2 years ago

Just uploaded the activities from today and it worked as expected! Thanks for the quick resolution Igor! 🙌🏻