Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.0 build 3050 - 1 May 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

RaspberryPi script to display weatherstation values via ssh - Version 1.8 (June 2019)

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Fri 17 Mar 2017 11:08 pm

sorry guys i updated my pi fimware and now the tft lcd ant working now so i can test it
Have fun and keep learning

dazza :D

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Sun 19 Mar 2017 11:11 pm

hi ok i got the lcd to work and no when i run this export TERM=xterm;cd /home/pi/usb/davis;./cumulusnow.sh it ony run in ssh not the lcd
Have fun and keep learning

dazza :D

User avatar
rogerthn
Posts: 162
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Oregon Scientific WMR88
Operating System: Raspbian GNU/Linux 8
Location: Trollhättan Sweden
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by rogerthn » Mon 20 Mar 2017 5:18 pm

Please try the command below on the LCD including ssh pi@raspberry.
Replace raspberry with your CumulusMX IP

Code: Select all

ssh pi@raspberry 'export TERM=xterm;cd /home/pi/CumulusMX;./cumulusnow.sh'
Image

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Mon 20 Mar 2017 5:42 pm

ssh pi@10.0.0.6 'export TERM=xterm;cd /home/pi/CumulusMX;./cumulusnow.sh'


what like this?
Have fun and keep learning

dazza :D

User avatar
rogerthn
Posts: 162
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Oregon Scientific WMR88
Operating System: Raspbian GNU/Linux 8
Location: Trollhättan Sweden
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by rogerthn » Mon 20 Mar 2017 7:22 pm

dazza1223 wrote:ssh pi@10.0.0.6 'export TERM=xterm;cd /home/pi/CumulusMX;./cumulusnow.sh'


what like this?
Yes, please try.
Image

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Mon 20 Mar 2017 9:13 pm

it still ony run oh the ssh not the lcd mate
Have fun and keep learning

dazza :D

User avatar
rogerthn
Posts: 162
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Oregon Scientific WMR88
Operating System: Raspbian GNU/Linux 8
Location: Trollhättan Sweden
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by rogerthn » Tue 21 Mar 2017 8:41 pm

Are you running the command on the LCD?
Image

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Tue 21 Mar 2017 9:45 pm

bingo done it it runing on lcd now so how can i auto srart on the lcd mate
Have fun and keep learning

dazza :D

User avatar
rogerthn
Posts: 162
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Oregon Scientific WMR88
Operating System: Raspbian GNU/Linux 8
Location: Trollhättan Sweden
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by rogerthn » Wed 22 Mar 2017 7:43 am

dazza1223 wrote:bingo done it it runing on lcd now so how can i auto srart on the lcd mate
Since I don't know what your setup is like, please Google.
Leaving for 2 weeks on Mauritius shortly :D :D :D
Image

User avatar
dazza1223
Posts: 506
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: Worthing
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by dazza1223 » Wed 22 Mar 2017 9:00 am

O yh well i did google it but as i said i got it to auto start on the lcd but it start on ssh as well and i dont want that only on lcd ps thank u
Have fun and keep learning

dazza :D

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Fri 10 May 2019 11:47 pm

Hi,

Apologies, I posted the following message on the Cumulus restart script post but here looks more appropriate.

I am trying to set up the cumulusmx.sh script,Init.d system start-up script and CumulusNow. So far I've got cumulusmx.sh running and my init.d startup done, but I'm struggling a bit with the last item. Helpfully, as there doesn't appear to be advice on setting up CumulusNow that I could find, cumulusmx.sh advised me that I did not have CumulusNow installed and suggested running cumulusmx.sh -n to automatically download and set it up, which I did. The following is the screen output after running cumulusmx.sh again, as the script advises once it's installed and set up.

.....please be patient. Collecting some initial information.....
find: ‘/run/user/1000/gvfs’: Permission denied

CumulusMX configuration file /usr/local/bin/CumulusMX/web/graphconfig.json is missing but it is located in /usr/local/bin/CumulusMX/graphconfig.json
Newser versions of CumulusMX having this file in the web subfolder. Please copy the file manually into this folder

sudo cp /usr/local/bin/CumulusMX/graphconfig.json /usr/local/bin/CumulusMX/web/graphconfig.json

Quit
sa@orangepilite:/usr/local/bin/CumulusMX$

If I then run "sudo cp /usr/local/bin/CumulusMX/graphconfig.json /usr/local/bin/CumulusMX/web/graphconfig.json" it tells me the file doesn't exist in the parent directory, which I can confirm it doesn't. So at this point I'm looking for this missing file. :? Presumably the script creates this file as it's not in the CumulusNow.zip so I'm wondering if there might be an access failure here.

Any suggestions?
Thanks

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Sat 11 May 2019 12:45 pm

Hello Sundial

indeed, this script is getting some information/values from the file: graphconfig.json
Normally, this file is located in: /web/graphconfig.json subfolder of CumulusMX.
Based on the output of the error message, I assume, your CumulusMX installation is located in this folder: /usr/local/bin/CumulusMX/ or am I wrong

You wrote:
If I then run "sudo cp /usr/local/bin/CumulusMX/graphconfig.json /usr/local/bin/CumulusMX/web/graphconfig.json" it tells me the file doesn't exist in the parent directory, which I can confirm it doesn't. So at this point I'm looking for this missing file. :? Presumably the script creates this file as it's not in the CumulusNow.zip so I'm wondering if there might be an access failure here.
The graphconfig.json file is not being created by the Cumulusmx Script, it is part of the CumulusMX installation.....and if it is NOT in the ZIP File, I assume, it is being vreated when CumulusMX is starting.
This file contains some unit information I need to display is in cumulusnow.sh.....so please try to find out, where this file is located.
So please run the following command to locate this file on your orangepilite: sudo find / -name graphconfig.json

