Page 1 of 1

No Forecast update.

Posted: Tue 12 Jan 2016 11:31 am
by Jeff-T
The (Davis) weather forecast does not seem to be updating, it is different on the Davis console to the local network webpage I have the update set to hourly and the Cumulus forecast unticked but still showing yesterdays forecast.

Re: No Forecast update.

Posted: Tue 12 Jan 2016 11:44 am
by steve
When you say local network web page, do you mean the 'dashboard' page in the MX user interface? If so, please do the following:

1. Turn on data logging for a couple of minutes, and then zip up and attach the latest MXdiags file here
2. Please quote the forecast string being shown on the MX dashboard and on the console
3. Put this URL into your browser and paste the output here: http://localhost:8998/api/data/currentdata
(correct the first part of the URL for your system if required)
4. Look in your browser F12 console to see if any errors are logged while viewing the dashboard page

Re: No Forecast update.

Posted: Tue 12 Jan 2016 7:32 pm
by Jeff-T
Sorry I did mean Dashboard.

Before I saw your reply I checked a local weather website http://www.mkweather.co.uk/ which uses Cumulus v1.9.4 (1099) and the forecast is the same as on my Dashboard - Forecast: Mostly cloudy and cooler. Precipitation ending within 6 hours Windy with possible wind shift to the W, NW, or N.

I then rechecked the forecast on the Davis console and it reads Mostly cloudy and cooler. Precipitation ending within 6 hours Windy. The Davis Weatherlink software also reports Mostly cloudy and cooler. Precipitation ending within 6 hours Windy.

It looks like the Davis forecast is truncated which made me think it was different. Strange then that Cumulus appears to be able to read the full forecast from the Davis console which supplies the data but the Console and software cannot.

Re: No Forecast update.

Posted: Tue 12 Jan 2016 7:43 pm
by steve
The console doesn't supply the text of the forecast to software, it supplies a code which software then has to convert to one of about 200 forecast strings. In the case of Cumulus 1, the software doing the mapping is the Davis-supplied DLL. MX uses a table which has been made available on the internet by someone who extracted it from somewhere - I can't remember whether they got it from the Davis DLL or from the console firmware.

Re: No Forecast update.

Posted: Wed 13 Jan 2016 12:01 am
by mcrossley
Steve, would it be a good idea if the Davis forecast table was held in an 'ini' file so it could be localised?

I wrote a little PHP script to convert the forecast code and hemisphere into text using only unique strings, don't know if that is of any use...

http://weather.wilmslowastro.com/utils/ ... e>&hemi=<N or S>

eg: http://weather.wilmslowastro.com/utils/ ... 103&hemi=N

Source: http://weather.wilmslowastro.com/utils/ ... p?view=src

I couldn't see any pattern to use a clever way of doing the lookup other than using a big table, I have used explicit keys in the arrays to make reading it easier.

Re: No Forecast update.

Posted: Wed 13 Jan 2016 8:29 am
by steve
mcrossley wrote:Steve, would it be a good idea if the Davis forecast table was held in an 'ini' file so it could be localised?
Yes, it would - I guess it could go into strings.ini with the others. Splitting up the strings as you've done would make the translation process much simpler - I'll look at doing the same in MX.

Re: No Forecast update.

Posted: Wed 13 Jan 2016 11:23 am
by mcrossley
I added a hemisphere parameter to the code, see edited post above. Omitting the hemisphere parameter defaults to 'N'

Re: No Forecast update.

Posted: Wed 13 Jan 2016 11:30 am
by steve
I remember previous discussions about the southern hemisphere, but not what the outcome was, if any.

So "W, NW, or N." is for the northern hemisphere (I don't think I've ever seen anything else) and that corresponds to "W, SW, or S." for the southern hemisphere? And as the console knows which hemisphere you're in, presumably it generates the appropriate code, so I don't actually have to do anything in Cumulus?

Re: No Forecast update.

Posted: Wed 13 Jan 2016 11:40 am
by mcrossley
As far as I know the existing code tables only contain the two 'W, NW, or N' variants, so you need to compensate for the hemisphere.

The two alternative strings 'W, SW, or S' are from the Davis DLL, which presumably like the console also uses the latitude to determine which variant to use.

Re: No Forecast update.

Posted: Wed 13 Jan 2016 11:57 am
by steve
Right - the table in MX only has the northern ones it. I hadn't spotted that your original code didn't use the southern ones.