How to ping from Python?

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Fri Mar 02, 2012 6:00 am
HomeAutomationPlugins.com offline
Posts: 41
Joined: Feb 18, 2012

How to ping from Python?

Hi,

I'm trying to develop a plugin to ping an IP address (constantly) and raise an event when the ping returns (when it didn't previously) and when it doesn't return (when it did previously).

The application is to constantly ping the IP address of some Samsung TV's in my house to determine whether they are turned on or not - i.e. when the TV's are turned off they don't respond to a ping, when they are on they do.

Could anyone give me a pointer in the right direction? What I'm really stuck on is how to do the constant ping in Python - all the examples I've found on the web seem overly complex for this very simple application...

Thanks in advance!

Posted on
Fri Mar 02, 2012 12:22 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How to ping from Python?

A quick Bing search finds ping.py.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron