Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

iPhone realtime page & graphs.htm question.

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
MattStedman
Posts: 18
Joined: Thu 21 Jan 2010 11:17 pm
Weather Station: WH1081
Operating System: Windows Seven
Location: Albany, Western Australia
Contact:

iPhone realtime page & graphs.htm question.

Post by MattStedman »

I have been making a iPhone page that reads values from the realtime.txt and scrapes the windrose info from the gauges.htm. To finish it I need to know whether the data in the graphs.html hwspd array is oldest or newest first and what time intervals they are.

You can have a play with the page by dumping the attachement into your webserver as a subfolder. There should be no configuration required. The only thing that will probably break is the wind speed graphs due to different units. It automatically refreshes every minute
at the moment.

Matt

edit: I realise there is already an iphone page, this is something I have been tinkering with to learn Javascript.
You do not have the required permissions to view the files attached to this post.
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by steve »

The <#wspddata> web tag is described in the help and the wiki, thus: "Comma separated list of recent wind speed readings (up to 3600 entries). This is a circular buffer; to find the most recent value use nextwindindex ".

It doesn't cover a particular period, it's just the last 3600 readings. The interval and total period depends on the type of weather station.
Steve
User avatar
robynfali
Posts: 1076
Joined: Sat 31 Jul 2010 10:34 pm
Weather Station: Vantage Vue
Operating System: Windows XP
Location: Anglesey, North Wales, UK
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by robynfali »

done it on mine, can't see any graphs tho?

http://www.valley-weather.co.uk/iphone2/index.html
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by daj »

Rob

I had a quick peak at the code and see that the wind 'graph' relies on the gauges.htm file being in the parent folder. Your site is not using the standard pages so it will not work in its current setup -- maybe changing the .js file (line 59) to look for your gauges.php will work but it depends on what is in your php file from the standard gauges.htm file

Just a thought
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
robynfali
Posts: 1076
Joined: Sat 31 Jul 2010 10:34 pm
Weather Station: Vantage Vue
Operating System: Windows XP
Location: Anglesey, North Wales, UK
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by robynfali »

Hi mate

I do have this one

http://www.valley-weather.co.uk/gaugesIE.php

but which .js file do you mean, i have just looked at line 59 in all of them, and found no reference to point to, i do realise this is me being totally blind!
User avatar
daj
Posts: 2041
Joined: Tue 29 Jul 2008 8:00 pm
Weather Station: WH1081
Operating System: Pi & MX
Location: SW Scotland
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by daj »

It's line 59 of the cumulus.js file that you will have copied as part of Matt's iPhone pages.

It says...

Code: Select all

url="../gauges.htm";
You could try changing it to your php (IE) version -- as I say, I've not tried it but a quick look at Matt's code suggests it reads the data from the standard cumulus pages
David
kippfordweather.uk
Cumulus MX & Raspberry Pi
User avatar
robynfali
Posts: 1076
Joined: Sat 31 Jul 2010 10:34 pm
Weather Station: Vantage Vue
Operating System: Windows XP
Location: Anglesey, North Wales, UK
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by robynfali »

does help if i look in the right folder, and at the right files i guess mate!!, cheers
MattStedman
Posts: 18
Joined: Thu 21 Jan 2010 11:17 pm
Weather Station: WH1081
Operating System: Windows Seven
Location: Albany, Western Australia
Contact:

Re: iPhone realtime page & graphs.htm question.

Post by MattStedman »

Thanks Steve, I didn't even think of the Wiki even though I was looking at something else in there earlier. I will play around with it later. There is another way of generating the graph, which uses the last 10 reading when the page updates. If you look in the javascript at the bottom of the page and swap the comments on these lines:

Code: Select all

//wind=windhist(data[6]);

wind=wndfromgauges();
The only thing with this is that you have to leave the page up and running, which is why I started this whole thing as I have my phone in a dock with music playing most of the day. It does have the icon and is sized to be an "app" as well. I will clean the code up later today and make put all the configurable bits in one place.

Thanks for trying it out

Matt
Post Reply