once you found it, please copy it to /usr/local/bin/CumulusMX/web/graphconfig.json
If you can not find it anyway on your system.....as I already mentioned it only contains some shema information and it lookl like this ....at least 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}}
If these values are correct for your country (metric values) just copy and paste the above green code and create the file on your installation......
please let me know if this works for you....
Jan
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Sun 12 May 2019 12:16 am

Hi Jan,

Thank you for replying to my message. I like your helpful scripts - thank you. :)

Yes, my CumulusMX folder is under /usr/local/bin/ as you say. I was advised by an Armbian adviser that this location was the most appropriate location for binary archive software. I edited the file location in your scripts to the same location and it seems to be okay albeit with perhaps some permission denied messages that I am not sure of the cause of. Do you envisage problems with this location? Is there any chance of having the location set as the variable $INSTPATH at the top of the CumulusNow script to make it easier to change rather than editing the if/then statement as I think this is better practice and less likely to introduce errors? Just my initial thought.

I am wondering now though if the .json file might be missing as I had my WMR928N disconnected at the time I was setting up the three scripts (perhaps CumulusMX needs the connection for the file to be created?) I couldn't have it connected at the time as it was impossible to have the two together while I set up the scripts. In any event, I will try the cumulusnow.sh script with the WMR928N connected to see if it resolves this issue.

BTW, there is a bug at line 314 of the cumulusmx.sh (case 2) - the shutdown command is misspelled "shuttdown -h" so the shutdown case fails to execute.

Thanks again for your helpful scripts. :)

Adam

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Sun 12 May 2019 10:11 am

Hello Adam
SunDial wrote:
Sun 12 May 2019 12:16 am
it seems to be okay albeit with perhaps some permission denied messages that I am not sure of the cause of.
I assume, you are running the Scripts without sudo ? in this case, my script is searching in some directories where a non root user account does not have permissions....but this is okay...
Do you envisage problems with this location? Is there any chance of having the location set as the variable $INSTPATH at the top of the CumulusNow script to make it easier to change rather than editing the if/then statement as I think this is better practice and less likely to introduce errors? Just my initial thought.
No it is absolutely no problem where you install both scripts......
And regarding the $INSTPATH you are right, at thetop of the script, there are 2 options:
Cumulusmx.exe is either in /home/pi/CumulusMX/ or my script is searching the complete filesystem to find this file
---> INSTPATH=$(sudo find / -type d -name "CumulusMX" -print |head -n1) > /dev/null <----- to finally set the variable $INSTPATH
This can take a long time, if there is a large SD Card or Large Harddisk installed.......
So finally, YES, you can set the variable INSTPATH by yourself and everything will be a little bit faster when starting.
Modify the the script at the top like this:

#if [ ! -f "/home/pi/CumulusMX/CumulusMX.exe" ];then
# INSTPATH=$(sudo find / -type d -name "CumulusMX" -print |head -n1) > /dev/null
# else
# INSTPATH="/home/pi/CumulusMX/"
#fi
INSTPATH="/usr/local/bin/CumulusMX/"

The line in red is the new line....the others can be deleted or qouted with #
I am wondering now though if the .json file might be missing as I had my WMR928N disconnected at the time I was setting up the three scripts (perhaps CumulusMX needs the connection for the file to be created?) I couldn't have it connected at the time as it was impossible to have the two together while I set up the scripts. In any event, I will try the cumulusnow.sh script with the WMR928N connected to see if it resolves this issue.
You are absolutely right, the graphconfig.json is NOT in the original cumulusmx.zip file and to be honest, I don't know where it comes from or if this file is being created by CumulusMX while a stationis connected.....maybe someone else can shade a light on this ?
But anyway, the only reason why I need this file is, I am getting the units from it.....unfortunately I did not find any other file which contains information about the local units used in users country like: °C or °F or km/h or Miles/h .....so I would suggest the following
Here is my graphconfig.json attached at this post, please feel free and copy it to your /web folder and you are done......maybe you need to modify some units to fit to your country.....
graphconfig.zip
BTW, there is a bug at line 314 of the cumulusmx.sh (case 2) - the shutdown command is misspelled "shuttdown -h" so the shutdown case fails to execute.
Thank you very much, you are right there is a typo.........
So next time, when I update this script the bug fill be fixed......

cheers Jan
You do not have the required permissions to view the files attached to this post.
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

freddie
Posts: 437
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2
Operating System: GNU/Linux (Ubuntu 18.04)
Location: Dorrington, Shropshire
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by freddie » Sun 12 May 2019 11:16 am

jank wrote:
Sun 12 May 2019 10:11 am
Hello Adam
SunDial wrote: I am wondering now though if the .json file might be missing as I had my WMR928N disconnected at the time I was setting up the three scripts (perhaps CumulusMX needs the connection for the file to be created?) I couldn't have it connected at the time as it was impossible to have the two together while I set up the scripts. In any event, I will try the cumulusnow.sh script with the WMR928N connected to see if it resolves this issue.
You are absolutely right, the graphconfig.json is NOT in the original cumulusmx.zip file and to be honest, I don't know where it comes from or if this file is being created by CumulusMX while a stationis connected.....maybe someone else can shade a light on this ?
But anyway, the only reason why I need this file is, I am getting the units from it.....unfortunately I did not find any other file which contains information about the local units used in users country like: °C or °F or km/h or Miles/h
graphconfig.json is very likely to be generated when you first run Cumulus and select the units that you wish to use.
Freddie
Image

Post Reply