Skip to content

Update to prevent plugin crash on startup due to empty accessories#223

Open
RdyPlayer1 wants to merge 2 commits into
benzman81:masterfrom
RdyPlayer1:master
Open

Update to prevent plugin crash on startup due to empty accessories#223
RdyPlayer1 wants to merge 2 commits into
benzman81:masterfrom
RdyPlayer1:master

Conversation

@RdyPlayer1

Copy link
Copy Markdown

If you open the plugin config and don't expand every accessory to click the X to delete it, it creates an empty accessory that causes a crash loop on startup.

I've set all defaults on all accessories to empty and created a filter in the platform to prevent the accessories from being created, though they may still show in the config.json. This prevents the plugin from crashing on start and still shows all configured accessories correctly. I suspect that the phamtom accessory creations is in the way homebridge UI handles boolean entries.

I've also set all name fields to required so that you can't create an accessory without a name and put yourself into a restart loop.

Set all accessory names to required:true to prevent errors where unnamed accessories cause the plugin to fail to load.

Also set default : [] to help prevent creating empty accessories
Created a filter to prevent empty accessory creating from crashing the plugin on startup. Empty accessories may still be created, but they are ignored and the app starts successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant