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

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[Published] OpenWeatherMap app v0.0.8

2

Comments

  • Thank you very much for your help. I love the app, and in January everything worked fine. I hope I can get it started again. With Homey, the current weather works perfectly fine. 
    Now, I tested the same key with your link for the 5 days forecast. My browser shows me all the data. But when I use the key in the app, it finds the location but




    5 days forecast


    I just don't know what I do wrong. Do I need different API keys? Do I need a special one for the 5 days forecast?

    Kind regards...



    Hi Daniel,

    Try to update to rc11 when on experimental. Had the same issue on rc8 and after upgrading this afternoon the app received data.
  • Hi Vleege, thank you very much for your answer. I clicked experimental on my homey, but how do I update rc11? 

    Greetings
  • @Daniel1234 You can definitely use the same key.

    Sounds like it is an issue with the experimental release (thanks @Vleege), hopefully it is fixed in an update.

    Apart from that all you can try to delete and re-pair the device, I don’t know the details of the issue in the experimental release, it may not make a difference. 

  • Ok, I deleted everything, same problems. Now works, 5 days forecast not. v0.0.8 beta is running. What is an rc11 update? I don't know how to install. As I have already mentioned, I use experimental updates on my Homey. 

    Thanks for your support. 
  • @Daniel1234 rc11 is the latest experimental release. If you go to System -> Updates -> click 'Look for updates', and you should see 'Update available' with the information below, and the option to install it.

    Heh, the following line may be of relevance to you:
    • [RF] Fix for weather sensors that stopped working
    I hope it works for you,

    Regards, Anne

    --
    Versie 1.5.6-rc.11 247.7 MB

    1.5.6-rc.11

    • [Core] Fix timezone issues
    • [Core] Fix a problem that could prevent the time from synchronizing correctly
    • [Core] Fixed an issue that could lead to cloud disconnections
    • [Core] Improved boot time
    • [RF] Fix for weather sensors that stopped working
    • [SDK] Prevent a few methods from swallowing exceptions
    • [ZigBee] Fixed a crash upon resetting the controller
    • [ZigBee] Stability improvements
    • [Z-Wave] Stability improvements
    • [Z-Wave] Add heal command (Developer Tools)
    • [Security] Fix CVE-2017-5715
    • [Other] minor bugfixes and improvements

    This update is shipped as a full image instead of an incremental update


  • Hi, I don‘t exactly know what happened, this morning I received data. Everything is running perfectly. I‘ve just checked the Firmware Version, rc11 is running. Really great!!! Thank you Anne for the nice support
  • @Daniel1234 great!

    Top tip: disable firmware auto-updates. It will save you a lot of unpleasant surprises. You can then choose when to upgrade to which release, and for instance only update when a stable release becomes available.

    'Experimental' is just that, particularly early in the development cycle many things break. It really is for developers and people with a spare Homey unit dedicated to developing, and definitely not for the faint-hearted (more for masochists if you ask me ;-) ). 
  • How often should the current data be updated? in this moment I have parameters from 7:30 p.m. on the OpenWeatherMap data from 21:30 can be found. Is this normal??
  • anneanne Member
    I think it is a limitation in the free version of the API. Every 30 minutes the ‘current weather’ data is updated, but it is released with a delay of up to max. 2 hours. 

    The conditions for the free and paid plans are listed here: https://openweathermap.org/price
  • Hi Anna. Suddenly the 5 days forecast stops without reason. This insight shows a blue line for the current temp (current api) from openweathermap and the pink line shows the forecast (5day api (should be 6h ahead) . Looks like it is not as stable as I wish. Any idea how this can be fixed? I am using it to plan my screens on a hot day.


  • anneanne Member
    I notice something similar in my data, there's a gap from the 17th of may 08:00 until the 18th around 09:30, but only for the 5 day API data. This appears to be similar to the gap in your data?

    Note that I used the data exactly 24 hours ahead of the current time (green line in the screenshot below). I haven't seen this before, but then I haven't been looking for it either... I don't know whether this is a common occurrence or not. I do see some more gaps in the data when looking further back, however I have had Homey stability issues in that same period (too much Insight data), not sure if the data can be trusted. Do you see gaps in the data between the 8th of may and the 16th of may? 



    Anyway, I need to see if I can reproduce this while logging some connection details. If it happens to you, you can test if you can manually collect the data from Openweathermap.org to see if it is an API issue or not, for instance using an URL like this: https://api.openweathermap.org/data/2.5/forecast?q=<city>,<countrycode>&units=metric&lang=nl&mode=json&APPID=<API-key>;

    Regards, Anne (not 'Anna' by the way :|)
  • Hi Anne, (sorry about my bad typo!)

    I was starting the 5day app on the 15th but only received some data the 16th.
    Then there is a gap from halfway the 17th until halfway the 18th (looks like the same gap you are showing) and from the same from the 20th until 21 (allmost 22).

    I think this will give you the best view of the missing data.

    When it happens again I will make a direct API call to see what the response is and report it back to you.

    Thanks and regards, Marc


  • anneanne Member
    No worries ;-)

    It's weird... The first 'outage' (may 17th - 18th) seems to exactly match the outage in my data. I don't have any data missing between the 20th and the 22nd though.

    Note that small gaps are always possible, new data points are only added when the value has actually changed. With the big gaps there's definitely something wrong.

    There are some unexpected things in the API every now and then, and the documentation is not complete. Some parameters are only in there when the condition occurs (such as e.g. 'rain'). Perhaps there's something like that in the 5 day forecast. I'll have a look when I have a moment.
  • JuzerJuzer Member
    So I'm feeling kinda stupid at this time... I installed the app. When going to settings the app is installed but where do I fill in my API key to pair my device? I'm in a loss...
  • anneanne Member
    @Juzer no worries, you need to add an OpenWeathermap ‘device’, the same procedure as for devices such as bulbs, power plugs, etc. 

    You can add devices for the current weather, the weather forecast for up to 5 days, and the 16-day forecast, or for different locations. You will be asked for an API key and a location as part of the ‘pairing’ procedure.  
  • JuzerJuzer Member
    @anne That easy... Thx!

    So, is it me or is this not mentioned anywhere? 
  • anneanne Member
    edited June 2018
    It isn’t mentioned. I’ll add a note in the next update. 

    Edit: pairing is mentioned in the readme (ie. the text in the app store), although the link to the screenshot of the pairing view is broken. 

    But it could be made more clear. So it’s a little bit you, a little bit me I guess ;-)
  • OskarOskar Member
    @Anne
    I believe this is a great app and lots of options and capabilities. Thank you!

    One point I I find is not as expected. At least I cannot explain this: When I look at the current weather, the min and max temperatures seems to be different than what I see on the website. Basically the range of max and min is much smaller. Any idea what could be the reason?
    I also added weather forecast "devices" for 1 day, 2 day and 3 days and checked the min and max temperatures. All seem to be the same as the "average" temp, while also here on the openweathermap website different numbers are presented.

  • anneanne Member
    Mmm, it seems to work for me? What is the API URL you used, are you sure it is the current view? It should be http://api.openweathermap.org/data/2.5/weather?q=<citry,country>&APPID=<API key>&units=metric.

    The code is collecting the correct values:

    var temp = data.main.temp;
    var temp_min = data.main.temp_min;
    var temp_max = data.main.temp_max;


    And indeed the values correspond between Homey and the API when I check in Insights (screenshot below, today min. 17, max. 19).

    Regards, Anne


  • OskarOskar Member
    edited June 2018
    anne said:
    Mmm, it seems to work for me? What is the API URL you used, are you sure it is the current view? It should be http://api.openweathermap.org/data/2.5/weather?q=<citry,country>&APPID=<API key>&units=metric.

    The code is collecting the correct values:

    var temp = data.main.temp;
    var temp_min = data.main.temp_min;
    var temp_max = data.main.temp_max;


    And indeed the values correspond between Homey and the API when I check in Insights (screenshot below, today min. 17, max. 19).

    Regards, Anne


    When using the URL this is what I get back: 
    ..."main":{"temp":291.45,"pressure":1023,"humidity":77,"temp_min":290.15,"temp_max":292.15}...

    and for the device I filled in the intervals at 8 (for 1 day) for 16 (2 days) and one for 24 (3 days)
    for the today, 1 day, 2 day and 3 day this is what I get:
          

    Not sure what I may have done wrong, or misunderstood.
  • anneanne Member
    edited June 2018
    Ah. First of all, you need to supply &units=metric in the URL to get degrees celsius. What you are seeing is the temperature in Fahrenheit.

    There are three different data sources used by the App, one with the current weather conditions (presumably actual measurements), the 5-day forecast (in 3 hour intervals) and the 16 day forecast (1 day intervals). The screenshots of the tags are all of data from the 5-day forecast.

    The max and min temperature data refer to different things in the 'current' table as compared to the '5-day forecast' table. In the 5-day forecast table the meaning of the temp_min/temp_max parameters is different, and probably not really relevant... You may see some very small differences (e.g. "temp":21.87,"temp_min":21.87,"temp_max":22), but it does not refer to the maximum or minimum temperature in the interval. The API isn't very clear on this, but does state the following (refer to https://openweathermap.org/current):

    --

    Min/max temperature in current weather API and forecast API

    Please, do not confuse min/max parameters in current weather API and forecast API. In current weather API temp_min and temp_max are optional parameters mean min / max temperature in the city at the current moment to see deviation from current temp just for your reference. For large cities and megalopolises geographically expanded it might be applicable. In most cases both temp_min and temp_max parameters have the same volume as 'temp'. Please, use temp_min and temp_max parameters in current weather API optionally.

    --

    The 16-day forecast uses different min/max parameters, which do represent the minimum and maximum daily temperatures as you would expect. I guess I should put in a note for the min/max temp. in the 5-day forecast, or remove the max/min temp altogether from the 5-day forecast as they do not seem to serve any useful purpose.

    In your particular case, if you use the 16-day forecast table for the 1, 2 and 3 day forecasts, you will get max. and min. temperatures that are actually referring to the maximum and minimum forecast temperatures for those days.

  • Is it to possible to add the UV-index as a parameter? It is a beta-feature on openweather map but I am curious after the values and using it for controlling blinds
  • anneanne Member
    It's certainly possible, however I am not sure whether it is worth the trouble. Only one daily value is provided, the UV index for 12:00 pm. For your use case that's isn't really useful?

    What you can get from the API is a daily UV index the current day and an 8-day forecast. Any idea what that data could be used for with Homey? I guess you could set an alert in case the UVI forecast is above a certain threshold. Any other suggestions?

    For instance today's (current) value is 6.61, the forecast for the coming 8 days ranges from 6.08 to 7.32:
    [{"date_iso":"2018-06-21T12:00:00Z","date":1529582400,"value":6.08},{,"date_iso":"2018-06-22T12:00:00Z","date":1529668800,"value":6.63},{"date_iso":"2018-06-23T12:00:00Z","date":1529755200,"value":6.12},{"date_iso":"2018-06-24T12:00:00Z","date":1529841600,"value":6.91},{"date_iso":"2018-06-25T12:00:00Z","date":1529928000,"value":7.12},{"date_iso":"2018-06-26T12:00:00Z","date":1530014400,"value":7.32},{"date_iso":"2018-06-27T12:00:00Z","date":1530100800,"value":6.92},{"date_iso":"2018-06-28T12:00:00Z","date":1530187200,"value":7}]
  • OskarOskar Member
    anne said:
    Ah. First of all, you need to supply &units=metric in the URL to get degrees celsius. What you are seeing is the temperature in Fahrenheit.

    There are three different data sources used by the App, one with the current weather conditions (presumably actual measurements), the 5-day forecast (in 3 hour intervals) and the 16 day forecast (1 day intervals). The screenshots of the tags are all of data from the 5-day forecast.

    The max and min temperature data refer to different things in the 'current' table as compared to the '5-day forecast' table. In the 5-day forecast table the meaning of the temp_min/temp_max parameters is different, and probably not really relevant... You may see some very small differences (e.g. "temp":21.87,"temp_min":21.87,"temp_max":22), but it does not refer to the maximum or minimum temperature in the interval. The API isn't very clear on this, but does state the following (refer to https://openweathermap.org/current):

    --

    Min/max temperature in current weather API and forecast API

    Please, do not confuse min/max parameters in current weather API and forecast API. In current weather API temp_min and temp_max are optional parameters mean min / max temperature in the city at the current moment to see deviation from current temp just for your reference. For large cities and megalopolises geographically expanded it might be applicable. In most cases both temp_min and temp_max parameters have the same volume as 'temp'. Please, use temp_min and temp_max parameters in current weather API optionally.

    --

    The 16-day forecast uses different min/max parameters, which do represent the minimum and maximum daily temperatures as you would expect. I guess I should put in a note for the min/max temp. in the 5-day forecast, or remove the max/min temp altogether from the 5-day forecast as they do not seem to serve any useful purpose.

    In your particular case, if you use the 16-day forecast table for the 1, 2 and 3 day forecasts, you will get max. and min. temperatures that are actually referring to the maximum and minimum forecast temperatures for those days.

    Very clear.
    thank you
  • Could @anne or someone else help me out?

    For my curtains, i used to use old thermometers connected to Homewizard. Sadly, the data stops reaching Homey after a couple of days, so i switched to OWM. Based on the temperature outside, i should be able to close my curtains.

    Strangely, OWM says it is 20.98 degrees outside. This could be correct, it is a bit warm.



    Only, according to the flow card, it isn't above 18 degrees outside. This looks to be very incorrect.





    Both use today's weather for data.

    Am i doing something wrong?
  • anneanne Member
    Hi @marcotics

    Have you tried to refresh your screen in your browser? I have seen odd behavior when testing flows and mismatches between tag values and missing red crosses/green checks when using a flow view that had been opened previously (using Chrome).

    When I re-open the browser and flow view and enter the test flow, all works. Although I noticed it does not seem to use decimals when comparing the temperature, I'll look into that.

    Note that you can use 'the temperature has changed' OpenWeatherMap flowcard to trigger the flow (unrelated to the issue though). With that flowcard the flow is only triggered when the temperature actually changes. You can check the actual value of the temperature in the 'Tags' menu item (see screenshots below).

     




  • marcoticsmarcotics Member
    edited June 2018
    I might need to fine-tune things. Maybe need to use forecasts or something. The data used is around 3 hours old all the time. The sun heatens up the room from around 12 pm, but i see in the log the curtains close at 13.30. Also when checking weather today, i se a date en time from around 3 hours in the past. Might need to see if i get more frequent updates if i start paying OWM... EDIT: forget that, insane pricing that doesn't seem to update more frequent

    Still the best app so far for closing my curtains, thanks a lot!
  • MunnikMunnik Member
    After installing the app, it is not displayed, even when the homey is restarted... Please advise.
  • anneanne Member
    @Munnik you need to add/pair the OWM 'sensors' as a device (like you would add a lightbulb for instance).

    You can add more than one, for instance one sensor for the current weather, another one for the weather forecast for tomorrow, etc.
  • MunnikMunnik Member
     anne said:
    @Munnik you need to add/pair the OWM 'sensors' as a device (like you would add a lightbulb for instance).

    You can add more than one, for instance one sensor for the current weather, another one for the weather forecast for tomorrow, etc.

    Thx, should have read better :#
Sign In or Register to comment.