Skip to content

Commit f5c73fb

Browse files
HowmationFrKoenkk
andauthored
fix: Develco MOSZB-153: Fix illuminance reporting & unlock LED, timeout control (#8223)
* Develco MOSZB-153: Fix frequent illuminance reporting and unlock LED & occupancy timeout control Adjusted the illuminance reporting configuration to reduce excessive reports by setting appropriate min, max, and change values. Corrected the software build ID checks from >=3 and >=4 to >=2, enabling LED indicator control and occupancy timeout settings for devices with firmware version 2 or higher. Also updated IAS Zone attributes to include only 'alarm_1', removing unnecessary attributes. * Add battery informations * Update src/devices/develco.ts Co-authored-by: Koen Kanters <[email protected]> --------- Co-authored-by: Koen Kanters <[email protected]>
1 parent fff3657 commit f5c73fb

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/devices/develco.ts

+13-10
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,8 @@ const definitions: DefinitionWithExtend[] = [
684684
toZigbee: [develco.tz.led_control, develco.tz.ias_occupancy_timeout],
685685
exposes: (device, options) => {
686686
const dynExposes = [];
687-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 3) {
687+
if (Number(device?.softwareBuildID?.split('.')[0]) >= 2) {
688688
dynExposes.push(e.numeric('occupancy_timeout', ea.ALL).withUnit('s').withValueMin(5).withValueMax(65535));
689-
}
690-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 4) {
691689
dynExposes.push(
692690
e.enum('led_control', ea.ALL, ['off', 'fault_only', 'motion_only', 'both']).withDescription('Control LED indicator usage.'),
693691
);
@@ -703,16 +701,21 @@ const definitions: DefinitionWithExtend[] = [
703701
develcoModernExtend.addCustomClusterManuSpecificDevelcoGenBasic(),
704702
develcoModernExtend.readGenBasicPrimaryVersions(),
705703
develcoModernExtend.temperature(),
706-
illuminance(),
707-
battery(),
708-
iasZoneAlarm({zoneType: 'occupancy', zoneAttributes: ['alarm_1', 'battery_low', 'tamper']}),
704+
illuminance({reporting: {min: 60, max: 3600, change: 500}}),
705+
battery({
706+
voltageToPercentage: {min: 2500, max: 3000},
707+
percentage: true,
708+
voltage: true,
709+
lowStatus: false,
710+
voltageReporting: true,
711+
percentageReporting: false,
712+
}),
713+
iasZoneAlarm({zoneType: 'occupancy', zoneAttributes: ['alarm_1']}),
709714
],
710715
configure: async (device, coordinatorEndpoint) => {
711-
const endpoint35 = device.getEndpoint(35);
712-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 3) {
716+
if (device && device.softwareBuildID && Number(device.softwareBuildID.split('.')[0]) >= 2) {
717+
const endpoint35 = device.getEndpoint(35);
713718
await endpoint35.read('ssIasZone', ['develcoAlarmOffDelay'], manufacturerOptions);
714-
}
715-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 4) {
716719
await endpoint35.read('genBasic', ['develcoLedControl'], manufacturerOptions);
717720
}
718721
},

0 commit comments

Comments
 (0)