How can I test whether or not I have an internet connection?

Post your questions and help other users.

Moderator: Martin

Post Reply
Econdoc
Posts: 153
Joined: 28 May 2016 20:06

How can I test whether or not I have an internet connection?

Post by Econdoc » 10 Mar 2017 15:36

What I think should be a simple problem turns out to be a tough nut to crack.
Assume that I am connected to my home router, but the internet is down. (WiFi is all I care about, not cell data)

IF I use the trigger WiFi Connected it returns TRUE, since I am connected to the SSID (but not to the internet).
If I use the condition Active Network Type, it also returns TRUE under these conditions.

How can I test whether or not I have an internet connection? There must be a way!

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: How can I test whether or not I have an internet connect

Post by Scotty » 10 Mar 2017 15:55

The most obvious way would seem to be to send an Action / HTTP Request (to a reliable web site). If it fails, you'll get an error message.

Or perhaps download a dedicated app (PingTools, for example) and use automagic to run that?

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: How can I test whether or not I have an internet connect

Post by Econdoc » 11 Mar 2017 11:41

Thanks for the reply. Following up on your reasoning, I tried using the Condition Host Reachable, with ping. I used an IP address for a DNS server (Opendns) as the address. This seems to work!

Thanks for the guidance.

akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Re: How can I test whether or not I have an internet connect

Post by akapelis » 25 Jun 2017 16:03

What trigger do you use please?

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: How can I test whether or not I have an internet connect

Post by Econdoc » 25 Jun 2017 18:09

If I understand your question correctly, the ping is a CONDITION, not a trigger. Please see previous posts.

akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Re: How can I test whether or not I have an internet connect

Post by akapelis » 25 Jun 2017 19:46

I use this but it doesn't work.
Attachments
Screenshot_2017-06-25-21-41-48.png
Screenshot_2017-06-25-21-41-48.png (73.16 KiB) Viewed 21147 times
Screenshot_2017-06-25-21-41-57.png
Screenshot_2017-06-25-21-41-57.png (60.03 KiB) Viewed 21147 times

User avatar
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

Re: How can I test whether or not I have an internet connect

Post by Bingwu » 26 Jun 2017 08:55

Ciao Akapelis!

Type: Automatic
Host: www.google.com

does not work with me either!

Type: Socket
Host: www.google.com
Port: 80 (also 443)

or

Type: Ping
Host: www.google.com

is working!

greeting
Peter

akapelis
Posts: 41
Joined: 13 Jul 2016 20:51

Re: How can I test whether or not I have an internet connect

Post by akapelis » 26 Jun 2017 13:24

The "socket" option works perfectly, the "ping" option works fine when I'm connected by WiFi, but returns me false (no internet) when connected in 4G.
Thank you Peter.

Post Reply