-
Notifications
You must be signed in to change notification settings - Fork 289
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
Guard state not updated in Home Assistant #256
Comments
So to check, the logs are saying that in the first set, that it's switching to a disarm state There's also a lot of volume changes. Are you changing the volume at this time? It may help to isolate that out while testing so there's less traffic to read. Finally, I went through and made the quoting easier to read and also obfuscated your logs. Please try to do that moving forward (you can click edit to see how I got the block quoting). |
Yes Home Assistant reports just "disarmed" as the state (see screenshot) when I use Alexa to enable Guard. The logs in my other post was from enabling and disabling Guard using voice commands to the Amazon Echo. The logs below are when I enable and disable Guard using your custom component from within Home Assistant. Enable Guard from HA with this custom component:
The state changes to armed_away as it should: Disable Guard from within Home Assistant using this custom component:
The state changes to disarmed as it should. |
What if you make changes in the Alexa app? We're basically mimicking that call but perhaps we're missing some info. |
@alandtse
...and here are the log entries once I disabled Guard from within the Alexa app:
|
So it looks like nothing is updating when using the app. I am seeing websocket activity. Are you actually adjusting the volume during the logs or is that happening automatically? |
I'm not adjusting the volume, and I don't know of anything that's doing it automatically. I'll check back through my HA automations and Node Red flows to be sure, but I'm 99% sure I don't have anything. |
Ok I have a partial fix; the issue was the check wasn't happening for all commands and it also needed a one second delay if you're enabling/disabling via voice. However, we won't be able to update instantly on app changes. |
Awesome news. Thank you! |
I'm not sure if I'm doing something wrong or not, but I copied the updated files from the Dev branch into the custom component, and then restarted hassio. The HA Guard state is still not changing when I enable and disable Guard using Alexa voice commands. |
In alarm_control_panel, change line 121 to increase the delay from 1 to something larger like 2-3. if 'push_activity' in event.data:
call_later(self.hass, 1, lambda _:
self.refresh(no_throttle=True)) If you don't have this file to change, then you didn't copy the fix correctly. Otherwise, let me know what delay starts to work for you. |
Ok, I tried without success 2, 3, 4, and also 5 rebooting each time. The state of alarm_control_panel.alexa_guard_18020 remains disarmed when I enable Guard via Alexa voice. Possibly a Stupid Question: I notice one of the attributes for alarm_control_panel.alexa_guard_18020 is code_arm_required:true. That's not preventing it from arming is it? |
Is your Alexa Guard actually reporting anything? I just realized it may no longer be setting up in my test setup. |
In the ha log, I get the state of "ARMED_AWAY" when I enable Guard using Alexa voice. In the ha log, I get the state of "ARMED_STAY" when I disable Guard using Alexa voice. However the entity, alarm_control_panel.alexa_guard_18020, state never changes but instead is always "disarmed" when using Alexa voice to enable Guard. |
Also here is the log entry for when I enable Guard by telling Alexa, "I'm leaving":
|
...and here is the log entry for when I disable Guard by telling Alexa, "I'm home":
|
Can you expand that to show the alexawebsocket activity? It's returning the right states. |
Oh wait, I think I know. At line 158 add _LOGGER.debug("%s: Alarm State: %s", self.account, self.state)
self.schedule_update_ha_state() |
Here is the log when I enable Guard using Alexa "I'm leaving":
|
Oh ok, let me try that. |
That got it. The state goes to "armed_away" when I enable Guard. The state goes back to "disarmed" when I disable Guard. Thank you!!! |
I have similar problem. When the Guard state is activated by Alexa Media Player component (v2.1.0) and deactivated by Alexa's voice command "I am home", its still remains "active" in the HA . |
@TomboCZ Please open up a new issue if this is happening in 2.1.2. I'll need the logs like shown in this thread specifically for when you disable it. |
Works properly in the new 2.1.2 version., Solved, thanks. |
I have no problems enabling Alexa Guard mode using this component. When I do, the button I press in lovelace changes color to show the status of whether Alexa Guard has been enabled or disabled.
However if Alexa Guard is enabled or disabled by saying to the Amazon echo, “I’m leaving”, or disabled by saying “I’m home”, the state for Alexa Guard doesn’t change in Home Assistant. It remains "disarmed" whether Alexa Guard is enabled or not.
After enabling Alexa Guard by saying to Amazon echo, "I'm leaving", I get the following log entries:
Upon turning off Alexa Guard by saying, "I'm Home", I get the following log entries:
EDIT: Formatting/obfuscation
The text was updated successfully, but these errors were encountered: