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

Change image depending on weather?

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

Moderator: daj

Post Reply
nbr_uk
Posts: 6
Joined: Wed 20 Oct 2010 6:33 am
Weather Station: WH1080
Operating System: N/A

Change image depending on weather?

Post by nbr_uk »

Is it possible to change the image displayed in the bottom left corner of the generated webpage to reflect the current conditions? For example show a sunny scene when warm, rainy when wet etc?

I replaced the image with one of my weather station in the snow but it looks a bit naff in summer!

I suppose I could setup a webcam to capture to a still and save it to the directory but it wouldn't have the soft filter round the edge and would probably end up getting a shot of my wife hanging out the washing or my cat having a dump so would rather set a predefined image for a weather condition.

Any ideas?
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: Change image depending on weather?

Post by steve »

You could possibly use javascript to change the background image depending on a particular item, e.g. if you had a solar sensor you could use the <#IsSunny> web tag:

Code: Select all

<script language="JavaScript">
if (<#IsSunny> = "1") 
  { document.body.background = "sunny.jpg"}
else
  { document.body.background = "cloudy.jpg"}
</script>
Note that I haven't tried this!
Steve
ColinJS
Posts: 18
Joined: Wed 09 Feb 2011 10:21 am
Weather Station: Maplin N96GY
Operating System: Windows XP
Location: Brentwood, Essex
Contact:

Re: Change image depending on weather?

Post by ColinJS »

If you would be OK with a seasonal display, you could try (similar to the day/night question a while back):

document.body.background = "month<#month>.jpg", with twelve images, "month01.jpg" etc.

Unfortunately there is no 'current conditions' webtag, except the one you put in yourself, which would be text I guess. You could use the forecast one <#forecastnumber>, but then you'd need 28 different photos.

I haven't tried this either, but it looks like it should work. I should try it, my page also still shows snow!

HTH,

Colin
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: Change image depending on weather?

Post by robynfali »

Colin

Just been looking through your page, and found the setup area

7th Apr: Upgraded to Cumulus 1.9.1. Documentation doesn't really describe what to do, but an entry on the forum said just to backup and load over old version. Wasn't sure what to do with the 'HTML' option. Let it install in case there are new things to consider and after install, copied *t.htm back over the newly installed versions (after copying, of course!).


When you install an updated cumulus, if you have any personalised pages you should UNTICK the HTML option, as it will overwrite your exisiting pages replacing them with originals.
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: Change image depending on weather?

Post by steve »

7th Apr: Upgraded to Cumulus 1.9.1. Documentation doesn't really describe what to do
The readme.txt says:

"Upgrading:

If you are upgrading from a previous version, you can install
this version over the top of these (just run the setup.exe).
Your data files will be saved (you should take backups
before upgrading to be safe). "

The FAQ says:

"How do I upgrade to a new release?

Back up your data, and run the new setup. Occasionally, there may be actions you need to perform before or after the upgrade - these will be documented in the readme.txt file."

I'll update the FAQ to mention the 'install HTML files' option. Someone might read it, you never know.
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: Change image depending on weather?

Post by robynfali »

steve wrote:
I'll update the FAQ to mention the 'install HTML files' option. Someone might read it, you never know.

:lol: :lol:
nbr_uk
Posts: 6
Joined: Wed 20 Oct 2010 6:33 am
Weather Station: WH1080
Operating System: N/A

Re: Change image depending on weather?

Post by nbr_uk »

Thanks for the responses - going to give the suggestions a try when I get back off holiday!
ColinJS
Posts: 18
Joined: Wed 09 Feb 2011 10:21 am
Weather Station: Maplin N96GY
Operating System: Windows XP
Location: Brentwood, Essex
Contact:

Re: Change image depending on weather?

Post by ColinJS »

Thanks for pointing out the documentation stuff. I tend to rely on backups rather heavily, somewhat paranoid about making them, so might as well use them. I seem to remember not seeing anything leaping out from whatever page I was reading, so let it install, knowing I would be able to recover my customisation afterwards. Worked fine.

Cheers,

Colin
User avatar
MickinMoulden
Posts: 499
Joined: Mon 20 Dec 2010 12:12 pm
Weather Station: WS-1081 with rain gauge mod
Operating System: Windows 7 & 1.9.3 b1059
Location: Palmerston, NT, Australia
Contact:

Re: Change image depending on weather?

Post by MickinMoulden »

nbr_uk wrote:Is it possible to change the image displayed in the bottom left corner of the generated webpage to reflect the current conditions? For example show a sunny scene when warm, rainy when wet etc?

I replaced the image with one of my weather station in the snow but it looks a bit naff in summer!

I suppose I could setup a webcam to capture to a still and save it to the directory but it wouldn't have the soft filter round the edge and would probably end up getting a shot of my wife hanging out the washing or my cat having a dump so would rather set a predefined image for a weather condition.

Any ideas?
I don't have a background image, but I do have 6 images that change depending on the weather. It's all done in HTML using a combination of webtags. You should be able to do the same thing for the background image, however you will need to upload the weatherstyle.css every time.
Michael, Palmerston, NT Australia www.Palmerston-WeatherImageNo image? I'm offline!
ImageImage
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Change image depending on weather?

Post by beteljuice »

... You should be able to do the same thing for the background image, however you will need to upload the weatherstyle.css every time.
Nope ....

You could use the document.body mentioned earlier, but a better way would be to 'add' to the css as described here: https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=1657
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
MickinMoulden
Posts: 499
Joined: Mon 20 Dec 2010 12:12 pm
Weather Station: WS-1081 with rain gauge mod
Operating System: Windows 7 & 1.9.3 b1059
Location: Palmerston, NT, Australia
Contact:

Re: Change image depending on weather?

Post by MickinMoulden »

beteljuice wrote:
... You should be able to do the same thing for the background image, however you will need to upload the weatherstyle.css every time.
Nope ....

You could use the document.body mentioned earlier, but a better way would be to 'add' to the css as described here: https://cumulus.hosiene.co.uk/viewtopic.php?f=14&t=1657
ah...yes you can....
where it has

Code: Select all

@charset "UTF-8";
body {
	background:#FFFFFF url('images/picture.jpg') no-repeat fixed left bottom; font-family: Verdana, Helvetica, sans-serif;
	font-size: 10pt;
	color: #585858;
	text-align: left;
you could change

Code: Select all

('images/picture.jpg')
to

Code: Select all

('images/temp<#HighTempAlarm><#LowTempAlarm>.jpg)
. Done. And this is just 1 of many examples or combinations you could use. Get creative.
For this simple example you would only need 3 pictures. I have combinations up around 25. So I know it can be done.
You learn something every day hey. ;)
Michael, Palmerston, NT Australia www.Palmerston-WeatherImageNo image? I'm offline!
ImageImage
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Change image depending on weather?

Post by beteljuice »

I didn't mean it wasn't possible :oops: - just that it's extra baggage to process and upload weatherstyles.css when you can do a couple of lines override in your xxxxT.htm files ;)
Image
......................Imagine, what you will KNOW tomorrow !
Post Reply