Light-Based Opening Alarm


I would like to build a security device aimed at detecting whether a bad or drawer has been opened for example. The main functioning will revolve around this behaviour: the device wilm have a toggle for arming or disarming the device, once armed the device needs to be positioned within 10 seconds on the drawer or place to monitor. Device with a photo cell will record the ambient lights and when deviation to that is recorded it will emit a buzz and/or send a bluetooth notification. The idea is that when and if the drawer or bad is opened loght will come in and thst will detext the openinf.
Created a project doc

Light-Based Opening Alarm Concept

View Document

Light-Based Opening Alarm Concept User goal
A security device to detect a drawer or bag being opened by sensing a change in ambient light.
Requested behavior
  • A physical toggle arms or disarms the device.
  • Arming starts a 10-second positioning period.
  • After positioning, a photocell/light sensor records the ambient-light baseline.
  • A deviation from that baseline triggers a buzzer and/or a Bluetooth notification.
Proposed behavior for development (not yet approved)
  • States: disarmed → 10-second arming delay → baseline capture → armed → alarm.
  • Capture the baseline after the delay so placement does not trigger an alarm.
  • Filter brief fluctuations and use a sustained threshold crossing rather than any measurable change.
Your concept is feasible: arm → wait 10 seconds for placement → measure baseline light → monitor for a sustained change → sound a buzzer and/or send a Bluetooth alert. Light sensing alone won’t reliably detect opening in darkness; power source, alert method, and whether darkness detection is required still need deciding.
I saved the requirements and limitations in Light-Based Opening Alarm Concept; your existing circuit is unchanged, and building or adapting it requires Agent mode.
Execution stopped because your ACUs ran out.
What is Agent mode?
Agent mode lets Flux build, do deep research, validate designs, and work through complex assignments.
Chat mode is just as smart and has the same engineering knowledge, but it cannot work autonomously.
Only Agent mode consumes your plan's included AI usage (measured in ACUs).
Continue in Agent Mode

Waiting for input


Light-Based Opening Alarm Concept
User goal
A security device to detect a drawer or bag being opened by sensing a change in ambient light.
Requested behavior
  • A physical toggle arms or disarms the device.
  • Arming starts a 10-second positioning period.
  • After positioning, a photocell/light sensor records the ambient-light baseline.
  • A deviation from that baseline triggers a buzzer and/or a Bluetooth notification.
Proposed behavior for development (not yet approved)
  • States: disarmed → 10-second arming delay → baseline capture → armed → alarm.
  • Capture the baseline after the delay so placement does not trigger an alarm.
  • Filter brief fluctuations and use a sustained threshold crossing rather than any measurable change.
  • Treat buzzer output and Bluetooth reporting as configurable outputs; alarm duration, latching, and reset behavior remain undecided.
Feasibility and limitations
Light sensing can detect opening when opening changes the light reaching the sensor. It cannot reliably detect opening in darkness or where the sensor remains covered. If reliable detection regardless of lighting is required, consider a magnetic contact, mechanical switch, or motion sensor as an additional or alternative input; no alternative has been selected. Bluetooth phone alerts require compatible phone software, pairing/connection behavior, and operation within radio range. Background notification behavior must be validated on the chosen phone platform.
Requirements still open
  • Battery-powered portable device versus USB-powered device; required battery life if applicable.
  • Bag/drawer dimensions, mounting method, and enclosure size.
  • Buzzer only, Bluetooth only, or both; phone platform and app expectations.
  • Whether operation in darkness is required.
  • Trigger sensitivity, sustained-change interval, alarm duration, and rearming/reset behavior.
Existing project and implementation status
The current project is named USB-C WiFi BLE TH Sensor. Its supplied description identifies a USB-C-powered environmental sensor node, not an opening alarm. No schematic, PCB, firmware, or enclosure was inspected or modified in this session. Reusing the existing project versus starting a separate design remains undecided.
Resume point
Confirm power source, alert outputs, and darkness requirement before selecting the sensing and power architecture. Then decide whether to adapt the existing environmental-sensor project or create a separate alarm design. No components or implementation have been selected or verified. Execution stopped because the account ran out of ACUs.
  • User goal

  • Requested behavior

  • Proposed behavior for development (not yet approved)

  • Feasibility and limitations

  • Requirements still open

  • Existing project and implementation status

  • Resume point