Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.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

RaspberryPi script to display weatherstation values via ssh - Version 2.0 (May 2022)

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via

Post 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
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
pete_c
Posts: 228
Joined: Wed 12 Oct 2011 11:22 pm
Weather Station: Davis Vue-Pro2 - Fine Offset
Operating System: W2003-XPSP3-Linux
Location: Time Traveler

Re: RaspberryPi script to display weatherstation values via

Post by pete_c »

Thank you for providing the script Jan.
- Pete
Automator
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: RaspberryPi script to display weatherstation values via

Post 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 !!
You do not have the required permissions to view the files attached to this post.
Laurent

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via

Post 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
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
laulau
Posts: 678
Joined: Tue 13 Oct 2009 10:52 pm
Weather Station: WeatherDuino Pro2
Operating System: Win 7
Location: Meyenheim, Alsace, FR
Contact:

Re: RaspberryPi script to display weatherstation values via

Post by laulau »

:clap:
It's ok now
Laurent

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via

Post by jank »

laulau wrote::clap:
It's ok now
Thank you laulau for the update
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
takezo
Posts: 35
Joined: Fri 18 Nov 2016 2:18 pm
Weather Station: raspberry pi
Operating System: debina

Re: RaspberryPi script to display weatherstation values via ssh

Post 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..?
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via ssh

Post 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 ?
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via ssh

Post by jank »

Version 1.6 available

* Changed a path to file graphconfig.json
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
jlmr731
Posts: 225
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: RaspberryPi script to display weatherstation values via ssh

Post 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
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via ssh

Post 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
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
meghv999
Posts: 3
Joined: Mon 20 Feb 2017 12:26 pm
Weather Station: AcuRite 02064MA1 Pro
Operating System: Raspbian Jessie

Re: RaspberryPi script to display weatherstation values via ssh

Post 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
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via ssh

Post 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 ?
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: RaspberryPi script to display weatherstation values via ssh

Post 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.
Steve
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi script to display weatherstation values via ssh

Post 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
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
Post Reply