Page 1 of 1
ping plugin
Posted: 12 Oct 2023, 11:57
by BartSr
Hi!
How can I use the ping-plugin?
Is there a usual binfile which includes this ?
For an application I want to be sure that some other esp's (ESP82) are alive. These are sending (by rules ) status info of GPIO which I want to use in a central one (ESP32)
Aim: sent open/close status of doors to central panel.
TIA
-Bart
Re: ping plugin
Posted: 12 Oct 2023, 12:54
by Ath
The ping plugin is available in all Collection builds, except for ESP32, as the underlying code is explicit for ESP8266, and not compatible with ESP32. Some experiments have been done on getting this to work as intended, but have not been successful/stable yet. A lot of work is currently going into compatibility of ESP32 with newer Arduino (3.0) libraries (with many breaking changes
), and once that is completed, the Ping plugin will most likely get some attention.
Re: ping plugin
Posted: 12 Oct 2023, 12:55
by TD-er
I've been looking into porting the ping plugin to ESP32, but so far was not successful.
I have planned to look into it a bit more after transitioning to the ESP-IDF 5.1 SDK as a lot has changed since IDF 5 and I don't want to re-do it in a few months.
Re: ping plugin
Posted: 12 Oct 2023, 14:14
by BartSr
Ath and TD-er, thanks for your prompt reply.
Stupid me I didnot check using ESP82 but ESP32 instead.
I flashed from
https://td-er.nl/ESPEasy/latest/ (most fast way for me to flash!!) using ESP_Easy_mega_20230929_collection_A_ESP8266_4M1M and it was peanuts to try this ping-option.
Maybe it's somewhere in the docs but if ping fails the counter gets updated. Is there a limit to that countervalue?
-Bart
Re: ping plugin
Posted: 12 Oct 2023, 15:05
by Ath
There is no limit, other than the max. value allowed in such a variable (
theoretically 3.4028237 × 10^38
), but you will get an event generated every interval with the last stored value. You can reset that using the "pingset,<new_value>" command.
Re: ping plugin
Posted: 11 Nov 2023, 11:56
by BartSr
Well, I managed to use ping.
The status is diplayed by zero (ping Ok) or a number.
But once I reboot the device there is only a dash (-) iso a value.
Reset of the device (nodemcu) brought back a 0 as value.
How to prevent that dash-value? Using Pingset command?
I am using the ping (several) to monitor a doorlock.
TIA
Bart
Re: ping plugin
Posted: 12 Nov 2023, 11:56
by BartSr
In addition: would it be a solution to have a rule providing a certain delay somewhere in the proces during start-up?
Re: ping plugin
Posted: 12 Nov 2023, 12:27
by TD-er
You can put a "taskdisable,N" (with N being the task index) in the rules like this:
Code: Select all
on System#Boot do
taskdisable,1 // Disable task #1 for now
TimerSet,1,10 // Set timer #1 at 10 seconds
endon
on Rules#Timer=1 do
taskenable,1
endon
Re: ping plugin
Posted: 12 Nov 2023, 13:08
by BartSr
TD-er. I hoped that a time delay would enable the ping activity but sorry to say result not as ecpected.
But after I pressed reset on NodeMCU the value 0 for fails pops up prior to have the device enabled.
Any suggestion? For info also firmware data.
- Schermafbeelding 2023-11-12 130602.jpg (15.65 KiB) Viewed 4484 times
- Schermafbeelding 2023-11-12 131201.jpg (40.45 KiB) Viewed 4481 times
Re: ping plugin
Posted: 12 Nov 2023, 19:06
by BartSr
After digging through some esp-documentation I found that pulling the rst-pin low wil have same effect as pressing rst-button.
I tried by puling the rsp-pin to ground (simple using a wire) and indeed then the 0-value appears as ping-value.
So the solution is to pull rst-pin low after boot. Is that possible from rules or do I have to use an optocoupler to pull rst low controlled by a regular I/O pin?
or LongPulse_ms,xx,0,10 where xx needs a replacement for rst-pin.
-Bart
Re: ping plugin
Posted: 12 Nov 2023, 19:46
by Ath
During initialization this plugin sets the Fails value to 0, so it's a bit surprising that it is displayed as -.
Though I'm understanding more and more of how ESPEasy works, this is kind of a mystery to me.
You use a rather old release of ESPEasy. Though it would be strange if it would change behavior, but can you update to a more recent release? Either by downloading from
https://github.com/letscontrolit/ESPEasy/releases or installing via
https://td-er.nl/espeasy or
https://td-er.nl/espeasy/latest (the latest beta available) These last 2 links require either Chrome or Edge browsers to be able to install, because the technique used isn't (yet) implemented in other browsers.
Re: ping plugin
Posted: 12 Nov 2023, 20:21
by BartSr
Ath, more recent built seems to be the clue.
After boot the ping value shows zero now.
Stupid I didnot try that sooner.....
Thanks as usual!
-Bart
Re: ping plugin
Posted: 12 Nov 2023, 21:06
by Ath
Ok, great that it's solved now
The fix for resetting that 0 value was merged in March, so would have been included in the May-build you where using, but a lot has changed since that build, so it's rather hard to go back in time.
Re: ping plugin
Posted: 23 Nov 2023, 16:52
by BartSr
The ping plugin has run for 10 days without problems. There are 5 devices to be monitored. So far so good.
Today I noticed for one ESP device around 2500 fails.Interval 5 sec. But I could open the relevant website as usual.
The only way to revert to 0 fails was to reboot the ESP with ping plugin.
Known problem?
Bart