View unanswered posts | View active topics It is currently Wed May 22, 2013 4:06 pm



Reply to topic  [ 28 posts ]  Go to page: 1, 2  Next
 Help Setting Up Weather Forecast CP 
Author Message
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Help Setting Up Weather Forecast CP
Been searching around but not finding much in the way of the best approach
to setup variables with forecast info. Would like to setup a CP with 5 or 7 day forecasts.

I don't currently use the NOAA plugin but if that could get me some forecast info
maybe I'll five that a try. I like the NOAA script I've been using but will switch
if there are any advantages.

Any tips very much appreciated!

Thanks,

Carl


Fri Aug 17, 2012 4:05 pm
Profile

Joined: Aug 09, 2010
Posts: 765
Location: CA
Post Re: Help Setting Up Weather Forecast CP
Which version of Indigo are you using? 4? 5? Pro? Lite?


Fri Aug 17, 2012 5:20 pm
Profile WWW
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Latest version 5 Pro.

Carl


Fri Aug 17, 2012 6:13 pm
Profile

Joined: Aug 09, 2010
Posts: 765
Location: CA
Post Re: Help Setting Up Weather Forecast CP
Have you looked at my free NOAA Weather Plus plugin (Nathan Sheldon Software section of the 3rd Party Developers forum on this site)? It includes a 7 day forecast. NOAA's current condition feed that I'm using is having some intermittent reliability issues, but the forecast info remains reliable.


Fri Aug 17, 2012 6:35 pm
Profile WWW
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Looks great and I see a rather amazing list of states on the device screen, but am
unsure how to populate any variables with that info.

Any help?

Thanks,

Carl


Fri Aug 17, 2012 8:30 pm
Profile
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Doh...again. I see how it works from a CP. Is there some way I can use my own images
for the temperature values? I assume that I would need to get the info into variables somehow.

What I'm after is a screen much like the attached which shows our high and low temps for the past week
but instead for the 7 day forecast....also using the weather icons I've created.

Possible?

Thanks, looks like an awesome plugin.

Carl


Attachments:
screenshot.jpg
screenshot.jpg [ 167.68 KiB | Viewed 916 times ]
Fri Aug 17, 2012 9:18 pm
Profile

Joined: Aug 09, 2010
Posts: 765
Location: CA
Post Re: Help Setting Up Weather Forecast CP
Hi Carl.

Glad you were able to find the state information in the Control Page area.

Images for temperature values? Yes, probably (though I've not done that before). Generally, if you put any PNG format image into the /Library/Application Support/Perceptive Automation/Indigo 5/IndigoWebServer/images/controls/devices that contains a + at the end of the name (but before the .png part), the Indigo Web Server will assume that other images with the same name before the + character and a state value after the + character are to be used to represent different device state conditions. This should work with temperature values, but I don't know for sure. You could try it though. You'd first create a generic temperature image named "Temperature+.png" in the above folder (I just used "Temperature" as an example, but you could use any name you like). Then another image for each degree of temperature such as "Temperature+75.png", "Temperature+76.png", "Temperature+77.png", etc. Then add a control in your control page that displays the device state for the "1st High Temperature (ºF)" of the NOAA Weather Plus device. When that device state (1st High Temperature (ºF)) changes to 75, the "Temperature+75.png" image will be displayed. When the state changes to 76, the "Temperature+76.png" image will be displayed, and so on. The same will work for variable values with image representations in a control page as well.

However, from the example image you showed, you could have the text within the 1st High Temperature state display on its own rather than using an image. You could get a pretty close font match that should work for that. To get the drop-shadow effect with text, you'd create the first "1st High Temperature (ºF)" text field using a dark colored font like black. Then duplicate it, offset it by a few pixels up and to the left, and change the font color to the light tan color to match the example you showed.


Sat Aug 18, 2012 12:48 am
Profile WWW
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Thanks Nathan. I've got the image stuff all worked out, I tend to use imaging a lot on
my CP's, thing I'm missing somehow is how to setup variables, or however best to do it,
to tie the images to. I only use about 20 weather icons, which I will post later if anyone
may want them, just not sure how to tie them to the forecast.


edit: Yikes, you have an amazing amount of weather icons...going thru them now and
setting them up with my own.

Carl


Sat Aug 18, 2012 5:48 am
Profile
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Thanks again for the awesome plugin. Here's what I have so far.
I assume that the 1st conditions icon is the same as current conditions icon?

I might have to shrink my icons a bit but overall I really like it.
I made my background with the degree symbol included to simply any coding to have to add it.
Ever seen what's happening in the Fri low temp?

Thanks,

Carl


Attachments:
screenshot.jpg
screenshot.jpg [ 160.53 KiB | Viewed 892 times ]
Sat Aug 18, 2012 2:50 pm
Profile
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Most all my weather icons just switched to night icons.....but it's only 3 pm here.
Is that supposed to happen?

Carl


Sat Aug 18, 2012 3:11 pm
Profile

Joined: Aug 09, 2010
Posts: 765
Location: CA
Post Re: Help Setting Up Weather Forecast CP
Hey Carl

Looks awesome! Yes, the sheer number of icons (which were included with Indigo, actually, not the NOAA Weather Plus plugin) I believe were created by NOAA themselves and represent a pretty large number of possible weather conditions. Your icons look much better IMO though.

Yes, all the condition icons should match the icon file names that are already installed with Indigo.

What you're seeing on the Friday temperature is due to the data not being provided for that period by NOAA. The actual value in the device state is "- data unavailable -". I may change what the plugin puts as the value for items that don't have any data available in the future, but I used that specific text so it would match the text provided by the included "NOAA Weather" plugin provided by Perceptive Automation. Unfortunately, the only way to avoid showing that value is to use variables to store the forecast device states, with scripting code to remove the "- data unavailable -" text.

All the icons changing to night ones? That's normal, but probably not what you (or most people) would want to see. The reason it does that is because the forecast data from NOAA is relative to the current time of day and there are 2 forecasts per day. NOAA changes the forecast time period every 3 hours or so. That's why I named the forecast states as "1st Forecast...", "2nd Forecast...", etc. instead of "Today's Forecast", "Tonight's Forecast", etc, because the actual time period that those forecasts represent shifts every 3 to 6 hours. Some of it was admittedly laziness on my part ;-) (didn't want to have to figure out NOAA's pattern of time shifting), but I also wanted to get the plugin out quick.

