Author Topic: Moon sun images {Solved}  (Read 1061 times)

0 Members and 1 Guest are viewing this topic.

Offline Goldguru

  • Member
  • *
  • Posts: 41
Moon sun images {Solved}
« on: February 27, 2021, 03:47:42 PM »
Is it possible to display moon phase & sun height images when using the regular http://192.168.0.1XX:8998/index.html interface?
Most referances I can find are FTP related & sadly so badly intermixed with C.1 that its almost impossible to tell where C.1 ends & CMX begins in the explainations.

I attemped to create an FTP on my local machine & was able to enter into google the path to the web files but all that showed was the web files..lol.

'm guessing I missed the template part ?
Thnx Gold
« Last Edit: March 01, 2021, 01:35:45 AM by Goldguru »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images
« Reply #1 on: February 27, 2021, 04:41:48 PM »
MX generates the moon phase image in the /web folder as /web/moon.png

To display on the dashboard interface you would have to configure it as an "Extra File", specify the local path as "web/moon.png", the remote path as "interface/img/moon.png", disable Process, disable FTP.

Then on your dashboard page you would have to add an image tag into the html of <img src="img/moon.png">
Mark

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images
« Reply #2 on: February 27, 2021, 06:03:11 PM »
my CMX is the last release 3116
in my web folder i have MoonBaseImage.png
folder path C:\CumulusMXDist3116\CumulusMX\web
in settings/extra web files I put web\MoonBaseImage.png with no other box's ticked do i need utf-8 ticked?
I'm running win7

so I would then open index.htm & edit in
<img src="img/moonbaseimage.png">
does it matter where it is added
or just add it below <head>?



Thnx Gold
« Last Edit: February 27, 2021, 06:22:16 PM by Goldguru »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images
« Reply #3 on: February 28, 2021, 07:59:53 AM »
No, the base image is what Cumulus creates the phase image from. It sounds like you haven't enabled generation of the Moon image in the settings, once you do that you will have a moon.png file.
Mark

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images
« Reply #4 on: February 28, 2021, 10:34:06 AM »
OK I got the moon.png 13kb created, correct path to extra webfiles
where exactly do I add the <img src="img/moon.png">
I opened indedx.html with notepad++,from what I've read tags need to be between <body> & <body>


Then on your dashboard page you would have to add an image tag into the html of <img src="img/moon.png">

how do I know where to add it?
I tried on the end of line#129 and got a small page icon with a bent corner

 <p><span>Sunrise</span>&nbsp;<span id="Sunrise" class="low"></span>  Sunset&nbsp;<span id="Sunset" class="high"></span>  Moonrise&nbsp;<span id="Moonrise" class="low"></span>  Moonset&nbsp;<span id="Moonset" class="high"></span>(added here)</p>

