Page 15 of 26

Re: For New Users

Posted: Sun 06 Jun 2021 3:18 pm
by AndyKF650
Hi Hans

Thanks for your help and support on this problem.
I have just done a clean reinstall of CUtils onto the utils directory under CMX and then a website install onto a separate folder on the RPi "weatherwebsite"

The website install log is attached as is the index.html file. The colours on the index file are restored so I must have changed them in reviewing the html.

As to how do I look at the index.html this is done by just opening the file on the RPi without the use of a browser. Perhaps this is my problem, in that the file needs to go remote rather than looking at a local copy.

Re: For New Users

Posted: Sun 06 Jun 2021 4:02 pm
by AndyKF650
Hi Hans

I must be having a moment, the browser is Chromium on the RPi !!

Re: For New Users

Posted: Sun 06 Jun 2021 4:30 pm
by HansR
Hi Andy,

OK: I just read your message about Chromium (while having typed another answer ;) ). I really have no idea how that works, I assume it gives you the JavaScript engine but I really don't know where it gets or sets it Webroot. And apparently that is not in the directory you chose. I think you need to solve that and if that does not work you need to install a webserver I guess. I think it all comes down to the webroot because CUtils determines all files it needs relative to the webroot. And apparently it cannot find its libraries nor its css file.

The good thing is: the runtime system does upload now correctly so when you access the website with a browser through a real webserver my guess is that you see the site correctly. Other users also use the RPi locally and have FTP and Apache installed on the same machine as Cumulus, so it can be done. Others might help you here. Maybe somebody can shed a light on Chromium and its ins and outs. I can't, sorry :groan:

There is another observation, now that I see the full logfile.

You seem to have a data series from 2013 onwards (that is detected from the Dayfile.txt) but when CUtils starts reading the Monthly logs (it does use these for the Wind and the Solar Energy charts) it reads only from October 2020. This means that the older files are most likely not present. Is that correct?

Regards,

Re: For New Users

Posted: Sun 06 Jun 2021 6:13 pm
by freddie
HansR wrote: Sun 06 Jun 2021 4:30 pmI really don't know where it gets or sets it Webroot. And apparently that is not in the directory you chose. I think you need to solve that and if that does not work you need to install a webserver I guess. I think it all comes down to the webroot because CUtils determines all files it needs relative to the webroot. And apparently it cannot find its libraries nor its css file.
If you open a web page as a file with a browser then it will work correctly if other resources are referenced relative to the page/file you are viewing. If there are absolute references (for example, "/cutils/css/file.css") then they will be resolved relative to the filesystem root rather than the webroot. So unlikely to work if absolute.

Re: For New Users

Posted: Sun 06 Jun 2021 7:06 pm
by HansR
@freddie: yes. So weatherwebsite is the webroot in which the browser reads its index.html and all the rest is relative.
So the question is what goes wrong because evidently it finds the index file but it can't find the relative files.

Re: For New Users

Posted: Sun 06 Jun 2021 7:46 pm
by AndyKF650
So setting CMX website to ./weatherwebsite and running the website generation programme results in what looks like a clean install log but no data on the index.html.
This is getting way past my experience now!

I have attached log files post website creation and sysinfo for information.

Re: For New Users

Posted: Sun 06 Jun 2021 8:04 pm
by HansR
@andy: no it is not the setting at generation time, it is the webroot (the directory where you startup the index.html file) which determines what you see. When you startup the website the url must be the correct directory and from there it finds its libraries.

Your previous generation was OK.
It is the startup with the browser where you must look for the solution.

Re: For New Users

Posted: Sun 06 Jun 2021 8:21 pm
by AndyKF650
Hi Hans

I just looked at the CMX diags file and it seems that I have a series of permission denied when it tries to do the upload.

Log file attached

Re: For New Users

Posted: Mon 07 Jun 2021 3:43 am
by HansR
@Andy: aha... Yes you have to solve that. That is not good. Btw: why are you using SFTP when only copying locally? But OK that should not err...
The other thing is that I don't see any realtime.txt or realtimegauges.txt upload (and fail).
Did you activate those in the interface?
Yes, those FTP errors need to be solved.

But even then, when no file uploads, I would expect to see gauges (not working) and charts (empty) and texts and colours on the dashboard and on the header.

