Use different disarm code with Envisalink


#1

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.


#2

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…


#3

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…


#4

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!


#5

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


#6

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


#7

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.


#8

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


#9

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


#10

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.


#11

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


#12

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


#13

Awesome- glad it’s working well!