Sunrise - before & after

By setting the option 30 minutes before sunrise, does that mean anytime between 30 minutes before sunrise and sunrise?
Or only 30 minutes before sunrise?

Als de zon opkomt om 06.00 dan schakelt Trigg om 06:00 uur bv een slimme stekker. Gebruik je de optie “30 minuten voor”, dan zal de slimme stekker om 05:30 schakelen.

It would be nice to be able to make the condition “The time is between” with sunset/sunrise and not only fixed times.
This way I can combine it with a Location condition to turn on the lights when I come home after dark.

1 Like

Hey all, Sunrise/sunset has been a big discussion these last couple of days. We see that we need to find a good way to make sure different scenarios are possible. How does this work?

When you make a trigg with the condition “15 minutes before sunset”, this condition will be true during the period 15 minutes before sunset (which we calculate based on the given location) until 15 minutes after sunrise the next day. See the scheme below

Why do we do this? Well, let’s say you want to combine this condition with something like coming home (Location). You make a trigg “WHEN it is 15 minutes before sunset AND I am at Location Home THEN turn on the lights”. If we were to interpret this as an exact moment, this would only work when you are already at home at 15 minutes before sunset. While you probably want your lights to turn on whenever you’re at home and it is dark, regardless if you came home first or it became dark first. Even if you come home in the middle of the night after some good partying, you’ll still want your lights to turn on if it’s still dark. That’s why we made it a period where we mirror the timeframe to use as the end of that period.
And don’t worry - your lights will not keep turning on the whole night while you’re at home. The rule will only run when one of the ‘when’ conditions changes.

To answer @Frank-NL question: When you use “30 minutes before sunrise”, the period will be 30 minutes BEFORE sunrise until 30 minutes AFTER sunset the same day. So in combination with @EdwinOtten’s suggestion of “Time is between” you can make better and more precise timeslots to execute your actions.

I hope this helps!

3 Likes

I have created a trigg with

If 30 mins before sunrise, between 6:30 and 8:00 on weekdays

Then turn on the lights.

Currently the sun rises at 6:40 so 6:30 is 10 minutes before sunrise but it still works.
Hence my question. And your answer explains it well.

In winter, this needs to be a longer period before because when the sun rises at 8:31 the lights will not turn (8:31 - 30 minutes = past the 6:30 - 8:00 slot). But now I understand I might as well specify 120 minutes before sunrise and it would still work as I want.

On second thought. My trigg will still activate when the sun is already up, so that’s not something I want?

How would I do this? I want to turn on the lights after 6:30 but only if the sun is not fully up yet.

We had the exact same question a couple of days ago. Use the Time-channel with 0 minutes AFTER sunset. Add the condition Time is 6:30.
That way, the condition is true between sunset and sunrise (so during the night) but will only trigger at 6:30 when the sun is not up yet (both are true).
When the sun goes up at 6 AM, your lights will not turn on because at 6:30 it is after sunrise and the first part is not true anymore.

Here’s the trigg you can use

Demo licht

het 06:30 is en het 0 minuten na zonsondergang is in Amsterdam - schakel B2 demo lamp 1, B2 demo lamp 2 en B2 demo lamp 3 aan

I feel a small explainer video coming up… :wink:

3 Likes

I use the following triggi to turn on the lights when it is cloudy.
I already have a rule in the house to turn on the lights at sunset. We have a switch we manually push to start a rule to turn off the lights when we go to bed.
What happens now is that when we wake up in the morning(600h) all the lights in the house are on.
So this triggi turns on the lights after 2300h.(which is after sunset for sure).

I want this triggi to activate my rule/scene between 20minutes before sunset and sunset only.

What is the best practice?

What your trigg does right now is the following
WHEN it is cloudy/rainy/etc at your location
AND time is between 20 minutes before sunset and 20 minutes after sunrise the next day
AND time is between 0 minutes after sunset and 0 minutes before sunris the next day
THEN activate the scene

