Timed Devices plugin

Posted on
Tue Dec 26, 2017 6:22 pm
howartp offline
Posts: 3290
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Timed Devices plugin

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

Posted on
Tue Dec 26, 2017 10:06 pm
kmarkley offline
Posts: 109
Joined: Nov 15, 2016

Re: Timed Devices plugin

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.

Posted on
Wed Dec 27, 2017 1:57 pm
howartp offline
Posts: 3290
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Timed Devices plugin

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

Posted on
Wed Dec 27, 2017 2:27 pm
kmarkley offline
Posts: 109
Joined: Nov 15, 2016

Re: Timed Devices plugin

Glad you got it sorted.

Posted on
Mon Jan 01, 2018 8:58 am
Japple55 offline
Posts: 201
Joined: Sep 26, 2015
Location: Florida

Re: Timed Devices plugin

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

Posted on
Tue Jan 02, 2018 10:54 am
daveHawk offline
Posts: 11
Joined: Feb 11, 2017

Old Man Needs Help With Python for Timed Device Plugin

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")

Posted on
Tue Jan 02, 2018 11:55 am
FlyingDiver offline
Posts: 2365
Joined: Jun 07, 2014
Location: Cape Coral, FL

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

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

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Jan 02, 2018 1:48 pm
kmarkley offline
Posts: 109
Joined: Nov 15, 2016

Re: Timed Devices plugin

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?

Posted on
Tue Jan 02, 2018 1:55 pm
daveHawk offline
Posts: 11
Joined: Feb 11, 2017

Re: Timed Devices plugin

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

Posted on
Tue Jan 02, 2018 6:54 pm
kmarkley offline
Posts: 109
Joined: Nov 15, 2016

Re: Timed Devices plugin

That was a bug. Fixed in v0.0.19 now in plugin store.

Posted on
Tue Jan 02, 2018 10:19 pm
daveHawk offline
Posts: 11
Joined: Feb 11, 2017

Re: Timed Devices plugin

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

Posted on
Tue Jan 02, 2018 10:20 pm
daveHawk offline
Posts: 11
Joined: Feb 11, 2017

Re: Timed Devices plugin

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

Posted on
Mon Apr 02, 2018 8:22 am
vtmikel offline
Posts: 328
Joined: Aug 31, 2012
Location: Boston, MA

Re: Timed Devices plugin

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

Posted on
Wed Apr 04, 2018 11:42 am
kmarkley offline
Posts: 109
Joined: Nov 15, 2016

Re: Timed Devices plugin

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.

Posted on
Sat May 05, 2018 2:20 pm
Scotfree offline
Posts: 30
Joined: Sep 26, 2014
Location: Scotland

Re: Timed Devices plugin

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.

Who is online

Users browsing this forum: No registered users and 1 guest

cron