UNPKG

homebridge-http-sensors-switches

Version:

This plugin communicates with your devices over HTTP or MQTT. Currently it supports Light Bulb, Switches, Outlets, Fan, Garage Door, Shades / Blinds, Temperature/Humidity, Motion, Contact and Occupancy sensor, Door, Sprinkler, Valve, Air Quality, Smoke, C

52 lines (51 loc) 1.71 kB
import { PlatformAccessory, Service } from 'homebridge'; import type { HttpSensorsAndSwitchesHomebridgePlatform } from './platform.js'; import mqtt from 'mqtt'; /** * Platform Accessory * An instance of this class is created for each accessory your platform registers * Each accessory may expose multiple services of different service types. */ export declare class platformSensors { readonly platform: HttpSensorsAndSwitchesHomebridgePlatform; readonly accessory: PlatformAccessory; temperatureService: Service; humidityService: Service; mqttClient: mqtt.MqttClient; private sharedPollingInstance?; private isReachable; enableLogging: boolean; ignoreHttpsCertErrors: boolean; trustedCert?: string; sharedPolling: boolean; sharedPollingId: string; sharedPollingInterval: number; deviceId: string; deviceType: string; deviceName: string; deviceManufacturer: string; deviceModel: string; deviceSerialNumber: string; deviceFirmwareVersion: string; sensorUrl: string; temperatureName: string; humidityName: string; airPressureName: string; mqttReconnectInterval: string; mqttBroker: string; mqttPort: string; mqttTemperature: string; mqttHumidity: string; mqttUsername: string; mqttPassword: string; currentTemperature: number; currentHumidity: number; updateInterval: number; private httpsAgentManager; constructor(platform: HttpSensorsAndSwitchesHomebridgePlatform, accessory: PlatformAccessory); private wrapGetHandler; private updateSensorStatusFromSharedData; private getSensorData; private processGetSensorStatus; private getSensorDataMQTT; }