Page 1 of 1
plotMX
Posted: Sun 03 May 2020 1:18 pm
by ninuzzu66
Hi all
I wrote a simple script for linux to plot meteo.log data file created as follows
cat /<cumulus path>/CumulusMX/realtime.txt >> /<meteo.log path>/meteo.log #In my system, it runs every 5 minutes
To use the script, you just need to set the FILE environment variable to specify where meteo.log is and install gnuplot package.
To learn how it works, just run the script without parameters.
Hope it helps
Bye, Nino
Re: plotMX
Posted: Sun 03 May 2020 2:58 pm
by HansR
Tried it and got the following result and an output.png file which cannot be read by any image reader on my machine. I had about 5 lines in meteo.log (filling up now of course).
Aantekening 2020-05-03 165158.png
Re: plotMX
Posted: Sun 03 May 2020 3:27 pm
by ninuzzu66
I think you are using an old version of awk.
Is it possible?
Mine is GNU Awk 4.1.4.
Re: plotMX
Posted: Sun 03 May 2020 4:38 pm
by HansR
I run a RPi with Raspbian and awk is standard supplied by mawk 1.3.3-17
The alternative I may choose is gawk 1:4.2.1+dfsg-1
I must say, it would be nice if different awk dialects would be masked.
Re: plotMX
Posted: Sun 03 May 2020 6:22 pm
by ninuzzu66
I've made some updates.
Now it should work with your awk version as well.
Let me know.
Re: plotMX
Posted: Sun 03 May 2020 8:04 pm
by HansR
Unfortunately, same result. In the mean time I had installed gawk 4.2.1, result is the same. I send you the meteo.log as well so you can try, maybe it is the log file or I make a fault in the call.
Aantekening 2020-05-03 220231.png
Re: plotMX
Posted: Sun 03 May 2020 8:35 pm
by ninuzzu66
I understood the problem.
In my meteo.log the data format is 03/05/20, in yours it is 03-05-20.
So you have to:
1) change the line set timefmt \"%d/%m/%y_%H:%M:%S\"; in set timefmt \"%d-%m-%y_%H:%M:%S\";
2) use the script providing the data in your own format. Example: ./plotMX.sh 03-05-20 temp
I tried with your meteo.log and it works.
Re: plotMX
Posted: Mon 04 May 2020 6:09 am
by HansR
OK, success

Nice
But too specific for me and only for Unix/Linux.
Re: plotMX
Posted: Tue 12 May 2020 8:56 am
by ninuzzu66
I wrote a new post with a plotMX web version.
Bye, Nino