Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Detection Sensor module for messaging the mesh on detected state changes #381

Merged
merged 8 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions meshtastic/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ message AdminMessage {
* TODO: REPLACE
*/
AMBIENTLIGHTING_CONFIG = 10;

/*
* TODO: REPLACE
*/
DETECTION_CONFIG = 11;
}

/*
Expand Down
12 changes: 11 additions & 1 deletion meshtastic/localonly.proto
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,20 @@ message LocalModuleConfig {
*/
ModuleConfig.NeighborInfoConfig neighbor_info = 11;

/*
* The part of the config that is specific to the Neighbor Info module
thebentern marked this conversation as resolved.
Show resolved Hide resolved
*/
ModuleConfig.AmbientLightingConfig ambient_lighting = 12;

/*
* The part of the config that is specific to the Neighbor Info module
*/
ModuleConfig.DetectionConfig detection = 13;

/*
* A version integer used to invalidate old save files when we make
* incompatible changes This integer is set at build time and is private to
* NodeDB.cpp in the device code.
*/
uint32 version = 8;
}
}
5 changes: 4 additions & 1 deletion meshtastic/module_config.options
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@
*AmbientLightingConfig.current int_size:8
*AmbientLightingConfig.red int_size:8
*AmbientLightingConfig.green int_size:8
*AmbientLightingConfig.blue int_size:8
*AmbientLightingConfig.blue int_size:8

*DetectionConfig.monitor_pin int_size:8
*DetectionConfig.name max_size:20
46 changes: 44 additions & 2 deletions meshtastic/module_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,45 @@ message ModuleConfig {
uint32 update_interval = 2;
}

/*
* Detection Module Config
*/
message DetectionConfig {
/*
* Whether the Module is enabled
*/
bool enabled = 1;

/*
* Interval in seconds of how often we can send a message to the mesh when a state change is detected
*/
uint32 minumum_update_interval = 2;
mverch67 marked this conversation as resolved.
Show resolved Hide resolved

/*
* GPIO pin to monitor for state changes
*/
uint32 monitor_pin = 3;

/*
* Whether or not the GPIO pin state detection is triggered on HIGH (1)
* Otherwise LOW (0)
*/
bool detection_triggered_high = 4;

caveman99 marked this conversation as resolved.
Show resolved Hide resolved
/*
* Send ASCII bell with alert message
* Useful for trigger ext. notification on bell
*/
bool send_bell = 5;

/*
* Friendly name used to format message sent to mesh
* Example: A name "Motion" would result in a message "Motion detected"
* Maximum length of 20 characters
*/
string name = 6;
}

/*
* Audio Config for codec2 voice
*/
Expand Down Expand Up @@ -614,9 +653,12 @@ message ModuleConfig {
* TODO: REPLACE
*/
AmbientLightingConfig ambient_lighting = 11;
}


/*
* TODO: REPLACE
*/
DetectionConfig detection = 12;
}
}

/*
Expand Down