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

Diary as Module does not read data

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Diary as Module does not read data

Post by Dador »

I have installed CMX 4.3 and Cutils 7.3. Basically everything works fine.
I used the new diary function as a module. The file diary.txt and the files diary20xx.txt have been created. They were sent automatically to the server. I created a new page diary.php, where, as always, it invokes the action with a command.

Code: Select all

<?php include('diary.txt');?>
The menu loads, but the tables in the diary20xx.txt files do not load.
I have the diary.php file in the main directory, and the diary.txt and diary20xx.txt files in another directory intended for Cutils. Could this be the reason why the files are not loading?

https://pogodarybnik.pl/diary.php
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

Dador wrote: Wed 04 Dec 2024 8:14 pm The menu loads, but the tables in the diary20xx.txt files do not load.
I have the diary.php file in the main directory, and the diary.txt and diary20xx.txt files in another directory intended for Cutils. Could this be the reason why the files are not loading?
Yes that is the issue. It is a kind of reversed CumulusRealTimeLocation issue.

Normally CUtils looks for datafiles in the CUtils directory only for CMX datafiles which get a dir specification CumulusRealTimeLocation. With you it is inversed. For the diary you want the diary files to load in the expected current directory but they are still in the CUtils directory.

The invocation of PHP in the main directory (your webroot) is not valid for CUtils (understandably).

I have to think about this one.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

HansR wrote: Wed 04 Dec 2024 8:25 pm I have to think about this one.
@Dador: could you specify:
  1. What technique do you use for upload (FTP or PHP or etc...)
  2. if PHP: where - in which directory - the upload.php is
  3. Could you give me the value of the parameter section FTP site / UploadDir in cumulusutils.ini?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Diary as Module does not read data

Post by Dador »

HansR wrote: Thu 05 Dec 2024 4:10 am @Dador: could you specify:
  1. What technique do you use for upload (FTP or PHP or etc...)
  2. if PHP: where - in which directory - the upload.php is
  3. Could you give me the value of the parameter section FTP site / UploadDir in cumulusutils.ini?
Ad 1 - FTP
Ad 2 - ----
Ad 3 -

Code: Select all

[FTP site]
FtpLog=false
DoUploadFTP=true
UploadDir=/domains/pogodarybnik.pl/public_html/CU/
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

Dador wrote: Thu 05 Dec 2024 5:59 am Ad 1 - FTP
Ad 2 - ----
Ad 3 -

Code: Select all

[FTP site]
FtpLog=false
DoUploadFTP=true
UploadDir=/domains/pogodarybnik.pl/public_html/CU/
Thanks, I will see what I can do and get back to this ASAP.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

OK. I solved this problem long ago apparently: see the wiki page on Modules and the inifile parameters which go with it (section general).

I will have to create the code for that in the Diary module though so expect version 7.3.1 soon.
Your ModulePath than must be: ./CU/.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: CustomLogs as module

Post by HansR »

Attached your will find the required new files for 7.3.1 beta 1 to use Diary as a module where the CU directory on the server is not the main website directory.

Please set (see: wiki for Module, section [General] ):

Code: Select all

DoModular=true
ModulePath=<path>
Let me know how you get on.
When successful I'll release 7.3.1
You do not have the required permissions to view the files attached to this post.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Diary as Module does not read data

Post by Dador »

From the very beginning of using various modules, I have had these settings.

Code: Select all

DoModular=true
ModulePath=./CU/
Unfortunately, version 7.3.1 didn't change anything for me. The table still does not load.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

Well, it has been improved because the Diary now uses the ModulePath which it did not before.

The console now tells me it does not know urlParams (See here for the wiki page). You must have taken precautions for this one before. But if you did not, best is to declare globally

Code: Select all

<script>
  const urlParams = new URLSearchParams(window.location.search);
</script>
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Diary as Module does not read data

Post by Dador »

HansR wrote: Thu 05 Dec 2024 8:13 pm Well, it has been improved because the Diary now uses the ModulePath which it did not before.

The console now tells me it does not know urlParams (See here for the wiki page). You must have taken precautions for this one before. But if you did not, best is to declare globally

Code: Select all

<script>
  const urlParams = new URLSearchParams(window.location.search);
</script>
Ah, ok.
Really. With one of the previous modules, I also had to introduce this script to the website. Now I remember something. :bash:
Thank you, that helped.

One more request.
Could you add a translation for

Code: Select all

TableView
ChartView
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

Dador wrote: Thu 05 Dec 2024 8:24 pm One more request.
Could you add a translation for

Code: Select all

TableView
ChartView
OK. Coming up in the formal 4.3.1 release, probably tomorrow (waiting for @sutne's feedback on 4.3.1)
Will be in section Diary.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

@Dador: btw you do not have a chartview. I guess we need to look there?
It says: Highcharts not defined (you you miss the includes). Also see the wiki
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
sutne
Posts: 577
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: HP2560 (WS80) and HP2550 (WS90)
Operating System: Raspbian Bullseye and Bookworm
Location: Rjoanddalen and Kronstad, Norway
Contact:

Re: Diary as Module does not read data

Post by sutne »

waiting for @sutne's feedback on 4.3.1
I am travelling at the moment. Will not be home until friday evening.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Diary as Module does not read data

Post by HansR »

sutne wrote: Thu 05 Dec 2024 8:43 pm
waiting for @sutne's feedback on 4.3.1
I am travelling at the moment. Will not be home until friday evening.
Thanks for telling me, we will wait. The world will no go under without the update. Stay safe.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Dador
Posts: 352
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Diary as Module does not read data

Post by Dador »

HansR wrote: Thu 05 Dec 2024 8:40 pm @Dador: btw you do not have a chartview. I guess we need to look there?
It says: Highcharts not defined (you you miss the includes). Also see the wiki

I've already figured it out.

Works perfecto :D
Post Reply