Skip to main content
Glama
appleton
by appleton

robovac_auto_initialize

Automatically discover and initialize the first RoboVac device found using your Eufy account credentials to enable vacuum control.

Instructions

Automatically discover and initialize the first RoboVac device found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesYour Eufy account email address
passwordYesYour Eufy account password
deviceIndexNoIndex of device to connect to (0 for first device)

Implementation Reference

  • Handler for the robovac_auto_initialize tool. Discovers RoboVac devices using NetworkDiscovery, selects by deviceIndex, attempts connection with discovered credentials and IP, falls back to local IP discovery if cloud init fails, returns formatted success or error response.
    case "robovac_auto_initialize": try { const devices = await this.networkDiscovery.discoverDevices(); if (devices.length === 0) { return { content: [ { type: "text", text: "No RoboVac devices found.", }, ], isError: true, }; } const deviceIndex = (args?.deviceIndex as number) || 0; if (deviceIndex >= devices.length) { return { content: [ { type: "text", text: `Device index ${deviceIndex} is out of range. Found ${devices.length} device(s).`, }, ], isError: true, }; } const selectedDevice = devices[deviceIndex]; let autoInitSuccess = await this.initializeRoboVac( selectedDevice.deviceId, selectedDevice.localKey, selectedDevice.ip ); // If direct connection fails, try auto-discovery if (!autoInitSuccess) { console.error( "[DEBUG] Cloud connection failed, trying auto-discovery..." ); const discoveredIP = await this.discoverBestRoboVacIP(); if (discoveredIP) { autoInitSuccess = await this.initializeRoboVac( selectedDevice.deviceId, selectedDevice.localKey, discoveredIP ); } } return { content: [ { type: "text", text: autoInitSuccess ? `Successfully connected to ${selectedDevice.name}!` : `Failed to connect to ${selectedDevice.name}. Check network connection and ensure the device is online.`, }, ], isError: !autoInitSuccess, }; } catch (error) { return { content: [ { type: "text", text: `Auto-initialization failed: ${ (error as Error).message } ⚠️ The Eufy API appears to have changed since this implementation was created. As an alternative, you can: 1. Use the Eufy app to find your device IP address 2. Use a network scanner to find devices on your network 3. Check your router's device list 4. Use tools like eufy-security-client or other community projects Once you have the device credentials, you can use the eufy-robovac library directly.`, }, ], isError: true, }; }
  • Input schema for robovac_auto_initialize: requires Eufy email and password for cloud discovery, optional deviceIndex (default 0). Defines the tool's parameters and validation.
    name: "robovac_auto_initialize", description: "Automatically discover and initialize the first RoboVac device found", inputSchema: { type: "object", properties: { email: { type: "string", description: "Your Eufy account email address", }, password: { type: "string", description: "Your Eufy account password", }, deviceIndex: { type: "number", description: "Index of device to connect to (0 for first device)", default: 0, }, }, required: ["email", "password"], },
  • src/server.ts:272-296 (registration)
    Registration of the robovac_auto_initialize tool in the static list of tools provided by the ListToolsRequestHandler.
    { name: "robovac_auto_initialize", description: "Automatically discover and initialize the first RoboVac device found", inputSchema: { type: "object", properties: { email: { type: "string", description: "Your Eufy account email address", }, password: { type: "string", description: "Your Eufy account password", }, deviceIndex: { type: "number", description: "Index of device to connect to (0 for first device)", default: 0, }, }, required: ["email", "password"], }, },
  • Helper method called by the handler to create and connect the RoboVac instance using provided credentials and IP.
    private async initializeRoboVac( deviceId: string, localKey: string, ip?: string ): Promise<boolean> { try { this.robovac = new RoboVac({ deviceId: deviceId, localKey: localKey, ip: ip || "192.168.1.100", }); await this.robovac.connect(); return true; } catch (error) { console.error("Failed to initialize RoboVac:", error); return false; }

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/appleton/sam'

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