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

User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
rogerthn
Posts: 485
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

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

Post by rogerthn »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
rogerthn
Posts: 485
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

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

Post by rogerthn »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

dazza :D

https://www.davisworthing.co.uk

Image
User avatar
rogerthn
Posts: 485
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

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

Post by rogerthn »

Are you running the command on the LCD?
Image
User avatar
dazza1223
Posts: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
User avatar
rogerthn
Posts: 485
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

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

Post by rogerthn »

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: 860
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Pro 2 plus
Operating System: Raspberry pi 4 (4gb)
Location: Worthing
Contact:

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

Post by dazza1223 »

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

https://www.davisworthing.co.uk

Image
SunDial
Posts: 53
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 »

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: 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 - Version 1.7

Post by jank »

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

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: 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 - Version 1.7

Post by jank »

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.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
freddie
Posts: 2421
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

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

Post by freddie »

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