Requesting EDGE driver to accumulate time (see post #11 for edge driver)

Any update? This issue usually happens weekly when this automation occurs (weekly). It should occur again tomorrow. I would like to learn more about this issue before then to try to fix it.

No, there are no updates, sorry. Please, check again the behavior of the routine, is it possible that you to share screenshots of the routine to see how many and which actions it has, please?

Have you also tried dividing them into two routines to check if they execute better? If it’s based on a single trigger, you can have two instead.

@TAustin ST Wi-Fi hub running 45.11 is getting an error when I turn on the Edge Counter Utility and I never get any accumulated time displayed. Driver version 2022-09-01T17:17:05.113495102

connecting... connected
2023-01-31T01:03:55.509145099+00:00 TRACE Edge Counter Utility V1  Received event with handler capability
2023-01-31T01:03:55.516277432+00:00 INFO Edge Counter Utility V1  <Device: c0abc8cf-c672-4ae7-bb5e-77d42e1600bd (Counter Utility)> received command: {"args":{},"capability":"switch","command":"on","component":"main","positional_args":{}}
2023-01-31T01:03:55.521534765+00:00 TRACE Edge Counter Utility V1  Found CapabilityCommandDispatcher handler in thisDriver
2023-01-31T01:03:55.525846161+00:00 INFO Edge Counter Utility V1  Switch turned >> on <<
2023-01-31T01:03:55.531167807+00:00 INFO Edge Counter Utility V1  <Device: c0abc8cf-c672-4ae7-bb5e-77d42e1600bd (Counter Utility)> emitting event: {"attribute_id":"switch","capability_id":"switch","component_id":"main","state":{"value":"on"}}
2023-01-31T01:03:55.606255182+00:00 ERROR Edge Counter Utility V1  Counter Utility thread encountered error: [string "st/dispatcher.lua"]:233: Error encountered while processing event for <Device: c0abc8cf-c672-4ae7-bb5e-77d42e1600bd (Counter Utility)>:
    arg1: table: 0x687c40
[string "init.lua"]:192: attempt to index a nil value (local 'contactset')

I bet you have contact sensor behavior set to Disabled?

There’s a very simple explanation: developer error. I added that option to the device profile without checking for it in the code! Fixed and pushed out in driver update version: 2023-01-31T02:28:58.225814942.

Thank you for pointing this out! You’re the first to find it. :slight_smile:

Yes I do so that makes sense. Maybe if I’d taken a second to look at the error in the log I would have figured that out :slight_smile:

And I seem to have a way of running into things that nobody else does :wink:

Great - I’ll keep that in mind when I need something tested!

I’ve got a simple routine I’m testing where if the counter is equal to or greater than 15 (seconds in this case), then I should get a notification and turn off the counter. However, the notification is never sent and the counter continues to accumulate time. Nothing obvious in the logging and the update is sent every 10 seconds. Ideas?

That sounds similar to one that I’m running, except mine is in hours and I’m resetting it (turn off is linked with the physical device in a separate routine). Mine worked ok last time it was due to fire. Maybe the seconds unit is the issue.

Duh, my bad. I was checking for the counter vs the duration. Too much multi-tasking :slight_smile:

1 Like

Not sure if this is the appropriate place to post this but, all of my counter utility devices have completely stopped working. They’re not being triggered by any automations, and I can’t turn them on manually through the ST App.

The original device I have used to generate new counter utility devices will no longer create new devices. Not sure if this is a bug in my downloaded driver or something else has gone wrong. Deleting and replacing all the counter devices is my last resort, I’m hoping there is a more simple fix.

I you tried rebooting your hub. Sometimes when a driver stops working this will fix it.

This is a great utility and I’ve got a couple of them running to control lights and for presence detection. I was trying to set up a rule (I’m new at that) to reset only the counters, at a fixed time. Can it be done?

“component”: “counter”,
“capability”: “partyvoice23922.resetalt”,
“command”: “push”

Push doesn’t do the same as for Main, or maybe I need some other argument as that doesn’t work.
Thanks in advance for any information

SOLVED

DRIVER UPDATE NOTICE

Driver Name: Edge Counter Utility V1
Version: 2023-03-21T05:11:21.236908438

Updates made:

  • Fixed Control screen labels (may only be seen on newly created devices)
  • Added new Settings option to change the increment/decrement amount for the counter. For example, you can now set it to increment/decrement by 10 or 100 or whatever.
    (@AutomateYourLife)
    • Note: you will have to create a new counter device to have the new increment amount Setting option

No other action is required; your hub will be automatically updated.

2 Likes

You’re the man! Thanks sir!

1 Like

I can’t figure out if it is possible to talk to Alexa and have it query the running duration of this Utility Counter? I’ve got it set to minutes with a 30 second refresh.

I installed a door contact sensor in the kid’s bathroom. I can activate the Utility Counter when they close the door. I want to essentially be able to ask Alexa how long the bathroom door has been closed.

I got everything else figured out like resetting the Utility Counter if the door has been open more than x-amount of time. I’ve only been able to ask Alexa if the Utility Counter is on or off. It wont tell me the running time.

Don’t think it could be done with Alexa as she can’t understand the minutes, only the virtual switch, if it’s on or off. You could have an ST routine that when a certain time is exceeded then Alexa tells you, but probably you’ve thought of that

1 Like

Better yet, put an Echo device in the bathroom and have it make the announcement “You’ve been in the bathroom too long” :slight_smile:

3 Likes

Yep, I have the Alexa in the bathroom already. They use it to play music and I’ve trained them to set a sleep timer to alert them to get out (the music then stops). But getting them out of the bathroom is worse than trying to coax a hermit crab out of its shell.

I have the Alexa automatically announce a 15 minute warning. I don’t want to over do it (yeah right, I probably already have).

I can look at the Utiity Counter in the app and see the running time. It just would be so much easier to be able to query Alexa for the door closure running time.

Hi, would there be anyway in routines to be able to set the counter number.

My use case is I use the counter utility as countdowns to special events, I create routines that push a subtract on each of them each day, I create tiles on my dashboard themed to the occasion with the counter number embedded in them

What I was hoping to achieve is create another routine that when they get to 0 the routine will set the counter back to either 7/14/28/365 or any number of choice

I can at the moment do this manually with your updated driver by setting increments to say 365 power on to set the number and then set increments back to 1 again

Thanks

I have an idea on this, although I haven’t tested it, but it’s working in my mind…

If you had a routine that activated another routine when the counter remains at zero for x amount of time. The activated routine could press the add button while the counter remained below the target number until it reaches that target number.

*might need another condition to to make the second routine active and also prevent adding a number every time the counter subtracts from the target number.