Page 4 of 7

Re: Timed Devices plugin

PostPosted: Tue Dec 26, 2017 6:22 pm
by howartp
kmarkley,

Have you found or ironed any bugs around Threshold devices?

I've just found my landing timer was "Active" with count = 1 and offString = sometime last week, but it hadn't expired and was kinda stuck. Thus none of my landing motion sensors were triggering the landing light and it was kinda dark on the way to the bathroom in the middle of the night!

Rebooting your plugin didn't reset the device state either - it stayed at the above, which surprised me - I expected it to clear the timer when I reset the plugin?

Peter

Re: Timed Devices plugin

PostPosted: Tue Dec 26, 2017 10:06 pm
by kmarkley
Hi Peter. Sorry you're having issues, but I'm not sure there's enough info here to help.

state='active' and count=1 should indicate that one of your tracked device states or variables is True and the plugin device has a threshold of 1. Is this the case? You might want to double check your device configuration.

Restarting the plugin does cause it to check the state of every tracked entity and update the count state. This is why I suspect the issue may be in your configuration. (The same can be accomplished a bit easier by just disabling then re-enabling the plugin device.)

Also, in case it's not clear, the timer does not start until count become less than threshold. In other words:

count >= threshold --> device goes on, state is 'active'
count < threshold --> device stays on, state is 'persist', timer starts
timer expires --> device goes off, state is 'idle' or 'accrue'

Hope this helps. If not, please provide the full device configuration. Also check if any of the device states change when your tracked entities change.

Re: Timed Devices plugin

PostPosted: Wed Dec 27, 2017 1:57 pm
by howartp
Hi again.

Right, I've had a play and found the problem.

When I created my Landing "Threshold" device, I duplicated it from my Kitchen "Threshold" device.

For some reason I then only changed one of the trigger devices in its config, so the landing was still triggering Active/Count=1 whenever the Kitchen was in motion.

Sadly the kitchen motion sensor died whilst "On" last week so it never sent "Off" - which was therefore holding the landing timer threshold Active and preventing it timing out.

The kitchen motion sensor is the most active in the house, and has the most frequent detection settings in config, so it dies far more than the rest - I do need to get a 12v wire to it from the adjacent plug socket but I haven't got around to it yet.

So - nothing caused by your plugin, only my own stupidity!

Peter

Re: Timed Devices plugin

PostPosted: Wed Dec 27, 2017 2:27 pm
by kmarkley
Glad you got it sorted.

Re: Timed Devices plugin

PostPosted: Mon Jan 01, 2018 8:58 am
by Japple55
kmarkley,

Finally got my head wrapped around your Persistence and Threshold Timers. Has REALLY simplified my use of motion sensors. AWESOME plugin!!! Thanks so much for writing it!

Jim

Old Man Needs Help With Python for Timed Device Plugin

PostPosted: Tue Jan 02, 2018 10:54 am
by daveHawk
I have 14 Insteon leak sensors that I need to monitor heartbeat activity on. I created an Alive Timer for each of them, and I need a way to monitor the Alive timers without having to create a trigger for each of them. I thought I could create one Timed Device Threshold timer that would look at all of the Activity timers, but it appears that the Threshold Monitor will only work on "real" devices.

I then decided to write a python script that periodically scanned the Alive Timers, but I have not had any luck. Can someone please give me some help. Below is my script, which of course does not work.

###### Code ######
tId = "com.perceptiveautomation.indigoplugin.Timed Devices"
timerPlugin = indigo.server.getPlugin(tId)

##### ID's of Timed Devices Activity Devices
TestDevice = 469879056
BevBar = 691487634
DishWasher = 326677126
HallBath = 704412823

Devices = [ TestDevice, BevBar, DishWasher, HallBath ]

for DeviceID in Devices:
####
### I have no clue as to the syntax of the following
###
if timerPlugin.DeviceID ('onOffState' ):
indigo.variable.updateValue(1889959117, "on")
else:
indigo.variable.updateValue(132913739, "off")

Re: Old Man Needs Help With Python for Timed Device Plugin

PostPosted: Tue Jan 02, 2018 11:55 am
by FlyingDiver
daveHawk wrote:
I have 14 Insteon leak sensors that I need to monitor heartbeat activity on.


