Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability for addins to be located outside of the NPM package. That makes the addins more versatile and custom behaviour is easier to realise.
These are the main changes of this PR:
1) Load addins from the
knx_addins
folder in the homebridge config folderWhen an accessory loads a Handler the
customServiceApi
first looks into the local addins folder. If an appropriate Handler-file is found there, that is being loaded. If not, it looks in theknx_addins
folder in the homebridge config folder.2) Provide a localised require named
knxRequire
In order for external modules to be treated as internally, for loading modules etc., we had to wrap a require function and register that globally.
The only notable change for external addins from the current paradigma would be the name of the require function for handlerpattern and debug.
fixes #160