fibaro_get_scene
Retrieve a specific scene by its ID from Fibaro Home Center 3 to manage smart home automation sequences.
Instructions
Get specific scene by ID from Fibaro HC3
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Scene ID |
Implementation Reference
- src/index.ts:387-400 (handler)MCP server handler for the fibaro_get_scene tool. Checks Fibaro connection, retrieves the specific scene using FibaroClient.getScene, formats and returns the scene details as text content.case 'fibaro_get_scene': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const scene = await this.fibaroClient.getScene(args?.id as number); return { content: [ { type: 'text', text: `Scene ${scene.id}:\nName: ${scene.name}\nRoom ID: ${scene.roomID}\nEnabled: ${scene.enabled}\nVisible: ${scene.visible}\nIs Lua: ${scene.isLua}`, }, ], }; }
- src/index.ts:142-155 (registration)Registration of the fibaro_get_scene tool in the ListTools response, including name, description, and input schema requiring a scene ID.{ name: 'fibaro_get_scene', description: 'Get specific scene by ID from Fibaro HC3', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Scene ID', }, }, required: ['id'], }, },
- src/fibaro-client.ts:22-29 (schema)TypeScript interface defining the structure of a Scene object, used as the return type for getScene.export interface Scene { id: number; name: string; roomID: number; enabled: boolean; visible: boolean; isLua: boolean; }
- src/fibaro-client.ts:96-103 (helper)FibaroClient helper method that makes an HTTP GET request to the Fibaro API endpoint /api/scenes/{id} to fetch the specific scene data.async getScene(id: number): Promise<Scene> { try { const response = await this.client.get(`/api/scenes/${id}`); return response.data; } catch (error) { throw new Error(`Failed to get scene ${id}: ${error}`); } }