fibaro_get_devices
Retrieve all connected smart home devices from your Fibaro Home Center 3 system to view and manage your home automation setup.
Instructions
Get all devices from Fibaro HC3
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:338-353 (handler)MCP tool handler for 'fibaro_get_devices' that checks connection, fetches devices via FibaroClient, and returns formatted list.case 'fibaro_get_devices': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const devices = await this.fibaroClient.getDevices(); return { content: [ { type: 'text', text: `Found ${devices.length} devices:\n\n${devices .map(d => `ID: ${d.id} - ${d.name} (${d.type}) - Room: ${d.roomID}`) .join('\n')}`, }, ], }; }
- src/index.ts:115-118 (schema)Input schema for fibaro_get_devices tool: empty object (no parameters required).inputSchema: { type: 'object', properties: {}, },
- src/index.ts:112-119 (registration)Registration of the fibaro_get_devices tool in the listTools response.{ name: 'fibaro_get_devices', description: 'Get all devices from Fibaro HC3', inputSchema: { type: 'object', properties: {}, }, },
- src/fibaro-client.ts:69-76 (helper)FibaroClient.getDevices() method that makes API call to /api/devices and returns device list.async getDevices(): Promise<Device[]> { try { const response = await this.client.get('/api/devices'); return response.data; } catch (error) { throw new Error(`Failed to get devices: ${error}`); } }