ring-mqtt: HA 2024.6 - Can't change Ring mode - requires code

Describe the Bug

Can’t change Ring Mode (Disarmed, Home or Away) for cameras

Steps to Reproduce

Try to change mode without owning a Ring Alarm system.

Expected Behavior

Works successfully without throwing error.

Log Output

2024-06-06 07:47:42.309 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23151872931536] Arming requires a code but none was given for alarm_control_panel.branchburg_mode

This was working fine in 2024.5 and before.

Screenshots

Screenshot_1

Config File

{
    "mqtt_url": "mqtt://192.168.1.200:1883",
    "mqtt_options": "",
    "livestream_user": "",
    "livestream_pass": "",
    "disarm_code": "",
    "enable_cameras": true,
    "enable_modes": true,
    "enable_panic": false,
    "hass_topic": "homeassistant/status",
    "ring_topic": "ring",
    "location_ids": [
        ""
    ]
}

Install Type

Docker - Unraid

Version

v5.6.4

Operating System

Unraid

Architecture

x86_64

Machine Details

12th Gen Intel® Core™ i7-12700 @ 2079 MHz

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

Of course I will push out a version that addresses this eventually, even if HA doesn’t, but I’m travelling for work this week and just don’t have the time to do it, nor do I have my personal laptop or access to my standard dev/test setup to go through the normal development process until I get back home… I will try to sneak 30 minutes to fix it this weekend and push out a new version, but, realistically, HA broke it in a stupid way, and, IMO, they should fix it. It makes zero sense to enforce a requirement for a code if no code is set.

Also, for automations, all you have to do is modify the automation to include a code (it’s a checkbox in the UI or a single line in YAML), any random number will work since the backend doesn’t care, it’s the frontend that has decided to enforce a code even if one is not set, which it, quite interestingly, doesn’t do for disarming, only for arming, just freaking illogical.

This change is also impacting setups with Ring alarm. I can no longer arm using Home Assistant, although disarming works.

Relevant info: https://developers.home-assistant.io/blog/2024/05/22/alarm_control_panel_validation/

@broyuken Yes, sorry, I knew your weren’t blaming me, but i guess from my perspective there was no expectation that 2024.6.1 would fix it since there were no patches pushed to HA MQTT alarm control panel component. It came across way harsher in that message which I quickly typed on my phone than what I intended! Sorry about that.

Thanks for testing a confirming it works, I’ll get v5.6.5 pushed out sometime tomorrow so at least it will work in the meantime.

Tested with dev on 2024.6.1 and confirm it works with both a lovelace card and an automation!

I’m not blaming you for it not being fixed in 2024.6.1. I just noticed in the changelog that there were some changes to the alarm control panel that may have fixed this issue so you wouldn’t have to do anything.

Turns out this is impacting alarms exposed via other external integrations as well, such as those from HomeKit, so it’s not just an issue with the MQTT alarm integration. They also apparently missed a bunch of other alarm integrations as well (see PR above). Just an incredibly poorly thought out change in general. Oh well, par for the course for HA, although at least it’s only a couple of times a year these days, vs 4-5 years ago when they would break things in nearly every release. I still don’t understand why they don’t value stability more, but oh well.

I’ve pushed an update to the dev branch which should address this, at least, it seems to work for me. If anyone could temporarily test this branch by setting the branch option to “dev” and restarting the addon/container and provide some additional confirmation, I’ll push out a production fix tomorrow. The dev branch currently has no other major changes, other than minor dependency updates, so it should be safe.

I rolled back to 2024.5.5 as 2024.6 was underwhelming feature wise and having my alarm work is more important than being on the latest version.

I totally understand why you’re annoyed with HA by breaking this without any kind of heads up, pretty crappy thing to do. I’ll be on 2024.5.5 until you get around to pushing out a patch. If I could patch it myself I would make a PR, but I’m kind of useless in that department unfortunately.

For anyone else interested in downgrading, log into your HA via SSH and type

ha core upgrade --version 2024.5.5

@Scope666 Just FYI, you have “disarm_code” in the configuration twice (line 6 and 12), that makes the behavior somewhat undefined. It would be better to modify the existing property vs duplicating the property with a second value.

Also note that setting this means that disarming will require a code.

Personally, I’m considering this a Home Assistant issue. For me it makes no sense that Home Assistant enforces a code requirement for the arm service when no code is actually configured and, even more strangely, it seems they don’t require it for a call to disarm even though this also defaults to true.

Yes, it could be fixed in ring-mqtt by explicitly setting code_arm_required = false even when no code is configured, and I will probably do that eventually, but from my perspective HA pushed out a breaking change with no significant notice so, if they don’t care about reliability for their users, well, I don’t either.

Current workaround is to simply modify the automation to include a code, even though one is required, the code can be anything. Alternatively, you can configure a disarm code in ring-mqtt which, quite counterintuitively, will make it so a code is not required for arming.