Online Sensor plugin

kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Online Sensor plugin

Post by kmarkley »

This is a very simple plugin that creates Indigo sensor devices to reflect aspects of your internet connection. Basically, you can use it to:
  • Ping servers
    • to test general internet connectivity
    • to test availability of a particular service
  • Check your public IP address
  • NEW: run speed tests via speedtest.net
For speedtest devices, you can set a threshold that determines whether the sensor reports ON or OFF. Full speedtest.net results are available as device states.

Details: https://github.com/kmarkley/Indigo-Onli ... /README.md
Download: https://github.com/kmarkley/Indigo-Onli ... ses/latest

Previously posted here.
Speedtest idea/example via FlyingDiver here.
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Online Sensor plugin

Post by Professor Falken »

This is a really useful plugin. Thanks for sharing it.

Is there any way to trigger either the pinging device or the Speedtest one as an Indigo action (which could then be either scheduled via Indigo or triggered by either by event or on demand by a Control Page interaction)?

Similarly, does anyone know the best way to round a Speedtest float result to nearest integer? I was trying to use some gauge images (similar to the WU ones shared a while back by DaveL) to display these results on a CP, but it seems that decimals play havoc with the hersuistics of image selection.

Thanks.
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Online Sensor plugin

Post by kmarkley »

Professor Falken wrote:Is there any way to trigger either the pinging device or the Speedtest one as an Indigo action
Just use the Device Actions -> Universal Controls -> Request Full Status Update action.
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Online Sensor plugin

Post by Different Computers »

Great idea! My scripted method never worked right, but that's because I'm a terrible scripter.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Online Sensor plugin

Post by Professor Falken »

Just use the Device Actions -> Universal Controls -> Request Full Status Update action.
Oh that's cool. I didn't know that trick.

Thanks.
User avatar
amannone
Posts: 34
Joined: Tue Nov 23, 2010 7:50 am
Location: Boston, MA

Re: Online Sensor plugin

Post by amannone »

Great plugin idea. Can't wait to install and play around with it!
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Online Sensor plugin

Post by ckeyes888 »

Should this plugin run on 10.6.8?
It loaded fine but it won't create any sample devices, get the "hover over red areas" alert.

Thanks,

Carl
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Online Sensor plugin

Post by kmarkley »

I'm not aware of anything that would be dependent on OS version, but haven't tested it on multiple versions.

Are there any red areas to hover over?

Can you turn on debugging and post the log results?
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Online Sensor plugin

Post by ckeyes888 »

No, nothing to hover over...just the alert below the device name.
This is repeated in the log:


Online Sensor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Online Sensor Error Error in plugin execution UiClosed1:

Traceback (most recent call last):
File "plugin.py", line 87, in closedPrefsConfigUi
<type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'logger'

Thanks,

Carl
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Online Sensor plugin

Post by kmarkley »

That sounds more like an Indigo version issue than an OS version issue.

I know that adding the logger class to plugins was relatively recent, but I don't recall exactly when. I have only tested the plugin on Indigo 7. Which indigo are you running?
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Online Sensor plugin

Post by kmarkley »

I have just updated the plugin on github. This version allows users to disable automatic device updates -- for folks like Professor Falken who want to use a schedule instead.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Online Sensor plugin

Post by jay (support) »

kmarkley wrote:That sounds more like an Indigo version issue than an OS version issue.

I know that adding the logger class to plugins was relatively recent, but I don't recall exactly when. I have only tested the plugin on Indigo 7. Which indigo are you running?
You have the ServerApiVersion key specified incorrectly in your plugin. If you depend on any 7.0 features (like using the logger) then you have to specify 2.0 as the required api version (you have it set to 1.9). This will keep it from installing (and probably loading) on anything older than 7.0.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
kmarkley
Posts: 187
Joined: Tue Nov 15, 2016 8:04 pm

Re: Online Sensor plugin

Post by kmarkley »

Well, fudge. Pretty sure that's wrong on all my plugins. I'll update them this evening.

Thanks for the pointer.
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: Online Sensor plugin

Post by ckeyes888 »

Doh...so no go til I upgrade to 7 correct?

7 has me giving up much more than I gain at this point.

Carl
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Online Sensor plugin

Post by jay (support) »

ckeyes888 wrote:7 has me giving up much more than I gain at this point.
Care to elaborate?
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Post Reply

Return to “kmarkley's plugins”