python icon indicating copy to clipboard operation
python copied to clipboard

[Feature Request]: Confirmation of sent message

Open brad28b opened this issue 1 year ago • 8 comments

When using:

meshtastic --sendtext --dest xxxxx Text

or

meshtastic -ch-index 0 --sendtext Text

It would be very nice to have a confirmation of the message being received. When sending to a channel, a confirmation that at least one node received the message. When sending direct to a node, either confirmation that the particular node got the message, or at least, confirmation that at least one other node heard the message. In the smartphone app, similar to the little tick that appears when a node gets your message, but in this case outputting it in a parsable CLI format.

Current behaviour is it sends the message, and then exits. And, for whatever reason, the message is often not received, even between two close by nodes. Confirmation that it wasn't received will allow us to deal with that programatically.

brad28b avatar Jun 13 '24 04:06 brad28b

You can add --ack to wait for an acknowledgement.

Which devices do you have? If the nodes are too close, they might get overloaded, especially if they have high transmit power. Put them at least a room away and you should get near 100% success rate.

GUVWAF avatar Jun 13 '24 05:06 GUVWAF

In looking at this bug I did discover that --ack seems to be broken, and it'll also return with only an implicit ack, so there's definitely some improvement to be made. #570 also relevant here, something I'll definitely keep in mind there!

ianmcorvidae avatar Jun 13 '24 05:06 ianmcorvidae

Oh, sorry, didn't know that. Good to hear you're on it.

GUVWAF avatar Jun 13 '24 06:06 GUVWAF

I am also having this issue where everything seems to have transmitted just fine in the console, but nothing goes out to the radio or seen by other nodes.

rj45jack avatar Jun 13 '24 19:06 rj45jack

I was curious about that even with my own experiments with the api and trying to setup some simple bot scripts to check the weather by zip code. Sometimes I have to send the command a couple times and can see it coming thru but no response.

Phlat avatar Jul 10 '24 00:07 Phlat

I was curious about that even with my own experiments with the api and trying to setup some simple bot scripts to check the weather by zip code. Sometimes I have to send the command a couple times and can see it coming thru but no response.

My issue is the exact same use-case. I am trying to publish weather alerts, and general weather but it's hit or miss with TCP.

rj45jack avatar Jul 10 '24 13:07 rj45jack

not BBS related. This is what I came up with, my weather lookup. It's not direct message. For what it's worth. Cheers!

On Wed, Jul 10, 2024 at 6:01 AM Keith J @.***> wrote:

I was curious about that even with my own experiments with the api and trying to setup some simple bot scripts to check the weather by zip code. Sometimes I have to send the command a couple times and can see it coming thru but no response.

My issue is the exact same use-case. I am trying to publish weather alerts, and general weather but it's hit or miss with TCP.

— Reply to this email directly, view it on GitHub https://github.com/meshtastic/python/issues/594#issuecomment-2220453896, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFYWUTR5CUNVCWFCKBY5ANLZLUWDDAVCNFSM6AAAAABJHTBBCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQGQ2TGOBZGY . You are receiving this because you commented.Message ID: @.***>

--

-Chad

Phlat avatar Jul 10 '24 13:07 Phlat

We managed to finnaly buiild something that seems to handle ack/nak successfully: https://github.com/Apfelwurm/alertmanagermeshtastic/blob/main/src/alertmanagermeshtastic/meshtastic.py#L144-L211 for those interested :)

Apfelwurm avatar Jul 19 '24 11:07 Apfelwurm