MiguelRipoll23 / homebridge-securitysystem

Homebridge plugin that creates a security system accessory that can be triggered by HomeKit sensors.
https://www.npmjs.com/package/homebridge-securitysystem
MIT License
151 stars 13 forks source link

Trip / Siren Mode Switches *Bug* #583

Closed ohhmyjawwsh closed 1 month ago

ohhmyjawwsh commented 1 month ago

Plugin version

8.3.0

Plugin configuration

{ "name": "Security System", "serial_number": "S3CUR1TYSYST3M", "default_mode": "Home", "arm_seconds": 0, "trigger_seconds": 0, "reset_minutes": 1, "save_state": true, "proxy_mode": false, "test_mode": false, "trip_switch_name": "Siren", "trip_override_switch_name": "Panic", "mode_home_switch_name": "Mode Home", "mode_away_switch_name": "Mode Away", "mode_night_switch_name": "Mode Night", "mode_off_switch_name": "Mode Off", "mode_away_extended_switch_name": "Mode Away Extended", "mode_pause_switch_name": "Mode Pause", "audio_switch_name": "Audio", "override_off": true, "reset_off_flow": true, "double_knock": false, "double_knock_seconds": 90, "arming_sensor": false, "tripped_sensor": false, "tripped_sensor_seconds": 5, "triggered_sensor": false, "triggered_sensor_seconds": 5, "reset_sensor": false, "mode_switches": true, "mode_off_switch": true, "mode_away_extended_switch": false, "mode_pause_switch": false, "pause_minutes": 0, "arming_lock_switch": false, "arming_lock_switches": false, "trip_switch": true, "trip_override_switch": false, "trip_mode_switches": false, "siren_mode_switches": false, "audio_switch": false, "audio": false, "audio_language": "en-US", "audio_volume": "100", "audio_arming_looped": false, "audio_alert_looped": false, "_bridge": { "name": "Security System", "username": "0E:82:89:ED:69:C9", "port": 51895 }, "accessory": "security-system" }, { "name": "Storage Unit Security System", "serial_number": "S3CUR1TYSYST3M2", "default_mode": "Away", "arm_seconds": 0, "trigger_seconds": 0, "reset_minutes": 10, "save_state": true, "proxy_mode": false, "test_mode": false, "trip_switch_name": "Siren", "trip_override_switch_name": "Panic", "mode_home_switch_name": "Mode Home", "mode_away_switch_name": "Mode Away", "mode_night_switch_name": "Mode Night", "mode_off_switch_name": "Mode Off", "mode_away_extended_switch_name": "Mode Away Extended", "mode_pause_switch_name": "Mode Pause", "audio_switch_name": "Audio", "override_off": true, "reset_off_flow": true, "double_knock": false, "double_knock_seconds": 90, "disabled_modes": [ "Night" ], "arming_sensor": false, "tripped_sensor": false, "tripped_sensor_seconds": 5, "triggered_sensor": false, "triggered_sensor_seconds": 5, "reset_sensor": false, "mode_switches": true, "mode_off_switch": true, "mode_away_extended_switch": false, "mode_pause_switch": false, "pause_minutes": 0, "arming_lock_switch": false, "arming_lock_switches": false, "trip_switch": true, "trip_override_switch": false, "trip_mode_switches": false, "siren_mode_switches": false, "audio_switch": false, "audio": false, "audio_language": "en-US", "audio_volume": "100", "audio_arming_looped": false, "audio_alert_looped": false, "_bridge": { "username": "0E:42:BC:C2:E8:14", "port": 34090 }, "accessory": "security-system" }

Homebridge version

1.8.4

What happened?

When “Show Trip Mode Switches” is not check marked, the trip mode switches still appear in HomeKit. This was apparent for both iterations of security systems I have setup within the plugin. This also only became an issue after the latest update.

After reading through some old issues that were closed already, I came across one where you talked about the JSON field names being fixed in the next (latest) version. Unfortunately, while they may have been changed, it did not fix application of this option being checked or unchecked, because

"trip_mode_switches": false

does not make any impact on what’s exposed in HomeKit. All switches were still exposed.

The workaround I found - as seen in my configuration provided above - is to add

"siren_mode_switches": false

back into the JSON config below the boolean being set for trip mode switches. For now, this was an easy fix & successfully removed the switches I did not need or want. However, it looks like this will need to be addressed in the source code on the next release if possible since it appears to be a bug within the changes made. I hope this help you & anyone else you may read this before a fix is implemented.

Thank you for your amazing plugin! I could not imagine my HomeKit setup without it! 🙌🏼

Relevant log output

No response

ohhmyjawwsh commented 1 month ago

Update: Even with my workaround still in place, the switches remain visible inside third party apps such as Controller for HomeKit, even though they remain hidden within the Home app. (Multiple child bridge & Homebridge reboots have been performed but no correction seen. When saving changes in the plugin's configuration UI, it removes my workaround so I have to add it back within the JSON editor.)

Additionally, the Siren switch still appears even when I have it selected not to be shown in the configuration, & neither the siren or the panic switch can be used as start events within Controller; it returns "Invalid Parameter", but this was never an issue before. (The panic siren you see in the screenshot inside the automation is a separate outlet siren unrelated to the plugin.) Unsure of suggestions to help with this one but wanted to let you know since it is likely all connected. image image

MiguelRipoll23 commented 1 month ago

Sorry about that, I'll will take a look to see what's going on and report back soon. Thanks for reporting the issue.

ohhmyjawwsh commented 1 month ago

No problem! These things happen lol. Hope all of this helps you narrow it down a little easier. Thank you again!

MiguelRipoll23 commented 1 month ago

Bug has been fixed in the beta channel, will be available to the general public soon. Thanks!

ohhmyjawwsh commented 1 month ago

Excellent, thank you so much! You rock. 🤘🏼

MiguelRipoll23 commented 1 month ago

Fix is now in the stable channel, thanks for reporting.