Why reinvent the wheel?

http://www.cynic.org/indigo/plugins/onl ... viors.html

Re: Timed Devices plugin

PostPosted: Tue Jan 02, 2018 1:48 pm
by kmarkley
FlyingDiver has a point.

That notwithstanding, this should not be the case:
daveHawk wrote:
it appears that the Threshold Monitor will only work on "real" devices

Just tested on my setup and Alive Timer devices are selectable in Threshold Device configuration. This was added a couple versions ago. Are you running the latest?

Re: Timed Devices plugin

PostPosted: Tue Jan 02, 2018 1:55 pm
by daveHawk
kmarkley wrote:
FlyingDiver has a point.

That notwithstanding, this should not be the case:
daveHawk wrote:
it appears that the Threshold Monitor will only work on "real" devices

Just tested on my setup and Alive Timer devices are selectable in Threshold Device configuration. This was added a couple versions ago. Are you running the latest?




Yes, running the latest version. Alive Timer devices are selectable, but don't work. Works fine on real devices.


Sent from my iPhone using Tapatalk

Re: Timed Devices plugin

PostPosted: Tue Jan 02, 2018 6:54 pm
by kmarkley
That was a bug. Fixed in v0.0.19 now in plugin store.

Re: Timed Devices plugin

PostPosted: Tue Jan 02, 2018 10:19 pm
by daveHawk
FlyingDiver wrote:
daveHawk wrote:
I have 14 Insteon leak sensors that I need to monitor heartbeat activity on.


Why reinvent the wheel?

http://www.cynic.org/indigo/plugins/onl ... viors.html


I have installed the Cynical Behavior plugin and it is going greatly simplify my approach to the leak sensors. Amazing. Thanks.



Sent from my iPhone using Tapatalk

Re: Timed Devices plugin

PostPosted: Tue Jan 02, 2018 10:20 pm
by daveHawk
kmarkley wrote:
That was a bug. Fixed in v0.0.19 now in plugin store.


Thank you I'll be trying it shortly.



Sent from my iPhone using Tapatalk

Re: Timed Devices plugin

PostPosted: Mon Apr 02, 2018 8:22 am
by vtmikel
Hi there-

I've been getting this error occasionally for two of my devices. Despite this, it seems to be working.

Code: Select all
Timed Devices Error             "Nanny presence" count out of sync [count:-1, max:1]
   Timed Devices Error             "Nanny presence 60 min threshhold" count out of sync [count:-1, max:1]


Both of these are Threshold timers.

Mike

Re: Timed Devices plugin

PostPosted: Wed Apr 04, 2018 11:42 am
by kmarkley
vtmikel wrote:
Code: Select all
Timed Devices Error             "Nanny presence" count out of sync [count:-1, max:1]
Timed Devices Error             "Nanny presence 60 min threshhold" count out of sync [count:-1, max:1]


The plugin keeps an internal count of how many tracked devices are on, and relies on communication from Indigo to know when anything changes. This error indicates that the internal count has gotten out-of-sync (less than zero or more than max), which implies that the plugin is missing messages from Indigo.

This is most likely not an issue directly with the plugin, and I wouldn't be surprised if you were also seeing Server Communication errors. If you have configured the plugin to display the timer value in the UI, then you might want to turn that off as it does increase the communication load to/from Indigo. Otherwise, it's a matter of tracking down the root cause of the communication error (which is a difficult task, as I know too well).

Sorry I can't be more helpful.

Re: Timed Devices plugin

PostPosted: Sat May 05, 2018 2:20 pm
by Scotfree
Kmarkley,

Just wanted to thank you. I’m really grateful for this plugin which adds functionality that frankly I’ve been struggling with not being part of the Indigo offering for some time to handle my different lighting control requirements.

To answer the manual switch on question someone had, I’ve standardised on Threshold timers for the automatic switching on and off of lights (reducing the off-delay of motion sensors to 10 secs) backed up by a longer-timed Activity timer for each one which monitors the motion sensor (or device group) and also the device itself. That then times a switch off for each fixture if it has been switched on manually without the motion part being triggered.

I plan to do much more with the Alive and Persistance timers.

Really pleased at the result and appreciate your hard word in addressing my issues.