I don't understand why you don't see the website startup correctly. How do you find index.html when starting chromium? Do you do a change directory or something?

And now some coffee ;)

Re: For New Users

Posted: Fri 11 Jun 2021 8:27 pm
by AndyKF650
Hi Hans

After a lot of head scratching I have got there and have got the starting's of a local CUtils web site. My original thinking was very flawed and after a clean RPi install of the basics to get CMX working followed by an install of apache2, php and Mariadb I was then in a position to start the Cutils build. With a concerted fiddle around permissions to get the website generated files in the correct place I can see that a working website is now a very possible goal.

The first look is attached and will no doubt be worked on over the next days and weeks.

Thanks for your help in getting the package up and available.

Re: For New Users

Posted: Sat 12 Jun 2021 5:49 am
by HansR
Hi Andy,

You did a lot of hard work. Looks good. :D

I assume the clocks are ticking, because that means the whole system is actually working (I assume they are, because the sun & moon have been calculated as well which is the second sign of health). So what you are missing is the data which is supplied by the realtime.txt and the realtimegauges.txt which you need to configure in CMX. Note the temperature of the RPi. There exists cooling equipment, you may want to think about that.

Let me know if I can help or explain anything. I admire your persistence which I take as a compliment for the tool 8-)

Regards,

Re: For New Users

Posted: Sat 12 Jun 2021 7:27 am
by AndyKF650
Hi Hans

Thanks for your comment, I had noticed that the realtime files were not working so had set them up in "extra web files" , this now puts the data onto the site.

One thing I have noticed that does not work is the noaa report which gives the heading but no report. I assume that is a switch somewhere but I have been unable to locate it. Do you have any thoughts.

The I have put a screen shot of the site page for info.

Re: For New Users

Posted: Sat 12 Jun 2021 3:03 pm
by HansR
Hi Andy,

That looks good :!:
  1. The realtime files don't need to be set up as extra web files, but can explicitly be set up in the settings: Internet Settings=> Web/FTP Settings=>Realtime Settings. It may be a kind of searching after the recent shuffle of the settings but it really pays to browse and study those!
  2. Now for the NOAA reports. Very important is to not change the filenaming in CMX. Use the defaults because that is what CUTils uses.
    1. The NOAA reports are configured in both tools because for some historic reason there are (too) many degrees of freedom in the directory and filenaming. So configure CMX first (Settings=>NOAA Settings=> FTP Options) to set the directory where you want the reports to go. Make sure that directory exists and that you can access it from the website. NOTE: you specify it in CMX as an FTP directory! Leave the filenames as default (Settings=>NOAA Settings=>Output Files) and be sure to tick UTF-8 encoding (in Report Format Options).
    2. Then configure CumulusUtils. The report you defined in CMX has to be entered in the NOAA section for FTPDirectory as relative to the webroot (e.g. ./reports/) and it must end with a slash.
    3. Note that existing reports won't be uploaded automatically, you will have to do this by hand. Regenerated reports I think won't upload automatically either but you could give it a try.
    4. When you activate the FTP upload the new reports will be uploaded daily. If you have trouble, just experiment a bit.
That's it. Hope it helps.

Regards,

Re: For New Users

Posted: Sat 12 Jun 2021 7:44 pm
by AndyKF650
Hi Hans

Thanks so much for your assistance in getting me up and running. Whilst I can follow instructions my programming experience is quite limited so this has been a challenge that I relished.

The Noaa reports was the last standard function on CUtils that I needed to master, the following screen shot shows clear progress.

Now I need to let the system settle and tweak bits rather than setting up the complete system.

Re: For New Users

Posted: Sat 12 Jun 2021 8:14 pm
by HansR
Hi Andy,

Congrats, wel done :clap:
AndyKF650 wrote: Sat 12 Jun 2021 7:44 pm Thanks so much for your assistance in getting me up and running. Whilst I can follow instructions my programming experience is quite limited so this has been a challenge that I relished
Thanks :D
AndyKF650 wrote: Sat 12 Jun 2021 7:44 pm The Noaa reports was the last standard function on CUtils that I needed to master, the following screen shot shows clear progress.

Now I need to let the system settle and tweak bits rather than setting up the complete system.
Enjoy, adjusting it one step at a time.

Regards, Hans