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

Improved and simplified Ping #8193

Merged
merged 2 commits into from
Apr 15, 2020
Merged

Conversation

s-hadinger
Copy link
Collaborator

Description:

I was not happy with the first implementation of Ping.

This new implementation supports multiple pings ongoing at the same time, is reduced from 3KB to 2KB, and supports a new 'fast mode' when you're only interested in reachability.

Fast mode: Ping0 <addr> will send at most 4 pings, and will report immediately once a succesful response is received. You can batch pings with BackLog.

Ex:

Backlog Ping0 192.168.1.203; Ping0 192.168.1.205; Ping0 192.168.1.207; Ping0 192.168.1.208; Ping0 192.168.1.222

17:57:47 CMD: Backlog Ping0 192.168.1.203; Ping0 192.168.1.205; Ping0 192.168.1.207; Ping0 192.168.1.208; Ping0 192.168.1.222
17:57:47 RSL: stat/tasmota_4B3316/RESULT = {"Ping":"Done"}
17:57:47 RSL: tele/tasmota_4B3316/RESULT = {"Ping":{"192.168.1.203":{"Reachable":true,"Success":1,"Timeout":0,"MinTime":86,"MaxTime":86,"AvgTime":86}}}
17:57:47 RSL: stat/tasmota_4B3316/RESULT = {"Ping":"Done"}
17:57:48 RSL: tele/tasmota_4B3316/RESULT = {"Ping":{"192.168.1.205":{"Reachable":true,"Success":1,"Timeout":0,"MinTime":170,"MaxTime":170,"AvgTime":170}}}
17:57:48 RSL: stat/tasmota_4B3316/RESULT = {"Ping":"Done"}
17:57:48 RSL: stat/tasmota_4B3316/RESULT = {"Ping":"Done"}
17:57:48 RSL: tele/tasmota_4B3316/RESULT = {"Ping":{"192.168.1.207":{"Reachable":true,"Success":1,"Timeout":0,"MinTime":104,"MaxTime":104,"AvgTime":104}}}
17:57:48 RSL: stat/tasmota_4B3316/RESULT = {"Ping":"Done"}
17:57:48 RSL: tele/tasmota_4B3316/RESULT = {"Ping":{"192.168.1.208":{"Reachable":true,"Success":1,"Timeout":0,"MinTime":82,"MaxTime":82,"AvgTime":82}}}
17:57:52 RSL: tele/tasmota_4B3316/RESULT = {"Ping":{"192.168.1.222":{"Reachable":false,"Success":0,"Timeout":4,"MinTime":0,"MaxTime":0,"AvgTime":0}}}

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core Tasmota_core_stage
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@s-hadinger s-hadinger mentioned this pull request Apr 15, 2020
6 tasks
@arendst arendst merged commit 615c2dd into arendst:development Apr 15, 2020
@MarkCiliaVincenti
Copy link

Works for me :)

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

Successfully merging this pull request may close these issues.

3 participants