alarmdotcom icon indicating copy to clipboard operation
alarmdotcom copied to clipboard

Arming Without a Code Causes Error After 2024.6 Upgrade

Open bumpaneer opened this issue 1 year ago • 16 comments

After upgrading HA to 2024.6, I was receiving an error trying to alarm my panel without a code.

Seems to be related to: https://github.com/home-assistant/core/issues/118668

The following post helped me in resolving the issue: https://github.com/home-assistant/core/issues/118668#issuecomment-2156059732

I'm not sure if this is the proper fix, but in alarm_control_panel.py around line 65 I added the following to the class definition:

class AlarmControlPanel(HardwareBaseDevice, AlarmControlPanelEntity):  # type: ignore
    """Alarm.com Alarm Control Panel entity."""

    device_type_name: str = "Alarm Control Panel"
    _device: libPartition

    _attr_code_arm_required = False

This allows me to arm my panel correctly as it worked before the update.

bumpaneer avatar Jun 10 '24 01:06 bumpaneer

I can confirm this is an issue for me, as well. Suddenly all of my security routines began erroring out and it took me all day to figure out why they weren't working.

Going to try the fix mentioned for now.

TheWebMachine avatar Jun 10 '24 06:06 TheWebMachine

Seeing the same here. Can't manually arm from the dashboard now either, but can disarm from the dashboard fine. Seems to be related to https://github.com/home-assistant/core/issues/118668 as bumpaneer mentioned.

rmatte avatar Jun 10 '24 17:06 rmatte

I'm on the same boat, thanks for reporting it @bumpaneer

a couple of silly questions to be able to leverage your workaround:

  • Once you changed the file to add the code, how did you make HA take the update? Was reloading the integration sufficient? Or what else do you need to do so that HA actually takes the change?
  • Which specific file did you change? was it the file under config/custom_components/alarmdotcom or somewhere else?

adamantivm avatar Jun 11 '24 01:06 adamantivm

I updated the py file and then restarted HA and it worked right away

the only line I needed to add was

_attr_code_arm_required = False

for me to match spacing of the example it was on line 71

thomasshawn avatar Jun 11 '24 02:06 thomasshawn

I updated the py file and then restarted HA and it worked right away

the only line I needed to add was

_attr_code_arm_required = False

for me to match spacing of the example it was on line 71

Thanks! Working for me too now. I didn't know it was required to start all of HA to reload integration, TIL.

adamantivm avatar Jun 11 '24 10:06 adamantivm

Is adding _attr_code_arm_required = False the ideal fix for this? If so we should get a PR submitted with that change.

rmatte avatar Jun 12 '24 01:06 rmatte

I'm having the same issue. getting this fix published would be appreciated

adamyoung3 avatar Jun 13 '24 23:06 adamyoung3

This is a new requirement introduced by the update 2024.6. Thank you very much @thomasshawn! You just need to add the line where he mention and reboot HA and everything is working as before again!

lbreggi avatar Jun 14 '24 11:06 lbreggi

PR submitted for this, the package maintainer will need to approve it and cut the new release: https://github.com/pyalarmdotcom/alarmdotcom/pull/413

rmatte avatar Jun 14 '24 19:06 rmatte

Thanks for this. I’ll merge and release tomorrow (Saturday).

On Fri, Jun 14, 2024 at 3:48 PM Ryan Matte @.***> wrote:

PR submitted for this, the package maintainer will need to approve it and cut the new release: #413 https://github.com/pyalarmdotcom/alarmdotcom/pull/413

— Reply to this email directly, view it on GitHub https://github.com/pyalarmdotcom/alarmdotcom/issues/410#issuecomment-2168661444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADR4HBCBFIUJD5LCNM27J3ZHNCKPAVCNFSM6AAAAABJBLHBA2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRYGY3DCNBUGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

elahd avatar Jun 15 '24 04:06 elahd

Which py file do we need to add the code part? I haven't found a relevant line 71 spot so far in any of them.

bkr1969 avatar Jun 18 '24 14:06 bkr1969

/homeassistant/custom_components/alarmdotcom/alarm_control_panel.py

Which py file do we need to add the code part? I haven't found a relevant line 71 spot so far in any of them.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

thomasshawn avatar Jun 18 '24 15:06 thomasshawn

Which py file do we need to add the code part? I haven't found a relevant line 71 spot so far in any of them.

You need to edit alarm_control_panel.py and find line number 65 which should be...

class AlarmControlPanel(HardwareBaseDevice, AlarmControlPanelEntity):  # type: ignore

Then find this line under that...

    _device: libPartition

Then add this after it...

    _attr_code_arm_required = False

So that the whole thing looks like...

class AlarmControlPanel(HardwareBaseDevice, AlarmControlPanelEntity):  # type: ignore
   """Alarm.com Alarm Control Panel entity."""

   device_type_name: str = "Alarm Control Panel"
   _device: libPartition

   _attr_code_arm_required = False

If you installed it via HACS the files for the package will be in your home assistant config directory in a directory called custom_components/alarmdotcom. Once that edit is made, restart home assistant.

rmatte avatar Jun 18 '24 16:06 rmatte

If this is the correct fix can we get the PR merged and a new verison released?

bringel avatar Sep 24 '24 16:09 bringel

If this is the correct fix can we get the PR merged and a new verison released?

Last I heard the developer of this project was in the middle of moving and said he might not be able to work on the project for a while. He also mentioned that he will have an alarmdotcom system in his new house which will help him with development, since he only had access to one at a relative's place previously. I'm not sure what the eta is in terms of when he will be continuing development.

@elahd Any news sir? :)

rmatte avatar Sep 24 '24 18:09 rmatte

@elahd hi, hope everything is good for you. Is it possible to merge related pr and publish a new version. This is a kindly reminder. Thanks

akinomeroglu avatar Oct 25 '24 20:10 akinomeroglu

@elahd hi, kindly reminder

akinomeroglu avatar Nov 29 '24 20:11 akinomeroglu

Note that my PR didn't end up getting included in the latest release that was released to fix https://github.com/pyalarmdotcom/alarmdotcom/issues/440, so this continues to need to be hand patched again after updating to that release until a full release is cut with my PR in it.

rmatte avatar May 05 '25 16:05 rmatte

Closing. Please reopen if the issue persists in v4.

elahd avatar May 15 '25 00:05 elahd

This shouldn't have been closed (my PR with the fix for this was never merged) and is still a problem in the latest version (v3.0.15), see https://github.com/pyalarmdotcom/alarmdotcom/issues/504

rmatte avatar Nov 14 '25 21:11 rmatte