nielsfaber / alarmo

Easy to use alarm system integration for Home Assistant
1.4k stars 119 forks source link

Actions take time to trigger vs. using automation with Home assistant triggers. #987

Open VNRARA opened 4 months ago

VNRARA commented 4 months ago

Checklist

Alarmo Version

v.1.10.3

HA Version

2024.6.3

Bug description

Actions created in the action tab take significantly longer to start vs. just doing it myself using Home Assistant automation:

I've setup actions for 'alarm triggering', 'almost triggering' and 'stop triggering' and 'turning off' scenarios. But they were so slow to fire, even in my own home. After I realised I could also make an automation to debug what is happening, I found that the automation is instant when triggering the same simple script vs. doing it native in Alarmo.

I found that just pressing test wouldn't replicate the issue and also fire instantly.

Steps to reproduce

Created an action {alarmo/actions}. Enable alarm Let action get triggered by correct scenario happening. I have to wait for script to get called but it can take up to 30 sec to actually do something.

(vs the automation method is instant).

Relevant log output

Logs don't show much i guess.
github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

VNRARA commented 3 months ago

Still an issue / haven't seen a fix

trantoriana commented 3 months ago

And here i am considering moving my automations into event triggers.

While not fixed, it would be nice to see an acknowledgement if this is reproduceable.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

VNRARA commented 2 months ago

Haven't seen a fix

VNRARA commented 2 months ago

Dudes gone dark it seems..

nielsfaber commented 1 month ago

Sorry for the lack of response from my side, but frankly I don't know how to speed up the automations. There is no delay in the code, and automations should be executed instantly and in parallel (if multiple are triggered), so things are configured to be as quickly as possible. If you have any experience with python, feel free to suggest code improvements (see automations.py file). My knowledge about asynchronous programming may be lacking here.

Perhaps this could be due to your own configuration? Is there some automation triggered with internal waiting time?

VNRARA commented 4 weeks ago

Thanks for getting back to me. I remade the same automations using the native way and with the same yaml and it's immediate. Any way to make it implement it differently?