I'm using AM on an Nexus 4/Android 5 phone at home to inform me if the home network goes down. I'm using Host Reachable condition to ping a local device.
The problem is that the Host Reachable sometimes fails even when everything (else) is working. It's as if the Nexus 4 has gone to sleep as far as Wifi is concerned (and Wifi is set as always on).
- When ever I get notified the network is down I can immediately re-run the flow and it shows it's up again.
- I don't think the network is actually going down for a few seconds as it would too much coincidence it's down just when I test it - my flow normally runs only every few hrs and the network runs normally.
- I've tried my router and also a Wifi connected smart plug as targets for the ping. Makes no difference.
A rather kludgy work-around seems to be to run the Host Reachable condition twice a few seconds apart and make sure the pinged device is unreachable both times, but does anyone know why this shoukd be necessary?
Host Reachable issue
Moderator: Martin
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Host Reachable issue
I remember myself using this condition, but it had the same result as you're describing.
Can't find the topic right now, but it essentially didn't work because of some "under-the-hood process".
Recently i figured that my phone (LG Nexus 5X) ignores sending out network signals when the screen is off... sometimes, not always (So yeah, good luck figuring that out).
The only simple solution was creating a checkloop with a Sleep action in between, to check whether the ping command gives off a positive result.
I noticed (from a widget that showed me the amount of tries afterwards) that this checkloop it could take up to 20+ fails before successfully reaching the router.
The interesting part is that whenever i turned on the screen, it just worked right after.
Except in my case, in which i also had to deal with VPN-process and just being awake and in a hurry to get to work. So it took some time to actually realize.
You could create a flow that turns on your screen for 2 seconds, and then refer to that flow.
Maybe it works perfectly fine with the Host Reachable condition. Please, let me know.
Can't find the topic right now, but it essentially didn't work because of some "under-the-hood process".
Recently i figured that my phone (LG Nexus 5X) ignores sending out network signals when the screen is off... sometimes, not always (So yeah, good luck figuring that out).
The only simple solution was creating a checkloop with a Sleep action in between, to check whether the ping command gives off a positive result.
I noticed (from a widget that showed me the amount of tries afterwards) that this checkloop it could take up to 20+ fails before successfully reaching the router.
The interesting part is that whenever i turned on the screen, it just worked right after.
Except in my case, in which i also had to deal with VPN-process and just being awake and in a hurry to get to work. So it took some time to actually realize.
You could create a flow that turns on your screen for 2 seconds, and then refer to that flow.
Maybe it works perfectly fine with the Host Reachable condition. Please, let me know.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)