SmartThings Community

Power Allowance Exceeded does not work


#1

Hi everyone,

So i created a smart lighting rule with the following options:

  1. Which Lights: All Lights are checked
  2. What to do: Turn Off.
  3. Trigger?: Power Allowance Exceeded
  4. Minutes?: 2
  5. When?: 11pm to 5am

I don’t have any other options set.

My intended purpose was so that if one of the kids turns up a light at night, it shuts itself off after 2 minutes.

Nothing fires off for this rule. Nothing ever turns off.

Am I incorrect in my assumption for the usage of this type of trigger?

Is it possible to troubleshoot these rules via some kind of simulation or a rule log or something ?

Let me know

Thanks!


(sidjohn1) #2

Also you can contact support, support@smartthings.com


(Bobby) #3

It works for me. I would force close the app after you set it up and/or power cycle the hub.


(Edward Pope) #4

I do not know for sure, but maybe add a switch that is most likely to turn on the lights for the kids and add that to the trigger? I know when I use the Power Allowance trigger it works for me with my setup. But, I have a switch included. So that may be the answer for you.


(Bobby) #5

Afterthought. Have you tried running the automation without the time restriction?


#6

Quite a few schedulers in smart things won’t run until the next day. It just has something to do with how the initial one gets set. So if you set up something to happen at sunset on Thursday it may actually run for the first time on Friday.

I’m not sure exactly when this is true, but it is something I have run into with other time based rules. So it might be that it would run OK the next day.


#7

I was playing around a bit more with this today and dropped the schedule to only one light and it works. When I switch back to all the lights, I noticed now that it only seems to shut off 1 or 2 of the lights. I have not had the patience yet to sit there and just add 1 by 1 to see what the number is, but it may seem to be somehow related to the number of switches/lights defined in the rule.


#8

Ok played with it a bit more, so apparently it only handles 4 devices at a time.

I was turning on 6 devices at a time, and the logs show the app only sending 4 requests to 4 of the devices to shutoff after the 1 minute timeout. The other lights just stayed on.


#9

Anyone else try this on more than 4 devices?


(Edward Pope) #10

I will try to get around to this tonight. It probably is a bug, but we need to confirm it.


#11

SmartThings has a standard limitation that any one SmartApp can only schedule four distinct future events. It sounds like this particular wizard is not preventing you from putting in something that violates that rule.

http://docs.smartthings.com/en/latest/smartapp-developers-guide/scheduling.html

Only four jobs may be scheduled at any time

To prevent any one SmartApp or device-type handler from using too many resources, only four jobs may be scheduled for future execution at any time.

You can usually install more than one copy of any given smart app and then Each instance can control four schedules. Breaking it up this way just helps the background platform scheduling be more efficient.


#12

That would seem kind of kludgey from a user perspective.

I would think having one Smart Lighting App with all the rules in that one app is infinitely more manageable than multiple apps of the same name.

For example in this scenario (at least the way I read it) is if I want to have a time limit on 20 devices while in night mode…
I would need:
1 Smart Lighting App with 4 rules with 4 devices in each rule. (16 devices)
1 Smart Lighting App with 1 rule with 4 devices. (4 devices)
etc etc as devices are added.

I guess if this is the way to work around the limitations, would it be possible to rename the different instances of the Smart Lighting Apps?

Also I would think this means that any one given rule within the Smart Lighting app cannot have more than 4 devices? Say I want all lights to turn on at the same time ( same example of 20), I would need the number of apps/rules as previously mentioned??


#13

The “run four” restriction only applies to schedules set by the smartapp. Things that you want to happen in five minutes or 15 minutes or whatever. Not schedules that trigger the smartapp to begin with of the number of devices it handled. So it doesn’t limit, for example, how many lights you could have come on at sunset.

As far as different names for each instance, yes, you can do that. And are encouraged to do that by most of the set up wizards. For example, the smart lights smart app lets you give a custom name to each automation that you create.

So again, the limitation applies only if the smartapp is trying to schedule something to run in the future after that smartapp has already completed its own run. At the time it was announced, they said this was to improve cloud efficiency because some smartapps were just hogging all the resources.


#14

Sorry about my confusion, but I think I may be confusing the defnition of “Smart App” and the automations within the Smartapp.

For example I just tried installing an additional Smart Lights app but Smartthings doesnt seem to let me add an additional one, it just takes me to the existing rules/automations within the app (which i know those names can be changed, but not the smartapp itself)

So I am guessing Smartthings is refering to an automation within the Smartapp in the 4 limitation?

Deeper I go into the rabbit hole :slight_smile:


#15

It’s hard to use the smart lights app as an example for anything else, because it’s a special kind of “solution” that is created by smart things themselves and spawns children which are called the automations. So it does work a little differently. You’re only allowed now to have one instance of that particular parent. That didn’t used to be true.

If it’s just a regular Smartapp from the marketplace, you can install whatever instances you want. I think. :wink:


#16

Thank you sir for your patience and information :slight_smile: