Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

realtime gauges and different domain names

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

Moderator: daj

Post Reply
RaDiOalarm
Posts: 21
Joined: Mon 08 Jun 2009 10:33 am
Weather Station: Velleman WS1080
Operating System: Win2003srv R2 SP2
Location: Vilnius, Lithuania

realtime gauges and different domain names

Post by RaDiOalarm »

Hi. My site is accessible both using http://www.site.com and just site.com. However, for realtime gauges the data file url is hard coded into preferences, and it is absolute path. So if the preferences file is configured for site.com, someone who came to http://www.site.com/weather/realtime.htm sees only the "loading" window, the data is never loaded.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime gauges and different domain names

Post by steve »

This is because of Silverlight's network access security restrictions, which don't allow cross-domain access by default.

You can override the security check, as I have done on sanday.org.uk, by placing a file called clientaccesspolicy.xml in the root of your web space, containing the following:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from>
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>
The above example allows access from everywhere. Instead of the <domain uri="*"/> line, you can if you wish restrict access just to specific domains, e.g:

Code: Select all

<allow-from>
  <domain uri="http://sanday.org.uk/"/>
  <domain uri="http://www.sanday.org.uk/"/>
</allow-from>
You could also, if you wish, change the resource path to restrict access just to the appropriate parts of your web site.

See here for lots more details - http://msdn.microsoft.com/en-us/library ... 95%29.aspx
Steve
RaDiOalarm
Posts: 21
Joined: Mon 08 Jun 2009 10:33 am
Weather Station: Velleman WS1080
Operating System: Win2003srv R2 SP2
Location: Vilnius, Lithuania

Re: realtime gauges and different domain names

Post by RaDiOalarm »

Thanks, Steve! This worked like a charm. Also, helped to get rid of "file not found" errors in apache's access.log.
User avatar
William Grimsley
Posts: 833
Joined: Thu 22 Sep 2011 5:22 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 7 Home Premium 64-bit
Location: Latitude: 50.70189285 Longitude: -3.30849957
Contact:

Re: realtime gauges and different domain names

Post by William Grimsley »

Hello There, I have the same problem. I have copied in the code from steve's post but still have problems. Please help asap!

Will
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime gauges and different domain names

Post by steve »

It's impossible to help without a link.
Steve
LaSotta
Posts: 2
Joined: Wed 10 Oct 2012 6:33 pm
Weather Station: ProWeatherStation
Operating System: Vista
Location: Italy

Re: realtime gauges and different domain names

Post by LaSotta »

Hello Steve,
at first thank you and congratulation for your great piece of software such Cumulus is!
I'm very new to the weather world, and with your software I just found what I was looking for, that is, the way to upload my friend's weather station data to the internet!


Cumulus is working fine on the computer, it keeps on sending the weather data to the website properlky, as you can see it here:
http://meteo.lasotta.inossola.it/index.htm

But I'm having the same problem with Cumulus Realtime: the page gets stuck at loading...
I've read your faq at http://wiki.sandaysoft.com/a/CumulusRealtime, and then this post, but I'm still having the same problem.

Here are the web station details, and apparently everything seems to be allright:
http://meteo.lasotta.inossola.it/realtime.txt
http://meteo.lasotta.inossola.it/CumulusRealtime.xml
http://meteo.lasotta.inossola.it/clientaccesspolicy.xml


Do you have any suggestion on what could be the issue and how to solve it?


Thank you and see you soon!
Frank
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: realtime gauges and different domain names

Post by steve »

LaSotta wrote:Do you have any suggestion on what could be the issue and how to solve it?
<realtimeURL>/realtime.txt</realtimeURL>

You have to supply a URL for the realtime.txt file, i.e.

<realtimeURL>http://meteo.lasotta.inossola.it/realti ... ealtimeURL>
Steve
LaSotta
Posts: 2
Joined: Wed 10 Oct 2012 6:33 pm
Weather Station: ProWeatherStation
Operating System: Vista
Location: Italy

Re: realtime gauges and different domain names

Post by LaSotta »

Hello Steve,
great help from you, now the realtime page is working!!

Actually, in the beginning I had already written the full URL as suggested, but it wasn't working as well...
But now, as I've restored that string again, it is magically working!


Fine, now I'm trying to figure it out why the Twitter posting is not working. I'll do some more tests and checks, and in case of need I'll make a new post for it...


Thank you so much!
Frank
Post Reply