* Update underlying docker containers and dependencies. * Minor linting and code issues fixes * Update supported devices section * Improve Mqtt message properties - retain, etc. - Retain discovery messages - Don't retain others - Set QoS to 1 consistently to ensure at least once delivery - Set session timeout to ensure a reasonable TTL on messages * Code and logic to remove any retained mqtt messages for SET/STATE/AVAILABILITY * Temporary restructure of init flow for mqtt. - No longer wait for HA birth message - Don't listen to incoming messages until old retained messages have been purged. - More details in https://github.com/icanos/hassio-plejd/issues/218 * Fix lingering incorrect access of connectedDevice.id * Fix to avoid Home Assistant setting retain flag on MQTT SET STATE messages * Parse new TRAIT=15, assuming this means dimmable and tunable white * Clarify TRAITS bitmask values * Add experimental parsing for color temp support from Plejd API * Lint fixes * Remove null coalescing operator since we don't compile code * Handle case where outputSettings is null in PlejdApi * Solve MQTT errors due to deprecated api color_temp and unsupported removal of retained state messages
39 lines
908 B
TypeScript
39 lines
908 B
TypeScript
/* eslint-disable no-use-before-define */
|
|
|
|
import { OutputSettingColorTemperature } from "./ApiSite";
|
|
|
|
export type OutputDevices = { [deviceIdAndOutput: string]: OutputDevice };
|
|
|
|
export interface OutputDevice {
|
|
bleOutputAddress: number;
|
|
colorTemp: boolean;
|
|
colorTempSettings?: OutputSettingColorTemperature
|
|
deviceId: string;
|
|
dim?: number;
|
|
dimmable: boolean;
|
|
name: string;
|
|
output: number;
|
|
roomId: string | undefined;
|
|
roomName: string | undefined;
|
|
state: boolean | undefined;
|
|
type: string;
|
|
typeDescription: string;
|
|
typeName: string;
|
|
version: string;
|
|
uniqueId: string;
|
|
}
|
|
|
|
export type InputDevices = { [deviceIdAndOutput: string]: InputDevice };
|
|
|
|
export interface InputDevice {
|
|
bleInputAddress: number;
|
|
deviceId: string;
|
|
name: string;
|
|
input: number;
|
|
roomId: string;
|
|
type: string;
|
|
typeDescription: string;
|
|
typeName: string;
|
|
version: string;
|
|
uniqueId: string;
|
|
}
|