Sunrise-Sunset and Calendar functions for edge

OK, but how do you suppose that is evaluated? I can think of a couple of ways it can be done. It could be looked up from the attribute on demand, or alternatively the Routine could subscribe to changes in the attribute and keep the precondition constantly updated like Smart Lighting seems to. It might perhaps take up to 24 hours before ‘Local Month and day One’ has a valid value, depending on how Virtual Calendar works. I really don’t know.

So that’s why I was querying how long the Routines had been left running. Just a thought.

1 Like

@martin.borg

It seems a problem of evaluation and intervals as a precondition

I have also refreshed virtual calendar so that it emits all events

I have tested your 5 intervals with virtual calendar and all 5 routines are executed.

I have done the same routines with 5 temperature intervals and it does the same thing

you should report it

It gives me the impression that they have introduced the conditions with intervals and they have not tested it sufficiently or maybe they have and the problem is another

A few days ago the lower limit did not work, I reported it and it was fixed without they communicating anythings to @andresg about the solution

1 Like

Ok - I see what you mean now. However, the Routines has been up for more than 48 hours and had already failed twice before I posted about the issue.

However, since your post, I tried something else, basically this very simple routine (and another 4 like it to cover the entire year):

And - at 17:00hrs, I received only one notification saying “It’s Summer!”, which is the correct and expected behaviour.

And so - Mariano’s driver is definitely working, I just need to see why it did not work for my irrigation schedules. Or perhaps - I will enable them and they will work, I have no clue. Let’s hope so!

Hmmm, that is interesting. As per my previous post (please see above), I set up a few test routines with different ranges - and only one executed.

I’ll wait and see what happens with the irrigation schedules today - and if all execute as you said, I will report it to ST support.

Regrettably, though the relatively simple Routine I posted earlier seems to have worked well, the irrigation routines did not work as well. Indeed, the actions of all five Routines were executed.

So, yes, I guess it needs to be reported.

For my part, I can guarantee that the driver is emitting the value 911 (Sep/11) and refreshes it when there is a change of day at 00:00 and every hour or when you make a refresh in the app.

The platform must save that value as the last known value.

1 Like

Thanks Mariano - is there a link I can follow to report this to Smartthings support? And I mean not from the mobile app, it requires a bit of explaining that I am not really looking forward to doing on a mobile phone…

We can tag to @andresg who was already aware of the lower limit interval comparison failure

Ok - thanks @Mariano_Colmenarejo.

@andresg - please have a look in the last few posts above. It seema from @Mariano_Colmenarejo’s and my findings that whenever a range is used in a precondition of a routine, it always returns true, even if the number falls outside the range. Hence if you have Routines to do different things based on a range of values (e.g. temperature. luminance, etc.) all such Routines will end up executing - because all preconditions returned “true”, though of course it is not the case.

Can you please check it out and verify this is indeed the case?

1 Like

Hi, guys

Are we having problems with ranges in Routines? Please confirm for me if this is still happening, in the meantime, I am going to do some tests on my own and share this with the team to see if they know anything about this.

Hi @andresg - yes, it is still happening - though not on all Routines. Until this very morning, I had a set of 5 Routines that are mutually exclusive depending on a range of values in a precondition. These sets of values are all mutually exclusive, and therefore only one of those routines should have validated to “true”, and its actions executed. Instead, all five of them were executed.

@Mariano_Colmenarejo, every time I try to use your virtual calendar for a trigger, I put in my actions and, when I save, all the actions disappear. I try re-adding the actions and they disappear again. So I haven’t been able to successfully use this yet. Any idea why this might be happening? I am using ST WiFi hub and it installed fine and all the options look good on your virtual device but somehow it just won’t keep any actions.

Hi @guxdude

Could you put a screenshot of the automations before save it?

Hi, @martin.borg & @Mariano_Colmenarejo

I have been trying to replicate the error myself with no success. Did you happen to find any pattern on Routines with that issue? In any case, to investigate this further, I need to ask you for the names of the Routines that are not working well, and I also need to ask you to allow me access to your information. @Mariano_Colmenarejo I think you have already provided that access, @martin.borg I am not sure if you ever did this before but in case you don’t here is the procedure to do so:

  1. Go to the SmartThings Web (my.smartthings.com)
  2. Log in to your Samsung Account
  3. Select Menu (⋮) and choose Settings
  4. Toggle on Account Data Access
  5. Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.

I will do this soon, and I will let you know the name of the misbehaving Routines asap. note, however, that @Mariano_Colmenarejo’s examples are likely better than mine since his are temperature ranges, whereas mine are ranges of dates based on an attribute of his Calendar for Edge.

I have just done this, and selected period of one week - which I trust should be enough. The names of the respective Routines are:

  1. IRR: Seasonal, Winter Schedule (SoY)
  2. IRR: Seasonal, Spring Schedule
  3. IRR: Seasonal, Summer Schedule
  4. IRR: Seasonal, Autumn Schedule
  5. IRR: Seasonal, Winter Schedule (EoY)

@montyfert @andresg

I already found why it doesn’t work, although it seems unbelievable! And I don’t know if I can explain it.

This automation that has as a precondition an interval of days, expressed numerically.
And a condition that if the light turns on in that period then send notification

Removing the precondition to do a test shows the automation as when any of the conditions are met.
Then It were working as an OR condition.!!!

I have selected when all the conditions are met

and then I have put the interval of days as a precondition again.
Now it works like a precondition but AND

So I had done 5 routines for 5 periods and all of them were working as OR configurations without knowing it, since routine only showed one precondition and one condition.
All 5 routines executed when Turn On the light

Now only the routine corresponding to the correct interval is activated: 0916 (sep/16)

@montyfert

What is happening to you is that you have several OR conditions in your routines, for your risks switches and the precondition also behaves like a mad OR condition, instead of a precondition for the whole routine.

Please @andresg check this strange behavior

1 Like

Looks like my problem is I want to do a month range and a time. If I just put in the month range it is ok. When I add a time with specific days of the week, then everything disappears except the time and day of week I set. I am trying to set up my sprinkler automation which has different watering restrictions based on month. Looks like I would have to use a separate virtual switch and routine for the time and then use that with the calendar to get it working. A little clunky but could work. Here are some screen shots.

This works:

But if I try this:

Then it ends up like this:

Also, I cannot select in the virtual calendar both a month and time of day. When I put in 500 (for 5 am) the month range disappears and vice versa.

Thanks for any feedback or tips you might have.

Hi @guxdude

To me works fine the routine

Strange. I just did this and took the screen shots just before posting. Not sure why my app/hub/etc doesn’t like it. I only installed the virtual calendar a few days ago so it should be up to date.