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

Add the Off Security Mode #199

Closed
BillyBobMills opened this issue Jan 4, 2022 · 27 comments
Closed

Add the Off Security Mode #199

BillyBobMills opened this issue Jan 4, 2022 · 27 comments
Assignees

Comments

@BillyBobMills
Copy link

Are you able to add the Off security mode please?

I am trying to set the 'off' security mode to match the available modes on the eufy keypad. (Arm Away, Arm Home, Custom, Off)

I am trying to set the off mode on the homebase from HA but this is not possible. Custom 1,2.3 work using the eufy services.
Arm away, arm home and disarm work using the HA alarm services.

Disarm in the Eufy app is all triggers etc off so no notifications from any device.

The off security mode enables the Eufy alarm to be in an off state but still receive notification from the doorbell etc.

@fuatakgun
Copy link
Owner

fuatakgun commented Jan 4, 2022

When your home base is off, it will be visible inside home assistant as disarmed but i can try to come up with a specific service to switch into off, first i need to double check if doable.

@BillyBobMills
Copy link
Author

Yes thats correct.
I presume it would be the same as switching to custom123 or the scchedule and geofencing states.

@fuatakgun
Copy link
Owner

Yes because native home assistant alarm control panel doesn't have a state called off :-)

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

I also vote for this one. If the alarm is in disarmed, no video/motion is being detected. The keypad panel also puts the alarm in off mode and not in disarmed.

If the alarm control panel doesn't support, you can call the service to set it to off in an automation, after the panel has been put into disarmed.

@fuatakgun
Copy link
Owner

We can treat Off state as another custom state other than Disarmed and show it to users as one of other custom states.
Or we can keep existing solution, show Off as Disarmed through UI and come up with a new service as proposed with @zumitnl to set to Off mode. Please share your thoughts.

@BillyBobMills
Copy link
Author

If possible can we display the Eufy homebase 'Off' state in HA as another custom state (so that we don't loose the also available in eufy disarmed state) and then have a way in the eufy integration to set that off custom state in the eufy homebase?

The eufy keypad has the below buttons available. Off is really another custom state as far as HA is concerned.
(Arm Away, Arm Home, Custom, Off)

I think that would give the flexibility to be able to map between the eufy homebase states and the inbuilt HA alarm states if needed.

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

I can also take a peek at the code from home-assistant how much work it is to add states there. If we could add the off state there, we could map it one-on-one.

If not... then showing Off as Disarmed is a good solution. The only thing you need is the service to set it to Off.

@fuatakgun
Copy link
Owner

let me recap my idea;

  • inside HA, you will have pre-defined states as Disarmed, Home, Away, Night, Vacation, Bypass
  • if you click on Disarm inside HA, homebase will go into Disarmed
  • if you use keyboard and set the state as Off, it will be visible as Disarmed in frontend.
  • you can still call a service alarm_arm_off and it will set homebase as Off but still will be visible as Disarmed inside HA

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

I've looked into the code of alarm_control_panel inside HA, but it takes some time to figure out how to add the custom states. So I think your idea as described above is the best option for now. I've tested with sending 6(and not 63) as STATE_ALARM_DISARMED and it works. The homebase went to Off and not to Disarmed

So if you add the service alarm_arm_off it is going to work in the automations. In the mean time I'll look further in the code of home-assistant.

@fuatakgun
Copy link
Owner

releasing a new version, please get it and update here with your results.

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

My home assistant is missing the service... I can't call it...
Trying to find out why...

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

Missing something like:

platform.async_register_entity_service("alarm_off", {}, "alarm_off")

@fuatakgun
Copy link
Owner

You are right, i fix it

@fuatakgun
Copy link
Owner

please retest

@fuatakgun
Copy link
Owner

no, apparently I have not tested this thoroughly

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

Almost...

I had to remove the code param.

def alarm_off(self, code) -> None:

to

def alarm_off(self) -> None:

@fuatakgun
Copy link
Owner

I will test other services, this code was something new, which was not supposed to be merged :)

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

I tested the different services (arm_home, arm_away, custom1, off and disarmed).
They all worked.

@fuatakgun
Copy link
Owner

please retest in couple of minutes with latest version, thanks

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

I've tested the integration and it works without errors.
Thnx! Keep up the good work!

@fuatakgun
Copy link
Owner

Thanks for the help :-) now i need to publish an warning for users who don't have keypad not to use this new service :-)

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

Thanks for the help :-) now i need to publish an warning for users who don't have keypad not to use this new service :-)

Also people without a keypad can set the alarm from to Off or Disarmed with the app.

@fuatakgun
Copy link
Owner

But if you don't own a keypad, there is no Off option in Eufy app. Did you mean, when they call off, we can redirect to disarmed?

@zumitnl
Copy link

zumitnl commented Jan 13, 2022

Sorry... I think you are right... I've connected my keypad, so I have that option.
For another location (without keypad) I don't see the off option.

@fuatakgun
Copy link
Owner

At least, i am sure i don't have this option :-)

@BillyBobMills
Copy link
Author

Ive tested as well. Works perfectly. Thank you for your efforts.

I wasnt aware people without the keypad didnt have the off option.

@fuatakgun
Copy link
Owner

Yeap, this should be counted as discrimination, right :-) happy that it is working for both of you, enjoy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants