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

Does it handle esp_now acknowledgement/retries ? #5

Open
jerome83136 opened this issue May 24, 2024 · 0 comments
Open

Does it handle esp_now acknowledgement/retries ? #5

jerome83136 opened this issue May 24, 2024 · 0 comments

Comments

@jerome83136
Copy link

Hello,
Thank you for this really easy to use implementation of esp_now with ESPHome :)

I'm wondering how the "on_sent" part works here ?

now_mqtt:
  on_sent:
    then:
      - lambda: id(sent)++; 
      - if:
          condition:
            lambda: 'return id(sent) == 4;'
          then:
            - lambda: id(sent) = 0;
            - deep_sleep.enter:
                id: sleep_
                sleep_duration: 5min

I understand the "sent" counter is incremented each time we "send" a message for a sensor.
Do we consider a message is "sent" when:

  • It was just sent and that's it ?
  • It was sent + successfully received by the hub ?

As it seems this implementation is using esp_now in "broadcasting" mode (not in "pairing" mode) I guess the correct answer is my 1st proposal. Am I right ?

NB: my use case is to use esp_now to send data from sensors to a hub with support of esp_now messages "acknowledgement", in order to prevent deep_sleep if messages weren't successfully sent and "retry" them.

Thank you for your feedback :)

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant