Actions77
- Accessory Actions
- Authentication Actions
- Backup & Restore Actions
- Config Editor Actions
- Platform Tool Actions
- Plugin Actions
- Server Actions
- Restart Server
- Restart Child Bridge
- Stop Child Bridge
- Start Child Bridge
- Get Pairing Info
- Reset Homebridge Accessory
- Reset Cached Accessories
- Get Cached Accessories
- Delete Cached Accessories
- Delete Cached Accessory
- Get Device Pairings
- Get Device Pairing
- Delete Device Pairing
- Get Unused Port
- Get Network Interfaces
- Get Bridge Network Interfaces
- Set Bridge Network Interfaces
- Setup Wizard Actions
- Status Actions
- User Actions
Overview
This node integrates with the Homebridge API, specifically allowing users to manage and update the configuration of Homebridge plugins. The "Update Plugin Config" operation under the "Config Editor" resource enables updating the configuration blocks of a specified plugin by sending new configuration data to the Homebridge server.
Common scenarios for this node include:
- Automating updates to plugin configurations without manually editing config files.
- Dynamically changing plugin settings based on external triggers or workflows.
- Managing multiple Homebridge plugins programmatically within an automation pipeline.
For example, a user could update the configuration of a lighting control plugin to change brightness presets or schedules dynamically from n8n.
Properties
| Name | Meaning |
|---|---|
| Access Token | Access token obtained from a prior login operation or entered manually if not connected to a Login node. Used for authenticating API requests. |
| Plugin Name | The exact name of the plugin whose configuration is to be updated. |
| Plugin Configuration | A JSON array representing the new configuration blocks for the plugin. This should be a valid JSON structure describing the plugin's config. |
Output
The node outputs JSON data representing the response from the Homebridge API after attempting to update the plugin configuration. This typically includes confirmation of success or details about the updated configuration state.
If the API returns binary data (not indicated in the provided code), it would represent raw plugin configuration files or related artifacts, but this is not evident here.
Dependencies
- Requires connection to a Homebridge server with API access enabled.
- Needs an API authentication token ("Access Token") which can be obtained via a separate login operation or manually provided.
- The node expects the Homebridge server URL to be configured in credentials or environment variables.
- No additional external libraries beyond those bundled with the node are required.
Troubleshooting
- Invalid Access Token: If the access token is missing or expired, the API will reject the request. Ensure the token is current and correctly supplied.
- Malformed Plugin Configuration: The
pluginConfigproperty must be valid JSON. Errors parsing this input will cause failures. Validate JSON syntax before running. - Incorrect Plugin Name: Providing a plugin name that does not exist on the Homebridge server will result in errors. Verify plugin names via the Homebridge UI or API.
- Network Issues: Connectivity problems to the Homebridge server will prevent updates. Check network settings and server availability.
- API Permission Denied: The token used must have sufficient permissions to update plugin configurations.
Links and References
- Homebridge API Documentation (general reference for API endpoints)
- Homebridge GitHub Repository (for plugin and config details)
- n8n Documentation on Creating Custom Nodes