From 69f9002e316bdb3d1489d1434d5e53d0f9efaf84 Mon Sep 17 00:00:00 2001 From: Koen Kanters Date: Tue, 22 Apr 2025 21:23:40 +0200 Subject: [PATCH] fix: Add interview state (#27163) --- biome.json | 6 +- lib/extension/availability.ts | 2 +- lib/extension/bridge.ts | 7 +- lib/extension/configure.ts | 2 +- lib/extension/homeassistant.ts | 2 +- lib/extension/receive.ts | 2 +- lib/model/device.ts | 6 +- lib/types/api.ts | 5 +- lib/types/types.d.ts | 2 +- test/extensions/bridge.test.ts | 12 ++- test/extensions/configure.test.ts | 6 +- test/mocks/zigbeeHerdsman.ts | 155 +++++++++++++----------------- 12 files changed, 101 insertions(+), 106 deletions(-) diff --git a/biome.json b/biome.json index 63debbf91..302c5317a 100644 --- a/biome.json +++ b/biome.json @@ -18,11 +18,7 @@ "ignore": [], "rules": { "correctness": { - "noUnusedImports": "error", - "noUnusedVariables": { - "level": "warn", - "fix": "none" - } + "noUnusedImports": "error" }, "style": { "noParameterAssign": "off", diff --git a/lib/extension/availability.ts b/lib/extension/availability.ts index 6ae9bb524..eabf22e09 100644 --- a/lib/extension/availability.ts +++ b/lib/extension/availability.ts @@ -301,7 +301,7 @@ export default class Availability extends Extension { * Retrieve state of a device in a debounced manner, this function is called on a 'deviceAnnounce' which a * device can send multiple times after each other. */ - if (device.definition && !device.zh.interviewing && !this.retrieveStateDebouncers.get(device.ieeeAddr)) { + if (device.definition && device.interviewed && !this.retrieveStateDebouncers.get(device.ieeeAddr)) { this.retrieveStateDebouncers.set( device.ieeeAddr, debounce(async () => { diff --git a/lib/extension/bridge.ts b/lib/extension/bridge.ts index 6686a170d..a29e9467e 100644 --- a/lib/extension/bridge.ts +++ b/lib/extension/bridge.ts @@ -13,6 +13,7 @@ import Transport from "winston-transport"; import {Zcl} from "zigbee-herdsman"; import * as zhc from "zigbee-herdsman-converters"; +import {InterviewState} from "zigbee-herdsman/dist/controller/model/device"; import Device from "../model/device"; import data from "../util/data"; @@ -764,8 +765,10 @@ export default class Bridge extends Extension { software_build_id: device.zh.softwareBuildID, date_code: device.zh.dateCode, model_id: device.zh.modelID, - interviewing: device.zh.interviewing, - interview_completed: device.zh.interviewCompleted, + /** @deprecated interviewing and interview_completed are superceded by interview_state */ + interviewing: device.zh.interviewState === InterviewState.InProgress, + interview_completed: device.zh.interviewState === InterviewState.Successful, + interview_state: device.zh.interviewState, manufacturer: device.zh.manufacturerName, endpoints, }); diff --git a/lib/extension/configure.ts b/lib/extension/configure.ts index 68eb92b47..3b9635d41 100644 --- a/lib/extension/configure.ts +++ b/lib/extension/configure.ts @@ -95,7 +95,7 @@ export default class Configure extends Extension { } if (!force) { - if (device.options.disabled || !device.zh.interviewCompleted) { + if (device.options.disabled || !device.interviewed) { return; } diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 0b42c2c2b..f424db244 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -1466,7 +1466,7 @@ export class HomeAssistant extends Extension { if ( isDevice && - (!entity.definition || entity.zh.interviewing || (entity.options.homeassistant !== undefined && !entity.options.homeassistant)) + (!entity.definition || !entity.interviewed || (entity.options.homeassistant !== undefined && !entity.options.homeassistant)) ) { return; } diff --git a/lib/extension/receive.ts b/lib/extension/receive.ts index f95540624..f08f430b3 100755 --- a/lib/extension/receive.ts +++ b/lib/extension/receive.ts @@ -106,7 +106,7 @@ export default class Receive extends Extension { /* v8 ignore next */ if (!data.device) return; - if (!data.device.definition || data.device.zh.interviewing) { + if (!data.device.definition || !data.device.interviewed) { logger.debug("Skipping message, still interviewing"); await utils.publishLastSeen({device: data.device, reason: "messageEmitted"}, settings.get(), true, this.publishEntityState); return; diff --git a/lib/model/device.ts b/lib/model/device.ts index f23245ce5..0a8806810 100644 --- a/lib/model/device.ts +++ b/lib/model/device.ts @@ -4,6 +4,7 @@ import assert from "node:assert"; import * as zhc from "zigbee-herdsman-converters"; import {Numeric, access} from "zigbee-herdsman-converters"; +import {InterviewState} from "zigbee-herdsman/dist/controller/model/device"; import * as settings from "../util/settings"; @@ -42,6 +43,9 @@ export default class Device { get otaExtraMetas(): zhc.Ota.ExtraMetas { return typeof this.definition?.ota === "object" ? this.definition.ota : {}; } + get interviewed(): boolean { + return this.zh.interviewState === InterviewState.Successful || this.zh.interviewState === InterviewState.Failed; + } constructor(device: zh.Device) { this.zh = device; @@ -61,7 +65,7 @@ export default class Device { } async resolveDefinition(ignoreCache = false): Promise { - if (!this.zh.interviewing && (!this.definition || this._definitionModelID !== this.zh.modelID || ignoreCache)) { + if (this.interviewed && (!this.definition || this._definitionModelID !== this.zh.modelID || ignoreCache)) { this.definition = await zhc.findByDevice(this.zh, true); this._definitionModelID = this.zh.modelID; } diff --git a/lib/types/api.ts b/lib/types/api.ts index 53274799d..04e18d492 100644 --- a/lib/types/api.ts +++ b/lib/types/api.ts @@ -58,8 +58,9 @@ export interface Zigbee2MQTTDevice { software_build_id: zh.Device["softwareBuildID"]; date_code: zh.Device["dateCode"]; model_id: zh.Device["modelID"]; - interviewing: zh.Device["interviewing"]; - interview_completed: zh.Device["interviewCompleted"]; + interviewing: boolean; + interview_completed: boolean; + interview_state: zh.Device["interviewState"]; manufacturer: zh.Device["manufacturerName"]; endpoints: Record; } diff --git a/lib/types/types.d.ts b/lib/types/types.d.ts index 23ddbe0ea..5e29ea8e9 100644 --- a/lib/types/types.d.ts +++ b/lib/types/types.d.ts @@ -35,7 +35,7 @@ declare global { type Device = ZHModels.Device; type Group = ZHModels.Group; // biome-ignore lint/style/useNamingConvention: API - type LQI = ZHAdapterTypes.LQI; + type LQI = ZHAdapterTypes.Lqi; type RoutingTable = ZHAdapterTypes.RoutingTable; type CoordinatorVersion = ZHAdapterTypes.CoordinatorVersion; type NetworkParameters = ZHAdapterTypes.NetworkParameters; diff --git a/test/extensions/bridge.test.ts b/test/extensions/bridge.test.ts index a4309c7cb..a3983de3f 100644 --- a/test/extensions/bridge.test.ts +++ b/test/extensions/bridge.test.ts @@ -330,7 +330,8 @@ describe("Extension: Bridge", () => { endpoints: {"1": {bindings: [], clusters: {input: [], output: []}, configured_reportings: [], scenes: []}}, friendly_name: "Coordinator", ieee_address: "0x00124b00120144ae", - interview_completed: false, + interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, network_address: 0, supported: true, @@ -584,6 +585,7 @@ describe("Extension: Bridge", () => { friendly_name: "bulb", ieee_address: "0x000b57fffec6a5b2", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "TRADFRI bulb E27 WS opal 980lm", network_address: 40369, @@ -777,6 +779,7 @@ describe("Extension: Bridge", () => { friendly_name: "bulb_color_2", ieee_address: "0x000b57fffec6a5b4", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, manufacturer: "Philips", model_id: "LLC020", @@ -907,6 +910,7 @@ describe("Extension: Bridge", () => { friendly_name: "remote", ieee_address: "0x0017880104e45517", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "RWL021", network_address: 6535, @@ -999,6 +1003,7 @@ describe("Extension: Bridge", () => { friendly_name: "0x0017880104e45518", ieee_address: "0x0017880104e45518", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, manufacturer: "notSupportedMfg", model_id: "notSupportedModelID", @@ -1109,6 +1114,7 @@ describe("Extension: Bridge", () => { friendly_name: "button", ieee_address: "0x0017880104e45520", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "lumi.sensor_switch.aq2", network_address: 6537, @@ -1250,6 +1256,7 @@ describe("Extension: Bridge", () => { friendly_name: "weather_sensor", ieee_address: "0x0017880104e45522", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "lumi.weather", network_address: 6539, @@ -1396,6 +1403,7 @@ describe("Extension: Bridge", () => { friendly_name: "power_plug", ieee_address: "0x0017880104e45524", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "lumi.plug", network_address: 6540, @@ -1895,6 +1903,7 @@ describe("Extension: Bridge", () => { friendly_name: "zigfred_plus", ieee_address: "0xf4ce368a38be56a1", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, manufacturer: "Siglis", model_id: "zigfred plus", @@ -2142,6 +2151,7 @@ describe("Extension: Bridge", () => { friendly_name: "0x000b57fffec6a5c2", ieee_address: "0x000b57fffec6a5c2", interview_completed: true, + interview_state: "SUCCESSFUL", interviewing: false, model_id: "TRADFRI bulb E27 WS opal 980lm", network_address: 40369, diff --git a/test/extensions/configure.test.ts b/test/extensions/configure.test.ts index 2e34986a2..34ca99860 100644 --- a/test/extensions/configure.test.ts +++ b/test/extensions/configure.test.ts @@ -6,6 +6,8 @@ import {type Device, type Endpoint, devices, events as mockZHEvents} from "../mo import stringify from "json-stable-stringify-without-jsonify"; +import {InterviewState} from "zigbee-herdsman/dist/controller/model/device"; + import {Controller} from "../../lib/controller"; import Configure from "../../lib/extension/configure"; import * as settings from "../../lib/util/settings"; @@ -204,12 +206,12 @@ describe("Extension: Configure", () => { it("Should not configure when interview not completed", async () => { const device = devices.remote; delete device.meta.configured; - device.interviewCompleted = false; + device.interviewState = InterviewState.Pending; mockClear(device); await mockZHEvents.lastSeenChanged({device}); await flushPromises(); expectRemoteNotConfigured(); - device.interviewCompleted = true; + device.interviewState = InterviewState.Successful; }); it("Should not configure when already configuring", async () => { diff --git a/test/mocks/zigbeeHerdsman.ts b/test/mocks/zigbeeHerdsman.ts index f24449873..524d9174c 100644 --- a/test/mocks/zigbeeHerdsman.ts +++ b/test/mocks/zigbeeHerdsman.ts @@ -4,6 +4,7 @@ import type {AdapterTypes} from "zigbee-herdsman"; import assert from "node:assert"; import {Zcl} from "zigbee-herdsman"; +import {InterviewState} from "zigbee-herdsman/dist/controller/model/device"; import type {EventHandler} from "./utils"; @@ -233,10 +234,9 @@ export class Device { endpoints: Endpoint[]; powerSource: string | undefined; softwareBuildID: string | undefined; - interviewCompleted: boolean; + interviewState: InterviewState; modelID: string | undefined; interview: Mock; - interviewing: boolean; meta: Record; ping: Mock<(disableRecovery?: boolean) => Promise>; removeFromNetwork: Mock; @@ -257,10 +257,9 @@ export class Device { networkAddress: number, manufacturerID: number, endpoints: Endpoint[], - interviewCompleted: boolean, + interviewState: InterviewState, powerSource: string | undefined = undefined, modelID: string | undefined = undefined, - interviewing = false, manufacturerName: string | undefined = undefined, dateCode: string | undefined = undefined, softwareBuildID: string | undefined = undefined, @@ -274,10 +273,9 @@ export class Device { this.endpoints = endpoints; this.powerSource = powerSource; this.softwareBuildID = softwareBuildID; - this.interviewCompleted = interviewCompleted; + this.interviewState = interviewState; this.modelID = modelID; this.interview = vi.fn(); - this.interviewing = interviewing; this.meta = {}; this.ping = vi.fn(); this.removeFromNetwork = vi.fn(); @@ -348,7 +346,7 @@ const bulb_color = new Device( lightingColorCtrl: {colorCapabilities: 254}, }), ], - true, + InterviewState.Successful, "Mains (single phase)", "LLC020", ); @@ -371,10 +369,9 @@ const bulb_color_2 = new Device( {scenes: {"1_0": {name: "Chill scene", state: {state: "ON"}}, "4_9": {state: {state: "OFF"}}}}, ), ], - true, + InterviewState.Successful, "Mains (single phase)", "LLC020", - false, "Philips", "2019.09", "5.127.1.26581", @@ -385,7 +382,7 @@ const bulb_2 = new Device( 40369, 4476, [new Endpoint(1, [0, 3, 4, 5, 6, 8, 768, 2821, 4096], [5, 25, 32, 4096], "0x000b57fffec6a5b7", [], {lightingColorCtrl: {colorCapabilities: 17}})], - true, + InterviewState.Successful, "Mains (single phase)", "TRADFRI bulb E27 WS opal 980lm", ); @@ -405,7 +402,7 @@ const hue_twilight = new Device( lightingColorCtrl: {colorCapabilities: 254}, }), ], - true, + InterviewState.Successful, "Mains (single phase)", "LGT003", ); @@ -415,7 +412,7 @@ const TS0601_thermostat = new Device( 6544, 4151, [new Endpoint(1, [], [], "0x0017882104a44559")], - true, + InterviewState.Successful, "Mains (single phase)", "kud7u2l", ); @@ -425,7 +422,7 @@ const TS0601_switch = new Device( 6544, 4151, [new Endpoint(1, [], [], "0x0017882104a44560")], - true, + InterviewState.Successful, "Mains (single phase)", "kjintbl", ); @@ -435,10 +432,9 @@ const TS0601_cover_switch = new Device( 6544, 4151, [new Endpoint(1, [], [], "0x0017882104a44562")], - true, + InterviewState.Successful, "Mains (single phase)", "TS0601", - false, "_TZE200_5nldle7w", ); const ZNCZ02LM = new Device( @@ -447,7 +443,7 @@ const ZNCZ02LM = new Device( 6540, 4151, [new Endpoint(1, [0, 6], [], "0x0017880104e45524")], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.plug", ); @@ -462,10 +458,9 @@ const GLEDOPTO_2ID = new Device( new Endpoint(13, [4096], [4096], "0x0017880104e45724", [], {}, [], 49246, 57694), new Endpoint(15, [0, 3, 4, 5, 6, 8, 768], [], "0x0017880104e45724", [], {}, [], 49246, 256), ], - true, + InterviewState.Successful, "Mains (single phase)", "GL-C-007", - false, "GLEDOPTO", ); const QBKG03LM = new Device( @@ -478,7 +473,7 @@ const QBKG03LM = new Device( new Endpoint(2, [0, 6], [], "0x0017880104e45542"), new Endpoint(3, [0, 6], [], "0x0017880104e45542"), ], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.ctrl_neutral2", ); @@ -496,10 +491,9 @@ const zigfred_plus = new Device( new Endpoint(11, [0, 3, 4, 5, 0x0102], [], "0xf4ce368a38be56a1"), new Endpoint(12, [0, 3, 4, 5, 0x0102], [], "0xf4ce368a38be56a1"), ], - true, + InterviewState.Successful, "Mains (single phase)", "zigfred plus", - false, "Siglis", ); @@ -526,7 +520,7 @@ export function resetGroupMembers(): void { } export const devices = { - coordinator: new Device("Coordinator", "0x00124b00120144ae", 0, 0, [new Endpoint(1, [], [], "0x00124b00120144ae")], false), + coordinator: new Device("Coordinator", "0x00124b00120144ae", 0, 0, [new Endpoint(1, [], [], "0x00124b00120144ae")], InterviewState.Successful), bulb: new Device( "Router", "0x000b57fffec6a5b2", @@ -551,7 +545,7 @@ export const devices = { ], ), ], - true, + InterviewState.Successful, "Mains (single phase)", "TRADFRI bulb E27 WS opal 980lm", ), @@ -561,10 +555,9 @@ export const devices = { 35902, 4617, // 0x1209, [new Endpoint(1, [0, 1, 3, 4, 32, 513, 516, 2821], [10, 25], "0x18fc2600000d7ae2")], - true, + InterviewState.Successful, "Battery", "RBSH-TRV0-ZB-EU", - false, "BOSCH", "20231122", "3.05.09", @@ -589,7 +582,7 @@ export const devices = { ]), new Endpoint(2, [0, 1, 3, 15, 64512], [25, 6], "0x0017880104e45517"), ], - true, + InterviewState.Successful, "Battery", "RWL021", ), @@ -599,10 +592,9 @@ export const devices = { 6536, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45518")], - true, + InterviewState.Successful, "Battery", "notSupportedModelID", - false, "notSupportedMfg", ), unsupported2: new Device( @@ -611,7 +603,7 @@ export const devices = { 6536, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45529")], - true, + InterviewState.Successful, "Battery", "notSupportedModelID", ), @@ -621,10 +613,9 @@ export const devices = { 6536, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45530")], - true, + InterviewState.InProgress, "Battery", undefined, - true, ), notInSettings: new Device( "EndDevice", @@ -632,7 +623,7 @@ export const devices = { 6537, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45519")], - true, + InterviewState.Successful, "Battery", "lumi.sensor_switch.aq2", ), @@ -652,7 +643,7 @@ export const devices = { }, ]), ], - true, + InterviewState.Successful, "Battery", "lumi.sensor_switch.aq2", ), @@ -662,7 +653,7 @@ export const devices = { 6538, 4151, [new Endpoint(1, [0], [], "0x0017880104e45521"), new Endpoint(2, [0], [], "0x0017880104e45521")], - true, + InterviewState.Successful, "Battery", "lumi.sensor_86sw2.es1", ), @@ -672,7 +663,7 @@ export const devices = { 6539, 4151, [new Endpoint(1, [0], [], "0x0017880104e45522")], - true, + InterviewState.Successful, "Battery", "lumi.weather", ), @@ -683,7 +674,7 @@ export const devices = { 6539, 4151, [new Endpoint(1, [0], [], "0x0017880104e455fe")], - true, + InterviewState.Successful, "Battery", "lumi.weather", ), @@ -693,7 +684,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45523")], - true, + InterviewState.Successful, "Battery", "lumi.sensor_motion.aq2", ), @@ -704,7 +695,7 @@ export const devices = { 6540, 4476, [new Endpoint(1, [0], [], "0x0017880104e45540")], - true, + InterviewState.Successful, "Mains (single phase)", "TRADFRI on/off switch", ), @@ -714,7 +705,7 @@ export const devices = { 6549, 4151, [new Endpoint(1, [0], [25], "0x0017880104e45541"), new Endpoint(2, [0, 6], [], "0x0017880104e45541")], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.ctrl_neutral1", ), @@ -725,7 +716,7 @@ export const devices = { 6540, 4151, [new Endpoint(11, [0], [], "0x0017880104e45543"), new Endpoint(13, [0], [], "0x0017880104e45543")], - true, + InterviewState.Successful, "Mains (single phase)", "GL-C-008", ), @@ -739,7 +730,7 @@ export const devices = { new Endpoint(13, [0], [], "0x0017880104e45544"), new Endpoint(12, [0], [], "0x0017880104e45544"), ], - true, + InterviewState.Successful, "Mains (single phase)", "GL-C-008", ), @@ -750,7 +741,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [25], "0x0017880104e45545")], - true, + InterviewState.Successful, "Mains (single phase)", "FB56+ZSC05HG1.0", ), @@ -760,7 +751,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45547"), new Endpoint(2, [0], [], "0x0017880104e45547")], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.curtain", ), @@ -770,7 +761,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45548"), new Endpoint(2, [0], [], "0x0017880104e45548")], - true, + InterviewState.Successful, "Mains (single phase)", "HDC52EastwindFan", ), @@ -780,7 +771,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45549")], - true, + InterviewState.Successful, "Mains (single phase)", "WarningDevice", ), @@ -790,7 +781,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45550")], - true, + InterviewState.Successful, "Mains (single phase)", "Thermostat", ), @@ -800,7 +791,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45551")], - true, + InterviewState.Successful, "Mains (single phase)", "SV01-410-MP-1.0", ), @@ -810,7 +801,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45552")], - true, + InterviewState.Successful, "Mains (single phase)", "J1 (5502)", ), @@ -820,7 +811,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0, 6], [], "0x0017880104e45553")], - true, + InterviewState.Successful, "Mains (single phase)", "E11-G13", ), @@ -830,10 +821,9 @@ export const devices = { 6536, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45535")], - true, + InterviewState.InProgress, "Mains (single phase)", undefined, - true, ), unsupported_router: new Device( "Router", @@ -841,10 +831,9 @@ export const devices = { 6536, 0, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x0017880104e45525")], - true, + InterviewState.Successful, "Mains (single phase)", "notSupportedModelID", - false, "Boef", ), CC2530_ROUTER: new Device( @@ -853,7 +842,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0, 6], [], "0x0017880104e45559")], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.router", ), @@ -863,7 +852,7 @@ export const devices = { 6541, 4152, [new Endpoint(6, [0, 6], [], "0x0017880104e45560")], - true, + InterviewState.Successful, "Mains (single phase)", "TI0001 ", ), @@ -873,7 +862,7 @@ export const devices = { 33906, 4476, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x90fd9ffffe4b64ae")], - true, + InterviewState.Successful, "Battery", "TRADFRI remote control", ), @@ -883,7 +872,7 @@ export const devices = { 33906, 4476, [new Endpoint(1, [0], [0, 3, 4, 6, 8, 5], "0x90fd9ffffe4b64af")], - true, + InterviewState.Successful, "Battery", "SCM-R_00.00.03.15TC", ), @@ -897,7 +886,7 @@ export const devices = { lightingColorCtrl: {colorCapabilities: 254}, }), ], - true, + InterviewState.Successful, "Mains (single phase)", "lumi.light.aqcn02", ), @@ -911,10 +900,9 @@ export const devices = { seMetering: {multiplier: 1, divisor: 10000}, }), ], - true, + InterviewState.Successful, "Mains (single phase)", "SP600", - false, "Salus", "20160120", ), @@ -928,10 +916,9 @@ export const devices = { seMetering: {multiplier: 1, divisor: 10000}, }), ], - true, + InterviewState.Successful, "Mains (single phase)", "SP600", - false, "Salus", "20170220", ), @@ -941,10 +928,9 @@ export const devices = { 33901, 4476, [new Endpoint(1, [0, 4, 3, 5, 10, 258, 13, 19, 6, 1, 1030, 8, 768, 1027, 1029, 1026], [0, 3, 4, 6, 8, 5], "0x90fd9ffffe4b64aa", [], {})], - true, + InterviewState.Successful, "Mains (single phase)", "qnazj70", - false, ), "GL-S-007ZS": new Device( "Router", @@ -952,7 +938,7 @@ export const devices = { 6540, 4151, [new Endpoint(1, [0], [], "0x0017880104e45526")], - true, + InterviewState.Successful, "Mains (single phase)", "GL-S-007ZS", ), @@ -962,7 +948,7 @@ export const devices = { 6540, 4151, [new Endpoint(10, [0, 6], [], "0x0017880104e43559"), new Endpoint(11, [0, 6], [], "0x0017880104e43559")], - true, + InterviewState.Successful, "Mains (single phase)", "U202DST600ZB", ), @@ -973,10 +959,9 @@ export const devices = { 6542, 4151, [new Endpoint(1, [], [], "0x0017880104e44559")], - true, + InterviewState.Successful, "Mains (single phase)", "3157100", - false, "Centralite", ), J1_cover: new Device( @@ -985,7 +970,7 @@ export const devices = { 6543, 4151, [new Endpoint(1, [], [], "0x0017880104a44559")], - true, + InterviewState.Successful, "Mains (single phase)", "J1 (5502)", ), @@ -998,10 +983,9 @@ export const devices = { new Endpoint(1, [0, 4, 5, 6, 258, 57345], [10, 25], "0xa4c138018cf95021"), new Endpoint(2, [0, 4, 5, 6, 258, 57345], [10, 25], "0xa4c138018cf95021"), ], - true, + InterviewState.Successful, "Mains (single phase)", "TS130F", - false, "_TZ3000_j1xl73iw", ), TS0601_thermostat: TS0601_thermostat, @@ -1013,7 +997,7 @@ export const devices = { 1114, 0xffff, [new Endpoint(1, [], [], "0x0017880104e45511")], - false, + InterviewState.Failed, undefined, "external_converter_device", ), @@ -1023,20 +1007,19 @@ export const devices = { 6549, 4151, [new Endpoint(1, [0], [], "0x0017882194e45543"), new Endpoint(2, [0, 6], [], "0x0017882194e45543")], - true, + InterviewState.Successful, "Mains (single phase)", "TS110F", - false, "_TYZB01_v8gtiaed", ), - unknown: new Device("Router", "0x0017980134e45545", 6540, 4151, [], true, "Mains (single phase)"), + unknown: new Device("Router", "0x0017980134e45545", 6540, 4151, [], InterviewState.Successful, "Mains (single phase)"), temperature_sensor: new Device( "EndDevice", "0x0017880104e45561", 6544, 4151, [new Endpoint(1, [0, 3, 4, 1026], [], "0x0017880104e45561")], - true, + InterviewState.Successful, "Battery", "temperature.sensor", ), @@ -1046,7 +1029,7 @@ export const devices = { 6545, 4151, [new Endpoint(1, [0, 3, 4, 513], [1026], "0x0017880104e45562")], - true, + InterviewState.Successful, "Mains (single phase)", "heating.actuator", ), @@ -1063,10 +1046,9 @@ export const devices = { ]), new Endpoint(11, [0, 4096], [3, 4, 5, 6, 8, 25, 768, 4096], "0xd85def11a1002caa"), ], - true, + InterviewState.Successful, "Battery", "RB01", - false, "Busch-Jaeger", "20161222", "1.2.0", @@ -1077,7 +1059,7 @@ export const devices = { 6545, 4699, [new Endpoint(1, [3], [0, 3, 513, 514], "0x0017548104a44669")], - true, + InterviewState.Successful, "Mains (single phase)", "Adapter Zigbee FUJITSU", ), @@ -1087,7 +1069,7 @@ export const devices = { 6546, 4617, [new Endpoint(1, [0, 3, 4, 5, 258, 1794, 2820, 2821, 64672], [10, 25], "0x18fc26000000cafe")], - true, + InterviewState.Successful, "Mains (single phase)", "RBSH-MMS-ZB-EU", ), @@ -1097,10 +1079,9 @@ export const devices = { 6546, 4617, [new Endpoint(1, [0, 3, 4, 5, 258, 1794, 2820, 2821, 64672], [10, 25], "0x0026decafe000473")], - true, + InterviewState.Successful, "Mains (single phase)", "RBSH-MMS-ZB-EU", - false, undefined, undefined, undefined, @@ -1112,10 +1093,9 @@ export const devices = { 40369, 4476, [new Endpoint(1, [0, 3, 4, 5, 6, 8, 768, 2821, 4096], [5, 25, 32, 4096], "0x000b57fffec6a5c2")], - true, + InterviewState.Successful, "Mains (single phase)", "TRADFRI bulb E27 WS opal 980lm", - false, undefined, undefined, undefined, @@ -1131,10 +1111,9 @@ export const devices = { new Endpoint(2, [], [], "0xb43a31fffe2f1f6a", [], {}, [], 1, 1, {multiEndpointSkip: ["state", "power", "energy", "brightness"]}), new Endpoint(3, [], [], "0xb43a31fffe2f1f6a", [], {}, [], 1, 1, {multiEndpointSkip: ["state", "power", "energy", "brightness"]}), ], - true, + InterviewState.Successful, "Mains (single phase)", "VZM31-SN", - false, undefined, undefined, undefined, @@ -1146,7 +1125,7 @@ export const devices = { 18129, 0xfff1, [new Endpoint(8, [0, 3, 4, 5, 6, 8], [], "0x00124b00cfcf3298"), new Endpoint(242, [], [33], "0x00124b00cfcf3298")], - true, + InterviewState.Successful, "DC Source", "FanBee1", ),