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 where notifications over the mesh are desired. The configuration options include: Enabled, Minimum Broadcast Interval, State Broadcast Interval, Send Bell, Name, Monitor Pin, Detection Triggered High, and Use Pull-up.
To use this module, ensure your devices have firmware version 2.2.2 or higher.
Detection Sensor Module Configuration Values
Enabled: Indicates whether the module is enabled.
Minimum Broadcast Interval: The interval, in seconds, for how often we can send a message to the mesh when a state change is detected.
State Broadcast Interval: The interval, in seconds, for 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. This acts as a sort of status heartbeat for peace of mind.
Send Bell: Sends an ASCII bell with the alert message, useful for triggering external notification on the bell name.
Friendly Name: Used to format the message sent to the mesh. For example, a name like "Motion" would result in a message saying "Motion detected." Maximum length is 20 characters.
Monitor Pin: The GPIO pin that will be monitored for state changes.
Detection Triggered High: Indicates whether the GPIO pin state detection is triggered on HIGH (1) or LOW (0).
Use Pull-up: Indicates whether to use INPUT_PULLUP mode for the GPIO pin, applicable only if the board utilizes pull-up resistors on the pin.
Detection Sensor Module Client
Android
All Detection Sensor Module configuration options are available for Android in app version 2.2.2 and higher.
-
Open the Meshtastic App
-
Navigate to: Vertical Ellipsis (3 dots in the top right) > Radio Configuration > Detection Sensor.
Apple
All configuration options for the Detection Sensor Module are available on iOS, iPadOS, and macOS app versions 2.2.2 and higher. To access them, go to Settings > Module Configuration > Detection Sensor.
CLI
All configuration options for the Detection Sensor Module are available in the Python CLI version 2.2.2 and higher.
-
Enable/Disable the Detection Sensor Module
| meshtastic --set detection_sensor.enabled true meshtastic --set detection_sensor.enabled false |
-
Set the Minimum Broadcast Interval to 90 seconds
| meshtastic --set detection_sensor.minimum_broadcast_secs 90 |
-
Set the State Broadcast Interval to 5 minutes
| meshtastic --set detection_sensor.state_broadcast_secs 300 |
-
Enable/Disable Send Bell
| meshtastic --set detection_sensor.send_bell true meshtastic --set detection_sensor.send_bell false |
-
Set the friendly name to 'motion'
| meshtastic --set detection_sensor.name "motion" |
-
Set the Monitor Pin to 7
| meshtastic --set detection_sensor.monitor_pin 7 |
-
Enable Notifications when the Monitor Pin goes HIGH
| meshtastic --set detection_sensor.detection_triggered_high true |
-
Enable Notifications when the Monitor Pin goes LOW
| meshtastic --set detection_sensor.detection_triggered_high false |
-
Enable the use INPUT_PULLUP mode
| meshtastic --set detection_sensor.use_pullup true |
-
Get the Detection Sensor Module Configuration
| meshtastic --get detection_sensor |
Web
All configuration options for the Detection Sensor module are available in the Web UI.
