Is it possible to nest the following into one sequence? All questions

I have successfully had lights triggering at sunset for some time, but I notice depending on the weather this is either too soon, or too late.

I have built an applet in IFTTT using Weather Underground to trigger a webhook to update the following variant: 


This can be one of 4 variants, this is a limitation of Weather underground, I basically have 4 weather conditions, all have a varying degree on daylight. Clear, Cloudy, Raining, Snowing.

I've amended my basic trigger at sunset to include a check the home_weather variant, and trigger a sequence based on it being true, but this does require all 4 sequences attempting to run. Each sequence has different adjustments in the time offset.


Is anyone able to advise if its possible to nest this in one sequence, or any suggestions on how to improve this?


Asked by Hdsn5555 on June 19, 2020, at 11:59am (edited on June 19, 2020, at 12:01pm)

I actually have something similar set up at home.  Every day at 4pm IFTTT triggers an applet which pushes the weather conditions into a variable called conditions.

Then I have the following sequence set to run:


I'm only checking for one weather condition, but you should be able to tweak this for your own weather conditions.

I've added this to the shared library, so if you want to import a copy you can access it here.

Hi Derek, this is great. I'm pretty sure I've figured out how to incorporate all 4 weather types into the sequence, rather than waiting for sunset, I set it up to trigger with a test variable being set to true.

I'm currently sharing it here:

https://sequematic.com/import-sequence/3832

Seems to work well, so will leave it shared. Feel free to take a look.

Looks good!  Based on that, here's what I would expect to happen:

  • If it's snowing, it will run 60 minutes before sunset
  • If it's raining, it will run 50 minutes before sunset
  • If it's cloudy, it will run 35 minutes before sunset
  • If it's clear, it will run 25 minutes before sunset
I don't know if you'll get an exact match from Weather Underground so you might want to do the 'contains' comparison rather than 'equals'. It's also case sensitive so you will need to consider that as well (I could add an option to make it case insensitive, I'll add that to my todo list).
Also, sorry I missed your chat earlier. It normally comes through to my phone but for some reason it didn't. Looks like you've worked this out nicely though!

Excellent, it's triggered correctly this evening, I've setup 4 applets based on the available weather condition triggers, I'm not sure what other options there are for updating the variable within Sequematic? How is everyone else doing it?


That's a great approach! I actually have an applet which pushes the weather condition into SEQUEmatic every day at 4pm (which is always before sunset here in Sydney).  Screenshot below. That works well, but doesn't mean the weather is always up to date. I think I'll be updating mine to use your approach instead.


Sweet, glad it's going to potentially give you further accuracy. It's by no means bullet proof, but gives a lot better accuracy than none at all, or every 24 hours.

I've implemented the same in my 'off at dawn' sequence. Though, I won't really see the benefit of it until autumn, wintertime as I usually asleep still in the summer. I imagine based on your geographic location you tend to notice Your triggers at sunset must be a lot more right obvious right now!

I'm please to announce there is now built in weather functionality in SEQUEmatic.  You can use it either as a condition or as a trigger.

Great, I've already amended my dusk/dawn sequences to utilise this feature.

Are you able to advise where the data is being pulled from, i.e which weather service? It opens up so many opportunities to greater control on sequences going forward.

The data is coming from Open Weather Map. In the case of a condition, it gets the latest conditions when the sequence runs. For triggers, the weather is fetched every 10 minutes. The frequency of the data updating depends on location so the reults will vary depending on the location selected.

Amazing, tweaked my sequences today, which ran successfully. One question I do have, I've got 4 weather conditions clear, cloud, rain, snow. If though, for example it was drizzling, would this be seen as rain or not?

I believe you were using this to adjust when your sunset sequence was running? Rather than using weather condition, you might find the percentage cloud cover is a better thing to check as this will impact how early it gets dark.

In terms of rain and drizzling, these would be two different conditions and cannot occur at the same time - you will get one or the other depending on the type of rain.

Thanks Derek, there is an interesting discussion on a forum here about the impact of cloud cover, which suggests that might not be the best way to capture if it's darker sooner or not. But I'll certainly trial is today and see how I get on.

Further to my last post, I notice open weather does current show approx. UV index for a given location, this could be a better way to capture how light/dark it is.

I notice this is should be available through the API.

https://openweather.co.uk/blog/post/how-use-openweathermap-uv-index 

You're right in that cloud cover on a dry day is generally lighter than cloud cover on a rainy day. You may need to include a combination of cloud cover and the weather description (rain, drizzle, etc).

It does look like UV is available via an API, although it's separate to the general weather API. I can look at adding this if there's demand, but I don't believe UV is affected by cloud cover and during winter even on a clear day UV can be lower than on an equally clear day in summer.

i was also using a sunset trigger before, untill we had a day of bad weather and it was dark 3 hours before sunset .i then started to think of another way, the way i do it now is that i use an old smartphones light sensor to toggle a "dark" variable in sequematic.

i just have it standing in between my blinds and the window with the light sensor facing the blinds,i also use it as a security camera and to check on my dog when im away i also set it to automatically play music when i get home, so if you have an old smartphone or tablet you could do something similar.


Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.