SecondsSinceLastChange

Plugin to show the SECONDS SINCE last change (in contrast to DATE OF last change) of a selected device/state in (almost) real time in a variable to enable triggers.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

https://www.dropbox.com/s/lnv5r7rpi2v98 ... 2.zip?dl=0v0.6.2

fixed:
had an error in the calculation even as simple as that one was.

Karl
Shutter
Posts: 345
Joined: Fri Mar 07, 2014 7:11 am
Location: London, UK

Re: SecondsSinceLastChange

Post by Shutter »

Thanks Karl.

Simon
shapa
Posts: 483
Joined: Mon Sep 08, 2014 6:51 am
Location: Swindon

Re: SecondsSinceLastChange

Post by shapa »

It works :)

Thank you very much! Very useful plugin.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

https://www.dropbox.com/s/3ra77sv6zdj32 ... 5.zip?dl=1v-0-6-5

fixed:

In case you delete a device to be tracked: the plugin now will stop tracking THAT device and remove it from its tracking list. The secondsSince .. variables will not be deleted.

Karl
Asconasny
Posts: 161
Joined: Fri Jan 16, 2015 5:05 am

Re: SecondsSinceLastChange

Post by Asconasny »

Hi Karl

the plugin seems to loose configuration after some time,
I noticed yesterday that the variables was not updating and the tracking devices was gone from the configuration when i did a print tracking setup , so i configured it again and today its all gone again.
the variables is still there but when i do a print tracking i get:
secondsSinceLastChange Configuration: Dev-Name DevID.... State Parameters ........

No devices..

Will set it up again se what happens..

Regards
Asconansy
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

you should see something like this:
error; device with indigoID = 123456 does not exist, removing from tracking
when it removes a device from tracking, if not .. don't know how they disappear.

I have a small upgrade I will publish tonight.

Karl
Asconasny
Posts: 161
Joined: Fri Jan 16, 2015 5:05 am

Re: SecondsSinceLastChange

Post by Asconasny »

Found this in my log:

<type 'exceptions.StandardError'>: ServerCommunicationError -- timeout waiting for response

2016-04-06 08:57:50.481 mqttGateway Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2016-04-06 08:57:50.481 secondsSinceLastChange error; device with indigoID = 1085070662 does not exist, removing from tracking



Seems when i have this ServerCommunicationError most of my plugins seems to complain.




2016-04-06 15:29:58.329 Smart Devices Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "plugin.py", line 839, in deviceUpdated
<type 'exceptions.StandardError'>: ServerCommunicationError -- timeout waiting for response

2016-04-06 15:29:58.331 WeatherSnoop Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 454, in runConcurrentThread
<type 'exceptions.StandardError'>: ServerCommunicationError -- timeout waiting for response

2016-04-06 15:29:58.331 WeatherSnoop Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2016-04-06 15:29:58.332 Sonos Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 59, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 388, in runConcurrentThread
<type 'exceptions.StandardError'>: ServerCommunicationError -- timeout waiting for response

2016-04-06 15:29:58.333 Sonos Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2016-04-06 15:29:58.334 fingscan updating ipDevice 09 does not exist , (re)creating
2016-04-06 15:29:58.334 secondsSinceLastChange error; device with indigoID = 775372131 does not exist, removing from tracking
2016-04-06 15:29:58.335 mqttGateway Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 103, in runConcurrentThread
<type 'exceptions.StandardError'>: ServerCommunicationError -- timeout waiting for response

2016-04-06 15:29:58.335 mqttGateway Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2016-04-06 15:29:58.336 mqttGateway Debug Starting ConcurrentThread ... Active listener threads = 8
2016-04-06 15:29:58.340 fingscan in Line '5213' has error='NameNotUniqueError'
2016-04-06 15:29:58.341 fingscan MAC# A4:5E:60:DC:83:A3
2016-04-06 15:29:58.342 fingscan indigoIpVariableData: {'status': u'up', 'suppressChangeMSG': 'show', 'index': 8, 'nickName': u'Macbook Pro', 'WiFi': u'', 'deviceInfo': u'', 'noOfChanges': 8314, 'ipDevice': '09', 'WiFiSignal': '0', 'hardwareVendor': u'', 'timeOfLastChange': u'2016-04-06 15:11:00', 'usePing': u'', 'ipNumber': u'10.0.1.8', 'variableName': ''}
2016-04-06 15:29:58.342 fingscan allDeviceInfo: {'status': 'up', 'deviceName': u'Macbook Pro', 'devExists': 1, 'suppressChangeMSG': u'show', 'setWiFi': '', 'nickName': u'Macbook Pro', 'WiFi': u'', 'deviceInfo': u'', 'noOfChanges': 8314, 'WiFiSignal': '', 'hardwareVendor': u'\n', 'deviceId': 1238321489, 'timeOfLastChange': '2016-04-06 15:11:00', 'usePing': u'

Any idea whats going on?
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

ok this happens when you mac is overloaded. and the server does not answer. the an error occurs and the plugin thinks that the device has been deleted. and hence removes it.

will try to fix
Asconasny
Posts: 161
Joined: Fri Jan 16, 2015 5:05 am

Re: SecondsSinceLastChange

Post by Asconasny »

Okey, then we have the answer to that :)

Now my next question would be.. Overloaded? why would it be?, i thought indigo didn't use much resources
What kind of mac do i need? this is a I7 2.6 with lots of ram

Could it be the hardrive that can't keep up. thats the original 1tb HD 5400rpm

would a upgrade to SSD be the answer? (I hope so, an excuse to buy one :) )

Or is it something that happens from time to time.
Should i be worried?

regards
Asconasny
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

this is likely not indigo, but one of the plugins that goes off the rails and sends requests/ messages to indigo. then indigo server goes into overload and does not answer


when this happens check activity monitor/ sort cpu time/ click on top cpu user/ and do info/ look at open files. the first line shows the plugin name
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: SecondsSinceLastChange

Post by howartp »

Do you happen to be running Honeywell thermostat plugin?

That has a leak in it at moment, but Nick is waiting for Honeywell devs to authorise his update using official API.


Sent from my iPhone using Tapatalk
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

no I have a simple trane
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

https://www.dropbox.com/s/0nwytwfmwkpj6 ... 6.zip?dl=1

added/fixed:
if indigo runs into timeout, the plugin was removing devices as it thought that they do not exist anymore.
now it will try twice with 1 second wait in-between tries to connect to indigo if the first one fails.


howard that should reduce your problem, if indigo is really bad (> 1 second) it will still remove trackings.


Karl
Asconasny
Posts: 161
Joined: Fri Jan 16, 2015 5:05 am

Re: SecondsSinceLastChange

Post by Asconasny »

Im not using Honeywell plugin,

Thanks for the update, your support is amazing :D

I will check the activity monitor if I'm nearby the server when/if it happens again.

Regards
Asconasny
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: SecondsSinceLastChange

Post by kw123 »

v-0-6-7 https://www.dropbox.com/s/nivfqjve2s5pk ... 7.zip?dl=1

added an explicit timeout error check, then wait 5 seconds then try again. This is difficult to test as the condition has to occur

Karl
Post Reply

Return to “SecondsSinceLastChange Plugin”