n8n-nodes-homebridge
Version:
n8n node for Homebridge API integration - control your HomeKit accessories and manage Homebridge server through n8n workflows
59 lines • 1.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HomebridgeApi = void 0;
class HomebridgeApi {
constructor() {
this.name = 'homebridgeApi';
this.displayName = 'Homebridge API';
this.documentationUrl = 'https://github.com/homebridge/homebridge-config-ui-x/wiki/API-Reference';
this.properties = [
{
displayName: 'Server URL',
name: 'serverUrl',
type: 'string',
default: '',
placeholder: 'http://your-homebridge-server:8581',
description: 'The URL of your Homebridge server (including port)',
},
{
displayName: 'Username',
name: 'username',
type: 'string',
default: '',
required: true,
description: 'Your Homebridge username',
},
{
displayName: 'Password',
name: 'password',
type: 'string',
typeOptions: {
password: true,
},
default: '',
required: true,
description: 'Your Homebridge password',
},
{
displayName: 'Two-Factor Authentication Code',
name: 'otp',
type: 'string',
default: '',
description: 'Optional: 2FA code if enabled on your account',
},
];
this.authenticate = {
type: 'generic',
properties: {},
};
this.test = {
request: {
baseURL: '={{$credentials?.serverUrl}}',
url: '/api/auth/settings',
method: 'GET',
},
};
}
}
exports.HomebridgeApi = HomebridgeApi;
//# sourceMappingURL=HomebridgeApi.credentials.js.map