-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support messages sent by detection sensor module #84
Support messages sent by detection sensor module #84
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool! I like it!
To give users more control over what data types are relayed to Matrix, I think it would be good to add a configuration option (defaulting to false) in config.yaml.
People already have to opt in to send meshnet data to Matrix with broadcast_enabled: true
otherwise it only sends one way Matrix -> Meshtastic. (It's not the best name for that option, but that's what it does.)
New config variable:
detection_sensor_enabled = relay_config["meshtastic"].get("detection_sensor", False)
And something like this in on_meshtastic_message() that would prevent sending detection sensor messages if disabled:
if decoded.get("portnum") == "DETECTION_SENSOR_APP" and not detection_sensor_enabled:
logger.debug("Detection sensor packet received, but detection sensor processing is disabled.")
return
So to enable the feature in config.yaml
it would look like:
meshtastic:
detection_sensor: true
What are your thoughts on that?
Sounds great, thank you! I'll integrate the requested changes. |
I added the "detection_sensor" setting. Could you do another review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Thank you, I appreciate the contribution!
Thank you! |
Hi @jeremiah-k,
I created a draft supporting detection messages (https://meshtastic.org/docs/configuration/module/detection-sensor/)
Block invoking
meshtastic_interface.sendData(…)
is untested.Remaining part tested successfully with meshtasticd v2.3.13.83f5ba0.
Could you review my changes? Thank you!
Solves second part of #75