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

Enhancement Show alarm panel when triggered for quick deactivation #1955

Open
NiC1305 opened this issue Mar 21, 2024 · 11 comments
Open

Enhancement Show alarm panel when triggered for quick deactivation #1955

NiC1305 opened this issue Mar 21, 2024 · 11 comments
Labels
Enhancement For suggestions that add new features or improve existing functionalities.

Comments

@NiC1305
Copy link

NiC1305 commented Mar 21, 2024

Enhancement Summary

Show alarm panel when triggered

Detailed Description

Hello, thank you for the project.
Would it be possible to bring the alarm control screen to the foreground for deactivation, as long as the alarm is activated and a trigger is activated.
In the same way that a trigger wakes up the screen
Thanks

Additional Context

No response

@NiC1305 NiC1305 added the Enhancement For suggestions that add new features or improve existing functionalities. label Mar 21, 2024
@M0uC0
Copy link

M0uC0 commented Mar 21, 2024

Quoting @edwardtfn in
https://community.home-assistant.io/t/sonoff-nspanel-blueprint-configure-your-own-custom-nspanel-easy-via-a-blueprint/500577/800


You can use the open_entity_settings_page to call the alarm page with the alarm entity you wanna show: How to - Call a Page Directly - Entity-Specific Pages 1.

You can then check for the sensor “Current page” to wait for page “alarm” to be visible. Once that page is visible, you can use the service send_command_printf to run command click bt_disarm,0 which will simulate the release of a click on button disarm:

service: esphome.xxxxx_send_command_printf
data:
cmd: click bt_disarm,0

@edwardtfn edwardtfn modified the milestones: v4.3.5 - Patch, v4.4 Apr 19, 2024
@NiC1305
Copy link
Author

NiC1305 commented Apr 25, 2024

In order to make a small improvement, would it be possible for the numeric keypad to take up the entire screen, in fact the number keys are quite small and I think this would be more comfortable to use

@edwardtfn
Copy link
Collaborator

Which model are you using? EU, US or US Landscape?

@NiC1305
Copy link
Author

NiC1305 commented Apr 25, 2024

I use EU

@PoopingNow
Copy link

I was able to open the alarm page when i unlock my door, by calling the esphome entity page, as i am using alarmo. However, once the alarm page is opened the "click bt_disarm,0" is not working, i am not able to open the pin pad / disarm page. Ii tried to increase the wait time and other options online, but none seems to work.

@M0uC0
Copy link

M0uC0 commented May 6, 2024

Hello..
API has changed since the post.

now u have to use the

ESPHome: "your_nsp_panel"_entity_details_show
service..

entity: your_alarm_entity
back_page: home

ESPHome: "your_nsp_panel"_command
service..

cmd: click bt_disarm,0

and maybe checking the "current page" on automation if it is at alarm.. before the click.

@PoopingNow
Copy link

Thank you for the prompt reply. Yes i am using the latest API and exactly per the above.

ESPHome: mainpanel_entity_details_show

entity: alarm_control_panel.alarmo
back_page: home

At this stage, the alarm panel will load with the option to arm / disarm etc... As per the normal behaviour.

ESPHome: mainpanel_command
cmd: click bt_disarm,0

At this stage, the disarm window does not load. I expect it to load the disarm window, where there pin pad is visible for easy capture of the disarm code.

Can point me in the right direction? I could not locate the get current page function in the API list.

@edwardtfn
Copy link
Collaborator

What if you call click bt_disarm,1 instead?

@PoopingNow
Copy link

Tried that as well.
I even added a delay of 100ms before i call click bt_disarm,1.
then another delay of 50ms to simulate and actual button press.
Then release the button by calling click bt_disarm,0.

I also tried to increase the delay or without the delays as well. Anyway I will leave it as is for now.

@denes44
Copy link
Contributor

denes44 commented May 13, 2024

An option to prevent any navigation from the disarm screen when the alarm is triggered would be nice (#1361).

@PoopingNow
Copy link

I was finally able to get it working. I guess when using Alarmo you have to call the keyboard page as well, as it will not load automatically.
I have not refined the code yet and to test multiple scenarios, but for now the below is working. I am calling this function when I unlock the main door, using an Aqara U100 lock.

ESPHome: mainpanel_entity_details_show
entity: alarm_control_panel.alarmo
back_page: home

Wait 250ms

ESPHome: mainpanel_command
cmd: click bt_disarm,1

Wait 250ms

ESPHome: mainpanel_command
cmd: click bt_disarm,0

ESPHome: mainpanel_command
cmd: page keyb_num

@edwardtfn edwardtfn removed this from the v4.4 milestone May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For suggestions that add new features or improve existing functionalities.
Projects
None yet
Development

No branches or pull requests

5 participants