do I have to create a block to put it in?
or add it after this line
<p><span id="Forecast"></span></p  (line #130)
above </div> (line 131)

don't I have to indicate the size of the image in the tag?
<img src="img/moonbaseimage.png" width="200"
         height="200">
like that?

Thnx Gold
« Last Edit: February 28, 2021, 11:00:03 AM by Goldguru »

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images
« Reply #5 on: March 01, 2021, 12:30:49 AM »
for using the moon image on a local machine adding a path to web files is incorrect.
to use an image via <img src="img/moon.png">
the image MUST be present in the interface/img folder

how I determined this.
looking @ index.html @ the bottom there is the line #379
<!--<p><img src="img/logo.png" width="90" height="53"  alt=""></p>-->
I had NO image there

I removed <!--<p> & </p>--> from there & viola I now had the logo image before  Cumulus MX 3.10.1 b @ the footer of the page.


I added moon.png to interface/img folder and edited line 129
                            <p><span>Sunrise</span>&nbsp;<span id="Sunrise" class="low"></span>  Sunset&nbsp;<span id="Sunset" class="high"></span>  Moonrise&nbsp;<span id="Moonrise" class="low"></span>  Moonset&nbsp;<span id="Moonset" class="high"></span>                                <img src="img/moon.png"  </p>

& I now have a moon image off the end to the right of sun rise/set,moon rise/set line

sadly i pushed my forecast line down out of the box

any advice on what to edit here to double the depth of the "row top buffer"? box would be welcome
    <div class="container">
            <div class="row top-buffer">
                <div class="col-sm-12 col-lg-12">
                    <div class="half-unit">
             
if I remove line <div class="half-unit"> then it fits but the row no longer has a box around it and it is now all background color.
also the spacing on left & right sides of the other tiles are removed.

thnx Gold

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images {Solved}
« Reply #6 on: March 01, 2021, 01:43:59 AM »
 [ You are not allowed to view attachments ] I'm happy with this
edit lines of interface/index.html 123-138 to look like this (the</div> are not laid out right in this example)

        <div class="container">
            <div class="row top-buffer">
                <div class="col-sm-12 col-lg-12">
                    <div class="dash-unit">
                        <div class="cont">
                            <input id="bt" type="button" class="btn-sml btn-default" value="Play Alarm Sounds" style="display: none;">
                            <p><span>Sunrise</span>&nbsp;<span id="Sunrise" class="low"></span>  Sunset&nbsp;<span id="Sunset" class="high"></span>  Moonrise&nbsp;<span id="Moonrise" class="low"></span>  Moonset&nbsp;<span id="Moonset" class="high"></span></p>
                            <p></p>
                     <p><span id="Forecast"></span></p>
                     <p></p>
                     <P></P>
                     <img src="img/moon.png"
                   </div>
                    </div>
                </div>
            </div>

you will need a copy of CMX generated moon.png from folder web
& plsce it into folder  interface/img

we'll see in a few days if the image changes
the upper change from half-unit to dash-unit keeps sun/moon times ,forecast & the moon image in the same box

fingers crossed Gold

 [ You are not allowed to view attachments ]
« Last Edit: March 01, 2021, 01:57:32 AM by Goldguru »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images
« Reply #7 on: March 01, 2021, 09:21:14 AM »
for using the moon image on a local machine adding a path to web files is incorrect.
to use an image via <img src="img/moon.png">
the image MUST be present in the interface/img folder


Just what I said in the first reply in this thread!
Mark

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images
« Reply #8 on: March 01, 2021, 07:20:30 PM »
MX generates the moon phase image in the /web folder as /web/moon.png
Yes it Does

To display on the dashboard interface you would have to configure it as an "Extra File", specify the local path as "web/moon.png",

I took this to mean "settings extra web files"
the path you show is where moon.png is created,no need to specify it.

the remote path as "interface/img/moon.png",

I take REMOTE path as updating a web page? NOT my local machine.
perhaps a language barrier there dunno


 disable Process, disable FTP.

not needed


Then on your dashboard page you would have to add an image tag into the html of <img src="img/moon.png">

had you just said create moon image with settings & then transfer it from web folder to interface/img folder that would have worked the other steps appear to be a mix of  directions for hosting a web page?
Quote from: mcrossley

Just what I said in the first reply in this thread!

not from how I read it But I managed to stumble thru & got a result I'm happy with.
Don't think your work on this project is not appreciated I'm greatfull.
 [ You are not allowed to view attachments ]

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images
« Reply #9 on: March 02, 2021, 09:43:41 AM »
To display on the dashboard interface you would have to configure it as an "Extra File", specify the local path as "web/moon.png",

I took this to mean "settings extra web files"

Correct

the remote path as "interface/img/moon.png",

I take REMOTE path as updating a web page? NOT my local machine.
perhaps a language barrier there dunno

The remote path (actually Remote Filename, my mistake) is either the path/filename on your FTP server if you tick the FTP option, or a path/filename on your local server if you don't.


 disable Process, disable FTP.

not needed

Included in case you wonder what to do with those settings.

Then on your dashboard page you would have to add an image tag into the html of <img src="img/moon.png">

had you just said create moon image with settings & then transfer it from web folder to interface/img folder that would have worked the other steps appear to be a mix of  directions for hosting a web page?

I thought that is what I did provide you with: Enable creating the image, copy the file to your /interface/img folder using Extra Files, add the image tag to your HTML?

How are you automatically copying the image file to the /interface/img folder?

But hey ho, if that's not what you understood.  :-)
« Last Edit: March 02, 2021, 09:48:26 AM by mcrossley »
Mark

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images {Solved}
« Reply #10 on: March 02, 2021, 05:12:30 PM »
Quote
How are you automatically copying the image file to the /interface/img folder?
I dont have a "web files" option in settings/internet

I have "extra web files"

if i enter web/moon.png into local file name and interface/img/moon.png into remote file name (all box's unticked & internet/moon "upload to FTP" does not appear to make any differance)
moon.png gets created but does not get moved?

I created a Robocopy batch file which identifies a new moon.png every time it is created & if it is differant from the one stored in interface/img it gets replaced.
the check runs @ 1 minute intervals.
its a lil ugly but could be enabled via task schedule to run once every X hours.
presently i've just left it running for all the laptop runs is my teamspeak server & cumulusMX

 [ You are not allowed to view attachments ]
« Last Edit: March 02, 2021, 05:55:59 PM by Goldguru »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images {Solved}
« Reply #11 on: March 02, 2021, 06:29:20 PM »
OK, I just tried it (ignore the first two files, they are just test data)...

 [ You are not allowed to view attachments ]

And it copied OK to interface/img

Do you have Web Interval enabled? Without it enabled no interval processing will take place.

 [ You are not allowed to view attachments ]
Mark

Offline Goldguru

  • Member
  • *
  • Posts: 41
Re: Moon sun images {Solved}
« Reply #12 on: March 02, 2021, 07:22:43 PM »
Do you have Web Interval enabled? Without it enabled no interval processing will take place.


Thank you that was this part I was missing
It works OK now.
interval = 5 mins = 8k changes per month would hourly be better?
I was attempting to use external files to trigger by batch file but I was stuck trying to determine the  "Parameters for the above program or command"

maybe the better question is how orten is moon.png created in web\ then I could put in that interval?

It appears my batch file replaces the image every 15 minutes


Thanks for your patience here Gold
« Last Edit: March 02, 2021, 08:05:32 PM by Goldguru »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1133
    • Wilmslow Astro
Re: Moon sun images {Solved}
« Reply #13 on: March 03, 2021, 08:23:52 AM »
Cumulus regenerates the image on program startup, and then once an hour. If you are not using the interval timer for anything else then you could set it to an hour as well.
Mark

 

anything