Use different disarm code with Envisalink

I’d like to use a keypad for arming/disarming with my envisalink but can’t figure out how that’s possible with @Cinntax’s Envisalink component.

From the component documentation it says that code is required:

code ( Required ): Your alarm panel’s code, for authenticating user input during arm/disarm.

and later, for disarming it says you can provide a disarm code:

alarm_disarm : Disarms the alarm with the user code provided, or the code specified in the configuration.

However, when I disarm there’s no option for entering a code, and if I leave the code out of my config, home assistant fails to start because code is required.

I’d like to use the ciotlosm/custom-lovelacealarm keypad but it needs to be able to accept code entry.

I feel like at some point it was possible to NOT specify the code in the config, and specify it at runtime instead. I specifically remember having an input where a code could be input. I know there’s been a lot of changes though. I don’t recall ever making the “code” a required config variable- maybe when the config validation was being overhauled, a mistake was made and that parameter was made mandatory. I’ll give it a quick try…

Yep- this is what the default UI looks like (below) if you don’t provide a code (I had to hack the envisalink component to remove the requirement for a code parameter).

I’ve confirmed that this works as well (I had to actually provide the correct code).

So I do think a change needs to be made to make the “code” parameter optional- not sure how that was set that way…

Now, that being said- i haven’t gotten much into the lovelace stuff, but the actual hass service called behind the scenes (alarm_control_panel.alarm_arm_home for example) does take in a “code” parameter, and if passed in, it will override what’s in configuration.yaml- so if the custom panel gives any leeway in what to pass into the service, you may be able to pull this off…

Hi @Cinntax! Is there any chance we could get access to that modified component code?
I really would like to implement a dashboard to use it to arm/disarm my alarm system, but with the current config, I can’t do it as it doesn’t ask for a disarm code. Thanks a lot!

Hey- so sorry it’s been so long. If you’re interested in trying this still- it’s a pretty simple one-liner to adjust this. You just need to change the “vol.Required” to “vol.Optional”.

But basically you update the /site-packages/homeassistant/components/envisalink.py
Python home really depends on your system, but by default it might be /usr/lib/python3.7

I have the same issue and HA is running on hassio. how do I update envisalink.py file? when I searched for that file, I could not find a file name with envisalink.py

Yeah unfortunately it’s a bit dependent upon your setup, if you used a virtual environment or not, what distribution you’re running, etc.

The good news is that I’ve gone ahead and made this change in the official version, and I’m in the middle of the submission process now. So hopefully this change will just be there for the next release.

1 Like

Thanks! Would you mind replying here when it’s live?

Certainly- i’m in the commit process now- i believe i have the final edits made.

Hey- just a note- this change is in the dev branch right now if you could give it a try. I still have to make an additional tweak to the code prior to production, but it should work at this point.

I see this was added in the 0.85.0 release. I’ll test it out tonight! Thanks again!

Works as expected. This is awesome, thanks so much for setting it to optional!

Awesome- glad it’s working well!

This fix sounds like what I need to configure home stay and home away and disarm in my Envisalink/Homeassistant.

Stay, Home, and Disarm, all have different codes.

I’m using alarm_control_panel.envisalink_home_alarm, not the Alarmo alar_control_panel.alarmo

from /, I tried to find . name envisalink.py -print

envisalink.py is not on my system.

I’m up-to-date on updates:
Core 2023.11.2
Supervisor 2023.11.3
Operating System 11.1
Frontend 20231030.2


Screenshot 2023-11-20 at 16-04-42 Overview – Home Assistant

I found what I thought was the solution, but it doesn’t work.

The integration page Envisalink - Home Assistant says:

code string (Optional)

Your alarm panel’s code, for authenticating user input during arm/disarm. If you do not provide this value, the integration will prompt the user to enter the code at runtime.

So I commented out the code entry in configuration.yaml for envisalink, and now I get a code required field in the alarm panel card. I enter the code, but it doesn’t disable the alarm. No logs. I don’t know how to troubleshoot this.

Screenshot 2023-11-20 at 16-40-15 Overview – Home Assistant