Online Sensor plugin

Posted on
Sat Feb 04, 2017 1:29 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Online Sensor plugin

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.

Posted on
Tue Mar 07, 2017 10:44 am
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Online Sensor plugin

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.

Posted on
Tue Mar 07, 2017 10:50 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Online Sensor plugin

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.

Posted on
Tue Mar 07, 2017 10:57 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Online Sensor plugin

Great idea! My scripted method never worked right, but that's because I'm a terrible scripter.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue Mar 07, 2017 11:24 am
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Online Sensor plugin

Just use the Device Actions -> Universal Controls -> Request Full Status Update action.


Oh that's cool. I didn't know that trick.

Thanks.

Posted on
Fri Mar 24, 2017 2:32 pm
amannone offline
User avatar
Posts: 34
Joined: Nov 23, 2010
Location: Boston, MA

Re: Online Sensor plugin

Great plugin idea. Can't wait to install and play around with it!

Posted on
Sat Mar 25, 2017 5:11 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Online Sensor plugin

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

Posted on
Sat Mar 25, 2017 9:02 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Online Sensor plugin

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?

Posted on
Sat Mar 25, 2017 9:08 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Online Sensor plugin

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

Posted on
Sat Mar 25, 2017 10:59 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Online Sensor plugin

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?

Posted on
Sat Mar 25, 2017 11:00 am
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Online Sensor plugin

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.

Posted on
Sat Mar 25, 2017 11:26 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Online Sensor plugin

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

Posted on
Sat Mar 25, 2017 12:04 pm
kmarkley offline
Posts: 185
Joined: Nov 15, 2016

Re: Online Sensor plugin

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

Thanks for the pointer.

Posted on
Sat Mar 25, 2017 1:53 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Online Sensor plugin

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

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

Carl

Posted on
Sun Mar 26, 2017 6:47 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Online Sensor plugin

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


Care to elaborate?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 0 guests