nielsfaber / alarmo-card

Home Assistant card for controlling the Alarmo component
98 stars 18 forks source link

Exit Delay doesn't match the configured time #29

Closed m-theredhead closed 2 years ago

m-theredhead commented 2 years ago

Alarmo Version

v1.8.6

HA Version

2022.3.5

Bug description

Starting in the last month or so, the configured exit delay in Alarmo doesn't match the count down timer given on the Alarmo card. For Arm Away, it is configured for 30 seconds exit and 30 seconds entry.

For example, when leaving home, I press 'Arm Away' it is showing a 4 second countdown timer in the alarmo card. Returning home and entering the house yield a short timeout as well.

I have noticed this is happening on the wall panel tablet (Fire Tablet) w/ Fully Browser but not on my phone running the native app.

I reported this in the discussion thread a week ago or so and it was suggested to raise a ticket.

Today, I spent a little more time looking at the issue. It appears the countdown is very short, but the alarm itself doesn't actually arm until the appropriate time. It is starting the countdown at 4 seconds, gets to 0, and then just sits there until the 30 second configured time is reached and then it shows armed as expected. So it may be more related to the countdown on the card being wrong, but Alarmo itself using the right value.

What information would be helpful in debugging?

Steps to reproduce

For example, when leaving home, I press 'Arm Away' it is showing a 4 second countdown timer in the alarmo card. Returning home and entering the house yield a short timeout as well.

Relevant log output

No response

m-theredhead commented 2 years ago

When I first noticed this issue, the countdown timer was 15-20 seconds. When I reported the issue, it was starting at about 4 seconds. Now the count down timer just starts at 0 and doesn't count down at all, but it does appear to wait the 30 seconds before arming.

nielsfaber commented 2 years ago

If I understand correctly, this is an issue with Alarmo-card, not Alarmo itself?

m-theredhead commented 2 years ago

That would be my best guess with the realization that it only seems to impact the tablet that controls the whole house and doesn't seem to impact my phone or web interface

nielsfaber commented 2 years ago

I think this issue is caused by differences in the clock of your HA server and the device which you use to show the card. The ‘real’ timer is set on the HA server, the server tells the card at when the timer is finished. The countdown in the card is calculated based on the difference between the current time and the finish time. My guess is that you have a 25 sec difference between the devices. Do you have any way to check this?

m-theredhead commented 2 years ago

That makes sense. Unfortunately, there doesn't appear to be any good way to set the time on the fire tablet. It automatically gets time from the internet, but it isn't configurable for the servers, to sync up, etc.

Currently it is back in sync or at least within a few seconds. If it starts to drop again, I will disconnect from the internet or reboot and see if I can get the time to sync up again.

github-actions[bot] commented 2 years 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

m-theredhead commented 2 years ago

The time difference seems to vary +- 5 seconds at any given time. I haven't seen it vary as much as it did previously when the time would even start at 0. Your explanation makes sense an I don't think there is anything that needs to be done.

nielsfaber commented 2 years ago

I will make some improvements in an upcoming update. I think it should be possible to make it independent of time differences between server and display. I will post back here when a release can be tested.

nielsfaber commented 2 years ago

I released v1.4.0 today which should deal with synchronisation issues between the display device and the HA server. Please update alarmo + alarmo-card and let me know if this improves things for you.

m-theredhead commented 2 years ago

So far it looks good. The timer is starting right at 30 seconds which it has never done previously. Thanks. This is really helpful on a tablet where I really can't control the time (Fire Tablet)

drjjr2 commented 2 years ago

Agree. Seems to be resolved with 1.4.0