So during the night, when it gets cloudy, rainy, snowy or foggy, you scene will activate. This is not the desired action of course. What yo would like is to switch on the scene between sunset and 20 minutes before.
We don’t have this by default built in but there might be a work around. The conditions would be
WHEN it is cloudy/rainy/etc at your location
AND time is between 20 minutes before sunset and 20 minutes after sunrise the next day
AND time is between 16.00 - 23.00
THEN activate scene

This way, the above conditions will only be true in the time window 16:00 - 23:00 AND it is 20 minutes before sunset AND it is cloudy/rainy/etc
The timeslot is wide enough for the complete year to cover the sunset. All three conditions must be true for the trigg to execute.

I hope this helps!

Frank

1 Like

HI, new user here…
Im trying to create a trigg that switches on my pond-pumps during daylight.

gave or take half an hour before sunrise until half hour after sunset, my pumps should be on.

Which conditionset should i be using?

Thanks,
Marijn

Hi Marijn

You could use 30 minutes before sunrise as a condition. This would leave the pump on until 30 minutes after sunset.
Let me know if it works!

Best,
Frank

just to be safe:

using 30 min before sunrise will switch on the switch at sunrise, and switch off at sunset? It has to work making these to switches in my setup.

When you use the condition “30 minutes before sunrise”, this condition will be true 30 minutes before sunrise until 30 minutes after sunset. But I would have to check how this will work with a pump. What do you use as an action? Is it Triggi Connect? Or a specific device?

Frank

ok cool.
and yes, through Triggi connect.

For now im am a bit in Limbo, because i want to use a switched smart outlet like the Fibaro https://www.iungo.nl/nl/bestellen/i/92-tussenstekkers/444-fibaro-tussenstekker-met-energiemeter or some comparable device, connected to my Iungo.

If it makes things easier, think of the pump to be a lamp :wink: switch on at sunrise, switch of at sunset (give or take 30 minutes). No push-and -hold-while -true, release -while -false.

Ive made a connect triggi, but apparently i need it to use the http curl call, instead of just being able to switch on/ switch off

That’s why I’ve also added a push message to see if the trigger itself works. For now I’ve used 2 rules, one for switching on and one for off.

As you suggest that won’t be necessary, still, i would suspect the trigger being false after sunset won’t trigger a switch. I think in my setup i might still need the 2 rules, don’t you agree?

Marijn

Hi @MarijntHvdB

You’re right, you would need two triggs. The pump will switch on 30 minutes before sunrise but will not automatically switch off. So if you make a second trigg to turn off the pump 30 minutes after sunset it will work.

thx!
problem 1 solved.

Now how to proceed… Could you offer some assistance in programming this switch through the Triggi Connect interface? simply activating doesn’t do anything.

Cheers,
Marijn

Hi @MarijntHvdB

Our lead developer @Daniel made a connection between a toy train and Triggi Connect. He uses Triggi Connect as an action and made a bridging service to access the train from the internet. Check it out on our blog and let me know if this works for you!

Not really…

Cool project though!

No, Im looking for a way to input the right criteria/conditions into the Triggi-connect, to have the switches on my Iungo switched. From on to off, or from off to on obviously.

No extra hardware should be needed, just the right input in the triggi.
As food for thought: i can query the power-values (as in if sunpower > 2400, then push message) , i can’t do the following: if sunpower > 2400, then switch Switch1 to On)

Cheers,
Marijn

Hi @MarijnHvdB,

I think triggi cannot help you here (switching Zwave plugs connected to iungo).
The iungo platform is a standalone controller with its API only accessible through the internal network.
In the latest Beta version we have included a driver for sending data to the triggi channel (since the triggi channel is a web URL, any device with an internet connection can upload data to this triggi channel).
However getting data from triggi to iungo needs a reverse mechanism, iungo does not have a global exposed URL and therefore cannot be directly accessed from the web.

Ok Thanks @rodney_iungo,

Cool you both interconnect here! Will be on the lookout for developments in the great Iungo app for sure.

Cheers,
Marijn