Page 2 of 6

Re: RaspberryPi script to display weatherstation values via

Posted: Wed 05 Aug 2015 1:49 pm
by jank
Thanks Pete, for the positive update.
Maybe there are some things I can add in the next time like: Month,year .... etc high's and low's information......
Jan

Re: RaspberryPi script to display weatherstation values via

Posted: Wed 05 Aug 2015 7:56 pm
by pete_c
Thank you for providing the script Jan.

Re: RaspberryPi script to display weatherstation values via

Posted: Fri 07 Aug 2015 1:58 pm
by laulau
Hi Jan (slashmusic ;) ),
Just installed (using Cmx start/stop script) and tested this script :
my min/max pressure is in % instead mb for me.
CMXnow.jpg
I thought it was fixed !!

Re: RaspberryPi script to display weatherstation values via

Posted: Fri 07 Aug 2015 2:52 pm
by jank
laulau wrote:Hi Jan (slashmusic ;) ),
Just installed (using Cmx start/stop script) and tested this script :
my min/max pressure is in % instead mb for me.
CMXnow.jpg
I thought it was fixed !!
ahh, ... found the error.
you downloaded cumulusnow.sh directly from within the script.
I forgot to update my Webserver, where the file is being downloaded from the script.
To fix it, please do the foloowing:
Delete cumulusnow.sh (try: rm /home/pi/CumulusMX/cumulusnow.sh)
start sudo ./cumulusmx.sh -n and download cumulusnow.sh again.
sorry.......file was updated here in the forum, but not on my personal webserver.
let me know, if it does not work for you.
Jan

Re: RaspberryPi script to display weatherstation values via

Posted: Fri 07 Aug 2015 3:22 pm
by laulau
:clap:
It's ok now

Re: RaspberryPi script to display weatherstation values via

Posted: Fri 07 Aug 2015 7:00 pm
by jank
laulau wrote::clap:
It's ok now
Thank you laulau for the update
Jan

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Fri 25 Nov 2016 1:13 pm
by takezo
I have this output:

Code: Select all

