This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to

This forum is now read-only for archive purposes.

Wheather forecast in flow

OetAelseOetAelse Member
edited June 2017 in Questions & Help
I'm looking for way to use a wheather forecast for my location as a trigger, for example if the forecast for today is sunny and 25 degrees roll down the shutters.



  • CyberSponkCyberSponk Member
    edited June 2017
  • Priknr1Priknr1 Member
    edited June 2017
    Weatherunderground indeed supports several triggers in flow.

    I wanted to have exactly what you are talking about, have shutters go down  when between 10:00 and 16:00 the weather is "Zonnig"  and temp is > 21degr.  But so far my flow is not working somehow. Have to test a bit more
  • CyberSponk, i have the weatherunderground app installed but the possible triggers are based on wheather conditions not on forecasts.
  • Priknr1, could you post your flow?
  • JasperBJasperB Member
    edited June 2017
    @OetAelse may I ask why you want it based on a forecast and not on actual the actual weather? If you really want it based on forecast, I can try to implement it in my own app when I publish it. And on forecast you mean on a daily basis? (e.g. Tomorrow will be raining with a max temp of 20 and min temp of 5)

    I did it using my own app, I'll try publishing it next week.  Maybe that can help

    @OetAelse, here is my flow based on curret weather (updated every 10 min). To stop my curtains going up and down all day, I use the variable to check if the curtain has been moved today (other flow resets the var @ night)
  • Het weer is veranderd means:  Temperature rised, OR, Cloudy changed to Sunny, or........ ?
  • JasperBJasperB Member
    edited June 2017
    Temp changed, or humidity changed, or atmospheric pressure, or windspeed, or %cloudiness, or overall weather (sunny, cloudy, rainy...) changed.

    However, I'm making it into a device now (like a multisensor) so you can do weather changes on individual level (so a card for temp changed, card for humidity changed etc)
  • @JasperB, looks just what i need! Looking forward for your app. Did you give your app a name already?
  • WRosWRos Member
    edited June 2017
    This week I had the same question for the Screens.
    This evening I've created the weather status from Weather Underground with the HTTP app.
    Action Card:

    1. URL:  "[PERSONAL_KEY]/conditions/q/pws:IUTRECHT413.json"
    2. JSONpath: $
    3. BetterLogic: String Variable

    All the possible weather conditions: (last 6 month in the Netherlands)
    • Clear
    • PartyCloudy
    • Scattered Clouds
    • Chance of Rain
    • Rain
    • Snow
    • Tstorm
    • Overcast
    • Fog
    • Mostly Cloudy
    For the forecast:
    1. URL:  "[PERSONAL_KEY]/hourly/q/pws:IUTRECHT413.json"
    2. JSONpath: $.hourly_forecast.0.condition     !!!!Special number [0]!!!!!
    3. BetterLogic: String Variable
    Changing number [0] will result in the forecast in hours. Eg. $.hourly_forecast.12.condition will response the weather condition over 12 hours.
  • @WRos, could you please describe the steps with more details. I do not have (yet) lots of experience with flows. Looks good as far i can see.
  • WRosWRos Member
    edited June 2017
    Step 1: created a weather underground account. And get a personal key. (Api developers)
    Step 2: Install BetterLogic and HTTP request apps on Homey.
    Step 3: Create a new flow with a trigger, e.g. "Every hour". Place the action card from the HTTP APP in the "then" column.
    Step 4: Enter the values I recommended, with your own personal key.

    Every time when the action card is triggered, the BetterLogic variable is updated with the String of the weather condition. You could follow it in the tag menu.

    In the action flow for your screen, you could use the "and-column" to check the weather condition before you close your screens.
    In another flow you could use a trigger card "when weather condition-changed", and "weather is rain", than open screen.


  • @WRos, got the flow working now, thanks for your support. I want to rol down the shutter when the weather conditions are clear or partially clouded. Can I combine these status in one betterlogic check. It should be a OR statement but not a AND statement.
  • WRosWRos Member
    edited June 2017
    The "Or" is present, by building an extra flow.
    You could make 10 flows, for each condition one. In these flows, you could switch a BetterLogic Boolean: "ZonneSchermWeer/SunScreenWeather " true/false.

    This new Boolean you could place in the "And" column. 
    Trigger: weather conditions is changed
    And: SreenWeather is true, and it's between sunrise an sunset. 
    Then: close screen

  • @WRos, thanks. Got everything working now!
  • WRosWRos Member
    Thank you too. I had the same question. You had push me to think smarter.
  • WRosWRos Member
    edited June 2017
    To be winterproof I created one extra variable: "Max Temp Forecast". Make an extra Flow.

    Before closing the Screen, Homey checks this value. At wintertime (Max. temp forecast < 15 degrees) the Sun will help to heat my home. 
    1. URL:  "[Personal_KEY]/forecast/q/wijk_bij_duurstede.json"
    2. JSONpath: $.forecast.simpleforecast.forecastday.0.high.celsius
    3. BetterLogic: Number Variable
    In total 17 flow to automate a screen.  :) Now I've never think about this screen.
    Before I had a Sun Sensor, but I have never replace this sensor after a rebuilding.
  • @WRos, great project! As far I can see starting van firmware version 1.3 the number of flows can significant be decreased because the availability of the else statement.
Sign In or Register to comment.