-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement to W599001 Smoke Alarm #8393
Conversation
Adding support for indication of heat alarm and hush mode.
src/devices/schneider_electric.ts
Outdated
@@ -565,6 +565,26 @@ const fzLocal = { | |||
return ret; | |||
}, | |||
} satisfies Fz.Converter, | |||
ias_smoke_alarm_1_heat_alarm_2_with_hush: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you extend and use:
export function iasZoneAlarm(args: IasArgs): ModernExtend { |
Example usage:
iasZoneAlarm({zoneType: 'occupancy', zoneAttributes: ['alarm_1', 'tamper', 'battery_low']}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As in make a local version of the iasZoneAlarm modern extend that can do the hush mode bit decode or add the functionality to modernExtend.ts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the functionality to modernExtend.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, done! Have tested and it correctly configures the reporting and binding as before. Only slight negative is no ability to tell the user that the second alarm is heat while the first is smoke.
One option would be to add a new argument maybe called secondaryZoneType?
zigbee-herdsman-converters/src/lib/modernExtend.ts
Lines 1480 to 1486 in 2d229ff
export interface IasArgs { | |
zoneType: iasZoneType; | |
zoneAttributes: iasZoneAttribute[]; | |
alarmTimeout?: boolean; | |
zoneStatusReporting?: boolean; | |
description?: string; | |
} |
I think it is also acceptable as is, at least both alarms are exposed.
src/lib/modernExtend.ts
Outdated
@@ -1574,6 +1576,9 @@ export function iasZoneAlarm(args: IasArgs): ModernExtend { | |||
if (args.zoneAttributes.includes('battery_defect')) { | |||
payload = {battery_defect: (zoneStatus & (1 << 9)) > 0, ...payload}; | |||
} | |||
if (args.zoneAttributes.includes('hush')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reliase now that this option is device specific, therefore it cannot be put directly here. I think we should allow passing custom attributes to iasZoneAlarm
instead.
Have had a go at implementing passing of custom (manufacturer) zone attributes to |
Well done, thanks! |
Adding support to expose heat alarm and hush mode bringing support closer to parity with that of the manufacturer hub and app. The heat alarm is for detecting fires and will sound the device siren, therefore, it is important that it be exposed for use. I used fzLocal as the hush bit is appears to be manufacturer specific (not specified in ZCL).