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

Display Moon Image with Span

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
apple8
Posts: 141
Joined: Sun 21 Aug 2011 2:26 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Sydney. Australia
Contact:

Display Moon Image with Span

Post by apple8 »

I have been attempting to duplicate my old Cumulus1 site using using the websitedata.json file uploaded with "extra web files" and then replacing the tags with the "span" command. So far it been going ok with the "today" page completed. I have started on the index page which was going ok until I got stuck on the moon image. I have tried all sorts of combinations on the line below but haven't struck the right one.

Code: Select all

<td rowspan="3"><img src="images/moonphase/"#moonphase".png" alt="Moon" width="64" align="left" border="0" height="64" style="margin: 0px 10px" /></td>
Substituting "#moonphase" with <span data-cmxdata="moonphase"> doesn't seem to work for me.

So I am looking for guidance on how to get the moon image to show.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Display Moon Image with Span

Post by mcrossley »

You will not be able to do that with the standard substitutions in the script, you will have to have a bit of custom js code that takes the phase value and puts that into the Moon image tag - or just use the new moon image :)
apple8
Posts: 141
Joined: Sun 21 Aug 2011 2:26 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Sydney. Australia
Contact:

Re: Display Moon Image with Span

Post by apple8 »

Ok as custom js code is beyond my skill set, the new moon image looks to be the way to go.

Will uploading the moon image via extra web files at end of day and then use similar code from my MX site for moon image work?
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Display Moon Image with Span

Post by mcrossley »

You can just tick the FTP option under Internet Settings > Moon Image to have CMX transfer it for you.
Your image src then just needs to point to folder/moon.png
apple8
Posts: 141
Joined: Sun 21 Aug 2011 2:26 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Sydney. Australia
Contact:

Re: Display Moon Image with Span

Post by apple8 »

That is already ticked which I thought was for the MX directory. So using that to point to the weathertest directory I will get the moon image uploaded to both directories if I understand correctly.
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Display Moon Image with Span

Post by mcrossley »

No, it will only go to one folder. I didn't realise you had two sites, though you can normally point both sites at the same file?
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Display Moon Image with Span

Post by PaulMy »

Hi,
You can also use the Moon Image settings to Copy the file and then add it to the Extra Web Files for FTP at interval or EOD.

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
apple8
Posts: 141
Joined: Sun 21 Aug 2011 2:26 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Sydney. Australia
Contact:

Re: Display Moon Image with Span

Post by apple8 »

Thanks Mark and Paul.

I didn't have any success pointing to the MX site moon image or with the copy moon image in internet settings. I was however successful by using Extra Web Files and uploading the moon image from the MX web folder. After checking that it worked ok I ticked EOD and will check again in the morning.

Would the Copy Moon Image file path in internet settings be the same as the destination file path in Extra Web Files. I used /public_html/weathertest/images/moon.png
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Display Moon Image with Span

Post by mcrossley »

apple8 wrote: Wed 20 Jul 2022 8:31 am Would the Copy Moon Image file path in internet settings be the same as the destination file path in Extra Web Files. I used /public_html/weathertest/images/moon.png
No, the copy path is a local path on your machine running CMX, you cannot use that to FTP to remote machine. It is really intended for people who run their own web server on the same machine as CMX.
grupe
Posts: 11
Joined: Fri 09 Mar 2012 3:38 am
Weather Station: Davis VantagePro 2
Operating System: Server 2003
Location: United States

Re: Display Moon Image with Span

Post by grupe »

My moon image is not updating. I am lost as to what I must do. I am running the Cumulus MX Template by Neil Thomas 2022.
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Display Moon Image with Span

Post by PaulMy »

Hi,
If you have your Internet settings correct to generate and FTP moon.png image to your site, then check your MXdiags. At each hour It should have

Code: Select all

2022-11-17 04:00:00.165 Generating new Moon image
2022-11-17 05:00:00.512 Generating new Moon image
2022-11-17 06:00:00.296 Generating new Moon image
Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
grupe
Posts: 11
Joined: Fri 09 Mar 2012 3:38 am
Weather Station: Davis VantagePro 2
Operating System: Server 2003
Location: United States

Re: Display Moon Image with Span

Post by grupe »

Paul, I am not finding that info in MXDiags. CumulusMX is running on the same computer as my server, so I am copying, instead of using FTP. I'm not sure where to set up generating moon.png
grupe
Posts: 11
Joined: Fri 09 Mar 2012 3:38 am
Weather Station: Davis VantagePro 2
Operating System: Server 2003
Location: United States

Re: Display Moon Image with Span

Post by grupe »

I think I have it working now. I changed a bunch of settings. I will be updating and moving CulumusMX to a different pi computer. I will see what happens after that!
User avatar
PaulMy
Posts: 4355
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: Display Moon Image with Span

Post by PaulMy »

gnupe
I am not finding that info in MXDiags. CumulusMX is running on the same computer as my server, so I am copying, instead of using FTP. I'm not sure where to set up generating moon.png
Do you have similar Internet setting like my attached, but not FTP File?
That logs in my MXdiags every hour

Code: Select all

2022-11-18 22:00:00.088 Generating new Moon image

2022-11-18 22:00:01.586 LocalCopy: Copying Moon image file
2022-11-18 22:00:01.589 LocalCopy: Done copying Moon image file
2022-11-18 22:00:01.589 LocalCopy: Copy process complete
I have Debug logging and Data logging both enabled.

Enjoy,
Paul
You do not have the required permissions to view the files attached to this post.
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
SamiS
Posts: 511
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: Ecowitt HP2551 & GW1100
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

Re: Display Moon Image with Span

Post by SamiS »

grupe wrote: Thu 17 Nov 2022 10:22 pm My moon image is not updating. I am lost as to what I must do. I am running the Cumulus MX Template by Neil Thomas 2022.
Have you checked that the moon image really is not updating on your website folder? I’m running the default website, and at least with ipad / safari there is a browser caching issue, that causes moon image to ”get stuck on the same image” and the correct moon phase is shown only maybe 4-6 times in a month. However by clearing cache or opening a private browsing window, the correct image is always shown.
Post Reply