viewof baselineAlarms = Inputs.range([5, 30], {
value: 18,
step: 1,
label: "Baseline False Alarms per Week"
})
viewof usePetImmune = Inputs.toggle({
label: "Pet-Immune PIR Sensors",
value: true
})
viewof relocateSensors = Inputs.toggle({
label: "Relocate Away from HVAC",
value: true
})
viewof useMultiSensor = Inputs.toggle({
label: "Multi-Sensor Fusion (2+ agree)",
value: true
})
viewof useAI = Inputs.toggle({
label: "AI Person Detection",
value: true
})
reduction1 = usePetImmune ? 0.45 : 0
reduction2 = relocateSensors ? 0.20 : 0
afterLayer1And2 = baselineAlarms * (1 - reduction1) * (1 - reduction2)
afterLayer3 = useMultiSensor ? afterLayer1And2 * 0.70 : afterLayer1And2
finalAlarms = useAI ? afterLayer3 * 0.50 : afterLayer3
totalReduction = ((baselineAlarms - finalAlarms) / baselineAlarms) * 100
html`<div style="background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #9B59B6;">
<h4 style="color: #2C3E50; margin-top: 0;">False Alarm Reduction Analysis</h4>
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 15px;">
<div>
<div style="font-size: 14px; color: #7F8C8D;">Baseline Alarms</div>
<div style="font-size: 24px; font-weight: bold; color: #E74C3C;">${baselineAlarms}/week</div>
</div>
<div>
<div style="font-size: 14px; color: #7F8C8D;">After Mitigation</div>
<div style="font-size: 24px; font-weight: bold; color: #16A085;">${finalAlarms.toFixed(1)}/week</div>
</div>
</div>
<div style="background: white; padding: 15px; border-radius: 4px; margin-bottom: 10px;">
<div style="font-size: 14px; color: #7F8C8D; margin-bottom: 5px;">Total Reduction</div>
<div style="font-size: 28px; font-weight: bold; color: #16A085;">${totalReduction.toFixed(1)}%</div>
<div style="width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; margin-top: 10px; overflow: hidden;">
<div style="width: ${totalReduction}%; height: 100%; background: linear-gradient(90deg, #16A085, #3498DB);"></div>
</div>
</div>
<div style="display: grid; gap: 8px;">
<div style="padding: 8px; background: ${usePetImmune ? '#d4edda' : '#f8f9fa'}; border-radius: 4px;">
<strong style="color: #2C3E50;">Layer 1 - Pet-Immune PIR:</strong>
${usePetImmune ? html`<span style="color: #16A085;">-45% (${(baselineAlarms * 0.45).toFixed(1)} alarms removed)</span>` : html`<span style="color: #7F8C8D;">Not enabled</span>`}
</div>
<div style="padding: 8px; background: ${relocateSensors ? '#d4edda' : '#f8f9fa'}; border-radius: 4px;">
<strong style="color: #2C3E50;">Layer 2 - Sensor Relocation:</strong>
${relocateSensors ? html`<span style="color: #16A085;">-20% (${(baselineAlarms * 0.20).toFixed(1)} alarms removed)</span>` : html`<span style="color: #7F8C8D;">Not enabled</span>`}
</div>
<div style="padding: 8px; background: ${useMultiSensor ? '#d4edda' : '#f8f9fa'}; border-radius: 4px;">
<strong style="color: #2C3E50;">Layer 3 - Multi-Sensor Fusion:</strong>
${useMultiSensor ? html`<span style="color: #16A085;">-30% of remaining (${(afterLayer1And2 - afterLayer3).toFixed(1)} alarms removed)</span>` : html`<span style="color: #7F8C8D;">Not enabled</span>`}
</div>
<div style="padding: 8px; background: ${useAI ? '#d4edda' : '#f8f9fa'}; border-radius: 4px;">
<strong style="color: #2C3E50;">Layer 4 - AI Verification:</strong>
${useAI ? html`<span style="color: #16A085;">-50% of remaining (${(afterLayer3 - finalAlarms).toFixed(1)} alarms removed)</span>` : html`<span style="color: #7F8C8D;">Not enabled</span>`}
</div>
</div>
</div>`False Alarm Reduction Calculator
False Alarm Reduction Calculator
animation
applications
smart-home
Try Toggle AI Person Detection, then press Calculate reduction.
Observe After Calculate reduction, watch After Mitigation and Total Reduction.
Explain Explain why Layer 4 reduces remaining alarms after Calculate reduction.
Technical boundaries. Enabled layers multiply remaining alarms by fixed reduction factors. Baseline false alarms per week is the only alarm input.