UNPKG

matterbridge-aeg-robot

Version:

A Matterbridge plugin that connects AEG RX 9 / Electrolux Pure i9 robot vacuums to the Matter smart home ecosystem.

37 lines 1.45 kB
// Matterbridge plugin for AEG RX9 / Electrolux Pure i9 robot vacuum // Copyright © 2025 Alexander Thoukydides import { readFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const PACKAGE_JSON = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'); const PACKAGE = JSON.parse(readFileSync(PACKAGE_JSON, 'utf-8')); // Platform identifiers export const ENGINES = PACKAGE.engines; export const PLUGIN_NAME = PACKAGE.name; export const PLATFORM_NAME = PACKAGE.displayName; export const PLUGIN_VERSION = PACKAGE.version; export const PLUGIN_URL = PACKAGE.homepage; // Daily API rate limit, and lower value to use for polling export const API_DAILY_LIMIT = 5000; export const API_DAILY_POLL_LIMIT = API_DAILY_LIMIT * 0.9; // Default configuration options export const DEFAULT_CONFIG = { whiteList: [], blackList: [], pollIntervalSeconds: 30, // 2880 calls/day per robot vacuum cleaner debug: false, debugFeatures: [], unregisterOnShutdown: false }; // Allow API and authorization credentials to be set via environment variables if (process.env.ELECTROLUX_API_KEY) { DEFAULT_CONFIG.apiKey = process.env.ELECTROLUX_API_KEY; } if (process.env.ELECTROLUX_ACCESS_TOKEN_URL) { Object.assign(DEFAULT_CONFIG, { accessTokenURL: process.env.ELECTROLUX_ACCESS_TOKEN_URL, accessToken: '', refreshToken: '' }); } //# sourceMappingURL=settings.js.map