All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
PINS_SENSOR_A[1] (GPIO 5). The pin — previously the second IR input of sensor pair A — is now configured with an internal pull-down and wired to 3V3, so it reads 0 when open and 1 when closed (modules/config/env.py). sensor_listener polls it every 500 ms, edge-triggered with a 2-poll (~1 s) stability confirmation (MAGNET_CONFIRM) so electrical noise cannot produce spurious 0/1 bursts, and publishes {"system_address", "magnet": <0|1>} to the MQTT request topic on each confirmed change (modules/handler/sensor_listener.py).magnet_sensor MQTT command (modules/handler/mqtt_listener.py) to enable/disable the magnet sensor at runtime, mirroring the existing ir_sensor command. True deletes the magnet_sensor.txt flag file and reboots; False creates it and reboots. The flag is evaluated at boot in program.py.modules/handler/sensor_listener.py). When the listener task starts, the current PIR and magnet readings are emitted via print() and are explicitly marked as not transmitted (status only printed, NOT sent over MQTT). The magnet's confirmed state is seeded with its boot value so that only a genuine change after startup is published — the initial reading is never sent over MQTT. These prints are unconditional (independent of globals.debug) so the boot state is always visible on the serial console.sensor_listener rewritten as a single shared 500 ms poll loop serving both the IR motion sensor and the magnet sensor (modules/handler/sensor_listener.py). IR debounce and cooldown are now expressed in milliseconds via time.ticks_ms (IR_DEBOUNCE_MS = 5000, IR_COOLDOWN_MS = 60000) instead of loop-iteration counters, so the timing is decoupled from LOOP_MS and unaffected if the poll period changes. The IR alarm payload ({"sensor": 1}) and the 5 s-detect / 60 s-cooldown behaviour are preserved.sensor_listener() signature extended to sensor_listener(client, pin_sensor, pin_magnet, ir_enabled=True, magnet_enabled=True); each sensor can now be gated independently (modules/handler/sensor_listener.py, modules/program.py).program.mainprog() task launch: the listener is now started when either the IR or the magnet sensor is enabled. ir_enabled/magnet_enabled are resolved from the ir_sensor.txt/magnet_sensor.txt flag files and both pins are passed to the shared task (modules/program.py).HEARTBEAT_DELAY + 30 s to HEARTBEAT_DELAY + 90 s (modules/program.py) to give the listener work cycle more headroom before a WDT reset.count / send_count, 1 s tick) in sensor_listener.py, superseded by the time.ticks_msbased debounce/cooldown described above.FIRMWARE_VER in modules/config/env.py is still 1.6.6;27.05.2026 and has not been bumped to 1.6.7. It should be updated before the 1.6.7 release is flashed/deployed, since the heartbeat reports this string.This file documents every change between commit
c417687 (HEAD of v1.6.6, last commit covered by CHANGELOG.md)
and the HEAD of release/1-6-7 of
inaffect-ag/PY_Zebrabox_ESP32_Locker
(4 source files changed, all modified; +129 / −28 lines, including one working-tree change not yet committed).
See "Changelog Firmware" above for the complete list of changes in this release.