python icon indicating copy to clipboard operation
python copied to clipboard

onSend function

Open michaelachrisco opened this issue 1 year ago • 1 comments

In the examples here: https://meshtastic.org/docs/development/python/library/

We have a method we can subscribe to called onReceive. Is there a way to hook into something similar like onSend? Like anytime the device sends out a package, we can subscribe/see what that packet is?

I see something like this in the source code here: https://github.com/meshtastic/python/blob/master/meshtastic/main.py#L430

michaelachrisco avatar Jun 09 '24 17:06 michaelachrisco

I'm not sure if this is possible for truly every message the device sends out, since I don't think everything the device sends out automatically is copied to the client API that we're using. I do think it could be good to add a hook around anything sent by the library itself, so I'll think a little about the best way to set that up.

ianmcorvidae avatar Jun 26 '24 01:06 ianmcorvidae