How to ping from Python?

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
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
HomeAutomationPlugins.com
Posts: 41
Joined: Sat Feb 18, 2012 12:38 pm

How to ping from Python?

Post by HomeAutomationPlugins.com »

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!
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: How to ping from Python?

Post by jay (support) »

A quick Bing search finds ping.py.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Locked

Return to “Extending Indigo with Plugins and Python”