fibaro_get_scenes
Retrieve all configured scenes from your Fibaro Home Center 3 smart home system to manage automation routines and device interactions.
Instructions
Get all scenes from Fibaro HC3
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:370-385 (handler)MCP server handler for fibaro_get_scenes tool: checks connection, calls fibaroClient.getScenes(), formats and returns the list of scenes.case 'fibaro_get_scenes': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const scenes = await this.fibaroClient.getScenes(); return { content: [ { type: 'text', text: `Found ${scenes.length} scenes:\n\n${scenes .map(s => `ID: ${s.id} - ${s.name} - Room: ${s.roomID}`) .join('\n')}`, }, ], }; }
- src/index.ts:135-141 (registration)Registration of the fibaro_get_scenes tool in the ListTools response, including name, description, and input schema (no parameters required).name: 'fibaro_get_scenes', description: 'Get all scenes from Fibaro HC3', inputSchema: { type: 'object', properties: {}, }, },
- src/fibaro-client.ts:22-28 (schema)TypeScript interface defining the structure of Scene objects used in fibaro_get_scenes.export interface Scene { id: number; name: string; roomID: number; enabled: boolean; visible: boolean; isLua: boolean;
- src/fibaro-client.ts:87-94 (helper)FibaroClient.getScenes() method: performs HTTP GET to /api/scenes endpoint and returns the scenes data.async getScenes(): Promise<Scene[]> { try { const response = await this.client.get('/api/scenes'); return response.data; } catch (error) { throw new Error(`Failed to get scenes: ${error}`); } }