[APP][Pro] Sun Events (Update SDK3)

Hi, I try to update the production version only but there is apparently no solution for. I will update the 2.x release to beta today or tomorrow…

2 Likes

Thanks for the latest update (2.1.2) @MarcelT .

It’s not completely clear to me, but are all of the changes (bugfixes) in the 1.4-branch (f.e. 1.4.7 and 1.4.8) also implemented in the 2.x-branch?

Yes, 1.4.x will be replaced by the 2.x

1 Like

Hello

I’m using sun events to control the position of my screens and blinds. Last few weeks I noticed unexpected behavior for which I think I found the root cause.

I use multiple flow “and’” cards, type "time is after {event}; in combination with events linked to certain altitudes to set the blind position. Works perfect during mid summer.

At this time of the year, the sun does not reach the highest altitude of 55 degrees. But, the event is still created and the time for this event is set to 1 jan 1970, 01:00.

As actual time during the day is always later as 1:00, the "and"flow card still triggers a “true” condition, resulting the remaining part of the flow sets the wrong blind position.

More logical, expected behavior would be to not create the event if the altitude is not reached, or alternative, output “false” in the relevant flow cards.

Please check my reasoning, and if possible, change the flow card behaviour.

Best
Martijn

When I have some time I will change this to your suggestion.

2 Likes

Thanks! I’ll keep an eye on the change log…

Is it possible to get the day length/how long the sun is up in a variable?
I’m using a growlight for my plants and if the daylight is shorter than x hours the light needs to be turned on.

I think this is already in the test version

1 Like

Thanks i’ve found it. Only problem is that it’s a text tag and not a number :frowning:. So now i can’t use it for bigger/smaller than cards. Is it possible to change the ; to a . ?

Times are not possible in numeric format (inside Homey).
So you can convert it yourself when you need it as a numeric value.

(If this is offtopic, I’ll move it somewhere else)

With 3 variables and logics cards:


Or with a Homeyscript card “Run code with argument and return number-tag”,
and it creates a Homeyscript tag you can use in other flows:

That’s a neat solution :smiley: and something I can work with.

1 Like

How is it possible that Morning Goldenhour Ends got triggered in the afternoon?

Looks like it is the morning. (9.25)

1 Like

Hm very strange. I have a simple flow that sends me a notification on that trigger. I guess the message had to be delayed delivery I guess…

Guess it’s OK then. Cheers.

Hi there, I am struggling with setting up a flow turning on the outdoor lights within and for a certain time period and turning them off outside of the time corridors.
This is the flow that doesn’t work:


I also have a flow checking every 5 minutes if the current time is within those corridors, that flow runs just fine but it is somewhat against the idea of using sun events… :wink:

What is not working?
On or off and what flow exactly

IF Night ends (06:39)
AND It is between 06:39 and 08:44
THEN Light On
OR Light Off

06:39 is not between 06:39 and 08:44 so it will turn off the light.

IF Sunset (16:39)
AND Time before 18:10
THEN Light On. THis works

If you use a ofset of -1 for the IF Night ends then is it between Night ends and Sunrise ends, then the light will turn on.

I hope i have it at the right end.
Correct me if i am wrong.

1 Like

Start with the basics I would say, with this flow the light is on during darkness only. What do you miss in this flow? Because we can add that later on:

2 Likes

@MarcelT , does this functionality works for you ? Unfortunately I’m getting error : Cannot read properties of undefined (reading ‘toLowerCase’)`

sunevents

Server HTTP GET /manager/flow/flowcardcondition/homey:app:com.cyclone-software.sunevents/homey:app:com.cyclone-software.sunevents:cond_special_day/autocomplete → Error 500: Cannot read properties of undefined (reading 'toLowerCase')

Thank you.

I needed four light on - off periods (on around 8 am, off during the day, on in the evening, and off during the night), and I was assuming that events continue to be fullfilled once fulfilled, so just two flows in one smart flow would suffice… they appearently don’t.
The flow turned on the light at “night ends” , but didn´t turn it off during the day…
So I created 4 flows in one smart flow, everything works fine now.

1 Like

@Sharkys Works for me. Do you have the latest test version?

1 Like