Skip to main content
Glama

fibaro_turn_on_device

Activate a specific device (e.g., lights, switches) connected to Fibaro Home Center 3 by providing its unique device ID for immediate control.

Instructions

Turn on a device (like lights, switches)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDevice ID to turn on

Implementation Reference

  • MCP tool handler for 'fibaro_turn_on_device': validates connection, extracts device ID from arguments, calls FibaroClient.turnOnDevice, and returns success message.
    case 'fibaro_turn_on_device': { if (!this.fibaroClient) { throw new Error('Not connected to Fibaro HC3. Please check your configuration and restart the MCP server.'); } const deviceId = args?.id as number; await this.fibaroClient.turnOnDevice(deviceId); return { content: [ { type: 'text', text: `Successfully turned on device ${deviceId}`, }, ], }; }
  • src/index.ts:165-177 (registration)
    Tool registration in ListTools response, including name, description, and input schema specifying required 'id' parameter.
    name: 'fibaro_turn_on_device', description: 'Turn on a device (like lights, switches)', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'Device ID to turn on', }, }, required: ['id'], }, },
  • FibaroClient helper method that performs the actual HTTP POST request to turn on the device via Fibaro HC3 API.
    async turnOnDevice(id: number): Promise<void> { try { await this.client.post(`/api/devices/${id}/action/turnOn`, { args: [] }); } catch (error) { throw new Error(`Failed to turn on device ${id}: ${error}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kaeljune/fibaro-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server