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

It occurs on all multi component devices in iOS

@nayelyz is there any update on this?

1 Like

Not yet, sorry. Today we asked the team again (because others asked as well) to check our report about that but they haven’t provided their feedback. I increased the severity of the issue as well

2 Likes

Thanks for the reply and update

I’ve pushed out an update to this driver: Version 2023-04-24T00:20:33.095683352.

This update provides the new ability to reset the counter to a specific number. (@DieselDaisey @blkwll). Existing automations that used the counter reset button to reset to 0 will continue to work. New automations can use the new control to choose the number to reset the counter to. (Note that this feature is for the counter, not the duration.)

A new counter device will need to be created to use the new feature.

iOS app users may not be able to access this using the Create routine function, since that seems to be broken right now for defining actions in secondary components. Hopefully this will be fixed in the near future (SmartThings knows about the problem). iOS users can instead use Rules.

In Rules, you can use the following:

"commands": [
  {
    "component": "counter",
    "capability": "partyvoice23922.resetnum",
    "command": "resetValue",
    "arguments": [
      {
        "integer": 12 
      }
    ]
  }
]

The driver is available on my Shared Projects Channel here. More information is available in the driver README file.

3 Likes

Super! I look forward to testing it, when I have the opportunity.

Thanks for all you do!

1 Like

So, I jumped in to test it. I had to create a new device from within the utility before seeing the the changes.

So far seems flawless, although I’m not sure if the 1,000,000 maximum reset value is enough, but will let you know :slight_smile:

I like having the ability to both assign the reset value from within device controls, and as a THEN action. Very nice indeed!

I will report if anything seems wonky.

Thanks for the quick feedback. The 1M max was arbitrary so can be increased if needed. Unlike the way device settings work, if you have an integer-based capability field, it defaults to a max of 100 for some reason, so you’re forced to define a max.

1 Like

Thanks for giving the code, as you say, with iPhone I can´t create counter actions and so not able to sneak a view of the syntax in a routine. This time the driver updated overnight, so no idea why I had problems before, and its works perfectly. Great work as always, and much apreciated.

1 Like

Hi! The function to reset the counter is not working when its in automations…it works perfect to make something happen when a specific number is reached though.
Could it plese get fixed? :pray:
Edit: created a new device and will try the reset to x hours feature for a few days.

1 Like

Hey, I did jut notice that there isn’t a actionable counter reset (legacy reset to 0) in the device controls, but it does appear in the routines.

However, in the routine, if you execute the reset to value, it will reset to whatever number you assign there within the routine, even 0. That will override any counter reset value set in the device controls.

That’s the way I’ve been using it, but I completely overlooked the absence of the traditional counter reset (to 0) button within device control, initially.

Oh, i see only counter can be reset to a specfic hour. Will try to see if the normal reset now resets duration.

1 Like

Can you clarify what you mean by it not working?

There is no ability to reset to a specific duration, only to reset the counter.

That’s right - I removed it from the Controls screen (was a simple reset push button) in favor of the new field that lets you specify a specific number. Just use the new field and specify 0 if that’s what you want. The simple counter reset (to 0) push button still actual exists as part of the device and is available to automation routines. This was done so prior automations that relied on that button will continue to work.

1 Like

There are two functions of this driver: one is to track duration (number of seconds, minutes, hours, etc.) and the second function is a simple counter that can be incremented and decremented. The most recent change only applies to the counter, not the duration. The duration reset button should continue to work as before to reset the duration to 0.

1 Like

it works excellent, i save money now by only turning the pump on when there is sunlight, to let water flow through my solar collecting tubes. but because water has to flow every day either way, i use this tool to count total amount of hours the pump has been running. If not enough hours of runtime, it goes on anyway to reach the minimum per day to keep the pool clean!

Super and thanks for creating this!

In a routine, the field to reset a counter to a specified value has just disappeared. It was there and working and now the field is completely gone. If I create a new counter and use it in a routine, the field is there. I have two counters that this has happened to. No idea when or how it disappeared.
Screenshot 1 shows field in routine, 2 shows it missing.



By the way, having counters and timers to use in routines is very powerful, opens up a whole bunch of possibilities.

Are you sure you aren’t looking at an older counter device? The earlier version of the driver didn’t have the reset-to-specific-value button for the counter.

Try creating a new device and confirm that the reset-to-value button is there.

EDIT: If you have my API Browser+ app, go to the Devices → Devices menu, select the device from the list, and then push the “Profile” button. This will display the current profile for that device, and it would be interesting to see (1) which profile is active for the device, and (2) if it shows that the capability “partyvoice23922.resetnum” is included or not (under “Components”).

I don’t believe I had an older device as I only added your driver a month or two ago, and the driver is dated April. If I create a new device the reset to value option is there in routines. However, I have two counters in use that the reset to value option is no longer there, and I’m sure it was as I had a routine that was resetting the counter to 1 (not zero). I can’t explain this, and I can’t seem to repeat it when I create a new device and use it in routines. But look at my screenshots, one has the option, the other doesn’t.
I have 4 counters created. All four of them have the profile name: edgeutil_count.v3
And all 4 counters have capability “partyvoice23922.resetnum”

I’ve encountered a strange issue tonight. I had 2 counters that have been working great for at least a couple months. I created a third today and it’s doing exactly what I expected. I then created a fourth and for some reason any routine I make is not using the duration resolution when I try and create a routing with duration as the IF statement. I chose duration resolution of minutes but it is saying hours. I then created a 5th counter and set the resolution to minutes thinking I might get that one to work. . . and it is saying days as is the 4th. I just went ahead with the routine thinking it will using the right duration even though it’s not saying the right duration. Any suggestions?

EDIT: I just went back and checked the routine and it now says minutes, so seems it just took time to propagate.

Could it be that the older versions might need updating now? Have a couple running for a year or so and noticed this weekend that they’re not running in the rules that have them.
Tomorrow will substitute them for the latest version.