tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
578 stars 104 forks source link

Bug: <Panic alarm failure> #824

Closed fliswa closed 5 months ago

fliswa commented 5 months ago

Describe the Bug

Anytime I try to activate a panic alarm (fire or police) from HA, it fails. I can activate the panic alarms from the Ring keypads and the Ring app directly, just not from HA. EVERY other function of the alarm works perfectly form anywhere within HA. I can arm/disarm and I can see contact status in real time. Just can not activate any panic alarms.

Steps to Reproduce

Every time I try to turn the panic fire or panic police switch in HA on, either from a dashboard, automation, or even directly from the states screen

Expected Behavior

when the pain alarm is turned on the alarm should activate in the appropriate mode

Log Output

2024-04-22T20:35:39.325Z ring-mqtt [826 Limerick Dr Alarm] Activating fire alarm for 826 Limerick Dr
2024-04-22T20:35:39.328Z ring-mqtt WARNING - Unhandled Promise Rejection
2024-04-22T20:35:39.328Z ring-mqtt Cannot dispatch panic events without an alarm base station
2024-04-22T20:35:39.328Z ring-mqtt Error: Cannot dispatch panic events without an alarm base station
    at Location.triggerAlarm (/app/ring-mqtt/node_modules/ring-client-api/lib/location.js:273:19)
    at Location.triggerFireAlarm (/app/ring-mqtt/node_modules/ring-client-api/lib/location.js:290:21)
    at SecurityPanel.setFireMode (file:///app/ring-mqtt/devices/security-panel.js:377:38)
    at SecurityPanel.processCommand (file:///app/ring-mqtt/devices/security-panel.js:256:26)
    at EventEmitter.<anonymous> (file:///app/ring-mqtt/devices/base-ring-device.js:179:38)
    at EventEmitter.emit (node:events:517:28)
    at MqttClient.<anonymous> (file:///app/ring-mqtt/lib/mqtt.js:134:29)
    at MqttClient.emit (node:events:517:28)
    at handlePublish (/app/ring-mqtt/node_modules/mqtt/build/lib/handlers/publish.js:97:20)
    at handle (/app/ring-mqtt/node_modules/mqtt/build/lib/handlers/index.js:28:35)

Screenshots

No response

Config File

I need help locating these please

Install Type

Home Assistant Addon

Version

5.6.4

Operating System

Home Assistant OS

Architecture

x86_64

Machine Details

Physical x86_64

tsightler commented 5 months ago

Do you have a Ring subscription?

tsightler commented 5 months ago

I have temporarily changed the category of this issue from bug to support because the code in ring-mqtt is working as expected, it is calling the triggerFireAlarm() function and is correctly trapping the returned error. The error itself is coming from ring-client-api, which is the underlying library which ring-mqtt uses. Of course t's still possible there could be a bug in ring-client-api that will need to be fixed, but it's not clear why that would be an issue.

The code in ring-client-api is fairly simple, it retrieves the UUID of the base station, and calls the monitoring endpoint which requires that UUID to trigger the panic. It is my understanding that a monitoring subscription is required for this to work which is why I asked if you have a subscription. A second question would be, are you using a primary owner account or a secondary account?

fliswa commented 5 months ago

Yes I am using a primary account too.

tsightler commented 5 months ago

Since this problem is with ring-client-api, and not with ring-mqtt, it will be quite difficult to troubleshoot this issue. Are you comfortable with the command line in HAOS and can you provide full logs from the addon?