takezo@-WEATHER:~/scripts/Cumulus/CumulusMX $ sudo ./cumulusnow.sh
.....please be patient. Collecting some initial information.....
cat: /home/takezo/scripts/Cumulus/CumulusMX/graphconfig.json: not found
cat: /home/takezo/scripts/Cumulus/CumulusMX/graphconfig.json: not found 
cat: /home/takezo/scripts/Cumulus/CumulusMX/graphconfig.json: not found
cat: /home/takezo/scripts/Cumulus/CumulusMX/graphconfig.json: not found
	[  ========================================> ] 100%  Done.


Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
Modo de empleo: grep [OPCIÓN]... PATRÓN [FICHERO]...
Pruebe 'grep --help' para más información.
xargs: cat: terminado por la señal 13
./cumulusnow.sh: línea 72: [: to much arguments
./cumulusnow.sh: línea 74: [: to much arguments
./cumulusnow.sh: línea 81: [: 016-11-: se esperaba una expresión entera
./cumulusnow.sh: línea 83: [: 016-11-: se esperaba una expresión entera

any idea..?

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Tue 29 Nov 2016 3:51 pm
by jank
sorry for answering late....
well it looks like the file graphconfig.json is not present in the installation directory of CumulusMX which should be at /home/takezo/scripts/Cumulus/CumulusMX/
The Script is trying to find out which Units you are using for temperature, windspeed,rain and pressure
Example: °C for temperature, km/h for windspeed , mm for rain and hPa
This is the config file where I found this values when you configure it form the UI.

this json file looks like this on my system

{"temp":{"units":"C","decimals":1},"wind":{"units":"km/h","decimals":0},"rain":{"units":"mm","decimals":1},"press":{"units":"hPa","decimals":1},"hum":{"decimals":0},"uv":{"decimals":1}}

However, this file seem to be missing and this is causing all these errors.
Maybe in a future version I should check the presence of this file ?

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Sun 12 Feb 2017 12:45 pm
by jank
Version 1.6 available

* Changed a path to file graphconfig.json

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Sun 12 Feb 2017 6:00 pm
by jlmr731
Very nice script, and can confirm it works on linux ubuntu, with small modification -- path to Cumulus and cpu temp (since this is not a pi)
Did see one error in ver 1.6 line 21

Code: Select all

if [ -f $INSTPATH/graphconfig.json ]; then
change it to

Code: Select all

if [ -f $INSTPATH/web/graphconfig.json ]; then
and it worked.


For non pi users that want cpu temp
For cpu temp i dont have vcgencmd on my system so with a bit of editing and using lm-sensors i am able to get the cpu temp reading
what I changed...

Code: Select all

CPUTTEMP=$(vcgencmd measure_temp | cut -d= -f2| cut -c -4)
to

Code: Select all

CPUTTEMP=$(sensors | grep -oP 'Physical.*?\+\K[0-9.]+')
Works great and thanks.
Now if I can only figure out how to change wind dir degrees to a more friendly value like n, s, e, w type of output

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Sun 12 Feb 2017 7:21 pm
by jank
jlmr731 wrote:Very nice script, and can confirm it works on linux ubuntu, with small modification -- path to Cumulus and cpu temp (since this is not a pi)
Did see one error in ver 1.6 line 21

Code: Select all

if [ -f $INSTPATH/graphconfig.json ]; then
change it to

Code: Select all

if [ -f $INSTPATH/web/graphconfig.json ]; then
and it worked.
Thank you for letting me know. My mistake....I changed it and uploaded a new Version 1.6 with fixed directories.
I missed to also change the IF statement in my script....but it is fixed now and again uploaded
Also thanks for the workaround for Ubuntu installations

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Thu 23 Feb 2017 2:02 pm
by meghv999
Hello, I am trying to run the Cumulusnow.sh with this command:

sudo ./cumulusnow.sh

but it shows this error:

.....please be patient. Collecting some initial information.....

CumulusMX configuration file /home/pi/CumulusMX//web/graphconfig.json is missing.

Quit

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Fri 24 Feb 2017 8:23 am
by jank
Hello Megahv999

I found this in another topic which is related to the same problem
steve wrote:
bajowar wrote:Cumulusnow.sh is looking for graphconfig.json in the CumulusMX directory. It is however in the directory CumulusMX / web.
Yes, I changed MX some time ago to create the json graph files in the web directory.
So Steve changed the directory of the graphconfig.json some month ago. Initially it was in the mail CumulusMX directory now it is in the /web sub folder.
After I was aware of this, I changed the path to this file in my script, without thinking about other people who still have it in the main directory.

I am not sure, but when Steve writes: " I changed MX some time ago to create the json graph files in the web directory " maybe this means, that when you save the config one more time now, this file will be (re)created in the /web directory ?

If not, simply copy it from your mailn directory into the web directory. sudo cp graphconfig.json web/
As far as I understand, this file does only contain information about units you are suing for your weather station.

Please let me know if option 1 (save config) or option 2 (copy) worked for you ?

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Fri 24 Feb 2017 3:04 pm
by steve
jank wrote:I am not sure, but when Steve writes: " I changed MX some time ago to create the json graph files in the web directory " maybe this means, that when you save the config one more time now, this file will be (re)created in the /web directory ?
The file gets re-created every time MX does a web update, so there's no need to save the config or copy the file, the current version of MX just automatically creates it in the web directory.

Re: RaspberryPi script to display weatherstation values via ssh

Posted: Sat 25 Feb 2017 11:34 am
by jank
steve wrote:
jank wrote:I am not sure, but when Steve writes: " I changed MX some time ago to create the json graph files in the web directory " maybe this means, that when you save the config one more time now, this file will be (re)created in the /web directory ?
The file gets re-created every time MX does a web update, so there's no need to save the config or copy the file, the current version of MX just automatically creates it in the web directory.
thanks steve...good to know. In this case, when he gets this error:
CumulusMX configuration file /home/pi/CumulusMX//web/graphconfig.json is missing.
it can be, that CumuusMx is NOT installed in /home/pi/CumulusMX/ so this file can not be found.
Megahv999, can you check if the installation directory of your CumulusMX is really /home/pi/CumulusMX and if so, if the file home/pi/CumulusMX//web/graphconfig.json exist ?

ls -al /home/pi/CumulusMX//web/graphconfig.json

if not, use this comand to search for it

sudo find / -name graphconfig.json