Detection Sensor Module Usage
The Detection Sensor module allows you to configure a GPIO pin to be monitored for a specified high/low status and send text alerts over the Detection Sensor portnum when an event is detected. This is particularly useful for motion detection sensors, reed switches, and other open / closed state systems in which notifications over the mesh are desired. Config options are: Enabled, Minimum Broadcast Interval, State Broadcast Interval, Send Bell, Name, Monitor Pin, Detection Triggered High, and Use Pull-up.
In order to use this module, make sure your devices have firmware version 2.2.2 or higher.
Detection Sensor Module Config Values
Enabled
Whether the Module is enabled.
Minimum Broadcast Interval
The interval in seconds of how often we can send a message to the mesh when a state change is detected.
State Broadcast Interval
The interval in seconds of how often we should send a message to the mesh with the current state regardless of changes, When set to 0, only state changes will be broadcasted, Works as a sort of status heartbeat for peace of mind.
Send Bell
Send ASCII bell with alert message. Useful for triggering ext. notification on bell name.
Friendly Name
Used to format the message sent to mesh. Example: A name "Motion" would result in a message "Motion detected". Maximum length of 20 characters.
Monitor Pin
The GPIO pin to monitor for state changes.
Detection Triggered High
Whether or not the GPIO pin state detection is triggered on HIGH (1), otherwise LOW (0).
Use Pull-up
Whether or not use INPUT_PULLUP mode for GPIO pin. Only applicable if the board uses pull-up resistors on the pin.
Detection Sensor Module Client Availability
- Android
- Apple
- CLI
- Web
Android
All Detection Sensor Module config options are available for Android in app version 2.2.2 and higher.
- Open the Meshtastic App
- Navigate to: Vertical Ellipsis (3 dots top right) > Radio Configuration > Detection Sensor
Apple
All Detection Sensor Module config options are available on iOS, iPadOS and macOS app versions 2.2.2 and higher at Settings > Module Configuration > Detection Sensor
CLI
All Detection Sensor Module config options are available in the python CLI version 2.2.2 and higher.
Example commands are below:
meshtastic --set detection_sensor.enabled true
meshtastic --set detection_sensor.enabled false
meshtastic --set detection_sensor.minimum_broadcast_secs 90
meshtastic --set detection_sensor.state_broadcast_secs 300
meshtastic --set detection_sensor.send_bell true
meshtastic --set detection_sensor.send_bell false
meshtastic --set detection_sensor.name "motion"
meshtastic --set detection_sensor.monitor_pin 7
meshtastic --set detection_sensor.detection_triggered_high true
meshtastic --set detection_sensor.detection_triggered_high false
meshtastic --set detection_sensor.use_pullup true
meshtastic --get detection_sensor
Web
All Detection Sensor module config options are available in the Web UI.