I'll need to think about the best way to select only the time periods one might want for a given forecast and represent it more intuitively in the plugin. Until I'm able to do that though, I included all the forecast data provided in the NOAA XML as forecast states (forecast1Icon, forecast1Period, forecast1Text, forecast1Time, forecast1Worded, forecast2... forecast3... etc) so people can customize the information for their use. Unfortunately, that pretty much means some scripting on the user's part.


Sat Aug 18, 2012 4:38 pm
Profile WWW
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Thanks Nathan. I've got it looking much better with smaller icons etc. but I think there may be some icons
missing? The NOAA Condition+nshra60.png that is showing for my 7th day forecast in the device info list
doesn't seem to have an associated image file for it.

Maybe some are missing?

Carl


Sat Aug 18, 2012 4:58 pm
Profile
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Here's my latest CP...sans the 7th day icon which seems to be missing.
Should anyone want the icons I'd be happy to post them.
Haven't added the drop shadow yet....want to sure all is correct.
Meant to ask if the forecast 1 icon is for the current conditions or
the following day? Also if I'm not displaying the night conditions
I assume I'd skip the 2nd, 4th etc. icons?

Carl


Attachments:
screenshot.jpg
screenshot.jpg [ 154.93 KiB | Viewed 878 times ]
Sat Aug 18, 2012 5:36 pm
Profile

Joined: Aug 09, 2010
Posts: 765
Location: CA
Post Re: Help Setting Up Weather Forecast CP
Hi Carl.

The ...nshra60.png file doesn't exist in my Indigo images folder either. I suspect it's an image NOAA made available since Indigo 5 was released, so that image didn't get included with the Indigo installer. You can always either make your own or google "nshra60.png". I was able to find it pretty quickly (they have an image for every 10 percent chance of rain it seems).

That control page looks very nice! I'd be interested in your icons if you'd like to share them.

The forecast1Icon is for the forecast for the next 12 hours (relative to the current time) So, if it's 6:00 PM now, the forecast1Icon (and all forecast 1 information) will be for "Tonight". If it's currently 6:00 AM, the forecast 1 data will be for "Today". The forecast # states represent 1st, 2nd, 3rd, etc. 12-hour periods from right now. It's for this reason that you can't assume the 2nd and 4th conditions represent nighttime, because if it's after 6:00 PM, those conditions represent the daytime conditions for the next and following days. Which is why some scripting and variable populating are needed if you want to represent only the daytime forecasts. I'll see if I can come up with something, but it may take a little time.


Sat Aug 18, 2012 7:12 pm
Profile WWW
Online

Joined: Nov 26, 2009
Posts: 925
Location: Kalispell, MT
Post Re: Help Setting Up Weather Forecast CP
Still a bit confused about the weather icons and when they are in effect...but no big deal.
The high and low temps for the 7 day forecast I assume are 1st High/Low Temperature for today,
and the the remaining 6 for the rest of the week?

I've attached my weather icons if you have any use for them.

Thanks,

Carl


Sun Aug 19, 2012 2:59 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 28 posts ]  Go to page: 1, 2  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.